From 08b581e31d42411b3a2ebe6fc888c520556e256b Mon Sep 17 00:00:00 2001 From: "tharun.pargi" Date: Tue, 17 Oct 2023 13:07:40 +0530 Subject: [PATCH] 3.0.0 --- README.md | 8 +- lib/config/json_details.json | 2 +- lib/models/authenticator/oauth_token.js | 57 +- lib/models/authenticator/store/db_store.js | 52 +- lib/models/authenticator/store/file_store.js | 58 +- lib/routes/dc/data_center.js | 84 + lib/routes/initialize_builder.js | 8 +- lib/routes/logger/sdk_logger.js | 38 +- lib/utils/util/constants.js | 31 +- lib/utils/util/utility.js | 11 +- package.json | 2 +- versions/3.0.0/README.md | 958 +++++++++ versions/3.0.0/class_hierarchy.png | Bin 0 -> 54307 bytes versions/3.0.0/lib/config/json_details.json | 1 + .../appointment_preference/action_handler.js | 7 + .../appointment_preference/action_response.js | 7 + .../appointment_preference/action_wrapper.js | 63 + .../appointment_preference/api_exception.js | 136 ++ .../appointment_preference.js | 182 ++ .../appointment_preference_operations.js | 69 + .../appointment_preference/body_wrapper.js | 67 + .../crm/api/appointment_preference/field.js | 89 + .../appointment_preference/field_mappings.js | 114 ++ .../import_appointment_preference.js | 14 + .../crm/api/appointment_preference/layout.js | 89 + .../response_handler.js | 7 + .../response_wrapper.js | 67 + .../success_response.js | 136 ++ .../api/assignment_rules/action_response.js | 7 + .../api/assignment_rules/action_wrapper.js | 66 + .../crm/api/assignment_rules/api_exception.js | 136 ++ .../api/assignment_rules/assignment_rules.js | 277 +++ .../assignment_rules_operations.js | 77 + .../crm/api/assignment_rules/created_by.js | 136 ++ .../api/assignment_rules/default_assignee.js | 89 + .../import_assignment_rules.js | 12 + .../api/assignment_rules/response_handler.js | 7 + .../api/assignment_rules/response_wrapper.js | 66 + .../api/assignment_rules/success_response.js | 136 ++ .../crm/api/associate_email/action_handler.js | 7 + .../api/associate_email/action_response.js | 7 + .../crm/api/associate_email/action_wrapper.js | 66 + .../crm/api/associate_email/api_exception.js | 136 ++ .../api/associate_email/associate_email.js | 322 +++ .../associate_email_operations.js | 50 + .../crm/api/associate_email/attachments.js | 66 + .../zoho/crm/api/associate_email/available.js | 114 ++ .../crm/api/associate_email/body_wrapper.js | 66 + .../com/zoho/crm/api/associate_email/from.js | 89 + .../associate_email/import_associate_email.js | 15 + .../crm/api/associate_email/linked_record.js | 90 + .../crm/api/associate_email/module_map.js | 89 + .../zoho/crm/api/associate_email/record.js | 114 ++ .../api/associate_email/success_response.js | 136 ++ .../com/zoho/crm/api/associate_email/to.js | 89 + .../crm/api/attachments/action_handler.js | 7 + .../crm/api/attachments/action_response.js | 7 + .../crm/api/attachments/action_wrapper.js | 66 + .../zoho/crm/api/attachments/api_exception.js | 136 ++ .../zoho/crm/api/attachments/attachment.js | 438 +++++ .../api/attachments/attachments_operations.js | 249 +++ .../crm/api/attachments/file_body_wrapper.js | 67 + .../crm/api/attachments/import_attachments.js | 16 + .../core/com/zoho/crm/api/attachments/info.js | 135 ++ .../com/zoho/crm/api/attachments/owner.js | 89 + .../com/zoho/crm/api/attachments/parent_id.js | 89 + .../crm/api/attachments/response_handler.js | 7 + .../crm/api/attachments/response_wrapper.js | 90 + .../crm/api/attachments/success_response.js | 136 ++ .../api/available_currencies/api_exception.js | 136 ++ .../available_currencies_operations.js | 30 + .../crm/api/available_currencies/currency.js | 204 ++ .../import_available_currencies.js | 5 + .../available_currencies/response_handler.js | 7 + .../available_currencies/response_wrapper.js | 66 + .../com/zoho/crm/api/backup/action_handler.js | 7 + .../zoho/crm/api/backup/action_response.js | 7 + .../com/zoho/crm/api/backup/action_wrapper.js | 63 + .../com/zoho/crm/api/backup/api_exception.js | 136 ++ .../core/com/zoho/crm/api/backup/backup.js | 182 ++ .../zoho/crm/api/backup/backup_operations.js | 153 ++ .../com/zoho/crm/api/backup/body_wrapper.js | 67 + .../zoho/crm/api/backup/file_body_wrapper.js | 67 + .../core/com/zoho/crm/api/backup/history.js | 228 +++ .../zoho/crm/api/backup/history_wrapper.js | 90 + .../com/zoho/crm/api/backup/import_backup.js | 17 + .../lib/core/com/zoho/crm/api/backup/info.js | 135 ++ .../core/com/zoho/crm/api/backup/requester.js | 112 ++ .../zoho/crm/api/backup/response_handler.js | 7 + .../zoho/crm/api/backup/success_response.js | 136 ++ .../lib/core/com/zoho/crm/api/backup/urls.js | 112 ++ .../com/zoho/crm/api/backup/urls_wrapper.js | 67 + .../zoho/crm/api/blueprint/action_handler.js | 7 + .../zoho/crm/api/blueprint/api_exception.js | 136 ++ .../crm/api/blueprint/association_details.js | 91 + .../com/zoho/crm/api/blueprint/auto_number.js | 112 ++ .../com/zoho/crm/api/blueprint/blue_print.js | 137 ++ .../crm/api/blueprint/blueprint_operations.js | 84 + .../zoho/crm/api/blueprint/body_wrapper.js | 66 + .../zoho/crm/api/blueprint/convert_mapping.js | 115 ++ .../core/com/zoho/crm/api/blueprint/crypt.js | 135 ++ .../com/zoho/crm/api/blueprint/currency.js | 89 + .../com/zoho/crm/api/blueprint/escalation.js | 89 + .../core/com/zoho/crm/api/blueprint/field.js | 1117 +++++++++++ .../com/zoho/crm/api/blueprint/formula.js | 89 + .../crm/api/blueprint/import_blueprint.js | 28 + .../core/com/zoho/crm/api/blueprint/layout.js | 89 + .../zoho/crm/api/blueprint/lookup_field.js | 89 + .../core/com/zoho/crm/api/blueprint/module.js | 135 ++ .../zoho/crm/api/blueprint/module_fields.js | 135 ++ .../zoho/crm/api/blueprint/module_mapping.js | 112 ++ .../crm/api/blueprint/multi_select_lookup.js | 181 ++ .../zoho/crm/api/blueprint/next_transition.js | 135 ++ .../zoho/crm/api/blueprint/process_info.js | 297 +++ .../com/zoho/crm/api/blueprint/profile.js | 112 ++ .../crm/api/blueprint/response_handler.js | 7 + .../crm/api/blueprint/response_wrapper.js | 67 + .../crm/api/blueprint/success_response.js | 136 ++ .../com/zoho/crm/api/blueprint/tool_tip.js | 89 + .../com/zoho/crm/api/blueprint/transition.js | 320 +++ .../com/zoho/crm/api/blueprint/view_type.js | 135 ++ .../zoho/crm/api/bulk_read/action_handler.js | 7 + .../zoho/crm/api/bulk_read/action_response.js | 7 + .../zoho/crm/api/bulk_read/action_wrapper.js | 89 + .../zoho/crm/api/bulk_read/api_exception.js | 136 ++ .../crm/api/bulk_read/bulk_read_operations.js | 85 + .../com/zoho/crm/api/bulk_read/call_back.js | 90 + .../com/zoho/crm/api/bulk_read/criteria.js | 180 ++ .../crm/api/bulk_read/file_body_wrapper.js | 67 + .../crm/api/bulk_read/import_bulk_read.js | 15 + .../com/zoho/crm/api/bulk_read/job_detail.js | 231 +++ .../core/com/zoho/crm/api/bulk_read/query.js | 184 ++ .../zoho/crm/api/bulk_read/request_wrapper.js | 115 ++ .../crm/api/bulk_read/response_handler.js | 7 + .../crm/api/bulk_read/response_wrapper.js | 66 + .../core/com/zoho/crm/api/bulk_read/result.js | 158 ++ .../crm/api/bulk_read/success_response.js | 136 ++ .../crm/api/bulk_write/action_response.js | 7 + .../zoho/crm/api/bulk_write/api_exception.js | 274 +++ .../api/bulk_write/bulk_write_operations.js | 124 ++ .../crm/api/bulk_write/bulk_write_response.js | 253 +++ .../com/zoho/crm/api/bulk_write/call_back.js | 90 + .../zoho/crm/api/bulk_write/default_value.js | 109 + .../zoho/crm/api/bulk_write/field_mapping.js | 182 ++ .../core/com/zoho/crm/api/bulk_write/file.js | 182 ++ .../crm/api/bulk_write/file_body_wrapper.js | 67 + .../crm/api/bulk_write/import_bulk_write.js | 16 + .../crm/api/bulk_write/request_wrapper.js | 160 ++ .../com/zoho/crm/api/bulk_write/resource.js | 253 +++ .../crm/api/bulk_write/response_handler.js | 7 + .../crm/api/bulk_write/response_wrapper.js | 7 + .../com/zoho/crm/api/bulk_write/result.js | 66 + .../crm/api/bulk_write/success_response.js | 136 ++ .../crm/api/business_hours/action_handler.js | 7 + .../crm/api/business_hours/action_response.js | 7 + .../crm/api/business_hours/action_wrapper.js | 63 + .../crm/api/business_hours/api_exception.js | 136 ++ .../crm/api/business_hours/body_wrapper.js | 67 + .../break_hours_custom_timing.js | 90 + .../crm/api/business_hours/business_hours.js | 205 ++ .../business_hours/business_hours_created.js | 136 ++ .../business_hours_operations.js | 115 ++ .../business_hours/import_business_hours.js | 14 + .../api/business_hours/response_handler.js | 7 + .../api/business_hours/response_wrapper.js | 67 + .../crm/api/cancel_meetings/action_handler.js | 7 + .../api/cancel_meetings/action_response.js | 7 + .../crm/api/cancel_meetings/action_wrapper.js | 66 + .../crm/api/cancel_meetings/api_exception.js | 136 ++ .../crm/api/cancel_meetings/body_wrapper.js | 66 + .../cancel_meetings_operations.js | 53 + .../cancel_meetings/import_cancel_meetings.js | 8 + .../zoho/crm/api/cancel_meetings/notify.js | 66 + .../api/cancel_meetings/success_response.js | 136 ++ .../crm/api/change_owner/action_handler.js | 7 + .../crm/api/change_owner/action_response.js | 7 + .../crm/api/change_owner/action_wrapper.js | 66 + .../crm/api/change_owner/api_exception.js | 136 ++ .../zoho/crm/api/change_owner/body_wrapper.js | 113 ++ .../change_owner/change_owner_operations.js | 86 + .../crm/api/change_owner/error_details.js | 89 + .../api/change_owner/import_change_owner.js | 11 + .../zoho/crm/api/change_owner/mass_wrapper.js | 137 ++ .../com/zoho/crm/api/change_owner/owner.js | 66 + .../crm/api/change_owner/related_modules.js | 89 + .../crm/api/change_owner/success_response.js | 136 ++ .../crm/api/contact_roles/action_handler.js | 7 + .../crm/api/contact_roles/action_response.js | 7 + .../crm/api/contact_roles/action_wrapper.js | 66 + .../crm/api/contact_roles/api_exception.js | 136 ++ .../crm/api/contact_roles/body_wrapper.js | 66 + .../crm/api/contact_roles/contact_role.js | 112 ++ .../contact_roles/contact_roles_operations.js | 190 ++ .../api/contact_roles/import_contact_roles.js | 10 + .../crm/api/contact_roles/response_handler.js | 7 + .../crm/api/contact_roles/success_response.js | 136 ++ .../zoho/crm/api/currencies/action_handler.js | 7 + .../crm/api/currencies/action_response.js | 7 + .../zoho/crm/api/currencies/action_wrapper.js | 66 + .../zoho/crm/api/currencies/api_exception.js | 136 ++ .../zoho/crm/api/currencies/base_currency.js | 228 +++ .../base_currency_action_response.js | 7 + .../base_currency_action_wrapper.js | 63 + .../api/currencies/base_currency_wrapper.js | 67 + .../zoho/crm/api/currencies/body_wrapper.js | 66 + .../api/currencies/currencies_operations.js | 186 ++ .../com/zoho/crm/api/currencies/currency.js | 345 ++++ .../crm/api/currencies/currency_format.js | 113 ++ .../crm/api/currencies/disable_success.js | 136 ++ .../zoho/crm/api/currencies/error_details.js | 89 + .../com/zoho/crm/api/currencies/format.js | 113 ++ .../crm/api/currencies/import_currencies.js | 17 + .../crm/api/currencies/response_handler.js | 7 + .../crm/api/currencies/success_response.js | 136 ++ .../crm/api/custom_views/action_handler.js | 7 + .../crm/api/custom_views/action_response.js | 7 + .../crm/api/custom_views/action_wrapper.js | 66 + .../crm/api/custom_views/api_exception.js | 136 ++ .../zoho/crm/api/custom_views/body_wrapper.js | 90 + .../com/zoho/crm/api/custom_views/criteria.js | 156 ++ .../zoho/crm/api/custom_views/custom_view.js | 555 ++++++ .../custom_views/custom_views_operations.js | 77 + .../com/zoho/crm/api/custom_views/field.js | 89 + .../com/zoho/crm/api/custom_views/fields.js | 112 ++ .../api/custom_views/import_custom_views.js | 21 + .../com/zoho/crm/api/custom_views/info.js | 182 ++ .../com/zoho/crm/api/custom_views/owner.js | 112 ++ .../zoho/crm/api/custom_views/pin_fields.js | 90 + .../crm/api/custom_views/pin_unpin_fields.js | 66 + .../crm/api/custom_views/response_handler.js | 7 + .../zoho/crm/api/custom_views/shared_to.js | 136 ++ .../com/zoho/crm/api/custom_views/sort_by.js | 89 + .../crm/api/custom_views/success_response.js | 136 ++ .../zoho/crm/api/custom_views/translation.js | 135 ++ .../api/deal_contact_roles/action_handler.js | 7 + .../api/deal_contact_roles/action_response.js | 7 + .../api/deal_contact_roles/action_wrapper.js | 66 + .../api/deal_contact_roles/api_exception.js | 136 ++ .../api/deal_contact_roles/body_wrapper.js | 90 + .../api/deal_contact_roles/contact_role.js | 89 + .../zoho/crm/api/deal_contact_roles/data.js | 182 ++ .../deal_contact_roles_operations.js | 150 ++ .../api/deal_contact_roles/error_details.js | 89 + .../import_deal_contact_roles.js | 13 + .../zoho/crm/api/deal_contact_roles/info.js | 204 ++ .../deal_contact_roles/response_handler.js | 7 + .../deal_contact_roles/success_response.js | 136 ++ .../zoho/crm/api/definition/api_exception.js | 136 ++ .../com/zoho/crm/api/definition/definition.js | 112 ++ .../crm/api/definition/import_definition.js | 6 + .../crm/api/definition/minified_property.js | 181 ++ .../crm/api/definition/minified_property1.js | 158 ++ .../com/zoho/crm/api/definition/property.js | 319 +++ .../crm/api/definition/response_wrapper.js | 67 + .../api/download_attachments/api_exception.js | 136 ++ .../download_attachments_operations.js | 56 + .../download_attachments/file_body_wrapper.js | 67 + .../import_download_attachments.js | 5 + .../download_attachments/response_handler.js | 7 + .../download_inline_images/api_exception.js | 136 ++ .../download_inline_images_operations.js | 57 + .../file_body_wrapper.js | 67 + .../import_download_inline_images.js | 5 + .../response_handler.js | 7 + .../email_compose_meta/compose_settings.js | 136 ++ .../zoho/crm/api/email_compose_meta/data.js | 66 + .../crm/api/email_compose_meta/data_map.js | 184 ++ .../api/email_compose_meta/default_form.js | 135 ++ .../email_compose_meta/features_available.js | 412 ++++ .../api/email_compose_meta/from_address.js | 159 ++ .../import_email_compose_meta.js | 7 + .../zoho/crm/api/email_compose_meta/user.js | 159 ++ .../email_related_records/api_exception.js | 136 ++ .../api/email_related_records/attachments.js | 112 ++ .../crm/api/email_related_records/email.js | 577 ++++++ .../email_related_records_operations.js | 96 + .../import_email_related_records.js | 12 + .../crm/api/email_related_records/info.js | 158 ++ .../email_related_records/linked_record.js | 90 + .../crm/api/email_related_records/module.js | 89 + .../email_related_records/response_handler.js | 7 + .../email_related_records/response_wrapper.js | 90 + .../crm/api/email_related_records/status.js | 181 ++ .../api/email_related_records/user_details.js | 89 + .../crm/api/email_sharing/api_exception.js | 136 ++ .../email_sharing/email_sharing_operations.js | 54 + .../api/email_sharing/get_email_sharing.js | 89 + .../api/email_sharing/import_email_sharing.js | 6 + .../crm/api/email_sharing/response_handler.js | 7 + .../crm/api/email_sharing/response_wrapper.js | 66 + .../crm/api/email_sharing/share_from_user.js | 112 ++ .../crm/api/email_templates/api_exception.js | 136 ++ .../crm/api/email_templates/attachment.js | 135 ++ .../crm/api/email_templates/email_template.js | 510 +++++ .../email_templates_operations.js | 66 + .../email_templates/import_email_templates.js | 9 + .../com/zoho/crm/api/email_templates/info.js | 135 ++ .../last_version_statistics.js | 181 ++ .../api/email_templates/response_handler.js | 7 + .../api/email_templates/response_wrapper.js | 90 + .../crm/api/entity_scores/api_exception.js | 136 ++ .../crm/api/entity_scores/entity_scores.js | 294 +++ .../entity_scores/entity_scores_operations.js | 87 + .../crm/api/entity_scores/entity_structure.js | 89 + .../entity_scores/entity_structure_group.js | 7 + .../entity_structure_with_module.js | 113 ++ .../api/entity_scores/import_entity_scores.js | 13 + .../com/zoho/crm/api/entity_scores/info.js | 250 +++ .../crm/api/entity_scores/module_structure.js | 89 + .../crm/api/entity_scores/response_handler.js | 7 + .../crm/api/entity_scores/response_wrapper.js | 90 + .../entity_scores/scoring_rule_structure.js | 89 + .../zoho/crm/api/exception/sdk_exception.js | 53 + .../api/field_attachments/api_exception.js | 136 ++ .../field_attachments_operations.js | 67 + .../field_attachments/file_body_wrapper.js | 67 + .../import_field_attachments.js | 5 + .../api/field_attachments/response_handler.js | 7 + .../field_map_dependency/action_handler.js | 7 + .../field_map_dependency/action_response.js | 7 + .../field_map_dependency/action_wrapper.js | 66 + .../api/field_map_dependency/api_exception.js | 136 ++ .../api/field_map_dependency/body_wrapper.js | 90 + .../crm/api/field_map_dependency/child.js | 89 + .../field_map_dependency_operations.js | 204 ++ .../import_field_map_dependency.js | 20 + .../zoho/crm/api/field_map_dependency/info.js | 135 ++ .../field_map_dependency/map_dependency.js | 253 +++ .../crm/api/field_map_dependency/parent.js | 89 + .../field_map_dependency/pick_list_mapping.js | 135 ++ .../api/field_map_dependency/picklist_map.js | 135 ++ .../field_map_dependency/response_handler.js | 7 + .../api/field_map_dependency/sub_module.js | 89 + .../field_map_dependency/success_response.js | 136 ++ .../zoho/crm/api/fields/action_response.js | 7 + .../com/zoho/crm/api/fields/action_wrapper.js | 66 + .../com/zoho/crm/api/fields/api_exception.js | 136 ++ .../crm/api/fields/association_details.js | 91 + .../com/zoho/crm/api/fields/auto_number.js | 135 ++ .../com/zoho/crm/api/fields/body_wrapper.js | 66 + .../zoho/crm/api/fields/convert_mapping.js | 112 ++ .../lib/core/com/zoho/crm/api/fields/crypt.js | 181 ++ .../core/com/zoho/crm/api/fields/currency.js | 90 + .../com/zoho/crm/api/fields/email_parser.js | 89 + .../com/zoho/crm/api/fields/expression.js | 113 ++ .../core/com/zoho/crm/api/fields/external.js | 113 ++ .../core/com/zoho/crm/api/fields/fields.js | 1652 ++++++++++++++++ .../zoho/crm/api/fields/fields_operations.js | 84 + .../zoho/crm/api/fields/file_upolad_option.js | 89 + .../zoho/crm/api/fields/forecast_category.js | 89 + .../core/com/zoho/crm/api/fields/formula.js | 90 + .../zoho/crm/api/fields/function_parameter.js | 66 + .../zoho/crm/api/fields/hipaa_compliance.js | 89 + .../zoho/crm/api/fields/history_tracking.js | 91 + .../crm/api/fields/history_tracking_module.js | 182 ++ .../com/zoho/crm/api/fields/import_fields.js | 42 + .../core/com/zoho/crm/api/fields/lookup.js | 206 ++ .../lib/core/com/zoho/crm/api/fields/maps.js | 89 + .../com/zoho/crm/api/fields/minified_field.js | 89 + .../crm/api/fields/multi_module_lookup.js | 112 ++ .../zoho/crm/api/fields/multiselectlookup.js | 252 +++ .../com/zoho/crm/api/fields/operation_type.js | 135 ++ .../zoho/crm/api/fields/pick_list_value.js | 321 +++ .../core/com/zoho/crm/api/fields/private.js | 112 ++ .../core/com/zoho/crm/api/fields/profile.js | 112 ++ .../com/zoho/crm/api/fields/query_details.js | 89 + .../zoho/crm/api/fields/refer_from_field.js | 89 + .../zoho/crm/api/fields/response_handler.js | 7 + .../zoho/crm/api/fields/rollup_criteria.js | 110 ++ .../com/zoho/crm/api/fields/rollup_summary.js | 161 ++ .../com/zoho/crm/api/fields/show_fields.js | 90 + .../core/com/zoho/crm/api/fields/success.js | 136 ++ .../core/com/zoho/crm/api/fields/tooltip.js | 90 + .../core/com/zoho/crm/api/fields/unique.js | 66 + .../core/com/zoho/crm/api/fields/view_type.js | 135 ++ .../com/zoho/crm/api/files/action_handler.js | 7 + .../com/zoho/crm/api/files/action_response.js | 7 + .../com/zoho/crm/api/files/action_wrapper.js | 66 + .../com/zoho/crm/api/files/api_exception.js | 136 ++ .../com/zoho/crm/api/files/body_wrapper.js | 67 + .../zoho/crm/api/files/file_body_wrapper.js | 67 + .../zoho/crm/api/files/files_operations.js | 80 + .../com/zoho/crm/api/files/import_files.js | 11 + .../zoho/crm/api/files/response_handler.js | 7 + .../zoho/crm/api/files/success_response.js | 136 ++ .../crm/api/fiscal_year/action_handler.js | 7 + .../crm/api/fiscal_year/action_response.js | 7 + .../crm/api/fiscal_year/action_wrapper.js | 63 + .../zoho/crm/api/fiscal_year/api_exception.js | 136 ++ .../zoho/crm/api/fiscal_year/body_wrapper.js | 67 + .../api/fiscal_year/fiscal_year_operations.js | 56 + .../crm/api/fiscal_year/import_fiscal_year.js | 10 + .../crm/api/fiscal_year/response_handler.js | 7 + .../crm/api/fiscal_year/response_wrapper.js | 67 + .../crm/api/fiscal_year/success_response.js | 136 ++ .../core/com/zoho/crm/api/fiscal_year/year.js | 113 ++ .../zoho/crm/api/from_addresses/address.js | 158 ++ .../crm/api/from_addresses/api_exception.js | 136 ++ .../from_addresses_operations.js | 30 + .../from_addresses/import_from_addresses.js | 5 + .../api/from_addresses/response_handler.js | 7 + .../api/from_addresses/response_wrapper.js | 66 + .../api/hipaa_compliance/action_handler.js | 7 + .../api/hipaa_compliance/action_wrapper.js | 63 + .../crm/api/hipaa_compliance/api_exception.js | 136 ++ .../api/hipaa_compliance/hipaa_compliance.js | 181 ++ .../import_hipaa_compliance.js | 7 + .../zoho/crm/api/hipaa_compliance/modules.js | 89 + .../api/hipaa_compliance/response_wrapper.js | 67 + .../api/hipaa_compliance/success_response.js | 136 ++ .../zoho/crm/api/holidays/action_handler.js | 7 + .../zoho/crm/api/holidays/action_response.js | 7 + .../zoho/crm/api/holidays/action_wrapper.js | 66 + .../zoho/crm/api/holidays/api_exception.js | 136 ++ .../com/zoho/crm/api/holidays/body_wrapper.js | 7 + .../zoho/crm/api/holidays/business_holiday.js | 113 ++ .../api/holidays/create_business_holiday.js | 66 + .../crm/api/holidays/create_shift_holiday.js | 66 + .../core/com/zoho/crm/api/holidays/holiday.js | 182 ++ .../com/zoho/crm/api/holidays/holidays.js | 66 + .../crm/api/holidays/holidays_operations.js | 221 +++ .../zoho/crm/api/holidays/import_holidays.js | 25 + .../core/com/zoho/crm/api/holidays/info.js | 135 ++ .../zoho/crm/api/holidays/resonse_handler.js | 7 + .../zoho/crm/api/holidays/response_handler.js | 7 + .../zoho/crm/api/holidays/response_wrapper.js | 90 + .../zoho/crm/api/holidays/shift_holiday.js | 137 ++ .../com/zoho/crm/api/holidays/shift_hour.js | 89 + .../zoho/crm/api/holidays/success_response.js | 136 ++ .../api/inventory_templates/api_exception.js | 136 ++ .../crm/api/inventory_templates/folder.js | 89 + .../import_inventory_templates.js | 8 + .../zoho/crm/api/inventory_templates/info.js | 135 ++ .../inventory_templates/inventory_template.js | 370 ++++ .../inventory_templates_operations.js | 69 + .../inventory_templates/response_handler.js | 7 + .../inventory_templates/response_wrapper.js | 90 + .../api/isc_signature/import_isc_signature.js | 1 + .../zoho/crm/api/isc_signature/signature.js | 63 + .../zoho/crm/api/layouts/actions_allowed.js | 204 ++ .../com/zoho/crm/api/layouts/api_exception.js | 136 ++ .../zoho/crm/api/layouts/convert_mapping.js | 163 ++ .../com/zoho/crm/api/layouts/deal_field.js | 135 ++ .../crm/api/layouts/deal_layout_mapping.js | 113 ++ .../api/layouts/default_assignment_view.js | 112 ++ .../com/zoho/crm/api/layouts/default_view.js | 112 ++ .../zoho/crm/api/layouts/import_layouts.js | 20 + .../core/com/zoho/crm/api/layouts/layouts.js | 508 +++++ .../crm/api/layouts/layouts_operations.js | 84 + .../zoho/crm/api/layouts/minified_layout.js | 89 + .../core/com/zoho/crm/api/layouts/profiles.js | 160 ++ .../com/zoho/crm/api/layouts/properties.js | 113 ++ .../zoho/crm/api/layouts/response_handler.js | 7 + .../zoho/crm/api/layouts/response_wrapper.js | 66 + .../com/zoho/crm/api/layouts/section_field.js | 1746 +++++++++++++++++ .../crm/api/layouts/section_subform_field.js | 113 ++ .../core/com/zoho/crm/api/layouts/sections.js | 320 +++ .../core/com/zoho/crm/api/layouts/tooltip.js | 90 + .../crm/api/mail_merge/action_response.js | 7 + .../zoho/crm/api/mail_merge/action_wrapper.js | 66 + .../com/zoho/crm/api/mail_merge/address.js | 67 + .../crm/api/mail_merge/address_value_map.js | 66 + .../zoho/crm/api/mail_merge/api_exception.js | 136 ++ .../crm/api/mail_merge/download_mail_merge.js | 137 ++ .../mail_merge/download_mail_merge_wrapper.js | 66 + .../crm/api/mail_merge/import_mail_merge.js | 16 + .../com/zoho/crm/api/mail_merge/mail_merge.js | 253 +++ .../crm/api/mail_merge/mail_merge_template.js | 89 + .../crm/api/mail_merge/mail_merge_wrapper.js | 66 + .../api/mail_merge/sign_action_response.js | 7 + .../crm/api/mail_merge/sign_action_wrapper.js | 66 + .../crm/api/mail_merge/sign_mail_merge.js | 136 ++ .../api/mail_merge/sign_mail_merge_wrapper.js | 66 + .../com/zoho/crm/api/mail_merge/signers.js | 114 ++ .../crm/api/mail_merge/success_response.js | 136 ++ .../api/mass_change_owner/action_handler.js | 7 + .../api/mass_change_owner/action_response.js | 7 + .../api/mass_change_owner/action_wrapper.js | 66 + .../api/mass_change_owner/api_exception.js | 136 ++ .../crm/api/mass_change_owner/body_wrapper.js | 114 ++ .../import_mass_change_owner.js | 13 + .../mass_change_owner_operations.js | 80 + .../zoho/crm/api/mass_change_owner/owner.js | 66 + .../api/mass_change_owner/response_handler.js | 7 + .../api/mass_change_owner/response_wrapper.js | 66 + .../zoho/crm/api/mass_change_owner/status.js | 159 ++ .../api/mass_change_owner/success_response.js | 136 ++ .../crm/api/mass_change_owner/territory.js | 89 + .../crm/api/mass_convert/action_response.js | 7 + .../crm/api/mass_convert/api_exception.js | 136 ++ .../zoho/crm/api/mass_convert/assign_to.js | 66 + .../com/zoho/crm/api/mass_convert/convert.js | 231 +++ .../crm/api/mass_convert/error_details.js | 89 + .../api/mass_convert/import_mass_convert.js | 14 + .../mass_convert/mass_convert_operations.js | 72 + .../api/mass_convert/move_attachments_to.js | 89 + .../crm/api/mass_convert/portal_user_type.js | 89 + .../crm/api/mass_convert/related_module.js | 89 + .../crm/api/mass_convert/response_handler.js | 7 + .../crm/api/mass_convert/response_wrapper.js | 66 + .../com/zoho/crm/api/mass_convert/status.js | 158 ++ .../crm/api/mass_convert/success_response.js | 136 ++ .../api/mass_delete_cvid/action_handler.js | 7 + .../api/mass_delete_cvid/action_response.js | 7 + .../api/mass_delete_cvid/action_wrapper.js | 66 + .../crm/api/mass_delete_cvid/api_exception.js | 136 ++ .../api/mass_delete_cvid/cvid_body_wrapper.js | 90 + .../import_mass_delete_cvid.js | 14 + .../mass_delete_cvid_operations.js | 113 ++ .../mass_delete_cvid/mass_delete_scheduled.js | 136 ++ .../record_id_body_wrapper.js | 90 + .../api/mass_delete_cvid/response_handler.js | 7 + .../api/mass_delete_cvid/response_wrapper.js | 66 + .../zoho/crm/api/mass_delete_cvid/status.js | 136 ++ .../api/mass_delete_cvid/success_response.js | 136 ++ .../crm/api/mass_delete_cvid/territory.js | 89 + .../zoho/crm/api/modules/action_handler.js | 7 + .../zoho/crm/api/modules/action_response.js | 7 + .../zoho/crm/api/modules/action_wrapper.js | 66 + .../com/zoho/crm/api/modules/api_exception.js | 136 ++ .../core/com/zoho/crm/api/modules/argument.js | 89 + .../com/zoho/crm/api/modules/body_wrapper.js | 66 + .../zoho/crm/api/modules/import_modules.js | 20 + .../com/zoho/crm/api/modules/lookup_field.js | 113 ++ .../api/modules/lookup_field_properties.js | 66 + .../zoho/crm/api/modules/minified_module.js | 112 ++ .../crm/api/modules/module_field_lookup.js | 207 ++ .../com/zoho/crm/api/modules/module_fields.js | 1653 ++++++++++++++++ .../core/com/zoho/crm/api/modules/modules.js | 1430 ++++++++++++++ .../crm/api/modules/modules_operations.js | 150 ++ .../api/modules/related_list_properties.js | 113 ++ .../zoho/crm/api/modules/response_handler.js | 7 + .../zoho/crm/api/modules/response_wrapper.js | 66 + .../crm/api/modules/sharing_properties.js | 113 ++ .../zoho/crm/api/modules/success_response.js | 136 ++ .../com/zoho/crm/api/modules/territory.js | 112 ++ .../com/zoho/crm/api/notes/action_handler.js | 7 + .../com/zoho/crm/api/notes/action_response.js | 7 + .../com/zoho/crm/api/notes/action_wrapper.js | 66 + .../com/zoho/crm/api/notes/api_exception.js | 136 ++ .../com/zoho/crm/api/notes/body_wrapper.js | 66 + .../com/zoho/crm/api/notes/import_notes.js | 16 + .../lib/core/com/zoho/crm/api/notes/info.js | 250 +++ .../lib/core/com/zoho/crm/api/notes/note.js | 439 +++++ .../zoho/crm/api/notes/notes_operations.js | 239 +++ .../zoho/crm/api/notes/response_handler.js | 7 + .../zoho/crm/api/notes/response_wrapper.js | 90 + .../zoho/crm/api/notes/success_response.js | 136 ++ .../crm/api/notifications/action_handler.js | 7 + .../crm/api/notifications/action_response.js | 7 + .../crm/api/notifications/action_wrapper.js | 66 + .../crm/api/notifications/api_exception.js | 136 ++ .../crm/api/notifications/body_wrapper.js | 66 + .../crm/api/notifications/delete_details.js | 112 ++ .../com/zoho/crm/api/notifications/event.js | 159 ++ .../api/notifications/import_notifications.js | 15 + .../com/zoho/crm/api/notifications/info.js | 135 ++ .../crm/api/notifications/notification.js | 321 +++ .../notifications/notifications_operations.js | 178 ++ .../crm/api/notifications/response_handler.js | 7 + .../crm/api/notifications/response_wrapper.js | 90 + .../crm/api/notifications/success_response.js | 136 ++ .../com/zoho/crm/api/org/action_handler.js | 7 + .../com/zoho/crm/api/org/api_exception.js | 136 ++ .../zoho/crm/api/org/checkin_preferences.js | 66 + .../lib/core/com/zoho/crm/api/org/feature.js | 89 + .../com/zoho/crm/api/org/file_body_wrapper.js | 67 + .../zoho/crm/api/org/hierarchy_preferences.js | 90 + .../core/com/zoho/crm/api/org/import_org.js | 13 + .../com/zoho/crm/api/org/license_details.js | 204 ++ .../lib/core/com/zoho/crm/api/org/org.js | 986 ++++++++++ .../com/zoho/crm/api/org/org_operations.js | 56 + .../lib/core/com/zoho/crm/api/org/resource.js | 89 + .../com/zoho/crm/api/org/response_handler.js | 7 + .../com/zoho/crm/api/org/response_wrapper.js | 66 + .../com/zoho/crm/api/org/success_response.js | 136 ++ .../zoho/crm/api/pipeline/action_handler.js | 7 + .../zoho/crm/api/pipeline/action_response.js | 7 + .../zoho/crm/api/pipeline/action_wrapper.js | 66 + .../zoho/crm/api/pipeline/api_exception.js | 136 ++ .../com/zoho/crm/api/pipeline/body_wrapper.js | 66 + .../com/zoho/crm/api/pipeline/d_pipeline.js | 67 + .../crm/api/pipeline/d_pipeline_wrapper.js | 66 + .../core/com/zoho/crm/api/pipeline/delete.js | 66 + .../crm/api/pipeline/forecast_category.js | 89 + .../zoho/crm/api/pipeline/import_pipeline.js | 30 + .../crm/api/pipeline/mandatory_details.js | 89 + .../core/com/zoho/crm/api/pipeline/maps.js | 228 +++ .../com/zoho/crm/api/pipeline/pipeline.js | 204 ++ .../crm/api/pipeline/pipeline_operations.js | 211 ++ .../zoho/crm/api/pipeline/regex_details.js | 112 ++ .../zoho/crm/api/pipeline/response_handler.js | 7 + .../core/com/zoho/crm/api/pipeline/stages.js | 89 + .../zoho/crm/api/pipeline/success_response.js | 136 ++ .../com/zoho/crm/api/pipeline/t_pipeline.js | 89 + .../crm/api/pipeline/transfer_pipeline.js | 90 + .../transfer_pipeline_action_handler.js | 7 + .../transfer_pipeline_action_response.js | 7 + .../transfer_pipeline_action_wrapper.js | 66 + .../transfer_pipeline_success_response.js | 136 ++ .../api/pipeline/transfer_pipeline_wrapper.js | 66 + .../crm/api/portal_invite/action_handler.js | 7 + .../crm/api/portal_invite/action_response.js | 7 + .../crm/api/portal_invite/action_wrapper.js | 66 + .../crm/api/portal_invite/api_exception.js | 136 ++ .../crm/api/portal_invite/body_wrapper.js | 66 + .../com/zoho/crm/api/portal_invite/data.js | 7 + .../api/portal_invite/import_portal_invite.js | 13 + .../crm/api/portal_invite/job_response.js | 112 ++ .../com/zoho/crm/api/portal_invite/portal.js | 136 ++ .../crm/api/portal_invite/portal_invite.js | 66 + .../portal_invite/portal_invite_operations.js | 67 + .../crm/api/portal_invite/response_wrapper.js | 66 + .../crm/api/portal_invite/success_response.js | 136 ++ .../crm/api/portal_user_type/api_exception.js | 136 ++ .../zoho/crm/api/portal_user_type/fields.js | 112 ++ .../zoho/crm/api/portal_user_type/filters.js | 112 ++ .../import_portal_user_type.js | 14 + .../zoho/crm/api/portal_user_type/layouts.js | 136 ++ .../zoho/crm/api/portal_user_type/modules.js | 253 +++ .../zoho/crm/api/portal_user_type/owner.js | 89 + .../crm/api/portal_user_type/permissions.js | 205 ++ .../portal_user_type/personality_module.js | 112 ++ .../portal_user_type_operations.js | 84 + .../api/portal_user_type/response_handler.js | 7 + .../api/portal_user_type/response_wrapper.js | 66 + .../crm/api/portal_user_type/user_type.js | 299 +++ .../zoho/crm/api/portal_user_type/views.js | 135 ++ .../zoho/crm/api/portals/action_handler.js | 7 + .../zoho/crm/api/portals/action_response.js | 7 + .../zoho/crm/api/portals/action_wrapper.js | 66 + .../com/zoho/crm/api/portals/api_exception.js | 136 ++ .../com/zoho/crm/api/portals/body_wrapper.js | 66 + .../zoho/crm/api/portals/import_portals.js | 11 + .../core/com/zoho/crm/api/portals/owner.js | 89 + .../core/com/zoho/crm/api/portals/portals.js | 206 ++ .../crm/api/portals/portals_operations.js | 110 ++ .../zoho/crm/api/portals/response_handler.js | 7 + .../zoho/crm/api/portals/response_wrapper.js | 66 + .../zoho/crm/api/portals/success_response.js | 136 ++ .../com/zoho/crm/api/portals_meta/filters.js | 112 ++ .../api/portals_meta/import_portals_meta.js | 6 + .../com/zoho/crm/api/portals_meta/layouts.js | 112 ++ .../com/zoho/crm/api/portals_meta/modules.js | 204 ++ .../crm/api/portals_meta/related_lists.js | 67 + .../com/zoho/crm/api/portals_meta/views.js | 135 ++ .../com/zoho/crm/api/portals_meta/wrapper.js | 66 + .../crm/api/privacy_configurable_apps/apps.js | 66 + .../import_privacy_configurable_apps.js | 2 + .../api/privacy_configurable_apps/wrapper.js | 66 + .../zoho/crm/api/privacy_preference/config.js | 112 ++ .../import_privacy_preference.js | 7 + .../zoho/crm/api/privacy_preference/option.js | 135 ++ .../crm/api/privacy_preference/preference.js | 549 ++++++ .../privacy_preference/privacy_preference.js | 91 + .../crm/api/privacy_preference/section.js | 158 ++ .../zoho/crm/api/privacy_preference/tpt.js | 112 ++ .../crm/api/privacy_preference/wrapper.js | 66 + .../zoho/crm/api/profiles/action_handler.js | 7 + .../zoho/crm/api/profiles/action_response.js | 7 + .../zoho/crm/api/profiles/action_wrapper.js | 66 + .../zoho/crm/api/profiles/api_exception.js | 136 ++ .../com/zoho/crm/api/profiles/category.js | 7 + .../zoho/crm/api/profiles/category_module.js | 135 ++ .../zoho/crm/api/profiles/category_others.js | 112 ++ .../com/zoho/crm/api/profiles/default_view.js | 112 ++ .../zoho/crm/api/profiles/import_profiles.js | 19 + .../core/com/zoho/crm/api/profiles/info.js | 66 + .../zoho/crm/api/profiles/minified_profile.js | 112 ++ .../crm/api/profiles/permission_detail.js | 205 ++ .../core/com/zoho/crm/api/profiles/profile.js | 415 ++++ .../zoho/crm/api/profiles/profile_wrapper.js | 90 + .../crm/api/profiles/profiles_operations.js | 162 ++ .../zoho/crm/api/profiles/response_handler.js | 7 + .../core/com/zoho/crm/api/profiles/section.js | 89 + .../zoho/crm/api/profiles/success_response.js | 136 ++ .../com/zoho/crm/api/query/api_exception.js | 136 ++ .../com/zoho/crm/api/query/body_wrapper.js | 66 + .../com/zoho/crm/api/query/import_query.js | 5 + .../zoho/crm/api/query/query_operations.js | 38 + .../zoho/crm/api/query/response_handler.js | 7 + .../zoho/crm/api/query/response_wrapper.js | 90 + .../com/zoho/crm/api/record/action_handler.js | 7 + .../zoho/crm/api/record/action_response.js | 7 + .../com/zoho/crm/api/record/action_wrapper.js | 66 + .../com/zoho/crm/api/record/api_exception.js | 136 ++ .../com/zoho/crm/api/record/body_wrapper.js | 181 ++ .../zoho/crm/api/record/carry_over_tags.js | 112 ++ .../core/com/zoho/crm/api/record/comment.js | 135 ++ .../core/com/zoho/crm/api/record/consent.js | 371 ++++ .../zoho/crm/api/record/conversion_option.js | 183 ++ .../conversion_options_response_wrapper.js | 67 + .../crm/api/record/convert_body_wrapper.js | 66 + .../com/zoho/crm/api/record/count_handler.js | 7 + .../com/zoho/crm/api/record/count_wrapper.js | 66 + .../core/com/zoho/crm/api/record/criteria.js | 156 ++ .../com/zoho/crm/api/record/deleted_record.js | 183 ++ .../crm/api/record/deleted_records_handler.js | 7 + .../crm/api/record/deleted_records_wrapper.js | 90 + .../zoho/crm/api/record/download_handler.js | 7 + .../lib/core/com/zoho/crm/api/record/field.js | 688 +++++++ .../zoho/crm/api/record/file_body_wrapper.js | 67 + .../com/zoho/crm/api/record/file_details.js | 158 ++ .../com/zoho/crm/api/record/file_handler.js | 7 + .../com/zoho/crm/api/record/image_upload.js | 250 +++ .../com/zoho/crm/api/record/import_record.js | 107 + .../lib/core/com/zoho/crm/api/record/info.js | 296 +++ .../com/zoho/crm/api/record/lead_converter.js | 232 +++ .../zoho/crm/api/record/line_item_product.js | 202 ++ .../core/com/zoho/crm/api/record/line_tax.js | 158 ++ .../com/zoho/crm/api/record/mass_update.js | 159 ++ .../api/record/mass_update_action_handler.js | 7 + .../api/record/mass_update_action_response.js | 7 + .../api/record/mass_update_action_wrapper.js | 66 + .../api/record/mass_update_body_wrapper.js | 182 ++ .../crm/api/record/mass_update_response.js | 7 + .../record/mass_update_response_handler.js | 7 + .../record/mass_update_response_wrapper.js | 66 + .../record/mass_update_success_response.js | 136 ++ .../crm/api/record/mass_update_territory.js | 89 + .../crm/api/record/multi_select_lookup.js | 112 ++ .../crm/api/record/multi_select_picklist.js | 89 + .../core/com/zoho/crm/api/record/options.js | 36 + .../com/zoho/crm/api/record/participants.js | 265 +++ .../record/preference_field_matched_value.js | 112 ++ .../com/zoho/crm/api/record/price_book.js | 160 ++ .../zoho/crm/api/record/pricing_details.js | 223 +++ .../core/com/zoho/crm/api/record/record.js | 246 +++ .../zoho/crm/api/record/record_operations.js | 1119 +++++++++++ .../zoho/crm/api/record/recurring_activity.js | 89 + .../core/com/zoho/crm/api/record/remind_at.js | 66 + .../core/com/zoho/crm/api/record/reminder.js | 112 ++ .../zoho/crm/api/record/response_handler.js | 7 + .../zoho/crm/api/record/response_wrapper.js | 90 + .../zoho/crm/api/record/success_response.js | 182 ++ .../lib/core/com/zoho/crm/api/record/tax.js | 89 + .../core/com/zoho/crm/api/record/territory.js | 159 ++ .../core/com/zoho/crm/api/record/widget.js | 89 + .../core/com/zoho/crm/api/record/wizard.js | 89 + .../crm/api/related_lists/api_exception.js | 136 ++ .../com/zoho/crm/api/related_lists/field.js | 89 + .../api/related_lists/import_related_lists.js | 9 + .../zoho/crm/api/related_lists/module_map.js | 89 + .../crm/api/related_lists/related_list.js | 459 +++++ .../related_lists/related_lists_operations.js | 93 + .../crm/api/related_lists/response_handler.js | 7 + .../crm/api/related_lists/response_wrapper.js | 66 + .../crm/api/related_records/action_handler.js | 7 + .../api/related_records/action_response.js | 7 + .../crm/api/related_records/action_wrapper.js | 66 + .../crm/api/related_records/api_exception.js | 136 ++ .../crm/api/related_records/body_wrapper.js | 66 + .../api/related_records/file_body_wrapper.js | 67 + .../related_records/import_related_records.js | 28 + .../related_records_operations.js | 609 ++++++ .../api/related_records/response_handler.js | 7 + .../api/related_records/response_wrapper.js | 90 + .../api/related_records/success_response.js | 136 ++ .../api/reschedule_history/action_handler.js | 7 + .../api/reschedule_history/action_response.js | 7 + .../api/reschedule_history/action_wrapper.js | 66 + .../api/reschedule_history/api_exception.js | 136 ++ .../reschedule_history/appointment_name.js | 89 + .../crm/api/reschedule_history/approval.js | 135 ++ .../api/reschedule_history/body_wrapper.js | 66 + .../import_reschedule_history.js | 16 + .../zoho/crm/api/reschedule_history/info.js | 204 ++ .../reschedule_history/reschedule_history.js | 669 +++++++ .../reschedule_history_operations.js | 186 ++ .../reschedule_history/response_handler.js | 7 + .../reschedule_history/response_wrapper.js | 89 + .../reschedule_history/success_response.js | 136 ++ .../zoho/crm/api/reschedule_history/user.js | 112 ++ .../com/zoho/crm/api/roles/action_handler.js | 7 + .../com/zoho/crm/api/roles/action_response.js | 7 + .../com/zoho/crm/api/roles/action_wrapper.js | 66 + .../com/zoho/crm/api/roles/api_exception.js | 136 ++ .../com/zoho/crm/api/roles/body_wrapper.js | 66 + .../com/zoho/crm/api/roles/import_roles.js | 12 + .../com/zoho/crm/api/roles/reporting_to.js | 89 + .../zoho/crm/api/roles/response_handler.js | 7 + .../zoho/crm/api/roles/response_wrapper.js | 66 + .../lib/core/com/zoho/crm/api/roles/role.js | 323 +++ .../zoho/crm/api/roles/roles_operations.js | 172 ++ .../zoho/crm/api/roles/success_response.js | 136 ++ .../crm/api/scoring_rules/action_handler.js | 7 + .../crm/api/scoring_rules/action_response.js | 7 + .../crm/api/scoring_rules/action_wrapper.js | 66 + .../crm/api/scoring_rules/api_exception.js | 136 ++ .../crm/api/scoring_rules/body_wrapper.js | 66 + .../zoho/crm/api/scoring_rules/criteria.js | 156 ++ .../com/zoho/crm/api/scoring_rules/field.js | 89 + .../zoho/crm/api/scoring_rules/field_rule.js | 113 ++ .../api/scoring_rules/import_scoring_rules.js | 22 + .../com/zoho/crm/api/scoring_rules/info.js | 250 +++ .../com/zoho/crm/api/scoring_rules/layout.js | 89 + .../scoring_rules/layout_request_wrapper.js | 67 + .../crm/api/scoring_rules/response_handler.js | 7 + .../crm/api/scoring_rules/response_wrapper.js | 90 + .../api/scoring_rules/role_request_wrapper.js | 66 + .../crm/api/scoring_rules/scoring_rule.js | 323 +++ .../scoring_rules/scoring_rules_operations.js | 356 ++++ .../com/zoho/crm/api/scoring_rules/signal.js | 90 + .../zoho/crm/api/scoring_rules/signal_rule.js | 113 ++ .../crm/api/scoring_rules/success_response.js | 136 ++ .../zoho/crm/api/send_mail/action_handler.js | 7 + .../zoho/crm/api/send_mail/action_response.js | 7 + .../zoho/crm/api/send_mail/action_wrapper.js | 66 + .../zoho/crm/api/send_mail/api_exception.js | 136 ++ .../com/zoho/crm/api/send_mail/attachment.js | 66 + .../zoho/crm/api/send_mail/body_wrapper.js | 66 + .../core/com/zoho/crm/api/send_mail/data.js | 413 ++++ .../crm/api/send_mail/data_subject_request.js | 89 + .../core/com/zoho/crm/api/send_mail/from.js | 89 + .../crm/api/send_mail/import_send_mail.js | 16 + .../zoho/crm/api/send_mail/invalid_details.js | 89 + .../crm/api/send_mail/inventory_details.js | 67 + .../crm/api/send_mail/inventory_template.js | 89 + .../crm/api/send_mail/send_mail_operations.js | 62 + .../crm/api/send_mail/success_response.js | 136 ++ .../com/zoho/crm/api/send_mail/template.js | 7 + .../lib/core/com/zoho/crm/api/send_mail/to.js | 89 + .../api/service_preference/action_handler.js | 7 + .../api/service_preference/action_response.js | 7 + .../api/service_preference/action_wrapper.js | 63 + .../api/service_preference/api_exception.js | 136 ++ .../api/service_preference/body_wrapper.js | 67 + .../import_service_preference.js | 10 + .../service_preference/response_handler.js | 7 + .../service_preference/response_wrapper.js | 67 + .../service_preference/service_preference.js | 66 + .../service_preference_operations.js | 56 + .../service_preference/success_response.js | 136 ++ .../crm/api/share_records/action_handler.js | 7 + .../crm/api/share_records/action_response.js | 7 + .../crm/api/share_records/action_wrapper.js | 66 + .../crm/api/share_records/api_exception.js | 136 ++ .../crm/api/share_records/body_wrapper.js | 112 ++ .../share_records/delete_action_handler.js | 7 + .../share_records/delete_action_response.js | 7 + .../share_records/delete_action_wrapper.js | 63 + .../zoho/crm/api/share_records/dependee.js | 89 + .../api/share_records/import_share_records.js | 17 + .../com/zoho/crm/api/share_records/module.js | 112 ++ .../crm/api/share_records/response_handler.js | 7 + .../crm/api/share_records/response_wrapper.js | 89 + .../crm/api/share_records/share_record.js | 232 +++ .../share_records/share_records_operations.js | 150 ++ .../crm/api/share_records/shared_through.js | 136 ++ .../crm/api/share_records/success_response.js | 136 ++ .../crm/api/shift_hours/action_handler.js | 7 + .../crm/api/shift_hours/action_response.js | 7 + .../crm/api/shift_hours/action_wrapper.js | 66 + .../zoho/crm/api/shift_hours/api_exception.js | 136 ++ .../zoho/crm/api/shift_hours/body_wrapper.js | 66 + .../api/shift_hours/break_custom_timing.js | 89 + .../zoho/crm/api/shift_hours/break_hours.js | 158 ++ .../com/zoho/crm/api/shift_hours/holidays.js | 135 ++ .../crm/api/shift_hours/import_shift_hours.js | 24 + .../crm/api/shift_hours/mandatory_details.js | 89 + .../crm/api/shift_hours/response_handler.js | 7 + .../crm/api/shift_hours/response_wrapper.js | 90 + .../core/com/zoho/crm/api/shift_hours/role.js | 89 + .../zoho/crm/api/shift_hours/shift_count.js | 89 + .../api/shift_hours/shift_custom_timing.js | 89 + .../zoho/crm/api/shift_hours/shift_hours.js | 293 +++ .../api/shift_hours/shift_hours_operations.js | 210 ++ .../crm/api/shift_hours/success_response.js | 136 ++ .../com/zoho/crm/api/shift_hours/users.js | 182 ++ .../com/zoho/crm/api/tags/action_handler.js | 7 + .../com/zoho/crm/api/tags/action_response.js | 7 + .../com/zoho/crm/api/tags/action_wrapper.js | 66 + .../com/zoho/crm/api/tags/api_exception.js | 136 ++ .../zoho/crm/api/tags/associated_places.js | 89 + .../com/zoho/crm/api/tags/body_wrapper.js | 66 + .../com/zoho/crm/api/tags/conflict_wrapper.js | 66 + .../crm/api/tags/count_response_wrapper.js | 66 + .../com/zoho/crm/api/tags/error_details.js | 89 + .../com/zoho/crm/api/tags/existing_tag.js | 89 + .../api/tags/existing_tag_request_wrapper.js | 89 + .../core/com/zoho/crm/api/tags/import_tags.js | 32 + .../lib/core/com/zoho/crm/api/tags/info.js | 89 + .../com/zoho/crm/api/tags/merge_wrapper.js | 66 + .../crm/api/tags/new_tag_request_wrapper.js | 112 ++ .../crm/api/tags/record_action_handler.js | 7 + .../crm/api/tags/record_action_response.js | 7 + .../crm/api/tags/record_action_wrapper.js | 135 ++ .../zoho/crm/api/tags/record_detail_tag.js | 112 ++ .../crm/api/tags/record_success_response.js | 136 ++ .../com/zoho/crm/api/tags/response_handler.js | 7 + .../com/zoho/crm/api/tags/response_wrapper.js | 90 + .../com/zoho/crm/api/tags/success_response.js | 136 ++ .../lib/core/com/zoho/crm/api/tags/tag.js | 207 ++ .../com/zoho/crm/api/tags/tags_operations.js | 422 ++++ .../com/zoho/crm/api/taxes/action_handler.js | 7 + .../com/zoho/crm/api/taxes/action_response.js | 7 + .../com/zoho/crm/api/taxes/action_wrapper.js | 63 + .../com/zoho/crm/api/taxes/api_exception.js | 136 ++ .../com/zoho/crm/api/taxes/body_wrapper.js | 67 + .../com/zoho/crm/api/taxes/expected_field.js | 89 + .../com/zoho/crm/api/taxes/import_taxes.js | 13 + .../core/com/zoho/crm/api/taxes/org_tax.js | 90 + .../core/com/zoho/crm/api/taxes/preference.js | 89 + .../zoho/crm/api/taxes/response_handler.js | 7 + .../zoho/crm/api/taxes/response_wrapper.js | 67 + .../zoho/crm/api/taxes/success_response.js | 136 ++ .../lib/core/com/zoho/crm/api/taxes/tax.js | 181 ++ .../zoho/crm/api/taxes/taxes_operations.js | 79 + .../zoho/crm/api/templates/api_exception.js | 136 ++ .../core/com/zoho/crm/api/templates/folder.js | 89 + .../crm/api/templates/import_templates.js | 4 + .../com/zoho/crm/api/templates/templates.js | 275 +++ .../com/zoho/crm/api/templates/wrapper.js | 66 + .../crm/api/territories/action_handler.js | 7 + .../crm/api/territories/action_response.js | 7 + .../crm/api/territories/action_wrapper.js | 66 + .../zoho/crm/api/territories/api_exception.js | 136 ++ .../api/territories/associated_users_count.js | 90 + .../associated_users_count_wrapper.js | 90 + .../zoho/crm/api/territories/body_wrapper.js | 66 + .../com/zoho/crm/api/territories/criteria.js | 156 ++ .../deleted_associated_territories.js | 136 ++ .../territories/deleted_associated_wrapper.js | 90 + .../com/zoho/crm/api/territories/field.js | 89 + .../crm/api/territories/import_territories.js | 26 + .../core/com/zoho/crm/api/territories/info.js | 135 ++ .../com/zoho/crm/api/territories/manager.js | 89 + .../crm/api/territories/minified_territory.js | 112 ++ .../zoho/crm/api/territories/reporting_to.js | 89 + .../crm/api/territories/response_handler.js | 7 + .../crm/api/territories/response_wrapper.js | 90 + .../crm/api/territories/success_response.js | 136 ++ .../zoho/crm/api/territories/territories.js | 350 ++++ .../api/territories/territories_operations.js | 321 +++ .../api/territories/transfer_body_wrapper.js | 66 + .../crm/api/territories/transfer_territory.js | 112 ++ .../crm/api/territory_users/action_handler.js | 7 + .../api/territory_users/action_response.js | 7 + .../crm/api/territory_users/action_wrapper.js | 66 + .../crm/api/territory_users/api_exception.js | 136 ++ .../crm/api/territory_users/body_wrapper.js | 66 + .../territory_users/import_territory_users.js | 11 + .../com/zoho/crm/api/territory_users/info.js | 135 ++ .../api/territory_users/response_handler.js | 7 + .../api/territory_users/response_wrapper.js | 90 + .../api/territory_users/success_response.js | 136 ++ .../territory_users_operations.js | 192 ++ .../zoho/crm/api/timelines/api_exception.js | 136 ++ .../crm/api/timelines/automation_detail.js | 114 ++ .../zoho/crm/api/timelines/field_history.js | 205 ++ .../crm/api/timelines/field_history_value.js | 89 + .../crm/api/timelines/import_timelines.js | 17 + .../core/com/zoho/crm/api/timelines/info.js | 181 ++ .../core/com/zoho/crm/api/timelines/module.js | 89 + .../crm/api/timelines/name_id_structure.js | 89 + .../com/zoho/crm/api/timelines/path_finder.js | 113 ++ .../zoho/crm/api/timelines/picklist_detail.js | 181 ++ .../core/com/zoho/crm/api/timelines/record.js | 113 ++ .../zoho/crm/api/timelines/related_record.js | 113 ++ .../crm/api/timelines/response_handler.js | 7 + .../crm/api/timelines/response_wrapper.js | 90 + .../core/com/zoho/crm/api/timelines/state.js | 135 ++ .../com/zoho/crm/api/timelines/timeline.js | 300 +++ .../crm/api/timelines/timelines_operations.js | 63 + .../crm/api/user_groups/action_handler.js | 7 + .../crm/api/user_groups/action_response.js | 7 + .../crm/api/user_groups/action_wrapper.js | 66 + .../zoho/crm/api/user_groups/api_exception.js | 136 ++ .../crm/api/user_groups/associated_user.js | 90 + .../api/user_groups/associated_user_count.js | 90 + .../crm/api/user_groups/association_module.js | 67 + .../api/user_groups/association_response.js | 114 ++ .../api/user_groups/association_wrapper.js | 66 + .../zoho/crm/api/user_groups/body_wrapper.js | 66 + .../com/zoho/crm/api/user_groups/groups.js | 229 +++ .../crm/api/user_groups/import_user_groups.js | 29 + .../core/com/zoho/crm/api/user_groups/info.js | 135 ++ .../core/com/zoho/crm/api/user_groups/jobs.js | 66 + .../zoho/crm/api/user_groups/jobs_wrapper.js | 66 + .../com/zoho/crm/api/user_groups/owner.js | 89 + .../com/zoho/crm/api/user_groups/resource.js | 89 + .../crm/api/user_groups/response_handler.js | 7 + .../crm/api/user_groups/response_wrapper.js | 90 + .../com/zoho/crm/api/user_groups/source.js | 89 + .../com/zoho/crm/api/user_groups/sources.js | 137 ++ .../zoho/crm/api/user_groups/sources_count.js | 136 ++ .../api/user_groups/sources_count_wrapper.js | 66 + .../crm/api/user_groups/sources_wrapper.js | 90 + .../crm/api/user_groups/success_response.js | 136 ++ .../zoho/crm/api/user_groups/user_group.js | 89 + .../api/user_groups/user_groups_operations.js | 279 +++ .../com/zoho/crm/api/user_groups/users.js | 112 ++ .../crm/api/user_type_users/api_exception.js | 136 ++ .../user_type_users/import_user_type_users.js | 7 + .../com/zoho/crm/api/user_type_users/info.js | 158 ++ .../api/user_type_users/response_handler.js | 7 + .../api/user_type_users/response_wrapper.js | 90 + .../user_type_users_operations.js | 56 + .../com/zoho/crm/api/user_type_users/users.js | 227 +++ .../com/zoho/crm/api/users/action_handler.js | 7 + .../com/zoho/crm/api/users/action_response.js | 7 + .../com/zoho/crm/api/users/action_wrapper.js | 66 + .../com/zoho/crm/api/users/api_exception.js | 136 ++ .../zoho/crm/api/users/associated_group.js | 206 ++ .../api/users/associated_groups_wrapper.js | 90 + .../com/zoho/crm/api/users/body_wrapper.js | 66 + .../com/zoho/crm/api/users/customize_info.js | 169 ++ .../com/zoho/crm/api/users/error_details.js | 89 + .../com/zoho/crm/api/users/import_users.js | 25 + .../lib/core/com/zoho/crm/api/users/info.js | 135 ++ .../com/zoho/crm/api/users/minified_user.js | 112 ++ .../lib/core/com/zoho/crm/api/users/owner.js | 135 ++ .../core/com/zoho/crm/api/users/profile.js | 89 + .../zoho/crm/api/users/response_handler.js | 7 + .../zoho/crm/api/users/response_wrapper.js | 90 + .../lib/core/com/zoho/crm/api/users/role.js | 89 + .../lib/core/com/zoho/crm/api/users/shift.js | 89 + .../zoho/crm/api/users/success_response.js | 136 ++ .../lib/core/com/zoho/crm/api/users/tab.js | 90 + .../lib/core/com/zoho/crm/api/users/theme.js | 184 ++ .../lib/core/com/zoho/crm/api/users/users.js | 1339 +++++++++++++ .../zoho/crm/api/users/users_operations.js | 223 +++ .../api/users_territories/action_handler.js | 7 + .../api/users_territories/action_response.js | 7 + .../api/users_territories/action_wrapper.js | 66 + .../api/users_territories/api_exception.js | 136 ++ .../crm/api/users_territories/body_wrapper.js | 66 + .../api/users_territories/bulk_validation.js | 158 ++ .../import_users_territories.js | 23 + .../zoho/crm/api/users_territories/info.js | 135 ++ .../zoho/crm/api/users_territories/manager.js | 89 + .../api/users_territories/response_handler.js | 7 + .../api/users_territories/response_wrapper.js | 90 + .../api/users_territories/success_response.js | 136 ++ .../crm/api/users_territories/territory.js | 137 ++ .../transfer_action_handler.js | 7 + .../transfer_action_response.js | 7 + .../transfer_action_wrapper.js | 66 + .../users_territories/transfer_and_delink.js | 90 + .../api/users_territories/transfer_to_user.js | 66 + .../api/users_territories/transfer_wrapper.js | 66 + .../users_territories_operations.js | 219 +++ .../crm/api/users_territories/validation.js | 112 ++ .../api/users_territories/validation_group.js | 7 + .../users_territories/validation_handler.js | 7 + .../users_territories/validation_wrapper.js | 66 + .../users_transfer_delete/action_handler.js | 7 + .../users_transfer_delete/action_response.js | 7 + .../users_transfer_delete/action_wrapper.js | 66 + .../users_transfer_delete/api_exception.js | 136 ++ .../api/users_transfer_delete/body_wrapper.js | 66 + .../import_users_transfer_delete.js | 15 + .../users_transfer_delete/move_subordinate.js | 66 + .../users_transfer_delete/response_handler.js | 7 + .../users_transfer_delete/response_wrapper.js | 66 + .../crm/api/users_transfer_delete/status.js | 66 + .../users_transfer_delete/success_response.js | 136 ++ .../crm/api/users_transfer_delete/transfer.js | 135 ++ .../transfer_and_delete.js | 114 ++ .../transfer_and_delete_by_i_d.js | 91 + .../users_transfer_delete_operations.js | 101 + .../users_unavailability/action_handler.js | 7 + .../users_unavailability/action_response.js | 7 + .../users_unavailability/action_wrapper.js | 66 + .../api/users_unavailability/api_exception.js | 136 ++ .../api/users_unavailability/body_wrapper.js | 66 + .../import_users_unavailability.js | 14 + .../zoho/crm/api/users_unavailability/info.js | 135 ++ .../users_unavailability/response_handler.js | 7 + .../users_unavailability/response_wrapper.js | 90 + .../users_unavailability/success_response.js | 136 ++ .../zoho/crm/api/users_unavailability/user.js | 112 ++ .../users_unavailability.js | 274 +++ .../users_unavailability_operations.js | 187 ++ .../crm/api/variable_groups/api_exception.js | 136 ++ .../variable_groups/import_variable_groups.js | 6 + .../minified_variable_group.js | 89 + .../api/variable_groups/response_handler.js | 7 + .../api/variable_groups/response_wrapper.js | 66 + .../crm/api/variable_groups/variable_group.js | 181 ++ .../variable_groups_operations.js | 76 + .../zoho/crm/api/variables/action_handler.js | 7 + .../zoho/crm/api/variables/action_response.js | 7 + .../zoho/crm/api/variables/action_wrapper.js | 66 + .../zoho/crm/api/variables/api_exception.js | 136 ++ .../zoho/crm/api/variables/body_wrapper.js | 66 + .../zoho/crm/api/variables/error_details.js | 89 + .../crm/api/variables/import_variables.js | 16 + .../crm/api/variables/response_handler.js | 7 + .../crm/api/variables/response_wrapper.js | 66 + .../crm/api/variables/success_response.js | 136 ++ .../com/zoho/crm/api/variables/variable.js | 249 +++ .../zoho/crm/api/variables/variable_group.js | 112 ++ .../crm/api/variables/variables_operations.js | 275 +++ .../core/com/zoho/crm/api/wizards/actions.js | 180 ++ .../com/zoho/crm/api/wizards/api_exception.js | 136 ++ .../core/com/zoho/crm/api/wizards/button.js | 342 ++++ .../zoho/crm/api/wizards/button_background.js | 66 + .../com/zoho/crm/api/wizards/chart_data.js | 159 ++ .../zoho/crm/api/wizards/conditional_rules.js | 137 ++ .../com/zoho/crm/api/wizards/connection.js | 91 + .../com/zoho/crm/api/wizards/container.js | 137 ++ .../core/com/zoho/crm/api/wizards/criteria.js | 156 ++ .../api/wizards/exempted_portal_user_type.js | 66 + .../core/com/zoho/crm/api/wizards/field.js | 89 + .../zoho/crm/api/wizards/import_wizards.js | 22 + .../lib/core/com/zoho/crm/api/wizards/node.js | 136 ++ .../zoho/crm/api/wizards/portal_user_type.js | 137 ++ .../core/com/zoho/crm/api/wizards/resource.js | 89 + .../zoho/crm/api/wizards/response_handler.js | 7 + .../zoho/crm/api/wizards/response_wrapper.js | 66 + .../core/com/zoho/crm/api/wizards/screen.js | 135 ++ .../core/com/zoho/crm/api/wizards/segment.js | 228 +++ .../com/zoho/crm/api/wizards/transition.js | 89 + .../core/com/zoho/crm/api/wizards/wizard.js | 368 ++++ .../crm/api/wizards/wizards_operations.js | 66 + versions/3.0.0/lib/index.js | 1 + .../lib/models/authenticator/oauth_builder.js | 174 ++ .../lib/models/authenticator/oauth_token.js | 522 +++++ .../models/authenticator/store/db_builder.js | 80 + .../models/authenticator/store/db_store.js | 509 +++++ .../models/authenticator/store/file_store.js | 361 ++++ .../models/authenticator/store/token_store.js | 55 + .../3.0.0/lib/models/authenticator/token.js | 23 + .../routes/controllers/api_http_connector.js | 287 +++ .../lib/routes/controllers/api_response.js | 58 + .../3.0.0/lib/routes/dc/au_data_center.js | 65 + .../3.0.0/lib/routes/dc/cn_data_center.js | 64 + versions/3.0.0/lib/routes/dc/data_center.js | 119 ++ versions/3.0.0/lib/routes/dc/environment.js | 68 + .../3.0.0/lib/routes/dc/eu_data_center.js | 65 + .../3.0.0/lib/routes/dc/in_data_center.js | 65 + .../3.0.0/lib/routes/dc/jp_data_center.js | 66 + .../3.0.0/lib/routes/dc/us_data_center.js | 64 + versions/3.0.0/lib/routes/header.js | 35 + versions/3.0.0/lib/routes/header_map.js | 90 + .../3.0.0/lib/routes/initialize_builder.js | 279 +++ versions/3.0.0/lib/routes/initializer.js | 327 +++ .../3.0.0/lib/routes/logger/log_builder.js | 28 + versions/3.0.0/lib/routes/logger/logger.js | 55 + .../3.0.0/lib/routes/logger/sdk_logger.js | 52 + .../routes/middlewares/common_api_handler.js | 535 +++++ versions/3.0.0/lib/routes/param.js | 40 + versions/3.0.0/lib/routes/parameter_map.js | 76 + versions/3.0.0/lib/routes/proxy_builder.js | 56 + versions/3.0.0/lib/routes/request_proxy.js | 64 + versions/3.0.0/lib/routes/sdk_config.js | 54 + .../3.0.0/lib/routes/sdk_config_builder.js | 55 + versions/3.0.0/lib/routes/user_signature.js | 30 + versions/3.0.0/lib/utils/util/choice.js | 19 + versions/3.0.0/lib/utils/util/constants.js | 757 +++++++ versions/3.0.0/lib/utils/util/converter.js | 384 ++++ .../lib/utils/util/datatype_converter.js | 182 ++ versions/3.0.0/lib/utils/util/downloader.js | 92 + .../lib/utils/util/form_data_converter.js | 309 +++ .../lib/utils/util/header_param_validator.js | 121 ++ .../3.0.0/lib/utils/util/json_converter.js | 1280 ++++++++++++ .../lib/utils/util/module_fields_handler.js | 167 ++ .../3.0.0/lib/utils/util/stream_wrapper.js | 64 + versions/3.0.0/lib/utils/util/utility.js | 1667 ++++++++++++++++ .../3.0.0/lib/utils/util/xml_converter.js | 7 + versions/3.0.0/lib/zohocrmsdk.js | 540 +++++ versions/3.0.0/package.json | 35 + .../GetAppointmentPreference.js | 83 + .../UpdateAppointmentPreference.js | 89 + .../assignment_rules/getAssignmentRule.js | 84 + .../assignment_rules/getAssignmentRules.js | 80 + .../samples/associateEmail/associateEmail.js | 121 ++ .../samples/attachments/deleteAttachment.js | 83 + .../samples/attachments/deleteAttachments.js | 88 + .../samples/attachments/downloadAttachment.js | 71 + .../samples/attachments/getAttachments.js | 118 ++ .../samples/attachments/uploadAttachments.js | 97 + .../attachments/uploadLinkAttachment.js | 86 + .../getAvailableCurrencies.js | 61 + versions/3.0.0/samples/backup/cancel.js | 76 + .../samples/backup/downloadBackedupData.js | 55 + versions/3.0.0/samples/backup/getDetails.js | 69 + versions/3.0.0/samples/backup/getUrls.js | 72 + versions/3.0.0/samples/backup/history.js | 88 + versions/3.0.0/samples/backup/schedule.js | 79 + .../3.0.0/samples/blue_print/getBluePrint.js | 306 +++ .../samples/blue_print/updateBluePrint.js | 93 + .../samples/bulk_read/createBulkReadJob.js | 145 ++ .../3.0.0/samples/bulk_read/downloadResult.js | 65 + .../bulk_read/getBulkReadJobDetails.js | 118 ++ .../samples/bulk_write/createBulkWriteJob.js | 107 + .../bulk_write/downloadBulkWriteResult.js | 65 + .../bulk_write/getBulkWriteJobDetails.js | 121 ++ .../3.0.0/samples/bulk_write/uploadFile.js | 102 + .../businessHours/createBusinessHours.js | 98 + .../samples/businessHours/getBusinessHours.js | 99 + .../businessHours/updateBusinessHours.js | 118 ++ .../samples/cancel_meetings/CancelMeetings.js | 76 + .../samples/change_owner/updateRecordOwner.js | 94 + .../change_owner/updateRecordsOwner.js | 133 ++ .../contact_roles/createContactRoles.js | 84 + .../contact_roles/deleteContactRole.js | 79 + .../contact_roles/deleteContactRoles.js | 84 + .../samples/contact_roles/getContactRole.js | 64 + .../samples/contact_roles/getContactRoles.js | 62 + .../contact_roles/updateContactRole.js | 88 + .../contact_roles/updateContactRoles.js | 87 + .../samples/createRecords/createAccounts.js | 180 ++ .../samples/createRecords/createCalls.js | 189 ++ .../samples/createRecords/createCampaigns.js | 162 ++ .../samples/createRecords/createCases.js | 175 ++ .../samples/createRecords/createContacts.js | 190 ++ .../samples/createRecords/createDeals.js | 170 ++ .../samples/createRecords/createEvents.js | 184 ++ .../samples/createRecords/createInvoices.js | 210 ++ .../samples/createRecords/createLeads.js | 180 ++ .../samples/createRecords/createPriceBooks.js | 167 ++ .../samples/createRecords/createProducts.js | 181 ++ .../createRecords/createPurchaseOrders.js | 206 ++ .../samples/createRecords/createQuotes.js | 207 ++ .../samples/createRecords/createSalesOrder.js | 215 ++ .../samples/createRecords/createSolutions.js | 161 ++ .../samples/createRecords/createTasks.js | 172 ++ .../samples/createRecords/createVendors.js | 163 ++ .../3.0.0/samples/currencies/addCurrencies.js | 96 + .../currencies/enableMultipleCurrencies.js | 91 + .../3.0.0/samples/currencies/getCurrencies.js | 79 + .../3.0.0/samples/currencies/getCurrency.js | 83 + .../samples/currencies/updateBaseCurrency.js | 87 + .../samples/currencies/updateCurrencies.js | 95 + .../samples/currencies/updateCurrency.js | 98 + .../samples/custom_views/getCustomView.js | 139 ++ .../samples/custom_views/getCustomViews.js | 110 ++ .../dealContactRoles/addContactRoleToDeal.js | 88 + .../getAllContactRolesofDeal.js | 125 ++ .../dealContactRoles/getContactRoleOfDeal.js | 106 + .../removeContactRoleFromDeal.js | 79 + .../getDownloadAttachmentDetails.js | 62 + .../getDownloadInlineImages.js | 66 + .../emailRelatedRecords/getRelatedEmail.js | 154 ++ .../emailRelatedRecords/getRelatedEmails.js | 145 ++ .../emailSharing/getEmailSharingDetails.js | 77 + .../email_templates/getEmailTemplateById.js | 93 + .../email_templates/getEmailTemplates.js | 101 + .../3.0.0/samples/entiityscores/GetModule.js | 102 + .../3.0.0/samples/entiityscores/GetModules.js | 103 + .../field_attachments/field_attachment.js | 59 + versions/3.0.0/samples/fields/getField.js | 321 +++ versions/3.0.0/samples/fields/getFields.js | 319 +++ .../filedMapDependency/createMapDependency.js | 106 + .../filedMapDependency/deleteMapDependency.js | 77 + .../filedMapDependency/getMapDependencies.js | 110 ++ .../filedMapDependency/getMapDependency.js | 110 ++ .../filedMapDependency/updateMapDependency.js | 106 + versions/3.0.0/samples/files/getFile.js | 68 + versions/3.0.0/samples/files/uploadFiles.js | 94 + .../3.0.0/samples/fiscalyear/GetFiscalYear.js | 61 + .../samples/fiscalyear/UpdateFiscalYear.js | 82 + .../samples/fromAddresses/fromAddresses.js | 58 + versions/3.0.0/samples/holidays/GetHoliday.js | 75 + .../3.0.0/samples/holidays/UpdateHoliday.js | 89 + .../3.0.0/samples/holidays/createHolidays.js | 95 + .../3.0.0/samples/holidays/deleteHolidays.js | 76 + .../3.0.0/samples/holidays/getHolidays.js | 87 + .../3.0.0/samples/holidays/updateHolidays.js | 90 + .../getInventoryTemplateById.js | 81 + .../getInventoryTemplates.js | 88 + versions/3.0.0/samples/layouts/getLayout.js | 375 ++++ versions/3.0.0/samples/layouts/getLayouts.js | 366 ++++ .../samples/massChangeOwner/changeOwner.js | 84 + .../samples/massChangeOwner/checkStatus.js | 59 + .../3.0.0/samples/massConvert/getJobStatus.js | 58 + .../3.0.0/samples/massConvert/massConvert.js | 88 + .../massDeletecvid/MassDeleteRecordId.js | 97 + .../massDeletecvid/getMassDeleteStatus.js | 62 + .../massDeletecvid/massDeleteByCvid.js | 97 + .../3.0.0/samples/modules/GetModuleById.js | 239 +++ .../samples/modules/getModuleByAPIName.js | 239 +++ versions/3.0.0/samples/modules/getModules.js | 119 ++ .../samples/modules/updateModuleByAPIName.js | 89 + .../3.0.0/samples/modules/updateModuleById.js | 91 + versions/3.0.0/samples/notes/createNotes.js | 88 + versions/3.0.0/samples/notes/deleteNote.js | 76 + versions/3.0.0/samples/notes/deleteNotes.js | 81 + versions/3.0.0/samples/notes/getNote.js | 144 ++ versions/3.0.0/samples/notes/getNotes.js | 156 ++ versions/3.0.0/samples/notes/updateNote.js | 86 + versions/3.0.0/samples/notes/updateNotes.js | 89 + .../notification/disableNotification.js | 99 + .../notification/disableNotifications.js | 96 + .../notification/enableNotifications.js | 117 ++ .../notification/getNotificationDetails.js | 87 + .../notification/updateNotification.js | 98 + .../notification/updateNotifications.js | 104 + .../samples/organization/getOrganization.js | 97 + .../organization/uploadOrganizationPhoto.js | 75 + .../samples/pipe_line/createPipelines.js | 83 + .../3.0.0/samples/pipe_line/getPipeline.js | 82 + .../3.0.0/samples/pipe_line/getPipelines.js | 80 + .../samples/pipe_line/transferAndDelete.js | 85 + .../3.0.0/samples/pipe_line/updatePipeline.js | 84 + .../samples/pipe_line/updatePipelines.js | 82 + .../samples/portalInvite/portalInvite.js | 84 + .../3.0.0/samples/portals/createPortals.js | 82 + versions/3.0.0/samples/portals/getPortal.js | 80 + versions/3.0.0/samples/portals/getPortals.js | 79 + .../3.0.0/samples/portals/updatePortal.js | 83 + .../samples/portalusertype/getUserType.js | 129 ++ .../samples/portalusertype/getUserTypes.js | 87 + .../3.0.0/samples/profiles/CloneProfiles.js | 79 + .../3.0.0/samples/profiles/DeleteProfile.js | 57 + .../3.0.0/samples/profiles/UpdateProfile.js | 79 + versions/3.0.0/samples/profiles/getProfile.js | 129 ++ .../3.0.0/samples/profiles/getProfiles.js | 79 + versions/3.0.0/samples/query/query.js | 109 + .../samples/records/LeadConversionOptions.js | 260 +++ .../assignTerritoriesToMultipleRecords.js | 88 + .../records/assignTerritoryToRecord.js | 88 + versions/3.0.0/samples/records/convertLead.js | 112 ++ .../3.0.0/samples/records/createRecords.js | 259 +++ versions/3.0.0/samples/records/deletePhoto.js | 62 + .../3.0.0/samples/records/deleteRecord.js | 85 + .../records/deleteRecordUsingExternalId.js | 85 + .../3.0.0/samples/records/deleteRecords.js | 88 + .../samples/records/getDeletedRecords.js | 95 + .../samples/records/getMassUpdateStatus.js | 81 + versions/3.0.0/samples/records/getPhoto.js | 67 + versions/3.0.0/samples/records/getRecord.js | 307 +++ .../3.0.0/samples/records/getRecordCount.js | 50 + .../records/getRecordUsingExternalId.js | 326 +++ versions/3.0.0/samples/records/getRecords.js | 323 +++ .../samples/records/massUpdateRecords.js | 91 + .../removeTerritoriesFromMultipleRecords.js | 89 + .../records/removeTerritoriesFromRecord.js | 89 + .../3.0.0/samples/records/searchRecords.js | 294 +++ .../3.0.0/samples/records/updateRecord.js | 229 +++ .../records/updateRecordUsingExternalId.js | 170 ++ .../3.0.0/samples/records/updateRecords.js | 238 +++ versions/3.0.0/samples/records/uploadPhoto.js | 80 + .../3.0.0/samples/records/upsertRecords.js | 133 ++ .../samples/related_lists/getRelatedList.js | 67 + .../samples/related_lists/getRelatedLists.js | 66 + .../samples/related_records/deLinkRecord.js | 86 + .../samples/related_records/deLinkRecords.js | 91 + .../deleteRelatedRecordUsingExternalId.js | 87 + .../deleteRelatedRecordsUsingExternalId.js | 92 + .../related_records/getRelatedRecord.js | 326 +++ .../getRelatedRecordUsingExternalId.js | 272 +++ .../related_records/getRelatedRecords.js | 334 ++++ .../getRelatedRecordsUsingExternalId.js | 276 +++ .../related_records/updateRelatedRecord.js | 99 + .../updateRelatedRecordUsingExternalId.js | 100 + .../related_records/updateRelatedRecords.js | 113 ++ .../updateRelatedRecordsUsingExternalId.js | 109 + .../AddAppointmentsRescheduledHistory.js | 90 + .../DeleteAppointmentsRescheduledHistory.js | 73 + .../GetAppointmentRescheduledHistory.js | 132 ++ .../GetAppointmentsRescheduledHistory.js | 134 ++ .../UpdateAppointmentRescheduledHistory.js | 91 + .../UpdateAppointmentsRescheduledHistory.js | 91 + versions/3.0.0/samples/roles/CreateRoles.js | 82 + versions/3.0.0/samples/roles/DeletRole.js | 74 + versions/3.0.0/samples/roles/UpdateRole.js | 83 + versions/3.0.0/samples/roles/UpdateRoles.js | 83 + versions/3.0.0/samples/roles/getRole.js | 73 + versions/3.0.0/samples/roles/getRoles.js | 65 + .../scoring_rules/activateScoringRule.js | 79 + .../samples/scoring_rules/cloneScoringRule.js | 79 + .../scoring_rules/createScoringRules.js | 139 ++ .../scoring_rules/deactivateScoringRule.js | 79 + .../scoring_rules/deleteScoringRule.js | 78 + .../scoring_rules/deleteScoringRules.js | 81 + .../samples/scoring_rules/getScoringRule.js | 208 ++ .../samples/scoring_rules/getScoringRules.js | 156 ++ .../scoringRuleExecutionUsingLayoutId.js | 66 + .../scoringRuleExecutionUsingRuleIds.js | 84 + .../scoring_rules/updateScoringRule.js | 138 ++ .../scoring_rules/updateScoringRules.js | 140 ++ versions/3.0.0/samples/send_mail/sendMail.js | 108 + .../GetServicePreference.js | 53 + .../UpdateServicePreference.js | 73 + .../share_records/getSharedRecordDetails.js | 97 + .../share_records/revokeSharedRecord.js | 78 + .../samples/share_records/shareRecord.js | 111 ++ .../share_records/updateSharePermissions.js | 92 + .../samples/shiftHours/createShiftHours.js | 166 ++ .../samples/shiftHours/deleteShiftHours.js | 82 + .../3.0.0/samples/shiftHours/getShiftHour.js | 169 ++ .../3.0.0/samples/shiftHours/getShiftHours.js | 169 ++ .../samples/shiftHours/updateShiftHours.js | 154 ++ .../samples/tags/addTagsToMultipleRecords.js | 95 + .../3.0.0/samples/tags/addTagsToRecord.js | 92 + versions/3.0.0/samples/tags/createTags.js | 87 + versions/3.0.0/samples/tags/deleteTag.js | 78 + .../samples/tags/getRecordCountForTag.js | 57 + versions/3.0.0/samples/tags/getTags.js | 88 + versions/3.0.0/samples/tags/mergeTags.js | 87 + .../tags/removeTagsFromMultipleRecords.js | 94 + .../samples/tags/removeTagsFromRecord.js | 88 + versions/3.0.0/samples/tags/updateTag.js | 90 + versions/3.0.0/samples/tags/updateTags.js | 88 + versions/3.0.0/samples/taxes/getTax.js | 67 + versions/3.0.0/samples/taxes/getTaxes.js | 63 + versions/3.0.0/samples/taxes/updateTaxes.js | 87 + .../territories/AssociatedUserCount.js | 79 + .../samples/territories/CreateTerritories.js | 111 ++ .../samples/territories/DeleteTerritories.js | 81 + .../samples/territories/DeleteTerritory.js | 81 + .../samples/territories/GetChildTerritory.js | 121 ++ .../TransferAndDeleteTerritories.js | 86 + .../territories/TransferAndDeleteTerritory.js | 86 + .../samples/territories/UpdateTerritories.js | 112 ++ .../samples/territories/UpdateTerritory.js | 112 ++ .../samples/territories/getTerritories.js | 114 ++ .../3.0.0/samples/territories/getTerritory.js | 113 ++ .../DeassociateTerritoryUser.js | 80 + .../DeassociateTerritoryUsers.js | 79 + .../territoryusers/GetTerritoryUser.js | 77 + .../territoryusers/GetTerritoryUsers.js | 76 + .../territoryusers/UpdateTerritoryUser.js | 80 + .../territoryusers/UpdateTerritoryUsers.js | 85 + .../3.0.0/samples/threading/multi_thread.js | 181 ++ .../3.0.0/samples/timelines/GetTimelines.js | 132 ++ .../samples/updaterecords/UpdateAccounts.js | 185 ++ .../samples/updaterecords/UpdateCalls.js | 193 ++ .../samples/updaterecords/UpdateCampaigns.js | 167 ++ .../samples/updaterecords/UpdateCases.js | 180 ++ .../samples/updaterecords/UpdateContacts.js | 195 ++ .../samples/updaterecords/UpdateDeals.js | 175 ++ .../samples/updaterecords/UpdateEvents.js | 189 ++ .../samples/updaterecords/UpdateInvoices.js | 215 ++ .../samples/updaterecords/UpdateLeads.js | 189 ++ .../samples/updaterecords/UpdatePriceBooks.js | 172 ++ .../samples/updaterecords/UpdateProducts.js | 186 ++ .../updaterecords/UpdatePurchaseOrders.js | 210 ++ .../samples/updaterecords/UpdateQuotes.js | 212 ++ .../updaterecords/UpdateSalesOrders.js | 219 +++ .../samples/updaterecords/UpdateSolutions.js | 166 ++ .../samples/updaterecords/UpdateTasks.js | 177 ++ .../samples/updaterecords/UpdateVendors.js | 168 ++ .../userGroups/GetAssociatedUsersCount.js | 78 + .../samples/userGroups/GetAssociations.js | 73 + .../3.0.0/samples/userGroups/createGroup.js | 97 + .../3.0.0/samples/userGroups/deleteGroup.js | 83 + versions/3.0.0/samples/userGroups/getGroup.js | 90 + .../3.0.0/samples/userGroups/getGroups.js | 109 + .../3.0.0/samples/userGroups/getSources.js | 88 + .../samples/userGroups/getSourcesCount.js | 69 + .../3.0.0/samples/userGroups/updateGroup.js | 98 + .../3.0.0/samples/userGroups/updateGroups.js | 98 + .../samples/users/GetAssociatedGroups.js | 74 + versions/3.0.0/samples/users/createUser.js | 88 + versions/3.0.0/samples/users/deleteUser.js | 78 + versions/3.0.0/samples/users/getUser.js | 166 ++ versions/3.0.0/samples/users/getUsers.js | 181 ++ versions/3.0.0/samples/users/updateUser.js | 87 + versions/3.0.0/samples/users/updateUsers.js | 90 + .../associateTerritoriesToUser.js | 89 + .../delinkAndTransferFromAllTerritories.js | 92 + .../delinkAndTransferFromSpecificTerritory.js | 92 + .../getSpecificTerritoryOfUser.js | 72 + .../usersTerritories/getTerritoriesOfUser.js | 90 + .../validateBeforeTransfer.js | 72 + ...validateBeforeTransferForAllTerritories.js | 71 + .../UpdateUserUnavailability.js | 128 ++ .../createUsersUnavailability.js | 97 + .../deleteUsersUnavailabilityHour.js | 100 + .../getUserUnavailability.js | 115 ++ .../getUsersUnavailability.js | 147 ++ .../updateUsersUnavailabilities.js | 129 ++ .../userstransferanddelete/GetStatus.js | 57 + .../UserTransferAndDelete.js | 88 + .../UsersTransferAndDelete.js | 87 + .../usertypeusers/getUsersOfUserType.js | 93 + .../getVariableGroupByAPIName.js | 64 + .../variable_groups/getVariableGroupById.js | 64 + .../variable_groups/getVariableGroups.js | 59 + .../samples/variables/createVariables.js | 96 + .../3.0.0/samples/variables/deleteVariable.js | 79 + .../samples/variables/deleteVariables.js | 81 + .../samples/variables/getVariableById.js | 71 + .../variables/getVariableForAPIName.js | 74 + .../3.0.0/samples/variables/getVariables.js | 70 + .../variables/updateVariableByAPIName.js | 84 + .../samples/variables/updateVariableById.js | 84 + .../samples/variables/updateVariables.js | 88 + .../3.0.0/samples/wizards/getWizardById.js | 205 ++ versions/3.0.0/samples/wizards/getWizards.js | 86 + 1484 files changed, 166312 insertions(+), 92 deletions(-) create mode 100644 versions/3.0.0/README.md create mode 100644 versions/3.0.0/class_hierarchy.png create mode 100644 versions/3.0.0/lib/config/json_details.json create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/appointment_preference.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/appointment_preference_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/field.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/field_mappings.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/import_appointment_preference.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/layout.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/assignment_rules.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/assignment_rules_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/created_by.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/default_assignee.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/import_assignment_rules.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/associate_email.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/associate_email_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/attachments.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/available.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/from.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/import_associate_email.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/linked_record.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/module_map.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/record.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/to.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/attachments/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/attachments/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/attachments/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/attachments/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/attachments/attachment.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/attachments/attachments_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/attachments/file_body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/attachments/import_attachments.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/attachments/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/attachments/owner.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/attachments/parent_id.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/attachments/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/attachments/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/attachments/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/available_currencies_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/currency.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/import_available_currencies.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/backup/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/backup/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/backup/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/backup/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/backup/backup.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/backup/backup_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/backup/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/backup/file_body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/backup/history.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/backup/history_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/backup/import_backup.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/backup/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/backup/requester.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/backup/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/backup/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/backup/urls.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/backup/urls_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/association_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/auto_number.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/blue_print.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/blueprint_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/convert_mapping.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/crypt.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/currency.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/escalation.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/field.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/formula.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/import_blueprint.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/layout.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/lookup_field.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/module.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/module_fields.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/module_mapping.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/multi_select_lookup.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/next_transition.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/process_info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/profile.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/tool_tip.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/transition.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/view_type.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/bulk_read_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/call_back.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/criteria.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/file_body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/import_bulk_read.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/job_detail.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/query.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/request_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/result.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/bulk_write_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/bulk_write_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/call_back.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/default_value.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/field_mapping.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/file.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/file_body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/import_bulk_write.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/request_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/resource.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/result.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/break_hours_custom_timing.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/business_hours.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/business_hours_created.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/business_hours_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/import_business_hours.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/cancel_meetings_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/import_cancel_meetings.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/notify.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/change_owner_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/error_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/import_change_owner.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/mass_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/owner.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/related_modules.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/contact_role.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/contact_roles_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/import_contact_roles.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/base_currency.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/base_currency_action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/base_currency_action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/base_currency_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/currencies_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/currency.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/currency_format.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/disable_success.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/error_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/format.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/import_currencies.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/currencies/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/criteria.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/custom_view.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/custom_views_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/field.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/fields.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/import_custom_views.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/owner.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/pin_fields.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/pin_unpin_fields.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/shared_to.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/sort_by.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/translation.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/contact_role.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/data.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/deal_contact_roles_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/error_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/import_deal_contact_roles.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/definition/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/definition/definition.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/definition/import_definition.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/definition/minified_property.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/definition/minified_property1.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/definition/property.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/definition/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/download_attachments_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/file_body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/import_download_attachments.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/download_inline_images_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/file_body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/import_download_inline_images.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/compose_settings.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/data.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/data_map.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/default_form.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/features_available.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/from_address.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/import_email_compose_meta.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/user.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/attachments.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/email.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/email_related_records_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/import_email_related_records.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/linked_record.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/module.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/status.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/user_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/email_sharing_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/get_email_sharing.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/import_email_sharing.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/share_from_user.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/attachment.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/email_template.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/email_templates_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/import_email_templates.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/last_version_statistics.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_scores.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_scores_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_structure.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_structure_group.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_structure_with_module.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/import_entity_scores.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/module_structure.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/scoring_rule_structure.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/exception/sdk_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/field_attachments_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/file_body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/import_field_attachments.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/child.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/field_map_dependency_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/import_field_map_dependency.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/map_dependency.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/parent.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/pick_list_mapping.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/picklist_map.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/sub_module.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/association_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/auto_number.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/convert_mapping.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/crypt.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/currency.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/email_parser.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/expression.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/external.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/fields.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/fields_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/file_upolad_option.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/forecast_category.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/formula.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/function_parameter.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/hipaa_compliance.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/history_tracking.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/history_tracking_module.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/import_fields.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/lookup.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/maps.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/minified_field.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/multi_module_lookup.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/multiselectlookup.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/operation_type.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/pick_list_value.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/private.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/profile.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/query_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/refer_from_field.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/rollup_criteria.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/rollup_summary.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/show_fields.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/success.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/tooltip.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/unique.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fields/view_type.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/files/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/files/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/files/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/files/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/files/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/files/file_body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/files/files_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/files/import_files.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/files/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/files/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/fiscal_year_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/import_fiscal_year.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/year.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/address.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/from_addresses_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/import_from_addresses.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/hipaa_compliance.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/import_hipaa_compliance.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/modules.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/business_holiday.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/create_business_holiday.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/create_shift_holiday.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/holiday.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/holidays.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/holidays_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/import_holidays.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/resonse_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/shift_holiday.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/shift_hour.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/holidays/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/folder.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/import_inventory_templates.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/inventory_template.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/inventory_templates_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/isc_signature/import_isc_signature.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/isc_signature/signature.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/actions_allowed.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/convert_mapping.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/deal_field.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/deal_layout_mapping.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/default_assignment_view.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/default_view.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/import_layouts.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/layouts.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/layouts_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/minified_layout.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/profiles.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/properties.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/section_field.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/section_subform_field.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/sections.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/layouts/tooltip.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/address.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/address_value_map.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/download_mail_merge.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/download_mail_merge_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/import_mail_merge.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/mail_merge.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/mail_merge_template.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/mail_merge_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/sign_action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/sign_action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/sign_mail_merge.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/sign_mail_merge_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/signers.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/import_mass_change_owner.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/mass_change_owner_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/owner.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/status.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/territory.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/assign_to.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/convert.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/error_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/import_mass_convert.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/mass_convert_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/move_attachments_to.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/portal_user_type.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/related_module.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/status.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/cvid_body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/import_mass_delete_cvid.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/mass_delete_cvid_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/mass_delete_scheduled.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/record_id_body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/status.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/territory.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/argument.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/import_modules.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/lookup_field.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/lookup_field_properties.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/minified_module.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/module_field_lookup.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/module_fields.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/modules.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/modules_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/related_list_properties.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/sharing_properties.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/modules/territory.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notes/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notes/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notes/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notes/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notes/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notes/import_notes.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notes/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notes/note.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notes/notes_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notes/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notes/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notes/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notifications/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notifications/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notifications/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notifications/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notifications/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notifications/delete_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notifications/event.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notifications/import_notifications.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notifications/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notifications/notification.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notifications/notifications_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notifications/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notifications/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/notifications/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/org/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/org/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/org/checkin_preferences.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/org/feature.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/org/file_body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/org/hierarchy_preferences.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/org/import_org.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/org/license_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/org/org.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/org/org_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/org/resource.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/org/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/org/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/org/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/d_pipeline.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/d_pipeline_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/delete.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/forecast_category.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/import_pipeline.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/mandatory_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/maps.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/pipeline.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/pipeline_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/regex_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/stages.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/t_pipeline.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/data.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/import_portal_invite.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/job_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/portal.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/portal_invite.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/portal_invite_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/fields.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/filters.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/import_portal_user_type.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/layouts.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/modules.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/owner.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/permissions.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/personality_module.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/portal_user_type_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/user_type.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/views.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals/import_portals.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals/owner.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals/portals.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals/portals_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/filters.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/import_portals_meta.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/layouts.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/modules.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/related_lists.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/views.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/privacy_configurable_apps/apps.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/privacy_configurable_apps/import_privacy_configurable_apps.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/privacy_configurable_apps/wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/config.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/import_privacy_preference.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/option.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/preference.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/privacy_preference.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/section.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/tpt.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/category.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/category_module.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/category_others.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/default_view.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/import_profiles.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/minified_profile.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/permission_detail.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/profile.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/profile_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/profiles_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/section.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/profiles/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/query/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/query/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/query/import_query.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/query/query_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/query/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/query/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/carry_over_tags.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/comment.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/consent.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/conversion_option.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/conversion_options_response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/convert_body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/count_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/count_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/criteria.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/deleted_record.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/deleted_records_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/deleted_records_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/download_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/field.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/file_body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/file_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/file_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/image_upload.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/import_record.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/lead_converter.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/line_item_product.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/line_tax.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_territory.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/multi_select_lookup.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/multi_select_picklist.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/options.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/participants.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/preference_field_matched_value.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/price_book.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/pricing_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/record.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/record_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/recurring_activity.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/remind_at.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/reminder.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/tax.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/territory.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/widget.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/record/wizard.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/field.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/import_related_lists.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/module_map.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/related_list.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/related_lists_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_records/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_records/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_records/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_records/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_records/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_records/file_body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_records/import_related_records.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_records/related_records_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_records/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_records/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/related_records/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/appointment_name.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/approval.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/import_reschedule_history.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/reschedule_history.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/reschedule_history_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/user.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/roles/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/roles/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/roles/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/roles/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/roles/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/roles/import_roles.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/roles/reporting_to.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/roles/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/roles/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/roles/role.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/roles/roles_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/roles/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/criteria.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/field.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/field_rule.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/import_scoring_rules.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/layout.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/layout_request_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/role_request_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/scoring_rule.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/scoring_rules_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/signal.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/signal_rule.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/attachment.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/data.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/data_subject_request.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/from.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/import_send_mail.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/invalid_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/inventory_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/inventory_template.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/send_mail_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/template.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/to.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/import_service_preference.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/service_preference.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/service_preference_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/share_records/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/share_records/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/share_records/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/share_records/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/share_records/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/share_records/delete_action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/share_records/delete_action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/share_records/delete_action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/share_records/dependee.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/share_records/import_share_records.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/share_records/module.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/share_records/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/share_records/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/share_records/share_record.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/share_records/share_records_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/share_records/shared_through.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/share_records/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/break_custom_timing.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/break_hours.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/holidays.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/import_shift_hours.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/mandatory_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/role.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/shift_count.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/shift_custom_timing.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/shift_hours.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/shift_hours_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/users.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/associated_places.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/conflict_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/count_response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/error_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/existing_tag.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/existing_tag_request_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/import_tags.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/merge_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/new_tag_request_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_detail_tag.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/tag.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/tags/tags_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/taxes/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/taxes/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/taxes/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/taxes/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/taxes/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/taxes/expected_field.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/taxes/import_taxes.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/taxes/org_tax.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/taxes/preference.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/taxes/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/taxes/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/taxes/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/taxes/tax.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/taxes/taxes_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/templates/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/templates/folder.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/templates/import_templates.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/templates/templates.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/templates/wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/associated_users_count.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/associated_users_count_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/criteria.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/deleted_associated_territories.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/deleted_associated_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/field.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/import_territories.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/manager.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/minified_territory.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/reporting_to.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/territories.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/territories_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/transfer_body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territories/transfer_territory.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/import_territory_users.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/territory_users_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/timelines/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/timelines/automation_detail.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/timelines/field_history.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/timelines/field_history_value.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/timelines/import_timelines.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/timelines/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/timelines/module.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/timelines/name_id_structure.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/timelines/path_finder.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/timelines/picklist_detail.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/timelines/record.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/timelines/related_record.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/timelines/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/timelines/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/timelines/state.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/timelines/timeline.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/timelines/timelines_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/associated_user.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/associated_user_count.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/association_module.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/association_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/association_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/groups.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/import_user_groups.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/jobs.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/jobs_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/owner.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/resource.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/source.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/sources.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/sources_count.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/sources_count_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/sources_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/user_group.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/user_groups_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/users.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/import_user_type_users.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/user_type_users_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/users.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/associated_group.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/associated_groups_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/customize_info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/error_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/import_users.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/minified_user.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/owner.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/profile.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/role.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/shift.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/tab.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/theme.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/users.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users/users_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/bulk_validation.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/import_users_territories.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/manager.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/territory.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_and_delink.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_to_user.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/users_territories_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/validation.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/validation_group.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/validation_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/validation_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/import_users_transfer_delete.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/move_subordinate.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/status.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/transfer.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete_by_i_d.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/users_transfer_delete_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/import_users_unavailability.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/info.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/user.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/users_unavailability.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/users_unavailability_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/import_variable_groups.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/minified_variable_group.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/variable_group.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/variable_groups_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variables/action_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variables/action_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variables/action_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variables/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variables/body_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variables/error_details.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variables/import_variables.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variables/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variables/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variables/success_response.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variables/variable.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variables/variable_group.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/variables/variables_operations.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/actions.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/api_exception.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/button.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/button_background.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/chart_data.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/conditional_rules.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/connection.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/container.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/criteria.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/exempted_portal_user_type.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/field.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/import_wizards.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/node.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/portal_user_type.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/resource.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/response_handler.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/response_wrapper.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/screen.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/segment.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/transition.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/wizard.js create mode 100644 versions/3.0.0/lib/core/com/zoho/crm/api/wizards/wizards_operations.js create mode 100644 versions/3.0.0/lib/index.js create mode 100644 versions/3.0.0/lib/models/authenticator/oauth_builder.js create mode 100644 versions/3.0.0/lib/models/authenticator/oauth_token.js create mode 100644 versions/3.0.0/lib/models/authenticator/store/db_builder.js create mode 100644 versions/3.0.0/lib/models/authenticator/store/db_store.js create mode 100644 versions/3.0.0/lib/models/authenticator/store/file_store.js create mode 100644 versions/3.0.0/lib/models/authenticator/store/token_store.js create mode 100644 versions/3.0.0/lib/models/authenticator/token.js create mode 100644 versions/3.0.0/lib/routes/controllers/api_http_connector.js create mode 100644 versions/3.0.0/lib/routes/controllers/api_response.js create mode 100644 versions/3.0.0/lib/routes/dc/au_data_center.js create mode 100644 versions/3.0.0/lib/routes/dc/cn_data_center.js create mode 100644 versions/3.0.0/lib/routes/dc/data_center.js create mode 100644 versions/3.0.0/lib/routes/dc/environment.js create mode 100644 versions/3.0.0/lib/routes/dc/eu_data_center.js create mode 100644 versions/3.0.0/lib/routes/dc/in_data_center.js create mode 100644 versions/3.0.0/lib/routes/dc/jp_data_center.js create mode 100644 versions/3.0.0/lib/routes/dc/us_data_center.js create mode 100644 versions/3.0.0/lib/routes/header.js create mode 100644 versions/3.0.0/lib/routes/header_map.js create mode 100644 versions/3.0.0/lib/routes/initialize_builder.js create mode 100644 versions/3.0.0/lib/routes/initializer.js create mode 100644 versions/3.0.0/lib/routes/logger/log_builder.js create mode 100644 versions/3.0.0/lib/routes/logger/logger.js create mode 100644 versions/3.0.0/lib/routes/logger/sdk_logger.js create mode 100644 versions/3.0.0/lib/routes/middlewares/common_api_handler.js create mode 100644 versions/3.0.0/lib/routes/param.js create mode 100644 versions/3.0.0/lib/routes/parameter_map.js create mode 100644 versions/3.0.0/lib/routes/proxy_builder.js create mode 100644 versions/3.0.0/lib/routes/request_proxy.js create mode 100644 versions/3.0.0/lib/routes/sdk_config.js create mode 100644 versions/3.0.0/lib/routes/sdk_config_builder.js create mode 100644 versions/3.0.0/lib/routes/user_signature.js create mode 100644 versions/3.0.0/lib/utils/util/choice.js create mode 100644 versions/3.0.0/lib/utils/util/constants.js create mode 100644 versions/3.0.0/lib/utils/util/converter.js create mode 100644 versions/3.0.0/lib/utils/util/datatype_converter.js create mode 100644 versions/3.0.0/lib/utils/util/downloader.js create mode 100644 versions/3.0.0/lib/utils/util/form_data_converter.js create mode 100644 versions/3.0.0/lib/utils/util/header_param_validator.js create mode 100644 versions/3.0.0/lib/utils/util/json_converter.js create mode 100644 versions/3.0.0/lib/utils/util/module_fields_handler.js create mode 100644 versions/3.0.0/lib/utils/util/stream_wrapper.js create mode 100644 versions/3.0.0/lib/utils/util/utility.js create mode 100644 versions/3.0.0/lib/utils/util/xml_converter.js create mode 100644 versions/3.0.0/lib/zohocrmsdk.js create mode 100644 versions/3.0.0/package.json create mode 100644 versions/3.0.0/samples/appointmentpreferences/GetAppointmentPreference.js create mode 100644 versions/3.0.0/samples/appointmentpreferences/UpdateAppointmentPreference.js create mode 100644 versions/3.0.0/samples/assignment_rules/getAssignmentRule.js create mode 100644 versions/3.0.0/samples/assignment_rules/getAssignmentRules.js create mode 100644 versions/3.0.0/samples/associateEmail/associateEmail.js create mode 100644 versions/3.0.0/samples/attachments/deleteAttachment.js create mode 100644 versions/3.0.0/samples/attachments/deleteAttachments.js create mode 100644 versions/3.0.0/samples/attachments/downloadAttachment.js create mode 100644 versions/3.0.0/samples/attachments/getAttachments.js create mode 100644 versions/3.0.0/samples/attachments/uploadAttachments.js create mode 100644 versions/3.0.0/samples/attachments/uploadLinkAttachment.js create mode 100644 versions/3.0.0/samples/availableCurrencies/getAvailableCurrencies.js create mode 100644 versions/3.0.0/samples/backup/cancel.js create mode 100644 versions/3.0.0/samples/backup/downloadBackedupData.js create mode 100644 versions/3.0.0/samples/backup/getDetails.js create mode 100644 versions/3.0.0/samples/backup/getUrls.js create mode 100644 versions/3.0.0/samples/backup/history.js create mode 100644 versions/3.0.0/samples/backup/schedule.js create mode 100644 versions/3.0.0/samples/blue_print/getBluePrint.js create mode 100644 versions/3.0.0/samples/blue_print/updateBluePrint.js create mode 100644 versions/3.0.0/samples/bulk_read/createBulkReadJob.js create mode 100644 versions/3.0.0/samples/bulk_read/downloadResult.js create mode 100644 versions/3.0.0/samples/bulk_read/getBulkReadJobDetails.js create mode 100644 versions/3.0.0/samples/bulk_write/createBulkWriteJob.js create mode 100644 versions/3.0.0/samples/bulk_write/downloadBulkWriteResult.js create mode 100644 versions/3.0.0/samples/bulk_write/getBulkWriteJobDetails.js create mode 100644 versions/3.0.0/samples/bulk_write/uploadFile.js create mode 100644 versions/3.0.0/samples/businessHours/createBusinessHours.js create mode 100644 versions/3.0.0/samples/businessHours/getBusinessHours.js create mode 100644 versions/3.0.0/samples/businessHours/updateBusinessHours.js create mode 100644 versions/3.0.0/samples/cancel_meetings/CancelMeetings.js create mode 100644 versions/3.0.0/samples/change_owner/updateRecordOwner.js create mode 100644 versions/3.0.0/samples/change_owner/updateRecordsOwner.js create mode 100644 versions/3.0.0/samples/contact_roles/createContactRoles.js create mode 100644 versions/3.0.0/samples/contact_roles/deleteContactRole.js create mode 100644 versions/3.0.0/samples/contact_roles/deleteContactRoles.js create mode 100644 versions/3.0.0/samples/contact_roles/getContactRole.js create mode 100644 versions/3.0.0/samples/contact_roles/getContactRoles.js create mode 100644 versions/3.0.0/samples/contact_roles/updateContactRole.js create mode 100644 versions/3.0.0/samples/contact_roles/updateContactRoles.js create mode 100644 versions/3.0.0/samples/createRecords/createAccounts.js create mode 100644 versions/3.0.0/samples/createRecords/createCalls.js create mode 100644 versions/3.0.0/samples/createRecords/createCampaigns.js create mode 100644 versions/3.0.0/samples/createRecords/createCases.js create mode 100644 versions/3.0.0/samples/createRecords/createContacts.js create mode 100644 versions/3.0.0/samples/createRecords/createDeals.js create mode 100644 versions/3.0.0/samples/createRecords/createEvents.js create mode 100644 versions/3.0.0/samples/createRecords/createInvoices.js create mode 100644 versions/3.0.0/samples/createRecords/createLeads.js create mode 100644 versions/3.0.0/samples/createRecords/createPriceBooks.js create mode 100644 versions/3.0.0/samples/createRecords/createProducts.js create mode 100644 versions/3.0.0/samples/createRecords/createPurchaseOrders.js create mode 100644 versions/3.0.0/samples/createRecords/createQuotes.js create mode 100644 versions/3.0.0/samples/createRecords/createSalesOrder.js create mode 100644 versions/3.0.0/samples/createRecords/createSolutions.js create mode 100644 versions/3.0.0/samples/createRecords/createTasks.js create mode 100644 versions/3.0.0/samples/createRecords/createVendors.js create mode 100644 versions/3.0.0/samples/currencies/addCurrencies.js create mode 100644 versions/3.0.0/samples/currencies/enableMultipleCurrencies.js create mode 100644 versions/3.0.0/samples/currencies/getCurrencies.js create mode 100644 versions/3.0.0/samples/currencies/getCurrency.js create mode 100644 versions/3.0.0/samples/currencies/updateBaseCurrency.js create mode 100644 versions/3.0.0/samples/currencies/updateCurrencies.js create mode 100644 versions/3.0.0/samples/currencies/updateCurrency.js create mode 100644 versions/3.0.0/samples/custom_views/getCustomView.js create mode 100644 versions/3.0.0/samples/custom_views/getCustomViews.js create mode 100644 versions/3.0.0/samples/dealContactRoles/addContactRoleToDeal.js create mode 100644 versions/3.0.0/samples/dealContactRoles/getAllContactRolesofDeal.js create mode 100644 versions/3.0.0/samples/dealContactRoles/getContactRoleOfDeal.js create mode 100644 versions/3.0.0/samples/dealContactRoles/removeContactRoleFromDeal.js create mode 100644 versions/3.0.0/samples/downloadAttachments/getDownloadAttachmentDetails.js create mode 100644 versions/3.0.0/samples/downloadInlineImages/getDownloadInlineImages.js create mode 100644 versions/3.0.0/samples/emailRelatedRecords/getRelatedEmail.js create mode 100644 versions/3.0.0/samples/emailRelatedRecords/getRelatedEmails.js create mode 100644 versions/3.0.0/samples/emailSharing/getEmailSharingDetails.js create mode 100644 versions/3.0.0/samples/email_templates/getEmailTemplateById.js create mode 100644 versions/3.0.0/samples/email_templates/getEmailTemplates.js create mode 100644 versions/3.0.0/samples/entiityscores/GetModule.js create mode 100644 versions/3.0.0/samples/entiityscores/GetModules.js create mode 100644 versions/3.0.0/samples/field_attachments/field_attachment.js create mode 100644 versions/3.0.0/samples/fields/getField.js create mode 100644 versions/3.0.0/samples/fields/getFields.js create mode 100644 versions/3.0.0/samples/filedMapDependency/createMapDependency.js create mode 100644 versions/3.0.0/samples/filedMapDependency/deleteMapDependency.js create mode 100644 versions/3.0.0/samples/filedMapDependency/getMapDependencies.js create mode 100644 versions/3.0.0/samples/filedMapDependency/getMapDependency.js create mode 100644 versions/3.0.0/samples/filedMapDependency/updateMapDependency.js create mode 100644 versions/3.0.0/samples/files/getFile.js create mode 100644 versions/3.0.0/samples/files/uploadFiles.js create mode 100644 versions/3.0.0/samples/fiscalyear/GetFiscalYear.js create mode 100644 versions/3.0.0/samples/fiscalyear/UpdateFiscalYear.js create mode 100644 versions/3.0.0/samples/fromAddresses/fromAddresses.js create mode 100644 versions/3.0.0/samples/holidays/GetHoliday.js create mode 100644 versions/3.0.0/samples/holidays/UpdateHoliday.js create mode 100644 versions/3.0.0/samples/holidays/createHolidays.js create mode 100644 versions/3.0.0/samples/holidays/deleteHolidays.js create mode 100644 versions/3.0.0/samples/holidays/getHolidays.js create mode 100644 versions/3.0.0/samples/holidays/updateHolidays.js create mode 100644 versions/3.0.0/samples/inventory_templates/getInventoryTemplateById.js create mode 100644 versions/3.0.0/samples/inventory_templates/getInventoryTemplates.js create mode 100644 versions/3.0.0/samples/layouts/getLayout.js create mode 100644 versions/3.0.0/samples/layouts/getLayouts.js create mode 100644 versions/3.0.0/samples/massChangeOwner/changeOwner.js create mode 100644 versions/3.0.0/samples/massChangeOwner/checkStatus.js create mode 100644 versions/3.0.0/samples/massConvert/getJobStatus.js create mode 100644 versions/3.0.0/samples/massConvert/massConvert.js create mode 100644 versions/3.0.0/samples/massDeletecvid/MassDeleteRecordId.js create mode 100644 versions/3.0.0/samples/massDeletecvid/getMassDeleteStatus.js create mode 100644 versions/3.0.0/samples/massDeletecvid/massDeleteByCvid.js create mode 100644 versions/3.0.0/samples/modules/GetModuleById.js create mode 100644 versions/3.0.0/samples/modules/getModuleByAPIName.js create mode 100644 versions/3.0.0/samples/modules/getModules.js create mode 100644 versions/3.0.0/samples/modules/updateModuleByAPIName.js create mode 100644 versions/3.0.0/samples/modules/updateModuleById.js create mode 100644 versions/3.0.0/samples/notes/createNotes.js create mode 100644 versions/3.0.0/samples/notes/deleteNote.js create mode 100644 versions/3.0.0/samples/notes/deleteNotes.js create mode 100644 versions/3.0.0/samples/notes/getNote.js create mode 100644 versions/3.0.0/samples/notes/getNotes.js create mode 100644 versions/3.0.0/samples/notes/updateNote.js create mode 100644 versions/3.0.0/samples/notes/updateNotes.js create mode 100644 versions/3.0.0/samples/notification/disableNotification.js create mode 100644 versions/3.0.0/samples/notification/disableNotifications.js create mode 100644 versions/3.0.0/samples/notification/enableNotifications.js create mode 100644 versions/3.0.0/samples/notification/getNotificationDetails.js create mode 100644 versions/3.0.0/samples/notification/updateNotification.js create mode 100644 versions/3.0.0/samples/notification/updateNotifications.js create mode 100644 versions/3.0.0/samples/organization/getOrganization.js create mode 100644 versions/3.0.0/samples/organization/uploadOrganizationPhoto.js create mode 100644 versions/3.0.0/samples/pipe_line/createPipelines.js create mode 100644 versions/3.0.0/samples/pipe_line/getPipeline.js create mode 100644 versions/3.0.0/samples/pipe_line/getPipelines.js create mode 100644 versions/3.0.0/samples/pipe_line/transferAndDelete.js create mode 100644 versions/3.0.0/samples/pipe_line/updatePipeline.js create mode 100644 versions/3.0.0/samples/pipe_line/updatePipelines.js create mode 100644 versions/3.0.0/samples/portalInvite/portalInvite.js create mode 100644 versions/3.0.0/samples/portals/createPortals.js create mode 100644 versions/3.0.0/samples/portals/getPortal.js create mode 100644 versions/3.0.0/samples/portals/getPortals.js create mode 100644 versions/3.0.0/samples/portals/updatePortal.js create mode 100644 versions/3.0.0/samples/portalusertype/getUserType.js create mode 100644 versions/3.0.0/samples/portalusertype/getUserTypes.js create mode 100644 versions/3.0.0/samples/profiles/CloneProfiles.js create mode 100644 versions/3.0.0/samples/profiles/DeleteProfile.js create mode 100644 versions/3.0.0/samples/profiles/UpdateProfile.js create mode 100644 versions/3.0.0/samples/profiles/getProfile.js create mode 100644 versions/3.0.0/samples/profiles/getProfiles.js create mode 100644 versions/3.0.0/samples/query/query.js create mode 100644 versions/3.0.0/samples/records/LeadConversionOptions.js create mode 100644 versions/3.0.0/samples/records/assignTerritoriesToMultipleRecords.js create mode 100644 versions/3.0.0/samples/records/assignTerritoryToRecord.js create mode 100644 versions/3.0.0/samples/records/convertLead.js create mode 100644 versions/3.0.0/samples/records/createRecords.js create mode 100644 versions/3.0.0/samples/records/deletePhoto.js create mode 100644 versions/3.0.0/samples/records/deleteRecord.js create mode 100644 versions/3.0.0/samples/records/deleteRecordUsingExternalId.js create mode 100644 versions/3.0.0/samples/records/deleteRecords.js create mode 100644 versions/3.0.0/samples/records/getDeletedRecords.js create mode 100644 versions/3.0.0/samples/records/getMassUpdateStatus.js create mode 100644 versions/3.0.0/samples/records/getPhoto.js create mode 100644 versions/3.0.0/samples/records/getRecord.js create mode 100644 versions/3.0.0/samples/records/getRecordCount.js create mode 100644 versions/3.0.0/samples/records/getRecordUsingExternalId.js create mode 100644 versions/3.0.0/samples/records/getRecords.js create mode 100644 versions/3.0.0/samples/records/massUpdateRecords.js create mode 100644 versions/3.0.0/samples/records/removeTerritoriesFromMultipleRecords.js create mode 100644 versions/3.0.0/samples/records/removeTerritoriesFromRecord.js create mode 100644 versions/3.0.0/samples/records/searchRecords.js create mode 100644 versions/3.0.0/samples/records/updateRecord.js create mode 100644 versions/3.0.0/samples/records/updateRecordUsingExternalId.js create mode 100644 versions/3.0.0/samples/records/updateRecords.js create mode 100644 versions/3.0.0/samples/records/uploadPhoto.js create mode 100644 versions/3.0.0/samples/records/upsertRecords.js create mode 100644 versions/3.0.0/samples/related_lists/getRelatedList.js create mode 100644 versions/3.0.0/samples/related_lists/getRelatedLists.js create mode 100644 versions/3.0.0/samples/related_records/deLinkRecord.js create mode 100644 versions/3.0.0/samples/related_records/deLinkRecords.js create mode 100644 versions/3.0.0/samples/related_records/deleteRelatedRecordUsingExternalId.js create mode 100644 versions/3.0.0/samples/related_records/deleteRelatedRecordsUsingExternalId.js create mode 100644 versions/3.0.0/samples/related_records/getRelatedRecord.js create mode 100644 versions/3.0.0/samples/related_records/getRelatedRecordUsingExternalId.js create mode 100644 versions/3.0.0/samples/related_records/getRelatedRecords.js create mode 100644 versions/3.0.0/samples/related_records/getRelatedRecordsUsingExternalId.js create mode 100644 versions/3.0.0/samples/related_records/updateRelatedRecord.js create mode 100644 versions/3.0.0/samples/related_records/updateRelatedRecordUsingExternalId.js create mode 100644 versions/3.0.0/samples/related_records/updateRelatedRecords.js create mode 100644 versions/3.0.0/samples/related_records/updateRelatedRecordsUsingExternalId.js create mode 100644 versions/3.0.0/samples/rescheduledhistory/AddAppointmentsRescheduledHistory.js create mode 100644 versions/3.0.0/samples/rescheduledhistory/DeleteAppointmentsRescheduledHistory.js create mode 100644 versions/3.0.0/samples/rescheduledhistory/GetAppointmentRescheduledHistory.js create mode 100644 versions/3.0.0/samples/rescheduledhistory/GetAppointmentsRescheduledHistory.js create mode 100644 versions/3.0.0/samples/rescheduledhistory/UpdateAppointmentRescheduledHistory.js create mode 100644 versions/3.0.0/samples/rescheduledhistory/UpdateAppointmentsRescheduledHistory.js create mode 100644 versions/3.0.0/samples/roles/CreateRoles.js create mode 100644 versions/3.0.0/samples/roles/DeletRole.js create mode 100644 versions/3.0.0/samples/roles/UpdateRole.js create mode 100644 versions/3.0.0/samples/roles/UpdateRoles.js create mode 100644 versions/3.0.0/samples/roles/getRole.js create mode 100644 versions/3.0.0/samples/roles/getRoles.js create mode 100644 versions/3.0.0/samples/scoring_rules/activateScoringRule.js create mode 100644 versions/3.0.0/samples/scoring_rules/cloneScoringRule.js create mode 100644 versions/3.0.0/samples/scoring_rules/createScoringRules.js create mode 100644 versions/3.0.0/samples/scoring_rules/deactivateScoringRule.js create mode 100644 versions/3.0.0/samples/scoring_rules/deleteScoringRule.js create mode 100644 versions/3.0.0/samples/scoring_rules/deleteScoringRules.js create mode 100644 versions/3.0.0/samples/scoring_rules/getScoringRule.js create mode 100644 versions/3.0.0/samples/scoring_rules/getScoringRules.js create mode 100644 versions/3.0.0/samples/scoring_rules/scoringRuleExecutionUsingLayoutId.js create mode 100644 versions/3.0.0/samples/scoring_rules/scoringRuleExecutionUsingRuleIds.js create mode 100644 versions/3.0.0/samples/scoring_rules/updateScoringRule.js create mode 100644 versions/3.0.0/samples/scoring_rules/updateScoringRules.js create mode 100644 versions/3.0.0/samples/send_mail/sendMail.js create mode 100644 versions/3.0.0/samples/servicepreferences/GetServicePreference.js create mode 100644 versions/3.0.0/samples/servicepreferences/UpdateServicePreference.js create mode 100644 versions/3.0.0/samples/share_records/getSharedRecordDetails.js create mode 100644 versions/3.0.0/samples/share_records/revokeSharedRecord.js create mode 100644 versions/3.0.0/samples/share_records/shareRecord.js create mode 100644 versions/3.0.0/samples/share_records/updateSharePermissions.js create mode 100644 versions/3.0.0/samples/shiftHours/createShiftHours.js create mode 100644 versions/3.0.0/samples/shiftHours/deleteShiftHours.js create mode 100644 versions/3.0.0/samples/shiftHours/getShiftHour.js create mode 100644 versions/3.0.0/samples/shiftHours/getShiftHours.js create mode 100644 versions/3.0.0/samples/shiftHours/updateShiftHours.js create mode 100644 versions/3.0.0/samples/tags/addTagsToMultipleRecords.js create mode 100644 versions/3.0.0/samples/tags/addTagsToRecord.js create mode 100644 versions/3.0.0/samples/tags/createTags.js create mode 100644 versions/3.0.0/samples/tags/deleteTag.js create mode 100644 versions/3.0.0/samples/tags/getRecordCountForTag.js create mode 100644 versions/3.0.0/samples/tags/getTags.js create mode 100644 versions/3.0.0/samples/tags/mergeTags.js create mode 100644 versions/3.0.0/samples/tags/removeTagsFromMultipleRecords.js create mode 100644 versions/3.0.0/samples/tags/removeTagsFromRecord.js create mode 100644 versions/3.0.0/samples/tags/updateTag.js create mode 100644 versions/3.0.0/samples/tags/updateTags.js create mode 100644 versions/3.0.0/samples/taxes/getTax.js create mode 100644 versions/3.0.0/samples/taxes/getTaxes.js create mode 100644 versions/3.0.0/samples/taxes/updateTaxes.js create mode 100644 versions/3.0.0/samples/territories/AssociatedUserCount.js create mode 100644 versions/3.0.0/samples/territories/CreateTerritories.js create mode 100644 versions/3.0.0/samples/territories/DeleteTerritories.js create mode 100644 versions/3.0.0/samples/territories/DeleteTerritory.js create mode 100644 versions/3.0.0/samples/territories/GetChildTerritory.js create mode 100644 versions/3.0.0/samples/territories/TransferAndDeleteTerritories.js create mode 100644 versions/3.0.0/samples/territories/TransferAndDeleteTerritory.js create mode 100644 versions/3.0.0/samples/territories/UpdateTerritories.js create mode 100644 versions/3.0.0/samples/territories/UpdateTerritory.js create mode 100644 versions/3.0.0/samples/territories/getTerritories.js create mode 100644 versions/3.0.0/samples/territories/getTerritory.js create mode 100644 versions/3.0.0/samples/territoryusers/DeassociateTerritoryUser.js create mode 100644 versions/3.0.0/samples/territoryusers/DeassociateTerritoryUsers.js create mode 100644 versions/3.0.0/samples/territoryusers/GetTerritoryUser.js create mode 100644 versions/3.0.0/samples/territoryusers/GetTerritoryUsers.js create mode 100644 versions/3.0.0/samples/territoryusers/UpdateTerritoryUser.js create mode 100644 versions/3.0.0/samples/territoryusers/UpdateTerritoryUsers.js create mode 100644 versions/3.0.0/samples/threading/multi_thread.js create mode 100644 versions/3.0.0/samples/timelines/GetTimelines.js create mode 100644 versions/3.0.0/samples/updaterecords/UpdateAccounts.js create mode 100644 versions/3.0.0/samples/updaterecords/UpdateCalls.js create mode 100644 versions/3.0.0/samples/updaterecords/UpdateCampaigns.js create mode 100644 versions/3.0.0/samples/updaterecords/UpdateCases.js create mode 100644 versions/3.0.0/samples/updaterecords/UpdateContacts.js create mode 100644 versions/3.0.0/samples/updaterecords/UpdateDeals.js create mode 100644 versions/3.0.0/samples/updaterecords/UpdateEvents.js create mode 100644 versions/3.0.0/samples/updaterecords/UpdateInvoices.js create mode 100644 versions/3.0.0/samples/updaterecords/UpdateLeads.js create mode 100644 versions/3.0.0/samples/updaterecords/UpdatePriceBooks.js create mode 100644 versions/3.0.0/samples/updaterecords/UpdateProducts.js create mode 100644 versions/3.0.0/samples/updaterecords/UpdatePurchaseOrders.js create mode 100644 versions/3.0.0/samples/updaterecords/UpdateQuotes.js create mode 100644 versions/3.0.0/samples/updaterecords/UpdateSalesOrders.js create mode 100644 versions/3.0.0/samples/updaterecords/UpdateSolutions.js create mode 100644 versions/3.0.0/samples/updaterecords/UpdateTasks.js create mode 100644 versions/3.0.0/samples/updaterecords/UpdateVendors.js create mode 100644 versions/3.0.0/samples/userGroups/GetAssociatedUsersCount.js create mode 100644 versions/3.0.0/samples/userGroups/GetAssociations.js create mode 100644 versions/3.0.0/samples/userGroups/createGroup.js create mode 100644 versions/3.0.0/samples/userGroups/deleteGroup.js create mode 100644 versions/3.0.0/samples/userGroups/getGroup.js create mode 100644 versions/3.0.0/samples/userGroups/getGroups.js create mode 100644 versions/3.0.0/samples/userGroups/getSources.js create mode 100644 versions/3.0.0/samples/userGroups/getSourcesCount.js create mode 100644 versions/3.0.0/samples/userGroups/updateGroup.js create mode 100644 versions/3.0.0/samples/userGroups/updateGroups.js create mode 100644 versions/3.0.0/samples/users/GetAssociatedGroups.js create mode 100644 versions/3.0.0/samples/users/createUser.js create mode 100644 versions/3.0.0/samples/users/deleteUser.js create mode 100644 versions/3.0.0/samples/users/getUser.js create mode 100644 versions/3.0.0/samples/users/getUsers.js create mode 100644 versions/3.0.0/samples/users/updateUser.js create mode 100644 versions/3.0.0/samples/users/updateUsers.js create mode 100644 versions/3.0.0/samples/usersTerritories/associateTerritoriesToUser.js create mode 100644 versions/3.0.0/samples/usersTerritories/delinkAndTransferFromAllTerritories.js create mode 100644 versions/3.0.0/samples/usersTerritories/delinkAndTransferFromSpecificTerritory.js create mode 100644 versions/3.0.0/samples/usersTerritories/getSpecificTerritoryOfUser.js create mode 100644 versions/3.0.0/samples/usersTerritories/getTerritoriesOfUser.js create mode 100644 versions/3.0.0/samples/usersTerritories/validateBeforeTransfer.js create mode 100644 versions/3.0.0/samples/usersTerritories/validateBeforeTransferForAllTerritories.js create mode 100644 versions/3.0.0/samples/users_unavailability/UpdateUserUnavailability.js create mode 100644 versions/3.0.0/samples/users_unavailability/createUsersUnavailability.js create mode 100644 versions/3.0.0/samples/users_unavailability/deleteUsersUnavailabilityHour.js create mode 100644 versions/3.0.0/samples/users_unavailability/getUserUnavailability.js create mode 100644 versions/3.0.0/samples/users_unavailability/getUsersUnavailability.js create mode 100644 versions/3.0.0/samples/users_unavailability/updateUsersUnavailabilities.js create mode 100644 versions/3.0.0/samples/userstransferanddelete/GetStatus.js create mode 100644 versions/3.0.0/samples/userstransferanddelete/UserTransferAndDelete.js create mode 100644 versions/3.0.0/samples/userstransferanddelete/UsersTransferAndDelete.js create mode 100644 versions/3.0.0/samples/usertypeusers/getUsersOfUserType.js create mode 100644 versions/3.0.0/samples/variable_groups/getVariableGroupByAPIName.js create mode 100644 versions/3.0.0/samples/variable_groups/getVariableGroupById.js create mode 100644 versions/3.0.0/samples/variable_groups/getVariableGroups.js create mode 100644 versions/3.0.0/samples/variables/createVariables.js create mode 100644 versions/3.0.0/samples/variables/deleteVariable.js create mode 100644 versions/3.0.0/samples/variables/deleteVariables.js create mode 100644 versions/3.0.0/samples/variables/getVariableById.js create mode 100644 versions/3.0.0/samples/variables/getVariableForAPIName.js create mode 100644 versions/3.0.0/samples/variables/getVariables.js create mode 100644 versions/3.0.0/samples/variables/updateVariableByAPIName.js create mode 100644 versions/3.0.0/samples/variables/updateVariableById.js create mode 100644 versions/3.0.0/samples/variables/updateVariables.js create mode 100644 versions/3.0.0/samples/wizards/getWizardById.js create mode 100644 versions/3.0.0/samples/wizards/getWizards.js diff --git a/README.md b/README.md index 1721406..1bec4d0 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,10 @@ License ## Latest Version +- [3.0.0](/versions/3.0.0/README.md) + + - Added the new key api_domain in FileStore and DBStore. + - [2.0.0](/versions//2.0.0/README.md) - Email related records API pagination Issue fixed. @@ -54,7 +58,7 @@ For older versions, please [refer](https://github.com/zoho/zohocrm-nodejs-sdk-5. ## 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-5.0/releases/tag/1.0.0) using npm +For including the latest [version](https://github.com/zoho/zohocrm-nodejs-sdk-5.0/releases/tag/3.0.0) using npm - Install **Node** from [nodejs.org](https://nodejs.org/en/download/) (if not installed). @@ -67,4 +71,4 @@ For including the latest [version](https://github.com/zoho/zohocrm-nodejs-sdk-5. ```sh npm install @zohocrm/nodejs-sdk-5.0 ``` -For more details, kindly refer [here](/versions/2.0.0/README.md). \ No newline at end of file +For more details, kindly refer [here](/versions/3.0.0/README.md). \ No newline at end of file diff --git a/lib/config/json_details.json b/lib/config/json_details.json index 8944705..a7ac08f 100644 --- a/lib/config/json_details.json +++ b/lib/config/json_details.json @@ -1 +1 @@ -{"core/com/zoho/crm/api/record/api_exception":{"code":{"values":["NO_CONTENT","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","TERRITORY_NOT_ENABLED","DEPENDENT_FIELD_MISSING","EXPECTED_FIELD_MISSING","FEATURE_NOT_SUPPORTED","CONVERTED_RECORD","NOT_FOUND","NO_RECORDS_FOUND","NOT_APPROVED","LIMIT_EXCEEDED","ALREADY_SCHEDULED","CANNOT_PERFORM_ACTION","CANNOT_PROCESS","INTERNAL_ERROR","INVALID_TOKEN","INVALID_DATA","STORAGE_SPACE_EXCEEDED","MANDATORY_NOT_FOUND","NO_PERMISSION","INVALID_MODULE","NOT_SUPPORTED","PATTERN_NOT_MATCHED","OAUTH_SCOPE_MISMATCH","DUPLICATE_DATA","INVALID_QUERY","MAPPING_MISMATCH","ID_ALREADY_CONVERTED","FILE_SIZE_MORE_THAN_ALLOWED_SIZE","RECORD_IN_BLUEPRINT","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","CANNOT_DELETE","REQUIRED_PARAM_MISSING","DATA_MISMATCH","RECORD_LOCKED","BAD_REQUEST","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"permissions","type":"List"},{"name":"param_name","type":"String"},{"name":"api_name","type":"String"},{"name":"id","type":"Long"},{"name":"module","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"index","type":"Integer"},{"name":"maximum_length","type":"String"},{"name":"mapped_field","type":"String"},{"name":"reason","type":"String"},{"name":"operator","type":"String"},{"name":"allowed_count","type":"Integer"},{"name":"limit","type":"Integer"},{"name":"json_path","type":"String"},{"name":"parent_api_name","type":"String"},{"name":"param","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"External","type":"String"}],"name":"details","type":"Map"},"message":{"values":["The record under merge is locked","the given id seems to be invalid","The record is not approved","The external ID of the lookup field or the Price Book is incorrect","The value of the external field is invalid.","There is no data for the ID specified or there is no matching record in the given module.","The external field contains duplicate data.","the territory feature is not enabled","Given Probability is not valid","duplicate territory id found","Given Territory id already exists for that record","User has no permission to assign this territory","Maximum limit of territories for that record exceeds","Invalid Sequence Number","Record insertion limit for Image upload field has been exceeded.","Record insertion limit has been exceeded.","The image format is invalid.","Dependent Fields missing","Specify Atleast one field","the id given seems to be invalid.","Already an Mass Action scheduler is runing for the given cvid","Scheduled Mass Operation feature is not available in your edition","can't update the converted record","Field cannot be updated in Scheduled Mass Update","Field is not visible","Field cannot be updated as it is associated with a validation rule.","Field cannot be updated as it is associated with a layout rule.This field cannot be updated in the Mass Update","Max field limit exceeded","Maximum lookup field limit in criteria exceeded","No field found","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","Territory is not supported for the given module","Please check whether the input values are correct","invalid data","permission denied","Internal server error occurred.","duplicate data","required field not found","Layout doesn't contain the Pipeline","Pipeline doesn't contain the Stage","the id given seems to be invalid","record not deleted","record not deletable","Authentication failed","One of the expected parameter is missing","mandatory param missing","invalid query formed","id already converted","body","given id is invalid","Already a Mass Action scheduler is running for the given cvid","The record is in stop processing","The record is in blue print","no permission to perform an action on this record","Record count exceeded","record not approved","no record found to update","Field Edit Permission not given","Customview not accessible","Empty response","give contact id is mismatched with the data","give account id is mismatched with the data","Territory id which you are trying to remove was system assigned"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/pipeline/forecast_category":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline_success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/variables/action_handler":{"classes":["core/com/zoho/crm/api/variables/api_exception","core/com/zoho/crm/api/variables/action_wrapper"],"interface":true},"core/com/zoho/crm/api/associate_email/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"message_id","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/modules/get_modules_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/attachments/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/roles/role":{"displayLabel":{"name":"display_label","type":"String"},"forecastManager":{"structure_name":"core/com/zoho/crm/api/roles/reporting_to","name":"forecast_manager","type":"core/com/zoho/crm/api/roles/reporting_to"},"adminUser":{"name":"admin_user","type":"Boolean"},"modifiedByS":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by__s","type":"core/com/zoho/crm/api/users/minified_user"},"shareWithPeers":{"name":"share_with_peers","type":"Boolean"},"createdByS":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by__s","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"description":{"name":"description","type":"String"},"id":{"name":"id","type":"Long"},"createdTimeS":{"name":"created_time__s","type":"DateTime"},"modifiedTimeS":{"name":"modified_time__s","type":"DateTime"},"reportingTo":{"structure_name":"core/com/zoho/crm/api/roles/reporting_to","name":"reporting_to","type":"core/com/zoho/crm/api/roles/reporting_to"}},"core/com/zoho/crm/api/entity_scores/module_structure":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/deleted_records_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/deleted_record","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/record/info","name":"info","type":"core/com/zoho/crm/api/record/info"}},"core/com/zoho/crm/api/taxes/action_wrapper":{"orgTaxes":{"structure_name":"core/com/zoho/crm/api/taxes/action_response","name":"org_taxes","interface":true,"type":"core/com/zoho/crm/api/taxes/action_response"}},"core/com/zoho/crm/api/inventory_templates/response_handler":{"classes":["core/com/zoho/crm/api/inventory_templates/api_exception","core/com/zoho/crm/api/inventory_templates/response_wrapper"],"interface":true},"core/com/zoho/crm/api/entity_scores/entity_structure_with_module":{"module":{"structure_name":"core/com/zoho/crm/api/entity_scores/module_structure","name":"module","type":"core/com/zoho/crm/api/entity_scores/module_structure"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mail_merge/sign_mail_merge_wrapper":{"signMailMerge":{"structure_name":"core/com/zoho/crm/api/mail_merge/sign_mail_merge","name":"sign_mail_merge","type":"List"}},"core/com/zoho/crm/api/record/get_mass_update_status_param":{"jobId":{"name":"job_id","type":"String"}},"core/com/zoho/crm/api/currencies/api_exception":{"code":{"values":["INTERNAL_SERVER_ERROR","ALREADY_ENABLED","INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"regex","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"related_status","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_write/upload_file_header":{"feature":{"values":["bulk-write"],"name":"feature","type":"String"},"XCRMORG":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/wizards/button":{"displayLabel":{"name":"display_label","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"backgroundColor":{"name":"background_color","type":"String"},"color":{"name":"color","type":"String"},"shape":{"name":"shape","type":"String"},"visibility":{"name":"visibility","type":"String"},"resource":{"name":"resource","type":"Object"},"criteria":{"structure_name":"core/com/zoho/crm/api/wizards/criteria","name":"criteria","type":"core/com/zoho/crm/api/wizards/criteria"},"targetScreen":{"structure_name":"core/com/zoho/crm/api/wizards/screen","name":"target_screen","type":"core/com/zoho/crm/api/wizards/screen"},"type":{"name":"type","type":"String"},"transition":{"structure_name":"core/com/zoho/crm/api/wizards/transition","name":"transition","type":"core/com/zoho/crm/api/wizards/transition"},"id":{"name":"id","type":"Long"},"category":{"name":"category","type":"String"}},"core/com/zoho/crm/api/mass_change_owner/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["owner is successfully updated"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/holidays/action_wrapper":{"holidays":{"structure_name":"core/com/zoho/crm/api/holidays/action_response","name":"holidays","type":"List"}},"core/com/zoho/crm/api/users/associated_groups_wrapper":{"userGroups":{"structure_name":"core/com/zoho/crm/api/users/associated_group","name":"user_groups","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/users/info","name":"info","type":"core/com/zoho/crm/api/users/info"}},"core/com/zoho/crm/api/record/tax":{"id":{"name":"id","type":"Long"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/send_mail/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/send_mail/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/layouts/section_field":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"sharingProperties":{"structure_name":"core/com/zoho/crm/api/modules/sharing_properties","name":"sharing_properties","type":"core/com/zoho/crm/api/modules/sharing_properties"},"apiName":{"name":"api_name","type":"String"},"webhook":{"name":"webhook","type":"Boolean"},"defaultValue":{"name":"default_value","type":"String"},"associatedModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"associated_module","type":"core/com/zoho/crm/api/modules/minified_module"},"tooltip":{"structure_name":"core/com/zoho/crm/api/fields/tooltip","name":"tooltip","type":"core/com/zoho/crm/api/fields/tooltip"},"quickSequenceNumber":{"name":"quick_sequence_number","type":"String"},"jsonType":{"name":"json_type","type":"String"},"type":{"name":"type","type":"String"},"required":{"name":"required","type":"Boolean"},"availableInUserLayout":{"name":"available_in_user_layout","type":"Boolean"},"rollupSummary":{"structure_name":"core/com/zoho/crm/api/fields/rollup_summary","name":"rollup_summary","type":"core/com/zoho/crm/api/fields/rollup_summary"},"blueprintSupported":{"name":"blueprint_supported","type":"Boolean"},"createdTime":{"name":"created_time","type":"DateTime"},"showType":{"name":"show_type","type":"Integer"},"globalPicklist":{"name":"global_picklist","type":"Object"},"id":{"name":"id","type":"Long"},"additionalColumn":{"name":"additional_column","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"filterable":{"name":"filterable","type":"Boolean"},"emailParser":{"structure_name":"core/com/zoho/crm/api/fields/email_parser","name":"email_parser","type":"core/com/zoho/crm/api/fields/email_parser"},"visible":{"name":"visible","type":"Boolean"},"dataType":{"values":["formula","text","boolean","picklist","datetime","website","autonumber","textarea","email","phone","integer","double","date","formula","text","boolean","picklist","datetime","website","autonumber","textarea","lookup","email","userlookup","phone","integer","double","date"],"name":"data_type","type":"utils/util/choice"},"profiles":{"structure_name":"core/com/zoho/crm/api/fields/profile","name":"profiles","type":"List"},"readOnly":{"name":"read_only","type":"Boolean"},"historyTracking":{"structure_name":"core/com/zoho/crm/api/fields/history_tracking","name":"history_tracking","type":"core/com/zoho/crm/api/fields/history_tracking"},"subform":{"structure_name":"core/com/zoho/crm/api/layouts/section_subform_field","name":"subform","type":"core/com/zoho/crm/api/layouts/section_subform_field"},"systemMandatory":{"name":"system_mandatory","type":"Boolean"},"separator":{"name":"separator","type":"Boolean"},"customField":{"name":"custom_field","type":"Boolean"},"searchable":{"name":"searchable","type":"Boolean"},"decimalPlace":{"name":"decimal_place","type":"Integer"},"createdSource":{"name":"created_source","type":"String"},"displayType":{"name":"display_type","type":"Integer"},"external":{"structure_name":"core/com/zoho/crm/api/fields/external","name":"external","type":"core/com/zoho/crm/api/fields/external"},"subModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"sub_module","type":"core/com/zoho/crm/api/modules/minified_module"},"unique":{"structure_name":"core/com/zoho/crm/api/fields/unique","name":"unique","type":"core/com/zoho/crm/api/fields/unique"},"viewType":{"structure_name":"core/com/zoho/crm/api/fields/view_type","name":"view_type","type":"core/com/zoho/crm/api/fields/view_type"},"displayField":{"name":"display_field","type":"Boolean"},"operationType":{"structure_name":"core/com/zoho/crm/api/fields/operation_type","name":"operation_type","type":"core/com/zoho/crm/api/fields/operation_type"},"hipaaComplianceEnabled":{"name":"hipaa_compliance_enabled","type":"Boolean"},"validationRule":{"name":"validation_rule","type":"Map"},"crypt":{"structure_name":"core/com/zoho/crm/api/fields/crypt","name":"crypt","type":"core/com/zoho/crm/api/fields/crypt"},"fileUpoladOptionlist":{"structure_name":"core/com/zoho/crm/api/fields/file_upolad_option","name":"file_upolad_optionlist","type":"List"},"enableColourCode":{"name":"enable_colour_code","type":"Boolean"},"virtualField":{"name":"virtual_field","type":"Boolean"},"hipaaCompliance":{"structure_name":"core/com/zoho/crm/api/fields/hipaa_compliance","name":"hipaa_compliance","type":"core/com/zoho/crm/api/fields/hipaa_compliance"},"associationDetails":{"structure_name":"core/com/zoho/crm/api/fields/association_details","name":"association_details","type":"core/com/zoho/crm/api/fields/association_details"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/fields/pick_list_value","name":"pick_list_values","type":"List"},"fieldLabel":{"name":"field_label","type":"String"},"referFromField":{"structure_name":"core/com/zoho/crm/api/fields/refer_from_field","name":"refer_from_field","type":"core/com/zoho/crm/api/fields/refer_from_field"},"allowedModules":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"allowed_modules","type":"List"},"fieldReadOnly":{"name":"field_read_only","type":"Boolean"},"businesscardSupported":{"name":"businesscard_supported","type":"Boolean"},"currency":{"structure_name":"core/com/zoho/crm/api/fields/currency","name":"currency","type":"core/com/zoho/crm/api/fields/currency"},"multiuserlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiuserlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"displayLabel":{"name":"display_label","type":"String"},"lookup":{"structure_name":"core/com/zoho/crm/api/fields/lookup","name":"lookup","type":"core/com/zoho/crm/api/fields/lookup"},"length":{"values":[120],"name":"length","type":"utils/util/choice"},"pickListValuesSortedLexically":{"name":"pick_list_values_sorted_lexically","type":"Boolean"},"sectionId":{"name":"section_id","type":"Integer"},"sortable":{"name":"sortable","type":"Boolean"},"autoNumber":{"structure_name":"core/com/zoho/crm/api/fields/auto_number","name":"auto_number","type":"core/com/zoho/crm/api/fields/auto_number"},"private1":{"structure_name":"core/com/zoho/crm/api/fields/private","name":"private","type":"core/com/zoho/crm/api/fields/private"},"convertMapping":{"structure_name":"core/com/zoho/crm/api/fields/convert_mapping","name":"convert_mapping","type":"core/com/zoho/crm/api/fields/convert_mapping"},"multiModuleLookup":{"structure_name":"core/com/zoho/crm/api/fields/multi_module_lookup","name":"multi_module_lookup","type":"core/com/zoho/crm/api/fields/multi_module_lookup"},"massUpdate":{"name":"mass_update","type":"Boolean"},"uiType":{"name":"ui_type","type":"Integer"},"formula":{"structure_name":"core/com/zoho/crm/api/fields/formula","name":"formula","type":"core/com/zoho/crm/api/fields/formula"},"category":{"name":"category","type":"Integer"},"multiselectlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiselectlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"columnName":{"name":"column_name","type":"String"}},"core/com/zoho/crm/api/timelines/response_wrapper":{"timeline":{"structure_name":"core/com/zoho/crm/api/timelines/timeline","name":"__timeline","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/timelines/info","name":"info","type":"core/com/zoho/crm/api/timelines/info"}},"core/com/zoho/crm/api/record/criteria":{"comparator":{"values":["equal","not_equal","in","not_in","less_than","less_equal","greater_than","greater_equal","contains","not_contains","starts_with","ends_with","between","not_between"],"name":"comparator","type":"utils/util/choice"},"groupOperator":{"values":["and","or"],"name":"group_operator","type":"utils/util/choice"},"field":{"name":"field","type":"String"},"value":{"name":"value","type":"Object"},"group":{"lookup":true,"structure_name":"core/com/zoho/crm/api/record/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/custom_views/api_exception":{"code":{"values":["INVALID_DATA","REQUIRED_PARAM_MISSING","MANDATORY_NOT_FOUND","EXPECTED_FIELD_MISSING","DUPLICATE_DATA","INVALID_MODULE","INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"name":"id","type":"Long"},{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"param_name","type":"String"},{"structure_name":"core/com/zoho/crm/api/custom_views/error_details","name":"expected_fields","type":"List"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_write/resource":{"code":{"name":"code","type":"String"},"file":{"structure_name":"core/com/zoho/crm/api/bulk_write/file","name":"file","type":"core/com/zoho/crm/api/bulk_write/file"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"ignoreEmpty":{"name":"ignore_empty","type":"Boolean"},"findBy":{"name":"find_by","type":"String"},"fieldMappings":{"structure_name":"core/com/zoho/crm/api/bulk_write/field_mapping","name":"field_mappings","type":"List"},"type":{"values":["data"],"name":"type","type":"utils/util/choice"},"status":{"values":["ADDED","IN PROGRESS","COMPLETED","SKIPPED","FAILED"],"name":"status","type":"utils/util/choice"},"fileId":{"name":"file_id","type":"String"}},"core/com/zoho/crm/api/backup/api_exception":{"code":{"values":["BACKUP_ALREADY_SCHEDULED","ALREADY_CANCELLED","RESOURCE_NOT_FOUND","REQUEST_BODY_NOT_READABLE","INVALID_DATA","INPROGRESS","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/deal_contact_roles/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/roles/delete_role_param":{"transferToId":{"name":"transfer_to_id","type":"Long","required":true}},"core/com/zoho/crm/api/record/recurring_activity":{"rrule":{"name":"RRULE","type":"String"},"exdate":{"name":"EXDATE","type":"String"}},"core/com/zoho/crm/api/notifications/response_handler":{"classes":["core/com/zoho/crm/api/notifications/api_exception","core/com/zoho/crm/api/notifications/response_wrapper"],"interface":true},"core/com/zoho/crm/api/record/update_records_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/fields/body_wrapper":{"fields":{"structure_name":"core/com/zoho/crm/api/fields/fields","name":"fields","type":"List"}},"core/com/zoho/crm/api/pipeline/getpipeline_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/layouts/properties":{"maximumRows":{"name":"maximum_rows","type":"Integer"},"tooltip":{"structure_name":"core/com/zoho/crm/api/layouts/tooltip","name":"tooltip","type":"core/com/zoho/crm/api/layouts/tooltip"},"reorderRows":{"name":"reorder_rows","type":"Boolean"}},"core/com/zoho/crm/api/users_transfer_delete/response_wrapper":{"transferAndDelete":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/status","name":"transfer_and_delete","type":"List"}},"core/com/zoho/crm/api/taxes/action_response":{"classes":["core/com/zoho/crm/api/taxes/success_response","core/com/zoho/crm/api/taxes/api_exception"],"interface":true},"core/com/zoho/crm/api/privacy_preference/preference":{"dataProcessingDuration":{"name":"data_processing_duration","type":"String"},"excludeExport":{"name":"exclude_export","type":"String"},"restrictZohoIntegFields":{"name":"restrict_zoho_integ_fields","type":"String"},"restrictTpt":{"name":"restrict_tpt","type":"String"},"excludeExportFields":{"name":"exclude_export_fields","type":"String"},"restrictTptServices":{"name":"restrict_tpt_services","type":"String"},"restrictTptFields":{"name":"restrict_tpt_fields","type":"String"},"restrictZohoIntegServices":{"name":"restrict_zoho_integ_services","type":"String"},"restrictZohoInteg":{"name":"restrict_zoho_integ","type":"String"},"excludeAPITpt":{"name":"exclude_api_tpt","type":"String"},"limitActions":{"name":"limit_actions","type":"String"},"excludeAPIZohoFields":{"name":"exclude_api_zoho_fields","type":"String"},"actionsWhileAwaiting":{"name":"actions_while_awaiting","type":"String"},"doubleOptIn":{"name":"double_opt_in","type":"String"},"blockList":{"name":"block_list","type":"String"},"excludeAPIZoho":{"name":"exclude_api_zoho","type":"String"},"privacySettingStatus":{"name":"privacy_setting_status","type":"String"},"excludeAPITptFields":{"name":"exclude_api_tpt_fields","type":"String"},"consentModules":{"name":"consent_modules","type":"String"},"durationTiming":{"name":"duration_timing","type":"String"},"consentMailSend":{"name":"consent_mail_send","type":"String"},"awaitingPeriod":{"name":"awaiting_period","type":"String"}},"core/com/zoho/crm/api/fields/query_details":{"criteria":{"name":"criteria","type":"Map"},"queryId":{"name":"query_id","type":"Long"}},"core/com/zoho/crm/api/pipeline/maps":{"displayValue":{"name":"display_value","type":"String"},"sequenceNumber":{"name":"sequence_number","max-length":10,"type":"Integer"},"forecastCategory":{"structure_name":"core/com/zoho/crm/api/pipeline/forecast_category","name":"forecast_category","type":"core/com/zoho/crm/api/pipeline/forecast_category"},"actualValue":{"name":"actual_value","type":"String"},"colourCode":{"name":"colour_code","type":"String"},"id":{"name":"id","type":"Long"},"forecastType":{"name":"forecast_type","type":"String"},"delete1":{"name":"_delete","type":"Boolean"}},"core/com/zoho/crm/api/tags/record_action_response":{"classes":["core/com/zoho/crm/api/tags/api_exception","core/com/zoho/crm/api/tags/record_success_response"],"interface":true},"core/com/zoho/crm/api/files/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/files/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/user_groups/associated_user":{"count":{"name":"count","type":"Integer"},"userGroup":{"structure_name":"core/com/zoho/crm/api/user_groups/user_group","name":"user_group","type":"core/com/zoho/crm/api/user_groups/user_group"}},"core/com/zoho/crm/api/record/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/territories/manager":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users/get_users_param":{"perPage":{"name":"per_page","type":"Integer"},"ids":{"name":"ids","type":"String"},"page":{"name":"page","type":"Integer"},"type":{"values":["ActiveUsers","DeactiveUsers","NotConfirmedUsers","ConfirmedUsers","CurrentUser","ActiveConfirmedUsers"],"name":"type","type":"String"}},"core/com/zoho/crm/api/cancel_meetings/action_response":{"classes":["core/com/zoho/crm/api/cancel_meetings/success_response","core/com/zoho/crm/api/cancel_meetings/api_exception"],"interface":true},"core/com/zoho/crm/api/files/action_handler":{"classes":["core/com/zoho/crm/api/files/api_exception","core/com/zoho/crm/api/files/action_wrapper"],"interface":true},"core/com/zoho/crm/api/record/action_response":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/success_response"],"interface":true},"core/com/zoho/crm/api/scoring_rules/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/territory_users/deassociate_territory_users_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/notes/get_notes_param":{"perPage":{"name":"per_page","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"String"},"fields":{"name":"fields","type":"String","required":true}},"core/com/zoho/crm/api/bulk_read/criteria":{"groupOperator":{"values":["and","or"],"name":"group_operator","type":"utils/util/choice"},"comparator":{"values":["equal","not_equal","in","not_in","less_than","less_equal","greater_than","greater_equal","contains","not_contains","starts_with","ends_with","between","not_between"],"name":"comparator","type":"utils/util/choice"},"apiName":{"name":"api_name","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"field","type":"core/com/zoho/crm/api/fields/minified_field"},"value":{"name":"value","type":"Object"},"group":{"structure_name":"core/com/zoho/crm/api/bulk_read/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/share_records/response_handler":{"classes":["core/com/zoho/crm/api/share_records/response_wrapper","core/com/zoho/crm/api/share_records/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/transfer_to_user":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/related_records/get_related_record_using_external_id_param":{"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/send_mail/action_handler":{"classes":["core/com/zoho/crm/api/send_mail/action_wrapper","core/com/zoho/crm/api/send_mail/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/transfer_action_response":{"classes":["core/com/zoho/crm/api/users_territories/success_response"],"interface":true},"core/com/zoho/crm/api/wizards/portal_user_type":{"layout":{"structure_name":"core/com/zoho/crm/api/layouts/layouts","name":"layout","type":"core/com/zoho/crm/api/layouts/layouts"},"chartData":{"structure_name":"core/com/zoho/crm/api/wizards/chart_data","name":"chart_data","type":"core/com/zoho/crm/api/wizards/chart_data"},"screens":{"structure_name":"core/com/zoho/crm/api/wizards/screen","name":"screens","type":"List"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mass_convert/assign_to":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/change_owner/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/change_owner/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/shift_hours/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/currencies/currency":{"symbol":{"name":"symbol","type":"String"},"modifiedTime":{"name":"modified_time","type":"DateTime"},"format":{"structure_name":"core/com/zoho/crm/api/currencies/currency_format","name":"format","type":"core/com/zoho/crm/api/currencies/currency_format"},"isActive":{"name":"is_active","type":"Boolean"},"exchangeRate":{"regex":"[1-9]{2}[.][1-9]{9}","name":"exchange_rate","type":"String"},"isoCode":{"name":"iso_code","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"prefixSymbol":{"name":"prefix_symbol","type":"Boolean"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"isBase":{"name":"is_base","type":"Boolean"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/shift_hours/shift_hours":{"holidays":{"structure_name":"core/com/zoho/crm/api/shift_hours/holidays","name":"holidays","type":"List"},"timezone":{"name":"timezone","type":"TimeZone"},"sameAsEveryday":{"name":"same_as_everyday","type":"Boolean"},"name":{"name":"name","type":"String"},"usersCount":{"name":"users_count","type":"Integer"},"id":{"name":"id","type":"Long"},"breakHours":{"structure_name":"core/com/zoho/crm/api/shift_hours/break_hours","name":"break_hours","type":"List"},"dailyTiming":{"name":"daily_timing","type":"List"},"shiftDays":{"name":"shift_days","type":"List"},"users":{"structure_name":"core/com/zoho/crm/api/shift_hours/users","name":"users","type":"List"},"customTiming":{"structure_name":"core/com/zoho/crm/api/shift_hours/shift_custom_timing","name":"custom_timing","type":"List"}},"core/com/zoho/crm/api/backup/urls":{"expiryDate":{"name":"expiry_date","type":"DateTime"},"attachmentLinks":{"name":"attachment_links","type":"List"},"dataLinks":{"name":"data_links","type":"List"}},"core/com/zoho/crm/api/holidays/holidays":{"holidays":{"structure_name":"core/com/zoho/crm/api/holidays/holiday","name":"holidays","type":"List"}},"core/com/zoho/crm/api/wizards/resource":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/change_owner/action_handler":{"classes":["core/com/zoho/crm/api/change_owner/api_exception","core/com/zoho/crm/api/change_owner/action_wrapper"],"interface":true},"core/com/zoho/crm/api/timelines/path_finder":{"processExit":{"name":"process_exit","type":"Boolean"},"state":{"structure_name":"core/com/zoho/crm/api/timelines/state","name":"state","type":"core/com/zoho/crm/api/timelines/state"},"processEntry":{"name":"process_entry","type":"Boolean"}},"core/com/zoho/crm/api/territories/reporting_to":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/related_records/delink_records_param":{"ids":{"name":"ids","type":"String","required":true}},"core/com/zoho/crm/api/portal_user_type/get_user_types_param":{"include":{"values":["modules"],"name":"include","type":"String"}},"core/com/zoho/crm/api/fields/function_parameter":{"apiName":{"name":"api_name","type":"String"}},"core/com/zoho/crm/api/assignment_rules/response_wrapper":{"assignmentRules":{"structure_name":"core/com/zoho/crm/api/assignment_rules/assignment_rules","name":"assignment_rules","type":"List"}},"core/com/zoho/crm/api/record/search_records_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/users_territories/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portals/action_wrapper":{"portals":{"structure_name":"core/com/zoho/crm/api/portals/action_response","name":"portals","type":"List"}},"core/com/zoho/crm/api/wizards/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/timelines/response_handler":{"classes":["core/com/zoho/crm/api/timelines/api_exception","core/com/zoho/crm/api/timelines/response_wrapper"],"interface":true},"core/com/zoho/crm/api/user_groups/body_wrapper":{"userGroups":{"structure_name":"core/com/zoho/crm/api/user_groups/groups","name":"user_groups","type":"List"}},"core/com/zoho/crm/api/templates/templates":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"folder":{"structure_name":"core/com/zoho/crm/api/templates/folder","name":"folder","type":"core/com/zoho/crm/api/templates/folder"},"attachmentPresent":{"name":"attachment_present","type":"Boolean"},"subject":{"name":"subject","type":"String"},"module":{"name":"module","type":"String"},"consentLinked":{"name":"consent_linked","type":"Boolean"},"name":{"name":"name","type":"String"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/templates/folder","name":"modified_by","type":"core/com/zoho/crm/api/templates/folder"},"id":{"name":"id","type":"Long"},"favourite":{"name":"favourite","type":"Boolean"}},"core/com/zoho/crm/api/mass_delete_cvid/cvid_body_wrapper":{"cvid":{"name":"cvid","type":"Long"},"territory":{"structure_name":"core/com/zoho/crm/api/mass_delete_cvid/territory","name":"territory","type":"core/com/zoho/crm/api/mass_delete_cvid/territory"}},"core/com/zoho/crm/api/reschedule_history/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"Modified_Time","type":"String"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"Created_Time","type":"String"},{"name":"id","type":"Long"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"$approval_state","type":"String"}],"name":"details","type":"Map"},"message":{"values":["record added","record updated","record deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/notifications/notification":{"resourceId":{"name":"resource_id","type":"Long"},"deleteevents":{"values":[true],"name":"_delete_events","type":"utils/util/choice"},"notifyOnRelatedAction":{"name":"notify_on_related_action","type":"Boolean"},"returnAffectedFieldValues":{"name":"return_affected_field_values","type":"Boolean"},"notifyUrl":{"regex":"www[.][a-z]{5}zoho[.]com","name":"notify_url","type":"String"},"resourceName":{"name":"resource_name","type":"String"},"resourceUri":{"name":"resource_uri","type":"String"},"fields":{"name":"fields","type":"Map"},"channelExpiry":{"name":"channel_expiry","type":"DateTime"},"channelId":{"name":"channel_id","type":"String"},"events":{"name":"events","type":"List"},"token":{"name":"token","type":"String"}},"core/com/zoho/crm/api/record/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"duplicateField":{"name":"duplicate_field","type":"String"},"action":{"values":["insert","update"],"name":"action","type":"utils/util/choice"},"details":{"keys":[{"name":"Modified_Time","type":"DateTime"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"Created_Time","type":"DateTime"},{"name":"id","type":"String"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"External_Contact_ID","type":"String"},{"name":"$approval_state","type":"String"},{"structure_name":"core/com/zoho/crm/api/record/record","name":"Contacts","type":"core/com/zoho/crm/api/record/record"},{"structure_name":"core/com/zoho/crm/api/record/record","name":"Deals","type":"core/com/zoho/crm/api/record/record"},{"structure_name":"core/com/zoho/crm/api/record/record","name":"Accounts","type":"core/com/zoho/crm/api/record/record"}],"name":"details","type":"Map"},"message":{"values":["The record has been converted successfully","record updated","record deleted","record added","photo uploaded successfully","Photo deleted","the territories data updated successfully","the territories are removed successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/users_unavailability/action_response":{"classes":["core/com/zoho/crm/api/users_unavailability/api_exception","core/com/zoho/crm/api/users_unavailability/success_response"],"interface":true},"core/com/zoho/crm/api/pipeline/mandatory_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/available_currencies/api_exception":{"code":{"values":["INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/shift_hours/get_shift_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/mass_delete_cvid/mass_delete_scheduled":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["mass delete scheduled successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/rollup_summary":{"expression":{"structure_name":"core/com/zoho/crm/api/fields/expression","name":"expression","type":"core/com/zoho/crm/api/fields/expression"},"basedOnModule":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"based_on_module","type":"core/com/zoho/crm/api/fields/minified_field"},"relatedList":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"related_list","type":"core/com/zoho/crm/api/fields/minified_field"},"rollupBasedOn":{"name":"rollup_based_on","type":"String"},"returnType":{"name":"return_type","type":"String"}},"core/com/zoho/crm/api/inventory_templates/response_wrapper":{"inventoryTemplates":{"structure_name":"core/com/zoho/crm/api/inventory_templates/inventory_template","name":"inventory_templates","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/inventory_templates/info","name":"info","type":"core/com/zoho/crm/api/inventory_templates/info"}},"core/com/zoho/crm/api/holidays/response_handler":{"classes":["core/com/zoho/crm/api/holidays/api_exception","core/com/zoho/crm/api/holidays/response_wrapper"],"interface":true},"core/com/zoho/crm/api/mail_merge/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"report_link","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/blueprint/next_transition":{"criteriaMatched":{"name":"criteria_matched","type":"Boolean"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/definition/api_exception":{"code":{"values":["INVALID_DATA","REQUIRED_PARAM_MISSING"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"values":["resource"],"name":"param_name","type":"utils/util/choice"},{"values":["resource"],"name":"param","type":"utils/util/choice"}],"name":"details","type":"Map"},"message":{"values":["invalid param","One of the expected parameter is missing"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/user_groups/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"regex","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fiscal_year/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["The fiscal year configuration has been updated successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/shift_hours/body_wrapper":{"shiftHours":{"structure_name":"core/com/zoho/crm/api/shift_hours/shift_hours","name":"shift_hours","type":"List"}},"core/com/zoho/crm/api/users/response_handler":{"classes":["core/com/zoho/crm/api/users/associated_groups_wrapper","core/com/zoho/crm/api/users/response_wrapper","core/com/zoho/crm/api/users/api_exception"],"interface":true},"core/com/zoho/crm/api/users_unavailability/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","MANDATORY_NOT_FOUND","PATTERN_NOT_MATCHED","INVALID_URL_PATTERN","UNABLE_TO_PARSE_DATA_TYPE","INVALID_TOKEN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"index","type":"Integer"},{"name":"param_name","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["Ids should be Long value with comma separated","required field not found","Please check whether the input values are correct","Please check if the URL trying to access is a correct one","either the request body or parameters is in wrong format"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/backup/response_handler":{"classes":["core/com/zoho/crm/api/backup/urls_wrapper","core/com/zoho/crm/api/backup/history_wrapper","core/com/zoho/crm/api/backup/file_body_wrapper","core/com/zoho/crm/api/backup/body_wrapper","core/com/zoho/crm/api/backup/api_exception"],"interface":true},"core/com/zoho/crm/api/mass_convert/action_response":{"classes":["core/com/zoho/crm/api/mass_convert/api_exception","core/com/zoho/crm/api/mass_convert/success_response"],"interface":true},"core/com/zoho/crm/api/fields/hipaa_compliance":{"restricted":{"name":"restricted","type":"Boolean"},"restrictedInExport":{"name":"restricted_in_export","type":"Boolean"}},"core/com/zoho/crm/api/fields/convert_mapping":{"deals":{"name":"Deals","type":"String"},"accounts":{"name":"Accounts","type":"String"},"contacts":{"name":"Contacts","type":"String"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline_action_response":{"classes":["core/com/zoho/crm/api/pipeline/api_exception","core/com/zoho/crm/api/pipeline/transfer_pipeline_success_response"],"interface":true},"core/com/zoho/crm/api/mass_change_owner/action_handler":{"classes":["core/com/zoho/crm/api/mass_change_owner/action_wrapper","core/com/zoho/crm/api/mass_change_owner/api_exception"],"interface":true},"core/com/zoho/crm/api/blueprint/escalation":{"days":{"name":"days","type":"Integer"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/layouts/default_assignment_view":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/record/get_deleted_records_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/user_groups/owner":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/reschedule_history/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"DateTime"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"}},"core/com/zoho/crm/api/send_mail/from":{"userName":{"name":"user_name","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/territories/associated_users_count_wrapper":{"associatedUsersCount":{"structure_name":"core/com/zoho/crm/api/territories/associated_users_count","name":"associated_users_count","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/territories/info","name":"info","type":"core/com/zoho/crm/api/territories/info"}},"core/com/zoho/crm/api/tags/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/contact_roles/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/send_mail/data":{"cc":{"structure_name":"core/com/zoho/crm/api/send_mail/to","name":"cc","type":"List"},"template":{"structure_name":"core/com/zoho/crm/api/send_mail/template","name":"template","interface":true,"type":"core/com/zoho/crm/api/send_mail/template"},"bcc":{"structure_name":"core/com/zoho/crm/api/send_mail/to","name":"bcc","type":"List"},"scheduledTime":{"name":"scheduled_time","type":"DateTime"},"attachments":{"structure_name":"core/com/zoho/crm/api/send_mail/attachment","name":"attachments","type":"List"},"subject":{"name":"subject","type":"String"},"inReplyTo":{"name":"in_reply_to","type":"String"},"inventoryDetails":{"structure_name":"core/com/zoho/crm/api/send_mail/inventory_details","name":"inventory_details","type":"core/com/zoho/crm/api/send_mail/inventory_details"},"content":{"name":"content","type":"String"},"orgEmail":{"name":"org_email","type":"Boolean"},"replyTo":{"structure_name":"core/com/zoho/crm/api/send_mail/to","name":"reply_to","type":"core/com/zoho/crm/api/send_mail/to"},"from":{"structure_name":"core/com/zoho/crm/api/send_mail/from","name":"from","type":"core/com/zoho/crm/api/send_mail/from"},"mailFormat":{"values":["html","text"],"name":"mail_format","type":"utils/util/choice"},"to":{"structure_name":"core/com/zoho/crm/api/send_mail/to","name":"to","type":"List"},"consentEmail":{"name":"consent_email","type":"Boolean"},"dataSubjectRequest":{"structure_name":"core/com/zoho/crm/api/send_mail/data_subject_request","name":"data_subject_request","type":"core/com/zoho/crm/api/send_mail/data_subject_request"}},"core/com/zoho/crm/api/tags/response_handler":{"classes":["core/com/zoho/crm/api/tags/response_wrapper","core/com/zoho/crm/api/tags/api_exception","core/com/zoho/crm/api/tags/count_response_wrapper"],"interface":true},"core/com/zoho/crm/api/reschedule_history/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","INVALID_DATA","INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["required field not found","record not deleted","the module name given seems to be invalid","invalid data"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/scoring_rules/get_scoring_rules_param":{"perPage":{"values":[10],"name":"per_page","type":"Integer"},"module":{"name":"module","type":"String"},"name":{"name":"name","type":"Long"},"active":{"values":[true,false],"name":"active","type":"Boolean"},"page":{"values":[2],"name":"page","type":"Integer"},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/record/download_handler":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/file_body_wrapper"],"interface":true},"core/com/zoho/crm/api/portal_invite/response_wrapper":{"portalInvite":{"structure_name":"core/com/zoho/crm/api/portal_invite/job_response","name":"portal_invite","type":"List"}},"core/com/zoho/crm/api/tags/get_tags_param":{"myTags":{"values":["true","false"],"name":"my_tags","type":"String"},"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/notifications/body_wrapper":{"watch":{"structure_name":"core/com/zoho/crm/api/notifications/notification","name":"watch","max-length":100,"type":"List","min-length":1}},"core/com/zoho/crm/api/email_sharing/response_wrapper":{"emailssharingdetails":{"structure_name":"core/com/zoho/crm/api/email_sharing/get_email_sharing","name":"__emails_sharing_details","type":"List"}},"core/com/zoho/crm/api/user_groups/association_wrapper":{"associations":{"structure_name":"core/com/zoho/crm/api/user_groups/association_response","name":"associations","type":"List"}},"core/com/zoho/crm/api/territories/body_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/territories/territories","name":"territories","type":"List"}},"core/com/zoho/crm/api/portal_user_type/response_handler":{"classes":["core/com/zoho/crm/api/portal_user_type/response_wrapper","core/com/zoho/crm/api/portal_user_type/api_exception"],"interface":true},"core/com/zoho/crm/api/portal_invite/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"},{"name":"param","type":"String"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_convert/response_handler":{"classes":["core/com/zoho/crm/api/mass_convert/response_wrapper","core/com/zoho/crm/api/mass_convert/api_exception"],"interface":true},"core/com/zoho/crm/api/fields/profile":{"permissionType":{"name":"permission_type","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/variables/action_wrapper":{"variables":{"structure_name":"core/com/zoho/crm/api/variables/action_response","name":"variables","type":"List"}},"core/com/zoho/crm/api/org/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/notes/get_note_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"String","required":true}},"core/com/zoho/crm/api/service_preference/action_handler":{"classes":["core/com/zoho/crm/api/service_preference/api_exception","core/com/zoho/crm/api/service_preference/action_wrapper"],"interface":true},"core/com/zoho/crm/api/mass_change_owner/status":{"failedCount":{"name":"Failed_Count","type":"Integer"},"notUpdatedCount":{"name":"Not_Updated_Count","type":"Integer"},"updatedCount":{"name":"Updated_Count","type":"Integer"},"totalCount":{"name":"Total_Count","type":"Integer"},"status":{"values":["COMPLETED","SCHEDULED","RUNNING","FAILED"],"name":"Status","type":"utils/util/choice"}},"core/com/zoho/crm/api/territories/get_territories_param":{"filters":{"name":"filters","type":"String"}},"core/com/zoho/crm/api/bulk_write/bulk_write_response":{"result":{"structure_name":"core/com/zoho/crm/api/bulk_write/result","name":"result","type":"core/com/zoho/crm/api/bulk_write/result"},"resource":{"structure_name":"core/com/zoho/crm/api/bulk_write/resource","name":"resource","type":"List"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"createdTime":{"name":"created_time","type":"DateTime"},"callback":{"structure_name":"core/com/zoho/crm/api/bulk_write/call_back","name":"callback","type":"core/com/zoho/crm/api/bulk_write/call_back"},"id":{"name":"id","type":"String"},"characterEncoding":{"name":"character_encoding","type":"String"},"operation":{"name":"operation","type":"String"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/tags/record_detail_tag":{"name":{"name":"name","type":"String"},"colorCode":{"name":"color_code","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/appointment_preference/get_appointment_preference_param":{"include":{"values":["deal_record_configuration"],"name":"include","type":"String"}},"core/com/zoho/crm/api/fields/get_fields_param":{"include":{"values":["allowed_permissions_to_update"],"name":"include","type":"String"},"component":{"values":["criteria"],"name":"component","type":"String"},"featureName":{"values":["layout_rule"],"name":"feature_name","type":"String"},"module":{"name":"module","type":"String","required":true},"dataType":{"values":["boolean","profileimage","datetime","website","ownerlookup","autonumber","subform","RRULE","textarea","lookup","bigint","currency","text","multiselectpicklist","ALARM","integer","phone","userlookup","picklist","email","event_reminder","double","date","multi_module_lookup","multiuserlookup","multiselectlookup","formula","module"],"name":"data_type","type":"String"},"type":{"values":["used","unused","all"],"name":"type","type":"String"},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/variables/delete_variables_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/tags/action_handler":{"classes":["core/com/zoho/crm/api/tags/action_wrapper","core/com/zoho/crm/api/tags/api_exception"],"interface":true},"core/com/zoho/crm/api/related_records/delink_records_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/send_mail/attachment":{"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/attachments/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"Modified_Time","type":"DateTime"},{"name":"Created_Time","type":"DateTime"},{"structure_name":"core/com/zoho/crm/api/attachments/owner","name":"Modified_By","type":"core/com/zoho/crm/api/attachments/owner"},{"structure_name":"core/com/zoho/crm/api/attachments/owner","name":"Created_By","type":"core/com/zoho/crm/api/attachments/owner"},{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/user_groups/sources_wrapper":{"sources":{"structure_name":"core/com/zoho/crm/api/user_groups/sources","name":"sources","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/user_groups/info","name":"info","type":"core/com/zoho/crm/api/user_groups/info"}},"core/com/zoho/crm/api/mail_merge/download_mail_merge_wrapper":{"downloadMailMerge":{"structure_name":"core/com/zoho/crm/api/mail_merge/download_mail_merge","name":"download_mail_merge","type":"List"}},"core/com/zoho/crm/api/territories/response_handler":{"classes":["core/com/zoho/crm/api/territories/api_exception","core/com/zoho/crm/api/territories/response_wrapper","core/com/zoho/crm/api/territories/associated_users_count_wrapper"],"interface":true},"core/com/zoho/crm/api/blueprint/process_info":{"apiName":{"name":"api_name","type":"String"},"fieldName":{"name":"field_name","type":"String"},"escalation":{"structure_name":"core/com/zoho/crm/api/blueprint/escalation","name":"escalation","type":"core/com/zoho/crm/api/blueprint/escalation"},"continuous":{"name":"continuous","type":"Boolean"},"fieldLabel":{"name":"field_label","type":"String"},"name":{"name":"name","type":"String"},"isContinuous":{"name":"is_continuous","type":"Boolean"},"id":{"name":"id","type":"String"},"fieldValue":{"name":"field_value","type":"String"},"fieldId":{"name":"field_id","type":"Long"},"columnName":{"name":"column_name","type":"String"}},"core/com/zoho/crm/api/reschedule_history/reschedule_history":{"rescheduleReason":{"name":"Reschedule_Reason","type":"String"},"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"orchestration":{"name":"$orchestration","type":"Boolean"},"inMerge":{"name":"$in_merge","type":"Boolean"},"sharingPermission":{"name":"$sharing_permission","type":"String"},"rescheduledFrom":{"name":"Rescheduled_From","type":"DateTime"},"approved":{"name":"$approved","type":"Boolean"},"review":{"name":"$review","type":"Boolean"},"rescheduledTo":{"name":"Rescheduled_To","type":"DateTime"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/reschedule_history/user","name":"Modified_By","type":"core/com/zoho/crm/api/reschedule_history/user"},"state":{"name":"$state","type":"String"},"id":{"name":"id","type":"Long"},"reviewProcess":{"name":"$review_process","type":"Boolean"},"appointmentName":{"structure_name":"core/com/zoho/crm/api/reschedule_history/appointment_name","name":"Appointment_Name","type":"core/com/zoho/crm/api/reschedule_history/appointment_name"},"canvasId":{"name":"$canvas_id","type":"String"},"approval":{"structure_name":"core/com/zoho/crm/api/reschedule_history/approval","name":"$approval","type":"core/com/zoho/crm/api/reschedule_history/approval"},"editable":{"name":"$editable","type":"Boolean"},"rescheduledTime":{"name":"Rescheduled_Time","type":"DateTime"},"approvalState":{"name":"$approval_state","type":"String"},"currencySymbol":{"name":"$currency_symbol","type":"String"},"rescheduleNote":{"name":"Reschedule_Note","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/reschedule_history/user","name":"Created_By","type":"core/com/zoho/crm/api/reschedule_history/user"},"processFlow":{"name":"$process_flow","type":"Boolean"},"ziaVisions":{"name":"$zia_visions","type":"Boolean"},"name":{"name":"Name","type":"String"},"rescheduledBy":{"structure_name":"core/com/zoho/crm/api/reschedule_history/user","name":"Rescheduled_By","type":"core/com/zoho/crm/api/reschedule_history/user"}},"core/com/zoho/crm/api/fields/auto_number":{"startingNumberLength":{"name":"starting_number_length","type":"Integer"},"startNumber":{"name":"start_number","type":"Integer"},"prefix":{"name":"prefix","type":"String"},"suffix":{"name":"suffix","type":"String"}},"core/com/zoho/crm/api/roles/action_wrapper":{"roles":{"structure_name":"core/com/zoho/crm/api/roles/action_response","name":"roles","type":"List"}},"core/com/zoho/crm/api/users_unavailability/get_user_unavailability_param":{"filters":{"name":"filters","type":"String"},"includeInnerDetails":{"values":["user.zuid"],"name":"include_inner_details","type":"String"}},"core/com/zoho/crm/api/email_compose_meta/data_map":{"relayDomains":{"name":"relay_domains","type":"List"},"mergefieldsdata":{"name":"mergeFieldsData","type":"String"},"defaultFrom":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/default_form","name":"default_from","type":"core/com/zoho/crm/api/email_compose_meta/default_form"},"fromAddress":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/from_address","name":"from_address","type":"List"},"featuresAvailable":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/features_available","name":"features_available","type":"core/com/zoho/crm/api/email_compose_meta/features_available"},"user":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/user","name":"user","type":"core/com/zoho/crm/api/email_compose_meta/user"}},"core/com/zoho/crm/api/users_territories/transfer_and_delink":{"transferToUser":{"structure_name":"core/com/zoho/crm/api/users_territories/transfer_to_user","name":"transfer_to_user","type":"core/com/zoho/crm/api/users_territories/transfer_to_user"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/fields/lookup":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"queryDetails":{"structure_name":"core/com/zoho/crm/api/fields/query_details","name":"query_details","type":"core/com/zoho/crm/api/fields/query_details"},"id":{"name":"id","type":"Long"},"showFields":{"structure_name":"core/com/zoho/crm/api/fields/show_fields","name":"show_fields","type":"List"},"revalidateFilterDuringEdit":{"name":"revalidate_filter_during_edit","type":"Boolean"}},"core/com/zoho/crm/api/territory_users/response_handler":{"classes":["core/com/zoho/crm/api/territory_users/api_exception","core/com/zoho/crm/api/territory_users/response_wrapper"],"interface":true},"core/com/zoho/crm/api/privacy_configurable_apps/apps":{"name":{"name":"name","type":"String"}},"core/com/zoho/crm/api/user_type_users/response_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/user_type_users/users","name":"users","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/user_type_users/info","name":"info","type":"core/com/zoho/crm/api/user_type_users/info"}},"core/com/zoho/crm/api/service_preference/action_response":{"classes":["core/com/zoho/crm/api/service_preference/api_exception","core/com/zoho/crm/api/service_preference/success_response"],"interface":true},"core/com/zoho/crm/api/blueprint/module_fields":{"apiName":{"name":"api_name","type":"String"},"fieldLabel":{"name":"field_label","type":"String"},"id":{"name":"id","type":"Long"},"required":{"name":"required","type":"Boolean"}},"core/com/zoho/crm/api/portals/action_handler":{"classes":["core/com/zoho/crm/api/portals/api_exception","core/com/zoho/crm/api/portals/action_wrapper"],"interface":true},"core/com/zoho/crm/api/layouts/convert_mapping":{"salesorders":{"structure_name":"core/com/zoho/crm/api/layouts/minified_layout","name":"SalesOrders","type":"core/com/zoho/crm/api/layouts/minified_layout"},"invoices":{"structure_name":"core/com/zoho/crm/api/layouts/minified_layout","name":"Invoices","type":"core/com/zoho/crm/api/layouts/minified_layout"},"deals":{"structure_name":"core/com/zoho/crm/api/layouts/deal_layout_mapping","name":"Deals","type":"core/com/zoho/crm/api/layouts/deal_layout_mapping"},"accounts":{"structure_name":"core/com/zoho/crm/api/layouts/minified_layout","name":"Accounts","type":"core/com/zoho/crm/api/layouts/minified_layout"},"contacts":{"structure_name":"core/com/zoho/crm/api/layouts/minified_layout","name":"Contacts","type":"core/com/zoho/crm/api/layouts/minified_layout"}},"core/com/zoho/crm/api/tags/new_tag_request_wrapper":{"ids":{"name":"ids","type":"List"},"tags":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"tags","type":"List"},"overWrite":{"name":"over_write","type":"Boolean"}},"core/com/zoho/crm/api/deal_contact_roles/action_handler":{"classes":["core/com/zoho/crm/api/deal_contact_roles/action_wrapper","core/com/zoho/crm/api/deal_contact_roles/api_exception"],"interface":true},"core/com/zoho/crm/api/blueprint/action_handler":{"classes":["core/com/zoho/crm/api/blueprint/success_response","core/com/zoho/crm/api/blueprint/api_exception"],"interface":true},"core/com/zoho/crm/api/record/participants":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"invited":{"name":"invited","type":"Boolean"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"},"type":{"name":"type","type":"String"},"email":{"name":"Email","type":"String"},"participant":{"name":"participant","type":"String"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/layouts/minified_layout":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/pipeline/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","INVALID_DATA","INTERNAL_SERVER_ERROR","DUPLICATE_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"param_name","type":"String"},{"name":"maximum_length","type":"Integer"},{"name":"regex","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portals/owner":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/user_groups/sources_count_wrapper":{"sourcesCount":{"structure_name":"core/com/zoho/crm/api/user_groups/sources_count","name":"sources_count","type":"List"}},"core/com/zoho/crm/api/related_records/get_related_record_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"},"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/email_sharing/share_from_user":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"_type","type":"String"}},"core/com/zoho/crm/api/assignment_rules/get_assignment_rules_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/record/preference_field_matched_value":{"deals":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Deals","type":"List"},"accounts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Accounts","type":"List"},"contacts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Contacts","type":"List"}},"core/com/zoho/crm/api/notes/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"DateTime"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"}},"core/com/zoho/crm/api/service_preference/body_wrapper":{"servicePreferences":{"structure_name":"core/com/zoho/crm/api/service_preference/service_preference","name":"service_preferences","type":"core/com/zoho/crm/api/service_preference/service_preference"}},"core/com/zoho/crm/api/files/body_wrapper":{"file":{"name":"file","max-length":10,"type":"List","min-length":1}},"core/com/zoho/crm/api/variable_groups/minified_variable_group":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/privacy_preference/wrapper":{"privacypreference":{"structure_name":"core/com/zoho/crm/api/privacy_preference/privacy_preference","name":"privacyPreference","type":"List"}},"core/com/zoho/crm/api/user_groups/resource":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/backup/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/pipeline/action_handler":{"classes":["core/com/zoho/crm/api/pipeline/api_exception","core/com/zoho/crm/api/pipeline/transfer_pipeline_action_wrapper","core/com/zoho/crm/api/pipeline/action_wrapper"],"interface":true},"core/com/zoho/crm/api/mass_delete_cvid/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["record is deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/shift_hours/api_exception":{"code":{"values":["INVALID_DATA","DEPENDENT_FIELD_MISSING","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"},{"name":"details","type":"String"},{"structure_name":"core/com/zoho/crm/api/shift_hours/mandatory_details","name":"dependee","type":"core/com/zoho/crm/api/shift_hours/mandatory_details"},{"name":"resource_path_index","type":"Integer"},{"name":"minimum_length","type":"Integer"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/deal_contact_roles/get_associated_contact_roles_param":{"ids":{"name":"ids","type":"Long"},"fields":{"values":["id"],"name":"fields","type":"String","required":true}},"core/com/zoho/crm/api/holidays/get_holiday_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/inventory_templates/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/notes/action_response":{"classes":["core/com/zoho/crm/api/notes/api_exception","core/com/zoho/crm/api/notes/success_response"],"interface":true},"core/com/zoho/crm/api/related_records/update_related_record_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/users_unavailability/body_wrapper":{"usersUnavailability":{"structure_name":"core/com/zoho/crm/api/users_unavailability/users_unavailability","name":"users_unavailability","type":"List"}},"core/com/zoho/crm/api/pipeline/stages":{"from":{"name":"from","type":"Long"},"to":{"name":"to","type":"Long"}},"core/com/zoho/crm/api/record/get_records_param":{"cvid":{"name":"cvid","type":"String"},"endDateTime":{"name":"endDateTime","type":"DateTime"},"includeChild":{"name":"include_child","type":"String"},"uid":{"name":"uid","type":"String"},"approved":{"name":"approved","type":"String"},"perPage":{"name":"per_page","type":"Integer"},"startDateTime":{"name":"startDateTime","type":"DateTime"},"converted":{"name":"converted","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"ids":{"name":"ids","type":"String","required":true},"territoryId":{"name":"territory_id","type":"String"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"Integer"},"pageToken":{"name":"page_token","type":"String"},"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/record/record":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"}},"core/com/zoho/crm/api/contact_roles/delete_roles_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/record/get_record_param":{"cvid":{"name":"cvid","type":"String"},"uid":{"name":"uid","type":"String"},"onDemandProperties":{"name":"on_demand_properties","type":"String"},"approved":{"name":"approved","type":"String"},"startDateTime":{"name":"startDateTime","type":"DateTime"},"converted":{"name":"converted","type":"String"},"territoryId":{"name":"territory_id","type":"String"},"fields":{"name":"fields","type":"String"},"endDateTime":{"name":"endDateTime","type":"DateTime"},"includeChild":{"name":"include_child","type":"String"}},"core/com/zoho/crm/api/record/get_record_using_external_id_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"},"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/reschedule_history/user":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/mass_convert/related_module":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/deleted_records_handler":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/deleted_records_wrapper"],"interface":true},"core/com/zoho/crm/api/shift_hours/role":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/upload_photo_param":{"restrictTriggers":{"name":"restrict_triggers","type":"String"}},"core/com/zoho/crm/api/portal_user_type/response_wrapper":{"userType":{"structure_name":"core/com/zoho/crm/api/portal_user_type/user_type","name":"user_type","type":"List"}},"core/com/zoho/crm/api/email_related_records/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","the request does not contain any file","invalid file type"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/profiles/action_response":{"classes":["core/com/zoho/crm/api/profiles/success_response","core/com/zoho/crm/api/profiles/api_exception"],"interface":true},"core/com/zoho/crm/api/wizards/exempted_portal_user_type":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/update_record_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/record/get_records_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"},"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/record/consent":{"owner":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Owner","type":"core/com/zoho/crm/api/users/minified_user"},"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"mailSentTime":{"name":"Mail_Sent_Time","type":"DateTime"},"consentThrough":{"name":"Consent_Through","type":"String"},"consentDate":{"name":"Consent_Date","type":"Date"},"contactThroughEmail":{"name":"Contact_Through_Email","type":"Boolean"},"consentRemarks":{"name":"Consent_Remarks","type":"String"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"contactThroughSocial":{"name":"Contact_Through_Social","type":"Boolean"},"name":{"name":"name","type":"String"},"contactThroughPhone":{"name":"Contact_Through_Phone","type":"Boolean"},"createdTime":{"name":"Created_Time","type":"DateTime"},"contactThroughSurvey":{"name":"Contact_Through_Survey","type":"Boolean"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"},"dataProcessingBasis":{"name":"Data_Processing_Basis","type":"String"}},"core/com/zoho/crm/api/currencies/base_currency_action_response":{"classes":["core/com/zoho/crm/api/currencies/api_exception","core/com/zoho/crm/api/currencies/success_response"],"interface":true},"core/com/zoho/crm/api/portal_user_type/filters":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/send_mail/to":{"userName":{"name":"user_name","type":"String"},"email":{"regex":"[a-z]{7}[@]zoho[.]com","name":"email","type":"String"}},"core/com/zoho/crm/api/appointment_preference/action_wrapper":{"appointmentPreferences":{"structure_name":"core/com/zoho/crm/api/appointment_preference/action_response","name":"appointment_preferences","interface":true,"type":"core/com/zoho/crm/api/appointment_preference/action_response"}},"core/com/zoho/crm/api/territory_users/action_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/territory_users/action_response","name":"users","type":"List"}},"core/com/zoho/crm/api/pipeline/action_wrapper":{"pipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/action_response","name":"pipeline","type":"List"}},"core/com/zoho/crm/api/reschedule_history/get_appointments_rescheduled_history_param":{"perPage":{"name":"per_page","type":"Integer"},"sortOrder":{"name":"sort_order","type":"String"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"Integer"},"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/record/mass_update_success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"job_id","type":"String"},{"name":"id","type":"Long"},{"name":"Modified_Time","type":"DateTime"},{"name":"Created_Time","type":"DateTime"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"}],"name":"details","type":"Map"},"message":{"values":["record updated","mass update scheduled successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/image_upload":{"sequenceNumberS":{"name":"Sequence_Number__s","type":"Long"},"previewIdS":{"name":"Preview_Id__s","type":"String"},"sizeS":{"name":"Size__s","type":"String"},"fileIdS":{"name":"File_Id__s","type":"String"},"id":{"name":"id","type":"Long"},"delete1":{"name":"_delete","type":"String"},"descriptionS":{"name":"Description__s","type":"String"},"fileNameS":{"name":"File_Name__s","type":"String"},"stateS":{"name":"State__s","type":"String"}},"core/com/zoho/crm/api/roles/response_wrapper":{"roles":{"structure_name":"core/com/zoho/crm/api/roles/role","name":"roles","type":"List"}},"core/com/zoho/crm/api/record/delete_record_param":{"wfTrigger":{"name":"wf_trigger","type":"Boolean"}},"core/com/zoho/crm/api/profiles/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/business_hours/get_business_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/record/lead_converter":{"notifyLeadOwner":{"name":"notify_lead_owner","type":"Boolean"},"notifyNewEntityOwner":{"name":"notify_new_entity_owner","type":"Boolean"},"deals":{"structure_name":"core/com/zoho/crm/api/record/record","module":"Deals","name":"Deals","type":"core/com/zoho/crm/api/record/record"},"accounts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Accounts","type":"core/com/zoho/crm/api/record/record"},"carryOverTags":{"structure_name":"core/com/zoho/crm/api/record/carry_over_tags","name":"carry_over_tags","type":"core/com/zoho/crm/api/record/carry_over_tags"},"overwrite":{"name":"overwrite","type":"Boolean"},"contacts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Contacts","type":"core/com/zoho/crm/api/record/record"},"assignTo":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"assign_to","type":"core/com/zoho/crm/api/users/minified_user"}},"core/com/zoho/crm/api/currencies/base_currency_action_wrapper":{"baseCurrency":{"structure_name":"core/com/zoho/crm/api/currencies/base_currency_action_response","name":"base_currency","interface":true,"type":"core/com/zoho/crm/api/currencies/base_currency_action_response"}},"core/com/zoho/crm/api/associate_email/action_handler":{"classes":["core/com/zoho/crm/api/associate_email/action_wrapper","core/com/zoho/crm/api/associate_email/api_exception"],"interface":true},"core/com/zoho/crm/api/email_compose_meta/from_address":{"default1":{"values":[true],"name":"default","type":"utils/util/choice"},"id":{"name":"id","type":"Long"},"userName":{"name":"user_name","type":"String"},"type":{"name":"type","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/scoring_rules/response_handler":{"classes":["core/com/zoho/crm/api/scoring_rules/api_exception","core/com/zoho/crm/api/scoring_rules/response_wrapper"],"interface":true},"core/com/zoho/crm/api/share_records/action_handler":{"classes":["core/com/zoho/crm/api/share_records/action_wrapper","core/com/zoho/crm/api/share_records/api_exception"],"interface":true},"core/com/zoho/crm/api/fields/response_handler":{"classes":["core/com/zoho/crm/api/fields/api_exception","core/com/zoho/crm/api/fields/body_wrapper"],"interface":true},"core/com/zoho/crm/api/files/action_response":{"classes":["core/com/zoho/crm/api/files/success_response"],"interface":true},"core/com/zoho/crm/api/deal_contact_roles/data":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"contactRole":{"structure_name":"core/com/zoho/crm/api/deal_contact_roles/contact_role","name":"Contact_Role","type":"core/com/zoho/crm/api/deal_contact_roles/contact_role"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"}},"core/com/zoho/crm/api/record/action_handler":{"classes":["core/com/zoho/crm/api/record/action_wrapper","core/com/zoho/crm/api/record/api_exception"],"interface":true},"core/com/zoho/crm/api/related_lists/module_map":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portals/api_exception":{"code":{"values":["INVALID_DATA","JSON_PARSE_ERROR","MANDATORY_NOT_FOUND","PATTERN_NOT_MATCHED","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"maximum_length","type":"Integer"},{"name":"minimum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_change_owner/territory":{"id":{"name":"id","type":"Long"},"includeChild":{"name":"include_child","type":"Boolean"}},"core/com/zoho/crm/api/timelines/field_history":{"pickListValues":{"structure_name":"core/com/zoho/crm/api/timelines/picklist_detail","name":"pick_list_values","type":"List"},"apiName":{"name":"api_name","type":"String"},"dataType":{"name":"data_type","type":"String"},"fieldLabel":{"name":"field_label","type":"String"},"enableColourCode":{"name":"enable_colour_code","type":"Boolean"},"id":{"name":"id","type":"Long"},"value":{"structure_name":"core/com/zoho/crm/api/timelines/field_history_value","name":"_value","type":"core/com/zoho/crm/api/timelines/field_history_value"}},"core/com/zoho/crm/api/tags/record_action_wrapper":{"lockedCount":{"name":"locked_count","type":"Boolean"},"data":{"structure_name":"core/com/zoho/crm/api/tags/record_action_response","name":"data","type":"List"},"successCount":{"name":"success_count","type":"String"},"wfScheduler":{"name":"wf_scheduler","type":"Boolean"}},"core/com/zoho/crm/api/share_records/shared_through":{"entityName":{"name":"entity_name","type":"String"},"module":{"structure_name":"core/com/zoho/crm/api/share_records/module","name":"module","type":"core/com/zoho/crm/api/share_records/module"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/scoring_rules/role_request_wrapper":{"scoringRules":{"name":"scoring_rules","type":"List"}},"core/com/zoho/crm/api/field_map_dependency/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/deal_contact_roles/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/deal_contact_roles/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/related_lists/get_related_lists_param":{"module":{"name":"module","type":"String","required":true},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/variables/variable_group":{"apiName":{"name":"api_name","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/taxes/expected_field":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/entity_scores/api_exception":{"code":{"values":["INVALID_MODULE","REQUIRED_PARAM_MISSING","INVALID_REQUEST","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/user_type_users/response_handler":{"classes":["core/com/zoho/crm/api/user_type_users/response_wrapper","core/com/zoho/crm/api/user_type_users/api_exception"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/tags/response_wrapper":{"tags":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"tags","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/tags/info","name":"info","type":"core/com/zoho/crm/api/tags/info"}},"core/com/zoho/crm/api/users/tab":{"background":{"values":["#222222"],"name":"background","type":"utils/util/choice"},"fontColor":{"values":["#FFFFFF"],"name":"font_color","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_write/response_wrapper":{"classes":["core/com/zoho/crm/api/bulk_write/api_exception","core/com/zoho/crm/api/bulk_write/bulk_write_response"],"interface":true},"core/com/zoho/crm/api/territories/response_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/territories/territories","name":"territories","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/territories/info","name":"info","type":"core/com/zoho/crm/api/territories/info"}},"core/com/zoho/crm/api/users_transfer_delete/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","ID_ALREADY_DELETED","CANNOT_UPDATE_DELETED_USER","AUTHORIZATION_FAILED","PATTERN_NOT_MATCHED","INVALID_REQUEST","LICENSE_LIMIT_EXCEEDED","DUPLICATE_DATA","UNAPPROVABLE","EMAIL_UPDATE_NOT_ALLOWED","ID_ALREADY_DEACTIVATED","ID_ALREADY_ACTIVE","FEATURE_PERMISSION","OAUTH_SCOPE_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","EMAIL_UPDATE_NOT_ALOWED","INVALID_MODULE","BAD_REQUEST","NO_PERMISSION","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"id","type":"Long"},{"name":"email","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"owner_status","type":"String"}],"name":"details","type":"Map"},"message":{"values":["invalid data","required field not found","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","Please check whether the input values are correct","the id given seems to be invalid","Cannot add user under CRM Plus account. Kindly use CRMPlus URL to add user","Request exceeds your license limit. Need to upgrade in order to add","Failed to add user since same email id is already present","Email Id should not contain @skydesk.jp. Please choose a different email id","Invalid Email Id. Please choose a different email id","Cannot add user for CRMPlus account from CRM. Kindly add user through CRMPlus","Company Name is required","Error occurred in resending the invitation of CRMPLUS user in CRM account","Cannot update the time_zone of another User","Either trial has expired or user does not have sufficient privilege to perform this action","Error occurred while updating CRMPlus User in CRM Account","invalid_data","Deleted user cannot be updated","Re-invite is not allowed for a confirmed user","Cannot update email of a confirmed CRM User","User with same email id is already in CRM Plus","User is already deactivated","Primary Contact cannot be deactivated","User is already active","Share among Subordinates Feature is not available","Profile and Role cannot be Updated by the user.","the_id_given_seems_to_be_invalid","Primary contact cannot be deleted","User is already deleted","User does not have sufficient privilege to delete users","Cannot update email of a confirmed CRM User"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/holidays/action_handler":{"classes":["core/com/zoho/crm/api/holidays/api_exception","core/com/zoho/crm/api/holidays/action_wrapper"],"interface":true},"core/com/zoho/crm/api/appointment_preference/appointment_preference":{"dealRecordConfiguration":{"keys":[{"structure_name":"core/com/zoho/crm/api/appointment_preference/layout","name":"layout","type":"core/com/zoho/crm/api/appointment_preference/layout"},{"structure_name":"core/com/zoho/crm/api/appointment_preference/field_mappings","name":"field_mappings","type":"List"},{"name":"id","type":"Long"}],"name":"deal_record_configuration","type":"Map"},"whenAppointmentCompleted":{"values":["do_not_create_deal","create_deal"],"name":"when_appointment_completed","type":"utils/util/choice"},"allowBookingOutsideServiceAvailability":{"name":"allow_booking_outside_service_availability","type":"Boolean"},"allowBookingOutsideBusinesshours":{"name":"allow_booking_outside_businesshours","type":"Boolean"},"showJobSheet":{"name":"show_job_sheet","type":"Boolean"},"whenDurationExceeds":{"values":["ask_appointment_provider_to_complete","mark_as_complete","ask_appointment_provider_to_complete","mark_as_complete"],"name":"when_duration_exceeds","type":"utils/util/choice"}},"core/com/zoho/crm/api/wizards/transition":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/currencies/action_response":{"classes":["core/com/zoho/crm/api/currencies/api_exception","core/com/zoho/crm/api/currencies/success_response"],"interface":true},"core/com/zoho/crm/api/related_records/get_related_records_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"},"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/custom_views/get_custom_view_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/scoring_rules/action_response":{"classes":["core/com/zoho/crm/api/scoring_rules/success_response","core/com/zoho/crm/api/scoring_rules/api_exception"],"interface":true},"core/com/zoho/crm/api/tags/add_tags_param":{"overWrite":{"name":"over_write","type":"String"}},"core/com/zoho/crm/api/mass_change_owner/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/mass_change_owner/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/variables/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/bulk_read/success_response":{"code":{"values":["ADDED_SUCCESSFULLY"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"String"},{"name":"operation","type":"String"},{"values":["COMPLETED","IN PROGRESS","ADDED","FAILURE"],"name":"state","type":"utils/util/choice"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"created_time","type":"DateTime"}],"name":"details","type":"Map"},"message":{"values":["Added successfully."],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/field_map_dependency/get_map_dependencies_param":{"perPage":{"values":[-1,0,1,2],"name":"per_page","type":"Integer"},"module":{"name":"module","type":"String"},"page":{"values":[-1,0,1],"name":"page","type":"Integer"},"filters":{"values":["Leads"],"name":"filters","type":"String"},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/business_hours/update_business_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/tags/action_wrapper":{"tags":{"structure_name":"core/com/zoho/crm/api/tags/action_response","name":"tags","type":"List"}},"core/com/zoho/crm/api/record/remind_at":{"alarm":{"name":"ALARM","type":"String"}},"core/com/zoho/crm/api/users/shift":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/fields/email_parser":{"fieldsUpdateSupported":{"name":"fields_update_supported","type":"Boolean"},"recordOperationsSupported":{"name":"record_operations_supported","type":"Boolean"}},"core/com/zoho/crm/api/notes/response_handler":{"classes":["core/com/zoho/crm/api/notes/response_wrapper","core/com/zoho/crm/api/notes/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"owner_status","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/blueprint/lookup_field":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/related_lists/response_handler":{"classes":["core/com/zoho/crm/api/related_lists/response_wrapper","core/com/zoho/crm/api/related_lists/api_exception"],"interface":true},"core/com/zoho/crm/api/scoring_rules/signal_rule":{"score":{"name":"score","type":"Integer"},"id":{"name":"id","type":"String"},"signal":{"structure_name":"core/com/zoho/crm/api/scoring_rules/signal","name":"signal","type":"core/com/zoho/crm/api/scoring_rules/signal"}},"core/com/zoho/crm/api/appointment_preference/response_handler":{"classes":["core/com/zoho/crm/api/appointment_preference/api_exception","core/com/zoho/crm/api/appointment_preference/response_wrapper"],"interface":true},"core/com/zoho/crm/api/privacy_preference/config":{"tpt":{"structure_name":"core/com/zoho/crm/api/privacy_preference/tpt","name":"tpt","type":"List"},"section":{"structure_name":"core/com/zoho/crm/api/privacy_preference/section","name":"section","type":"List"},"zohoInteg":{"structure_name":"core/com/zoho/crm/api/privacy_preference/tpt","name":"zoho_integ","type":"List"}},"core/com/zoho/crm/api/notes/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/notes/note","name":"data","type":"List"}},"core/com/zoho/crm/api/modules/argument":{"name":{"name":"name","type":"String"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/holidays/business_holiday":{"date":{"name":"date","type":"Date"},"name":{"name":"name","max-length":80,"type":"String"},"type":{"values":["business_holiday"],"name":"type","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/operation_type":{"webUpdate":{"name":"web_update","type":"Boolean"},"webCreate":{"name":"web_create","type":"Boolean"},"apiUpdate":{"name":"api_update","type":"Boolean"},"apiCreate":{"name":"api_create","type":"Boolean"}},"core/com/zoho/crm/api/related_records/api_exception":{"code":{"values":["NO_PERMISSION","CANNOT_BE_UPDATED","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","INTERNAL_ERROR","BAD_REQUEST","OAUTH_SCOPE_MISMATCH","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"permissions","type":"List"},{"name":"id","type":"Long"},{"name":"param_name","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["invalid data","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","record not deleted","the related id given seems to be invalid","Internal server error occurred.","The relation name given seems to be invalid"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/email_templates/last_version_statistics":{"tracked":{"name":"tracked","type":"Integer"},"delivered":{"name":"delivered","type":"Integer"},"opened":{"name":"opened","type":"Integer"},"bounced":{"name":"bounced","type":"Integer"},"sent":{"name":"sent","type":"Integer"},"clicked":{"name":"clicked","type":"Integer"}},"core/com/zoho/crm/api/variables/response_handler":{"classes":["core/com/zoho/crm/api/variables/api_exception","core/com/zoho/crm/api/variables/response_wrapper"],"interface":true},"core/com/zoho/crm/api/related_lists/related_list":{"displayLabel":{"name":"display_label","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"String"},"customizeSort":{"name":"customize_sort","type":"Boolean"},"apiName":{"name":"api_name","type":"String"},"visible":{"name":"visible","type":"Boolean"},"module":{"structure_name":"core/com/zoho/crm/api/related_lists/module_map","name":"module","type":"core/com/zoho/crm/api/related_lists/module_map"},"type":{"name":"type","type":"String"},"connectedmodule":{"name":"connectedmodule","type":"String"},"linkingmodule":{"name":"linkingmodule","type":"String"},"customizeDisplayLabel":{"name":"customize_display_label","type":"Boolean"},"sortOrder":{"name":"sort_order","type":"String"},"name":{"name":"name","type":"String"},"action":{"name":"action","type":"String"},"sortBy":{"structure_name":"core/com/zoho/crm/api/related_lists/field","name":"sort_by","type":"core/com/zoho/crm/api/related_lists/field"},"id":{"name":"id","type":"Long"},"href":{"name":"href","type":"String"},"fields":{"structure_name":"core/com/zoho/crm/api/related_lists/field","name":"fields","type":"List"},"customizeFields":{"name":"customize_fields","type":"Boolean"}},"core/com/zoho/crm/api/deal_contact_roles/contact_role":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/scoring_rules/action_wrapper":{"scoringRules":{"structure_name":"core/com/zoho/crm/api/scoring_rules/action_response","name":"scoring_rules","max-length":100,"type":"List"}},"core/com/zoho/crm/api/associate_email/action_wrapper":{"emails":{"structure_name":"core/com/zoho/crm/api/associate_email/action_response","name":"Emails","type":"List"}},"core/com/zoho/crm/api/hipaa_compliance/response_wrapper":{"hipaaCompliance":{"structure_name":"core/com/zoho/crm/api/hipaa_compliance/hipaa_compliance","name":"hipaa_compliance","type":"core/com/zoho/crm/api/hipaa_compliance/hipaa_compliance"}},"core/com/zoho/crm/api/profiles/action_wrapper":{"profiles":{"structure_name":"core/com/zoho/crm/api/profiles/action_response","name":"profiles","type":"List"}},"core/com/zoho/crm/api/variables/variable":{"apiName":{"name":"api_name","type":"String"},"variableGroup":{"structure_name":"core/com/zoho/crm/api/variables/variable_group","name":"variable_group","type":"core/com/zoho/crm/api/variables/variable_group"},"name":{"name":"name","type":"String"},"description":{"name":"description","type":"String"},"readOnly":{"name":"read_only","type":"Boolean"},"source":{"name":"source","type":"String"},"id":{"name":"id","type":"Long"},"type":{"values":["text","integer","percent","double","currency","date","datetime","email","phone","website","textarea","checkbox","long"],"name":"type","type":"utils/util/choice"},"value":{"name":"value","type":"Object"}},"core/com/zoho/crm/api/shift_hours/break_custom_timing":{"breakTiming":{"name":"break_timing","type":"List"},"days":{"name":"days","type":"String"}},"core/com/zoho/crm/api/fiscal_year/body_wrapper":{"fiscalYear":{"structure_name":"core/com/zoho/crm/api/fiscal_year/year","name":"fiscal_year","type":"core/com/zoho/crm/api/fiscal_year/year"}},"core/com/zoho/crm/api/users_territories/action_handler":{"classes":["core/com/zoho/crm/api/users_territories/api_exception","core/com/zoho/crm/api/users_territories/action_wrapper"],"interface":true},"core/com/zoho/crm/api/holidays/resonse_handler":{"classes":["core/com/zoho/crm/api/holidays/api_exception","core/com/zoho/crm/api/holidays/response_wrapper"],"interface":true},"core/com/zoho/crm/api/holidays/update_holidays_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline":{"pipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/t_pipeline","name":"pipeline","type":"core/com/zoho/crm/api/pipeline/t_pipeline"},"stages":{"structure_name":"core/com/zoho/crm/api/pipeline/stages","name":"stages","type":"List"}},"core/com/zoho/crm/api/related_records/get_related_record_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"},"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/email_related_records/linked_record":{"module":{"structure_name":"core/com/zoho/crm/api/email_related_records/module","name":"module","type":"core/com/zoho/crm/api/email_related_records/module"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/fields/minified_field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/body_wrapper":{"process":{"name":"process","type":"List"},"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","max-length":100,"type":"List","min-length":1},"larId":{"name":"lar_id","type":"String"},"wfTrigger":{"name":"wf_trigger","type":"String"},"trigger":{"name":"trigger","type":"List"},"duplicateCheckFields":{"name":"duplicate_check_fields","type":"List"}},"core/com/zoho/crm/api/taxes/body_wrapper":{"orgTaxes":{"structure_name":"core/com/zoho/crm/api/taxes/org_tax","name":"org_taxes","type":"core/com/zoho/crm/api/taxes/org_tax"}},"core/com/zoho/crm/api/modules/body_wrapper":{"modules":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"modules","type":"List"}},"core/com/zoho/crm/api/inventory_templates/folder":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users/associated_group":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"description":{"name":"description","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portals_meta/modules":{"apiName":{"name":"api_name","type":"String"},"sharedType":{"name":"shared_type","type":"String"},"pluralLabel":{"name":"plural_label","type":"String"},"id":{"name":"id","type":"Long"},"filters":{"structure_name":"core/com/zoho/crm/api/portals_meta/filters","name":"filters","type":"List"},"layouts":{"structure_name":"core/com/zoho/crm/api/portals_meta/layouts","name":"layouts","type":"List"},"views":{"structure_name":"core/com/zoho/crm/api/portals_meta/views","name":"views","type":"List"}},"core/com/zoho/crm/api/blueprint/body_wrapper":{"blueprint":{"structure_name":"core/com/zoho/crm/api/blueprint/blue_print","name":"blueprint","type":"List"}},"core/com/zoho/crm/api/mass_convert/convert":{"relatedModules":{"structure_name":"core/com/zoho/crm/api/mass_convert/related_module","name":"related_modules","type":"List"},"applyAssignmentThreshold":{"name":"apply_assignment_threshold","type":"Boolean"},"deals":{"structure_name":"core/com/zoho/crm/api/record/record","module":"Deals","name":"Deals","type":"core/com/zoho/crm/api/record/record"},"ids":{"name":"ids","type":"List"},"carryOverTags":{"structure_name":"core/com/zoho/crm/api/mass_convert/move_attachments_to","name":"carry_over_tags","type":"List"},"assignTo":{"structure_name":"core/com/zoho/crm/api/mass_convert/assign_to","name":"assign_to","type":"core/com/zoho/crm/api/mass_convert/assign_to"},"portalUserType":{"structure_name":"core/com/zoho/crm/api/mass_convert/portal_user_type","name":"portal_user_type","type":"core/com/zoho/crm/api/mass_convert/portal_user_type"},"moveAttachmentsTo":{"structure_name":"core/com/zoho/crm/api/mass_convert/move_attachments_to","name":"move_attachments_to","type":"core/com/zoho/crm/api/mass_convert/move_attachments_to"}},"core/com/zoho/crm/api/taxes/response_wrapper":{"orgTaxes":{"structure_name":"core/com/zoho/crm/api/taxes/org_tax","name":"org_taxes","type":"core/com/zoho/crm/api/taxes/org_tax"}},"core/com/zoho/crm/api/entity_scores/get_module_param":{"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/record/update_record_using_external_id_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/files/upload_files_param":{"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/bulk_write/request_wrapper":{"resource":{"structure_name":"core/com/zoho/crm/api/bulk_write/resource","name":"resource","type":"List"},"ignoreEmpty":{"name":"ignore_empty","type":"Boolean"},"callback":{"structure_name":"core/com/zoho/crm/api/bulk_write/call_back","name":"callback","type":"core/com/zoho/crm/api/bulk_write/call_back"},"characterEncoding":{"name":"character_encoding","type":"String"},"operation":{"values":["insert","update","upsert"],"name":"operation","type":"utils/util/choice"}},"core/com/zoho/crm/api/currencies/response_handler":{"classes":["core/com/zoho/crm/api/currencies/api_exception","core/com/zoho/crm/api/currencies/body_wrapper"],"interface":true},"core/com/zoho/crm/api/share_records/share_record":{"shareRelatedRecords":{"name":"share_related_records","type":"Boolean"},"sharedThrough":{"structure_name":"core/com/zoho/crm/api/share_records/shared_through","name":"shared_through","type":"core/com/zoho/crm/api/share_records/shared_through"},"sharedTime":{"name":"shared_time","type":"DateTime"},"sharedBy":{"structure_name":"core/com/zoho/crm/api/users/users","name":"shared_by","type":"core/com/zoho/crm/api/users/users"},"permission":{"values":["full_access","read_only","read_write"],"name":"permission","type":"utils/util/choice"},"sharedWith":{"structure_name":"core/com/zoho/crm/api/users/users","name":"shared_with","type":"core/com/zoho/crm/api/users/users"},"type":{"values":["public","private"],"name":"type","type":"utils/util/choice"},"user":{"structure_name":"core/com/zoho/crm/api/users/users","name":"user","type":"core/com/zoho/crm/api/users/users"}},"core/com/zoho/crm/api/tags/update_tags_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/modules/sharing_properties":{"sharePermission":{"values":["full-access","read-write","read-only"],"name":"share_permission","type":"utils/util/choice"},"schedulerStatus":{"name":"scheduler_status","type":"String"},"sharePreferenceEnabled":{"name":"share_preference_enabled","type":"Boolean"}},"core/com/zoho/crm/api/record/mass_update_action_response":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/mass_update_success_response"],"interface":true},"core/com/zoho/crm/api/profiles/info":{"licenseLimit":{"name":"license_limit","type":"Integer"}},"core/com/zoho/crm/api/roles/response_handler":{"classes":["core/com/zoho/crm/api/roles/api_exception","core/com/zoho/crm/api/roles/response_wrapper"],"interface":true},"core/com/zoho/crm/api/custom_views/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/attachments/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","INVALID_REQUEST","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"values":["invalid"],"name":"related_status","type":"utils/util/choice"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_type","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/field_map_dependency/map_dependency":{"parent":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/parent","name":"parent","type":"core/com/zoho/crm/api/field_map_dependency/parent"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/pick_list_mapping","name":"pick_list_values","type":"List"},"internal":{"name":"internal","type":"Boolean"},"subModule":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/sub_module","name":"sub_module","type":"core/com/zoho/crm/api/field_map_dependency/sub_module"},"active":{"name":"active","type":"Boolean"},"id":{"name":"id","type":"Long"},"source":{"name":"source","type":"Integer"},"category":{"name":"category","type":"Integer"},"child":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/child","name":"child","type":"core/com/zoho/crm/api/field_map_dependency/child"}},"core/com/zoho/crm/api/custom_views/criteria":{"comparator":{"name":"comparator","type":"String"},"groupOperator":{"name":"group_operator","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/custom_views/field","name":"field","type":"core/com/zoho/crm/api/custom_views/field"},"value":{"name":"value","type":"Object"},"group":{"structure_name":"core/com/zoho/crm/api/custom_views/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/inventory_templates/inventory_template":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"lastUsageTime":{"name":"last_usage_time","type":"DateTime"},"editorMode":{"name":"editor_mode","type":"String"},"type":{"name":"type","type":"String"},"content":{"name":"content","type":"String"},"folder":{"structure_name":"core/com/zoho/crm/api/inventory_templates/folder","name":"folder","type":"core/com/zoho/crm/api/inventory_templates/folder"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"category":{"name":"category","type":"String"},"favorite":{"name":"favorite","type":"Boolean"}},"core/com/zoho/crm/api/variables/get_variable_by_api_name_param":{"group":{"name":"group","type":"String"}},"core/com/zoho/crm/api/custom_views/pin_unpin_fields":{"fields":{"structure_name":"core/com/zoho/crm/api/custom_views/pin_fields","name":"fields","type":"List"}},"core/com/zoho/crm/api/portals_meta/views":{"displayLabel":{"name":"display_label","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/record/wizard":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users_unavailability/action_wrapper":{"usersUnavailability":{"structure_name":"core/com/zoho/crm/api/users_unavailability/action_response","name":"users_unavailability","type":"List"}},"core/com/zoho/crm/api/query/body_wrapper":{"selectQuery":{"name":"select_query","type":"String"}},"core/com/zoho/crm/api/shift_hours/create_shifts_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/user_groups/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/custom_views/response_handler":{"classes":["core/com/zoho/crm/api/custom_views/api_exception","core/com/zoho/crm/api/custom_views/body_wrapper"],"interface":true},"core/com/zoho/crm/api/org/feature":{"name":{"name":"name","type":"String"},"resources":{"structure_name":"core/com/zoho/crm/api/org/resource","name":"resources","type":"List"}},"core/com/zoho/crm/api/modules/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","NOT_SUPPORTED","INVALID_DATA","INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_user_type/modules":{"apiName":{"name":"api_name","type":"String"},"permissions":{"structure_name":"core/com/zoho/crm/api/portal_user_type/permissions","name":"permissions","type":"core/com/zoho/crm/api/portal_user_type/permissions"},"sharedType":{"values":["private"],"name":"shared_type","type":"utils/util/choice"},"id":{"name":"id","type":"Long"},"pluralLabel":{"name":"plural_label","type":"String"},"filters":{"structure_name":"core/com/zoho/crm/api/portal_user_type/filters","name":"filters","type":"List"},"fields":{"structure_name":"core/com/zoho/crm/api/portal_user_type/fields","name":"fields","type":"List"},"layouts":{"structure_name":"core/com/zoho/crm/api/portal_user_type/layouts","name":"layouts","type":"List"},"views":{"structure_name":"core/com/zoho/crm/api/portal_user_type/views","name":"views","type":"core/com/zoho/crm/api/portal_user_type/views"}},"core/com/zoho/crm/api/files/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"name","type":"String"},{"name":"id","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/currencies/action_wrapper":{"currencies":{"structure_name":"core/com/zoho/crm/api/currencies/action_response","name":"currencies","type":"List"}},"core/com/zoho/crm/api/change_owner/mass_wrapper":{"owner":{"structure_name":"core/com/zoho/crm/api/change_owner/owner","name":"owner","type":"core/com/zoho/crm/api/change_owner/owner"},"relatedModules":{"structure_name":"core/com/zoho/crm/api/change_owner/related_modules","name":"related_modules","type":"List"},"ids":{"name":"ids","type":"List"},"notify":{"name":"notify","type":"Boolean"}},"core/com/zoho/crm/api/query/response_handler":{"classes":["core/com/zoho/crm/api/query/api_exception","core/com/zoho/crm/api/query/response_wrapper"],"interface":true},"core/com/zoho/crm/api/portal_invite/invite_users_param":{"userTypeId":{"name":"user_type_id","type":"Long","required":true},"language":{"values":["en_US","en_GB","bg_BG","zh_CN","zh_TW","hr_HR","ar_EG","in_ID","cs_CZ","da_DK","nl_NL","fr_FR","de_DE","hu_HU","","hi_IN","it_IT","ja_JP","pl_PL","pt_BR","pt_PT","ru_RU","es_ES","sv_SE","th_TH","tr_TR","vi_VN","ko_KR","iw_IL"],"name":"language","type":"String"},"type":{"values":["invite","reinvite"],"name":"type","type":"String","required":true}},"core/com/zoho/crm/api/currencies/format":{"thousandSeparator":{"values":["Comma","Space","Period","Space"],"name":"thousand_separator","type":"utils/util/choice"},"decimalPlaces":{"values":["0","2","3"],"name":"decimal_places","type":"utils/util/choice"},"decimalSeparator":{"values":["Period","Comma"],"name":"decimal_separator","type":"utils/util/choice"}},"core/com/zoho/crm/api/share_records/action_response":{"classes":["core/com/zoho/crm/api/share_records/success_response","core/com/zoho/crm/api/share_records/api_exception"],"interface":true},"core/com/zoho/crm/api/shift_hours/shift_custom_timing":{"days":{"name":"days","type":"String"},"shiftTiming":{"name":"shift_timing","type":"List"}},"core/com/zoho/crm/api/blueprint/module_mapping":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"fields":{"structure_name":"core/com/zoho/crm/api/blueprint/module_fields","name":"fields","type":"List"}},"core/com/zoho/crm/api/record/info":{"call":{"name":"call","type":"Boolean"},"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"DateTime"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"},"email":{"name":"email","type":"Boolean"}},"core/com/zoho/crm/api/assignment_rules/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","DUPLICATE_DATA","REQUIRED_PARAM_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"name","type":"String"},{"name":"param","type":"String"}],"name":"details","type":"Map"},"message":{"values":["the name given seems to be invalid","the id given seems to be invalid","the default_assignee given seems to be invalid","the module name given seems to be invalid","the given assignment rule name already exists","One of the expected parameter is missing"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/tags/existing_tag_request_wrapper":{"ids":{"name":"ids","type":"List"},"tags":{"structure_name":"core/com/zoho/crm/api/tags/existing_tag","name":"tags","type":"List"}},"core/com/zoho/crm/api/variables/get_variable_by_id_param":{"group":{"name":"group","type":"String"}},"core/com/zoho/crm/api/users_territories/validation_handler":{"classes":["core/com/zoho/crm/api/users_territories/api_exception","core/com/zoho/crm/api/users_territories/validation_wrapper"],"interface":true},"core/com/zoho/crm/api/tags/get_record_count_for_tag_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/user_groups/jobs":{"status":{"name":"Status","type":"String"}},"core/com/zoho/crm/api/territories/territories":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"permissionType":{"values":["read_write_delete","read_only"],"name":"permission_type","type":"utils/util/choice"},"manager":{"structure_name":"core/com/zoho/crm/api/territories/manager","name":"manager","type":"core/com/zoho/crm/api/territories/manager"},"description":{"name":"description","type":"String"},"accountRuleCriteria":{"structure_name":"core/com/zoho/crm/api/territories/criteria","name":"account_rule_criteria","type":"core/com/zoho/crm/api/territories/criteria"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"leadRuleCriteria":{"structure_name":"core/com/zoho/crm/api/territories/criteria","name":"lead_rule_criteria","type":"core/com/zoho/crm/api/territories/criteria"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"reportingTo":{"structure_name":"core/com/zoho/crm/api/territories/reporting_to","name":"reporting_to","type":"core/com/zoho/crm/api/territories/reporting_to"},"dealRuleCriteria":{"structure_name":"core/com/zoho/crm/api/territories/criteria","name":"deal_rule_criteria","type":"core/com/zoho/crm/api/territories/criteria"}},"core/com/zoho/crm/api/profiles/action_handler":{"classes":["core/com/zoho/crm/api/profiles/action_wrapper","core/com/zoho/crm/api/profiles/success_response","core/com/zoho/crm/api/profiles/api_exception"],"interface":true},"core/com/zoho/crm/api/hipaa_compliance/hipaa_compliance":{"restrictDataAccessThroughAPI":{"name":"restrict_data_access_through_api","type":"Boolean"},"enabledForModules":{"structure_name":"core/com/zoho/crm/api/hipaa_compliance/modules","name":"enabled_for_modules","type":"List"},"restrictToZohoApps":{"name":"restrict_to_zoho_apps","type":"Boolean"},"enabled":{"name":"enabled","type":"Boolean"},"restrictToThirdPartyApps":{"name":"restrict_to_third_party_apps","type":"List"},"restrictDataInExport":{"name":"restrict_data_in_export","type":"Boolean"}},"core/com/zoho/crm/api/timelines/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"values":["the related id given seems to be invalid","the module name given seems to be invalid","the relation name given seems to be invalid"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/profiles/section":{"name":{"name":"name","type":"String"},"categories":{"structure_name":"core/com/zoho/crm/api/profiles/category","name":"categories","type":"List"}},"core/com/zoho/crm/api/record/delete_record_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/bulk_read/job_detail":{"result":{"structure_name":"core/com/zoho/crm/api/bulk_read/result","name":"result","type":"core/com/zoho/crm/api/bulk_read/result"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"query":{"structure_name":"core/com/zoho/crm/api/bulk_read/query","name":"query","type":"core/com/zoho/crm/api/bulk_read/query"},"createdTime":{"name":"created_time","type":"DateTime"},"id":{"name":"id","type":"String"},"state":{"values":["COMPLETED","IN PROGRESS","ADDED","FAILURE"],"name":"state","type":"utils/util/choice"},"operation":{"name":"operation","type":"String"},"fileType":{"values":["csv"],"name":"file_type","type":"utils/util/choice"}},"core/com/zoho/crm/api/shift_hours/response_handler":{"classes":["core/com/zoho/crm/api/shift_hours/api_exception","core/com/zoho/crm/api/shift_hours/response_wrapper"],"interface":true},"core/com/zoho/crm/api/timelines/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"}},"core/com/zoho/crm/api/email_related_records/info":{"prevIndex":{"name":"prev_index","type":"String"},"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"nextIndex":{"name":"next_index","type":"String"}},"core/com/zoho/crm/api/portals_meta/related_lists":{"module":{"structure_name":"core/com/zoho/crm/api/portals_meta/modules","name":"module","type":"core/com/zoho/crm/api/portals_meta/modules"}},"core/com/zoho/crm/api/reschedule_history/action_response":{"classes":["core/com/zoho/crm/api/reschedule_history/api_exception","core/com/zoho/crm/api/reschedule_history/success_response"],"interface":true},"core/com/zoho/crm/api/deal_contact_roles/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"String"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"}},"core/com/zoho/crm/api/pipeline/body_wrapper":{"pipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/pipeline","name":"pipeline","type":"List"}},"core/com/zoho/crm/api/scoring_rules/delete_scoring_rules_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/users_transfer_delete/action_handler":{"classes":["core/com/zoho/crm/api/users_transfer_delete/api_exception","core/com/zoho/crm/api/users_transfer_delete/action_wrapper"],"interface":true},"core/com/zoho/crm/api/files/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","VIRUS_DETECTED","FILE_SIZE_MORE_THAN_ALLOWED_SIZE","failure_in_attachment_handling","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/action_response":{"classes":["core/com/zoho/crm/api/fields/api_exception","core/com/zoho/crm/api/fields/success"],"interface":true},"core/com/zoho/crm/api/attachments/response_handler":{"classes":["core/com/zoho/crm/api/attachments/response_wrapper","core/com/zoho/crm/api/attachments/file_body_wrapper","core/com/zoho/crm/api/attachments/api_exception"],"interface":true},"core/com/zoho/crm/api/tags/record_action_handler":{"classes":["core/com/zoho/crm/api/tags/api_exception","core/com/zoho/crm/api/tags/record_action_wrapper"],"interface":true},"core/com/zoho/crm/api/notifications/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/record/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/field_map_dependency/action_response":{"classes":["core/com/zoho/crm/api/field_map_dependency/api_exception","core/com/zoho/crm/api/field_map_dependency/success_response"],"interface":true},"core/com/zoho/crm/api/related_lists/get_related_list_param":{"module":{"name":"module","type":"String","required":true},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/users_territories/transfer_wrapper":{"transferAndDelink":{"structure_name":"core/com/zoho/crm/api/users_territories/transfer_and_delink","name":"transfer_and_delink","type":"List"}},"core/com/zoho/crm/api/mail_merge/action_response":{"classes":["core/com/zoho/crm/api/mail_merge/success_response"],"interface":true},"core/com/zoho/crm/api/from_addresses/api_exception":{"code":{"values":["INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/scoring_rules/field_rule":{"score":{"name":"score","type":"Integer"},"criteria":{"structure_name":"core/com/zoho/crm/api/scoring_rules/criteria","name":"criteria","type":"core/com/zoho/crm/api/scoring_rules/criteria"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/deal_contact_roles/response_handler":{"classes":["core/com/zoho/crm/api/deal_contact_roles/body_wrapper","core/com/zoho/crm/api/deal_contact_roles/api_exception"],"interface":true},"core/com/zoho/crm/api/user_groups/source":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mass_change_owner/body_wrapper":{"cvid":{"name":"cvid","type":"Long"},"owner":{"structure_name":"core/com/zoho/crm/api/mass_change_owner/owner","name":"owner","type":"core/com/zoho/crm/api/mass_change_owner/owner"},"territory":{"structure_name":"core/com/zoho/crm/api/mass_change_owner/territory","name":"territory","type":"core/com/zoho/crm/api/mass_change_owner/territory"}},"core/com/zoho/crm/api/roles/action_handler":{"classes":["core/com/zoho/crm/api/roles/api_exception","core/com/zoho/crm/api/roles/action_wrapper"],"interface":true},"core/com/zoho/crm/api/timelines/get_timelines_param":{"include":{"values":["extension","type"],"name":"include","type":"String"},"perPage":{"values":["100"],"name":"per_page","type":"String"},"sortOrder":{"values":["desc","asc"],"name":"sort_order","type":"String"},"sortBy":{"values":["audited_time"],"name":"sort_by","type":"String"},"filters":{"values":["200"],"name":"filters","type":"String"},"page":{"values":["1"],"name":"page","type":"String"},"pageToken":{"values":["11df637fbecf52dc6721f7cf588f4272d552eda3311af76764d4cda650a7b0e01ffc5cd572030fe293f5ea9d60a3c144869fe7eae4e2ac683c08cf2dda07ed56d3d5f9ce4e351049c24a4363c5771087ad78caa76984c0ca4a1b2264808735ea8035cca85aa72c9142808916935c4744"],"name":"page_token","type":"String"},"includeInnerDetails":{"values":["field_history.data_type","field_history.enable_colour_code","field_history.pick_list_values","field_history.field_label"],"name":"include_inner_details","type":"String"},"includeTimelineType":{"values":["signals"],"name":"include_timeline_type","type":"String"}},"core/com/zoho/crm/api/files/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/territories/deleted_associated_territories":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"},"deletedTime":{"name":"deleted_time","type":"DateTime"},"deletedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"deleted_by","type":"core/com/zoho/crm/api/users/minified_user"}},"core/com/zoho/crm/api/record/file_handler":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/success_response"],"interface":true},"core/com/zoho/crm/api/mass_delete_cvid/get_mass_delete_status_param":{"jobId":{"name":"job_id","type":"Long","required":true}},"core/com/zoho/crm/api/blueprint/field":{"apiName":{"name":"api_name","type":"String"},"webhook":{"name":"webhook","type":"Boolean"},"crypt":{"structure_name":"core/com/zoho/crm/api/blueprint/crypt","name":"crypt","type":"core/com/zoho/crm/api/blueprint/crypt"},"validationRule":{"name":"validation_rule","type":"String"},"tooltip":{"structure_name":"core/com/zoho/crm/api/blueprint/tool_tip","name":"tooltip","type":"core/com/zoho/crm/api/blueprint/tool_tip"},"quickSequenceNumber":{"name":"quick_sequence_number","type":"Long"},"jsonType":{"name":"json_type","type":"String"},"type":{"name":"_type","type":"String"},"layouts":{"structure_name":"core/com/zoho/crm/api/blueprint/layout","name":"layouts","type":"core/com/zoho/crm/api/blueprint/layout"},"mandatory":{"name":"mandatory","type":"Boolean"},"content":{"name":"content","type":"String"},"associationDetails":{"structure_name":"core/com/zoho/crm/api/blueprint/association_details","name":"association_details","type":"core/com/zoho/crm/api/blueprint/association_details"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/fields/pick_list_value","name":"pick_list_values","type":"List"},"fieldLabel":{"name":"field_label","type":"String"},"fieldReadOnly":{"name":"field_read_only","type":"Boolean"},"currency":{"structure_name":"core/com/zoho/crm/api/blueprint/currency","name":"currency","type":"core/com/zoho/crm/api/blueprint/currency"},"id":{"name":"id","type":"String"},"displayLabel":{"name":"display_label","type":"String"},"filterable":{"name":"filterable","type":"Boolean"},"lookup":{"structure_name":"core/com/zoho/crm/api/blueprint/module","name":"lookup","type":"core/com/zoho/crm/api/blueprint/module"},"personalityName":{"name":"personality_name","type":"String"},"visible":{"name":"visible","type":"Boolean"},"dataType":{"name":"data_type","type":"String"},"length":{"name":"length","type":"Integer"},"profiles":{"structure_name":"core/com/zoho/crm/api/blueprint/profile","name":"profiles","type":"List"},"pickListValuesSortedLexically":{"name":"pick_list_values_sorted_lexically","type":"Boolean"},"readOnly":{"name":"read_only","type":"Boolean"},"sortable":{"name":"sortable","type":"Boolean"},"historyTracking":{"name":"history_tracking","type":"Boolean"},"systemMandatory":{"name":"system_mandatory","type":"Boolean"},"autoNumber":{"structure_name":"core/com/zoho/crm/api/blueprint/auto_number","name":"auto_number","type":"core/com/zoho/crm/api/blueprint/auto_number"},"private1":{"structure_name":"core/com/zoho/crm/api/fields/private","name":"private","type":"core/com/zoho/crm/api/fields/private"},"customField":{"name":"custom_field","type":"Boolean"},"convertMapping":{"structure_name":"core/com/zoho/crm/api/blueprint/convert_mapping","name":"convert_mapping","type":"core/com/zoho/crm/api/blueprint/convert_mapping"},"decimalPlace":{"name":"decimal_place","type":"String"},"createdSource":{"name":"created_source","type":"String"},"multiModuleLookup":{"structure_name":"core/com/zoho/crm/api/fields/multi_module_lookup","name":"multi_module_lookup","type":"core/com/zoho/crm/api/fields/multi_module_lookup"},"external":{"structure_name":"core/com/zoho/crm/api/fields/external","name":"external","type":"core/com/zoho/crm/api/fields/external"},"displayType":{"values":[-1,2],"name":"display_type","type":"utils/util/choice"},"transitionSequence":{"name":"transition_sequence","type":"Integer"},"unique":{"structure_name":"core/com/zoho/crm/api/fields/unique","name":"unique","type":"core/com/zoho/crm/api/fields/unique"},"uiType":{"name":"ui_type","type":"Integer"},"viewType":{"structure_name":"core/com/zoho/crm/api/blueprint/view_type","name":"view_type","type":"core/com/zoho/crm/api/blueprint/view_type"},"formula":{"structure_name":"core/com/zoho/crm/api/blueprint/formula","name":"formula","type":"core/com/zoho/crm/api/blueprint/formula"},"multiselectlookup":{"structure_name":"core/com/zoho/crm/api/blueprint/multi_select_lookup","name":"multiselectlookup","type":"core/com/zoho/crm/api/blueprint/multi_select_lookup"},"columnName":{"name":"column_name","type":"String"}},"core/com/zoho/crm/api/portals/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/timelines/timeline":{"fieldHistory":{"structure_name":"core/com/zoho/crm/api/timelines/field_history","name":"field_history","type":"List"},"extension":{"name":"extension","type":"String"},"auditedTime":{"name":"audited_time","type":"DateTime"},"record":{"structure_name":"core/com/zoho/crm/api/timelines/record","name":"record","type":"core/com/zoho/crm/api/timelines/record"},"action":{"name":"action","type":"String"},"id":{"name":"id","type":"Long"},"source":{"name":"source","type":"String"},"type":{"name":"type","type":"String"},"doneBy":{"structure_name":"core/com/zoho/crm/api/timelines/name_id_structure","name":"done_by","type":"core/com/zoho/crm/api/timelines/name_id_structure"},"relatedRecord":{"structure_name":"core/com/zoho/crm/api/timelines/related_record","name":"related_record","type":"core/com/zoho/crm/api/timelines/related_record"},"automationDetails":{"structure_name":"core/com/zoho/crm/api/timelines/automation_detail","name":"automation_details","type":"core/com/zoho/crm/api/timelines/automation_detail"}},"core/com/zoho/crm/api/notifications/event":{"resourceId":{"name":"resource_id","type":"Long"},"resourceName":{"name":"resource_name","type":"String"},"resourceUri":{"name":"resource_uri","type":"String"},"channelExpiry":{"name":"channel_expiry","type":"DateTime"},"channelId":{"name":"channel_id","type":"String"}},"core/com/zoho/crm/api/tags/existing_tag":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/territories/api_exception":{"code":{"values":["DUPLICATE_DATA","INVALID_DATA","NOT_ALLOWED","INTERNAL_SERVER_ERROR","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"supported_values","type":"List"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/territories/delete_territories_param":{"ids":{"name":"ids","type":"Long"},"deletePreviousForecasts":{"name":"delete_previous_forecasts","type":"Boolean"}},"core/com/zoho/crm/api/fields/show_fields":{"showData":{"name":"show_data","type":"Boolean"},"field":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"field","type":"core/com/zoho/crm/api/fields/minified_field"}},"core/com/zoho/crm/api/roles/body_wrapper":{"roles":{"structure_name":"core/com/zoho/crm/api/roles/role","name":"roles","type":"List"}},"core/com/zoho/crm/api/download_attachments/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/entity_scores/entity_structure_group":{"classes":["core/com/zoho/crm/api/entity_scores/entity_structure_with_module","core/com/zoho/crm/api/entity_scores/entity_structure"],"interface":true},"core/com/zoho/crm/api/hipaa_compliance/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/send_mail/invalid_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/entity_scores/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"String"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"}},"core/com/zoho/crm/api/users/body_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/users/users","name":"users","type":"List"}},"core/com/zoho/crm/api/holidays/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["Holidays created successfully","Holidays updated successfully","Holidays deleted successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/tags/update_tag_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/isc_signature/signature":{"iscSignature":{"name":"isc_signature","type":"Object"}},"core/com/zoho/crm/api/territory_users/body_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/users/users","name":"users","type":"List"}},"core/com/zoho/crm/api/associate_email/attachments":{"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/custom_views/action_wrapper":{"customViews":{"structure_name":"core/com/zoho/crm/api/custom_views/action_response","name":"custom_views","type":"List"}},"core/com/zoho/crm/api/users_territories/validation":{"records":{"name":"records","type":"Boolean"},"name":{"name":"Name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/appointment_preference/body_wrapper":{"appointmentPreferences":{"structure_name":"core/com/zoho/crm/api/appointment_preference/appointment_preference","name":"appointment_preferences","type":"core/com/zoho/crm/api/appointment_preference/appointment_preference"}},"core/com/zoho/crm/api/change_owner/body_wrapper":{"owner":{"structure_name":"core/com/zoho/crm/api/change_owner/owner","name":"owner","type":"core/com/zoho/crm/api/change_owner/owner"},"relatedModules":{"structure_name":"core/com/zoho/crm/api/change_owner/related_modules","name":"related_modules","type":"List"},"notify":{"name":"notify","type":"Boolean"}},"core/com/zoho/crm/api/bulk_write/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/definition/definition":{"rootElementName":{"name":"root_element_name","type":"String"},"extradetails":{"name":"extraDetails","type":"Map"},"properties":{"structure_name":"core/com/zoho/crm/api/definition/property","name":"properties","type":"List"}},"core/com/zoho/crm/api/mail_merge/signers":{"actionType":{"values":["sign","approve"],"name":"action_type","type":"utils/util/choice"},"recipient":{"structure_name":"core/com/zoho/crm/api/mail_merge/address","name":"recipient","type":"core/com/zoho/crm/api/mail_merge/address"},"recipientName":{"name":"recipient_name","type":"String"}},"core/com/zoho/crm/api/territory_users/action_handler":{"classes":["core/com/zoho/crm/api/territory_users/api_exception","core/com/zoho/crm/api/territory_users/action_wrapper"],"interface":true},"core/com/zoho/crm/api/mail_merge/mail_merge":{"bccEmail":{"structure_name":"core/com/zoho/crm/api/mail_merge/address","name":"bcc_email","type":"List"},"ccEmail":{"structure_name":"core/com/zoho/crm/api/mail_merge/address","name":"cc_email","type":"List"},"subject":{"name":"subject","type":"String"},"fromAddress":{"structure_name":"core/com/zoho/crm/api/mail_merge/address","name":"from_address","type":"core/com/zoho/crm/api/mail_merge/address"},"attachmentName":{"name":"attachment_name","type":"String"},"mailMergeTemplate":{"structure_name":"core/com/zoho/crm/api/mail_merge/mail_merge_template","name":"mail_merge_template","type":"core/com/zoho/crm/api/mail_merge/mail_merge_template"},"message":{"name":"message","type":"String"},"type":{"values":["inline","attachment"],"name":"type","type":"utils/util/choice"},"toAddress":{"structure_name":"core/com/zoho/crm/api/mail_merge/address","name":"to_address","type":"List"}},"core/com/zoho/crm/api/record/search_records_param":{"cvid":{"name":"cvid","type":"String"},"approved":{"name":"approved","type":"String"},"perPage":{"name":"per_page","type":"Integer"},"phone":{"name":"phone","type":"String"},"converted":{"name":"converted","type":"String"},"criteria":{"name":"criteria","type":"String"},"page":{"name":"page","type":"Integer"},"fields":{"name":"fields","type":"String"},"word":{"name":"word","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/assignment_rules/response_handler":{"classes":["core/com/zoho/crm/api/assignment_rules/api_exception","core/com/zoho/crm/api/assignment_rules/response_wrapper"],"interface":true},"core/com/zoho/crm/api/mail_merge/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","INVALID_DATA"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"supported_values","type":"List"},{"name":"regex","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/user_groups/action_wrapper":{"userGroups":{"structure_name":"core/com/zoho/crm/api/user_groups/action_response","name":"user_groups","type":"List"}},"core/com/zoho/crm/api/change_owner/owner":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mail_merge/sign_action_response":{"classes":["core/com/zoho/crm/api/mail_merge/success_response"],"interface":true},"core/com/zoho/crm/api/email_compose_meta/data":{"data":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/data_map","name":"data","type":"List"}},"core/com/zoho/crm/api/contact_roles/action_wrapper":{"contactRoles":{"structure_name":"core/com/zoho/crm/api/contact_roles/action_response","name":"contact_roles","type":"List"}},"core/com/zoho/crm/api/user_type_users/api_exception":{"code":{"values":["INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/send_mail/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"message_id","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/share_records/action_wrapper":{"share":{"structure_name":"core/com/zoho/crm/api/share_records/action_response","name":"share","type":"List"}},"core/com/zoho/crm/api/users/users":{"country":{"name":"country","type":"String"},"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy17":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"decimalSeparator":{"values":["Comma","Period"],"name":"decimal_separator","type":"utils/util/choice"},"dateFormat":{"values":["MMM d, yyyy"],"name":"date_format","type":"utils/util/choice"},"numberSeparator":{"values":["Space"],"name":"number_separator","type":"utils/util/choice"},"language":{"name":"language","type":"String"},"rtlEnabled":{"name":"rtl_enabled","type":"Boolean"},"telephonyEnabled":{"name":"telephony_enabled","type":"Boolean"},"microsoft":{"name":"microsoft","type":"Boolean"},"sandboxdeveloper":{"name":"sandboxDeveloper","type":"Boolean"},"isonline":{"name":"Isonline","type":"Boolean"},"nextShift":{"structure_name":"core/com/zoho/crm/api/users/shift","name":"$next_shift","type":"core/com/zoho/crm/api/users/shift"},"ntcNotificationType":{"name":"ntc_notification_type","type":"List"},"createdTime":{"name":"created_time","type":"DateTime"},"id":{"name":"id","type":"Long"},"state":{"name":"state","type":"String"},"personalAccount":{"name":"personal_account","type":"Boolean"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"},"fax":{"name":"fax","type":"String"},"reportingTo":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Reporting_To","type":"core/com/zoho/crm/api/users/minified_user"},"zip":{"name":"zip","type":"String"},"offset":{"name":"offset","type":"Integer"},"imapStatus":{"name":"imap_status","type":"Boolean"},"profile":{"structure_name":"core/com/zoho/crm/api/users/profile","name":"profile","type":"core/com/zoho/crm/api/users/profile"},"sortOrderPreference":{"name":"sort_order_preference","type":"String"},"timeZone":{"name":"time_zone","type":"TimeZone"},"customizeInfo":{"structure_name":"core/com/zoho/crm/api/users/customize_info","name":"customize_info","type":"core/com/zoho/crm/api/users/customize_info"},"zuid":{"name":"zuid","type":"String"},"firstName":{"regex":"[A-Za-z0-9]","name":"first_name","max-length":50,"type":"String"},"ezuid":{"name":"ezuid","type":"String"},"phone":{"name":"phone","type":"String"},"dob":{"name":"dob","type":"Date"},"name":{"name":"name","type":"String"},"status":{"name":"status","type":"String"},"lastName":{"regex":"[A-Za-z0-9]","name":"last_name","max-length":50,"type":"String"},"createdTime9":{"name":"Created_Time","type":"DateTime"},"role":{"structure_name":"core/com/zoho/crm/api/users/role","name":"role","type":"core/com/zoho/crm/api/users/role"},"city":{"name":"city","type":"String"},"signature":{"name":"signature","type":"String"},"ntcEnabled":{"name":"ntc_enabled","type":"Boolean"},"countryLocale":{"name":"country_locale","type":"String"},"locale":{"name":"locale","type":"String"},"imageLink":{"name":"image_link","type":"String"},"currentShift":{"structure_name":"core/com/zoho/crm/api/users/shift","name":"$current_shift","type":"core/com/zoho/crm/api/users/shift"},"street":{"name":"street","type":"String"},"sortOrderPreferenceS":{"name":"sort_order_preference__s","type":"String"},"alias":{"name":"alias","type":"String"},"currency":{"name":"Currency","type":"String"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"theme":{"structure_name":"core/com/zoho/crm/api/users/theme","name":"theme","type":"core/com/zoho/crm/api/users/theme"},"nameFormatS":{"values":["Salutation,First Name,Last Name","Saluation,Last Name,First Name","First Name,Last Name,Saluation"],"name":"name_format__s","type":"utils/util/choice"},"email":{"regex":"[a-z0-9]{9}[@][a-z0-9]{5}[.]com","name":"email","type":"String"},"statusReasonS":{"name":"status_reason__s","type":"String"},"website":{"regex":"[a-z0-9]{5}[.]com","name":"website","type":"String"},"mobile":{"name":"mobile","type":"String"},"fullName":{"name":"full_name","type":"String"},"confirm":{"name":"confirm","type":"Boolean"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"timeFormat":{"values":["HH:mm","hh:mm a"],"name":"time_format","type":"utils/util/choice"},"shiftEffectiveFrom":{"name":"$shift_effective_from","type":"Object"},"category":{"name":"category","type":"String"},"defaultTabGroup":{"name":"default_tab_group","type":"String"}},"core/com/zoho/crm/api/related_records/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"External_Deal_ID","type":"String"}],"name":"details","type":"Map"},"message":{"values":["relation added","relation removed"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_read/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/bulk_read/job_detail","name":"data","type":"List"}},"core/com/zoho/crm/api/record/record_count_param":{"phone":{"name":"phone","type":"String"},"criteria":{"name":"criteria","type":"String"},"word":{"name":"word","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/modules/response_wrapper":{"modules":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"modules","type":"List"}},"core/com/zoho/crm/api/wizards/wizard":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"module":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"module","type":"core/com/zoho/crm/api/modules/modules"},"profiles":{"structure_name":"core/com/zoho/crm/api/profiles/profile","name":"profiles","type":"List"},"active":{"name":"active","type":"Boolean"},"parentWizard":{"structure_name":"core/com/zoho/crm/api/wizards/wizard","name":"parent_wizard","type":"core/com/zoho/crm/api/wizards/wizard"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"exemptedPortalUserTypes":{"structure_name":"core/com/zoho/crm/api/wizards/exempted_portal_user_type","name":"exempted_portal_user_types","type":"List"},"draft":{"name":"draft","type":"Boolean"},"portalUserTypes":{"structure_name":"core/com/zoho/crm/api/wizards/portal_user_type","name":"portal_user_types","type":"List"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"containers":{"structure_name":"core/com/zoho/crm/api/wizards/container","name":"containers","type":"List"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/reschedule_history/appointment_name":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/email_related_records/response_wrapper":{"emails":{"structure_name":"core/com/zoho/crm/api/email_related_records/email","name":"Emails","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/email_related_records/info","name":"info","type":"core/com/zoho/crm/api/email_related_records/info"}},"core/com/zoho/crm/api/user_groups/success_response":{"code":{"values":["SUCCESS","SCHEDULED"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mail_merge/sign_mail_merge":{"signers":{"structure_name":"core/com/zoho/crm/api/mail_merge/signers","name":"signers","type":"List"},"fileName":{"name":"file_name","max-length":255,"type":"String"},"mailMergeTemplate":{"structure_name":"core/com/zoho/crm/api/mail_merge/mail_merge_template","name":"mail_merge_template","type":"core/com/zoho/crm/api/mail_merge/mail_merge_template"},"signInOrder":{"name":"sign_in_order","type":"Boolean"}},"core/com/zoho/crm/api/associate_email/available":{"linkedRecord":{"structure_name":"core/com/zoho/crm/api/associate_email/linked_record","name":"linked_record","type":"core/com/zoho/crm/api/associate_email/linked_record"},"record":{"structure_name":"core/com/zoho/crm/api/associate_email/record","name":"record","type":"core/com/zoho/crm/api/associate_email/record"},"available":{"name":"available","type":"Boolean"}},"core/com/zoho/crm/api/variables/action_response":{"classes":["core/com/zoho/crm/api/variables/api_exception","core/com/zoho/crm/api/variables/success_response"],"interface":true},"core/com/zoho/crm/api/territories/action_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/territories/action_response","name":"territories","type":"List"}},"core/com/zoho/crm/api/tags/remove_tags_from_multiple_records_param":{"ids":{"name":"ids","type":"String","required":true}},"core/com/zoho/crm/api/hipaa_compliance/action_handler":{"classes":["core/com/zoho/crm/api/hipaa_compliance/api_exception","core/com/zoho/crm/api/hipaa_compliance/success_response"],"interface":true},"core/com/zoho/crm/api/tags/record_success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"structure_name":"core/com/zoho/crm/api/tags/record_detail_tag","name":"tags","type":"List"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/territories/deleted_associated_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/territories/deleted_associated_territories","name":"territories","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/territories/info","name":"info","type":"core/com/zoho/crm/api/territories/info"}},"core/com/zoho/crm/api/pipeline/response_handler":{"classes":["core/com/zoho/crm/api/pipeline/body_wrapper","core/com/zoho/crm/api/pipeline/api_exception"],"interface":true},"core/com/zoho/crm/api/notifications/api_exception":{"code":{"values":["NOT_SUBSCRIBED","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portals_meta/layouts":{"displayLabel":{"name":"display_label","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mass_delete_cvid/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/mass_delete_cvid/status","name":"data","type":"List"}},"core/com/zoho/crm/api/wizards/button_background":{"buttonBackground":{"name":"button_background","type":"List"}},"core/com/zoho/crm/api/users/theme":{"newBackground":{"name":"new_background","type":"String"},"normalTab":{"structure_name":"core/com/zoho/crm/api/users/tab","name":"normal_tab","type":"core/com/zoho/crm/api/users/tab"},"background":{"values":["#F3F0EB"],"name":"background","type":"utils/util/choice"},"screen":{"values":["fixed"],"name":"screen","type":"utils/util/choice"},"type":{"name":"type","type":"String"},"selectedTab":{"structure_name":"core/com/zoho/crm/api/users/tab","name":"selected_tab","type":"core/com/zoho/crm/api/users/tab"}},"core/com/zoho/crm/api/pipeline/action_response":{"classes":["core/com/zoho/crm/api/pipeline/api_exception","core/com/zoho/crm/api/pipeline/success_response"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/create_map_dependency_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/fiscal_year/action_handler":{"classes":["core/com/zoho/crm/api/fiscal_year/api_exception","core/com/zoho/crm/api/fiscal_year/action_wrapper"],"interface":true},"core/com/zoho/crm/api/definition/property":{"displayLabel":{"name":"display_label","type":"String"},"allowedValues":{"name":"allowed_values","type":"List"},"regex":{"name":"regex","type":"String"},"apiName":{"name":"api_name","type":"String"},"fieldLabel":{"name":"field_label","type":"String"},"dataType":{"name":"data_type","type":"String"},"uiType":{"name":"ui_type","type":"Integer"},"length":{"name":"length","type":"Integer"},"readOnly":{"name":"read_only","type":"Boolean"},"availableInUserLayout":{"name":"available_in_user_layout","type":"Boolean"},"required":{"name":"required","type":"Boolean"},"properties":{"structure_name":"core/com/zoho/crm/api/definition/minified_property","name":"properties","type":"List"}},"core/com/zoho/crm/api/users_transfer_delete/response_handler":{"classes":["core/com/zoho/crm/api/users_transfer_delete/response_wrapper","core/com/zoho/crm/api/users_transfer_delete/api_exception"],"interface":true},"core/com/zoho/crm/api/share_records/api_exception":{"code":{"values":["BAD_REQUEST","INVALID_MODULE","SHARE_LIMIT_EXCEEDED","OAUTH_SCOPE_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","DUPLICATE_DATA","LIMIT_EXCEEDED","MANDATORY_NOT_FOUND","INVALID_DATA","ENTITY_ID_INVALID","NO_PERMISSION","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"permissions","type":"List"},{"structure_name":"core/com/zoho/crm/api/share_records/dependee","name":"dependee","type":"core/com/zoho/crm/api/share_records/dependee"},{"structure_name":"core/com/zoho/crm/api/share_records/dependee","name":"ambiguity_due_to","type":"List"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["Scheduler is running","cannot share to the user","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","record not deleted","the related id given seems to be invalid","The relation name given seems to be invalid.","invalid oauth scope to access this URL","Please check if the URL trying to access is a correct one.","Permission is invalid","record is already visible to the user.","Cannot share a record to more than 10 users.","No sharing through this record is available to revoke.","ENTITY_ID_INVALID"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/send_mail/data_subject_request":{"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/scoring_rules/criteria":{"comparator":{"name":"comparator","type":"String"},"groupOperator":{"name":"group_operator","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/scoring_rules/field","name":"field","type":"core/com/zoho/crm/api/scoring_rules/field"},"value":{"name":"value","type":"Object"},"group":{"structure_name":"core/com/zoho/crm/api/scoring_rules/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/shift_hours/break_hours":{"sameAsEveryday":{"name":"same_as_everyday","type":"Boolean"},"id":{"name":"id","type":"Long"},"dailyTiming":{"name":"daily_timing","type":"List"},"breakDays":{"name":"break_days","type":"List"},"customTiming":{"structure_name":"core/com/zoho/crm/api/shift_hours/break_custom_timing","name":"custom_timing","type":"List"}},"core/com/zoho/crm/api/related_records/get_related_records_using_external_id_param":{"perPage":{"name":"per_page","type":"Integer"},"page":{"name":"page","type":"Integer"},"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/email_templates/get_email_templates_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/record/territory":{"assignedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"$assigned_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"Name","type":"String"},"assigned":{"name":"$assigned","type":"String"},"id":{"name":"id","type":"Long"},"assignedTime":{"name":"$assigned_time","type":"DateTime"}},"core/com/zoho/crm/api/privacy_preference/tpt":{"name":{"name":"name","type":"String"},"issupported":{"name":"isSupported","type":"String"},"isenabled":{"name":"isEnabled","type":"String"}},"core/com/zoho/crm/api/shift_hours/action_handler":{"classes":["core/com/zoho/crm/api/shift_hours/api_exception","core/com/zoho/crm/api/shift_hours/action_wrapper"],"interface":true},"core/com/zoho/crm/api/shift_hours/holidays":{"date":{"name":"date","type":"Date"},"year":{"name":"year","type":"Integer"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/wizards/actions":{"exemptedProfiles":{"structure_name":"core/com/zoho/crm/api/profiles/profile","name":"exempted_profiles","type":"List"},"segment":{"structure_name":"core/com/zoho/crm/api/wizards/segment","name":"segment","type":"core/com/zoho/crm/api/wizards/segment"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"fields":{"structure_name":"core/com/zoho/crm/api/fields/fields","name":"fields","type":"core/com/zoho/crm/api/fields/fields"},"value":{"name":"value","type":"Object"}},"core/com/zoho/crm/api/blueprint/module":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"module":{"name":"module","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/email_compose_meta/default_form":{"default1":{"name":"default","type":"Boolean"},"userName":{"name":"user_name","type":"String"},"type":{"name":"type","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/org/response_wrapper":{"org":{"structure_name":"core/com/zoho/crm/api/org/org","name":"org","type":"List"}},"core/com/zoho/crm/api/business_hours/action_handler":{"classes":["core/com/zoho/crm/api/business_hours/api_exception","core/com/zoho/crm/api/business_hours/action_wrapper"],"interface":true},"core/com/zoho/crm/api/modules/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/custom_views/shared_to":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"values":["users","roles","groups","territories"],"name":"type","type":"utils/util/choice"},"subordinates":{"name":"subordinates","type":"Boolean"}},"core/com/zoho/crm/api/related_records/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/record/info","name":"info","type":"core/com/zoho/crm/api/record/info"}},"core/com/zoho/crm/api/related_records/delete_related_record_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/record/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/record/info","name":"info","type":"core/com/zoho/crm/api/record/info"}},"core/com/zoho/crm/api/record/get_deleted_records_param":{"perPage":{"name":"per_page","type":"Integer"},"page":{"name":"page","type":"Integer"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/modules/minified_module":{"apiName":{"name":"api_name","type":"String"},"module":{"name":"module","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/profiles/default_view":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/profiles/minified_profile":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"delete1":{"name":"_delete","type":"Boolean"}},"core/com/zoho/crm/api/backup/urls_wrapper":{"urls":{"structure_name":"core/com/zoho/crm/api/backup/urls","name":"urls","type":"core/com/zoho/crm/api/backup/urls"}},"core/com/zoho/crm/api/portal_user_type/user_type":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"personalityModule":{"structure_name":"core/com/zoho/crm/api/portal_user_type/personality_module","name":"personality_module","type":"core/com/zoho/crm/api/portal_user_type/personality_module"},"createdBy":{"structure_name":"core/com/zoho/crm/api/portal_user_type/owner","name":"created_by","type":"core/com/zoho/crm/api/portal_user_type/owner"},"default1":{"name":"default","type":"Boolean"},"name":{"name":"name","type":"String"},"noOfUsers":{"name":"no_of_users","type":"Integer"},"createdTime":{"name":"created_time","type":"DateTime"},"active":{"name":"active","type":"Boolean"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/portal_user_type/owner","name":"modified_by","type":"core/com/zoho/crm/api/portal_user_type/owner"},"id":{"name":"id","type":"Long"},"modules":{"structure_name":"core/com/zoho/crm/api/portal_user_type/modules","name":"modules","type":"List"}},"core/com/zoho/crm/api/associate_email/module_map":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/custom_views/pin_fields":{"apiName":{"name":"api_name","type":"String"},"pin":{"values":[false],"name":"_pin","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/currency":{"roundingOption":{"values":["normal","round_off","round_up","round_down"],"name":"rounding_option","type":"utils/util/choice"},"precision":{"name":"precision","type":"Integer"}},"core/com/zoho/crm/api/notes/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","NO_PERMISSION","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INTERNAL_ERROR","NOT_SUPPORTED","REQUIRED_PARAM_MISSING","INTERNAL_SERVER_ERROR","INVALID_MODULE","BAD_REQUEST","OAUTH_SCOPE_MISMATCH","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"String"},{"name":"api_name","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"permissions","type":"List"},{"name":"param","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"param_name","type":"String"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["record not deleted","required field not found","invalid data","One of the expected parameter is missing","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","the id given seems to be invalid","One of the expected parameter is missing","Internal server error occurred.","the module name given seems to be invalid"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fiscal_year/action_response":{"classes":["core/com/zoho/crm/api/fiscal_year/api_exception","core/com/zoho/crm/api/fiscal_year/success_response"],"interface":true},"core/com/zoho/crm/api/user_groups/response_wrapper":{"userGroups":{"structure_name":"core/com/zoho/crm/api/user_groups/groups","name":"user_groups","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/user_groups/info","name":"info","type":"core/com/zoho/crm/api/user_groups/info"}},"core/com/zoho/crm/api/related_records/delete_related_records_using_external_id_param":{"ids":{"name":"ids","type":"String","required":true}},"core/com/zoho/crm/api/related_records/delink_record_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/share_records/delete_action_response":{"classes":["core/com/zoho/crm/api/share_records/success_response","core/com/zoho/crm/api/share_records/api_exception"],"interface":true},"core/com/zoho/crm/api/attachments/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/attachments/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/notifications/response_wrapper":{"watch":{"structure_name":"core/com/zoho/crm/api/notifications/notification","name":"watch","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/notifications/info","name":"info","type":"core/com/zoho/crm/api/notifications/info"}},"core/com/zoho/crm/api/mail_merge/address_value_map":{"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/modules/modules":{"relatedListProperties":{"structure_name":"core/com/zoho/crm/api/modules/related_list_properties","name":"related_list_properties","type":"core/com/zoho/crm/api/modules/related_list_properties"},"modifiedTime":{"name":"modified_time","type":"DateTime"},"apiName":{"name":"api_name","type":"String"},"trackCurrentData":{"name":"track_current_data","type":"Boolean"},"webLink":{"name":"web_link","type":"String"},"businessCardFields":{"name":"business_card_fields","type":"List"},"moduleName":{"name":"module_name","type":"String"},"relatedLists":{"structure_name":"core/com/zoho/crm/api/related_lists/related_list","name":"related_lists","type":"List"},"defaultMappingFields":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"default_mapping_fields","type":"List"},"feedsRequired":{"name":"feeds_required","type":"Boolean"},"customView":{"structure_name":"core/com/zoho/crm/api/custom_views/custom_view","name":"custom_view","type":"core/com/zoho/crm/api/custom_views/custom_view"},"layouts":{"structure_name":"core/com/zoho/crm/api/layouts/layouts","name":"layouts","type":"List"},"webformSupported":{"name":"webform_supported","type":"Boolean"},"id":{"name":"id","type":"Long"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"globalSearchSupported":{"name":"global_search_supported","type":"Boolean"},"visible":{"name":"visible","type":"Boolean"},"visibility":{"name":"visibility","type":"Integer"},"profiles":{"structure_name":"core/com/zoho/crm/api/profiles/minified_profile","name":"profiles","type":"List"},"filterStatus":{"name":"filter_status","type":"Boolean"},"pluralLabel":{"name":"plural_label","type":"String"},"businessCardFieldLimit":{"name":"business_card_field_limit","type":"Integer"},"onDemandProperties":{"name":"$on_demand_properties","type":"List"},"viewable":{"name":"viewable","type":"Boolean"},"perPage":{"name":"per_page","type":"Integer"},"ziaView":{"name":"zia_view","type":"Boolean"},"displayField":{"name":"display_field","type":"String"},"triggersSupported":{"name":"triggers_supported","type":"Boolean"},"fields":{"structure_name":"core/com/zoho/crm/api/modules/module_fields","name":"fields","type":"List"},"kanbanView":{"name":"kanban_view","type":"Boolean"},"searchLayoutFields":{"name":"search_layout_fields","type":"List"},"status":{"name":"status","type":"String"},"fieldStates":{"name":"$field_states","type":"List"},"generatedType":{"values":["default","web","custom","linking"],"name":"generated_type","type":"utils/util/choice"},"emailParserSupported":{"name":"email_parser_supported","type":"Boolean"},"arguments32":{"structure_name":"core/com/zoho/crm/api/modules/argument","name":"arguments","type":"List"},"deletable":{"name":"deletable","type":"Boolean"},"activityBadge":{"values":["Enabled","Disabled"],"name":"activity_badge","type":"utils/util/choice"},"description":{"name":"description","max-length":255,"type":"String"},"scoringSupported":{"name":"scoring_supported","type":"Boolean"},"filterSupported":{"name":"filter_supported","type":"Boolean"},"creatable":{"name":"creatable","type":"Boolean"},"kanbanViewSupported":{"name":"kanban_view_supported","type":"Boolean"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"showAsTab":{"name":"show_as_tab","type":"Boolean"},"isblueprintsupported":{"name":"isBlueprintSupported","type":"Boolean"},"lookupFieldProperties":{"structure_name":"core/com/zoho/crm/api/modules/lookup_field_properties","name":"lookup_field_properties","type":"core/com/zoho/crm/api/modules/lookup_field_properties"},"convertable":{"name":"convertable","type":"Boolean"},"editable":{"name":"editable","type":"Boolean"},"quickCreate":{"name":"quick_create","type":"Boolean"},"presenceSubMenu":{"name":"presence_sub_menu","type":"Boolean"},"singularLabel":{"name":"singular_label","type":"String"},"parentModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"parent_module","type":"core/com/zoho/crm/api/modules/minified_module"},"apiSupported":{"name":"api_supported","type":"Boolean"},"subMenuAvailable":{"name":"sub_menu_available","type":"Boolean"},"arguments1":{"structure_name":"core/com/zoho/crm/api/modules/argument","name":"arguments","type":"List"},"emailtemplateSupport":{"name":"emailTemplate_support","type":"Boolean"},"inventoryTemplateSupported":{"name":"inventory_template_supported","type":"Boolean"},"properties":{"name":"$properties","type":"List"},"territory":{"structure_name":"core/com/zoho/crm/api/modules/territory","name":"territory","type":"core/com/zoho/crm/api/modules/territory"}},"core/com/zoho/crm/api/record/delete_records_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/territories/delete_territory_param":{"deletePreviousForecasts":{"name":"delete_previous_forecasts","type":"Boolean"}},"core/com/zoho/crm/api/users_territories/manager":{"name":{"name":"Name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/business_hours/response_wrapper":{"businessHours":{"structure_name":"core/com/zoho/crm/api/business_hours/business_hours","name":"business_hours","type":"core/com/zoho/crm/api/business_hours/business_hours"}},"core/com/zoho/crm/api/download_inline_images/response_handler":{"classes":["core/com/zoho/crm/api/download_inline_images/file_body_wrapper","core/com/zoho/crm/api/download_inline_images/api_exception"],"interface":true},"core/com/zoho/crm/api/email_sharing/response_handler":{"classes":["core/com/zoho/crm/api/email_sharing/api_exception","core/com/zoho/crm/api/email_sharing/response_wrapper"],"interface":true},"core/com/zoho/crm/api/taxes/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"name","type":"String"},{"name":"value","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["tax added","tax updated"," tax deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/modules/action_wrapper":{"modules":{"structure_name":"core/com/zoho/crm/api/modules/action_response","name":"modules","type":"List"}},"core/com/zoho/crm/api/privacy_preference/option":{"suboptions":{"name":"suboptions","type":"List"},"name":{"name":"name","type":"String"},"tooltip":{"name":"tooltip","type":"String"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/users_transfer_delete/move_subordinate":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/email_sharing/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","the request does not contain any file","invalid file type"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/view_type":{"view":{"name":"view","type":"Boolean"},"edit":{"name":"edit","type":"Boolean"},"quickCreate":{"name":"quick_create","type":"Boolean"},"create":{"name":"create","type":"Boolean"}},"core/com/zoho/crm/api/attachments/upload_url_attachments_param":{"attachmentUrl":{"name":"attachmentUrl","type":"String","required":true},"title":{"name":"title","type":"String"}},"core/com/zoho/crm/api/field_map_dependency/action_wrapper":{"mapDependency":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/action_response","name":"map_dependency","type":"List"}},"core/com/zoho/crm/api/holidays/delete_holiday_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/email_related_records/module":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/business_hours/create_business_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/portals/response_wrapper":{"portals":{"structure_name":"core/com/zoho/crm/api/portals/portals","name":"portals","type":"List"}},"core/com/zoho/crm/api/backup/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/notes/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/notes/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/org/api_exception":{"code":{"values":["INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/field_attachments/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/profiles/delete_profile_param":{"transferTo":{"name":"transfer_to","type":"Long","required":true}},"core/com/zoho/crm/api/modules/module_field_lookup":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"queryDetails":{"structure_name":"core/com/zoho/crm/api/fields/query_details","name":"query_details","type":"core/com/zoho/crm/api/fields/query_details"},"id":{"name":"id","type":"Long"},"showFields":{"structure_name":"core/com/zoho/crm/api/fields/show_fields","name":"show_fields","type":"List"},"revalidateFilterDuringEdit":{"name":"revalidate_filter_during_edit","type":"Boolean"}},"core/com/zoho/crm/api/holidays/response_wrapper":{"holidays":{"structure_name":"core/com/zoho/crm/api/holidays/holiday","name":"holidays","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/holidays/info","name":"info","type":"core/com/zoho/crm/api/holidays/info"}},"core/com/zoho/crm/api/reschedule_history/get_appointment_rescheduled_history_param":{"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/mass_convert/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/mass_convert/status","name":"data","type":"List"}},"core/com/zoho/crm/api/users/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/download_attachments/response_handler":{"classes":["core/com/zoho/crm/api/download_attachments/file_body_wrapper","core/com/zoho/crm/api/download_attachments/api_exception"],"interface":true},"core/com/zoho/crm/api/layouts/actions_allowed":{"edit":{"name":"edit","type":"Boolean"},"rename":{"name":"rename","type":"Boolean"},"clone":{"name":"clone","type":"Boolean"},"downgrade":{"name":"downgrade","type":"Boolean"},"delete1":{"name":"delete","type":"Boolean"},"setLayoutPermissions":{"name":"set_layout_permissions","type":"Boolean"},"deactivate":{"name":"deactivate","type":"Boolean"}},"core/com/zoho/crm/api/definition/minified_property1":{"apiName":{"name":"api_name","type":"String"},"dataType":{"name":"data_type","type":"String"},"length":{"name":"length","type":"Integer"},"readOnly":{"name":"read_only","type":"Boolean"},"required":{"name":"required","type":"Boolean"}},"core/com/zoho/crm/api/fields/tooltip":{"name":{"values":["Info Icon"],"name":"name","type":"utils/util/choice"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/appointment_preference/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/count_handler":{"classes":["core/com/zoho/crm/api/record/count_wrapper","core/com/zoho/crm/api/record/api_exception"],"interface":true},"core/com/zoho/crm/api/email_templates/response_wrapper":{"emailTemplates":{"structure_name":"core/com/zoho/crm/api/email_templates/email_template","name":"email_templates","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/email_templates/info","name":"info","type":"core/com/zoho/crm/api/email_templates/info"}},"core/com/zoho/crm/api/shift_hours/users":{"role":{"structure_name":"core/com/zoho/crm/api/shift_hours/role","name":"role","type":"core/com/zoho/crm/api/shift_hours/role"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"effectiveFrom":{"name":"effective_from","type":"Date"},"email":{"name":"email","type":"String"},"zuid":{"name":"zuid","type":"String"}},"core/com/zoho/crm/api/inventory_templates/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/associate_email/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","INVALID_MODULE","REQUIRED_PARAM_MISSING","DUPLICATE_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"regex","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/roles/api_exception":{"code":{"values":["INVALID_MODULE","REQUIRED_PARAM_MISSING","MANDATORY_NOT_FOUND","PATTERN_NOT_MATCHED","INVALID_DATA","DUPLICATE_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param_name","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"role_status","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_write/file":{"updatedCount":{"name":"updated_count","type":"Integer"},"name":{"name":"name","type":"String"},"skippedCount":{"name":"skipped_count","type":"Integer"},"addedCount":{"name":"added_count","type":"Integer"},"totalCount":{"name":"total_count","type":"Integer"},"status":{"values":["ADDED","IN PROGRESS","COMPLETED","SKIPPED","FAILED"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/org/checkin_preferences":{"restrictedEventTypes":{"name":"restricted_event_types","type":"String"}},"core/com/zoho/crm/api/send_mail/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_DATA","INTERNAL_SERVER_ERROR","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/layouts/sections":{"displayLabel":{"name":"display_label","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"issubformsection":{"name":"isSubformSection","type":"Boolean"},"tabTraversal":{"name":"tab_traversal","type":"Integer"},"apiName":{"name":"api_name","type":"String"},"generatedType":{"name":"generated_type","type":"String"},"name":{"name":"name","type":"String"},"columnCount":{"name":"column_count","type":"Integer"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"fields":{"structure_name":"core/com/zoho/crm/api/layouts/section_field","name":"fields","type":"List"},"properties":{"structure_name":"core/com/zoho/crm/api/layouts/properties","name":"properties","type":"core/com/zoho/crm/api/layouts/properties"}},"core/com/zoho/crm/api/record/comment":{"commentedTime":{"name":"commented_time","type":"DateTime"},"commentContent":{"name":"comment_content","type":"String"},"id":{"name":"id","type":"Long"},"commentedBy":{"name":"commented_by","type":"String"}},"core/com/zoho/crm/api/holidays/update_holiday_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/privacy_preference/privacy_preference":{"preference":{"structure_name":"core/com/zoho/crm/api/privacy_preference/preference","name":"preference","type":"core/com/zoho/crm/api/privacy_preference/preference"},"config":{"structure_name":"core/com/zoho/crm/api/privacy_preference/config","name":"config","type":"core/com/zoho/crm/api/privacy_preference/config"}},"core/com/zoho/crm/api/shift_hours/mandatory_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/service_preference/response_handler":{"classes":["core/com/zoho/crm/api/service_preference/api_exception","core/com/zoho/crm/api/service_preference/response_wrapper"],"interface":true},"core/com/zoho/crm/api/attachments/action_response":{"classes":["core/com/zoho/crm/api/attachments/success_response"],"interface":true},"core/com/zoho/crm/api/wizards/response_handler":{"classes":["core/com/zoho/crm/api/wizards/api_exception","core/com/zoho/crm/api/wizards/response_wrapper"],"interface":true},"core/com/zoho/crm/api/territory_users/action_response":{"classes":["core/com/zoho/crm/api/territory_users/api_exception","core/com/zoho/crm/api/territory_users/success_response"],"interface":true},"core/com/zoho/crm/api/templates/api_exception":{"code":{"values":["REQUIRED_PARAM_MISSING"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param","type":"String"},{"name":"api_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/business_hours/business_hours":{"businessDays":{"structure_name":"utils/util/choice","values":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"name":"business_days","type":"List"},"sameAsEveryday":{"name":"same_as_everyday","type":"Boolean"},"id":{"name":"id","type":"Long"},"type":{"values":["24_by_7","24_by_5","custom"],"name":"type","type":"utils/util/choice"},"weekStartsOn":{"values":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"name":"week_starts_on","type":"utils/util/choice"},"dailyTiming":{"name":"daily_timing","max-length":2,"type":"List"},"customTiming":{"structure_name":"core/com/zoho/crm/api/business_hours/break_hours_custom_timing","name":"custom_timing","type":"List"}},"core/com/zoho/crm/api/user_type_users/users":{"confirm":{"name":"confirm","type":"Boolean"},"statusReasonS":{"name":"status_reason__s","type":"String"},"module":{"name":"module","type":"String"},"personalityId":{"name":"personality_id","type":"Long"},"name":{"name":"name","type":"String"},"active":{"name":"active","type":"Boolean"},"email":{"name":"email","type":"String"},"invitedTime":{"name":"invited_time","type":"DateTime"}},"core/com/zoho/crm/api/custom_views/sort_by":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"utils/util/Model":{"classes":["core/com/zoho/crm/api/attachments/success_response","core/com/zoho/crm/api/holidays/create_business_holiday","core/com/zoho/crm/api/shift_hours/body_wrapper","core/com/zoho/crm/api/field_map_dependency/child","core/com/zoho/crm/api/territories/api_exception","core/com/zoho/crm/api/field_map_dependency/info","core/com/zoho/crm/api/record/conversion_options_response_wrapper","core/com/zoho/crm/api/wizards/segment","core/com/zoho/crm/api/pipeline/t_pipeline","core/com/zoho/crm/api/business_hours/business_hours_created","core/com/zoho/crm/api/email_related_records/attachments","core/com/zoho/crm/api/mass_delete_cvid/success_response","core/com/zoho/crm/api/users_unavailability/action_wrapper","core/com/zoho/crm/api/user_groups/jobs","core/com/zoho/crm/api/scoring_rules/action_wrapper","core/com/zoho/crm/api/fields/expression","core/com/zoho/crm/api/privacy_configurable_apps/wrapper","core/com/zoho/crm/api/tags/response_wrapper","core/com/zoho/crm/api/fields/api_exception","core/com/zoho/crm/api/notes/action_wrapper","core/com/zoho/crm/api/currencies/base_currency","core/com/zoho/crm/api/isc_signature/signature","core/com/zoho/crm/api/modules/action_wrapper","core/com/zoho/crm/api/entity_scores/scoring_rule_structure","core/com/zoho/crm/api/territories/response_wrapper","core/com/zoho/crm/api/fields/pick_list_value","core/com/zoho/crm/api/tags/action_wrapper","core/com/zoho/crm/api/assignment_rules/default_assignee","core/com/zoho/crm/api/layouts/layouts","core/com/zoho/crm/api/timelines/name_id_structure","core/com/zoho/crm/api/mail_merge/sign_action_wrapper","core/com/zoho/crm/api/mass_convert/response_wrapper","core/com/zoho/crm/api/users_transfer_delete/body_wrapper","core/com/zoho/crm/api/scoring_rules/criteria","core/com/zoho/crm/api/fields/formula","core/com/zoho/crm/api/user_groups/body_wrapper","core/com/zoho/crm/api/change_owner/api_exception","core/com/zoho/crm/api/holidays/shift_hour","core/com/zoho/crm/api/bulk_read/request_wrapper","core/com/zoho/crm/api/taxes/action_wrapper","core/com/zoho/crm/api/definition/api_exception","core/com/zoho/crm/api/record/file_details","core/com/zoho/crm/api/user_groups/sources_count","core/com/zoho/crm/api/service_preference/body_wrapper","core/com/zoho/crm/api/pipeline/regex_details","core/com/zoho/crm/api/wizards/button_background","core/com/zoho/crm/api/users_territories/transfer_to_user","core/com/zoho/crm/api/holidays/holiday","core/com/zoho/crm/api/pipeline/transfer_pipeline_wrapper","core/com/zoho/crm/api/record/multi_select_lookup","core/com/zoho/crm/api/blueprint/process_info","core/com/zoho/crm/api/timelines/field_history_value","core/com/zoho/crm/api/associate_email/body_wrapper","core/com/zoho/crm/api/email_compose_meta/features_available","core/com/zoho/crm/api/privacy_preference/wrapper","core/com/zoho/crm/api/fields/history_tracking","core/com/zoho/crm/api/files/body_wrapper","core/com/zoho/crm/api/appointment_preference/field","core/com/zoho/crm/api/email_templates/attachment","core/com/zoho/crm/api/shift_hours/break_custom_timing","core/com/zoho/crm/api/users/associated_groups_wrapper","core/com/zoho/crm/api/record/price_book","core/com/zoho/crm/api/pipeline/d_pipeline_wrapper","core/com/zoho/crm/api/bulk_read/job_detail","core/com/zoho/crm/api/timelines/picklist_detail","core/com/zoho/crm/api/currencies/api_exception","core/com/zoho/crm/api/fields/lookup","core/com/zoho/crm/api/change_owner/mass_wrapper","core/com/zoho/crm/api/layouts/actions_allowed","core/com/zoho/crm/api/associate_email/action_wrapper","core/com/zoho/crm/api/assignment_rules/created_by","core/com/zoho/crm/api/portals/response_wrapper","core/com/zoho/crm/api/tags/api_exception","core/com/zoho/crm/api/user_type_users/info","core/com/zoho/crm/api/reschedule_history/api_exception","core/com/zoho/crm/api/reschedule_history/appointment_name","core/com/zoho/crm/api/cancel_meetings/success_response","core/com/zoho/crm/api/user_groups/association_module","core/com/zoho/crm/api/email_templates/last_version_statistics","core/com/zoho/crm/api/territories/transfer_body_wrapper","core/com/zoho/crm/api/inventory_templates/inventory_template","core/com/zoho/crm/api/users/response_wrapper","core/com/zoho/crm/api/record/tax","core/com/zoho/crm/api/layouts/convert_mapping","core/com/zoho/crm/api/record/deleted_record","core/com/zoho/crm/api/user_groups/user_group","core/com/zoho/crm/api/currencies/currency_format","core/com/zoho/crm/api/backup/urls_wrapper","core/com/zoho/crm/api/download_inline_images/file_body_wrapper","core/com/zoho/crm/api/mass_convert/related_module","core/com/zoho/crm/api/holidays/api_exception","core/com/zoho/crm/api/mass_convert/assign_to","core/com/zoho/crm/api/notes/response_wrapper","core/com/zoho/crm/api/bulk_read/success_response","core/com/zoho/crm/api/taxes/org_tax","core/com/zoho/crm/api/record/action_wrapper","core/com/zoho/crm/api/timelines/automation_detail","core/com/zoho/crm/api/bulk_write/result","core/com/zoho/crm/api/mail_merge/sign_mail_merge","core/com/zoho/crm/api/templates/templates","core/com/zoho/crm/api/notes/api_exception","core/com/zoho/crm/api/fields/history_tracking_module","core/com/zoho/crm/api/portals/portals","core/com/zoho/crm/api/field_map_dependency/action_wrapper","core/com/zoho/crm/api/custom_views/pin_fields","core/com/zoho/crm/api/profiles/default_view","core/com/zoho/crm/api/shift_hours/break_hours","core/com/zoho/crm/api/email_related_records/user_details","core/com/zoho/crm/api/inventory_templates/info","core/com/zoho/crm/api/record/recurring_activity","core/com/zoho/crm/api/profiles/action_wrapper","core/com/zoho/crm/api/mass_delete_cvid/record_id_body_wrapper","core/com/zoho/crm/api/roles/api_exception","core/com/zoho/crm/api/profiles/section","core/com/zoho/crm/api/blueprint/currency","core/com/zoho/crm/api/portal_user_type/modules","core/com/zoho/crm/api/portal_user_type/owner","core/com/zoho/crm/api/portals_meta/layouts","core/com/zoho/crm/api/reschedule_history/info","core/com/zoho/crm/api/mail_merge/address","core/com/zoho/crm/api/mail_merge/address_value_map","core/com/zoho/crm/api/backup/backup","core/com/zoho/crm/api/users_transfer_delete/response_wrapper","core/com/zoho/crm/api/fields/refer_from_field","core/com/zoho/crm/api/org/response_wrapper","core/com/zoho/crm/api/profiles/category_module","core/com/zoho/crm/api/layouts/response_wrapper","core/com/zoho/crm/api/users_territories/territory","core/com/zoho/crm/api/users_unavailability/user","core/com/zoho/crm/api/available_currencies/response_wrapper","core/com/zoho/crm/api/fields/crypt","core/com/zoho/crm/api/org/hierarchy_preferences","core/com/zoho/crm/api/fields/operation_type","core/com/zoho/crm/api/fields/function_parameter","core/com/zoho/crm/api/email_compose_meta/data","core/com/zoho/crm/api/blueprint/layout","core/com/zoho/crm/api/portal_user_type/personality_module","core/com/zoho/crm/api/layouts/deal_layout_mapping","core/com/zoho/crm/api/deal_contact_roles/body_wrapper","core/com/zoho/crm/api/related_lists/module_map","core/com/zoho/crm/api/entity_scores/entity_scores","core/com/zoho/crm/api/custom_views/translation","core/com/zoho/crm/api/timelines/path_finder","core/com/zoho/crm/api/fields/fields","core/com/zoho/crm/api/share_records/response_wrapper","core/com/zoho/crm/api/users/customize_info","core/com/zoho/crm/api/blueprint/multi_select_lookup","core/com/zoho/crm/api/notifications/api_exception","core/com/zoho/crm/api/record/mass_update_territory","core/com/zoho/crm/api/blueprint/convert_mapping","core/com/zoho/crm/api/mass_change_owner/response_wrapper","core/com/zoho/crm/api/territories/deleted_associated_territories","core/com/zoho/crm/api/shift_hours/api_exception","core/com/zoho/crm/api/definition/response_wrapper","core/com/zoho/crm/api/wizards/api_exception","core/com/zoho/crm/api/templates/wrapper","core/com/zoho/crm/api/record/mass_update_response_wrapper","core/com/zoho/crm/api/blueprint/success_response","core/com/zoho/crm/api/hipaa_compliance/api_exception","core/com/zoho/crm/api/reschedule_history/reschedule_history","core/com/zoho/crm/api/user_groups/source","core/com/zoho/crm/api/users/api_exception","core/com/zoho/crm/api/territory_users/api_exception","core/com/zoho/crm/api/portal_invite/success_response","core/com/zoho/crm/api/mass_change_owner/status","core/com/zoho/crm/api/layouts/default_assignment_view","core/com/zoho/crm/api/user_groups/action_wrapper","core/com/zoho/crm/api/scoring_rules/body_wrapper","core/com/zoho/crm/api/users_transfer_delete/api_exception","core/com/zoho/crm/api/wizards/node","core/com/zoho/crm/api/portals/body_wrapper","core/com/zoho/crm/api/share_records/shared_through","core/com/zoho/crm/api/users_unavailability/response_wrapper","core/com/zoho/crm/api/taxes/success_response","core/com/zoho/crm/api/backup/history_wrapper","core/com/zoho/crm/api/wizards/container","core/com/zoho/crm/api/territories/info","core/com/zoho/crm/api/fiscal_year/api_exception","core/com/zoho/crm/api/deal_contact_roles/contact_role","core/com/zoho/crm/api/files/api_exception","core/com/zoho/crm/api/fields/unique","core/com/zoho/crm/api/fields/query_details","core/com/zoho/crm/api/query/api_exception","core/com/zoho/crm/api/business_hours/business_hours","core/com/zoho/crm/api/cancel_meetings/body_wrapper","core/com/zoho/crm/api/templates/folder","core/com/zoho/crm/api/business_hours/body_wrapper","core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete_by_id","core/com/zoho/crm/api/appointment_preference/field_mappings","core/com/zoho/crm/api/inventory_templates/api_exception","core/com/zoho/crm/api/fields/show_fields","core/com/zoho/crm/api/scoring_rules/layout","core/com/zoho/crm/api/email_related_records/response_wrapper","core/com/zoho/crm/api/reschedule_history/approval","core/com/zoho/crm/api/assignment_rules/api_exception","core/com/zoho/crm/api/change_owner/related_modules","core/com/zoho/crm/api/record/consent","core/com/zoho/crm/api/mass_delete_cvid/mass_delete_scheduled","core/com/zoho/crm/api/custom_views/action_wrapper","core/com/zoho/crm/api/deal_contact_roles/info","core/com/zoho/crm/api/variable_groups/response_wrapper","core/com/zoho/crm/api/users_territories/info","core/com/zoho/crm/api/portal_invite/job_response","core/com/zoho/crm/api/currencies/success_response","core/com/zoho/crm/api/taxes/body_wrapper","core/com/zoho/crm/api/users/role","core/com/zoho/crm/api/backup/urls","core/com/zoho/crm/api/deal_contact_roles/success_response","core/com/zoho/crm/api/shift_hours/success_response","core/com/zoho/crm/api/variables/api_exception","core/com/zoho/crm/api/territories/transfer_territory","core/com/zoho/crm/api/layouts/deal_field","core/com/zoho/crm/api/users/profile","core/com/zoho/crm/api/email_compose_meta/data_map","core/com/zoho/crm/api/backup/requester","core/com/zoho/crm/api/bulk_write/call_back","core/com/zoho/crm/api/send_mail/from","core/com/zoho/crm/api/blueprint/response_wrapper","core/com/zoho/crm/api/reschedule_history/action_wrapper","core/com/zoho/crm/api/taxes/tax","core/com/zoho/crm/api/users_territories/body_wrapper","core/com/zoho/crm/api/record/widget","core/com/zoho/crm/api/business_hours/response_wrapper","core/com/zoho/crm/api/email_related_records/api_exception","core/com/zoho/crm/api/download_attachments/file_body_wrapper","core/com/zoho/crm/api/territories/associated_users_count","core/com/zoho/crm/api/users_territories/manager","core/com/zoho/crm/api/layouts/api_exception","core/com/zoho/crm/api/variables/response_wrapper","core/com/zoho/crm/api/portal_user_type/response_wrapper","core/com/zoho/crm/api/send_mail/body_wrapper","core/com/zoho/crm/api/cancel_meetings/action_wrapper","core/com/zoho/crm/api/mass_change_owner/territory","core/com/zoho/crm/api/mass_convert/api_exception","core/com/zoho/crm/api/associate_email/available","core/com/zoho/crm/api/notifications/success_response","core/com/zoho/crm/api/service_preference/api_exception","core/com/zoho/crm/api/templates/api_exception","core/com/zoho/crm/api/blueprint/crypt","core/com/zoho/crm/api/user_groups/response_wrapper","core/com/zoho/crm/api/modules/success_response","core/com/zoho/crm/api/from_addresses/response_wrapper","core/com/zoho/crm/api/contact_roles/api_exception","core/com/zoho/crm/api/mass_convert/move_attachments_to","core/com/zoho/crm/api/tags/conflict_wrapper","core/com/zoho/crm/api/variables/body_wrapper","core/com/zoho/crm/api/bulk_read/result","core/com/zoho/crm/api/send_mail/data_subject_request","core/com/zoho/crm/api/assignment_rules/response_wrapper","core/com/zoho/crm/api/wizards/wizard","core/com/zoho/crm/api/attachments/attachment","core/com/zoho/crm/api/email_templates/response_wrapper","core/com/zoho/crm/api/mass_change_owner/action_wrapper","core/com/zoho/crm/api/custom_views/custom_view","core/com/zoho/crm/api/custom_views/owner","core/com/zoho/crm/api/field_attachments/file_body_wrapper","core/com/zoho/crm/api/privacy_preference/preference","core/com/zoho/crm/api/fields/profile","core/com/zoho/crm/api/fiscal_year/action_wrapper","core/com/zoho/crm/api/mail_merge/signers","core/com/zoho/crm/api/fields/maps","core/com/zoho/crm/api/users/theme","core/com/zoho/crm/api/custom_views/shared_to","core/com/zoho/crm/api/custom_views/sort_by","core/com/zoho/crm/api/change_owner/success_response","core/com/zoho/crm/api/wizards/actions","core/com/zoho/crm/api/assignment_rules/assignment_rules","core/com/zoho/crm/api/related_lists/response_wrapper","core/com/zoho/crm/api/files/action_wrapper","core/com/zoho/crm/api/tags/record_success_response","core/com/zoho/crm/api/shift_hours/response_wrapper","core/com/zoho/crm/api/bulk_read/api_exception","core/com/zoho/crm/api/custom_views/api_exception","core/com/zoho/crm/api/appointment_preference/appointment_preference","core/com/zoho/crm/api/backup/file_body_wrapper","core/com/zoho/crm/api/shift_hours/role","core/com/zoho/crm/api/territory_users/info","core/com/zoho/crm/api/shift_hours/holidays","core/com/zoho/crm/api/download_inline_images/api_exception","core/com/zoho/crm/api/record/response_wrapper","core/com/zoho/crm/api/email_templates/email_template","core/com/zoho/crm/api/roles/role","core/com/zoho/crm/api/fields/tooltip","core/com/zoho/crm/api/reschedule_history/user","core/com/zoho/crm/api/blueprint/module_fields","core/com/zoho/crm/api/portals/owner","core/com/zoho/crm/api/portals/api_exception","core/com/zoho/crm/api/timelines/record","core/com/zoho/crm/api/record/reminder","core/com/zoho/crm/api/pipeline/d_pipeline","core/com/zoho/crm/api/privacy_configurable_apps/apps","core/com/zoho/crm/api/blueprint/next_transition","core/com/zoho/crm/api/variable_groups/minified_variable_group","core/com/zoho/crm/api/change_owner/error_details","core/com/zoho/crm/api/variable_groups/variable_group","core/com/zoho/crm/api/send_mail/action_wrapper","core/com/zoho/crm/api/record/count_wrapper","core/com/zoho/crm/api/holidays/create_shift_holiday","core/com/zoho/crm/api/blueprint/escalation","core/com/zoho/crm/api/mail_merge/api_exception","core/com/zoho/crm/api/scoring_rules/scoring_rule","core/com/zoho/crm/api/deal_contact_roles/error_details","core/com/zoho/crm/api/bulk_read/call_back","core/com/zoho/crm/api/timelines/info","core/com/zoho/crm/api/users_unavailability/body_wrapper","core/com/zoho/crm/api/user_type_users/users","core/com/zoho/crm/api/associate_email/attachments","core/com/zoho/crm/api/email_sharing/api_exception","core/com/zoho/crm/api/fields/action_wrapper","core/com/zoho/crm/api/entity_scores/info","core/com/zoho/crm/api/scoring_rules/success_response","core/com/zoho/crm/api/mail_merge/mail_merge_template","core/com/zoho/crm/api/record/preference_field_matched_value","core/com/zoho/crm/api/appointment_preference/layout","core/com/zoho/crm/api/users/tab","core/com/zoho/crm/api/territory_users/body_wrapper","core/com/zoho/crm/api/users_transfer_delete/action_wrapper","core/com/zoho/crm/api/roles/reporting_to","core/com/zoho/crm/api/related_records/response_wrapper","core/com/zoho/crm/api/user_groups/associated_user","core/com/zoho/crm/api/record/carry_over_tags","core/com/zoho/crm/api/timelines/state","core/com/zoho/crm/api/timelines/timeline","core/com/zoho/crm/api/tags/new_tag_request_wrapper","core/com/zoho/crm/api/download_attachments/api_exception","core/com/zoho/crm/api/profiles/permission_detail","core/com/zoho/crm/api/portal_user_type/permissions","core/com/zoho/crm/api/custom_views/info","core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/bulk_write/field_mapping","core/com/zoho/crm/api/fields/rollup_criteria","core/com/zoho/crm/api/variable_groups/api_exception","core/com/zoho/crm/api/mail_merge/success_response","core/com/zoho/crm/api/appointment_preference/api_exception","core/com/zoho/crm/api/business_hours/api_exception","core/com/zoho/crm/api/wizards/conditional_rules","core/com/zoho/crm/api/reschedule_history/body_wrapper","core/com/zoho/crm/api/users/action_wrapper","core/com/zoho/crm/api/definition/minified_property1","core/com/zoho/crm/api/profiles/success_response","core/com/zoho/crm/api/record/line_tax","core/com/zoho/crm/api/share_records/delete_action_wrapper","core/com/zoho/crm/api/wizards/resource","core/com/zoho/crm/api/wizards/response_wrapper","core/com/zoho/crm/api/attachments/info","core/com/zoho/crm/api/roles/response_wrapper","core/com/zoho/crm/api/shift_hours/users","core/com/zoho/crm/api/pipeline/mandatory_details","core/com/zoho/crm/api/tags/info","core/com/zoho/crm/api/attachments/action_wrapper","core/com/zoho/crm/api/associate_email/success_response","core/com/zoho/crm/api/record/territory","core/com/zoho/crm/api/custom_views/success_response","core/com/zoho/crm/api/blueprint/lookup_field","core/com/zoho/crm/api/user_groups/associated_user_count","core/com/zoho/crm/api/tags/existing_tag_request_wrapper","core/com/zoho/crm/api/layouts/default_view","core/com/zoho/crm/api/user_type_users/response_wrapper","core/com/zoho/crm/api/send_mail/success_response","core/com/zoho/crm/api/appointment_preference/success_response","core/com/zoho/crm/api/assignment_rules/action_wrapper","core/com/zoho/crm/api/portals_meta/related_lists","core/com/zoho/crm/api/shift_hours/shift_hours","core/com/zoho/crm/api/custom_views/body_wrapper","core/com/zoho/crm/api/tags/count_response_wrapper","core/com/zoho/crm/api/reschedule_history/success_response","core/com/zoho/crm/api/portal_invite/action_wrapper","core/com/zoho/crm/api/privacy_preference/config","core/com/zoho/crm/api/notifications/delete_details","core/com/zoho/crm/api/definition/property","core/com/zoho/crm/api/fields/email_parser","core/com/zoho/crm/api/user_groups/association_wrapper","core/com/zoho/crm/api/mail_merge/download_mail_merge_wrapper","core/com/zoho/crm/api/fiscal_year/response_wrapper","core/com/zoho/crm/api/related_lists/api_exception","core/com/zoho/crm/api/record/conversion_option","core/com/zoho/crm/api/tags/success_response","core/com/zoho/crm/api/profiles/info","core/com/zoho/crm/api/modules/argument","core/com/zoho/crm/api/record/lead_converter","core/com/zoho/crm/api/user_groups/info","core/com/zoho/crm/api/record/criteria","core/com/zoho/crm/api/portal_user_type/api_exception","core/com/zoho/crm/api/territories/success_response","core/com/zoho/crm/api/deal_contact_roles/action_wrapper","core/com/zoho/crm/api/notes/body_wrapper","core/com/zoho/crm/api/currencies/base_currency_wrapper","core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete","core/com/zoho/crm/api/appointment_preference/body_wrapper","core/com/zoho/crm/api/bulk_read/action_wrapper","core/com/zoho/crm/api/portals/success_response","core/com/zoho/crm/api/users_territories/validation","core/com/zoho/crm/api/timelines/module","core/com/zoho/crm/api/org/file_body_wrapper","core/com/zoho/crm/api/attachments/response_wrapper","core/com/zoho/crm/api/tags/associated_places","core/com/zoho/crm/api/tags/error_details","core/com/zoho/crm/api/blueprint/profile","core/com/zoho/crm/api/user_groups/api_exception","core/com/zoho/crm/api/wizards/button","core/com/zoho/crm/api/tags/tag","core/com/zoho/crm/api/users/owner","core/com/zoho/crm/api/user_groups/sources_wrapper","core/com/zoho/crm/api/query/response_wrapper","core/com/zoho/crm/api/definition/minified_property","core/com/zoho/crm/api/variables/action_wrapper","core/com/zoho/crm/api/portal_invite/body_wrapper","core/com/zoho/crm/api/users_territories/response_wrapper","core/com/zoho/crm/api/associate_email/associate_email","core/com/zoho/crm/api/inventory_templates/response_wrapper","core/com/zoho/crm/api/send_mail/inventory_template","core/com/zoho/crm/api/related_records/body_wrapper","core/com/zoho/crm/api/currencies/error_details","core/com/zoho/crm/api/bulk_write/success_response","core/com/zoho/crm/api/send_mail/inventory_details","core/com/zoho/crm/api/timelines/related_record","core/com/zoho/crm/api/users/info","core/com/zoho/crm/api/user_groups/users","core/com/zoho/crm/api/mass_convert/success_response","core/com/zoho/crm/api/pipeline/body_wrapper","core/com/zoho/crm/api/modules/module_field_lookup","core/com/zoho/crm/api/blueprint/field","core/com/zoho/crm/api/backup/info","core/com/zoho/crm/api/users_transfer_delete/success_response","core/com/zoho/crm/api/business_hours/break_hours_custom_timing","core/com/zoho/crm/api/profiles/minified_profile","core/com/zoho/crm/api/email_related_records/info","core/com/zoho/crm/api/files/success_response","core/com/zoho/crm/api/related_lists/related_list","core/com/zoho/crm/api/variables/variable_group","core/com/zoho/crm/api/record/file_body_wrapper","core/com/zoho/crm/api/record/convert_body_wrapper","core/com/zoho/crm/api/record/participants","core/com/zoho/crm/api/blueprint/transition","core/com/zoho/crm/api/fiscal_year/body_wrapper","core/com/zoho/crm/api/notes/success_response","core/com/zoho/crm/api/scoring_rules/layout_request_wrapper","core/com/zoho/crm/api/deal_contact_roles/data","core/com/zoho/crm/api/email_sharing/get_email_sharing","core/com/zoho/crm/api/email_templates/api_exception","core/com/zoho/crm/api/blueprint/module","core/com/zoho/crm/api/associate_email/api_exception","core/com/zoho/crm/api/contact_roles/success_response","core/com/zoho/crm/api/email_related_records/linked_record","core/com/zoho/crm/api/user_groups/resource","core/com/zoho/crm/api/associate_email/module_map","core/com/zoho/crm/api/blueprint/api_exception","core/com/zoho/crm/api/record/mass_update","core/com/zoho/crm/api/roles/body_wrapper","core/com/zoho/crm/api/notifications/event","core/com/zoho/crm/api/portal_user_type/user_type","core/com/zoho/crm/api/fields/auto_number","core/com/zoho/crm/api/users_unavailability/info","core/com/zoho/crm/api/email_templates/info","core/com/zoho/crm/api/timelines/field_history","core/com/zoho/crm/api/cancel_meetings/api_exception","core/com/zoho/crm/api/pipeline/api_exception","core/com/zoho/crm/api/related_lists/field","core/com/zoho/crm/api/change_owner/body_wrapper","core/com/zoho/crm/api/email_compose_meta/default_form","core/com/zoho/crm/api/fields/minified_field","core/com/zoho/crm/api/tags/record_action_wrapper","core/com/zoho/crm/api/query/body_wrapper","core/com/zoho/crm/api/scoring_rules/field","core/com/zoho/crm/api/users/associated_group","core/com/zoho/crm/api/bulk_write/request_wrapper","core/com/zoho/crm/api/share_records/share_record","core/com/zoho/crm/api/pipeline/transfer_pipeline_success_response","core/com/zoho/crm/api/send_mail/attachment","core/com/zoho/crm/api/users_territories/api_exception","core/com/zoho/crm/api/bulk_read/file_body_wrapper","core/com/zoho/crm/api/email_sharing/response_wrapper","core/com/zoho/crm/api/mass_delete_cvid/territory","core/com/zoho/crm/api/modules/minified_module","core/com/zoho/crm/api/notifications/notification","core/com/zoho/crm/api/modules/lookup_field_properties","core/com/zoho/crm/api/mass_delete_cvid/status","core/com/zoho/crm/api/taxes/response_wrapper","core/com/zoho/crm/api/shift_hours/shift_count","core/com/zoho/crm/api/service_preference/success_response","core/com/zoho/crm/api/hipaa_compliance/modules","core/com/zoho/crm/api/fields/body_wrapper","core/com/zoho/crm/api/record/info","core/com/zoho/crm/api/reschedule_history/response_wrapper","core/com/zoho/crm/api/record/record","core/com/zoho/crm/api/record/remind_at","core/com/zoho/crm/api/mail_merge/action_wrapper","core/com/zoho/crm/api/notes/note","core/com/zoho/crm/api/entity_scores/api_exception","core/com/zoho/crm/api/blueprint/module_mapping","core/com/zoho/crm/api/email_compose_meta/from_address","core/com/zoho/crm/api/record/mass_update_success_response","core/com/zoho/crm/api/scoring_rules/signal","core/com/zoho/crm/api/taxes/api_exception","core/com/zoho/crm/api/wizards/exempted_portal_user_type","core/com/zoho/crm/api/share_records/success_response","core/com/zoho/crm/api/portal_user_type/views","core/com/zoho/crm/api/wizards/connection","core/com/zoho/crm/api/portal_invite/api_exception","core/com/zoho/crm/api/pipeline/maps","core/com/zoho/crm/api/taxes/expected_field","core/com/zoho/crm/api/holidays/holidays","core/com/zoho/crm/api/portal_user_type/filters","core/com/zoho/crm/api/users/error_details","core/com/zoho/crm/api/service_preference/action_wrapper","core/com/zoho/crm/api/pipeline/transfer_pipeline","core/com/zoho/crm/api/taxes/preference","core/com/zoho/crm/api/tags/existing_tag","core/com/zoho/crm/api/user_groups/sources_count_wrapper","core/com/zoho/crm/api/org/resource","core/com/zoho/crm/api/backup/history","core/com/zoho/crm/api/mail_merge/download_mail_merge","core/com/zoho/crm/api/appointment_preference/response_wrapper","core/com/zoho/crm/api/related_records/file_body_wrapper","core/com/zoho/crm/api/record/comment","core/com/zoho/crm/api/associate_email/linked_record","core/com/zoho/crm/api/variables/success_response","core/com/zoho/crm/api/backup/action_wrapper","core/com/zoho/crm/api/holidays/response_wrapper","core/com/zoho/crm/api/tags/merge_wrapper","core/com/zoho/crm/api/org/success_response","core/com/zoho/crm/api/bulk_write/api_exception","core/com/zoho/crm/api/layouts/tooltip","core/com/zoho/crm/api/territories/reporting_to","core/com/zoho/crm/api/email_sharing/share_from_user","core/com/zoho/crm/api/portal_invite/portal","core/com/zoho/crm/api/fields/convert_mapping","core/com/zoho/crm/api/mass_delete_cvid/api_exception","core/com/zoho/crm/api/backup/success_response","core/com/zoho/crm/api/contact_roles/body_wrapper","core/com/zoho/crm/api/service_preference/service_preference","core/com/zoho/crm/api/profiles/category_others","core/com/zoho/crm/api/pipeline/forecast_category","core/com/zoho/crm/api/field_map_dependency/pick_list_mapping","core/com/zoho/crm/api/territory_users/response_wrapper","core/com/zoho/crm/api/related_records/api_exception","core/com/zoho/crm/api/fields/view_type","core/com/zoho/crm/api/backup/body_wrapper","core/com/zoho/crm/api/entity_scores/response_wrapper","core/com/zoho/crm/api/portal_invite/response_wrapper","core/com/zoho/crm/api/blueprint/auto_number","core/com/zoho/crm/api/layouts/profiles","core/com/zoho/crm/api/layouts/section_subform_field","core/com/zoho/crm/api/scoring_rules/api_exception","core/com/zoho/crm/api/wizards/chart_data","core/com/zoho/crm/api/users/minified_user","core/com/zoho/crm/api/scoring_rules/role_request_wrapper","core/com/zoho/crm/api/currencies/format","core/com/zoho/crm/api/contact_roles/contact_role","core/com/zoho/crm/api/email_related_records/module","core/com/zoho/crm/api/users/success_response","core/com/zoho/crm/api/entity_scores/entity_structure_with_module","core/com/zoho/crm/api/notifications/response_wrapper","core/com/zoho/crm/api/pipeline/stages","core/com/zoho/crm/api/from_addresses/api_exception","core/com/zoho/crm/api/change_owner/owner","core/com/zoho/crm/api/mass_convert/status","core/com/zoho/crm/api/hipaa_compliance/success_response","core/com/zoho/crm/api/mass_change_owner/api_exception","core/com/zoho/crm/api/portal_invite/portal_invite","core/com/zoho/crm/api/privacy_preference/tpt","core/com/zoho/crm/api/mass_delete_cvid/response_wrapper","core/com/zoho/crm/api/hipaa_compliance/action_wrapper","core/com/zoho/crm/api/users_transfer_delete/move_subordinate","core/com/zoho/crm/api/users_unavailability/api_exception","core/com/zoho/crm/api/fields/hipaa_compliance","core/com/zoho/crm/api/cancel_meetings/notify","core/com/zoho/crm/api/scoring_rules/info","core/com/zoho/crm/api/bulk_write/bulk_write_response","core/com/zoho/crm/api/user_groups/association_response","core/com/zoho/crm/api/users_territories/action_wrapper","core/com/zoho/crm/api/currencies/currency","core/com/zoho/crm/api/scoring_rules/signal_rule","core/com/zoho/crm/api/blueprint/tool_tip","core/com/zoho/crm/api/org/license_details","core/com/zoho/crm/api/roles/action_wrapper","core/com/zoho/crm/api/users/body_wrapper","core/com/zoho/crm/api/record/deleted_records_wrapper","core/com/zoho/crm/api/fields/multiselectlookup","core/com/zoho/crm/api/modules/body_wrapper","core/com/zoho/crm/api/shift_hours/shift_custom_timing","core/com/zoho/crm/api/custom_views/criteria","core/com/zoho/crm/api/privacy_preference/privacy_preference","core/com/zoho/crm/api/holidays/shift_holiday","core/com/zoho/crm/api/scoring_rules/field_rule","core/com/zoho/crm/api/attachments/owner","core/com/zoho/crm/api/users_transfer_delete/status","core/com/zoho/crm/api/pipeline/delete","core/com/zoho/crm/api/layouts/minified_layout","core/com/zoho/crm/api/roles/success_response","core/com/zoho/crm/api/mail_merge/mail_merge","core/com/zoho/crm/api/custom_views/field","core/com/zoho/crm/api/modules/sharing_properties","core/com/zoho/crm/api/users_unavailability/users_unavailability","core/com/zoho/crm/api/assignment_rules/success_response","core/com/zoho/crm/api/blueprint/association_details","core/com/zoho/crm/api/hipaa_compliance/response_wrapper","core/com/zoho/crm/api/associate_email/from","core/com/zoho/crm/api/portal_user_type/layouts","core/com/zoho/crm/api/timelines/api_exception","core/com/zoho/crm/api/fields/currency","core/com/zoho/crm/api/email_related_records/email","core/com/zoho/crm/api/field_map_dependency/body_wrapper","core/com/zoho/crm/api/share_records/action_wrapper","core/com/zoho/crm/api/send_mail/data","core/com/zoho/crm/api/users_territories/transfer_action_wrapper","core/com/zoho/crm/api/wizards/portal_user_type","core/com/zoho/crm/api/layouts/sections","core/com/zoho/crm/api/profiles/profile_wrapper","core/com/zoho/crm/api/record/success_response","core/com/zoho/crm/api/deal_contact_roles/api_exception","core/com/zoho/crm/api/currencies/action_wrapper","core/com/zoho/crm/api/notes/info","core/com/zoho/crm/api/fiscal_year/year","core/com/zoho/crm/api/user_groups/success_response","core/com/zoho/crm/api/modules/response_wrapper","core/com/zoho/crm/api/user_groups/owner","core/com/zoho/crm/api/currencies/disable_success","core/com/zoho/crm/api/fields/association_details","core/com/zoho/crm/api/field_map_dependency/api_exception","core/com/zoho/crm/api/field_map_dependency/success_response","core/com/zoho/crm/api/bulk_write/default_value","core/com/zoho/crm/api/related_records/action_wrapper","core/com/zoho/crm/api/territories/minified_territory","core/com/zoho/crm/api/org/org","core/com/zoho/crm/api/profiles/api_exception","core/com/zoho/crm/api/available_currencies/currency","core/com/zoho/crm/api/mail_merge/sign_mail_merge_wrapper","core/com/zoho/crm/api/blueprint/view_type","core/com/zoho/crm/api/mass_change_owner/owner","core/com/zoho/crm/api/record/line_item_product","core/com/zoho/crm/api/wizards/criteria","core/com/zoho/crm/api/attachments/file_body_wrapper","core/com/zoho/crm/api/modules/related_list_properties","core/com/zoho/crm/api/tags/body_wrapper","core/com/zoho/crm/api/mass_convert/portal_user_type","core/com/zoho/crm/api/wizards/transition","core/com/zoho/crm/api/mass_change_owner/body_wrapper","core/com/zoho/crm/api/record/body_wrapper","core/com/zoho/crm/api/shift_hours/action_wrapper","core/com/zoho/crm/api/org/feature","core/com/zoho/crm/api/privacy_preference/section","core/com/zoho/crm/api/fields/file_upolad_option","core/com/zoho/crm/api/field_map_dependency/parent","core/com/zoho/crm/api/send_mail/invalid_details","core/com/zoho/crm/api/users/users","core/com/zoho/crm/api/modules/territory","core/com/zoho/crm/api/inventory_templates/folder","core/com/zoho/crm/api/territories/deleted_associated_wrapper","core/com/zoho/crm/api/users_territories/bulk_validation","core/com/zoho/crm/api/variables/error_details","core/com/zoho/crm/api/pipeline/transfer_pipeline_action_wrapper","core/com/zoho/crm/api/users_territories/transfer_and_delink","core/com/zoho/crm/api/holidays/success_response","core/com/zoho/crm/api/portals_meta/filters","core/com/zoho/crm/api/bulk_read/response_wrapper","core/com/zoho/crm/api/mass_delete_cvid/cvid_body_wrapper","core/com/zoho/crm/api/users_territories/transfer_wrapper","core/com/zoho/crm/api/territories/associated_users_count_wrapper","core/com/zoho/crm/api/record/mass_update_body_wrapper","core/com/zoho/crm/api/users_unavailability/success_response","core/com/zoho/crm/api/territories/criteria","core/com/zoho/crm/api/record/mass_update_action_wrapper","core/com/zoho/crm/api/blueprint/body_wrapper","core/com/zoho/crm/api/bulk_write/file","core/com/zoho/crm/api/privacy_preference/option","core/com/zoho/crm/api/associate_email/to","core/com/zoho/crm/api/hipaa_compliance/hipaa_compliance","core/com/zoho/crm/api/layouts/section_field","core/com/zoho/crm/api/related_records/success_response","core/com/zoho/crm/api/modules/api_exception","core/com/zoho/crm/api/modules/modules","core/com/zoho/crm/api/record/multi_select_picklist","core/com/zoho/crm/api/mass_change_owner/success_response","core/com/zoho/crm/api/portals_meta/views","core/com/zoho/crm/api/share_records/api_exception","core/com/zoho/crm/api/portals_meta/modules","core/com/zoho/crm/api/fiscal_year/success_response","core/com/zoho/crm/api/backup/api_exception","core/com/zoho/crm/api/mass_convert/error_details","core/com/zoho/crm/api/org/api_exception","core/com/zoho/crm/api/wizards/screen","core/com/zoho/crm/api/contact_roles/action_wrapper","core/com/zoho/crm/api/portals_meta/wrapper","core/com/zoho/crm/api/tags/record_detail_tag","core/com/zoho/crm/api/email_related_records/status","core/com/zoho/crm/api/holidays/action_wrapper","core/com/zoho/crm/api/territories/manager","core/com/zoho/crm/api/modules/lookup_field","core/com/zoho/crm/api/custom_views/pin_unpin_fields","core/com/zoho/crm/api/portals/action_wrapper","core/com/zoho/crm/api/email_compose_meta/user","core/com/zoho/crm/api/bulk_read/criteria","core/com/zoho/crm/api/pipeline/pipeline","core/com/zoho/crm/api/timelines/response_wrapper","core/com/zoho/crm/api/blueprint/formula","core/com/zoho/crm/api/fields/external","core/com/zoho/crm/api/org/checkin_preferences","core/com/zoho/crm/api/user_type_users/api_exception","core/com/zoho/crm/api/service_preference/response_wrapper","core/com/zoho/crm/api/territories/body_wrapper","core/com/zoho/crm/api/fields/forecast_category","core/com/zoho/crm/api/pipeline/action_wrapper","core/com/zoho/crm/api/layouts/properties","core/com/zoho/crm/api/available_currencies/api_exception","core/com/zoho/crm/api/share_records/body_wrapper","core/com/zoho/crm/api/entity_scores/module_structure","core/com/zoho/crm/api/from_addresses/address","core/com/zoho/crm/api/pipeline/success_response","core/com/zoho/crm/api/fields/multi_module_lookup","core/com/zoho/crm/api/territories/action_wrapper","core/com/zoho/crm/api/bulk_write/resource","core/com/zoho/crm/api/users_transfer_delete/transfer","core/com/zoho/crm/api/notifications/info","core/com/zoho/crm/api/notifications/body_wrapper","core/com/zoho/crm/api/users_territories/validation_wrapper","core/com/zoho/crm/api/modules/module_fields","core/com/zoho/crm/api/users_territories/success_response","core/com/zoho/crm/api/field_map_dependency/map_dependency","core/com/zoho/crm/api/currencies/base_currency_action_wrapper","core/com/zoho/crm/api/send_mail/to","core/com/zoho/crm/api/attachments/api_exception","core/com/zoho/crm/api/field_attachments/api_exception","core/com/zoho/crm/api/change_owner/action_wrapper","core/com/zoho/crm/api/variables/variable","core/com/zoho/crm/api/entity_scores/entity_structure","core/com/zoho/crm/api/fields/success","core/com/zoho/crm/api/share_records/module","core/com/zoho/crm/api/fields/private","core/com/zoho/crm/api/user_groups/groups","core/com/zoho/crm/api/territory_users/success_response","core/com/zoho/crm/api/scoring_rules/response_wrapper","core/com/zoho/crm/api/appointment_preference/action_wrapper","core/com/zoho/crm/api/mass_convert/convert","core/com/zoho/crm/api/bulk_write/file_body_wrapper","core/com/zoho/crm/api/holidays/info","core/com/zoho/crm/api/field_map_dependency/sub_module","core/com/zoho/crm/api/fields/rollup_summary","core/com/zoho/crm/api/attachments/parent_id","core/com/zoho/crm/api/mail_merge/mail_merge_wrapper","core/com/zoho/crm/api/holidays/business_holiday","core/com/zoho/crm/api/user_groups/jobs_wrapper","core/com/zoho/crm/api/associate_email/record","core/com/zoho/crm/api/profiles/profile","core/com/zoho/crm/api/territories/field","core/com/zoho/crm/api/portal_user_type/fields","core/com/zoho/crm/api/field_map_dependency/picklist_map","core/com/zoho/crm/api/shift_hours/mandatory_details","core/com/zoho/crm/api/bulk_read/query","core/com/zoho/crm/api/custom_views/fields","core/com/zoho/crm/api/files/file_body_wrapper","core/com/zoho/crm/api/users/shift","core/com/zoho/crm/api/record/wizard","core/com/zoho/crm/api/send_mail/api_exception","core/com/zoho/crm/api/wizards/field","core/com/zoho/crm/api/blueprint/blue_print","core/com/zoho/crm/api/definition/definition","core/com/zoho/crm/api/territories/territories","core/com/zoho/crm/api/notifications/action_wrapper","core/com/zoho/crm/api/user_groups/sources","core/com/zoho/crm/api/share_records/dependee","core/com/zoho/crm/api/mass_delete_cvid/action_wrapper","core/com/zoho/crm/api/email_compose_meta/compose_settings","core/com/zoho/crm/api/currencies/body_wrapper","core/com/zoho/crm/api/record/pricing_details","core/com/zoho/crm/api/business_hours/action_wrapper","core/com/zoho/crm/api/territory_users/action_wrapper","core/com/zoho/crm/api/record/image_upload"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/picklist_map":{"displayValue":{"name":"display_value","type":"String"},"actualValue":{"name":"actual_value","type":"String"},"id":{"name":"id","type":"Long"},"delete1":{"name":"_delete","type":"Boolean"}},"core/com/zoho/crm/api/portal_invite/portal":{"userTypeId":{"name":"user_type_id","type":"Long"},"language":{"values":["en_US","en_GB","bg_BG","zh_CN","zh_TW","hr_HR","ar_EG","in_ID","cs_CZ","da_DK","nl_NL","fr_FR","de_DE","hu_HU","","hi_IN","it_IT","ja_JP","pl_PL","pt_BR","pt_PT","ru_RU","es_ES","sv_SE","th_TH","tr_TR","vi_VN","ko_KR","iw_IL"],"name":"language","type":"utils/util/choice"},"id":{"name":"id","type":"Long"},"type":{"values":["invite","reinvite"],"name":"type","type":"utils/util/choice"}},"core/com/zoho/crm/api/scoring_rules/api_exception":{"code":{"values":["INVALID_DATA","INVALID_URL_PATTERN","EXPECTED_FIELD_MISSING","MANDATORY_NOT_FOUND","LIMIT_EXCEEDED","REQUIRED_PARAM_MISSING","DUPLICATE_DATA","ALREADY_SCHEDULED","INVALID_MODULE","INVALID_TOKEN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param_name","type":"String"},{"name":"expected_fields","type":"List"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"limit","type":"Integer"},{"name":"maximum_length","type":"Integer"},{"name":"param","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["invalid data","the module name given seems to be invalid"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/org/hierarchy_preferences":{"strictlyReporting":{"name":"strictly_reporting","type":"Boolean"},"type":{"values":["Reporting_To_Hierarchy","Role_Hierarchy"],"name":"type","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/get_field_param":{"include":{"values":["allowed_permissions_to_update"],"name":"include","type":"String"},"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/territories/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fiscal_year/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"allowed_values","type":"List"}],"name":"details","type":"Map"},"message":{"values":["required field not found","Please give a valid month","Please give a valid value"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fiscal_year/response_wrapper":{"fiscalYear":{"structure_name":"core/com/zoho/crm/api/fiscal_year/year","name":"fiscal_year","type":"core/com/zoho/crm/api/fiscal_year/year"}},"core/com/zoho/crm/api/entity_scores/entity_structure":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/notes/note":{"owner":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Owner","type":"core/com/zoho/crm/api/users/minified_user"},"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"noteTitle":{"name":"Note_Title","type":"String"},"noteContent":{"name":"Note_Content","type":"String"},"attachments":{"structure_name":"core/com/zoho/crm/api/attachments/attachment","name":"$attachments","type":"List"},"voiceNote":{"name":"$voice_note","type":"Boolean"},"editable":{"name":"$editable","type":"Boolean"},"isSharedToClient":{"name":"$is_shared_to_client","type":"Boolean"},"sharingPermission":{"name":"$sharing_permission","type":"String"},"parentId":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Parent_Id","type":"core/com/zoho/crm/api/record/record"},"seModule":{"values":["Leads"],"name":"$se_module","type":"utils/util/choice"},"size":{"name":"$size","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"state":{"name":"$state","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/timelines/module":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/entity_scores/response_handler":{"classes":["core/com/zoho/crm/api/entity_scores/api_exception","core/com/zoho/crm/api/entity_scores/response_wrapper"],"interface":true},"core/com/zoho/crm/api/fields/unique":{"casesensitive":{"name":"casesensitive","type":"String"}},"core/com/zoho/crm/api/share_records/dependee":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/layouts/response_wrapper":{"layouts":{"structure_name":"core/com/zoho/crm/api/layouts/layouts","name":"layouts","type":"List"}},"core/com/zoho/crm/api/tags/api_exception":{"code":{"values":["INVALID_DATA","REQUIRED_PARAM_MISSING","MANDATORY_NOT_FOUND","INVALID_MODULE","DUPLICATE_DATA","TAG_ID_NOT_FOUND","FAILURE","NO_PERMISSION","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","LICENSE_LIMIT_EXCEEDED","INVALID_REQUEST","EXPECTED_FIELD_MISSING","NOT_ALLOWED","BAD_REQUEST","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"structure_name":"core/com/zoho/crm/api/tags/error_details","name":"expected_fields","type":"List"},{"name":"param_name","type":"String"},{"structure_name":"core/com/zoho/crm/api/tags/associated_places","name":"associated_places","type":"List"},{"name":"id","type":"String"},{"name":"param","type":"String"},{"name":"permissions","type":"List"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["invalid data","tags not found","required field not found","special characters found in the given name","One of the expected parameter is missing","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","record not deleted","the related id given seems to be invalid","The relation name given seems to be invalid","duplicate data","tag edition limit exceeded","tags not updated successfully","the module name given seems to be invalid","unable to process your request. please verify whether you have entered proper method name"," parameter and parameter values."],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/send_mail/inventory_template":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/pipeline/d_pipeline_wrapper":{"pipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/d_pipeline","name":"pipeline","type":"List"}},"core/com/zoho/crm/api/holidays/body_wrapper":{"classes":["core/com/zoho/crm/api/holidays/create_business_holiday","core/com/zoho/crm/api/holidays/create_shift_holiday"],"interface":true},"core/com/zoho/crm/api/blueprint/response_handler":{"classes":["core/com/zoho/crm/api/blueprint/response_wrapper","core/com/zoho/crm/api/blueprint/api_exception"],"interface":true},"core/com/zoho/crm/api/email_templates/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/change_owner/action_response":{"classes":["core/com/zoho/crm/api/change_owner/api_exception","core/com/zoho/crm/api/change_owner/success_response"],"interface":true},"core/com/zoho/crm/api/fields/action_wrapper":{"fields":{"structure_name":"core/com/zoho/crm/api/fields/action_response","name":"fields","type":"List"}},"core/com/zoho/crm/api/download_inline_images/get_download_inline_images_param":{"messageId":{"name":"message_id","type":"String","required":true},"id":{"name":"id","type":"String","required":true},"userId":{"name":"user_id","type":"Long","required":true}},"core/com/zoho/crm/api/shift_hours/get_shift_hour_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/shift_hours/update_shift_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/attachments/delete_attachments_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/pipeline/pipeline":{"displayValue":{"name":"display_value","max-length":120,"type":"String"},"parent":{"structure_name":"core/com/zoho/crm/api/pipeline/pipeline","name":"parent","type":"core/com/zoho/crm/api/pipeline/pipeline"},"maps":{"structure_name":"core/com/zoho/crm/api/pipeline/maps","name":"maps","type":"List"},"default1":{"name":"default","type":"Boolean"},"childAvailable":{"name":"child_available","type":"Boolean"},"actualValue":{"name":"actual_value","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mass_convert/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/currencies/base_currency_wrapper":{"baseCurrency":{"structure_name":"core/com/zoho/crm/api/currencies/base_currency","name":"base_currency","type":"core/com/zoho/crm/api/currencies/base_currency"}},"core/com/zoho/crm/api/user_groups/users":{"inactive":{"name":"inactive","type":"Integer"},"deleted":{"name":"deleted","type":"Integer"},"active":{"name":"active","type":"Integer"}},"core/com/zoho/crm/api/cancel_meetings/notify":{"sendCancellingMail":{"name":"send_cancelling_mail","type":"Boolean"}},"core/com/zoho/crm/api/cancel_meetings/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/cancel_meetings/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/related_records/action_handler":{"classes":["core/com/zoho/crm/api/related_records/api_exception","core/com/zoho/crm/api/related_records/action_wrapper"],"interface":true},"core/com/zoho/crm/api/fiscal_year/action_wrapper":{"fiscalYear":{"structure_name":"core/com/zoho/crm/api/fiscal_year/action_response","name":"fiscal_year","interface":true,"type":"core/com/zoho/crm/api/fiscal_year/action_response"}},"core/com/zoho/crm/api/territories/get_child_territory_param":{"filters":{"name":"filters","type":"String"}},"core/com/zoho/crm/api/holidays/shift_holiday":{"date":{"name":"date","type":"Date"},"name":{"name":"name","max-length":80,"type":"String"},"type":{"values":["shift_holiday"],"name":"type","type":"utils/util/choice"},"shiftHour":{"structure_name":"core/com/zoho/crm/api/holidays/shift_hour","name":"shift_hour","type":"core/com/zoho/crm/api/holidays/shift_hour"}},"core/com/zoho/crm/api/fiscal_year/year":{"startMonth":{"values":["January","February","March","April","May","June","July","August","September","October","November","December"],"name":"start_month","type":"utils/util/choice"},"displayBasedOn":{"values":["end_month","start_month"],"name":"display_based_on","type":"utils/util/choice"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/wizards/chart_data":{"canvasWidth":{"name":"canvas_width","type":"Integer"},"nodes":{"structure_name":"core/com/zoho/crm/api/wizards/node","name":"nodes","type":"List"},"colorPalette":{"structure_name":"core/com/zoho/crm/api/wizards/button_background","name":"color_palette","type":"core/com/zoho/crm/api/wizards/button_background"},"connections":{"structure_name":"core/com/zoho/crm/api/wizards/connection","name":"connections","type":"List"},"canvasHeight":{"name":"canvas_height","type":"Integer"}},"core/com/zoho/crm/api/fields/expression":{"criteria":{"structure_name":"core/com/zoho/crm/api/fields/rollup_criteria","name":"criteria","type":"core/com/zoho/crm/api/fields/rollup_criteria"},"function1":{"name":"function","type":"String"},"functionParameters":{"structure_name":"core/com/zoho/crm/api/fields/function_parameter","name":"function_parameters","type":"List"}},"core/com/zoho/crm/api/blueprint/association_details":{"lookupField":{"structure_name":"core/com/zoho/crm/api/blueprint/lookup_field","name":"lookup_field","type":"core/com/zoho/crm/api/blueprint/lookup_field"},"relatedField":{"structure_name":"core/com/zoho/crm/api/blueprint/lookup_field","name":"related_field","type":"core/com/zoho/crm/api/blueprint/lookup_field"}},"core/com/zoho/crm/api/custom_views/action_response":{"classes":["core/com/zoho/crm/api/custom_views/api_exception","core/com/zoho/crm/api/custom_views/success_response"],"interface":true},"core/com/zoho/crm/api/attachments/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/bulk_read/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/bulk_read/action_response","name":"data","type":"List"},"info":{"name":"info","type":"Map"}},"core/com/zoho/crm/api/scoring_rules/layout_request_wrapper":{"layout":{"structure_name":"core/com/zoho/crm/api/scoring_rules/layout","name":"layout","type":"core/com/zoho/crm/api/scoring_rules/layout"}},"core/com/zoho/crm/api/pipeline/t_pipeline":{"from":{"name":"from","type":"Long"},"to":{"name":"to","type":"Long"}},"core/com/zoho/crm/api/field_map_dependency/response_handler":{"classes":["core/com/zoho/crm/api/field_map_dependency/body_wrapper","core/com/zoho/crm/api/field_map_dependency/api_exception"],"interface":true},"core/com/zoho/crm/api/blueprint/profile":{"permissionType":{"name":"permission_type","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users_territories/response_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/users_territories/territory","name":"territories","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/users_territories/info","name":"info","type":"core/com/zoho/crm/api/users_territories/info"}},"core/com/zoho/crm/api/assignment_rules/get_assignment_rule_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/from_addresses/response_handler":{"classes":["core/com/zoho/crm/api/from_addresses/response_wrapper","core/com/zoho/crm/api/from_addresses/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/response_handler":{"classes":["core/com/zoho/crm/api/users_territories/response_wrapper","core/com/zoho/crm/api/users_territories/api_exception"],"interface":true},"core/com/zoho/crm/api/record/mass_update_action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/mass_update_action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/layouts/profiles":{"defaultassignmentview":{"structure_name":"core/com/zoho/crm/api/layouts/default_assignment_view","name":"_default_assignment_view","type":"core/com/zoho/crm/api/layouts/default_assignment_view"},"defaultview":{"structure_name":"core/com/zoho/crm/api/layouts/default_view","name":"_default_view","type":"core/com/zoho/crm/api/layouts/default_view"},"default1":{"name":"default","type":"Boolean"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users_transfer_delete/transfer":{"records":{"name":"records","type":"Boolean"},"assignment":{"name":"assignment","type":"Boolean"},"criteria":{"name":"criteria","type":"Boolean"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/notes/delete_notes_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/mass_convert/status":{"failedCount":{"name":"Failed_Count","type":"Integer"},"convertedCount":{"name":"Converted_Count","type":"Integer"},"totalCount":{"name":"Total_Count","type":"Integer"},"notConvertedCount":{"name":"Not_Converted_Count","type":"Integer"},"status":{"name":"Status","type":"String"}},"core/com/zoho/crm/api/user_groups/jobs_wrapper":{"deletionJobs":{"structure_name":"core/com/zoho/crm/api/user_groups/jobs","name":"deletion_jobs","type":"List"}},"core/com/zoho/crm/api/layouts/get_layout_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/pipeline/delete":{"permanent":{"name":"permanent","type":"Boolean"}},"core/com/zoho/crm/api/users_transfer_delete/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"jobId","type":"String"}],"name":"details","type":"Map"},"message":{"values":["User added","User updated","User deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_user_type/views":{"displayLabel":{"name":"display_label","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/mass_change_owner/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"values":["cvid"],"name":"api_name","type":"utils/util/choice"},{"name":"expected_data_type","type":"String"},{"name":"json_path","type":"String"}],"name":"details","type":"Map"},"message":{"values":["the cvid given seems to be invalid","required field not found"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/email_compose_meta/features_available":{"emailCloudPicker":{"values":[true],"name":"EMAIL_CLOUD_PICKER","type":"utils/util/choice"},"formIntegrationEnabled":{"values":[true],"name":"form_integration_enabled","type":"utils/util/choice"},"islivedeskenabled":{"values":[true],"name":"isLiveDeskEnabled","type":"utils/util/choice"},"subjectLineSuggestion":{"name":"subject_line_suggestion","type":"Boolean"},"inlineComposeWindow":{"values":[true],"name":"inline_compose_window","type":"utils/util/choice"},"bestTimeToContact":{"values":[true],"name":"best_time_to_contact","type":"utils/util/choice"},"zsurveyEnabled":{"values":[true],"name":"zsurvey_enabled","type":"utils/util/choice"},"oldComposeRevert":{"name":"OLD_COMPOSE_REVERT","type":"Boolean"},"mandateunsublink":{"name":"mandateUnsubLink","type":"Boolean"},"scheduleMail":{"values":[true],"name":"Schedule_Mail","type":"utils/util/choice"},"unsubscribeLink":{"values":[true],"name":"UNSUBSCRIBE_LINK","type":"utils/util/choice"},"attachment":{"name":"ATTACHMENT","type":"Boolean"},"isprivacyenabled":{"values":[true],"name":"isPrivacyEnabled","type":"utils/util/choice"},"autoSuggestion":{"values":[true],"name":"auto_suggestion","type":"utils/util/choice"},"emailPreference":{"name":"EMAIL_PREFERENCE","type":"Boolean"},"attachTeamdrive":{"values":[true],"name":"attach_teamdrive","type":"utils/util/choice"}},"core/com/zoho/crm/api/users/minified_user":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/profiles/profile_wrapper":{"profiles":{"structure_name":"core/com/zoho/crm/api/profiles/profile","name":"profiles","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/profiles/info","name":"info","type":"core/com/zoho/crm/api/profiles/info"}},"core/com/zoho/crm/api/email_sharing/get_email_sharing":{"availableTypes":{"name":"available_types","type":"List"},"shareFromUsers":{"structure_name":"core/com/zoho/crm/api/email_sharing/share_from_user","name":"share_from_users","type":"List"}},"core/com/zoho/crm/api/fields/pick_list_value":{"displayValue":{"name":"display_value","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"maps":{"structure_name":"core/com/zoho/crm/api/fields/maps","name":"maps","type":"List"},"probability":{"name":"probability","type":"Integer"},"forecastCategory":{"structure_name":"core/com/zoho/crm/api/fields/forecast_category","name":"forecast_category","type":"core/com/zoho/crm/api/fields/forecast_category"},"actualValue":{"name":"actual_value","type":"String"},"sysRefName":{"name":"sys_ref_name","type":"String"},"expectedDataType":{"name":"expected_data_type","type":"String"},"colourCode":{"name":"colour_code","type":"String"},"forecastType":{"name":"forecast_type","type":"String"},"id":{"name":"id","type":"Long"},"type":{"values":["used","unused"],"name":"type","type":"utils/util/choice"}},"core/com/zoho/crm/api/roles/action_response":{"classes":["core/com/zoho/crm/api/roles/api_exception","core/com/zoho/crm/api/roles/success_response"],"interface":true},"core/com/zoho/crm/api/change_owner/related_modules":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/line_item_product":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"productCode":{"name":"Product_Code","type":"String"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"Created_Time","type":"DateTime"},"currency":{"name":"Currency","type":"String"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"}},"core/com/zoho/crm/api/territories/action_response":{"classes":["core/com/zoho/crm/api/territories/api_exception","core/com/zoho/crm/api/territories/success_response"],"interface":true},"core/com/zoho/crm/api/fields/refer_from_field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/reminder":{"period":{"name":"period","type":"String"},"unit":{"name":"unit","type":"Integer"},"time":{"name":"time","type":"String"}},"core/com/zoho/crm/api/business_hours/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","INVALID_DATA","INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"},{"name":"regex","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["required field not found"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/templates/wrapper":{"templates":{"structure_name":"core/com/zoho/crm/api/templates/templates","name":"templates","type":"List"}},"core/com/zoho/crm/api/cancel_meetings/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/business_hours/action_wrapper":{"businessHours":{"structure_name":"core/com/zoho/crm/api/business_hours/action_response","name":"business_hours","interface":true,"type":"core/com/zoho/crm/api/business_hours/action_response"}},"core/com/zoho/crm/api/profiles/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","LICENSE_LIMIT_EXCEEDED","INVALID_DATA","DUPLICATE_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"values":[25],"name":"limit","type":"utils/util/choice"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["duplicate data"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/tags/tag":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"colorCode":{"values":["#1DB9B4","#57B1FD","#63C57E","#F48435","#A8C026"],"name":"color_code","type":"utils/util/choice"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portal_user_type/layouts":{"displayLabel":{"name":"display_label","type":"String"},"defaultview":{"structure_name":"core/com/zoho/crm/api/portal_user_type/views","name":"_default_view","type":"core/com/zoho/crm/api/portal_user_type/views"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/field_map_dependency/body_wrapper":{"mapDependency":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/map_dependency","name":"map_dependency","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/info","name":"info","type":"core/com/zoho/crm/api/field_map_dependency/info"}},"core/com/zoho/crm/api/pipeline/regex_details":{"apiName":{"name":"api_name","type":"String"},"regex":{"name":"regex","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/bulk_read/call_back":{"method":{"values":["post"],"name":"method","type":"utils/util/choice"},"url":{"name":"url","type":"String"}},"core/com/zoho/crm/api/fields/private":{"export1":{"name":"export","type":"Boolean"},"restricted":{"name":"restricted","type":"Boolean"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/record/carry_over_tags":{"deals":{"name":"Deals","type":"List"},"accounts":{"name":"Accounts","type":"List"},"contacts":{"name":"Contacts","type":"List"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline_action_wrapper":{"transferPipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/transfer_pipeline_action_response","name":"transfer_pipeline","type":"List"}},"core/com/zoho/crm/api/related_records/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/related_records/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/record/multi_select_picklist":{"fieldname":{"name":"fieldName","type":"Map"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users/get_users_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/assignment_rules/created_by":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"email":{"name":"email","type":"String"},"zuid":{"name":"zuid","type":"String"}},"core/com/zoho/crm/api/timelines/state":{"isLastState":{"name":"is_last_state","type":"Boolean"},"name":{"name":"name","type":"String"},"triggerType":{"name":"trigger_type","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mail_merge/sign_action_wrapper":{"signMailMerge":{"structure_name":"core/com/zoho/crm/api/mail_merge/sign_action_response","name":"sign_mail_merge","type":"List"}},"core/com/zoho/crm/api/layouts/api_exception":{"code":{"values":["InvalidModule","REQUIRED_PARAM_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/custom_views/custom_view":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"criteria":{"structure_name":"core/com/zoho/crm/api/custom_views/criteria","name":"criteria","type":"core/com/zoho/crm/api/custom_views/criteria"},"module":{"structure_name":"core/com/zoho/crm/api/custom_views/owner","name":"module","type":"core/com/zoho/crm/api/custom_views/owner"},"sharedTo":{"structure_name":"core/com/zoho/crm/api/custom_views/shared_to","name":"shared_to","type":"List"},"displayValue":{"name":"display_value","type":"String"},"lastAccessedTime":{"name":"last_accessed_time","type":"DateTime"},"accessType":{"values":["public","only_to_me","shared"],"name":"access_type","type":"utils/util/choice"},"offline":{"name":"offline","type":"Boolean"},"systemName":{"name":"system_name","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/custom_views/owner","name":"created_by","type":"core/com/zoho/crm/api/custom_views/owner"},"default1":{"name":"default","type":"Boolean"},"sortOrder":{"values":["asc","desc"],"name":"sort_order","type":"utils/util/choice"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/custom_views/owner","name":"modified_by","type":"core/com/zoho/crm/api/custom_views/owner"},"sortBy":{"structure_name":"core/com/zoho/crm/api/custom_views/sort_by","name":"sort_by","type":"core/com/zoho/crm/api/custom_views/sort_by"},"id":{"name":"id","type":"Long"},"category":{"name":"category","type":"String"},"systemDefined":{"name":"system_defined","type":"Boolean"},"locked":{"name":"locked","type":"Boolean"},"fields":{"structure_name":"core/com/zoho/crm/api/custom_views/fields","name":"fields","type":"List"},"favorite":{"name":"favorite","type":"Boolean"}},"core/com/zoho/crm/api/backup/body_wrapper":{"backup":{"structure_name":"core/com/zoho/crm/api/backup/backup","name":"backup","type":"core/com/zoho/crm/api/backup/backup"}},"core/com/zoho/crm/api/related_records/update_related_records_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/pipeline/create_pipeline_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/contact_roles/action_handler":{"classes":["core/com/zoho/crm/api/contact_roles/api_exception","core/com/zoho/crm/api/contact_roles/action_wrapper"],"interface":true},"core/com/zoho/crm/api/scoring_rules/scoring_rule":{"layout":{"structure_name":"core/com/zoho/crm/api/scoring_rules/layout","name":"layout","type":"core/com/zoho/crm/api/scoring_rules/layout"},"modifiedTime":{"name":"modified_time","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"fieldRules":{"structure_name":"core/com/zoho/crm/api/scoring_rules/field_rule","name":"field_rules","type":"List"},"module":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"module","type":"core/com/zoho/crm/api/modules/modules"},"name":{"name":"name","max-length":25,"type":"String"},"signalRules":{"structure_name":"core/com/zoho/crm/api/scoring_rules/signal_rule","name":"signal_rules","type":"List"},"description":{"name":"description","max-length":500,"type":"String"},"createdTime":{"name":"created_time","type":"String"},"active":{"name":"active","type":"Boolean"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/fields/association_details":{"lookupField":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"lookup_field","type":"core/com/zoho/crm/api/modules/minified_module"},"relatedField":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"related_field","type":"core/com/zoho/crm/api/modules/minified_module"}},"core/com/zoho/crm/api/attachments/attachment":{"owner":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Owner","type":"core/com/zoho/crm/api/users/minified_user"},"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"fileName":{"name":"File_Name","type":"String"},"attachmentType":{"name":"$attachment_type","type":"Integer"},"editable":{"name":"$editable","type":"Boolean"},"type":{"name":"$type","type":"String"},"sharingPermission":{"name":"$sharing_permission","type":"String"},"parentId":{"structure_name":"core/com/zoho/crm/api/attachments/parent_id","name":"Parent_Id","type":"core/com/zoho/crm/api/attachments/parent_id"},"seModule":{"name":"$se_module","type":"String"},"size":{"name":"Size","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"linkUrl":{"name":"$link_url","type":"String"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"state":{"name":"$state","type":"String"},"fileId":{"name":"$file_id","type":"String"}},"core/com/zoho/crm/api/taxes/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","INVALID_DATA","EXPECTED_FIELD_MISSING","OAUTH_SCOPE_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INTERNAL_ERROR","BAD_REQUEST","NO_PERMISSION","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"param","type":"String"},{"name":"id","type":"String"},{"name":"name","type":"String"},{"name":"value","type":"String"},{"name":"maximum_length","type":"Integer"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"deprecated_version","type":"String"},{"structure_name":"core/com/zoho/crm/api/taxes/expected_field","name":"expected_fields","type":"List"}],"name":"details","type":"Map"},"message":{"values":["One of the expected parameter is missing","Given ID does not exist","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","required field not found","Sequence number out of range","Sequence number cannot be repeated in same request","tax not deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/pipeline/update_pipelines_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/email_templates/email_template":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"attachments":{"structure_name":"core/com/zoho/crm/api/email_templates/attachment","name":"attachments","type":"List"},"subject":{"name":"subject","type":"String"},"consentLinked":{"name":"consent_linked","type":"Boolean"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"lastUsageTime":{"name":"last_usage_time","type":"DateTime"},"editorMode":{"name":"editor_mode","type":"String"},"description":{"name":"description","type":"String"},"lastVersionStatistics":{"structure_name":"core/com/zoho/crm/api/email_templates/last_version_statistics","name":"last_version_statistics","type":"core/com/zoho/crm/api/email_templates/last_version_statistics"},"type":{"name":"type","type":"String"},"content":{"name":"content","type":"String"},"folder":{"structure_name":"core/com/zoho/crm/api/inventory_templates/folder","name":"folder","type":"core/com/zoho/crm/api/inventory_templates/folder"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"associated":{"name":"associated","type":"Boolean"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"category":{"name":"category","type":"String"},"favorite":{"name":"favorite","type":"Boolean"}},"core/com/zoho/crm/api/available_currencies/response_handler":{"classes":["core/com/zoho/crm/api/available_currencies/response_wrapper","core/com/zoho/crm/api/available_currencies/api_exception"],"interface":true},"core/com/zoho/crm/api/holidays/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/email_templates/response_handler":{"classes":["core/com/zoho/crm/api/email_templates/response_wrapper","core/com/zoho/crm/api/email_templates/api_exception"],"interface":true},"core/com/zoho/crm/api/mass_delete_cvid/territory":{"id":{"name":"id","type":"Long"},"includeChild":{"name":"include_child","type":"Boolean"}},"core/com/zoho/crm/api/user_type_users/get_usersof_user_type_param":{"filters":{"name":"filters","type":"String"},"type":{"name":"type","type":"String","required":true}},"core/com/zoho/crm/api/share_records/body_wrapper":{"notifyOnCompletion":{"name":"notify_on_completion","type":"Boolean"},"share":{"structure_name":"core/com/zoho/crm/api/share_records/share_record","name":"share","max-length":10,"type":"List","min-length":1},"notify":{"name":"notify","type":"Boolean"}},"core/com/zoho/crm/api/portal_user_type/api_exception":{"code":{"values":["INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_change_owner/response_handler":{"classes":["core/com/zoho/crm/api/mass_change_owner/response_wrapper","core/com/zoho/crm/api/mass_change_owner/api_exception"],"interface":true},"core/com/zoho/crm/api/users_unavailability/users_unavailability":{"allDay":{"name":"all_day","type":"Boolean"},"comments":{"name":"comments","max-length":250,"type":"String"},"service":{"name":"service","type":"String"},"tpCalendarId":{"name":"tp_calendar_id","type":"String"},"from":{"name":"from","type":"DateTime"},"tpEventId":{"name":"tp_event_id","type":"String"},"id":{"name":"id","type":"Long"},"to":{"name":"to","type":"DateTime"},"title":{"name":"title","type":"String"},"user":{"structure_name":"core/com/zoho/crm/api/users_unavailability/user","name":"user","type":"core/com/zoho/crm/api/users_unavailability/user"}},"core/com/zoho/crm/api/email_related_records/email":{"cc":{"structure_name":"core/com/zoho/crm/api/email_related_records/user_details","name":"cc","type":"List"},"summary":{"name":"summary","type":"String"},"owner":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"owner","type":"core/com/zoho/crm/api/users/minified_user"},"sentimentInfo":{"values":["positive","negative","neutral"],"name":"sentiment_info","type":"utils/util/choice"},"attachments":{"structure_name":"core/com/zoho/crm/api/email_related_records/attachments","name":"attachments","type":"List"},"read":{"name":"read","type":"Boolean"},"subject":{"name":"subject","type":"String"},"editable":{"name":"editable","type":"Boolean"},"messageId":{"name":"message_id","type":"String"},"source":{"name":"source","type":"String"},"sent":{"name":"sent","type":"Boolean"},"intent":{"values":["query","request","purchase","complaints","others","spam"],"name":"intent","type":"utils/util/choice"},"content":{"name":"content","type":"String"},"threadId":{"name":"thread_id","type":"Long"},"linkedRecord":{"structure_name":"core/com/zoho/crm/api/email_related_records/linked_record","name":"linked_record","type":"core/com/zoho/crm/api/email_related_records/linked_record"},"emotion":{"name":"emotion","type":"String"},"replyTo":{"structure_name":"core/com/zoho/crm/api/email_related_records/user_details","name":"reply_to","type":"core/com/zoho/crm/api/email_related_records/user_details"},"sentTime":{"name":"sent_time","type":"String"},"from":{"structure_name":"core/com/zoho/crm/api/email_related_records/user_details","name":"from","type":"core/com/zoho/crm/api/email_related_records/user_details"},"mailFormat":{"name":"mail_format","type":"String"},"to":{"structure_name":"core/com/zoho/crm/api/email_related_records/user_details","name":"to","type":"List"},"time":{"name":"time","type":"DateTime"},"status":{"structure_name":"core/com/zoho/crm/api/email_related_records/status","name":"status","type":"List"}},"core/com/zoho/crm/api/bulk_write/success_response":{"code":{"values":["FILE_UPLOAD_SUCCESS","SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"file_id","type":"Long"},{"name":"created_time","type":"DateTime"},{"name":"id","type":"String"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"}],"name":"details","type":"Map"},"message":{"values":["file uploaded.","success"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/multiselectlookup":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"connectedModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"connected_module","type":"core/com/zoho/crm/api/modules/minified_module"},"connectedlookupApiname":{"name":"connectedlookup_apiname","type":"String"},"connectedfieldApiname":{"name":"connectedfield_apiname","type":"String"},"lookupApiname":{"name":"lookup_apiname","type":"String"},"linkingModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"linking_module","type":"core/com/zoho/crm/api/modules/minified_module"},"id":{"name":"id","type":"Long"},"recordAccess":{"name":"record_access","type":"Boolean"}},"core/com/zoho/crm/api/reschedule_history/approval":{"delegate":{"name":"delegate","type":"Boolean"},"approve":{"name":"approve","type":"Boolean"},"reject":{"name":"reject","type":"Boolean"},"resubmit":{"name":"resubmit","type":"Boolean"}},"core/com/zoho/crm/api/org/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/backup/requester":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"zuid":{"name":"zuid","type":"String"}},"core/com/zoho/crm/api/territory_users/api_exception":{"code":{"values":["INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"owner_status","type":"String"},{"name":"id","type":"Long"},{"name":"resource_path_index","type":"Integer"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/associate_email/record":{"linkedRecord":{"structure_name":"core/com/zoho/crm/api/associate_email/linked_record","name":"linked_record","type":"core/com/zoho/crm/api/associate_email/linked_record"},"module":{"structure_name":"core/com/zoho/crm/api/associate_email/module_map","name":"module","type":"core/com/zoho/crm/api/associate_email/module_map"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/user_groups/sources_count":{"territories":{"name":"territories","type":"Integer"},"roles":{"name":"roles","type":"Integer"},"groups":{"name":"groups","type":"Integer"},"users":{"structure_name":"core/com/zoho/crm/api/user_groups/users","name":"users","type":"core/com/zoho/crm/api/user_groups/users"}},"core/com/zoho/crm/api/record/convert_body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/lead_converter","name":"data","max-length":1,"type":"List","min-length":1}},"core/com/zoho/crm/api/related_records/update_related_record_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/associate_email/linked_record":{"module":{"structure_name":"core/com/zoho/crm/api/associate_email/module_map","name":"module","type":"core/com/zoho/crm/api/associate_email/module_map"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/variable_groups/response_wrapper":{"variableGroups":{"structure_name":"core/com/zoho/crm/api/variable_groups/variable_group","name":"variable_groups","type":"List"}},"core/com/zoho/crm/api/layouts/tooltip":{"name":{"values":["Info Icon"],"name":"name","type":"utils/util/choice"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/layouts/layouts":{"displayLabel":{"name":"display_label","type":"String"},"modifiedTime":{"name":"modified_time","type":"DateTime"},"apiName":{"name":"api_name","type":"String"},"createdFor":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_for","type":"core/com/zoho/crm/api/users/minified_user"},"visible":{"name":"visible","type":"Boolean"},"generatedType":{"name":"generated_type","type":"String"},"actionsAllowed":{"structure_name":"core/com/zoho/crm/api/layouts/actions_allowed","name":"actions_allowed","type":"core/com/zoho/crm/api/layouts/actions_allowed"},"hasMoreProfiles":{"name":"has_more_profiles","type":"Boolean"},"profiles":{"structure_name":"core/com/zoho/crm/api/layouts/profiles","name":"profiles","type":"List"},"source":{"name":"source","type":"String"},"showBusinessCard":{"name":"show_business_card","type":"Boolean"},"sections":{"structure_name":"core/com/zoho/crm/api/layouts/sections","name":"sections","type":"List"},"convertMapping":{"structure_name":"core/com/zoho/crm/api/layouts/convert_mapping","name":"convert_mapping","type":"core/com/zoho/crm/api/layouts/convert_mapping"},"displayType":{"name":"display_type","type":"Integer"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/scoring_rules/layout":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/deleted_record":{"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"displayName":{"name":"display_name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"deletedTime":{"name":"deleted_time","type":"DateTime"},"deletedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"deleted_by","type":"core/com/zoho/crm/api/users/minified_user"}},"core/com/zoho/crm/api/hipaa_compliance/modules":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/notifications/action_handler":{"classes":["core/com/zoho/crm/api/notifications/api_exception","core/com/zoho/crm/api/notifications/action_wrapper"],"interface":true},"core/com/zoho/crm/api/layouts/section_subform_field":{"layout":{"structure_name":"core/com/zoho/crm/api/layouts/minified_layout","name":"layout","type":"core/com/zoho/crm/api/layouts/minified_layout"},"module":{"name":"module","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/fiscal_year/response_handler":{"classes":["core/com/zoho/crm/api/fiscal_year/api_exception","core/com/zoho/crm/api/fiscal_year/response_wrapper"],"interface":true},"core/com/zoho/crm/api/users_transfer_delete/status":{"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/notifications/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"structure_name":"core/com/zoho/crm/api/notifications/event","name":"events","type":"List"},{"name":"resource_uri","type":"String"},{"name":"resource_id","type":"String"},{"name":"channel_id","type":"Long"},{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["Successfully subscribed for actions-watch of the given module","Successfully un-subscribed from actions-watch","Successfully updated the subscribe details","Successfully removed the subscribe details"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/entity_scores/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/entity_scores/entity_scores","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/entity_scores/info","name":"info","type":"core/com/zoho/crm/api/entity_scores/info"}},"core/com/zoho/crm/api/users_unavailability/response_handler":{"classes":["core/com/zoho/crm/api/users_unavailability/response_wrapper","core/com/zoho/crm/api/users_unavailability/api_exception"],"interface":true},"core/com/zoho/crm/api/record/mass_update_body_wrapper":{"cvid":{"name":"cvid","type":"String"},"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"List"},"criteria":{"structure_name":"core/com/zoho/crm/api/record/criteria","name":"criteria","type":"List"},"ids":{"name":"ids","type":"List"},"territory":{"structure_name":"core/com/zoho/crm/api/record/mass_update_territory","name":"territory","type":"core/com/zoho/crm/api/record/mass_update_territory"},"overWrite":{"name":"over_write","type":"Boolean"}},"core/com/zoho/crm/api/taxes/tax":{"displayLabel":{"name":"display_label","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"delete1":{"name":"_delete","type":"Boolean"},"value":{"regex":"[0-9]{7}","name":"value","type":"Double"}},"core/com/zoho/crm/api/modules/related_list_properties":{"sortOrder":{"name":"sort_order","type":"String"},"sortBy":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"sort_by","type":"core/com/zoho/crm/api/fields/minified_field"},"fields":{"name":"fields","type":"List"}},"core/com/zoho/crm/api/users_unavailability/get_users_unavailability_param":{"territoryIds":{"name":"territory_ids","type":"String"},"roleIds":{"name":"role_ids","type":"String"},"groupIds":{"name":"group_ids","type":"String"},"filters":{"name":"filters","type":"String"},"includeInnerDetails":{"values":["user.zuid"],"name":"include_inner_details","type":"String"}},"core/com/zoho/crm/api/appointment_preference/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","DEPENDENT_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"structure_name":"utils/util/choice","values":["create_deal","do_not_create_deal"],"name":"supported_values","type":"List"},{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"}],"name":"dependee","type":"Map"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/conversion_option":{"preferenceFieldMatchedValue":{"structure_name":"core/com/zoho/crm/api/record/preference_field_matched_value","name":"preference_field_matched_value","type":"core/com/zoho/crm/api/record/preference_field_matched_value"},"deals":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Deals","type":"List"},"modulePreference":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"module_preference","type":"core/com/zoho/crm/api/modules/modules"},"accounts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Accounts","type":"List"},"contacts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Contacts","type":"List"},"modulesWithMultipleLayouts":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"modules_with_multiple_layouts","type":"List"}},"core/com/zoho/crm/api/record/mass_update_response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/mass_update_response","name":"data","type":"List"}},"core/com/zoho/crm/api/roles/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/org/license_details":{"paidType":{"name":"paid_type","type":"String"},"trialAction":{"name":"trial_action","type":"String"},"trialType":{"name":"trial_type","type":"String"},"paidExpiry":{"name":"paid_expiry","type":"DateTime"},"paid":{"name":"paid","type":"Boolean"},"usersLicensePurchased":{"name":"users_license_purchased","type":"Integer"},"trialExpiry":{"name":"trial_expiry","type":"String"}},"core/com/zoho/crm/api/pipeline/update_pipeline_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/user_groups/association_response":{"resource":{"structure_name":"core/com/zoho/crm/api/user_groups/resource","name":"resource","type":"core/com/zoho/crm/api/user_groups/resource"},"detail":{"structure_name":"core/com/zoho/crm/api/user_groups/association_module","name":"detail","type":"core/com/zoho/crm/api/user_groups/association_module"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/share_records/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"String"}],"name":"details","type":"Map"},"message":{"values":["record will be shared successfully","Sharing Revoked"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_invite/portal_invite":{"data":{"structure_name":"core/com/zoho/crm/api/portal_invite/portal","name":"data","type":"List"}},"core/com/zoho/crm/api/available_currencies/currency":{"displayValue":{"name":"display_value","type":"String"},"symbol":{"name":"symbol","type":"String"},"thousandSeparator":{"name":"thousand_separator","type":"String"},"decimalPlaces":{"name":"decimal_places","type":"String"},"decimalSeparator":{"name":"decimal_separator","type":"String"},"isoCode":{"name":"iso_code","type":"String"},"displayName":{"name":"display_name","type":"String"}},"core/com/zoho/crm/api/bulk_read/action_response":{"classes":["core/com/zoho/crm/api/bulk_read/success_response","core/com/zoho/crm/api/bulk_read/api_exception"],"interface":true},"core/com/zoho/crm/api/reschedule_history/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/reschedule_history/reschedule_history","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/reschedule_history/info","name":"info","type":"List"}},"core/com/zoho/crm/api/holidays/holiday":{"date":{"name":"date","type":"Date"},"year":{"name":"year","type":"Integer"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"shiftHour":{"structure_name":"core/com/zoho/crm/api/holidays/shift_hour","name":"shift_hour","type":"core/com/zoho/crm/api/holidays/shift_hour"}},"core/com/zoho/crm/api/users/action_handler":{"classes":["core/com/zoho/crm/api/users/api_exception","core/com/zoho/crm/api/users/action_wrapper"],"interface":true},"core/com/zoho/crm/api/variable_groups/response_handler":{"classes":["core/com/zoho/crm/api/variable_groups/response_wrapper","core/com/zoho/crm/api/variable_groups/api_exception"],"interface":true},"core/com/zoho/crm/api/bulk_read/query":{"cvid":{"name":"cvid","type":"Long"},"criteria":{"structure_name":"core/com/zoho/crm/api/bulk_read/criteria","name":"criteria","type":"core/com/zoho/crm/api/bulk_read/criteria"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"page":{"regex":"[0-9]|[1-4][0-9]|50","name":"page","type":"Integer"},"fields":{"name":"fields","type":"List"},"fileType":{"values":["ics"],"name":"file_type","type":"utils/util/choice"}},"core/com/zoho/crm/api/modules/module_fields":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"sharingProperties":{"structure_name":"core/com/zoho/crm/api/modules/sharing_properties","name":"sharing_properties","type":"core/com/zoho/crm/api/modules/sharing_properties"},"apiName":{"name":"api_name","type":"String"},"webhook":{"name":"webhook","type":"Boolean"},"associatedModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"associated_module","type":"core/com/zoho/crm/api/modules/minified_module"},"defaultValue":{"name":"default_value","type":"String"},"tooltip":{"structure_name":"core/com/zoho/crm/api/fields/tooltip","name":"tooltip","type":"core/com/zoho/crm/api/fields/tooltip"},"quickSequenceNumber":{"name":"quick_sequence_number","type":"String"},"jsonType":{"name":"json_type","type":"String"},"type":{"name":"type","type":"String"},"availableInUserLayout":{"name":"available_in_user_layout","type":"Boolean"},"rollupSummary":{"structure_name":"core/com/zoho/crm/api/fields/rollup_summary","name":"rollup_summary","type":"core/com/zoho/crm/api/fields/rollup_summary"},"blueprintSupported":{"name":"blueprint_supported","type":"Boolean"},"createdTime":{"name":"created_time","type":"DateTime"},"showType":{"name":"show_type","type":"Integer"},"globalPicklist":{"name":"global_picklist","type":"Object"},"id":{"name":"id","type":"Long"},"additionalColumn":{"name":"additional_column","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"filterable":{"name":"filterable","type":"Boolean"},"emailParser":{"structure_name":"core/com/zoho/crm/api/fields/email_parser","name":"email_parser","type":"core/com/zoho/crm/api/fields/email_parser"},"visible":{"name":"visible","type":"Boolean"},"dataType":{"values":["formula","text","boolean","picklist","datetime","website","autonumber","textarea","email","phone","integer","double","date","formula","text","boolean","picklist","datetime","website","autonumber","textarea","lookup","email","userlookup","phone","integer","double","date"],"name":"data_type","type":"utils/util/choice"},"profiles":{"structure_name":"core/com/zoho/crm/api/fields/profile","name":"profiles","type":"List"},"readOnly":{"name":"read_only","type":"Boolean"},"historyTracking":{"structure_name":"core/com/zoho/crm/api/fields/history_tracking","name":"history_tracking","type":"core/com/zoho/crm/api/fields/history_tracking"},"systemMandatory":{"name":"system_mandatory","type":"Boolean"},"separator":{"name":"separator","type":"Boolean"},"customField":{"name":"custom_field","type":"Boolean"},"searchable":{"name":"searchable","type":"Boolean"},"decimalPlace":{"name":"decimal_place","type":"Integer"},"createdSource":{"name":"created_source","type":"String"},"displayType":{"name":"display_type","type":"Integer"},"external":{"structure_name":"core/com/zoho/crm/api/fields/external","name":"external","type":"core/com/zoho/crm/api/fields/external"},"subModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"sub_module","type":"core/com/zoho/crm/api/modules/minified_module"},"unique":{"structure_name":"core/com/zoho/crm/api/fields/unique","name":"unique","type":"core/com/zoho/crm/api/fields/unique"},"viewType":{"structure_name":"core/com/zoho/crm/api/fields/view_type","name":"view_type","type":"core/com/zoho/crm/api/fields/view_type"},"displayField":{"name":"display_field","type":"Boolean"},"operationType":{"structure_name":"core/com/zoho/crm/api/fields/operation_type","name":"operation_type","type":"core/com/zoho/crm/api/fields/operation_type"},"hipaaComplianceEnabled":{"name":"hipaa_compliance_enabled","type":"Boolean"},"crypt":{"structure_name":"core/com/zoho/crm/api/fields/crypt","name":"crypt","type":"core/com/zoho/crm/api/fields/crypt"},"fileUpoladOptionlist":{"structure_name":"core/com/zoho/crm/api/fields/file_upolad_option","name":"file_upolad_optionlist","type":"List"},"enableColourCode":{"name":"enable_colour_code","type":"Boolean"},"virtualField":{"name":"virtual_field","type":"Boolean"},"hipaaCompliance":{"structure_name":"core/com/zoho/crm/api/fields/hipaa_compliance","name":"hipaa_compliance","type":"core/com/zoho/crm/api/fields/hipaa_compliance"},"associationDetails":{"structure_name":"core/com/zoho/crm/api/fields/association_details","name":"association_details","type":"core/com/zoho/crm/api/fields/association_details"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/fields/pick_list_value","name":"pick_list_values","type":"List"},"fieldLabel":{"name":"field_label","type":"String"},"referFromField":{"structure_name":"core/com/zoho/crm/api/fields/refer_from_field","name":"refer_from_field","type":"core/com/zoho/crm/api/fields/refer_from_field"},"allowedModules":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"allowed_modules","type":"List"},"fieldReadOnly":{"name":"field_read_only","type":"Boolean"},"businesscardSupported":{"name":"businesscard_supported","type":"Boolean"},"currency":{"structure_name":"core/com/zoho/crm/api/fields/currency","name":"currency","type":"core/com/zoho/crm/api/fields/currency"},"multiuserlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiuserlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"displayLabel":{"name":"display_label","type":"String"},"lookup":{"structure_name":"core/com/zoho/crm/api/modules/module_field_lookup","name":"lookup","type":"core/com/zoho/crm/api/modules/module_field_lookup"},"length":{"values":[120],"name":"length","type":"utils/util/choice"},"pickListValuesSortedLexically":{"name":"pick_list_values_sorted_lexically","type":"Boolean"},"sortable":{"name":"sortable","type":"Boolean"},"autoNumber":{"structure_name":"core/com/zoho/crm/api/fields/auto_number","name":"auto_number","type":"core/com/zoho/crm/api/fields/auto_number"},"private1":{"structure_name":"core/com/zoho/crm/api/fields/private","name":"private","type":"core/com/zoho/crm/api/fields/private"},"convertMapping":{"structure_name":"core/com/zoho/crm/api/fields/convert_mapping","name":"convert_mapping","type":"core/com/zoho/crm/api/fields/convert_mapping"},"multiModuleLookup":{"structure_name":"core/com/zoho/crm/api/fields/multi_module_lookup","name":"multi_module_lookup","type":"core/com/zoho/crm/api/fields/multi_module_lookup"},"massUpdate":{"name":"mass_update","type":"Boolean"},"uiType":{"name":"ui_type","type":"Integer"},"formula":{"structure_name":"core/com/zoho/crm/api/fields/formula","name":"formula","type":"core/com/zoho/crm/api/fields/formula"},"category":{"name":"category","type":"Integer"},"multiselectlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiselectlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"columnName":{"name":"column_name","type":"String"}},"core/com/zoho/crm/api/timelines/name_id_structure":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/variables/api_exception":{"code":{"values":["DUPLICATE_DATA","REQUIRED_PARAM_MISSING","JSON_PARSE_ERROR","PATTERN_NOT_MATCHED","INVALID_DATA","MANDATORY_NOT_FOUND","EXPECTED_FIELD_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"param_name","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"},{"name":"maximum_length","type":"Integer"},{"structure_name":"core/com/zoho/crm/api/variables/error_details","name":"expected_fields","type":"List"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/share_records/delete_action_handler":{"classes":["core/com/zoho/crm/api/share_records/delete_action_wrapper","core/com/zoho/crm/api/share_records/api_exception"],"interface":true},"core/com/zoho/crm/api/scoring_rules/signal":{"namespace":{"values":["EmailInsight"],"name":"namespace","type":"utils/util/choice"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/holidays/create_business_holiday":{"holidays":{"structure_name":"core/com/zoho/crm/api/holidays/business_holiday","name":"holidays","type":"List"}},"core/com/zoho/crm/api/inventory_templates/get_inventory_templates_param":{"module":{"name":"module","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"sortBy":{"name":"sort_by","type":"String"},"category":{"name":"category","type":"String"}},"core/com/zoho/crm/api/tags/count_response_wrapper":{"count":{"name":"count","type":"String"}},"core/com/zoho/crm/api/business_hours/response_handler":{"classes":["core/com/zoho/crm/api/business_hours/response_wrapper","core/com/zoho/crm/api/business_hours/api_exception"],"interface":true},"core/com/zoho/crm/api/portals_meta/filters":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/tags/action_response":{"classes":["core/com/zoho/crm/api/tags/api_exception","core/com/zoho/crm/api/tags/success_response"],"interface":true},"core/com/zoho/crm/api/backup/action_handler":{"classes":["core/com/zoho/crm/api/backup/action_wrapper","core/com/zoho/crm/api/backup/api_exception"],"interface":true},"core/com/zoho/crm/api/mass_convert/portal_user_type":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/tags/body_wrapper":{"tags":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"tags","type":"List"}},"core/com/zoho/crm/api/associate_email/body_wrapper":{"emails":{"structure_name":"core/com/zoho/crm/api/associate_email/associate_email","name":"Emails","type":"List"}},"core/com/zoho/crm/api/bulk_write/field_mapping":{"apiName":{"name":"api_name","type":"String"},"defaultValue":{"structure_name":"core/com/zoho/crm/api/bulk_write/default_value","name":"default_value","type":"core/com/zoho/crm/api/bulk_write/default_value"},"module":{"name":"module","type":"String"},"format":{"name":"format","type":"String"},"index":{"name":"index","type":"Integer"},"findBy":{"name":"find_by","type":"String"}},"core/com/zoho/crm/api/shift_hours/response_wrapper":{"shiftHours":{"structure_name":"core/com/zoho/crm/api/shift_hours/shift_hours","name":"shift_hours","type":"List"},"shiftCount":{"structure_name":"core/com/zoho/crm/api/shift_hours/shift_count","name":"shift_count","type":"core/com/zoho/crm/api/shift_hours/shift_count"}},"core/com/zoho/crm/api/available_currencies/response_wrapper":{"availableCurrencies":{"structure_name":"core/com/zoho/crm/api/available_currencies/currency","name":"available_currencies","type":"List"}},"core/com/zoho/crm/api/mass_delete_cvid/action_handler":{"classes":["core/com/zoho/crm/api/mass_delete_cvid/api_exception","core/com/zoho/crm/api/mass_delete_cvid/action_wrapper"],"interface":true},"core/com/zoho/crm/api/profiles/get_profiles_param":{"includeLiteProfile":{"name":"include_lite_profile","type":"Boolean"}},"core/com/zoho/crm/api/custom_views/get_custom_views_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/variables/body_wrapper":{"variables":{"structure_name":"core/com/zoho/crm/api/variables/variable","name":"variables","type":"List"}},"core/com/zoho/crm/api/blueprint/multi_select_lookup":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"connectedlookupApiname":{"name":"connectedlookup_apiname","type":"String"},"lookupApiname":{"name":"lookup_apiname","type":"String"},"linkingModule":{"name":"linking_module","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/email_templates/attachment":{"fileName":{"name":"file_name","type":"String"},"size":{"name":"size","type":"Long"},"id":{"name":"id","type":"Long"},"fileId":{"name":"file_id","type":"String"}},"core/com/zoho/crm/api/email_related_records/get_emails_related_records_param":{"index":{"name":"index","type":"String"},"type":{"values":["sent_from_crm","scheduled_in_crm","drafts","user_emails"],"name":"type","type":"String","required":true},"ownerId":{"name":"owner_id","type":"Long","required":true}},"core/com/zoho/crm/api/cancel_meetings/action_handler":{"classes":["core/com/zoho/crm/api/cancel_meetings/action_wrapper","core/com/zoho/crm/api/cancel_meetings/api_exception"],"interface":true},"core/com/zoho/crm/api/users_unavailability/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/users_territories/transfer_action_handler":{"classes":["core/com/zoho/crm/api/users_territories/api_exception","core/com/zoho/crm/api/users_territories/action_wrapper","core/com/zoho/crm/api/users_territories/transfer_action_wrapper"],"interface":true},"core/com/zoho/crm/api/email_templates/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_convert/move_attachments_to":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/tags/info":{"count":{"name":"count","type":"Integer"},"allowedCount":{"name":"allowed_count","type":"Integer"}},"core/com/zoho/crm/api/contact_roles/action_response":{"classes":["core/com/zoho/crm/api/contact_roles/api_exception","core/com/zoho/crm/api/contact_roles/success_response"],"interface":true},"core/com/zoho/crm/api/currencies/action_handler":{"classes":["core/com/zoho/crm/api/currencies/api_exception","core/com/zoho/crm/api/currencies/action_wrapper","core/com/zoho/crm/api/currencies/base_currency_action_wrapper"],"interface":true},"core/com/zoho/crm/api/holidays/action_response":{"classes":["core/com/zoho/crm/api/holidays/api_exception","core/com/zoho/crm/api/holidays/success_response"],"interface":true},"core/com/zoho/crm/api/record/mass_update_action_handler":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/mass_update_action_wrapper"],"interface":true},"core/com/zoho/crm/api/send_mail/action_response":{"classes":["core/com/zoho/crm/api/send_mail/success_response","core/com/zoho/crm/api/send_mail/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/body_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/users_territories/territory","name":"territories","type":"List"}},"core/com/zoho/crm/api/reschedule_history/action_handler":{"classes":["core/com/zoho/crm/api/reschedule_history/api_exception","core/com/zoho/crm/api/reschedule_history/action_wrapper"],"interface":true},"core/com/zoho/crm/api/user_groups/user_group":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/deal_contact_roles/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_DATA","EXPECTED_FIELD_MISSING","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR","REQUIRED_PARAM_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"structure_name":"core/com/zoho/crm/api/deal_contact_roles/error_details","name":"expected_fields","type":"List"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/file_upolad_option":{"displayValue":{"name":"display_value","type":"String"},"actualValue":{"name":"actual_value","type":"String"}},"core/com/zoho/crm/api/custom_views/translation":{"createdByMe":{"name":"created_by_me","type":"String"},"otherUsersViews":{"name":"other_users_views","type":"String"},"publicViews":{"name":"public_views","type":"String"},"sharedWithMe":{"name":"shared_with_me","type":"String"}},"core/com/zoho/crm/api/users_territories/validation_wrapper":{"validateBeforeTransfer":{"structure_name":"core/com/zoho/crm/api/users_territories/validation_group","name":"validate_before_transfer","type":"List"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline_action_handler":{"classes":["core/com/zoho/crm/api/pipeline/api_exception","core/com/zoho/crm/api/pipeline/transfer_pipeline_action_wrapper"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/pick_list_mapping":{"displayValue":{"name":"display_value","type":"String"},"maps":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/picklist_map","name":"maps","type":"List"},"actualValue":{"name":"actual_value","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mass_delete_cvid/action_response":{"classes":["core/com/zoho/crm/api/mass_delete_cvid/success_response","core/com/zoho/crm/api/mass_delete_cvid/mass_delete_scheduled","core/com/zoho/crm/api/mass_delete_cvid/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/transfer_action_wrapper":{"transferAndDelink":{"structure_name":"core/com/zoho/crm/api/users_territories/transfer_action_response","name":"transfer_and_delink","type":"List"}},"core/com/zoho/crm/api/wizards/segment":{"displayLabel":{"name":"display_label","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"buttons":{"structure_name":"core/com/zoho/crm/api/wizards/button","name":"buttons","type":"List"},"resource":{"structure_name":"core/com/zoho/crm/api/wizards/resource","name":"resource","type":"core/com/zoho/crm/api/wizards/resource"},"id":{"name":"id","type":"Long"},"columnCount":{"name":"column_count","type":"Integer"},"type":{"name":"type","type":"String"},"fields":{"structure_name":"core/com/zoho/crm/api/fields/fields","name":"fields","type":"List"}},"core/com/zoho/crm/api/hipaa_compliance/api_exception":{"code":{"values":["INVALID_API_NAME","NOT_SUPPORTED"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/wizards/api_exception":{"code":{"values":["INVALID_DATA","INTERNAL_ERROR","OAUTH_SCOPE_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","BAD_REQUEST","NO_PERMISSION","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"permissions","type":"List"},{"name":"param_name","type":"String"},{"name":"api_name","type":"String"}],"name":"details","type":"Map"},"message":{"values":["Invalid Wizard ID","the module name given seems to be invalid","feature not available in this edition","permission denied","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","Internal server error occurred."],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_read/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/mail_merge/download_mail_merge":{"fileName":{"name":"file_name","max-length":255,"type":"String"},"password":{"name":"password","type":"String"},"mailMergeTemplate":{"structure_name":"core/com/zoho/crm/api/mail_merge/mail_merge_template","name":"mail_merge_template","type":"core/com/zoho/crm/api/mail_merge/mail_merge_template"},"outputFormat":{"values":["pdf","docx","html"],"name":"output_format","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_invite/success_response":{"code":{"values":["SUCCESS","SCHEDULED"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"record_id","type":"Long"},{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/users_territories/territory":{"manager":{"structure_name":"core/com/zoho/crm/api/users_territories/manager","name":"Manager","type":"core/com/zoho/crm/api/users_territories/manager"},"name":{"name":"Name","type":"String"},"id":{"name":"id","type":"Long"},"reportingTo":{"structure_name":"core/com/zoho/crm/api/users_territories/manager","name":"Reporting_To","type":"core/com/zoho/crm/api/users_territories/manager"}},"core/com/zoho/crm/api/record/mass_update_response_handler":{"classes":["core/com/zoho/crm/api/record/mass_update_response_wrapper","core/com/zoho/crm/api/record/api_exception"],"interface":true},"core/com/zoho/crm/api/layouts/default_view":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete_by_id":{"transfer":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/transfer","name":"transfer","type":"core/com/zoho/crm/api/users_transfer_delete/transfer"},"moveSubordinate":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/move_subordinate","name":"move_subordinate","type":"core/com/zoho/crm/api/users_transfer_delete/move_subordinate"}},"core/com/zoho/crm/api/contact_roles/contact_role":{"sequenceNumber":{"name":"sequence_number","type":"Integer"},"name":{"regex":"[A-Za-z0-9]{50}","name":"name","max-length":50,"type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/multi_select_lookup":{"fieldname":{"name":"fieldName","type":"Map"},"hasMore":{"name":"$has_more","type":"Map"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/related_records/delete_related_records_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/currencies/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/appointment_preference/field_mappings":{"field":{"structure_name":"core/com/zoho/crm/api/appointment_preference/field","name":"field","type":"core/com/zoho/crm/api/appointment_preference/field"},"type":{"values":["static","merge_field"],"name":"type","type":"utils/util/choice"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/modules/territory":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"subordinates":{"name":"subordinates","type":"Boolean"}},"core/com/zoho/crm/api/attachments/get_attachments_param":{"perPage":{"name":"per_page","type":"Integer"},"ids":{"name":"ids","type":"Long","required":true},"page":{"name":"page","type":"Integer"},"fields":{"name":"fields","type":"String","required":true}},"core/com/zoho/crm/api/mass_delete_cvid/record_id_body_wrapper":{"ids":{"name":"ids","max-length":10,"type":"List"},"territory":{"structure_name":"core/com/zoho/crm/api/mass_delete_cvid/territory","name":"territory","type":"core/com/zoho/crm/api/mass_delete_cvid/territory"}},"core/com/zoho/crm/api/taxes/org_tax":{"preference":{"structure_name":"core/com/zoho/crm/api/taxes/preference","name":"preference","type":"core/com/zoho/crm/api/taxes/preference"},"taxes":{"structure_name":"core/com/zoho/crm/api/taxes/tax","name":"taxes","type":"List"}},"core/com/zoho/crm/api/associate_email/to":{"userName":{"name":"user_name","type":"String"},"email":{"regex":"[a-z]{7}[@]zoho[.]com","name":"email","type":"String"}},"core/com/zoho/crm/api/share_records/delete_action_wrapper":{"share":{"structure_name":"core/com/zoho/crm/api/share_records/delete_action_response","name":"share","interface":true,"type":"core/com/zoho/crm/api/share_records/delete_action_response"}},"core/com/zoho/crm/api/fields/rollup_criteria":{"comparator":{"name":"comparator","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"field","type":"core/com/zoho/crm/api/fields/minified_field"},"value":{"name":"value","type":"Object"}},"core/com/zoho/crm/api/email_compose_meta/compose_settings":{"fontFamily":{"name":"font_family","type":"String"},"emailSignatures":{"name":"email_signatures","type":"List"},"defaultFromAddress":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/default_form","name":"default_from_address","type":"core/com/zoho/crm/api/email_compose_meta/default_form"},"fontSize":{"name":"font_size","type":"Integer"}},"core/com/zoho/crm/api/users_unavailability/user":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"zuid":{"name":"zuid","type":"String"}},"core/com/zoho/crm/api/field_attachments/response_handler":{"classes":["core/com/zoho/crm/api/field_attachments/file_body_wrapper","core/com/zoho/crm/api/field_attachments/api_exception"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_DATA","MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","NOT_SUPPORTED","INVALID_URL_PATTERN","INVALID_TOKEN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"param","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/related_lists/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/custom_views/body_wrapper":{"customViews":{"structure_name":"core/com/zoho/crm/api/custom_views/custom_view","name":"custom_views","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/custom_views/info","name":"info","type":"core/com/zoho/crm/api/custom_views/info"}},"core/com/zoho/crm/api/mass_change_owner/check_status_param":{"jobId":{"name":"job_id","type":"Long","required":true}},"core/com/zoho/crm/api/bulk_write/default_value":{"module":{"name":"module","type":"String"},"name":{"name":"name","type":"String"},"value":{"name":"value","type":"Object"}},"core/com/zoho/crm/api/profiles/category":{"classes":["core/com/zoho/crm/api/profiles/category_module","core/com/zoho/crm/api/profiles/category_others"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/get_map_dependency_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/portal_invite/action_response":{"classes":["core/com/zoho/crm/api/portal_invite/success_response","core/com/zoho/crm/api/portal_invite/api_exception"],"interface":true},"core/com/zoho/crm/api/blueprint/auto_number":{"startNumber":{"name":"start_number","type":"Integer"},"prefix":{"name":"prefix","type":"String"},"suffix":{"name":"suffix","type":"String"}},"core/com/zoho/crm/api/user_groups/sources":{"subTerritories":{"name":"sub_territories","type":"Boolean"},"source":{"structure_name":"core/com/zoho/crm/api/user_groups/source","name":"source","type":"core/com/zoho/crm/api/user_groups/source"},"type":{"values":["users","territories","roles"],"name":"type","type":"utils/util/choice"},"subordinates":{"name":"subordinates","type":"Boolean"}},"core/com/zoho/crm/api/blueprint/response_wrapper":{"blueprint":{"structure_name":"core/com/zoho/crm/api/blueprint/blue_print","name":"blueprint","type":"core/com/zoho/crm/api/blueprint/blue_print"}},"core/com/zoho/crm/api/users/action_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/users/action_response","name":"users","type":"List"}},"core/com/zoho/crm/api/layouts/response_handler":{"classes":["core/com/zoho/crm/api/layouts/response_wrapper","core/com/zoho/crm/api/layouts/api_exception"],"interface":true},"core/com/zoho/crm/api/bulk_read/response_handler":{"classes":["core/com/zoho/crm/api/bulk_read/api_exception","core/com/zoho/crm/api/bulk_read/file_body_wrapper","core/com/zoho/crm/api/bulk_read/response_wrapper"],"interface":true},"core/com/zoho/crm/api/notes/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"Modified_Time","type":"DateTime"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"Created_Time","type":"DateTime"},{"name":"id","type":"String"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"}],"name":"details","type":"Map"},"message":{"values":["record added","record updated","record deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/backup/action_wrapper":{"backup":{"structure_name":"core/com/zoho/crm/api/backup/action_response","name":"backup","interface":true,"type":"core/com/zoho/crm/api/backup/action_response"}},"core/com/zoho/crm/api/tags/add_tags_to_multiple_records_param":{"overWrite":{"name":"over_write","type":"String"}},"core/com/zoho/crm/api/users/profile":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/scoring_rules/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["scoring rule created successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_delete_cvid/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/mass_delete_cvid/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/backup/history_wrapper":{"history":{"structure_name":"core/com/zoho/crm/api/backup/history","name":"history","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/backup/info","name":"info","type":"core/com/zoho/crm/api/backup/info"}},"core/com/zoho/crm/api/territories/criteria":{"comparator":{"name":"comparator","type":"String"},"groupOperator":{"name":"group_operator","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/territories/field","name":"field","type":"core/com/zoho/crm/api/territories/field"},"value":{"name":"value","type":"Object"},"group":{"structure_name":"core/com/zoho/crm/api/territories/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/fields/multi_module_lookup":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"modules":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"modules","type":"List"}},"core/com/zoho/crm/api/change_owner/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_change_owner/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/mass_change_owner/status","name":"data","type":"List"}},"core/com/zoho/crm/api/portal_invite/action_wrapper":{"portalInvite":{"structure_name":"core/com/zoho/crm/api/portal_invite/action_response","name":"portal_invite","type":"List"}},"core/com/zoho/crm/api/notifications/action_wrapper":{"watch":{"structure_name":"core/com/zoho/crm/api/notifications/action_response","name":"watch","type":"List"}},"core/com/zoho/crm/api/tags/merge_wrapper":{"tags":{"structure_name":"core/com/zoho/crm/api/tags/conflict_wrapper","name":"tags","max-length":1,"type":"List","min-length":1}},"core/com/zoho/crm/api/currencies/base_currency":{"symbol":{"name":"symbol","type":"String"},"isoCode":{"name":"iso_code","type":"String"},"exchangeRate":{"regex":"[1-9]{2}[.][1-9]{9}","name":"exchange_rate","type":"String"},"format":{"structure_name":"core/com/zoho/crm/api/currencies/format","name":"format","type":"core/com/zoho/crm/api/currencies/format"},"name":{"name":"name","type":"String"},"prefixSymbol":{"name":"prefix_symbol","type":"Boolean"},"id":{"name":"id","type":"Long"},"isActive":{"name":"is_active","type":"Boolean"}},"core/com/zoho/crm/api/templates/folder":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/notifications/action_response":{"classes":["core/com/zoho/crm/api/notifications/api_exception","core/com/zoho/crm/api/notifications/success_response"],"interface":true},"core/com/zoho/crm/api/shift_hours/delete_shift_hour_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/field_map_dependency/update_map_dependency_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/layouts/deal_field":{"apiName":{"name":"api_name","type":"String"},"fieldLabel":{"name":"field_label","type":"String"},"id":{"name":"id","type":"Long"},"required":{"name":"required","type":"Boolean"}},"core/com/zoho/crm/api/portal_user_type/fields":{"apiName":{"name":"api_name","type":"String"},"readOnly":{"name":"read_only","type":"Boolean"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/currencies/body_wrapper":{"currencies":{"structure_name":"core/com/zoho/crm/api/currencies/currency","name":"currencies","type":"List"}},"core/com/zoho/crm/api/download_inline_images/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/profiles/permission_detail":{"displayLabel":{"name":"display_label","type":"String"},"module":{"name":"module","type":"String"},"name":{"name":"name","type":"String"},"customizable":{"name":"customizable","type":"Boolean"},"id":{"name":"id","type":"Long"},"enabled":{"values":[true],"name":"enabled","type":"utils/util/choice"},"parentPermissions":{"name":"parent_permissions","type":"List"}},"core/com/zoho/crm/api/backup/history":{"fileName":{"name":"file_name","type":"String"},"repeatType":{"name":"repeat_type","type":"String"},"count":{"name":"count","type":"Integer"},"action":{"name":"action","type":"String"},"id":{"name":"id","type":"Long"},"state":{"name":"state","type":"String"},"doneBy":{"structure_name":"core/com/zoho/crm/api/backup/requester","name":"done_by","type":"core/com/zoho/crm/api/backup/requester"},"logTime":{"name":"log_time","type":"DateTime"}},"core/com/zoho/crm/api/associate_email/action_response":{"classes":["core/com/zoho/crm/api/associate_email/success_response","core/com/zoho/crm/api/associate_email/api_exception"],"interface":true},"core/com/zoho/crm/api/entity_scores/scoring_rule_structure":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portal_user_type/permissions":{"view":{"values":[true],"name":"view","type":"utils/util/choice"},"edit":{"name":"edit","type":"Boolean"},"editSharedRecords":{"name":"edit_shared_records","type":"Boolean"},"create":{"name":"create","type":"Boolean"},"createAttachment":{"name":"create_attachment","type":"Boolean"},"delete1":{"name":"delete","type":"Boolean"},"deleteAttachment":{"name":"delete_attachment","type":"Boolean"}},"core/com/zoho/crm/api/wizards/get_wizardby_id_param":{"layoutId":{"name":"layout_id","type":"String","required":true}},"core/com/zoho/crm/api/bulk_read/request_wrapper":{"query":{"structure_name":"core/com/zoho/crm/api/bulk_read/query","name":"query","type":"core/com/zoho/crm/api/bulk_read/query"},"callback":{"structure_name":"core/com/zoho/crm/api/bulk_read/call_back","name":"callback","type":"core/com/zoho/crm/api/bulk_read/call_back"},"fileType":{"values":["ics","csv"],"name":"file_type","type":"utils/util/choice"}},"core/com/zoho/crm/api/field_map_dependency/sub_module":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portal_invite/data":{"classes":["core/com/zoho/crm/api/portal_invite/success_response","core/com/zoho/crm/api/portal_invite/api_exception"],"interface":true},"core/com/zoho/crm/api/profiles/response_handler":{"classes":["core/com/zoho/crm/api/profiles/profile_wrapper","core/com/zoho/crm/api/profiles/api_exception"],"interface":true},"core/com/zoho/crm/api/profiles/category_others":{"displayLabel":{"name":"display_label","type":"String"},"permissionsDetails":{"name":"permissions_details","type":"List"},"name":{"name":"name","type":"String"}},"core/com/zoho/crm/api/territory_users/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/delete_record_using_external_id_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/record/delete_record_using_external_id_param":{"wfTrigger":{"name":"wf_trigger","type":"Boolean"}},"core/com/zoho/crm/api/appointment_preference/layout":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/entity_scores/get_modules_param":{"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/user_groups/response_handler":{"classes":["core/com/zoho/crm/api/user_groups/response_wrapper","core/com/zoho/crm/api/user_groups/associated_user_count","core/com/zoho/crm/api/user_groups/association_wrapper","core/com/zoho/crm/api/user_groups/api_exception","core/com/zoho/crm/api/user_groups/sources_wrapper","core/com/zoho/crm/api/user_groups/sources_count_wrapper"],"interface":true},"core/com/zoho/crm/api/query/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/record/info","name":"info","type":"core/com/zoho/crm/api/record/info"}},"core/com/zoho/crm/api/blueprint/formula":{"expression":{"name":"expression","type":"Integer"},"returnType":{"name":"return_type","type":"String"}},"core/com/zoho/crm/api/related_records/response_handler":{"classes":["core/com/zoho/crm/api/related_records/response_wrapper","core/com/zoho/crm/api/related_records/file_body_wrapper","core/com/zoho/crm/api/related_records/api_exception"],"interface":true},"core/com/zoho/crm/api/users/customize_info":{"bcView":{"name":"bc_view","type":"Object"},"showDetailView":{"name":"show_detail_view","type":"Boolean"},"showHome":{"name":"show_home","type":"Boolean"},"showRightPanel":{"name":"show_right_panel","type":"Object"},"notesDesc":{"name":"notes_desc","type":"Object"},"unpinRecentItem":{"name":"unpin_recent_item","type":"Object"}},"core/com/zoho/crm/api/contact_roles/api_exception":{"code":{"values":["INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/timelines/automation_detail":{"pathfinder":{"structure_name":"core/com/zoho/crm/api/timelines/path_finder","name":"pathfinder","type":"core/com/zoho/crm/api/timelines/path_finder"},"rule":{"structure_name":"core/com/zoho/crm/api/timelines/name_id_structure","name":"rule","type":"core/com/zoho/crm/api/timelines/name_id_structure"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/org/resource":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/holidays/get_holidays_param":{"shiftId":{"name":"shift_id","type":"Long"},"year":{"name":"year","type":"Integer"},"type":{"values":["business_holiday","shift_holiday"],"name":"type","type":"String"}},"core/com/zoho/crm/api/users/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","EXPECTED_FIELD_MISSING","INTERNAL_SERVER_ERROR","DUPLICATE_DATA","MAPPING_MISMATCH","PATTERN_NOT_MATCHED","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"structure_name":"core/com/zoho/crm/api/users/error_details","name":"expected_fields","type":"List"},{"name":"maximum_length","type":"Integer"},{"name":"resource_path_index","type":"Integer"},{"structure_name":"core/com/zoho/crm/api/users/error_details","name":"mapped_field","type":"core/com/zoho/crm/api/users/error_details"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/wizards/container":{"layout":{"structure_name":"core/com/zoho/crm/api/layouts/layouts","name":"layout","type":"core/com/zoho/crm/api/layouts/layouts"},"chartData":{"structure_name":"core/com/zoho/crm/api/wizards/chart_data","name":"chart_data","type":"core/com/zoho/crm/api/wizards/chart_data"},"screens":{"structure_name":"core/com/zoho/crm/api/wizards/screen","name":"screens","type":"List"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/timelines/record":{"module":{"structure_name":"core/com/zoho/crm/api/timelines/module","name":"module","type":"core/com/zoho/crm/api/timelines/module"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/modules/action_response":{"classes":["core/com/zoho/crm/api/modules/success_response","core/com/zoho/crm/api/modules/api_exception"],"interface":true},"core/com/zoho/crm/api/bulk_read/api_exception":{"code":{"values":["REQUEST_BODY_NOT_SUPPORTED","AMBIGUOUS_CRITERIA","AMBIGUOUS_GROUP_IN_CRITERIA","PAGE_RANGE_EXCEEDED","INVALID_CALLBACK_METHOD","INVALID_CALLBACK_URL","GROUP_OPERATOR_NOT_SUPPORTED","MODULE_NOT_SUPPORTED","RESOURCE_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_SERVICE_NAME","INVALID_BULK_OPERATION","MEDIA_TYPE_NOT_SUPPORTED","REQUEST_BODY_NOT_READABLE","REQUEST_BODY_IS_EMPTY","MODULE_NOT_AVAILABLE","NOT_SUPPORTED_FEATURE","NO_PERMISSION","JOB_NOT_SUPPORTED","QUERY_NOT_SUPPORTED","JOIN_LIMIT_EXCEEDED","CRITERIA_NOT_SUPPORTED","INVALID_CRITERIA","CRITERIA_LIMIT_EXCEEDED","FIELD_AND_COMPARATOR_IN_CRITERIA_NOT_COMPATIBLE","FIELD_IN_CRITERIA_NOT_AVAILABLE","VALUE_IN_CRITERIA_NOT_SUPPORTED","FIELD_AND_VALUE_IN_CRITERIA_NOT_COMPATIBLE","COMPARATOR_AND_VALUE_IN_CRITERIA_NOT_COMPATIBLE","COMPARATOR_AND_ENCRYPTED_VALUE_IN_CRITERIA_NOT_COMPATIBLE","FIELD_NOT_AVAILABLE","FIELD_NOT_SUPPORTED","VALUE_LIMIT_EXCEEDED_IN_CRITERIA","PAGE_NOT_SUPPORTED","TOO_MANY_REQUESTS","CALLBACK_FAILURE","FIELD_IN_CRITERIA_NOT_SUPPORTED","FIELD_COMPARATOR_IN_CRITERIA_NOT_SUPPORTED","CVID_NOT_SUPPORTED","BAD_REQUEST","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"max_limit","type":"Integer"},{"name":"resource","type":"String"},{"name":"message","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"info_message","type":"String"},{"name":"parent_api_name","type":"String"}],"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","Provided service name %s is not valid/not supported","Requested operation is an invalid bulk operation","record not in process","The requested resource doesn't exist.","Media type is not supported.","Unable to parse the request body.","Request body is empty.","Requested module '%s' is not available.","Feature is not supported"," permission denied","Invalid module for the query. Module '%s' is not supported.","Invalid bulk %s job.","Invalid query for bulk %s job. Query '%s' is not supported.","Invalid URL '%s' for callback.","Invalid request method %s for callback.","Join limit exceeded for the query. Maximum number of joins supported in a query is %d","Invalid criteria for the query. Criteria %s is not supported.","Invalid criteria %s for the query.","Ambiguous criteria %s. Criteria can have either {group"," group_operator} or {api_name"," comparator"," value}.","Ambiguous group in criteria %s. Group should be used only when there are more than one criteria","Number of criteria exceeded the maximum limit of %d","Field api name '%s' for criteria %s is not supported.","Field api name '%s' is not supported with comparator '%s' for criteria %s.","Field api name '%s' is not available for criteria %s. Check visibility and permission for the field","Field api name '%s' doesn't support this comparator '%s' for criteria %s.","Value '%s' is not supported for criteria %s.","Field '%s' is not supported with value '%s' for criteria %s.","Comparator '%s' is not supported with value '%s' for criteria %s.","Comparator '%s' is not supported with value '%s' for criteria %s as the value is encrypted.","Criteria %s doesn't support this logical group operator '%s'. Supported operators are 'and'"," 'or'.","Requested field api name '%s' is not available for the module '%s'. Check permission or visibility for the field.","Invalid field for the module provided in fields. Field api name '%s' is not supported for this module '%s'.","Value exceeded limit %d","Invalid page number for query. Page %s is not supported for the query.","Invalid page number for query. Page %s is not supported for the query. Page range is from %d to %d.","Many requests fired in concurrent than the allowed limit","Callback failed after %d attempts."],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/related_records/action_response":{"classes":["core/com/zoho/crm/api/related_records/api_exception","core/com/zoho/crm/api/related_records/success_response"],"interface":true},"core/com/zoho/crm/api/fields/history_tracking":{"module":{"structure_name":"core/com/zoho/crm/api/fields/history_tracking_module","name":"module","type":"core/com/zoho/crm/api/fields/history_tracking_module"},"durationConfiguredField":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"duration_configured_field","type":"core/com/zoho/crm/api/modules/minified_module"}},"core/com/zoho/crm/api/blueprint/layout":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/deal_contact_roles/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/deal_contact_roles/data","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/deal_contact_roles/info","name":"info","type":"core/com/zoho/crm/api/deal_contact_roles/info"}},"core/com/zoho/crm/api/record/price_book":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"}},"core/com/zoho/crm/api/shift_hours/shift_count":{"totalShift":{"name":"total_shift","type":"Integer"},"totalShiftWithUser":{"name":"total_shift_with_user","type":"Integer"}},"core/com/zoho/crm/api/user_groups/association_module":{"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"}},"core/com/zoho/crm/api/territories/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/service_preference/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["Appointments preferences updated successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/blueprint/convert_mapping":{"deals":{"structure_name":"core/com/zoho/crm/api/blueprint/module_mapping","name":"Deals","type":"core/com/zoho/crm/api/blueprint/module_mapping"},"accounts":{"structure_name":"core/com/zoho/crm/api/blueprint/module_mapping","name":"Accounts","type":"core/com/zoho/crm/api/blueprint/module_mapping"},"contacts":{"structure_name":"core/com/zoho/crm/api/blueprint/module_mapping","name":"Contacts","type":"core/com/zoho/crm/api/blueprint/module_mapping"}},"core/com/zoho/crm/api/taxes/response_handler":{"classes":["core/com/zoho/crm/api/taxes/response_wrapper","core/com/zoho/crm/api/taxes/api_exception"],"interface":true},"core/com/zoho/crm/api/contact_roles/response_handler":{"classes":["core/com/zoho/crm/api/contact_roles/api_exception","core/com/zoho/crm/api/contact_roles/body_wrapper"],"interface":true},"core/com/zoho/crm/api/definition/minified_property":{"apiName":{"name":"api_name","type":"String"},"dataType":{"name":"data_type","type":"String"},"length":{"name":"length","type":"Integer"},"readOnly":{"name":"read_only","type":"Boolean"},"required":{"name":"required","type":"Boolean"},"properties":{"structure_name":"Object","name":"properties","type":"List"}},"core/com/zoho/crm/api/roles/reporting_to":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/profiles/category_module":{"displayLabel":{"name":"display_label","type":"String"},"permissionsDetails":{"name":"permissions_details","type":"List"},"module":{"name":"module","type":"String"},"name":{"name":"name","type":"String"}},"core/com/zoho/crm/api/mass_delete_cvid/response_handler":{"classes":["core/com/zoho/crm/api/mass_delete_cvid/api_exception","core/com/zoho/crm/api/mass_delete_cvid/response_wrapper"],"interface":true},"core/com/zoho/crm/api/tags/associated_places":{"resources":{"name":"resources","type":"List"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/blueprint/blue_print":{"processInfo":{"structure_name":"core/com/zoho/crm/api/blueprint/process_info","name":"process_info","type":"core/com/zoho/crm/api/blueprint/process_info"},"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"core/com/zoho/crm/api/record/record"},"transitionId":{"name":"transition_id","type":"String"},"transitions":{"structure_name":"core/com/zoho/crm/api/blueprint/transition","name":"transitions","type":"List"}},"core/com/zoho/crm/api/portals/body_wrapper":{"portals":{"structure_name":"core/com/zoho/crm/api/portals/portals","name":"portals","type":"List"}},"core/com/zoho/crm/api/users_unavailability/action_handler":{"classes":["core/com/zoho/crm/api/users_unavailability/action_wrapper","core/com/zoho/crm/api/users_unavailability/api_exception"],"interface":true},"core/com/zoho/crm/api/notifications/get_notifications_param":{"perPage":{"name":"per_page","type":"Integer"},"module":{"name":"module","type":"String"},"page":{"name":"page","type":"Integer"},"channelId":{"name":"channel_id","type":"Long"}},"core/com/zoho/crm/api/fields/crypt":{"mode":{"name":"mode","type":"String"},"column":{"name":"column","type":"String"},"encfldids":{"name":"encFldIds","type":"List"},"table":{"name":"table","type":"String"},"notify":{"name":"notify","type":"String"},"status":{"name":"status","type":"Integer"}},"core/com/zoho/crm/api/mass_change_owner/owner":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/file_details":{"sizeS":{"name":"Size__s","type":"String"},"fileIdS":{"name":"File_Id__s","type":"String"},"id":{"name":"id","type":"Long"},"delete1":{"name":"_delete","type":"String"},"fileNameS":{"name":"File_Name__s","type":"String"}},"core/com/zoho/crm/api/org/response_handler":{"classes":["core/com/zoho/crm/api/org/response_wrapper","core/com/zoho/crm/api/org/api_exception"],"interface":true},"core/com/zoho/crm/api/scoring_rules/get_scoring_rule_param":{"name":{"name":"name","type":"Long"},"active":{"values":[true,false],"name":"active","type":"Boolean"},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/users_unavailability/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["Unavailability Hours saved successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/email_related_records/attachments":{"size":{"name":"size","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/mail_merge/mail_merge_wrapper":{"sendMailMerge":{"structure_name":"core/com/zoho/crm/api/mail_merge/mail_merge","name":"send_mail_merge","type":"List"}},"core/com/zoho/crm/api/scoring_rules/info":{"call":{"name":"call","type":"Boolean"},"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"DateTime"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"},"email":{"name":"email","type":"Boolean"}},"core/com/zoho/crm/api/variables/get_variables_param":{"group":{"name":"group","type":"String"}},"core/com/zoho/crm/api/business_hours/break_hours_custom_timing":{"days":{"values":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"name":"days","type":"utils/util/choice"},"businessTiming":{"name":"business_timing","type":"List"}},"core/com/zoho/crm/api/business_hours/action_response":{"classes":["core/com/zoho/crm/api/business_hours/business_hours_created","core/com/zoho/crm/api/business_hours/api_exception"],"interface":true},"core/com/zoho/crm/api/user_groups/get_groups_param":{"include":{"name":"include","type":"String"},"perPage":{"name":"per_page","type":"String"},"name":{"name":"name","type":"String"},"page":{"name":"page","type":"String"}},"core/com/zoho/crm/api/notifications/delete_details":{"resourceId":{"name":"resource_id","type":"Long"},"resourceUri":{"name":"resource_uri","type":"String"},"channelId":{"name":"channel_id","type":"String"}},"core/com/zoho/crm/api/variables/response_wrapper":{"variables":{"structure_name":"core/com/zoho/crm/api/variables/variable","name":"variables","type":"List"}},"core/com/zoho/crm/api/timelines/related_record":{"module":{"structure_name":"core/com/zoho/crm/api/timelines/name_id_structure","name":"module","type":"core/com/zoho/crm/api/timelines/name_id_structure"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/service_preference/action_wrapper":{"servicePreferences":{"structure_name":"core/com/zoho/crm/api/service_preference/action_response","name":"service_preferences","interface":true,"type":"core/com/zoho/crm/api/service_preference/action_response"}},"core/com/zoho/crm/api/record/pricing_details":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"discount":{"name":"discount","type":"Double"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"},"toRange":{"name":"to_range","type":"Double"},"fromRange":{"name":"from_range","type":"Double"}},"core/com/zoho/crm/api/related_lists/response_wrapper":{"relatedLists":{"structure_name":"core/com/zoho/crm/api/related_lists/related_list","name":"related_lists","type":"List"}},"core/com/zoho/crm/api/mail_merge/action_wrapper":{"sendMailMerge":{"structure_name":"core/com/zoho/crm/api/mail_merge/action_response","name":"send_mail_merge","type":"List"}},"core/com/zoho/crm/api/modules/lookup_field":{"sequenceNumber":{"name":"sequence_number","type":"Integer"},"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/variable_groups/api_exception":{"code":{"values":["OAUTH_SCOPE_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","BAD_REQUEST","NO_PERMISSION","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/territories/action_handler":{"classes":["core/com/zoho/crm/api/territories/api_exception","core/com/zoho/crm/api/territories/action_wrapper"],"interface":true},"core/com/zoho/crm/api/deal_contact_roles/action_response":{"classes":["core/com/zoho/crm/api/deal_contact_roles/success_response","core/com/zoho/crm/api/deal_contact_roles/api_exception"],"interface":true},"core/com/zoho/crm/api/associate_email/from":{"userName":{"name":"user_name","type":"String"},"email":{"regex":"[a-z]{7}[@]zoho[.]com","name":"email","type":"String"}},"core/com/zoho/crm/api/deal_contact_roles/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/service_preference/response_wrapper":{"servicePreferences":{"structure_name":"core/com/zoho/crm/api/service_preference/service_preference","name":"service_preferences","type":"core/com/zoho/crm/api/service_preference/service_preference"}},"core/com/zoho/crm/api/from_addresses/address":{"default1":{"name":"default","type":"Boolean"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"userName":{"name":"user_name","type":"String"},"email":{"regex":"[a-z]{7}[@]zoho[.]com","name":"email","type":"String"}},"core/com/zoho/crm/api/record/create_records_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/currencies/currency_format":{"thousandSeparator":{"values":["Comma","Space","Period","Space"],"name":"thousand_separator","type":"utils/util/choice"},"decimalPlaces":{"values":["0","2","3"],"name":"decimal_places","type":"utils/util/choice"},"decimalSeparator":{"values":["Period","Comma"],"name":"decimal_separator","type":"utils/util/choice"}},"core/com/zoho/crm/api/pipeline/d_pipeline":{"delete1":{"structure_name":"core/com/zoho/crm/api/pipeline/delete","name":"_delete","type":"core/com/zoho/crm/api/pipeline/delete"}},"core/com/zoho/crm/api/reschedule_history/response_handler":{"classes":["core/com/zoho/crm/api/reschedule_history/api_exception","core/com/zoho/crm/api/reschedule_history/response_wrapper"],"interface":true},"core/com/zoho/crm/api/email_related_records/response_handler":{"classes":["core/com/zoho/crm/api/email_related_records/response_wrapper","core/com/zoho/crm/api/email_related_records/api_exception"],"interface":true},"core/com/zoho/crm/api/related_records/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/territory_users/response_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/users/users","name":"users","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/territory_users/info","name":"info","type":"core/com/zoho/crm/api/territory_users/info"}},"core/com/zoho/crm/api/portal_user_type/personality_module":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"},"pluralLabel":{"name":"plural_label","type":"String"}},"core/com/zoho/crm/api/wizards/node":{"posX":{"name":"pos_x","type":"Integer"},"posY":{"name":"pos_y","type":"Integer"},"startNode":{"name":"start_node","type":"Boolean"},"screen":{"structure_name":"core/com/zoho/crm/api/wizards/screen","name":"screen","type":"core/com/zoho/crm/api/wizards/screen"}},"core/com/zoho/crm/api/wizards/conditional_rules":{"criteria":{"structure_name":"core/com/zoho/crm/api/wizards/criteria","name":"criteria","type":"core/com/zoho/crm/api/wizards/criteria"},"executeOn":{"values":["create","edit","create_edit"],"name":"execute_on","type":"utils/util/choice"},"actions":{"structure_name":"core/com/zoho/crm/api/wizards/actions","name":"actions","type":"List"},"queryId":{"name":"query_id","type":"Long"}},"core/com/zoho/crm/api/record/mass_update_territory":{"id":{"name":"id","type":"Long"},"includeChild":{"name":"include_child","type":"Boolean"}},"core/com/zoho/crm/api/cancel_meetings/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/cancel_meetings/notify","name":"data","type":"List"}},"core/com/zoho/crm/api/service_preference/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR","INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"structure_name":"utils/util/choice","values":["create_deal","do_not_create_deal"],"name":"supported_values","type":"List"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/count_wrapper":{"count":{"name":"count","type":"Long"}},"core/com/zoho/crm/api/contact_roles/body_wrapper":{"contactRoles":{"structure_name":"core/com/zoho/crm/api/contact_roles/contact_role","name":"contact_roles","type":"List"}},"core/com/zoho/crm/api/custom_views/fields":{"apiName":{"name":"api_name","type":"String"},"pin":{"name":"_pin","type":"Boolean"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/conversion_options_response_wrapper":{"conversionoptions":{"structure_name":"core/com/zoho/crm/api/record/conversion_option","name":"__conversion_options","type":"core/com/zoho/crm/api/record/conversion_option"}},"core/com/zoho/crm/api/shift_hours/action_wrapper":{"shiftHours":{"structure_name":"core/com/zoho/crm/api/shift_hours/action_response","name":"shift_hours","type":"List"}},"core/com/zoho/crm/api/download_attachments/get_download_attachments_details_param":{"messageId":{"name":"message_id","type":"String","required":true},"userId":{"name":"user_id","type":"Long","required":true}},"core/com/zoho/crm/api/territories/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/pipeline/transfer_pipelines_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/tags/conflict_wrapper":{"conflictId":{"name":"conflict_id","type":"String"}},"core/com/zoho/crm/api/users_transfer_delete/action_response":{"classes":["core/com/zoho/crm/api/users_transfer_delete/api_exception","core/com/zoho/crm/api/users_transfer_delete/success_response"],"interface":true},"core/com/zoho/crm/api/portal_invite/action_handler":{"classes":["core/com/zoho/crm/api/portal_invite/action_wrapper","core/com/zoho/crm/api/portal_invite/api_exception"],"interface":true},"core/com/zoho/crm/api/tags/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"created_time","type":"DateTime"},{"name":"modified_time","type":"DateTime"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"id","type":"Long"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"color_code","type":"String"}],"name":"details","type":"Map"},"message":{"values":["tags created successfully","tags updated successfully","tags deleted successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_invite/body_wrapper":{"portalInvite":{"structure_name":"core/com/zoho/crm/api/portal_invite/portal_invite","name":"portal_invite","type":"List"}},"core/com/zoho/crm/api/blueprint/crypt":{"mode":{"name":"mode","type":"String"},"column":{"name":"column","type":"String"},"table":{"name":"table","type":"String"},"status":{"name":"status","type":"Integer"}},"core/com/zoho/crm/api/blueprint/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","RECORD_NOT_IN_PROCESS","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"message","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"info_message","type":"String"},{"name":"parent_api_name","type":"String"}],"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","invalid transition","invalid data","record not in process"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/currencies/disable_success":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/modules/action_handler":{"classes":["core/com/zoho/crm/api/modules/action_wrapper","core/com/zoho/crm/api/modules/api_exception"],"interface":true},"core/com/zoho/crm/api/wizards/response_wrapper":{"wizards":{"structure_name":"core/com/zoho/crm/api/wizards/wizard","name":"wizards","type":"List"}},"core/com/zoho/crm/api/privacy_configurable_apps/wrapper":{"privacyConfigurableApps":{"structure_name":"core/com/zoho/crm/api/privacy_configurable_apps/apps","name":"privacy_configurable_apps","type":"List"}},"core/com/zoho/crm/api/download_inline_images/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","the request does not contain any file","invalid file type"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/users_territories/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/attachments/parent_id":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/backup/history_param":{"perPage":{"name":"per_page","type":"String"},"page":{"name":"page","type":"String"}},"core/com/zoho/crm/api/notes/get_notes_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"String","required":true}},"core/com/zoho/crm/api/notes/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/notes/note","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/notes/info","name":"info","type":"core/com/zoho/crm/api/notes/info"}},"core/com/zoho/crm/api/bulk_write/response_handler":{"classes":["core/com/zoho/crm/api/bulk_write/api_exception","core/com/zoho/crm/api/bulk_write/file_body_wrapper"],"interface":true},"core/com/zoho/crm/api/appointment_preference/response_wrapper":{"appointmentPreferences":{"structure_name":"core/com/zoho/crm/api/appointment_preference/appointment_preference","name":"appointment_preferences","type":"core/com/zoho/crm/api/appointment_preference/appointment_preference"}},"core/com/zoho/crm/api/users/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/assignment_rules/action_wrapper":{"assignmentRules":{"structure_name":"core/com/zoho/crm/api/assignment_rules/action_response","name":"assignment_rules","type":"List"}},"core/com/zoho/crm/api/field_map_dependency/delete_map_dependency_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline_wrapper":{"transferPipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/transfer_pipeline","name":"transfer_pipeline","type":"List"}},"core/com/zoho/crm/api/users_territories/action_response":{"classes":["core/com/zoho/crm/api/users_territories/api_exception","core/com/zoho/crm/api/users_territories/success_response"],"interface":true},"core/com/zoho/crm/api/mass_delete_cvid/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","INTERNAL_SERVER_ERROR","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"values":["cvid"],"name":"api_name","type":"utils/util/choice"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"}],"name":"details","type":"Map"},"message":{"values":["the cvid given seems to be invalid","the module name given seems to be invalid","required field not found"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/holidays/create_shift_holiday":{"holidays":{"structure_name":"core/com/zoho/crm/api/holidays/shift_holiday","name":"holidays","type":"List"}},"core/com/zoho/crm/api/attachments/action_handler":{"classes":["core/com/zoho/crm/api/attachments/action_wrapper","core/com/zoho/crm/api/attachments/api_exception"],"interface":true},"core/com/zoho/crm/api/record/get_record_using_external_id_param":{"cvid":{"name":"cvid","type":"String"},"uid":{"name":"uid","type":"String"},"approved":{"name":"approved","type":"String"},"startDateTime":{"name":"startDateTime","type":"DateTime"},"converted":{"name":"converted","type":"String"},"territoryId":{"name":"territory_id","type":"String"},"fields":{"name":"fields","type":"String"},"endDateTime":{"name":"endDateTime","type":"DateTime"},"includeChild":{"name":"include_child","type":"String"}},"core/com/zoho/crm/api/profiles/profile":{"displayLabel":{"name":"display_label","type":"String"},"permissionType":{"name":"permission_type","type":"String"},"permissionsDetails":{"structure_name":"core/com/zoho/crm/api/profiles/permission_detail","name":"permissions_details","type":"List"},"modifiedTime":{"name":"modified_time","type":"DateTime"},"defaultview":{"structure_name":"core/com/zoho/crm/api/profiles/default_view","name":"_default_view","type":"core/com/zoho/crm/api/profiles/default_view"},"custom":{"name":"custom","type":"Boolean"},"description":{"name":"description","max-length":250,"type":"String"},"delete1":{"name":"_delete","type":"Boolean"},"type":{"values":["normal_profile","lite_profile"],"name":"type","type":"utils/util/choice"},"sections":{"structure_name":"core/com/zoho/crm/api/profiles/section","name":"sections","type":"List"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"default1":{"name":"default","type":"Boolean"},"name":{"name":"name","max-length":50,"type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/fields/formula":{"expression":{"values":["Dayofmonth(${Created_Time})"],"name":"expression","type":"utils/util/choice"},"returnType":{"values":["double"],"name":"return_type","type":"utils/util/choice"}},"core/com/zoho/crm/api/backup/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/users_transfer_delete/get_status_param":{"jobId":{"name":"job_id","type":"Long","required":true}},"core/com/zoho/crm/api/custom_views/owner":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/holidays/create_holidays_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/scoring_rules/body_wrapper":{"scoringRules":{"structure_name":"core/com/zoho/crm/api/scoring_rules/scoring_rule","name":"scoring_rules","type":"List"}},"core/com/zoho/crm/api/appointment_preference/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["Appointments preferences updated successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_write/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","FILE_TOO_LARGE","INVALID_FILE_FORMAT","MANDATORY_FIELDS_NOT_MAPPED","MANDATORY_NOT_FOUND","INVALID_FIELD","INVALID_FORMAT","INVALID_FILE_ID","HEADER_LIMIT_EXCEEDED","COLUMN_INDEX_NOT_FOUND","MODULE_NOT_AVAILABLE","INVALID_DATA","DUPLICATE_DATA","NOT_APPROVED","BLOCKED_RECORD","CANNOT_PROCESS","LIMIT_EXCEEDED","RESOURCE_NOT_FOUND","MISSING_REQUIRED_KEY","INVALID_FIELD_NAME","FILE_NOT_SUPPORTED","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"xError":{"values":["check if headers [feature, X-CRM-ORG] are present and valid"],"name":"x-error","type":"utils/util/choice"},"httpStatus":{"name":"http_status","type":"String"},"errorMessage":{"values":["Bad Request"],"name":"ERROR_MESSAGE","type":"utils/util/choice"},"errorCode":{"name":"ERROR_CODE","type":"Integer"},"details":{"name":"details","type":"Map"},"xInfo":{"values":["Link not valid"],"name":"x-info","type":"utils/util/choice"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","invalid file format. only zip format is supported","File size too large to process","The requested resource doesn't exist.","required key operation is not found in request body.","improper file id","required key index for field Company is not found in request body.","All mandatory fields are not mapped for the layout","Requested module 'asdf' is not available.","invalid mapping. invalid api_name ast_Name.","File not supported for bulk write"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"},"info":{"values":["Forbidden"],"name":"info","type":"utils/util/choice"}},"core/com/zoho/crm/api/territories/transfer_territory":{"id":{"name":"id","type":"Long"},"deletePreviousForecasts":{"name":"delete_previous_forecasts","type":"Boolean"},"transferToId":{"name":"transfer_to_id","type":"Long"}},"core/com/zoho/crm/api/org/action_handler":{"classes":["core/com/zoho/crm/api/org/success_response","core/com/zoho/crm/api/org/api_exception"],"interface":true},"core/com/zoho/crm/api/users/role":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/scoring_rules/response_wrapper":{"scoringRules":{"structure_name":"core/com/zoho/crm/api/scoring_rules/scoring_rule","name":"scoring_rules","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/scoring_rules/info","name":"info","type":"core/com/zoho/crm/api/scoring_rules/info"}},"core/com/zoho/crm/api/users/action_response":{"classes":["core/com/zoho/crm/api/users/api_exception","core/com/zoho/crm/api/users/success_response"],"interface":true},"core/com/zoho/crm/api/timelines/picklist_detail":{"displayValue":{"name":"display_value","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"actualValue":{"name":"actual_value","type":"String"},"colourCode":{"name":"colour_code","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/definition/response_wrapper":{"definition":{"structure_name":"core/com/zoho/crm/api/definition/definition","name":"definition","type":"core/com/zoho/crm/api/definition/definition"}},"core/com/zoho/crm/api/privacy_preference/section":{"name":{"name":"name","type":"String"},"tooltip":{"name":"tooltip","type":"String"},"options":{"structure_name":"core/com/zoho/crm/api/privacy_preference/option","name":"options","type":"List"},"showType":{"name":"show_type","type":"String"},"title":{"name":"title","type":"String"}},"core/com/zoho/crm/api/shift_hours/action_response":{"classes":["core/com/zoho/crm/api/shift_hours/api_exception","core/com/zoho/crm/api/shift_hours/success_response"],"interface":true},"core/com/zoho/crm/api/territories/associated_users_count":{"count":{"name":"count","type":"String"},"territory":{"structure_name":"core/com/zoho/crm/api/territories/minified_territory","name":"territory","type":"core/com/zoho/crm/api/territories/minified_territory"}},"core/com/zoho/crm/api/holidays/shift_hour":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/related_records/get_related_records_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"},"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/service_preference/service_preference":{"jobSheetEnabled":{"name":"job_sheet_enabled","type":"Boolean"}},"core/com/zoho/crm/api/portals/action_response":{"classes":["core/com/zoho/crm/api/portals/api_exception","core/com/zoho/crm/api/portals/success_response"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/action_handler":{"classes":["core/com/zoho/crm/api/field_map_dependency/action_wrapper","core/com/zoho/crm/api/field_map_dependency/api_exception"],"interface":true},"core/com/zoho/crm/api/custom_views/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"default1":{"name":"default","type":"Long"},"count":{"name":"count","type":"Integer"},"translation":{"structure_name":"core/com/zoho/crm/api/custom_views/translation","name":"translation","type":"core/com/zoho/crm/api/custom_views/translation"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/appointment_preference/action_response":{"classes":["core/com/zoho/crm/api/appointment_preference/api_exception","core/com/zoho/crm/api/appointment_preference/success_response"],"interface":true},"core/com/zoho/crm/api/bulk_write/action_response":{"classes":["core/com/zoho/crm/api/bulk_write/success_response","core/com/zoho/crm/api/bulk_write/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/bulk_validation":{"alert":{"name":"alert","type":"Boolean"},"assignment":{"name":"assignment","type":"Boolean"},"criteria":{"name":"criteria","type":"Boolean"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/fields/external":{"show":{"name":"show","type":"Boolean"},"type":{"values":["user","org"],"name":"type","type":"utils/util/choice"},"allowMultipleConfig":{"name":"allow_multiple_config","type":"Boolean"}},"core/com/zoho/crm/api/bulk_write/result":{"downloadUrl":{"name":"download_url","type":"String"}},"core/com/zoho/crm/api/record/line_tax":{"displayName":{"name":"display_name","type":"String"},"percentage":{"name":"percentage","type":"Double"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"value":{"name":"value","type":"Double"}},"core/com/zoho/crm/api/custom_views/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/business_hours/business_hours_created":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["Business Hours saved successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/assignment_rules/action_response":{"classes":["core/com/zoho/crm/api/assignment_rules/api_exception","core/com/zoho/crm/api/assignment_rules/success_response"],"interface":true},"core/com/zoho/crm/api/appointment_preference/action_handler":{"classes":["core/com/zoho/crm/api/appointment_preference/api_exception","core/com/zoho/crm/api/appointment_preference/action_wrapper"],"interface":true},"core/com/zoho/crm/api/files/get_file_param":{"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/business_hours/body_wrapper":{"businessHours":{"structure_name":"core/com/zoho/crm/api/business_hours/business_hours","name":"business_hours","type":"core/com/zoho/crm/api/business_hours/business_hours"}},"core/com/zoho/crm/api/related_records/get_related_record_param":{"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/mass_convert/get_job_status_param":{"jobId":{"name":"job_id","type":"Long","required":true}},"core/com/zoho/crm/api/email_related_records/user_details":{"userName":{"name":"user_name","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/share_records/response_wrapper":{"share":{"structure_name":"core/com/zoho/crm/api/share_records/share_record","name":"share","type":"List"},"shareableUser":{"structure_name":"core/com/zoho/crm/api/users/users","name":"shareable_user","type":"List"}},"core/com/zoho/crm/api/share_records/module":{"apiName":{"name":"api_name","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/variables/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/fields":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"apiName":{"name":"api_name","type":"String"},"sharingProperties":{"structure_name":"core/com/zoho/crm/api/modules/sharing_properties","name":"sharing_properties","type":"core/com/zoho/crm/api/modules/sharing_properties"},"webhook":{"name":"webhook","type":"Boolean"},"associatedModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"associated_module","type":"core/com/zoho/crm/api/modules/minified_module"},"defaultValue":{"name":"default_value","type":"String"},"tooltip":{"structure_name":"core/com/zoho/crm/api/fields/tooltip","name":"tooltip","type":"core/com/zoho/crm/api/fields/tooltip"},"quickSequenceNumber":{"name":"quick_sequence_number","type":"String"},"jsonType":{"name":"json_type","type":"String"},"type":{"name":"type","type":"String"},"availableInUserLayout":{"name":"available_in_user_layout","type":"Boolean"},"rollupSummary":{"structure_name":"core/com/zoho/crm/api/fields/rollup_summary","name":"rollup_summary","type":"core/com/zoho/crm/api/fields/rollup_summary"},"blueprintSupported":{"name":"blueprint_supported","type":"Boolean"},"createdTime":{"name":"created_time","type":"DateTime"},"showType":{"name":"show_type","type":"Integer"},"globalPicklist":{"name":"global_picklist","type":"Object"},"id":{"name":"id","type":"Long"},"additionalColumn":{"name":"additional_column","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"filterable":{"name":"filterable","type":"Boolean"},"emailParser":{"structure_name":"core/com/zoho/crm/api/fields/email_parser","name":"email_parser","type":"core/com/zoho/crm/api/fields/email_parser"},"visible":{"name":"visible","type":"Boolean"},"dataType":{"values":["formula","text","boolean","picklist","datetime","website","autonumber","textarea","email","phone","integer","double","date","formula","text","boolean","picklist","datetime","website","autonumber","textarea","lookup","email","userlookup","phone","integer","double","date"],"name":"data_type","type":"utils/util/choice"},"profiles":{"structure_name":"core/com/zoho/crm/api/fields/profile","name":"profiles","type":"List"},"readOnly":{"name":"read_only","type":"Boolean"},"historyTracking":{"structure_name":"core/com/zoho/crm/api/fields/history_tracking","name":"history_tracking","type":"core/com/zoho/crm/api/fields/history_tracking"},"systemMandatory":{"name":"system_mandatory","type":"Boolean"},"separator":{"name":"separator","type":"Boolean"},"customField":{"name":"custom_field","type":"Boolean"},"searchable":{"name":"searchable","type":"Boolean"},"decimalPlace":{"name":"decimal_place","type":"Integer"},"createdSource":{"name":"created_source","type":"String"},"displayType":{"name":"display_type","type":"Integer"},"external":{"structure_name":"core/com/zoho/crm/api/fields/external","name":"external","type":"core/com/zoho/crm/api/fields/external"},"subModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"sub_module","type":"core/com/zoho/crm/api/modules/minified_module"},"unique":{"structure_name":"core/com/zoho/crm/api/fields/unique","name":"unique","type":"core/com/zoho/crm/api/fields/unique"},"viewType":{"structure_name":"core/com/zoho/crm/api/fields/view_type","name":"view_type","type":"core/com/zoho/crm/api/fields/view_type"},"displayField":{"name":"display_field","type":"Boolean"},"operationType":{"structure_name":"core/com/zoho/crm/api/fields/operation_type","name":"operation_type","type":"core/com/zoho/crm/api/fields/operation_type"},"hipaaComplianceEnabled":{"name":"hipaa_compliance_enabled","type":"Boolean"},"crypt":{"structure_name":"core/com/zoho/crm/api/fields/crypt","name":"crypt","type":"core/com/zoho/crm/api/fields/crypt"},"fileUpoladOptionlist":{"structure_name":"core/com/zoho/crm/api/fields/file_upolad_option","name":"file_upolad_optionlist","type":"List"},"enableColourCode":{"name":"enable_colour_code","type":"Boolean"},"virtualField":{"name":"virtual_field","type":"Boolean"},"hipaaCompliance":{"structure_name":"core/com/zoho/crm/api/fields/hipaa_compliance","name":"hipaa_compliance","type":"core/com/zoho/crm/api/fields/hipaa_compliance"},"associationDetails":{"structure_name":"core/com/zoho/crm/api/fields/association_details","name":"association_details","type":"core/com/zoho/crm/api/fields/association_details"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/fields/pick_list_value","name":"pick_list_values","type":"List"},"fieldLabel":{"name":"field_label","type":"String"},"referFromField":{"structure_name":"core/com/zoho/crm/api/fields/refer_from_field","name":"refer_from_field","type":"core/com/zoho/crm/api/fields/refer_from_field"},"fieldReadOnly":{"name":"field_read_only","type":"Boolean"},"businesscardSupported":{"name":"businesscard_supported","type":"Boolean"},"allowedModules":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"allowed_modules","type":"List"},"currency":{"structure_name":"core/com/zoho/crm/api/fields/currency","name":"currency","type":"core/com/zoho/crm/api/fields/currency"},"multiuserlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiuserlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"displayLabel":{"name":"display_label","type":"String"},"lookup":{"structure_name":"core/com/zoho/crm/api/fields/lookup","name":"lookup","type":"core/com/zoho/crm/api/fields/lookup"},"length":{"values":[16,120,255,2000,32000,100,50,20],"name":"length","type":"utils/util/choice"},"pickListValuesSortedLexically":{"name":"pick_list_values_sorted_lexically","type":"Boolean"},"sortable":{"name":"sortable","type":"Boolean"},"autoNumber":{"structure_name":"core/com/zoho/crm/api/fields/auto_number","name":"auto_number","type":"core/com/zoho/crm/api/fields/auto_number"},"private1":{"structure_name":"core/com/zoho/crm/api/fields/private","name":"private","type":"core/com/zoho/crm/api/fields/private"},"convertMapping":{"structure_name":"core/com/zoho/crm/api/fields/convert_mapping","name":"convert_mapping","type":"core/com/zoho/crm/api/fields/convert_mapping"},"multiModuleLookup":{"structure_name":"core/com/zoho/crm/api/fields/multi_module_lookup","name":"multi_module_lookup","type":"core/com/zoho/crm/api/fields/multi_module_lookup"},"massUpdate":{"name":"mass_update","type":"Boolean"},"uiType":{"name":"ui_type","type":"Integer"},"formula":{"structure_name":"core/com/zoho/crm/api/fields/formula","name":"formula","type":"core/com/zoho/crm/api/fields/formula"},"category":{"name":"category","type":"Integer"},"multiselectlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiselectlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"columnName":{"name":"column_name","type":"String"}},"core/com/zoho/crm/api/blueprint/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["transition updated successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/maps":{"apiName":{"name":"api_name","type":"String"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/fields/pick_list_value","name":"pick_list_values","type":"List"}},"core/com/zoho/crm/api/notes/get_note_param":{"fields":{"name":"fields","type":"String","required":true}},"core/com/zoho/crm/api/send_mail/inventory_details":{"inventoryTemplate":{"structure_name":"core/com/zoho/crm/api/send_mail/inventory_template","name":"inventory_template","type":"core/com/zoho/crm/api/send_mail/inventory_template"}},"core/com/zoho/crm/api/taxes/preference":{"modifyTaxRates":{"name":"modify_tax_rates","type":"Boolean"},"autoPopulateTax":{"name":"auto_populate_tax","type":"Boolean"}},"core/com/zoho/crm/api/portals/portals":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"createdBy":{"structure_name":"core/com/zoho/crm/api/portals/owner","name":"created_by","type":"core/com/zoho/crm/api/portals/owner"},"name":{"name":"name","max-length":30,"type":"String","min-length":6},"createdTime":{"name":"created_time","type":"DateTime"},"active":{"name":"active","type":"Boolean"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/portals/owner","name":"modified_by","type":"core/com/zoho/crm/api/portals/owner"},"zaid":{"name":"zaid","type":"String"}},"core/com/zoho/crm/api/query/api_exception":{"code":{"values":["INVALID_URL_PATTERN","INVALID_QUERY","SYNTAX_ERROR","OAUTH_SCOPE_MISMATCH","INVALID_REQUEST_METHOD","INVALID_TOKEN","BAD_REQUEST","NO_PERMISSION","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"near","type":"String"},{"name":"column","type":"Integer"},{"name":"line","type":"Integer"},{"name":"clause","type":"String"},{"name":"by","type":"String"},{"name":"limit","type":"Integer"},{"name":"column_name","type":"String"},{"name":"reason","type":"String"},{"name":"module","type":"String"},{"name":"data_type","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"operator","type":"String"}],"name":"details","type":"Map"},"message":{"values":["invalid query formed","value given seems to be invalid for the column","data type not supported","column given seems to be invalid"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/widget":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mail_merge/address":{"addressValueMap":{"structure_name":"core/com/zoho/crm/api/mail_merge/address_value_map","name":"Address_Value_Map","type":"core/com/zoho/crm/api/mail_merge/address_value_map"}},"core/com/zoho/crm/api/reschedule_history/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/reschedule_history/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/notes/action_handler":{"classes":["core/com/zoho/crm/api/notes/action_wrapper","core/com/zoho/crm/api/notes/api_exception"],"interface":true},"core/com/zoho/crm/api/reschedule_history/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/reschedule_history/reschedule_history","name":"data","max-length":100,"type":"List"}},"core/com/zoho/crm/api/users/get_user_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/mass_change_owner/action_response":{"classes":["core/com/zoho/crm/api/mass_change_owner/success_response"],"interface":true},"core/com/zoho/crm/api/record/response_handler":{"classes":["core/com/zoho/crm/api/record/conversion_options_response_wrapper","core/com/zoho/crm/api/record/response_wrapper","core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/file_body_wrapper"],"interface":true},"core/com/zoho/crm/api/portals/response_handler":{"classes":["core/com/zoho/crm/api/portals/response_wrapper","core/com/zoho/crm/api/portals/api_exception"],"interface":true},"core/com/zoho/crm/api/mail_merge/mail_merge_template":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/blueprint/view_type":{"view":{"name":"view","type":"Boolean"},"edit":{"name":"edit","type":"Boolean"},"quickCreate":{"name":"quick_create","type":"Boolean"},"create":{"name":"create","type":"Boolean"}},"core/com/zoho/crm/api/share_records/get_shared_record_details_param":{"view":{"values":["summary","manage"],"name":"view","type":"String"},"sharedTo":{"name":"sharedTo","type":"Long"}},"core/com/zoho/crm/api/layouts/deal_layout_mapping":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"fields":{"structure_name":"core/com/zoho/crm/api/layouts/deal_field","name":"fields","type":"List"}},"core/com/zoho/crm/api/territories/minified_territory":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"subordinates":{"name":"subordinates","type":"Boolean"}},"core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete":{"transfer":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/transfer","name":"transfer","type":"core/com/zoho/crm/api/users_transfer_delete/transfer"},"moveSubordinate":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/move_subordinate","name":"move_subordinate","type":"core/com/zoho/crm/api/users_transfer_delete/move_subordinate"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portals_meta/wrapper":{"relatedLists":{"structure_name":"core/com/zoho/crm/api/portals_meta/related_lists","name":"related_lists","type":"List"}},"core/com/zoho/crm/api/user_groups/associated_user_count":{"associatedUsersCount":{"structure_name":"core/com/zoho/crm/api/user_groups/associated_user","name":"associated_users_count","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/user_groups/info","name":"info","type":"core/com/zoho/crm/api/user_groups/info"}},"core/com/zoho/crm/api/users/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/related_records/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","max-length":100,"type":"List","min-length":1}},"core/com/zoho/crm/api/cancel_meetings/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"expected_data_type","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"id","type":"Long"},{"name":"reason","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/shift_hours/update_shift_hour_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/send_mail/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/send_mail/data","name":"data","type":"List"}},"core/com/zoho/crm/api/email_compose_meta/user":{"zgid":{"name":"zgid","type":"String"},"fullName":{"name":"full_name","type":"String"},"email":{"name":"email","type":"String"},"zuid":{"name":"zuid","type":"String"},"composeSettings":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/compose_settings","name":"compose_settings","type":"core/com/zoho/crm/api/email_compose_meta/compose_settings"}},"core/com/zoho/crm/api/fields/success":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_invite/job_response":{"jobId":{"name":"job_id","type":"Long"},"data":{"structure_name":"core/com/zoho/crm/api/portal_invite/data","name":"data","type":"List"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/blueprint/tool_tip":{"name":{"name":"name","type":"String"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/wizards/screen":{"displayLabel":{"name":"display_label","type":"String"},"conditionalRules":{"structure_name":"core/com/zoho/crm/api/wizards/conditional_rules","name":"conditional_rules","type":"List"},"id":{"name":"id","type":"Long"},"segments":{"structure_name":"core/com/zoho/crm/api/wizards/segment","name":"segments","type":"List"}},"core/com/zoho/crm/api/fields/forecast_category":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users_territories/validation_group":{"classes":["core/com/zoho/crm/api/users_territories/validation","core/com/zoho/crm/api/users_territories/bulk_validation"],"interface":true},"core/com/zoho/crm/api/wizards/criteria":{"comparator":{"name":"comparator","type":"String"},"groupOperator":{"name":"group_operator","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/wizards/field","name":"field","type":"core/com/zoho/crm/api/wizards/field"},"value":{"name":"value","type":"Object"},"group":{"structure_name":"core/com/zoho/crm/api/wizards/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/portal_user_type/owner":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/bulk_read/result":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"downloadUrl":{"name":"download_url","type":"String"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/attachments/owner":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/bulk_write/call_back":{"method":{"values":["post"],"name":"method","type":"utils/util/choice"},"url":{"name":"url","type":"String"}},"core/com/zoho/crm/api/territories/transfer_body_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/territories/transfer_territory","name":"territories","type":"List"}},"core/com/zoho/crm/api/record/delete_records_param":{"ids":{"name":"ids","type":"String","required":true},"wfTrigger":{"name":"wf_trigger","type":"Boolean"}},"core/com/zoho/crm/api/assignment_rules/assignment_rules":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"apiName":{"name":"api_name","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/assignment_rules/created_by","name":"created_by","type":"core/com/zoho/crm/api/assignment_rules/created_by"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"description":{"name":"description","type":"String"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/assignment_rules/created_by","name":"modified_by","type":"core/com/zoho/crm/api/assignment_rules/created_by"},"id":{"name":"id","type":"Long"},"defaultAssignee":{"structure_name":"core/com/zoho/crm/api/assignment_rules/default_assignee","name":"default_assignee","type":"core/com/zoho/crm/api/assignment_rules/default_assignee"}},"core/com/zoho/crm/api/territory_users/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/tags/create_tags_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/related_records/update_related_records_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/assignment_rules/default_assignee":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/holidays/api_exception":{"code":{"values":["DEPENDENT_FIELD_MISSING","PATTERN_NOT_MATCHED","MANDATORY_NOT_FOUND","DUPLICATE_DATA","INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"}],"name":"dependee","type":"Map"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"},{"name":"regex","type":"String"}],"name":"details","type":"Map"},"message":{"values":["Shift id is required for shift holidays","Please check whether the input values are correct","required field not found","duplicate data","Invalid ID","invalid data"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/notifications/delete_notification_param":{"channelIds":{"name":"channel_ids","type":"Long","required":true}},"core/com/zoho/crm/api/layouts/get_layouts_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/taxes/action_handler":{"classes":["core/com/zoho/crm/api/taxes/action_wrapper","core/com/zoho/crm/api/taxes/api_exception"],"interface":true},"core/com/zoho/crm/api/user_groups/action_handler":{"classes":["core/com/zoho/crm/api/user_groups/action_wrapper","core/com/zoho/crm/api/user_groups/api_exception"],"interface":true},"core/com/zoho/crm/api/variable_groups/variable_group":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"name":{"name":"name","type":"String"},"description":{"name":"description","type":"String"},"id":{"name":"id","type":"Long"},"source":{"name":"source","type":"String"}},"core/com/zoho/crm/api/users_territories/action_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/users_territories/action_response","name":"territories","type":"List"}},"core/com/zoho/crm/api/record/upsert_records_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/send_mail/template":{"classes":["core/com/zoho/crm/api/inventory_templates/inventory_template","core/com/zoho/crm/api/email_templates/email_template"],"interface":true},"core/com/zoho/crm/api/hipaa_compliance/action_wrapper":{"hipaaCompliance":{"structure_name":"core/com/zoho/crm/api/hipaa_compliance/action_handler","name":"hipaa_compliance","interface":true,"type":"core/com/zoho/crm/api/hipaa_compliance/action_handler"}},"core/com/zoho/crm/api/from_addresses/response_wrapper":{"fromAddresses":{"structure_name":"core/com/zoho/crm/api/from_addresses/address","name":"from_addresses","type":"List"}},"core/com/zoho/crm/api/record/mass_update_response":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/mass_update"],"interface":true},"core/com/zoho/crm/api/related_records/get_related_records_param":{"perPage":{"name":"per_page","type":"Integer"},"page":{"name":"page","type":"Integer"},"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/user_groups/groups":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"sources":{"structure_name":"core/com/zoho/crm/api/user_groups/sources","name":"sources","type":"List"},"createdBy":{"structure_name":"core/com/zoho/crm/api/user_groups/owner","name":"created_by","type":"core/com/zoho/crm/api/user_groups/owner"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"description":{"name":"description","type":"String"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/user_groups/owner","name":"modified_by","type":"core/com/zoho/crm/api/user_groups/owner"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/change_owner/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/mass_delete_cvid/status":{"failedCount":{"name":"Failed_Count","type":"Integer"},"deletedCount":{"name":"Deleted_Count","type":"Integer"},"totalCount":{"name":"Total_Count","type":"Integer"},"status":{"values":["COMPLETED","RUNNING","FAILED"],"name":"Status","type":"utils/util/choice"}},"core/com/zoho/crm/api/user_groups/get_sources_param":{"perPage":{"name":"per_page","type":"String"},"userType":{"name":"user_type","type":"String"},"page":{"name":"page","type":"String"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/entity_scores/entity_scores":{"scoringRule":{"structure_name":"core/com/zoho/crm/api/entity_scores/scoring_rule_structure","name":"Scoring_Rule","type":"core/com/zoho/crm/api/entity_scores/scoring_rule_structure"},"score":{"name":"Score","type":"Integer"},"fieldStates":{"name":"$field_states","type":"List"},"positiveScore":{"name":"Positive_Score","type":"Integer"},"touchPointPositiveScore":{"name":"Touch_Point_Positive_Score","type":"Integer"},"ziaVisions":{"name":"$zia_visions","type":"Boolean"},"touchPointNegativeScore":{"name":"Touch_Point_Negative_Score","type":"Integer"},"id":{"name":"id","type":"Long"},"negativeScore":{"name":"Negative_Score","type":"Integer"},"entity":{"structure_name":"core/com/zoho/crm/api/entity_scores/entity_structure_group","name":"Entity","interface":true,"type":"core/com/zoho/crm/api/entity_scores/entity_structure_group"},"touchPointScore":{"name":"Touch_Point_Score","type":"Integer"}},"core/com/zoho/crm/api/wizards/connection":{"targetScreen":{"structure_name":"core/com/zoho/crm/api/wizards/screen","name":"target_screen","type":"core/com/zoho/crm/api/wizards/screen"},"sourceButton":{"structure_name":"core/com/zoho/crm/api/wizards/button","name":"source_button","type":"core/com/zoho/crm/api/wizards/button"}},"core/com/zoho/crm/api/modules/response_handler":{"classes":["core/com/zoho/crm/api/modules/response_wrapper","core/com/zoho/crm/api/modules/api_exception"],"interface":true},"core/com/zoho/crm/api/holidays/get_holidays_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/backup/backup":{"requester":{"structure_name":"core/com/zoho/crm/api/backup/requester","name":"requester","type":"core/com/zoho/crm/api/backup/requester"},"rrule":{"name":"rrule","type":"String"},"scheduledDate":{"name":"scheduled_date","type":"DateTime"},"id":{"name":"id","type":"Long"},"startDate":{"name":"start_date","type":"DateTime"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/user_groups/action_response":{"classes":["core/com/zoho/crm/api/user_groups/api_exception","core/com/zoho/crm/api/user_groups/success_response"],"interface":true},"core/com/zoho/crm/api/mass_convert/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/bulk_read/action_handler":{"classes":["core/com/zoho/crm/api/bulk_read/api_exception","core/com/zoho/crm/api/bulk_read/action_wrapper"],"interface":true},"core/com/zoho/crm/api/users_unavailability/response_wrapper":{"usersUnavailability":{"structure_name":"core/com/zoho/crm/api/users_unavailability/users_unavailability","name":"users_unavailability","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/users_unavailability/info","name":"info","type":"core/com/zoho/crm/api/users_unavailability/info"}},"core/com/zoho/crm/api/field_map_dependency/child":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/blueprint/transition":{"executionTime":{"name":"execution_time","type":"DateTime"},"criteriaMatched":{"name":"criteria_matched","type":"Boolean"},"parentTransition":{"structure_name":"core/com/zoho/crm/api/blueprint/transition","name":"parent_transition","type":"core/com/zoho/crm/api/blueprint/transition"},"percentPartialSave":{"name":"percent_partial_save","type":"Integer"},"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"core/com/zoho/crm/api/record/record"},"nextTransitions":{"structure_name":"core/com/zoho/crm/api/blueprint/next_transition","name":"next_transitions","type":"List"},"name":{"name":"name","type":"String"},"criteriaMessage":{"name":"criteria_message","type":"String"},"nextFieldValue":{"name":"next_field_value","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"fields":{"structure_name":"core/com/zoho/crm/api/blueprint/field","name":"fields","type":"List"}},"core/com/zoho/crm/api/users/response_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/users/users","name":"users","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/users/info","name":"info","type":"core/com/zoho/crm/api/users/info"}},"core/com/zoho/crm/api/files/response_handler":{"classes":["core/com/zoho/crm/api/files/api_exception","core/com/zoho/crm/api/files/file_body_wrapper"],"interface":true},"core/com/zoho/crm/api/custom_views/action_handler":{"classes":["core/com/zoho/crm/api/custom_views/api_exception"],"interface":true},"core/com/zoho/crm/api/users_transfer_delete/action_wrapper":{"transferAndDelete":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/action_response","name":"transfer_and_delete","type":"List"}},"core/com/zoho/crm/api/associate_email/associate_email":{"cc":{"structure_name":"core/com/zoho/crm/api/associate_email/to","name":"cc","type":"List"},"dateTime":{"name":"date_time","type":"DateTime"},"bcc":{"structure_name":"core/com/zoho/crm/api/associate_email/to","name":"bcc","type":"List"},"attachments":{"structure_name":"core/com/zoho/crm/api/associate_email/attachments","name":"attachments","type":"List"},"linkedRecord":{"structure_name":"core/com/zoho/crm/api/associate_email/linked_record","name":"linked_record","type":"core/com/zoho/crm/api/associate_email/linked_record"},"subject":{"name":"subject","max-length":250,"type":"String","min-length":1},"from":{"structure_name":"core/com/zoho/crm/api/associate_email/from","name":"from","type":"core/com/zoho/crm/api/associate_email/from"},"mailFormat":{"values":["html","text"],"name":"mail_format","type":"utils/util/choice"},"to":{"structure_name":"core/com/zoho/crm/api/associate_email/to","name":"to","type":"List"},"originalMessageId":{"name":"original_message_id","type":"String"},"sent":{"name":"sent","type":"Boolean"},"content":{"name":"content","type":"String"}},"core/com/zoho/crm/api/fields/api_exception":{"code":{"values":["INVALID_MODULE","MANDATORY_NOT_FOUND","INVALID_DATA","REQUIRED_PARAM_MISSING","LIMIT_EXCEEDED","DEPENDENT_FIELD_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"param_name","type":"String"},{"name":"limit","type":"Integer"},{"structure_name":"core/com/zoho/crm/api/fields/mandatory_details","name":"limit_due_to","type":"List"},{"structure_name":"core/com/zoho/crm/api/fields/mandatory_details","name":"dependee","type":"core/com/zoho/crm/api/fields/mandatory_details"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/blueprint/currency":{"roundingOption":{"name":"rounding_option","type":"String"},"precision":{"name":"precision","type":"Integer"}},"core/com/zoho/crm/api/email_related_records/status":{"lastOpen":{"name":"last_open","type":"DateTime"},"firstOpen":{"name":"first_open","type":"DateTime"},"count":{"name":"count","type":"String"},"bouncedReason":{"name":"bounced_reason","type":"String"},"type":{"name":"type","type":"String"},"bouncedTime":{"name":"bounced_time","type":"DateTime"}},"core/com/zoho/crm/api/record/get_record_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"},"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/users_transfer_delete/body_wrapper":{"transferAndDelete":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete","name":"transfer_and_delete","max-length":1,"type":"List"}},"core/com/zoho/crm/api/scoring_rules/action_handler":{"classes":["core/com/zoho/crm/api/scoring_rules/action_wrapper","core/com/zoho/crm/api/scoring_rules/success_response","core/com/zoho/crm/api/scoring_rules/api_exception"],"interface":true},"core/com/zoho/crm/api/org/org":{"country":{"name":"country","type":"String"},"city":{"name":"city","type":"String"},"companyName":{"name":"company_name","type":"String"},"callIcon":{"name":"call_icon","type":"String"},"description":{"name":"description","type":"String"},"oauthPresence":{"name":"oauth_presence","type":"Boolean"},"gappsEnabled":{"name":"gapps_enabled","type":"Boolean"},"hierarchyPreferences":{"structure_name":"core/com/zoho/crm/api/org/hierarchy_preferences","name":"hierarchy_preferences","type":"core/com/zoho/crm/api/org/hierarchy_preferences"},"ziaPortalId":{"name":"zia_portal_id","type":"String"},"employeeCount":{"regex":"[0-9]+","name":"employee_count","max-length":18,"type":"String"},"street":{"name":"street","type":"String"},"countryCode":{"name":"country_code","type":"String"},"checkinPreferences":{"structure_name":"core/com/zoho/crm/api/org/checkin_preferences","name":"checkin_preferences","type":"core/com/zoho/crm/api/org/checkin_preferences"},"currencyLocale":{"name":"currency_locale","type":"String"},"alias":{"name":"alias","type":"String"},"currency":{"name":"currency","type":"String"},"id":{"name":"id","type":"String"},"state":{"name":"state","type":"String"},"fax":{"name":"fax","type":"String"},"ziaZgid":{"name":"zia_zgid","type":"Integer"},"primaryEmail":{"name":"primary_email","type":"String"},"zip":{"name":"zip","type":"String"},"website":{"regex":"www[.][a-z0-9]+[.][a-z]{3}","name":"website","type":"String"},"ezgid":{"name":"ezgid","type":"String"},"mobile":{"name":"mobile","type":"String"},"photoId":{"name":"photo_id","type":"String"},"translationEnabled":{"name":"translation_enabled","type":"Boolean"},"currencySymbol":{"name":"currency_symbol","type":"String"},"timeZone":{"name":"time_zone","type":"TimeZone"},"privacySettings":{"name":"privacy_settings","type":"Boolean"},"maxPerPage":{"name":"max_per_page","type":"Integer"},"zgid":{"name":"zgid","type":"String"},"licenseDetails":{"structure_name":"core/com/zoho/crm/api/org/license_details","name":"license_details","type":"core/com/zoho/crm/api/org/license_details"},"mcStatus":{"name":"mc_status","type":"Boolean"},"primaryZuid":{"name":"primary_zuid","type":"String"},"liteUsersEnabled":{"name":"lite_users_enabled","type":"Boolean"},"phone":{"name":"phone","type":"String"},"isoCode":{"name":"iso_code","type":"String"},"domainName":{"name":"domain_name","type":"String"},"deletableOrgAccount":{"name":"deletable_org_account","type":"Boolean"},"hipaaComplianceEnabled":{"name":"hipaa_compliance_enabled","type":"Boolean"}},"core/com/zoho/crm/api/attachments/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/attachments/attachment","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/attachments/info","name":"info","type":"core/com/zoho/crm/api/attachments/info"}},"core/com/zoho/crm/api/modules/lookup_field_properties":{"fields":{"structure_name":"core/com/zoho/crm/api/modules/lookup_field","name":"fields","type":"List"}},"core/com/zoho/crm/api/fields/history_tracking_module":{"layout":{"structure_name":"core/com/zoho/crm/api/layouts/layouts","name":"layout","type":"core/com/zoho/crm/api/layouts/layouts"},"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"module":{"structure_name":"core/com/zoho/crm/api/fields/history_tracking_module","name":"module","type":"core/com/zoho/crm/api/fields/history_tracking_module"},"moduleName":{"name":"module_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/pipeline/get_pipelines_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/field_attachments/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/change_owner/api_exception":{"code":{"values":["NO_PERMISSION","INVALID_DATA","MANDATORY_NOT_FOUND","EXPECTED_FIELD_MISSING","NOT_SUPPORTED","AMBIGUITY_DURING_PROCESSING","INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"permissions","type":"List"},{"name":"resource_path_index","type":"Integer"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"structure_name":"core/com/zoho/crm/api/change_owner/error_details","name":"expected_fields","type":"List"},{"structure_name":"core/com/zoho/crm/api/change_owner/error_details","name":"ambiguity_due_to","type":"List"},{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/download_attachments/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","the request does not contain any file","invalid file type"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/backup/action_response":{"classes":["core/com/zoho/crm/api/backup/success_response","core/com/zoho/crm/api/backup/api_exception"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/parent":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/currencies/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/timelines/field_history_value":{"new1":{"name":"new","type":"String"},"old":{"name":"old","type":"String"}},"core/com/zoho/crm/api/assignment_rules/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/mass_update":{"failedCount":{"name":"Failed_Count","type":"Integer"},"updatedCount":{"name":"Updated_Count","type":"Integer"},"notUpdatedCount":{"name":"Not_Updated_Count","type":"Integer"},"totalCount":{"name":"Total_Count","type":"Integer"},"status":{"values":["COMPLETED","SCHEDULED","RUNNING","FAILED"],"name":"Status","type":"utils/util/choice"}},"core/com/zoho/crm/api/field_attachments/get_field_attachments_param":{"fieldsAttachmentId":{"name":"fields_attachment_id","type":"Long"}},"core/com/zoho/crm/api/users/owner":{"lastName":{"name":"last_name","type":"String"},"firstName":{"name":"first_name","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/user_type_users/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"},"totalCount":{"name":"total_count","type":"Integer"}},"core/com/zoho/crm/api/pipeline/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_convert/api_exception":{"code":{"values":["INVALID_DATA","EXPECTED_FIELD_MISSING","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"param","type":"String"},{"structure_name":"core/com/zoho/crm/api/mass_convert/error_details","name":"expected_fields","type":"List"},{"name":"param_name","type":"String"},{"name":"expected_data_type","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/related_lists/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}}} \ No newline at end of file +{"core/com/zoho/crm/api/record/api_exception":{"code":{"values":["NO_CONTENT","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","TERRITORY_NOT_ENABLED","DEPENDENT_FIELD_MISSING","EXPECTED_FIELD_MISSING","FEATURE_NOT_SUPPORTED","CONVERTED_RECORD","NOT_FOUND","NO_RECORDS_FOUND","NOT_APPROVED","LIMIT_EXCEEDED","ALREADY_SCHEDULED","CANNOT_PERFORM_ACTION","CANNOT_PROCESS","INTERNAL_ERROR","INVALID_TOKEN","INVALID_DATA","STORAGE_SPACE_EXCEEDED","MANDATORY_NOT_FOUND","NO_PERMISSION","INVALID_MODULE","NOT_SUPPORTED","PATTERN_NOT_MATCHED","OAUTH_SCOPE_MISMATCH","DUPLICATE_DATA","INVALID_QUERY","MAPPING_MISMATCH","ID_ALREADY_CONVERTED","FILE_SIZE_MORE_THAN_ALLOWED_SIZE","RECORD_IN_BLUEPRINT","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","CANNOT_DELETE","REQUIRED_PARAM_MISSING","DATA_MISMATCH","RECORD_LOCKED","BAD_REQUEST","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"permissions","type":"List"},{"name":"param_name","type":"String"},{"name":"api_name","type":"String"},{"name":"id","type":"Long"},{"name":"module","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"index","type":"Integer"},{"name":"maximum_length","type":"String"},{"name":"mapped_field","type":"String"},{"name":"reason","type":"String"},{"name":"operator","type":"String"},{"name":"allowed_count","type":"Integer"},{"name":"limit","type":"Integer"},{"name":"json_path","type":"String"},{"name":"parent_api_name","type":"String"},{"name":"param","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"External","type":"String"}],"name":"details","type":"Map"},"message":{"values":["The record under merge is locked","the given id seems to be invalid","The record is not approved","The external ID of the lookup field or the Price Book is incorrect","The value of the external field is invalid.","There is no data for the ID specified or there is no matching record in the given module.","The external field contains duplicate data.","the territory feature is not enabled","Given Probability is not valid","duplicate territory id found","Given Territory id already exists for that record","User has no permission to assign this territory","Maximum limit of territories for that record exceeds","Invalid Sequence Number","Record insertion limit for Image upload field has been exceeded.","Record insertion limit has been exceeded.","The image format is invalid.","Dependent Fields missing","Specify Atleast one field","the id given seems to be invalid.","Already an Mass Action scheduler is runing for the given cvid","Scheduled Mass Operation feature is not available in your edition","can't update the converted record","Field cannot be updated in Scheduled Mass Update","Field is not visible","Field cannot be updated as it is associated with a validation rule.","Field cannot be updated as it is associated with a layout rule.This field cannot be updated in the Mass Update","Max field limit exceeded","Maximum lookup field limit in criteria exceeded","No field found","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","Territory is not supported for the given module","Please check whether the input values are correct","invalid data","permission denied","Internal server error occurred.","duplicate data","required field not found","Layout doesn't contain the Pipeline","Pipeline doesn't contain the Stage","the id given seems to be invalid","record not deleted","record not deletable","Authentication failed","One of the expected parameter is missing","mandatory param missing","invalid query formed","id already converted","body","given id is invalid","Already a Mass Action scheduler is running for the given cvid","The record is in stop processing","The record is in blue print","no permission to perform an action on this record","Record count exceeded","record not approved","no record found to update","Field Edit Permission not given","Customview not accessible","Empty response","give contact id is mismatched with the data","give account id is mismatched with the data","Territory id which you are trying to remove was system assigned"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/pipeline/forecast_category":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline_success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/variables/action_handler":{"classes":["core/com/zoho/crm/api/variables/api_exception","core/com/zoho/crm/api/variables/action_wrapper"],"interface":true},"core/com/zoho/crm/api/associate_email/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"message_id","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/modules/get_modules_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/attachments/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/roles/role":{"displayLabel":{"name":"display_label","type":"String"},"forecastManager":{"structure_name":"core/com/zoho/crm/api/roles/reporting_to","name":"forecast_manager","type":"core/com/zoho/crm/api/roles/reporting_to"},"adminUser":{"name":"admin_user","type":"Boolean"},"modifiedByS":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by__s","type":"core/com/zoho/crm/api/users/minified_user"},"shareWithPeers":{"name":"share_with_peers","type":"Boolean"},"createdByS":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by__s","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"description":{"name":"description","type":"String"},"id":{"name":"id","type":"Long"},"createdTimeS":{"name":"created_time__s","type":"DateTime"},"modifiedTimeS":{"name":"modified_time__s","type":"DateTime"},"reportingTo":{"structure_name":"core/com/zoho/crm/api/roles/reporting_to","name":"reporting_to","type":"core/com/zoho/crm/api/roles/reporting_to"}},"core/com/zoho/crm/api/entity_scores/module_structure":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/deleted_records_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/deleted_record","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/record/info","name":"info","type":"core/com/zoho/crm/api/record/info"}},"core/com/zoho/crm/api/taxes/action_wrapper":{"orgTaxes":{"structure_name":"core/com/zoho/crm/api/taxes/action_response","name":"org_taxes","interface":true,"type":"core/com/zoho/crm/api/taxes/action_response"}},"core/com/zoho/crm/api/inventory_templates/response_handler":{"classes":["core/com/zoho/crm/api/inventory_templates/api_exception","core/com/zoho/crm/api/inventory_templates/response_wrapper"],"interface":true},"core/com/zoho/crm/api/entity_scores/entity_structure_with_module":{"module":{"structure_name":"core/com/zoho/crm/api/entity_scores/module_structure","name":"module","type":"core/com/zoho/crm/api/entity_scores/module_structure"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mail_merge/sign_mail_merge_wrapper":{"signMailMerge":{"structure_name":"core/com/zoho/crm/api/mail_merge/sign_mail_merge","name":"sign_mail_merge","type":"List"}},"core/com/zoho/crm/api/record/get_mass_update_status_param":{"jobId":{"name":"job_id","type":"String"}},"core/com/zoho/crm/api/currencies/api_exception":{"code":{"values":["INTERNAL_SERVER_ERROR","ALREADY_ENABLED","INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"regex","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"related_status","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_write/upload_file_header":{"feature":{"values":["bulk-write"],"name":"feature","type":"String"},"XCRMORG":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/wizards/button":{"displayLabel":{"name":"display_label","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"backgroundColor":{"name":"background_color","type":"String"},"color":{"name":"color","type":"String"},"shape":{"name":"shape","type":"String"},"visibility":{"name":"visibility","type":"String"},"resource":{"name":"resource","type":"Object"},"criteria":{"structure_name":"core/com/zoho/crm/api/wizards/criteria","name":"criteria","type":"core/com/zoho/crm/api/wizards/criteria"},"targetScreen":{"structure_name":"core/com/zoho/crm/api/wizards/screen","name":"target_screen","type":"core/com/zoho/crm/api/wizards/screen"},"type":{"name":"type","type":"String"},"transition":{"structure_name":"core/com/zoho/crm/api/wizards/transition","name":"transition","type":"core/com/zoho/crm/api/wizards/transition"},"id":{"name":"id","type":"Long"},"category":{"name":"category","type":"String"}},"core/com/zoho/crm/api/mass_change_owner/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["owner is successfully updated"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/holidays/action_wrapper":{"holidays":{"structure_name":"core/com/zoho/crm/api/holidays/action_response","name":"holidays","type":"List"}},"core/com/zoho/crm/api/users/associated_groups_wrapper":{"userGroups":{"structure_name":"core/com/zoho/crm/api/users/associated_group","name":"user_groups","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/users/info","name":"info","type":"core/com/zoho/crm/api/users/info"}},"core/com/zoho/crm/api/record/tax":{"id":{"name":"id","type":"Long"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/send_mail/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/send_mail/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/layouts/section_field":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"sharingProperties":{"structure_name":"core/com/zoho/crm/api/modules/sharing_properties","name":"sharing_properties","type":"core/com/zoho/crm/api/modules/sharing_properties"},"apiName":{"name":"api_name","type":"String"},"webhook":{"name":"webhook","type":"Boolean"},"defaultValue":{"name":"default_value","type":"String"},"associatedModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"associated_module","type":"core/com/zoho/crm/api/modules/minified_module"},"tooltip":{"structure_name":"core/com/zoho/crm/api/fields/tooltip","name":"tooltip","type":"core/com/zoho/crm/api/fields/tooltip"},"quickSequenceNumber":{"name":"quick_sequence_number","type":"String"},"jsonType":{"name":"json_type","type":"String"},"type":{"name":"type","type":"String"},"required":{"name":"required","type":"Boolean"},"availableInUserLayout":{"name":"available_in_user_layout","type":"Boolean"},"rollupSummary":{"structure_name":"core/com/zoho/crm/api/fields/rollup_summary","name":"rollup_summary","type":"core/com/zoho/crm/api/fields/rollup_summary"},"blueprintSupported":{"name":"blueprint_supported","type":"Boolean"},"createdTime":{"name":"created_time","type":"DateTime"},"showType":{"name":"show_type","type":"Integer"},"globalPicklist":{"name":"global_picklist","type":"Object"},"id":{"name":"id","type":"Long"},"additionalColumn":{"name":"additional_column","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"filterable":{"name":"filterable","type":"Boolean"},"emailParser":{"structure_name":"core/com/zoho/crm/api/fields/email_parser","name":"email_parser","type":"core/com/zoho/crm/api/fields/email_parser"},"visible":{"name":"visible","type":"Boolean"},"dataType":{"values":["formula","text","boolean","picklist","datetime","website","autonumber","textarea","email","phone","integer","double","date","formula","text","boolean","picklist","datetime","website","autonumber","textarea","lookup","email","userlookup","phone","integer","double","date"],"name":"data_type","type":"utils/util/choice"},"profiles":{"structure_name":"core/com/zoho/crm/api/fields/profile","name":"profiles","type":"List"},"readOnly":{"name":"read_only","type":"Boolean"},"historyTracking":{"structure_name":"core/com/zoho/crm/api/fields/history_tracking","name":"history_tracking","type":"core/com/zoho/crm/api/fields/history_tracking"},"subform":{"structure_name":"core/com/zoho/crm/api/layouts/section_subform_field","name":"subform","type":"core/com/zoho/crm/api/layouts/section_subform_field"},"systemMandatory":{"name":"system_mandatory","type":"Boolean"},"separator":{"name":"separator","type":"Boolean"},"customField":{"name":"custom_field","type":"Boolean"},"searchable":{"name":"searchable","type":"Boolean"},"decimalPlace":{"name":"decimal_place","type":"Integer"},"createdSource":{"name":"created_source","type":"String"},"displayType":{"name":"display_type","type":"Integer"},"external":{"structure_name":"core/com/zoho/crm/api/fields/external","name":"external","type":"core/com/zoho/crm/api/fields/external"},"subModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"sub_module","type":"core/com/zoho/crm/api/modules/minified_module"},"unique":{"structure_name":"core/com/zoho/crm/api/fields/unique","name":"unique","type":"core/com/zoho/crm/api/fields/unique"},"viewType":{"structure_name":"core/com/zoho/crm/api/fields/view_type","name":"view_type","type":"core/com/zoho/crm/api/fields/view_type"},"displayField":{"name":"display_field","type":"Boolean"},"operationType":{"structure_name":"core/com/zoho/crm/api/fields/operation_type","name":"operation_type","type":"core/com/zoho/crm/api/fields/operation_type"},"hipaaComplianceEnabled":{"name":"hipaa_compliance_enabled","type":"Boolean"},"validationRule":{"name":"validation_rule","type":"Map"},"crypt":{"structure_name":"core/com/zoho/crm/api/fields/crypt","name":"crypt","type":"core/com/zoho/crm/api/fields/crypt"},"fileUpoladOptionlist":{"structure_name":"core/com/zoho/crm/api/fields/file_upolad_option","name":"file_upolad_optionlist","type":"List"},"enableColourCode":{"name":"enable_colour_code","type":"Boolean"},"virtualField":{"name":"virtual_field","type":"Boolean"},"hipaaCompliance":{"structure_name":"core/com/zoho/crm/api/fields/hipaa_compliance","name":"hipaa_compliance","type":"core/com/zoho/crm/api/fields/hipaa_compliance"},"associationDetails":{"structure_name":"core/com/zoho/crm/api/fields/association_details","name":"association_details","type":"core/com/zoho/crm/api/fields/association_details"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/fields/pick_list_value","name":"pick_list_values","type":"List"},"fieldLabel":{"name":"field_label","type":"String"},"referFromField":{"structure_name":"core/com/zoho/crm/api/fields/refer_from_field","name":"refer_from_field","type":"core/com/zoho/crm/api/fields/refer_from_field"},"allowedModules":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"allowed_modules","type":"List"},"fieldReadOnly":{"name":"field_read_only","type":"Boolean"},"businesscardSupported":{"name":"businesscard_supported","type":"Boolean"},"currency":{"structure_name":"core/com/zoho/crm/api/fields/currency","name":"currency","type":"core/com/zoho/crm/api/fields/currency"},"multiuserlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiuserlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"displayLabel":{"name":"display_label","type":"String"},"lookup":{"structure_name":"core/com/zoho/crm/api/fields/lookup","name":"lookup","type":"core/com/zoho/crm/api/fields/lookup"},"length":{"values":[120],"name":"length","type":"utils/util/choice"},"pickListValuesSortedLexically":{"name":"pick_list_values_sorted_lexically","type":"Boolean"},"sectionId":{"name":"section_id","type":"Integer"},"sortable":{"name":"sortable","type":"Boolean"},"autoNumber":{"structure_name":"core/com/zoho/crm/api/fields/auto_number","name":"auto_number","type":"core/com/zoho/crm/api/fields/auto_number"},"private1":{"structure_name":"core/com/zoho/crm/api/fields/private","name":"private","type":"core/com/zoho/crm/api/fields/private"},"convertMapping":{"structure_name":"core/com/zoho/crm/api/fields/convert_mapping","name":"convert_mapping","type":"core/com/zoho/crm/api/fields/convert_mapping"},"multiModuleLookup":{"structure_name":"core/com/zoho/crm/api/fields/multi_module_lookup","name":"multi_module_lookup","type":"core/com/zoho/crm/api/fields/multi_module_lookup"},"massUpdate":{"name":"mass_update","type":"Boolean"},"uiType":{"name":"ui_type","type":"Integer"},"formula":{"structure_name":"core/com/zoho/crm/api/fields/formula","name":"formula","type":"core/com/zoho/crm/api/fields/formula"},"category":{"name":"category","type":"Integer"},"multiselectlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiselectlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"columnName":{"name":"column_name","type":"String"}},"core/com/zoho/crm/api/timelines/response_wrapper":{"timeline":{"structure_name":"core/com/zoho/crm/api/timelines/timeline","name":"__timeline","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/timelines/info","name":"info","type":"core/com/zoho/crm/api/timelines/info"}},"core/com/zoho/crm/api/record/criteria":{"comparator":{"values":["equal","not_equal","in","not_in","less_than","less_equal","greater_than","greater_equal","contains","not_contains","starts_with","ends_with","between","not_between"],"name":"comparator","type":"utils/util/choice"},"groupOperator":{"values":["and","or"],"name":"group_operator","type":"utils/util/choice"},"field":{"name":"field","type":"String"},"value":{"name":"value","type":"Object"},"group":{"lookup":true,"structure_name":"core/com/zoho/crm/api/record/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/custom_views/api_exception":{"code":{"values":["INVALID_DATA","REQUIRED_PARAM_MISSING","MANDATORY_NOT_FOUND","EXPECTED_FIELD_MISSING","DUPLICATE_DATA","INVALID_MODULE","INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"name":"id","type":"Long"},{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"param_name","type":"String"},{"structure_name":"core/com/zoho/crm/api/custom_views/error_details","name":"expected_fields","type":"List"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_write/resource":{"code":{"name":"code","type":"String"},"file":{"structure_name":"core/com/zoho/crm/api/bulk_write/file","name":"file","type":"core/com/zoho/crm/api/bulk_write/file"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"ignoreEmpty":{"name":"ignore_empty","type":"Boolean"},"findBy":{"name":"find_by","type":"String"},"fieldMappings":{"structure_name":"core/com/zoho/crm/api/bulk_write/field_mapping","name":"field_mappings","type":"List"},"type":{"values":["data"],"name":"type","type":"utils/util/choice"},"status":{"values":["ADDED","IN PROGRESS","COMPLETED","SKIPPED","FAILED"],"name":"status","type":"utils/util/choice"},"fileId":{"name":"file_id","type":"String"}},"core/com/zoho/crm/api/backup/api_exception":{"code":{"values":["BACKUP_ALREADY_SCHEDULED","ALREADY_CANCELLED","RESOURCE_NOT_FOUND","REQUEST_BODY_NOT_READABLE","INVALID_DATA","INPROGRESS","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/deal_contact_roles/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/roles/delete_role_param":{"transferToId":{"name":"transfer_to_id","type":"Long","required":true}},"core/com/zoho/crm/api/record/recurring_activity":{"rrule":{"name":"RRULE","type":"String"},"exdate":{"name":"EXDATE","type":"String"}},"core/com/zoho/crm/api/notifications/response_handler":{"classes":["core/com/zoho/crm/api/notifications/api_exception","core/com/zoho/crm/api/notifications/response_wrapper"],"interface":true},"core/com/zoho/crm/api/record/update_records_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/fields/body_wrapper":{"fields":{"structure_name":"core/com/zoho/crm/api/fields/fields","name":"fields","type":"List"}},"core/com/zoho/crm/api/pipeline/getpipeline_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/layouts/properties":{"maximumRows":{"name":"maximum_rows","type":"Integer"},"tooltip":{"structure_name":"core/com/zoho/crm/api/layouts/tooltip","name":"tooltip","type":"core/com/zoho/crm/api/layouts/tooltip"},"reorderRows":{"name":"reorder_rows","type":"Boolean"}},"core/com/zoho/crm/api/users_transfer_delete/response_wrapper":{"transferAndDelete":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/status","name":"transfer_and_delete","type":"List"}},"core/com/zoho/crm/api/taxes/action_response":{"classes":["core/com/zoho/crm/api/taxes/success_response","core/com/zoho/crm/api/taxes/api_exception"],"interface":true},"core/com/zoho/crm/api/privacy_preference/preference":{"dataProcessingDuration":{"name":"data_processing_duration","type":"String"},"excludeExport":{"name":"exclude_export","type":"String"},"restrictZohoIntegFields":{"name":"restrict_zoho_integ_fields","type":"String"},"restrictTpt":{"name":"restrict_tpt","type":"String"},"excludeExportFields":{"name":"exclude_export_fields","type":"String"},"restrictTptServices":{"name":"restrict_tpt_services","type":"String"},"restrictTptFields":{"name":"restrict_tpt_fields","type":"String"},"restrictZohoIntegServices":{"name":"restrict_zoho_integ_services","type":"String"},"restrictZohoInteg":{"name":"restrict_zoho_integ","type":"String"},"excludeAPITpt":{"name":"exclude_api_tpt","type":"String"},"limitActions":{"name":"limit_actions","type":"String"},"excludeAPIZohoFields":{"name":"exclude_api_zoho_fields","type":"String"},"actionsWhileAwaiting":{"name":"actions_while_awaiting","type":"String"},"doubleOptIn":{"name":"double_opt_in","type":"String"},"blockList":{"name":"block_list","type":"String"},"excludeAPIZoho":{"name":"exclude_api_zoho","type":"String"},"privacySettingStatus":{"name":"privacy_setting_status","type":"String"},"excludeAPITptFields":{"name":"exclude_api_tpt_fields","type":"String"},"consentModules":{"name":"consent_modules","type":"String"},"durationTiming":{"name":"duration_timing","type":"String"},"consentMailSend":{"name":"consent_mail_send","type":"String"},"awaitingPeriod":{"name":"awaiting_period","type":"String"}},"core/com/zoho/crm/api/fields/query_details":{"criteria":{"name":"criteria","type":"Map"},"queryId":{"name":"query_id","type":"Long"}},"core/com/zoho/crm/api/pipeline/maps":{"displayValue":{"name":"display_value","type":"String"},"sequenceNumber":{"name":"sequence_number","max-length":10,"type":"Integer"},"forecastCategory":{"structure_name":"core/com/zoho/crm/api/pipeline/forecast_category","name":"forecast_category","type":"core/com/zoho/crm/api/pipeline/forecast_category"},"actualValue":{"name":"actual_value","type":"String"},"colourCode":{"name":"colour_code","type":"String"},"id":{"name":"id","type":"Long"},"forecastType":{"name":"forecast_type","type":"String"},"delete1":{"name":"_delete","type":"Boolean"}},"core/com/zoho/crm/api/tags/record_action_response":{"classes":["core/com/zoho/crm/api/tags/api_exception","core/com/zoho/crm/api/tags/record_success_response"],"interface":true},"core/com/zoho/crm/api/files/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/files/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/user_groups/associated_user":{"count":{"name":"count","type":"Integer"},"userGroup":{"structure_name":"core/com/zoho/crm/api/user_groups/user_group","name":"user_group","type":"core/com/zoho/crm/api/user_groups/user_group"}},"core/com/zoho/crm/api/record/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/territories/manager":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users/get_users_param":{"perPage":{"name":"per_page","type":"Integer"},"ids":{"name":"ids","type":"String"},"page":{"name":"page","type":"Integer"},"type":{"values":["ActiveUsers","DeactiveUsers","NotConfirmedUsers","ConfirmedUsers","CurrentUser","ActiveConfirmedUsers"],"name":"type","type":"String"}},"core/com/zoho/crm/api/cancel_meetings/action_response":{"classes":["core/com/zoho/crm/api/cancel_meetings/success_response","core/com/zoho/crm/api/cancel_meetings/api_exception"],"interface":true},"core/com/zoho/crm/api/files/action_handler":{"classes":["core/com/zoho/crm/api/files/api_exception","core/com/zoho/crm/api/files/action_wrapper"],"interface":true},"core/com/zoho/crm/api/record/action_response":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/success_response"],"interface":true},"core/com/zoho/crm/api/scoring_rules/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/territory_users/deassociate_territory_users_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/notes/get_notes_param":{"perPage":{"name":"per_page","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"String"},"fields":{"name":"fields","type":"String","required":true}},"core/com/zoho/crm/api/bulk_read/criteria":{"groupOperator":{"values":["and","or"],"name":"group_operator","type":"utils/util/choice"},"comparator":{"values":["equal","not_equal","in","not_in","less_than","less_equal","greater_than","greater_equal","contains","not_contains","starts_with","ends_with","between","not_between"],"name":"comparator","type":"utils/util/choice"},"apiName":{"name":"api_name","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"field","type":"core/com/zoho/crm/api/fields/minified_field"},"value":{"name":"value","type":"Object"},"group":{"structure_name":"core/com/zoho/crm/api/bulk_read/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/share_records/response_handler":{"classes":["core/com/zoho/crm/api/share_records/response_wrapper","core/com/zoho/crm/api/share_records/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/transfer_to_user":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/related_records/get_related_record_using_external_id_param":{"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/send_mail/action_handler":{"classes":["core/com/zoho/crm/api/send_mail/action_wrapper","core/com/zoho/crm/api/send_mail/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/transfer_action_response":{"classes":["core/com/zoho/crm/api/users_territories/success_response"],"interface":true},"core/com/zoho/crm/api/wizards/portal_user_type":{"layout":{"structure_name":"core/com/zoho/crm/api/layouts/layouts","name":"layout","type":"core/com/zoho/crm/api/layouts/layouts"},"chartData":{"structure_name":"core/com/zoho/crm/api/wizards/chart_data","name":"chart_data","type":"core/com/zoho/crm/api/wizards/chart_data"},"screens":{"structure_name":"core/com/zoho/crm/api/wizards/screen","name":"screens","type":"List"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mass_convert/assign_to":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/change_owner/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/change_owner/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/shift_hours/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/currencies/currency":{"symbol":{"name":"symbol","type":"String"},"modifiedTime":{"name":"modified_time","type":"DateTime"},"format":{"structure_name":"core/com/zoho/crm/api/currencies/currency_format","name":"format","type":"core/com/zoho/crm/api/currencies/currency_format"},"isActive":{"name":"is_active","type":"Boolean"},"exchangeRate":{"regex":"[1-9]{2}[.][1-9]{9}","name":"exchange_rate","type":"String"},"isoCode":{"name":"iso_code","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"prefixSymbol":{"name":"prefix_symbol","type":"Boolean"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"isBase":{"name":"is_base","type":"Boolean"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/shift_hours/shift_hours":{"holidays":{"structure_name":"core/com/zoho/crm/api/shift_hours/holidays","name":"holidays","type":"List"},"timezone":{"name":"timezone","type":"TimeZone"},"sameAsEveryday":{"name":"same_as_everyday","type":"Boolean"},"name":{"name":"name","type":"String"},"usersCount":{"name":"users_count","type":"Integer"},"id":{"name":"id","type":"Long"},"breakHours":{"structure_name":"core/com/zoho/crm/api/shift_hours/break_hours","name":"break_hours","type":"List"},"dailyTiming":{"name":"daily_timing","type":"List"},"shiftDays":{"name":"shift_days","type":"List"},"users":{"structure_name":"core/com/zoho/crm/api/shift_hours/users","name":"users","type":"List"},"customTiming":{"structure_name":"core/com/zoho/crm/api/shift_hours/shift_custom_timing","name":"custom_timing","type":"List"}},"core/com/zoho/crm/api/backup/urls":{"expiryDate":{"name":"expiry_date","type":"DateTime"},"attachmentLinks":{"name":"attachment_links","type":"List"},"dataLinks":{"name":"data_links","type":"List"}},"core/com/zoho/crm/api/holidays/holidays":{"holidays":{"structure_name":"core/com/zoho/crm/api/holidays/holiday","name":"holidays","type":"List"}},"core/com/zoho/crm/api/wizards/resource":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/change_owner/action_handler":{"classes":["core/com/zoho/crm/api/change_owner/api_exception","core/com/zoho/crm/api/change_owner/action_wrapper"],"interface":true},"core/com/zoho/crm/api/timelines/path_finder":{"processExit":{"name":"process_exit","type":"Boolean"},"state":{"structure_name":"core/com/zoho/crm/api/timelines/state","name":"state","type":"core/com/zoho/crm/api/timelines/state"},"processEntry":{"name":"process_entry","type":"Boolean"}},"core/com/zoho/crm/api/territories/reporting_to":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/related_records/delink_records_param":{"ids":{"name":"ids","type":"String","required":true}},"core/com/zoho/crm/api/portal_user_type/get_user_types_param":{"include":{"values":["modules"],"name":"include","type":"String"}},"core/com/zoho/crm/api/fields/function_parameter":{"apiName":{"name":"api_name","type":"String"}},"core/com/zoho/crm/api/assignment_rules/response_wrapper":{"assignmentRules":{"structure_name":"core/com/zoho/crm/api/assignment_rules/assignment_rules","name":"assignment_rules","type":"List"}},"core/com/zoho/crm/api/record/search_records_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/users_territories/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portals/action_wrapper":{"portals":{"structure_name":"core/com/zoho/crm/api/portals/action_response","name":"portals","type":"List"}},"core/com/zoho/crm/api/wizards/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/timelines/response_handler":{"classes":["core/com/zoho/crm/api/timelines/api_exception","core/com/zoho/crm/api/timelines/response_wrapper"],"interface":true},"core/com/zoho/crm/api/user_groups/body_wrapper":{"userGroups":{"structure_name":"core/com/zoho/crm/api/user_groups/groups","name":"user_groups","type":"List"}},"core/com/zoho/crm/api/templates/templates":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"folder":{"structure_name":"core/com/zoho/crm/api/templates/folder","name":"folder","type":"core/com/zoho/crm/api/templates/folder"},"attachmentPresent":{"name":"attachment_present","type":"Boolean"},"subject":{"name":"subject","type":"String"},"module":{"name":"module","type":"String"},"consentLinked":{"name":"consent_linked","type":"Boolean"},"name":{"name":"name","type":"String"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/templates/folder","name":"modified_by","type":"core/com/zoho/crm/api/templates/folder"},"id":{"name":"id","type":"Long"},"favourite":{"name":"favourite","type":"Boolean"}},"core/com/zoho/crm/api/mass_delete_cvid/cvid_body_wrapper":{"cvid":{"name":"cvid","type":"Long"},"territory":{"structure_name":"core/com/zoho/crm/api/mass_delete_cvid/territory","name":"territory","type":"core/com/zoho/crm/api/mass_delete_cvid/territory"}},"core/com/zoho/crm/api/reschedule_history/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"Modified_Time","type":"String"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"Created_Time","type":"String"},{"name":"id","type":"Long"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"$approval_state","type":"String"}],"name":"details","type":"Map"},"message":{"values":["record added","record updated","record deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/notifications/notification":{"resourceId":{"name":"resource_id","type":"Long"},"deleteevents":{"values":[true],"name":"_delete_events","type":"utils/util/choice"},"notifyOnRelatedAction":{"name":"notify_on_related_action","type":"Boolean"},"returnAffectedFieldValues":{"name":"return_affected_field_values","type":"Boolean"},"notifyUrl":{"regex":"www[.][a-z]{5}zoho[.]com","name":"notify_url","type":"String"},"resourceName":{"name":"resource_name","type":"String"},"resourceUri":{"name":"resource_uri","type":"String"},"fields":{"name":"fields","type":"Map"},"channelExpiry":{"name":"channel_expiry","type":"DateTime"},"channelId":{"name":"channel_id","type":"String"},"events":{"name":"events","type":"List"},"token":{"name":"token","type":"String"}},"core/com/zoho/crm/api/record/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"duplicateField":{"name":"duplicate_field","type":"String"},"action":{"values":["insert","update"],"name":"action","type":"utils/util/choice"},"details":{"keys":[{"name":"Modified_Time","type":"DateTime"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"Created_Time","type":"DateTime"},{"name":"id","type":"String"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"External_Contact_ID","type":"String"},{"name":"$approval_state","type":"String"},{"structure_name":"core/com/zoho/crm/api/record/record","name":"Contacts","type":"core/com/zoho/crm/api/record/record"},{"structure_name":"core/com/zoho/crm/api/record/record","name":"Deals","type":"core/com/zoho/crm/api/record/record"},{"structure_name":"core/com/zoho/crm/api/record/record","name":"Accounts","type":"core/com/zoho/crm/api/record/record"}],"name":"details","type":"Map"},"message":{"values":["The record has been converted successfully","record updated","record deleted","record added","photo uploaded successfully","Photo deleted","the territories data updated successfully","the territories are removed successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/users_unavailability/action_response":{"classes":["core/com/zoho/crm/api/users_unavailability/api_exception","core/com/zoho/crm/api/users_unavailability/success_response"],"interface":true},"core/com/zoho/crm/api/pipeline/mandatory_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/available_currencies/api_exception":{"code":{"values":["INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/shift_hours/get_shift_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/mass_delete_cvid/mass_delete_scheduled":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["mass delete scheduled successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/rollup_summary":{"expression":{"structure_name":"core/com/zoho/crm/api/fields/expression","name":"expression","type":"core/com/zoho/crm/api/fields/expression"},"basedOnModule":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"based_on_module","type":"core/com/zoho/crm/api/fields/minified_field"},"relatedList":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"related_list","type":"core/com/zoho/crm/api/fields/minified_field"},"rollupBasedOn":{"name":"rollup_based_on","type":"String"},"returnType":{"name":"return_type","type":"String"}},"core/com/zoho/crm/api/inventory_templates/response_wrapper":{"inventoryTemplates":{"structure_name":"core/com/zoho/crm/api/inventory_templates/inventory_template","name":"inventory_templates","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/inventory_templates/info","name":"info","type":"core/com/zoho/crm/api/inventory_templates/info"}},"core/com/zoho/crm/api/holidays/response_handler":{"classes":["core/com/zoho/crm/api/holidays/api_exception","core/com/zoho/crm/api/holidays/response_wrapper"],"interface":true},"core/com/zoho/crm/api/mail_merge/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"report_link","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/blueprint/next_transition":{"criteriaMatched":{"name":"criteria_matched","type":"Boolean"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/definition/api_exception":{"code":{"values":["INVALID_DATA","REQUIRED_PARAM_MISSING"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"values":["resource"],"name":"param_name","type":"utils/util/choice"},{"values":["resource"],"name":"param","type":"utils/util/choice"}],"name":"details","type":"Map"},"message":{"values":["invalid param","One of the expected parameter is missing"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/user_groups/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"regex","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fiscal_year/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["The fiscal year configuration has been updated successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/shift_hours/body_wrapper":{"shiftHours":{"structure_name":"core/com/zoho/crm/api/shift_hours/shift_hours","name":"shift_hours","type":"List"}},"core/com/zoho/crm/api/users/response_handler":{"classes":["core/com/zoho/crm/api/users/associated_groups_wrapper","core/com/zoho/crm/api/users/response_wrapper","core/com/zoho/crm/api/users/api_exception"],"interface":true},"core/com/zoho/crm/api/users_unavailability/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","MANDATORY_NOT_FOUND","PATTERN_NOT_MATCHED","INVALID_URL_PATTERN","UNABLE_TO_PARSE_DATA_TYPE","INVALID_TOKEN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"index","type":"Integer"},{"name":"param_name","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["Ids should be Long value with comma separated","required field not found","Please check whether the input values are correct","Please check if the URL trying to access is a correct one","either the request body or parameters is in wrong format"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/backup/response_handler":{"classes":["core/com/zoho/crm/api/backup/urls_wrapper","core/com/zoho/crm/api/backup/history_wrapper","core/com/zoho/crm/api/backup/file_body_wrapper","core/com/zoho/crm/api/backup/body_wrapper","core/com/zoho/crm/api/backup/api_exception"],"interface":true},"core/com/zoho/crm/api/mass_convert/action_response":{"classes":["core/com/zoho/crm/api/mass_convert/api_exception","core/com/zoho/crm/api/mass_convert/success_response"],"interface":true},"core/com/zoho/crm/api/fields/hipaa_compliance":{"restricted":{"name":"restricted","type":"Boolean"},"restrictedInExport":{"name":"restricted_in_export","type":"Boolean"}},"core/com/zoho/crm/api/fields/convert_mapping":{"deals":{"name":"Deals","type":"String"},"accounts":{"name":"Accounts","type":"String"},"contacts":{"name":"Contacts","type":"String"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline_action_response":{"classes":["core/com/zoho/crm/api/pipeline/api_exception","core/com/zoho/crm/api/pipeline/transfer_pipeline_success_response"],"interface":true},"core/com/zoho/crm/api/mass_change_owner/action_handler":{"classes":["core/com/zoho/crm/api/mass_change_owner/action_wrapper","core/com/zoho/crm/api/mass_change_owner/api_exception"],"interface":true},"core/com/zoho/crm/api/blueprint/escalation":{"days":{"name":"days","type":"Integer"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/layouts/default_assignment_view":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/record/get_deleted_records_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/user_groups/owner":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/reschedule_history/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"DateTime"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"}},"core/com/zoho/crm/api/send_mail/from":{"userName":{"name":"user_name","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/territories/associated_users_count_wrapper":{"associatedUsersCount":{"structure_name":"core/com/zoho/crm/api/territories/associated_users_count","name":"associated_users_count","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/territories/info","name":"info","type":"core/com/zoho/crm/api/territories/info"}},"core/com/zoho/crm/api/tags/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/contact_roles/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/send_mail/data":{"cc":{"structure_name":"core/com/zoho/crm/api/send_mail/to","name":"cc","type":"List"},"template":{"structure_name":"core/com/zoho/crm/api/send_mail/template","name":"template","interface":true,"type":"core/com/zoho/crm/api/send_mail/template"},"bcc":{"structure_name":"core/com/zoho/crm/api/send_mail/to","name":"bcc","type":"List"},"scheduledTime":{"name":"scheduled_time","type":"DateTime"},"attachments":{"structure_name":"core/com/zoho/crm/api/send_mail/attachment","name":"attachments","type":"List"},"subject":{"name":"subject","type":"String"},"inReplyTo":{"name":"in_reply_to","type":"String"},"inventoryDetails":{"structure_name":"core/com/zoho/crm/api/send_mail/inventory_details","name":"inventory_details","type":"core/com/zoho/crm/api/send_mail/inventory_details"},"content":{"name":"content","type":"String"},"orgEmail":{"name":"org_email","type":"Boolean"},"replyTo":{"structure_name":"core/com/zoho/crm/api/send_mail/to","name":"reply_to","type":"core/com/zoho/crm/api/send_mail/to"},"from":{"structure_name":"core/com/zoho/crm/api/send_mail/from","name":"from","type":"core/com/zoho/crm/api/send_mail/from"},"mailFormat":{"values":["html","text"],"name":"mail_format","type":"utils/util/choice"},"to":{"structure_name":"core/com/zoho/crm/api/send_mail/to","name":"to","type":"List"},"consentEmail":{"name":"consent_email","type":"Boolean"},"dataSubjectRequest":{"structure_name":"core/com/zoho/crm/api/send_mail/data_subject_request","name":"data_subject_request","type":"core/com/zoho/crm/api/send_mail/data_subject_request"}},"core/com/zoho/crm/api/tags/response_handler":{"classes":["core/com/zoho/crm/api/tags/response_wrapper","core/com/zoho/crm/api/tags/api_exception","core/com/zoho/crm/api/tags/count_response_wrapper"],"interface":true},"core/com/zoho/crm/api/reschedule_history/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","INVALID_DATA","INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["required field not found","record not deleted","the module name given seems to be invalid","invalid data"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/scoring_rules/get_scoring_rules_param":{"perPage":{"values":[10],"name":"per_page","type":"Integer"},"module":{"name":"module","type":"String"},"name":{"name":"name","type":"Long"},"active":{"values":[true,false],"name":"active","type":"Boolean"},"page":{"values":[2],"name":"page","type":"Integer"},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/record/download_handler":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/file_body_wrapper"],"interface":true},"core/com/zoho/crm/api/portal_invite/response_wrapper":{"portalInvite":{"structure_name":"core/com/zoho/crm/api/portal_invite/job_response","name":"portal_invite","type":"List"}},"core/com/zoho/crm/api/tags/get_tags_param":{"myTags":{"values":["true","false"],"name":"my_tags","type":"String"},"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/notifications/body_wrapper":{"watch":{"structure_name":"core/com/zoho/crm/api/notifications/notification","name":"watch","max-length":100,"type":"List","min-length":1}},"core/com/zoho/crm/api/email_sharing/response_wrapper":{"emailssharingdetails":{"structure_name":"core/com/zoho/crm/api/email_sharing/get_email_sharing","name":"__emails_sharing_details","type":"List"}},"core/com/zoho/crm/api/user_groups/association_wrapper":{"associations":{"structure_name":"core/com/zoho/crm/api/user_groups/association_response","name":"associations","type":"List"}},"core/com/zoho/crm/api/territories/body_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/territories/territories","name":"territories","type":"List"}},"core/com/zoho/crm/api/portal_user_type/response_handler":{"classes":["core/com/zoho/crm/api/portal_user_type/response_wrapper","core/com/zoho/crm/api/portal_user_type/api_exception"],"interface":true},"core/com/zoho/crm/api/portal_invite/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"},{"name":"param","type":"String"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_convert/response_handler":{"classes":["core/com/zoho/crm/api/mass_convert/response_wrapper","core/com/zoho/crm/api/mass_convert/api_exception"],"interface":true},"core/com/zoho/crm/api/fields/profile":{"permissionType":{"name":"permission_type","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/variables/action_wrapper":{"variables":{"structure_name":"core/com/zoho/crm/api/variables/action_response","name":"variables","type":"List"}},"core/com/zoho/crm/api/org/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/notes/get_note_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"String","required":true}},"core/com/zoho/crm/api/service_preference/action_handler":{"classes":["core/com/zoho/crm/api/service_preference/api_exception","core/com/zoho/crm/api/service_preference/action_wrapper"],"interface":true},"core/com/zoho/crm/api/mass_change_owner/status":{"failedCount":{"name":"Failed_Count","type":"Integer"},"notUpdatedCount":{"name":"Not_Updated_Count","type":"Integer"},"updatedCount":{"name":"Updated_Count","type":"Integer"},"totalCount":{"name":"Total_Count","type":"Integer"},"status":{"values":["COMPLETED","SCHEDULED","RUNNING","FAILED"],"name":"Status","type":"utils/util/choice"}},"core/com/zoho/crm/api/territories/get_territories_param":{"filters":{"name":"filters","type":"String"}},"core/com/zoho/crm/api/bulk_write/bulk_write_response":{"result":{"structure_name":"core/com/zoho/crm/api/bulk_write/result","name":"result","type":"core/com/zoho/crm/api/bulk_write/result"},"resource":{"structure_name":"core/com/zoho/crm/api/bulk_write/resource","name":"resource","type":"List"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"createdTime":{"name":"created_time","type":"DateTime"},"callback":{"structure_name":"core/com/zoho/crm/api/bulk_write/call_back","name":"callback","type":"core/com/zoho/crm/api/bulk_write/call_back"},"id":{"name":"id","type":"String"},"characterEncoding":{"name":"character_encoding","type":"String"},"operation":{"name":"operation","type":"String"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/tags/record_detail_tag":{"name":{"name":"name","type":"String"},"colorCode":{"name":"color_code","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/appointment_preference/get_appointment_preference_param":{"include":{"values":["deal_record_configuration"],"name":"include","type":"String"}},"core/com/zoho/crm/api/fields/get_fields_param":{"include":{"values":["allowed_permissions_to_update"],"name":"include","type":"String"},"component":{"values":["criteria"],"name":"component","type":"String"},"featureName":{"values":["layout_rule"],"name":"feature_name","type":"String"},"module":{"name":"module","type":"String","required":true},"dataType":{"values":["boolean","profileimage","datetime","website","ownerlookup","autonumber","subform","RRULE","textarea","lookup","bigint","currency","text","multiselectpicklist","ALARM","integer","phone","userlookup","picklist","email","event_reminder","double","date","multi_module_lookup","multiuserlookup","multiselectlookup","formula","module"],"name":"data_type","type":"String"},"type":{"values":["used","unused","all"],"name":"type","type":"String"},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/variables/delete_variables_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/tags/action_handler":{"classes":["core/com/zoho/crm/api/tags/action_wrapper","core/com/zoho/crm/api/tags/api_exception"],"interface":true},"core/com/zoho/crm/api/related_records/delink_records_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/send_mail/attachment":{"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/attachments/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"Modified_Time","type":"DateTime"},{"name":"Created_Time","type":"DateTime"},{"structure_name":"core/com/zoho/crm/api/attachments/owner","name":"Modified_By","type":"core/com/zoho/crm/api/attachments/owner"},{"structure_name":"core/com/zoho/crm/api/attachments/owner","name":"Created_By","type":"core/com/zoho/crm/api/attachments/owner"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/user_groups/sources_wrapper":{"sources":{"structure_name":"core/com/zoho/crm/api/user_groups/sources","name":"sources","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/user_groups/info","name":"info","type":"core/com/zoho/crm/api/user_groups/info"}},"core/com/zoho/crm/api/mail_merge/download_mail_merge_wrapper":{"downloadMailMerge":{"structure_name":"core/com/zoho/crm/api/mail_merge/download_mail_merge","name":"download_mail_merge","type":"List"}},"core/com/zoho/crm/api/territories/response_handler":{"classes":["core/com/zoho/crm/api/territories/api_exception","core/com/zoho/crm/api/territories/response_wrapper","core/com/zoho/crm/api/territories/associated_users_count_wrapper"],"interface":true},"core/com/zoho/crm/api/blueprint/process_info":{"apiName":{"name":"api_name","type":"String"},"fieldName":{"name":"field_name","type":"String"},"escalation":{"structure_name":"core/com/zoho/crm/api/blueprint/escalation","name":"escalation","type":"core/com/zoho/crm/api/blueprint/escalation"},"continuous":{"name":"continuous","type":"Boolean"},"fieldLabel":{"name":"field_label","type":"String"},"name":{"name":"name","type":"String"},"isContinuous":{"name":"is_continuous","type":"Boolean"},"id":{"name":"id","type":"String"},"fieldValue":{"name":"field_value","type":"String"},"fieldId":{"name":"field_id","type":"Long"},"columnName":{"name":"column_name","type":"String"}},"core/com/zoho/crm/api/reschedule_history/reschedule_history":{"rescheduleReason":{"name":"Reschedule_Reason","type":"String"},"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"orchestration":{"name":"$orchestration","type":"Boolean"},"inMerge":{"name":"$in_merge","type":"Boolean"},"sharingPermission":{"name":"$sharing_permission","type":"String"},"rescheduledFrom":{"name":"Rescheduled_From","type":"DateTime"},"approved":{"name":"$approved","type":"Boolean"},"review":{"name":"$review","type":"Boolean"},"rescheduledTo":{"name":"Rescheduled_To","type":"DateTime"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/reschedule_history/user","name":"Modified_By","type":"core/com/zoho/crm/api/reschedule_history/user"},"state":{"name":"$state","type":"String"},"id":{"name":"id","type":"Long"},"reviewProcess":{"name":"$review_process","type":"Boolean"},"appointmentName":{"structure_name":"core/com/zoho/crm/api/reschedule_history/appointment_name","name":"Appointment_Name","type":"core/com/zoho/crm/api/reschedule_history/appointment_name"},"canvasId":{"name":"$canvas_id","type":"String"},"approval":{"structure_name":"core/com/zoho/crm/api/reschedule_history/approval","name":"$approval","type":"core/com/zoho/crm/api/reschedule_history/approval"},"editable":{"name":"$editable","type":"Boolean"},"rescheduledTime":{"name":"Rescheduled_Time","type":"DateTime"},"approvalState":{"name":"$approval_state","type":"String"},"currencySymbol":{"name":"$currency_symbol","type":"String"},"rescheduleNote":{"name":"Reschedule_Note","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/reschedule_history/user","name":"Created_By","type":"core/com/zoho/crm/api/reschedule_history/user"},"processFlow":{"name":"$process_flow","type":"Boolean"},"ziaVisions":{"name":"$zia_visions","type":"Boolean"},"name":{"name":"Name","type":"String"},"rescheduledBy":{"structure_name":"core/com/zoho/crm/api/reschedule_history/user","name":"Rescheduled_By","type":"core/com/zoho/crm/api/reschedule_history/user"}},"core/com/zoho/crm/api/fields/auto_number":{"startingNumberLength":{"name":"starting_number_length","type":"Integer"},"startNumber":{"name":"start_number","type":"Integer"},"prefix":{"name":"prefix","type":"String"},"suffix":{"name":"suffix","type":"String"}},"core/com/zoho/crm/api/roles/action_wrapper":{"roles":{"structure_name":"core/com/zoho/crm/api/roles/action_response","name":"roles","type":"List"}},"core/com/zoho/crm/api/users_unavailability/get_user_unavailability_param":{"filters":{"name":"filters","type":"String"},"includeInnerDetails":{"values":["user.zuid"],"name":"include_inner_details","type":"String"}},"core/com/zoho/crm/api/email_compose_meta/data_map":{"relayDomains":{"name":"relay_domains","type":"List"},"mergefieldsdata":{"name":"mergeFieldsData","type":"String"},"defaultFrom":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/default_form","name":"default_from","type":"core/com/zoho/crm/api/email_compose_meta/default_form"},"fromAddress":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/from_address","name":"from_address","type":"List"},"featuresAvailable":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/features_available","name":"features_available","type":"core/com/zoho/crm/api/email_compose_meta/features_available"},"user":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/user","name":"user","type":"core/com/zoho/crm/api/email_compose_meta/user"}},"core/com/zoho/crm/api/users_territories/transfer_and_delink":{"transferToUser":{"structure_name":"core/com/zoho/crm/api/users_territories/transfer_to_user","name":"transfer_to_user","type":"core/com/zoho/crm/api/users_territories/transfer_to_user"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/fields/lookup":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"queryDetails":{"structure_name":"core/com/zoho/crm/api/fields/query_details","name":"query_details","type":"core/com/zoho/crm/api/fields/query_details"},"id":{"name":"id","type":"Long"},"showFields":{"structure_name":"core/com/zoho/crm/api/fields/show_fields","name":"show_fields","type":"List"},"revalidateFilterDuringEdit":{"name":"revalidate_filter_during_edit","type":"Boolean"}},"core/com/zoho/crm/api/territory_users/response_handler":{"classes":["core/com/zoho/crm/api/territory_users/api_exception","core/com/zoho/crm/api/territory_users/response_wrapper"],"interface":true},"core/com/zoho/crm/api/privacy_configurable_apps/apps":{"name":{"name":"name","type":"String"}},"core/com/zoho/crm/api/user_type_users/response_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/user_type_users/users","name":"users","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/user_type_users/info","name":"info","type":"core/com/zoho/crm/api/user_type_users/info"}},"core/com/zoho/crm/api/service_preference/action_response":{"classes":["core/com/zoho/crm/api/service_preference/api_exception","core/com/zoho/crm/api/service_preference/success_response"],"interface":true},"core/com/zoho/crm/api/blueprint/module_fields":{"apiName":{"name":"api_name","type":"String"},"fieldLabel":{"name":"field_label","type":"String"},"id":{"name":"id","type":"Long"},"required":{"name":"required","type":"Boolean"}},"core/com/zoho/crm/api/portals/action_handler":{"classes":["core/com/zoho/crm/api/portals/api_exception","core/com/zoho/crm/api/portals/action_wrapper"],"interface":true},"core/com/zoho/crm/api/layouts/convert_mapping":{"salesorders":{"structure_name":"core/com/zoho/crm/api/layouts/minified_layout","name":"SalesOrders","type":"core/com/zoho/crm/api/layouts/minified_layout"},"invoices":{"structure_name":"core/com/zoho/crm/api/layouts/minified_layout","name":"Invoices","type":"core/com/zoho/crm/api/layouts/minified_layout"},"deals":{"structure_name":"core/com/zoho/crm/api/layouts/deal_layout_mapping","name":"Deals","type":"core/com/zoho/crm/api/layouts/deal_layout_mapping"},"accounts":{"structure_name":"core/com/zoho/crm/api/layouts/minified_layout","name":"Accounts","type":"core/com/zoho/crm/api/layouts/minified_layout"},"contacts":{"structure_name":"core/com/zoho/crm/api/layouts/minified_layout","name":"Contacts","type":"core/com/zoho/crm/api/layouts/minified_layout"}},"core/com/zoho/crm/api/tags/new_tag_request_wrapper":{"ids":{"name":"ids","type":"List"},"tags":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"tags","type":"List"},"overWrite":{"name":"over_write","type":"Boolean"}},"core/com/zoho/crm/api/deal_contact_roles/action_handler":{"classes":["core/com/zoho/crm/api/deal_contact_roles/action_wrapper","core/com/zoho/crm/api/deal_contact_roles/api_exception"],"interface":true},"core/com/zoho/crm/api/blueprint/action_handler":{"classes":["core/com/zoho/crm/api/blueprint/success_response","core/com/zoho/crm/api/blueprint/api_exception"],"interface":true},"core/com/zoho/crm/api/record/participants":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"invited":{"name":"invited","type":"Boolean"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"},"type":{"name":"type","type":"String"},"email":{"name":"Email","type":"String"},"participant":{"name":"participant","type":"String"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/layouts/minified_layout":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/pipeline/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","INVALID_DATA","INTERNAL_SERVER_ERROR","DUPLICATE_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"param_name","type":"String"},{"name":"maximum_length","type":"Integer"},{"name":"regex","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portals/owner":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/user_groups/sources_count_wrapper":{"sourcesCount":{"structure_name":"core/com/zoho/crm/api/user_groups/sources_count","name":"sources_count","type":"List"}},"core/com/zoho/crm/api/related_records/get_related_record_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"},"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/email_sharing/share_from_user":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"_type","type":"String"}},"core/com/zoho/crm/api/assignment_rules/get_assignment_rules_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/record/preference_field_matched_value":{"deals":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Deals","type":"List"},"accounts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Accounts","type":"List"},"contacts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Contacts","type":"List"}},"core/com/zoho/crm/api/notes/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"DateTime"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"}},"core/com/zoho/crm/api/service_preference/body_wrapper":{"servicePreferences":{"structure_name":"core/com/zoho/crm/api/service_preference/service_preference","name":"service_preferences","type":"core/com/zoho/crm/api/service_preference/service_preference"}},"core/com/zoho/crm/api/files/body_wrapper":{"file":{"name":"file","max-length":10,"type":"List","min-length":1}},"core/com/zoho/crm/api/variable_groups/minified_variable_group":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/privacy_preference/wrapper":{"privacypreference":{"structure_name":"core/com/zoho/crm/api/privacy_preference/privacy_preference","name":"privacyPreference","type":"List"}},"core/com/zoho/crm/api/user_groups/resource":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/backup/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/pipeline/action_handler":{"classes":["core/com/zoho/crm/api/pipeline/api_exception","core/com/zoho/crm/api/pipeline/transfer_pipeline_action_wrapper","core/com/zoho/crm/api/pipeline/action_wrapper"],"interface":true},"core/com/zoho/crm/api/mass_delete_cvid/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["record is deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/shift_hours/api_exception":{"code":{"values":["INVALID_DATA","DEPENDENT_FIELD_MISSING","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"},{"name":"details","type":"String"},{"structure_name":"core/com/zoho/crm/api/shift_hours/mandatory_details","name":"dependee","type":"core/com/zoho/crm/api/shift_hours/mandatory_details"},{"name":"resource_path_index","type":"Integer"},{"name":"minimum_length","type":"Integer"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/deal_contact_roles/get_associated_contact_roles_param":{"ids":{"name":"ids","type":"Long"},"fields":{"values":["id"],"name":"fields","type":"String","required":true}},"core/com/zoho/crm/api/holidays/get_holiday_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/inventory_templates/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/notes/action_response":{"classes":["core/com/zoho/crm/api/notes/api_exception","core/com/zoho/crm/api/notes/success_response"],"interface":true},"core/com/zoho/crm/api/related_records/update_related_record_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/users_unavailability/body_wrapper":{"usersUnavailability":{"structure_name":"core/com/zoho/crm/api/users_unavailability/users_unavailability","name":"users_unavailability","type":"List"}},"core/com/zoho/crm/api/pipeline/stages":{"from":{"name":"from","type":"Long"},"to":{"name":"to","type":"Long"}},"core/com/zoho/crm/api/record/get_records_param":{"cvid":{"name":"cvid","type":"String"},"endDateTime":{"name":"endDateTime","type":"DateTime"},"includeChild":{"name":"include_child","type":"String"},"uid":{"name":"uid","type":"String"},"approved":{"name":"approved","type":"String"},"perPage":{"name":"per_page","type":"Integer"},"startDateTime":{"name":"startDateTime","type":"DateTime"},"converted":{"name":"converted","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"ids":{"name":"ids","type":"String","required":true},"territoryId":{"name":"territory_id","type":"String"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"Integer"},"pageToken":{"name":"page_token","type":"String"},"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/record/record":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"}},"core/com/zoho/crm/api/contact_roles/delete_roles_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/record/get_record_param":{"cvid":{"name":"cvid","type":"String"},"uid":{"name":"uid","type":"String"},"onDemandProperties":{"name":"on_demand_properties","type":"String"},"approved":{"name":"approved","type":"String"},"startDateTime":{"name":"startDateTime","type":"DateTime"},"converted":{"name":"converted","type":"String"},"territoryId":{"name":"territory_id","type":"String"},"fields":{"name":"fields","type":"String"},"endDateTime":{"name":"endDateTime","type":"DateTime"},"includeChild":{"name":"include_child","type":"String"}},"core/com/zoho/crm/api/record/get_record_using_external_id_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"},"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/reschedule_history/user":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/mass_convert/related_module":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/deleted_records_handler":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/deleted_records_wrapper"],"interface":true},"core/com/zoho/crm/api/shift_hours/role":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/upload_photo_param":{"restrictTriggers":{"name":"restrict_triggers","type":"String"}},"core/com/zoho/crm/api/portal_user_type/response_wrapper":{"userType":{"structure_name":"core/com/zoho/crm/api/portal_user_type/user_type","name":"user_type","type":"List"}},"core/com/zoho/crm/api/email_related_records/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","the request does not contain any file","invalid file type"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/profiles/action_response":{"classes":["core/com/zoho/crm/api/profiles/success_response","core/com/zoho/crm/api/profiles/api_exception"],"interface":true},"core/com/zoho/crm/api/wizards/exempted_portal_user_type":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/update_record_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/record/get_records_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"},"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/record/consent":{"owner":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Owner","type":"core/com/zoho/crm/api/users/minified_user"},"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"mailSentTime":{"name":"Mail_Sent_Time","type":"DateTime"},"consentThrough":{"name":"Consent_Through","type":"String"},"consentDate":{"name":"Consent_Date","type":"Date"},"contactThroughEmail":{"name":"Contact_Through_Email","type":"Boolean"},"consentRemarks":{"name":"Consent_Remarks","type":"String"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"contactThroughSocial":{"name":"Contact_Through_Social","type":"Boolean"},"name":{"name":"name","type":"String"},"contactThroughPhone":{"name":"Contact_Through_Phone","type":"Boolean"},"createdTime":{"name":"Created_Time","type":"DateTime"},"contactThroughSurvey":{"name":"Contact_Through_Survey","type":"Boolean"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"},"dataProcessingBasis":{"name":"Data_Processing_Basis","type":"String"}},"core/com/zoho/crm/api/currencies/base_currency_action_response":{"classes":["core/com/zoho/crm/api/currencies/api_exception","core/com/zoho/crm/api/currencies/success_response"],"interface":true},"core/com/zoho/crm/api/portal_user_type/filters":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/send_mail/to":{"userName":{"name":"user_name","type":"String"},"email":{"regex":"[a-z]{7}[@]zoho[.]com","name":"email","type":"String"}},"core/com/zoho/crm/api/appointment_preference/action_wrapper":{"appointmentPreferences":{"structure_name":"core/com/zoho/crm/api/appointment_preference/action_response","name":"appointment_preferences","interface":true,"type":"core/com/zoho/crm/api/appointment_preference/action_response"}},"core/com/zoho/crm/api/territory_users/action_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/territory_users/action_response","name":"users","type":"List"}},"core/com/zoho/crm/api/pipeline/action_wrapper":{"pipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/action_response","name":"pipeline","type":"List"}},"core/com/zoho/crm/api/reschedule_history/get_appointments_rescheduled_history_param":{"perPage":{"name":"per_page","type":"Integer"},"sortOrder":{"name":"sort_order","type":"String"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"Integer"},"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/record/mass_update_success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"job_id","type":"String"},{"name":"id","type":"Long"},{"name":"Modified_Time","type":"DateTime"},{"name":"Created_Time","type":"DateTime"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"}],"name":"details","type":"Map"},"message":{"values":["record updated","mass update scheduled successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/image_upload":{"sequenceNumberS":{"name":"Sequence_Number__s","type":"Long"},"previewIdS":{"name":"Preview_Id__s","type":"String"},"sizeS":{"name":"Size__s","type":"String"},"fileIdS":{"name":"File_Id__s","type":"String"},"id":{"name":"id","type":"Long"},"delete1":{"name":"_delete","type":"String"},"descriptionS":{"name":"Description__s","type":"String"},"fileNameS":{"name":"File_Name__s","type":"String"},"stateS":{"name":"State__s","type":"String"}},"core/com/zoho/crm/api/roles/response_wrapper":{"roles":{"structure_name":"core/com/zoho/crm/api/roles/role","name":"roles","type":"List"}},"core/com/zoho/crm/api/record/delete_record_param":{"wfTrigger":{"name":"wf_trigger","type":"Boolean"}},"core/com/zoho/crm/api/profiles/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/business_hours/get_business_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/record/lead_converter":{"notifyLeadOwner":{"name":"notify_lead_owner","type":"Boolean"},"notifyNewEntityOwner":{"name":"notify_new_entity_owner","type":"Boolean"},"deals":{"structure_name":"core/com/zoho/crm/api/record/record","module":"Deals","name":"Deals","type":"core/com/zoho/crm/api/record/record"},"accounts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Accounts","type":"core/com/zoho/crm/api/record/record"},"carryOverTags":{"structure_name":"core/com/zoho/crm/api/record/carry_over_tags","name":"carry_over_tags","type":"core/com/zoho/crm/api/record/carry_over_tags"},"overwrite":{"name":"overwrite","type":"Boolean"},"contacts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Contacts","type":"core/com/zoho/crm/api/record/record"},"assignTo":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"assign_to","type":"core/com/zoho/crm/api/users/minified_user"}},"core/com/zoho/crm/api/currencies/base_currency_action_wrapper":{"baseCurrency":{"structure_name":"core/com/zoho/crm/api/currencies/base_currency_action_response","name":"base_currency","interface":true,"type":"core/com/zoho/crm/api/currencies/base_currency_action_response"}},"core/com/zoho/crm/api/associate_email/action_handler":{"classes":["core/com/zoho/crm/api/associate_email/action_wrapper","core/com/zoho/crm/api/associate_email/api_exception"],"interface":true},"core/com/zoho/crm/api/email_compose_meta/from_address":{"default1":{"values":[true],"name":"default","type":"utils/util/choice"},"id":{"name":"id","type":"Long"},"userName":{"name":"user_name","type":"String"},"type":{"name":"type","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/scoring_rules/response_handler":{"classes":["core/com/zoho/crm/api/scoring_rules/api_exception","core/com/zoho/crm/api/scoring_rules/response_wrapper"],"interface":true},"core/com/zoho/crm/api/share_records/action_handler":{"classes":["core/com/zoho/crm/api/share_records/action_wrapper","core/com/zoho/crm/api/share_records/api_exception"],"interface":true},"core/com/zoho/crm/api/fields/response_handler":{"classes":["core/com/zoho/crm/api/fields/api_exception","core/com/zoho/crm/api/fields/body_wrapper"],"interface":true},"core/com/zoho/crm/api/files/action_response":{"classes":["core/com/zoho/crm/api/files/success_response"],"interface":true},"core/com/zoho/crm/api/deal_contact_roles/data":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"contactRole":{"structure_name":"core/com/zoho/crm/api/deal_contact_roles/contact_role","name":"Contact_Role","type":"core/com/zoho/crm/api/deal_contact_roles/contact_role"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"}},"core/com/zoho/crm/api/record/action_handler":{"classes":["core/com/zoho/crm/api/record/action_wrapper","core/com/zoho/crm/api/record/api_exception"],"interface":true},"core/com/zoho/crm/api/related_lists/module_map":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portals/api_exception":{"code":{"values":["INVALID_DATA","JSON_PARSE_ERROR","MANDATORY_NOT_FOUND","PATTERN_NOT_MATCHED","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"maximum_length","type":"Integer"},{"name":"minimum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_change_owner/territory":{"id":{"name":"id","type":"Long"},"includeChild":{"name":"include_child","type":"Boolean"}},"core/com/zoho/crm/api/timelines/field_history":{"pickListValues":{"structure_name":"core/com/zoho/crm/api/timelines/picklist_detail","name":"pick_list_values","type":"List"},"apiName":{"name":"api_name","type":"String"},"dataType":{"name":"data_type","type":"String"},"fieldLabel":{"name":"field_label","type":"String"},"enableColourCode":{"name":"enable_colour_code","type":"Boolean"},"id":{"name":"id","type":"Long"},"value":{"structure_name":"core/com/zoho/crm/api/timelines/field_history_value","name":"_value","type":"core/com/zoho/crm/api/timelines/field_history_value"}},"core/com/zoho/crm/api/tags/record_action_wrapper":{"lockedCount":{"name":"locked_count","type":"Boolean"},"data":{"structure_name":"core/com/zoho/crm/api/tags/record_action_response","name":"data","type":"List"},"successCount":{"name":"success_count","type":"String"},"wfScheduler":{"name":"wf_scheduler","type":"Boolean"}},"core/com/zoho/crm/api/share_records/shared_through":{"entityName":{"name":"entity_name","type":"String"},"module":{"structure_name":"core/com/zoho/crm/api/share_records/module","name":"module","type":"core/com/zoho/crm/api/share_records/module"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/scoring_rules/role_request_wrapper":{"scoringRules":{"name":"scoring_rules","type":"List"}},"core/com/zoho/crm/api/field_map_dependency/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/deal_contact_roles/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/deal_contact_roles/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/related_lists/get_related_lists_param":{"module":{"name":"module","type":"String","required":true},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/variables/variable_group":{"apiName":{"name":"api_name","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/taxes/expected_field":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/entity_scores/api_exception":{"code":{"values":["INVALID_MODULE","REQUIRED_PARAM_MISSING","INVALID_REQUEST","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/user_type_users/response_handler":{"classes":["core/com/zoho/crm/api/user_type_users/response_wrapper","core/com/zoho/crm/api/user_type_users/api_exception"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/tags/response_wrapper":{"tags":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"tags","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/tags/info","name":"info","type":"core/com/zoho/crm/api/tags/info"}},"core/com/zoho/crm/api/users/tab":{"background":{"values":["#222222"],"name":"background","type":"utils/util/choice"},"fontColor":{"values":["#FFFFFF"],"name":"font_color","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_write/response_wrapper":{"classes":["core/com/zoho/crm/api/bulk_write/api_exception","core/com/zoho/crm/api/bulk_write/bulk_write_response"],"interface":true},"core/com/zoho/crm/api/territories/response_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/territories/territories","name":"territories","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/territories/info","name":"info","type":"core/com/zoho/crm/api/territories/info"}},"core/com/zoho/crm/api/users_transfer_delete/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","ID_ALREADY_DELETED","CANNOT_UPDATE_DELETED_USER","AUTHORIZATION_FAILED","PATTERN_NOT_MATCHED","INVALID_REQUEST","LICENSE_LIMIT_EXCEEDED","DUPLICATE_DATA","UNAPPROVABLE","EMAIL_UPDATE_NOT_ALLOWED","ID_ALREADY_DEACTIVATED","ID_ALREADY_ACTIVE","FEATURE_PERMISSION","OAUTH_SCOPE_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","EMAIL_UPDATE_NOT_ALOWED","INVALID_MODULE","BAD_REQUEST","NO_PERMISSION","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"id","type":"Long"},{"name":"email","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"owner_status","type":"String"}],"name":"details","type":"Map"},"message":{"values":["invalid data","required field not found","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","Please check whether the input values are correct","the id given seems to be invalid","Cannot add user under CRM Plus account. Kindly use CRMPlus URL to add user","Request exceeds your license limit. Need to upgrade in order to add","Failed to add user since same email id is already present","Email Id should not contain @skydesk.jp. Please choose a different email id","Invalid Email Id. Please choose a different email id","Cannot add user for CRMPlus account from CRM. Kindly add user through CRMPlus","Company Name is required","Error occurred in resending the invitation of CRMPLUS user in CRM account","Cannot update the time_zone of another User","Either trial has expired or user does not have sufficient privilege to perform this action","Error occurred while updating CRMPlus User in CRM Account","invalid_data","Deleted user cannot be updated","Re-invite is not allowed for a confirmed user","Cannot update email of a confirmed CRM User","User with same email id is already in CRM Plus","User is already deactivated","Primary Contact cannot be deactivated","User is already active","Share among Subordinates Feature is not available","Profile and Role cannot be Updated by the user.","the_id_given_seems_to_be_invalid","Primary contact cannot be deleted","User is already deleted","User does not have sufficient privilege to delete users","Cannot update email of a confirmed CRM User"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/holidays/action_handler":{"classes":["core/com/zoho/crm/api/holidays/api_exception","core/com/zoho/crm/api/holidays/action_wrapper"],"interface":true},"core/com/zoho/crm/api/appointment_preference/appointment_preference":{"dealRecordConfiguration":{"keys":[{"structure_name":"core/com/zoho/crm/api/appointment_preference/layout","name":"layout","type":"core/com/zoho/crm/api/appointment_preference/layout"},{"structure_name":"core/com/zoho/crm/api/appointment_preference/field_mappings","name":"field_mappings","type":"List"},{"name":"id","type":"Long"}],"name":"deal_record_configuration","type":"Map"},"whenAppointmentCompleted":{"values":["do_not_create_deal","create_deal"],"name":"when_appointment_completed","type":"utils/util/choice"},"allowBookingOutsideServiceAvailability":{"name":"allow_booking_outside_service_availability","type":"Boolean"},"allowBookingOutsideBusinesshours":{"name":"allow_booking_outside_businesshours","type":"Boolean"},"showJobSheet":{"name":"show_job_sheet","type":"Boolean"},"whenDurationExceeds":{"values":["ask_appointment_provider_to_complete","mark_as_complete","ask_appointment_provider_to_complete","mark_as_complete"],"name":"when_duration_exceeds","type":"utils/util/choice"}},"core/com/zoho/crm/api/wizards/transition":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/currencies/action_response":{"classes":["core/com/zoho/crm/api/currencies/api_exception","core/com/zoho/crm/api/currencies/success_response"],"interface":true},"core/com/zoho/crm/api/related_records/get_related_records_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"},"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/custom_views/get_custom_view_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/scoring_rules/action_response":{"classes":["core/com/zoho/crm/api/scoring_rules/success_response","core/com/zoho/crm/api/scoring_rules/api_exception"],"interface":true},"core/com/zoho/crm/api/tags/add_tags_param":{"overWrite":{"name":"over_write","type":"String"}},"core/com/zoho/crm/api/mass_change_owner/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/mass_change_owner/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/variables/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/bulk_read/success_response":{"code":{"values":["ADDED_SUCCESSFULLY"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"String"},{"name":"operation","type":"String"},{"values":["COMPLETED","IN PROGRESS","ADDED","FAILURE"],"name":"state","type":"utils/util/choice"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"created_time","type":"DateTime"}],"name":"details","type":"Map"},"message":{"values":["Added successfully."],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/field_map_dependency/get_map_dependencies_param":{"perPage":{"values":[-1,0,1,2],"name":"per_page","type":"Integer"},"module":{"name":"module","type":"String"},"page":{"values":[-1,0,1],"name":"page","type":"Integer"},"filters":{"values":["Leads"],"name":"filters","type":"String"},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/business_hours/update_business_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/tags/action_wrapper":{"tags":{"structure_name":"core/com/zoho/crm/api/tags/action_response","name":"tags","type":"List"}},"core/com/zoho/crm/api/record/remind_at":{"alarm":{"name":"ALARM","type":"String"}},"core/com/zoho/crm/api/users/shift":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/fields/email_parser":{"fieldsUpdateSupported":{"name":"fields_update_supported","type":"Boolean"},"recordOperationsSupported":{"name":"record_operations_supported","type":"Boolean"}},"core/com/zoho/crm/api/notes/response_handler":{"classes":["core/com/zoho/crm/api/notes/response_wrapper","core/com/zoho/crm/api/notes/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"owner_status","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/blueprint/lookup_field":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/related_lists/response_handler":{"classes":["core/com/zoho/crm/api/related_lists/response_wrapper","core/com/zoho/crm/api/related_lists/api_exception"],"interface":true},"core/com/zoho/crm/api/scoring_rules/signal_rule":{"score":{"name":"score","type":"Integer"},"id":{"name":"id","type":"String"},"signal":{"structure_name":"core/com/zoho/crm/api/scoring_rules/signal","name":"signal","type":"core/com/zoho/crm/api/scoring_rules/signal"}},"core/com/zoho/crm/api/appointment_preference/response_handler":{"classes":["core/com/zoho/crm/api/appointment_preference/api_exception","core/com/zoho/crm/api/appointment_preference/response_wrapper"],"interface":true},"core/com/zoho/crm/api/privacy_preference/config":{"tpt":{"structure_name":"core/com/zoho/crm/api/privacy_preference/tpt","name":"tpt","type":"List"},"section":{"structure_name":"core/com/zoho/crm/api/privacy_preference/section","name":"section","type":"List"},"zohoInteg":{"structure_name":"core/com/zoho/crm/api/privacy_preference/tpt","name":"zoho_integ","type":"List"}},"core/com/zoho/crm/api/notes/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/notes/note","name":"data","type":"List"}},"core/com/zoho/crm/api/modules/argument":{"name":{"name":"name","type":"String"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/holidays/business_holiday":{"date":{"name":"date","type":"Date"},"name":{"name":"name","max-length":80,"type":"String"},"type":{"values":["business_holiday"],"name":"type","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/operation_type":{"webUpdate":{"name":"web_update","type":"Boolean"},"webCreate":{"name":"web_create","type":"Boolean"},"apiUpdate":{"name":"api_update","type":"Boolean"},"apiCreate":{"name":"api_create","type":"Boolean"}},"core/com/zoho/crm/api/related_records/api_exception":{"code":{"values":["NO_PERMISSION","CANNOT_BE_UPDATED","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","INTERNAL_ERROR","BAD_REQUEST","OAUTH_SCOPE_MISMATCH","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"permissions","type":"List"},{"name":"id","type":"Long"},{"name":"param_name","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["invalid data","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","record not deleted","the related id given seems to be invalid","Internal server error occurred.","The relation name given seems to be invalid"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/email_templates/last_version_statistics":{"tracked":{"name":"tracked","type":"Integer"},"delivered":{"name":"delivered","type":"Integer"},"opened":{"name":"opened","type":"Integer"},"bounced":{"name":"bounced","type":"Integer"},"sent":{"name":"sent","type":"Integer"},"clicked":{"name":"clicked","type":"Integer"}},"core/com/zoho/crm/api/variables/response_handler":{"classes":["core/com/zoho/crm/api/variables/api_exception","core/com/zoho/crm/api/variables/response_wrapper"],"interface":true},"core/com/zoho/crm/api/related_lists/related_list":{"displayLabel":{"name":"display_label","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"String"},"customizeSort":{"name":"customize_sort","type":"Boolean"},"apiName":{"name":"api_name","type":"String"},"visible":{"name":"visible","type":"Boolean"},"module":{"structure_name":"core/com/zoho/crm/api/related_lists/module_map","name":"module","type":"core/com/zoho/crm/api/related_lists/module_map"},"type":{"name":"type","type":"String"},"connectedmodule":{"name":"connectedmodule","type":"String"},"linkingmodule":{"name":"linkingmodule","type":"String"},"customizeDisplayLabel":{"name":"customize_display_label","type":"Boolean"},"sortOrder":{"name":"sort_order","type":"String"},"name":{"name":"name","type":"String"},"action":{"name":"action","type":"String"},"sortBy":{"structure_name":"core/com/zoho/crm/api/related_lists/field","name":"sort_by","type":"core/com/zoho/crm/api/related_lists/field"},"id":{"name":"id","type":"Long"},"href":{"name":"href","type":"String"},"fields":{"structure_name":"core/com/zoho/crm/api/related_lists/field","name":"fields","type":"List"},"customizeFields":{"name":"customize_fields","type":"Boolean"}},"core/com/zoho/crm/api/deal_contact_roles/contact_role":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/scoring_rules/action_wrapper":{"scoringRules":{"structure_name":"core/com/zoho/crm/api/scoring_rules/action_response","name":"scoring_rules","max-length":100,"type":"List"}},"core/com/zoho/crm/api/associate_email/action_wrapper":{"emails":{"structure_name":"core/com/zoho/crm/api/associate_email/action_response","name":"Emails","type":"List"}},"core/com/zoho/crm/api/hipaa_compliance/response_wrapper":{"hipaaCompliance":{"structure_name":"core/com/zoho/crm/api/hipaa_compliance/hipaa_compliance","name":"hipaa_compliance","type":"core/com/zoho/crm/api/hipaa_compliance/hipaa_compliance"}},"core/com/zoho/crm/api/profiles/action_wrapper":{"profiles":{"structure_name":"core/com/zoho/crm/api/profiles/action_response","name":"profiles","type":"List"}},"core/com/zoho/crm/api/variables/variable":{"apiName":{"name":"api_name","type":"String"},"variableGroup":{"structure_name":"core/com/zoho/crm/api/variables/variable_group","name":"variable_group","type":"core/com/zoho/crm/api/variables/variable_group"},"name":{"name":"name","type":"String"},"description":{"name":"description","type":"String"},"readOnly":{"name":"read_only","type":"Boolean"},"source":{"name":"source","type":"String"},"id":{"name":"id","type":"Long"},"type":{"values":["text","integer","percent","double","currency","date","datetime","email","phone","website","textarea","checkbox","long"],"name":"type","type":"utils/util/choice"},"value":{"name":"value","type":"Object"}},"core/com/zoho/crm/api/shift_hours/break_custom_timing":{"breakTiming":{"name":"break_timing","type":"List"},"days":{"name":"days","type":"String"}},"core/com/zoho/crm/api/fiscal_year/body_wrapper":{"fiscalYear":{"structure_name":"core/com/zoho/crm/api/fiscal_year/year","name":"fiscal_year","type":"core/com/zoho/crm/api/fiscal_year/year"}},"core/com/zoho/crm/api/users_territories/action_handler":{"classes":["core/com/zoho/crm/api/users_territories/api_exception","core/com/zoho/crm/api/users_territories/action_wrapper"],"interface":true},"core/com/zoho/crm/api/holidays/resonse_handler":{"classes":["core/com/zoho/crm/api/holidays/api_exception","core/com/zoho/crm/api/holidays/response_wrapper"],"interface":true},"core/com/zoho/crm/api/holidays/update_holidays_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline":{"pipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/t_pipeline","name":"pipeline","type":"core/com/zoho/crm/api/pipeline/t_pipeline"},"stages":{"structure_name":"core/com/zoho/crm/api/pipeline/stages","name":"stages","type":"List"}},"core/com/zoho/crm/api/related_records/get_related_record_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"},"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/email_related_records/linked_record":{"module":{"structure_name":"core/com/zoho/crm/api/email_related_records/module","name":"module","type":"core/com/zoho/crm/api/email_related_records/module"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/fields/minified_field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/body_wrapper":{"process":{"name":"process","type":"List"},"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","max-length":100,"type":"List","min-length":1},"larId":{"name":"lar_id","type":"String"},"wfTrigger":{"name":"wf_trigger","type":"String"},"trigger":{"name":"trigger","type":"List"},"duplicateCheckFields":{"name":"duplicate_check_fields","type":"List"}},"core/com/zoho/crm/api/taxes/body_wrapper":{"orgTaxes":{"structure_name":"core/com/zoho/crm/api/taxes/org_tax","name":"org_taxes","type":"core/com/zoho/crm/api/taxes/org_tax"}},"core/com/zoho/crm/api/modules/body_wrapper":{"modules":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"modules","type":"List"}},"core/com/zoho/crm/api/inventory_templates/folder":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users/associated_group":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"description":{"name":"description","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portals_meta/modules":{"apiName":{"name":"api_name","type":"String"},"sharedType":{"name":"shared_type","type":"String"},"pluralLabel":{"name":"plural_label","type":"String"},"id":{"name":"id","type":"Long"},"filters":{"structure_name":"core/com/zoho/crm/api/portals_meta/filters","name":"filters","type":"List"},"layouts":{"structure_name":"core/com/zoho/crm/api/portals_meta/layouts","name":"layouts","type":"List"},"views":{"structure_name":"core/com/zoho/crm/api/portals_meta/views","name":"views","type":"List"}},"core/com/zoho/crm/api/blueprint/body_wrapper":{"blueprint":{"structure_name":"core/com/zoho/crm/api/blueprint/blue_print","name":"blueprint","type":"List"}},"core/com/zoho/crm/api/mass_convert/convert":{"relatedModules":{"structure_name":"core/com/zoho/crm/api/mass_convert/related_module","name":"related_modules","type":"List"},"applyAssignmentThreshold":{"name":"apply_assignment_threshold","type":"Boolean"},"deals":{"structure_name":"core/com/zoho/crm/api/record/record","module":"Deals","name":"Deals","type":"core/com/zoho/crm/api/record/record"},"ids":{"name":"ids","type":"List"},"carryOverTags":{"structure_name":"core/com/zoho/crm/api/mass_convert/move_attachments_to","name":"carry_over_tags","type":"List"},"assignTo":{"structure_name":"core/com/zoho/crm/api/mass_convert/assign_to","name":"assign_to","type":"core/com/zoho/crm/api/mass_convert/assign_to"},"portalUserType":{"structure_name":"core/com/zoho/crm/api/mass_convert/portal_user_type","name":"portal_user_type","type":"core/com/zoho/crm/api/mass_convert/portal_user_type"},"moveAttachmentsTo":{"structure_name":"core/com/zoho/crm/api/mass_convert/move_attachments_to","name":"move_attachments_to","type":"core/com/zoho/crm/api/mass_convert/move_attachments_to"}},"core/com/zoho/crm/api/taxes/response_wrapper":{"orgTaxes":{"structure_name":"core/com/zoho/crm/api/taxes/org_tax","name":"org_taxes","type":"core/com/zoho/crm/api/taxes/org_tax"}},"core/com/zoho/crm/api/entity_scores/get_module_param":{"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/record/update_record_using_external_id_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/files/upload_files_param":{"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/bulk_write/request_wrapper":{"resource":{"structure_name":"core/com/zoho/crm/api/bulk_write/resource","name":"resource","type":"List"},"ignoreEmpty":{"name":"ignore_empty","type":"Boolean"},"callback":{"structure_name":"core/com/zoho/crm/api/bulk_write/call_back","name":"callback","type":"core/com/zoho/crm/api/bulk_write/call_back"},"characterEncoding":{"name":"character_encoding","type":"String"},"operation":{"values":["insert","update","upsert"],"name":"operation","type":"utils/util/choice"}},"core/com/zoho/crm/api/currencies/response_handler":{"classes":["core/com/zoho/crm/api/currencies/api_exception","core/com/zoho/crm/api/currencies/body_wrapper"],"interface":true},"core/com/zoho/crm/api/share_records/share_record":{"shareRelatedRecords":{"name":"share_related_records","type":"Boolean"},"sharedThrough":{"structure_name":"core/com/zoho/crm/api/share_records/shared_through","name":"shared_through","type":"core/com/zoho/crm/api/share_records/shared_through"},"sharedTime":{"name":"shared_time","type":"DateTime"},"sharedBy":{"structure_name":"core/com/zoho/crm/api/users/users","name":"shared_by","type":"core/com/zoho/crm/api/users/users"},"permission":{"values":["full_access","read_only","read_write"],"name":"permission","type":"utils/util/choice"},"sharedWith":{"structure_name":"core/com/zoho/crm/api/users/users","name":"shared_with","type":"core/com/zoho/crm/api/users/users"},"type":{"values":["public","private"],"name":"type","type":"utils/util/choice"},"user":{"structure_name":"core/com/zoho/crm/api/users/users","name":"user","type":"core/com/zoho/crm/api/users/users"}},"core/com/zoho/crm/api/tags/update_tags_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/modules/sharing_properties":{"sharePermission":{"values":["full-access","read-write","read-only"],"name":"share_permission","type":"utils/util/choice"},"schedulerStatus":{"name":"scheduler_status","type":"String"},"sharePreferenceEnabled":{"name":"share_preference_enabled","type":"Boolean"}},"core/com/zoho/crm/api/record/mass_update_action_response":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/mass_update_success_response"],"interface":true},"core/com/zoho/crm/api/profiles/info":{"licenseLimit":{"name":"license_limit","type":"Integer"}},"core/com/zoho/crm/api/roles/response_handler":{"classes":["core/com/zoho/crm/api/roles/api_exception","core/com/zoho/crm/api/roles/response_wrapper"],"interface":true},"core/com/zoho/crm/api/custom_views/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/attachments/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","INVALID_REQUEST","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"values":["invalid"],"name":"related_status","type":"utils/util/choice"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_type","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/field_map_dependency/map_dependency":{"parent":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/parent","name":"parent","type":"core/com/zoho/crm/api/field_map_dependency/parent"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/pick_list_mapping","name":"pick_list_values","type":"List"},"internal":{"name":"internal","type":"Boolean"},"subModule":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/sub_module","name":"sub_module","type":"core/com/zoho/crm/api/field_map_dependency/sub_module"},"active":{"name":"active","type":"Boolean"},"id":{"name":"id","type":"Long"},"source":{"name":"source","type":"Integer"},"category":{"name":"category","type":"Integer"},"child":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/child","name":"child","type":"core/com/zoho/crm/api/field_map_dependency/child"}},"core/com/zoho/crm/api/custom_views/criteria":{"comparator":{"name":"comparator","type":"String"},"groupOperator":{"name":"group_operator","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/custom_views/field","name":"field","type":"core/com/zoho/crm/api/custom_views/field"},"value":{"name":"value","type":"Object"},"group":{"structure_name":"core/com/zoho/crm/api/custom_views/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/inventory_templates/inventory_template":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"lastUsageTime":{"name":"last_usage_time","type":"DateTime"},"editorMode":{"name":"editor_mode","type":"String"},"type":{"name":"type","type":"String"},"content":{"name":"content","type":"String"},"folder":{"structure_name":"core/com/zoho/crm/api/inventory_templates/folder","name":"folder","type":"core/com/zoho/crm/api/inventory_templates/folder"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"category":{"name":"category","type":"String"},"favorite":{"name":"favorite","type":"Boolean"}},"core/com/zoho/crm/api/variables/get_variable_by_api_name_param":{"group":{"name":"group","type":"String"}},"core/com/zoho/crm/api/custom_views/pin_unpin_fields":{"fields":{"structure_name":"core/com/zoho/crm/api/custom_views/pin_fields","name":"fields","type":"List"}},"core/com/zoho/crm/api/portals_meta/views":{"displayLabel":{"name":"display_label","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/record/wizard":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users_unavailability/action_wrapper":{"usersUnavailability":{"structure_name":"core/com/zoho/crm/api/users_unavailability/action_response","name":"users_unavailability","type":"List"}},"core/com/zoho/crm/api/query/body_wrapper":{"selectQuery":{"name":"select_query","type":"String"}},"core/com/zoho/crm/api/shift_hours/create_shifts_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/user_groups/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/custom_views/response_handler":{"classes":["core/com/zoho/crm/api/custom_views/api_exception","core/com/zoho/crm/api/custom_views/body_wrapper"],"interface":true},"core/com/zoho/crm/api/org/feature":{"name":{"name":"name","type":"String"},"resources":{"structure_name":"core/com/zoho/crm/api/org/resource","name":"resources","type":"List"}},"core/com/zoho/crm/api/modules/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","NOT_SUPPORTED","INVALID_DATA","INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_user_type/modules":{"apiName":{"name":"api_name","type":"String"},"permissions":{"structure_name":"core/com/zoho/crm/api/portal_user_type/permissions","name":"permissions","type":"core/com/zoho/crm/api/portal_user_type/permissions"},"sharedType":{"values":["private"],"name":"shared_type","type":"utils/util/choice"},"id":{"name":"id","type":"Long"},"pluralLabel":{"name":"plural_label","type":"String"},"filters":{"structure_name":"core/com/zoho/crm/api/portal_user_type/filters","name":"filters","type":"List"},"fields":{"structure_name":"core/com/zoho/crm/api/portal_user_type/fields","name":"fields","type":"List"},"layouts":{"structure_name":"core/com/zoho/crm/api/portal_user_type/layouts","name":"layouts","type":"List"},"views":{"structure_name":"core/com/zoho/crm/api/portal_user_type/views","name":"views","type":"core/com/zoho/crm/api/portal_user_type/views"}},"core/com/zoho/crm/api/files/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"name","type":"String"},{"name":"id","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/currencies/action_wrapper":{"currencies":{"structure_name":"core/com/zoho/crm/api/currencies/action_response","name":"currencies","type":"List"}},"core/com/zoho/crm/api/change_owner/mass_wrapper":{"owner":{"structure_name":"core/com/zoho/crm/api/change_owner/owner","name":"owner","type":"core/com/zoho/crm/api/change_owner/owner"},"relatedModules":{"structure_name":"core/com/zoho/crm/api/change_owner/related_modules","name":"related_modules","type":"List"},"ids":{"name":"ids","type":"List"},"notify":{"name":"notify","type":"Boolean"}},"core/com/zoho/crm/api/query/response_handler":{"classes":["core/com/zoho/crm/api/query/api_exception","core/com/zoho/crm/api/query/response_wrapper"],"interface":true},"core/com/zoho/crm/api/portal_invite/invite_users_param":{"userTypeId":{"name":"user_type_id","type":"Long","required":true},"language":{"values":["en_US","en_GB","bg_BG","zh_CN","zh_TW","hr_HR","ar_EG","in_ID","cs_CZ","da_DK","nl_NL","fr_FR","de_DE","hu_HU","","hi_IN","it_IT","ja_JP","pl_PL","pt_BR","pt_PT","ru_RU","es_ES","sv_SE","th_TH","tr_TR","vi_VN","ko_KR","iw_IL"],"name":"language","type":"String"},"type":{"values":["invite","reinvite"],"name":"type","type":"String","required":true}},"core/com/zoho/crm/api/currencies/format":{"thousandSeparator":{"values":["Comma","Space","Period","Space"],"name":"thousand_separator","type":"utils/util/choice"},"decimalPlaces":{"values":["0","2","3"],"name":"decimal_places","type":"utils/util/choice"},"decimalSeparator":{"values":["Period","Comma"],"name":"decimal_separator","type":"utils/util/choice"}},"core/com/zoho/crm/api/share_records/action_response":{"classes":["core/com/zoho/crm/api/share_records/success_response","core/com/zoho/crm/api/share_records/api_exception"],"interface":true},"core/com/zoho/crm/api/shift_hours/shift_custom_timing":{"days":{"name":"days","type":"String"},"shiftTiming":{"name":"shift_timing","type":"List"}},"core/com/zoho/crm/api/blueprint/module_mapping":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"fields":{"structure_name":"core/com/zoho/crm/api/blueprint/module_fields","name":"fields","type":"List"}},"core/com/zoho/crm/api/record/info":{"call":{"name":"call","type":"Boolean"},"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"DateTime"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"},"email":{"name":"email","type":"Boolean"}},"core/com/zoho/crm/api/assignment_rules/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","DUPLICATE_DATA","REQUIRED_PARAM_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"name","type":"String"},{"name":"param","type":"String"}],"name":"details","type":"Map"},"message":{"values":["the name given seems to be invalid","the id given seems to be invalid","the default_assignee given seems to be invalid","the module name given seems to be invalid","the given assignment rule name already exists","One of the expected parameter is missing"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/tags/existing_tag_request_wrapper":{"ids":{"name":"ids","type":"List"},"tags":{"structure_name":"core/com/zoho/crm/api/tags/existing_tag","name":"tags","type":"List"}},"core/com/zoho/crm/api/variables/get_variable_by_id_param":{"group":{"name":"group","type":"String"}},"core/com/zoho/crm/api/users_territories/validation_handler":{"classes":["core/com/zoho/crm/api/users_territories/api_exception","core/com/zoho/crm/api/users_territories/validation_wrapper"],"interface":true},"core/com/zoho/crm/api/tags/get_record_count_for_tag_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/user_groups/jobs":{"status":{"name":"Status","type":"String"}},"core/com/zoho/crm/api/territories/territories":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"permissionType":{"values":["read_write_delete","read_only"],"name":"permission_type","type":"utils/util/choice"},"manager":{"structure_name":"core/com/zoho/crm/api/territories/manager","name":"manager","type":"core/com/zoho/crm/api/territories/manager"},"description":{"name":"description","type":"String"},"accountRuleCriteria":{"structure_name":"core/com/zoho/crm/api/territories/criteria","name":"account_rule_criteria","type":"core/com/zoho/crm/api/territories/criteria"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"leadRuleCriteria":{"structure_name":"core/com/zoho/crm/api/territories/criteria","name":"lead_rule_criteria","type":"core/com/zoho/crm/api/territories/criteria"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"reportingTo":{"structure_name":"core/com/zoho/crm/api/territories/reporting_to","name":"reporting_to","type":"core/com/zoho/crm/api/territories/reporting_to"},"dealRuleCriteria":{"structure_name":"core/com/zoho/crm/api/territories/criteria","name":"deal_rule_criteria","type":"core/com/zoho/crm/api/territories/criteria"}},"core/com/zoho/crm/api/profiles/action_handler":{"classes":["core/com/zoho/crm/api/profiles/action_wrapper","core/com/zoho/crm/api/profiles/success_response","core/com/zoho/crm/api/profiles/api_exception"],"interface":true},"core/com/zoho/crm/api/hipaa_compliance/hipaa_compliance":{"restrictDataAccessThroughAPI":{"name":"restrict_data_access_through_api","type":"Boolean"},"enabledForModules":{"structure_name":"core/com/zoho/crm/api/hipaa_compliance/modules","name":"enabled_for_modules","type":"List"},"restrictToZohoApps":{"name":"restrict_to_zoho_apps","type":"Boolean"},"enabled":{"name":"enabled","type":"Boolean"},"restrictToThirdPartyApps":{"name":"restrict_to_third_party_apps","type":"List"},"restrictDataInExport":{"name":"restrict_data_in_export","type":"Boolean"}},"core/com/zoho/crm/api/timelines/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"values":["the related id given seems to be invalid","the module name given seems to be invalid","the relation name given seems to be invalid"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/profiles/section":{"name":{"name":"name","type":"String"},"categories":{"structure_name":"core/com/zoho/crm/api/profiles/category","name":"categories","type":"List"}},"core/com/zoho/crm/api/record/delete_record_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/bulk_read/job_detail":{"result":{"structure_name":"core/com/zoho/crm/api/bulk_read/result","name":"result","type":"core/com/zoho/crm/api/bulk_read/result"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"query":{"structure_name":"core/com/zoho/crm/api/bulk_read/query","name":"query","type":"core/com/zoho/crm/api/bulk_read/query"},"createdTime":{"name":"created_time","type":"DateTime"},"id":{"name":"id","type":"String"},"state":{"values":["COMPLETED","IN PROGRESS","ADDED","FAILURE"],"name":"state","type":"utils/util/choice"},"operation":{"name":"operation","type":"String"},"fileType":{"values":["csv"],"name":"file_type","type":"utils/util/choice"}},"core/com/zoho/crm/api/shift_hours/response_handler":{"classes":["core/com/zoho/crm/api/shift_hours/api_exception","core/com/zoho/crm/api/shift_hours/response_wrapper"],"interface":true},"core/com/zoho/crm/api/timelines/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"}},"core/com/zoho/crm/api/email_related_records/info":{"prevIndex":{"name":"prev_index","type":"String"},"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"nextIndex":{"name":"next_index","type":"String"}},"core/com/zoho/crm/api/portals_meta/related_lists":{"module":{"structure_name":"core/com/zoho/crm/api/portals_meta/modules","name":"module","type":"core/com/zoho/crm/api/portals_meta/modules"}},"core/com/zoho/crm/api/reschedule_history/action_response":{"classes":["core/com/zoho/crm/api/reschedule_history/api_exception","core/com/zoho/crm/api/reschedule_history/success_response"],"interface":true},"core/com/zoho/crm/api/deal_contact_roles/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"String"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"}},"core/com/zoho/crm/api/pipeline/body_wrapper":{"pipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/pipeline","name":"pipeline","type":"List"}},"core/com/zoho/crm/api/scoring_rules/delete_scoring_rules_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/users_transfer_delete/action_handler":{"classes":["core/com/zoho/crm/api/users_transfer_delete/api_exception","core/com/zoho/crm/api/users_transfer_delete/action_wrapper"],"interface":true},"core/com/zoho/crm/api/files/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","VIRUS_DETECTED","FILE_SIZE_MORE_THAN_ALLOWED_SIZE","failure_in_attachment_handling","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/action_response":{"classes":["core/com/zoho/crm/api/fields/api_exception","core/com/zoho/crm/api/fields/success"],"interface":true},"core/com/zoho/crm/api/attachments/response_handler":{"classes":["core/com/zoho/crm/api/attachments/response_wrapper","core/com/zoho/crm/api/attachments/file_body_wrapper","core/com/zoho/crm/api/attachments/api_exception"],"interface":true},"core/com/zoho/crm/api/tags/record_action_handler":{"classes":["core/com/zoho/crm/api/tags/api_exception","core/com/zoho/crm/api/tags/record_action_wrapper"],"interface":true},"core/com/zoho/crm/api/notifications/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/record/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/field_map_dependency/action_response":{"classes":["core/com/zoho/crm/api/field_map_dependency/api_exception","core/com/zoho/crm/api/field_map_dependency/success_response"],"interface":true},"core/com/zoho/crm/api/related_lists/get_related_list_param":{"module":{"name":"module","type":"String","required":true},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/users_territories/transfer_wrapper":{"transferAndDelink":{"structure_name":"core/com/zoho/crm/api/users_territories/transfer_and_delink","name":"transfer_and_delink","type":"List"}},"core/com/zoho/crm/api/mail_merge/action_response":{"classes":["core/com/zoho/crm/api/mail_merge/success_response"],"interface":true},"core/com/zoho/crm/api/from_addresses/api_exception":{"code":{"values":["INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/scoring_rules/field_rule":{"score":{"name":"score","type":"Integer"},"criteria":{"structure_name":"core/com/zoho/crm/api/scoring_rules/criteria","name":"criteria","type":"core/com/zoho/crm/api/scoring_rules/criteria"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/deal_contact_roles/response_handler":{"classes":["core/com/zoho/crm/api/deal_contact_roles/body_wrapper","core/com/zoho/crm/api/deal_contact_roles/api_exception"],"interface":true},"core/com/zoho/crm/api/user_groups/source":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mass_change_owner/body_wrapper":{"cvid":{"name":"cvid","type":"Long"},"owner":{"structure_name":"core/com/zoho/crm/api/mass_change_owner/owner","name":"owner","type":"core/com/zoho/crm/api/mass_change_owner/owner"},"territory":{"structure_name":"core/com/zoho/crm/api/mass_change_owner/territory","name":"territory","type":"core/com/zoho/crm/api/mass_change_owner/territory"}},"core/com/zoho/crm/api/roles/action_handler":{"classes":["core/com/zoho/crm/api/roles/api_exception","core/com/zoho/crm/api/roles/action_wrapper"],"interface":true},"core/com/zoho/crm/api/timelines/get_timelines_param":{"include":{"values":["extension","type"],"name":"include","type":"String"},"perPage":{"values":["100"],"name":"per_page","type":"String"},"sortOrder":{"values":["desc","asc"],"name":"sort_order","type":"String"},"sortBy":{"values":["audited_time"],"name":"sort_by","type":"String"},"filters":{"values":["200"],"name":"filters","type":"String"},"page":{"values":["1"],"name":"page","type":"String"},"pageToken":{"values":["11df637fbecf52dc6721f7cf588f4272d552eda3311af76764d4cda650a7b0e01ffc5cd572030fe293f5ea9d60a3c144869fe7eae4e2ac683c08cf2dda07ed56d3d5f9ce4e351049c24a4363c5771087ad78caa76984c0ca4a1b2264808735ea8035cca85aa72c9142808916935c4744"],"name":"page_token","type":"String"},"includeInnerDetails":{"values":["field_history.data_type","field_history.enable_colour_code","field_history.pick_list_values","field_history.field_label"],"name":"include_inner_details","type":"String"},"includeTimelineType":{"values":["signals"],"name":"include_timeline_type","type":"String"}},"core/com/zoho/crm/api/files/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/territories/deleted_associated_territories":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"},"deletedTime":{"name":"deleted_time","type":"DateTime"},"deletedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"deleted_by","type":"core/com/zoho/crm/api/users/minified_user"}},"core/com/zoho/crm/api/record/file_handler":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/success_response"],"interface":true},"core/com/zoho/crm/api/mass_delete_cvid/get_mass_delete_status_param":{"jobId":{"name":"job_id","type":"Long","required":true}},"core/com/zoho/crm/api/blueprint/field":{"apiName":{"name":"api_name","type":"String"},"webhook":{"name":"webhook","type":"Boolean"},"crypt":{"structure_name":"core/com/zoho/crm/api/blueprint/crypt","name":"crypt","type":"core/com/zoho/crm/api/blueprint/crypt"},"validationRule":{"name":"validation_rule","type":"String"},"tooltip":{"structure_name":"core/com/zoho/crm/api/blueprint/tool_tip","name":"tooltip","type":"core/com/zoho/crm/api/blueprint/tool_tip"},"quickSequenceNumber":{"name":"quick_sequence_number","type":"Long"},"jsonType":{"name":"json_type","type":"String"},"type":{"name":"_type","type":"String"},"layouts":{"structure_name":"core/com/zoho/crm/api/blueprint/layout","name":"layouts","type":"core/com/zoho/crm/api/blueprint/layout"},"mandatory":{"name":"mandatory","type":"Boolean"},"content":{"name":"content","type":"String"},"associationDetails":{"structure_name":"core/com/zoho/crm/api/blueprint/association_details","name":"association_details","type":"core/com/zoho/crm/api/blueprint/association_details"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/fields/pick_list_value","name":"pick_list_values","type":"List"},"fieldLabel":{"name":"field_label","type":"String"},"fieldReadOnly":{"name":"field_read_only","type":"Boolean"},"currency":{"structure_name":"core/com/zoho/crm/api/blueprint/currency","name":"currency","type":"core/com/zoho/crm/api/blueprint/currency"},"id":{"name":"id","type":"String"},"displayLabel":{"name":"display_label","type":"String"},"filterable":{"name":"filterable","type":"Boolean"},"lookup":{"structure_name":"core/com/zoho/crm/api/blueprint/module","name":"lookup","type":"core/com/zoho/crm/api/blueprint/module"},"personalityName":{"name":"personality_name","type":"String"},"visible":{"name":"visible","type":"Boolean"},"dataType":{"name":"data_type","type":"String"},"length":{"name":"length","type":"Integer"},"profiles":{"structure_name":"core/com/zoho/crm/api/blueprint/profile","name":"profiles","type":"List"},"pickListValuesSortedLexically":{"name":"pick_list_values_sorted_lexically","type":"Boolean"},"readOnly":{"name":"read_only","type":"Boolean"},"sortable":{"name":"sortable","type":"Boolean"},"historyTracking":{"name":"history_tracking","type":"Boolean"},"systemMandatory":{"name":"system_mandatory","type":"Boolean"},"autoNumber":{"structure_name":"core/com/zoho/crm/api/blueprint/auto_number","name":"auto_number","type":"core/com/zoho/crm/api/blueprint/auto_number"},"private1":{"structure_name":"core/com/zoho/crm/api/fields/private","name":"private","type":"core/com/zoho/crm/api/fields/private"},"customField":{"name":"custom_field","type":"Boolean"},"convertMapping":{"structure_name":"core/com/zoho/crm/api/blueprint/convert_mapping","name":"convert_mapping","type":"core/com/zoho/crm/api/blueprint/convert_mapping"},"decimalPlace":{"name":"decimal_place","type":"String"},"createdSource":{"name":"created_source","type":"String"},"multiModuleLookup":{"structure_name":"core/com/zoho/crm/api/fields/multi_module_lookup","name":"multi_module_lookup","type":"core/com/zoho/crm/api/fields/multi_module_lookup"},"external":{"structure_name":"core/com/zoho/crm/api/fields/external","name":"external","type":"core/com/zoho/crm/api/fields/external"},"displayType":{"values":[-1,2],"name":"display_type","type":"utils/util/choice"},"transitionSequence":{"name":"transition_sequence","type":"Integer"},"unique":{"structure_name":"core/com/zoho/crm/api/fields/unique","name":"unique","type":"core/com/zoho/crm/api/fields/unique"},"uiType":{"name":"ui_type","type":"Integer"},"viewType":{"structure_name":"core/com/zoho/crm/api/blueprint/view_type","name":"view_type","type":"core/com/zoho/crm/api/blueprint/view_type"},"formula":{"structure_name":"core/com/zoho/crm/api/blueprint/formula","name":"formula","type":"core/com/zoho/crm/api/blueprint/formula"},"multiselectlookup":{"structure_name":"core/com/zoho/crm/api/blueprint/multi_select_lookup","name":"multiselectlookup","type":"core/com/zoho/crm/api/blueprint/multi_select_lookup"},"columnName":{"name":"column_name","type":"String"}},"core/com/zoho/crm/api/portals/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/timelines/timeline":{"fieldHistory":{"structure_name":"core/com/zoho/crm/api/timelines/field_history","name":"field_history","type":"List"},"extension":{"name":"extension","type":"String"},"auditedTime":{"name":"audited_time","type":"DateTime"},"record":{"structure_name":"core/com/zoho/crm/api/timelines/record","name":"record","type":"core/com/zoho/crm/api/timelines/record"},"action":{"name":"action","type":"String"},"id":{"name":"id","type":"Long"},"source":{"name":"source","type":"String"},"type":{"name":"type","type":"String"},"doneBy":{"structure_name":"core/com/zoho/crm/api/timelines/name_id_structure","name":"done_by","type":"core/com/zoho/crm/api/timelines/name_id_structure"},"relatedRecord":{"structure_name":"core/com/zoho/crm/api/timelines/related_record","name":"related_record","type":"core/com/zoho/crm/api/timelines/related_record"},"automationDetails":{"structure_name":"core/com/zoho/crm/api/timelines/automation_detail","name":"automation_details","type":"core/com/zoho/crm/api/timelines/automation_detail"}},"core/com/zoho/crm/api/notifications/event":{"resourceId":{"name":"resource_id","type":"Long"},"resourceName":{"name":"resource_name","type":"String"},"resourceUri":{"name":"resource_uri","type":"String"},"channelExpiry":{"name":"channel_expiry","type":"DateTime"},"channelId":{"name":"channel_id","type":"String"}},"core/com/zoho/crm/api/tags/existing_tag":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/territories/api_exception":{"code":{"values":["DUPLICATE_DATA","INVALID_DATA","NOT_ALLOWED","INTERNAL_SERVER_ERROR","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"supported_values","type":"List"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/territories/delete_territories_param":{"ids":{"name":"ids","type":"Long"},"deletePreviousForecasts":{"name":"delete_previous_forecasts","type":"Boolean"}},"core/com/zoho/crm/api/fields/show_fields":{"showData":{"name":"show_data","type":"Boolean"},"field":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"field","type":"core/com/zoho/crm/api/fields/minified_field"}},"core/com/zoho/crm/api/roles/body_wrapper":{"roles":{"structure_name":"core/com/zoho/crm/api/roles/role","name":"roles","type":"List"}},"core/com/zoho/crm/api/download_attachments/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/entity_scores/entity_structure_group":{"classes":["core/com/zoho/crm/api/entity_scores/entity_structure_with_module","core/com/zoho/crm/api/entity_scores/entity_structure"],"interface":true},"core/com/zoho/crm/api/hipaa_compliance/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/send_mail/invalid_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/entity_scores/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"String"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"}},"core/com/zoho/crm/api/users/body_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/users/users","name":"users","type":"List"}},"core/com/zoho/crm/api/holidays/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["Holidays created successfully","Holidays updated successfully","Holidays deleted successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/tags/update_tag_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/isc_signature/signature":{"iscSignature":{"name":"isc_signature","type":"Object"}},"core/com/zoho/crm/api/territory_users/body_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/users/users","name":"users","type":"List"}},"core/com/zoho/crm/api/associate_email/attachments":{"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/custom_views/action_wrapper":{"customViews":{"structure_name":"core/com/zoho/crm/api/custom_views/action_response","name":"custom_views","type":"List"}},"core/com/zoho/crm/api/users_territories/validation":{"records":{"name":"records","type":"Boolean"},"name":{"name":"Name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/appointment_preference/body_wrapper":{"appointmentPreferences":{"structure_name":"core/com/zoho/crm/api/appointment_preference/appointment_preference","name":"appointment_preferences","type":"core/com/zoho/crm/api/appointment_preference/appointment_preference"}},"core/com/zoho/crm/api/change_owner/body_wrapper":{"owner":{"structure_name":"core/com/zoho/crm/api/change_owner/owner","name":"owner","type":"core/com/zoho/crm/api/change_owner/owner"},"relatedModules":{"structure_name":"core/com/zoho/crm/api/change_owner/related_modules","name":"related_modules","type":"List"},"notify":{"name":"notify","type":"Boolean"}},"core/com/zoho/crm/api/bulk_write/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/definition/definition":{"rootElementName":{"name":"root_element_name","type":"String"},"extradetails":{"name":"extraDetails","type":"Map"},"properties":{"structure_name":"core/com/zoho/crm/api/definition/property","name":"properties","type":"List"}},"core/com/zoho/crm/api/mail_merge/signers":{"actionType":{"values":["sign","approve"],"name":"action_type","type":"utils/util/choice"},"recipient":{"structure_name":"core/com/zoho/crm/api/mail_merge/address","name":"recipient","type":"core/com/zoho/crm/api/mail_merge/address"},"recipientName":{"name":"recipient_name","type":"String"}},"core/com/zoho/crm/api/territory_users/action_handler":{"classes":["core/com/zoho/crm/api/territory_users/api_exception","core/com/zoho/crm/api/territory_users/action_wrapper"],"interface":true},"core/com/zoho/crm/api/mail_merge/mail_merge":{"bccEmail":{"structure_name":"core/com/zoho/crm/api/mail_merge/address","name":"bcc_email","type":"List"},"ccEmail":{"structure_name":"core/com/zoho/crm/api/mail_merge/address","name":"cc_email","type":"List"},"subject":{"name":"subject","type":"String"},"fromAddress":{"structure_name":"core/com/zoho/crm/api/mail_merge/address","name":"from_address","type":"core/com/zoho/crm/api/mail_merge/address"},"attachmentName":{"name":"attachment_name","type":"String"},"mailMergeTemplate":{"structure_name":"core/com/zoho/crm/api/mail_merge/mail_merge_template","name":"mail_merge_template","type":"core/com/zoho/crm/api/mail_merge/mail_merge_template"},"message":{"name":"message","type":"String"},"type":{"values":["inline","attachment"],"name":"type","type":"utils/util/choice"},"toAddress":{"structure_name":"core/com/zoho/crm/api/mail_merge/address","name":"to_address","type":"List"}},"core/com/zoho/crm/api/record/search_records_param":{"cvid":{"name":"cvid","type":"String"},"approved":{"name":"approved","type":"String"},"perPage":{"name":"per_page","type":"Integer"},"phone":{"name":"phone","type":"String"},"converted":{"name":"converted","type":"String"},"criteria":{"name":"criteria","type":"String"},"page":{"name":"page","type":"Integer"},"fields":{"name":"fields","type":"String"},"word":{"name":"word","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/assignment_rules/response_handler":{"classes":["core/com/zoho/crm/api/assignment_rules/api_exception","core/com/zoho/crm/api/assignment_rules/response_wrapper"],"interface":true},"core/com/zoho/crm/api/mail_merge/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","INVALID_DATA"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"supported_values","type":"List"},{"name":"regex","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/user_groups/action_wrapper":{"userGroups":{"structure_name":"core/com/zoho/crm/api/user_groups/action_response","name":"user_groups","type":"List"}},"core/com/zoho/crm/api/change_owner/owner":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mail_merge/sign_action_response":{"classes":["core/com/zoho/crm/api/mail_merge/success_response"],"interface":true},"core/com/zoho/crm/api/email_compose_meta/data":{"data":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/data_map","name":"data","type":"List"}},"core/com/zoho/crm/api/contact_roles/action_wrapper":{"contactRoles":{"structure_name":"core/com/zoho/crm/api/contact_roles/action_response","name":"contact_roles","type":"List"}},"core/com/zoho/crm/api/user_type_users/api_exception":{"code":{"values":["INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/send_mail/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"message_id","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/share_records/action_wrapper":{"share":{"structure_name":"core/com/zoho/crm/api/share_records/action_response","name":"share","type":"List"}},"core/com/zoho/crm/api/users/users":{"country":{"name":"country","type":"String"},"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy17":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"decimalSeparator":{"values":["Comma","Period"],"name":"decimal_separator","type":"utils/util/choice"},"dateFormat":{"values":["MMM d, yyyy"],"name":"date_format","type":"utils/util/choice"},"numberSeparator":{"values":["Space"],"name":"number_separator","type":"utils/util/choice"},"language":{"name":"language","type":"String"},"rtlEnabled":{"name":"rtl_enabled","type":"Boolean"},"telephonyEnabled":{"name":"telephony_enabled","type":"Boolean"},"microsoft":{"name":"microsoft","type":"Boolean"},"sandboxdeveloper":{"name":"sandboxDeveloper","type":"Boolean"},"isonline":{"name":"Isonline","type":"Boolean"},"nextShift":{"structure_name":"core/com/zoho/crm/api/users/shift","name":"$next_shift","type":"core/com/zoho/crm/api/users/shift"},"ntcNotificationType":{"name":"ntc_notification_type","type":"List"},"createdTime":{"name":"created_time","type":"DateTime"},"id":{"name":"id","type":"Long"},"state":{"name":"state","type":"String"},"personalAccount":{"name":"personal_account","type":"Boolean"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"},"fax":{"name":"fax","type":"String"},"reportingTo":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Reporting_To","type":"core/com/zoho/crm/api/users/minified_user"},"zip":{"name":"zip","type":"String"},"offset":{"name":"offset","type":"Integer"},"imapStatus":{"name":"imap_status","type":"Boolean"},"profile":{"structure_name":"core/com/zoho/crm/api/users/profile","name":"profile","type":"core/com/zoho/crm/api/users/profile"},"sortOrderPreference":{"name":"sort_order_preference","type":"String"},"timeZone":{"name":"time_zone","type":"TimeZone"},"customizeInfo":{"structure_name":"core/com/zoho/crm/api/users/customize_info","name":"customize_info","type":"core/com/zoho/crm/api/users/customize_info"},"zuid":{"name":"zuid","type":"String"},"firstName":{"regex":"[A-Za-z0-9]","name":"first_name","max-length":50,"type":"String"},"ezuid":{"name":"ezuid","type":"String"},"phone":{"name":"phone","type":"String"},"dob":{"name":"dob","type":"Date"},"name":{"name":"name","type":"String"},"status":{"name":"status","type":"String"},"lastName":{"regex":"[A-Za-z0-9]","name":"last_name","max-length":50,"type":"String"},"createdTime9":{"name":"Created_Time","type":"DateTime"},"role":{"structure_name":"core/com/zoho/crm/api/users/role","name":"role","type":"core/com/zoho/crm/api/users/role"},"city":{"name":"city","type":"String"},"signature":{"name":"signature","type":"String"},"ntcEnabled":{"name":"ntc_enabled","type":"Boolean"},"countryLocale":{"name":"country_locale","type":"String"},"locale":{"name":"locale","type":"String"},"imageLink":{"name":"image_link","type":"String"},"currentShift":{"structure_name":"core/com/zoho/crm/api/users/shift","name":"$current_shift","type":"core/com/zoho/crm/api/users/shift"},"street":{"name":"street","type":"String"},"sortOrderPreferenceS":{"name":"sort_order_preference__s","type":"String"},"alias":{"name":"alias","type":"String"},"currency":{"name":"Currency","type":"String"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"theme":{"structure_name":"core/com/zoho/crm/api/users/theme","name":"theme","type":"core/com/zoho/crm/api/users/theme"},"nameFormatS":{"values":["Salutation,First Name,Last Name","Saluation,Last Name,First Name","First Name,Last Name,Saluation"],"name":"name_format__s","type":"utils/util/choice"},"email":{"regex":"[a-z0-9]{9}[@][a-z0-9]{5}[.]com","name":"email","type":"String"},"statusReasonS":{"name":"status_reason__s","type":"String"},"website":{"regex":"[a-z0-9]{5}[.]com","name":"website","type":"String"},"mobile":{"name":"mobile","type":"String"},"fullName":{"name":"full_name","type":"String"},"confirm":{"name":"confirm","type":"Boolean"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"timeFormat":{"values":["HH:mm","hh:mm a"],"name":"time_format","type":"utils/util/choice"},"shiftEffectiveFrom":{"name":"$shift_effective_from","type":"Object"},"category":{"name":"category","type":"String"},"defaultTabGroup":{"name":"default_tab_group","type":"String"}},"core/com/zoho/crm/api/related_records/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"External_Deal_ID","type":"String"}],"name":"details","type":"Map"},"message":{"values":["relation added","relation removed"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_read/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/bulk_read/job_detail","name":"data","type":"List"}},"core/com/zoho/crm/api/record/record_count_param":{"phone":{"name":"phone","type":"String"},"criteria":{"name":"criteria","type":"String"},"word":{"name":"word","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/modules/response_wrapper":{"modules":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"modules","type":"List"}},"core/com/zoho/crm/api/wizards/wizard":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"module":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"module","type":"core/com/zoho/crm/api/modules/modules"},"profiles":{"structure_name":"core/com/zoho/crm/api/profiles/profile","name":"profiles","type":"List"},"active":{"name":"active","type":"Boolean"},"parentWizard":{"structure_name":"core/com/zoho/crm/api/wizards/wizard","name":"parent_wizard","type":"core/com/zoho/crm/api/wizards/wizard"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"exemptedPortalUserTypes":{"structure_name":"core/com/zoho/crm/api/wizards/exempted_portal_user_type","name":"exempted_portal_user_types","type":"List"},"draft":{"name":"draft","type":"Boolean"},"portalUserTypes":{"structure_name":"core/com/zoho/crm/api/wizards/portal_user_type","name":"portal_user_types","type":"List"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"containers":{"structure_name":"core/com/zoho/crm/api/wizards/container","name":"containers","type":"List"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/reschedule_history/appointment_name":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/email_related_records/response_wrapper":{"emails":{"structure_name":"core/com/zoho/crm/api/email_related_records/email","name":"Emails","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/email_related_records/info","name":"info","type":"core/com/zoho/crm/api/email_related_records/info"}},"core/com/zoho/crm/api/user_groups/success_response":{"code":{"values":["SUCCESS","SCHEDULED"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mail_merge/sign_mail_merge":{"signers":{"structure_name":"core/com/zoho/crm/api/mail_merge/signers","name":"signers","type":"List"},"fileName":{"name":"file_name","max-length":255,"type":"String"},"mailMergeTemplate":{"structure_name":"core/com/zoho/crm/api/mail_merge/mail_merge_template","name":"mail_merge_template","type":"core/com/zoho/crm/api/mail_merge/mail_merge_template"},"signInOrder":{"name":"sign_in_order","type":"Boolean"}},"core/com/zoho/crm/api/associate_email/available":{"linkedRecord":{"structure_name":"core/com/zoho/crm/api/associate_email/linked_record","name":"linked_record","type":"core/com/zoho/crm/api/associate_email/linked_record"},"record":{"structure_name":"core/com/zoho/crm/api/associate_email/record","name":"record","type":"core/com/zoho/crm/api/associate_email/record"},"available":{"name":"available","type":"Boolean"}},"core/com/zoho/crm/api/variables/action_response":{"classes":["core/com/zoho/crm/api/variables/api_exception","core/com/zoho/crm/api/variables/success_response"],"interface":true},"core/com/zoho/crm/api/territories/action_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/territories/action_response","name":"territories","type":"List"}},"core/com/zoho/crm/api/tags/remove_tags_from_multiple_records_param":{"ids":{"name":"ids","type":"String","required":true}},"core/com/zoho/crm/api/hipaa_compliance/action_handler":{"classes":["core/com/zoho/crm/api/hipaa_compliance/api_exception","core/com/zoho/crm/api/hipaa_compliance/success_response"],"interface":true},"core/com/zoho/crm/api/tags/record_success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"structure_name":"core/com/zoho/crm/api/tags/record_detail_tag","name":"tags","type":"List"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/territories/deleted_associated_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/territories/deleted_associated_territories","name":"territories","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/territories/info","name":"info","type":"core/com/zoho/crm/api/territories/info"}},"core/com/zoho/crm/api/pipeline/response_handler":{"classes":["core/com/zoho/crm/api/pipeline/body_wrapper","core/com/zoho/crm/api/pipeline/api_exception"],"interface":true},"core/com/zoho/crm/api/notifications/api_exception":{"code":{"values":["NOT_SUBSCRIBED","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portals_meta/layouts":{"displayLabel":{"name":"display_label","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mass_delete_cvid/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/mass_delete_cvid/status","name":"data","type":"List"}},"core/com/zoho/crm/api/wizards/button_background":{"buttonBackground":{"name":"button_background","type":"List"}},"core/com/zoho/crm/api/users/theme":{"newBackground":{"name":"new_background","type":"String"},"normalTab":{"structure_name":"core/com/zoho/crm/api/users/tab","name":"normal_tab","type":"core/com/zoho/crm/api/users/tab"},"background":{"values":["#F3F0EB"],"name":"background","type":"utils/util/choice"},"screen":{"values":["fixed"],"name":"screen","type":"utils/util/choice"},"type":{"name":"type","type":"String"},"selectedTab":{"structure_name":"core/com/zoho/crm/api/users/tab","name":"selected_tab","type":"core/com/zoho/crm/api/users/tab"}},"core/com/zoho/crm/api/pipeline/action_response":{"classes":["core/com/zoho/crm/api/pipeline/api_exception","core/com/zoho/crm/api/pipeline/success_response"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/create_map_dependency_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/fiscal_year/action_handler":{"classes":["core/com/zoho/crm/api/fiscal_year/api_exception","core/com/zoho/crm/api/fiscal_year/action_wrapper"],"interface":true},"core/com/zoho/crm/api/definition/property":{"displayLabel":{"name":"display_label","type":"String"},"allowedValues":{"name":"allowed_values","type":"List"},"regex":{"name":"regex","type":"String"},"apiName":{"name":"api_name","type":"String"},"fieldLabel":{"name":"field_label","type":"String"},"dataType":{"name":"data_type","type":"String"},"uiType":{"name":"ui_type","type":"Integer"},"length":{"name":"length","type":"Integer"},"readOnly":{"name":"read_only","type":"Boolean"},"availableInUserLayout":{"name":"available_in_user_layout","type":"Boolean"},"required":{"name":"required","type":"Boolean"},"properties":{"structure_name":"core/com/zoho/crm/api/definition/minified_property","name":"properties","type":"List"}},"core/com/zoho/crm/api/users_transfer_delete/response_handler":{"classes":["core/com/zoho/crm/api/users_transfer_delete/response_wrapper","core/com/zoho/crm/api/users_transfer_delete/api_exception"],"interface":true},"core/com/zoho/crm/api/share_records/api_exception":{"code":{"values":["BAD_REQUEST","INVALID_MODULE","SHARE_LIMIT_EXCEEDED","OAUTH_SCOPE_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","DUPLICATE_DATA","LIMIT_EXCEEDED","MANDATORY_NOT_FOUND","INVALID_DATA","ENTITY_ID_INVALID","NO_PERMISSION","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"permissions","type":"List"},{"structure_name":"core/com/zoho/crm/api/share_records/dependee","name":"dependee","type":"core/com/zoho/crm/api/share_records/dependee"},{"structure_name":"core/com/zoho/crm/api/share_records/dependee","name":"ambiguity_due_to","type":"List"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["Scheduler is running","cannot share to the user","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","record not deleted","the related id given seems to be invalid","The relation name given seems to be invalid.","invalid oauth scope to access this URL","Please check if the URL trying to access is a correct one.","Permission is invalid","record is already visible to the user.","Cannot share a record to more than 10 users.","No sharing through this record is available to revoke.","ENTITY_ID_INVALID"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/send_mail/data_subject_request":{"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/scoring_rules/criteria":{"comparator":{"name":"comparator","type":"String"},"groupOperator":{"name":"group_operator","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/scoring_rules/field","name":"field","type":"core/com/zoho/crm/api/scoring_rules/field"},"value":{"name":"value","type":"Object"},"group":{"structure_name":"core/com/zoho/crm/api/scoring_rules/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/shift_hours/break_hours":{"sameAsEveryday":{"name":"same_as_everyday","type":"Boolean"},"id":{"name":"id","type":"Long"},"dailyTiming":{"name":"daily_timing","type":"List"},"breakDays":{"name":"break_days","type":"List"},"customTiming":{"structure_name":"core/com/zoho/crm/api/shift_hours/break_custom_timing","name":"custom_timing","type":"List"}},"core/com/zoho/crm/api/related_records/get_related_records_using_external_id_param":{"perPage":{"name":"per_page","type":"Integer"},"page":{"name":"page","type":"Integer"},"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/email_templates/get_email_templates_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/record/territory":{"assignedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"$assigned_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"Name","type":"String"},"assigned":{"name":"$assigned","type":"String"},"id":{"name":"id","type":"Long"},"assignedTime":{"name":"$assigned_time","type":"DateTime"}},"core/com/zoho/crm/api/privacy_preference/tpt":{"name":{"name":"name","type":"String"},"issupported":{"name":"isSupported","type":"String"},"isenabled":{"name":"isEnabled","type":"String"}},"core/com/zoho/crm/api/shift_hours/action_handler":{"classes":["core/com/zoho/crm/api/shift_hours/api_exception","core/com/zoho/crm/api/shift_hours/action_wrapper"],"interface":true},"core/com/zoho/crm/api/shift_hours/holidays":{"date":{"name":"date","type":"Date"},"year":{"name":"year","type":"Integer"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/wizards/actions":{"exemptedProfiles":{"structure_name":"core/com/zoho/crm/api/profiles/profile","name":"exempted_profiles","type":"List"},"segment":{"structure_name":"core/com/zoho/crm/api/wizards/segment","name":"segment","type":"core/com/zoho/crm/api/wizards/segment"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"fields":{"structure_name":"core/com/zoho/crm/api/fields/fields","name":"fields","type":"core/com/zoho/crm/api/fields/fields"},"value":{"name":"value","type":"Object"}},"core/com/zoho/crm/api/blueprint/module":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"module":{"name":"module","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/email_compose_meta/default_form":{"default1":{"name":"default","type":"Boolean"},"userName":{"name":"user_name","type":"String"},"type":{"name":"type","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/org/response_wrapper":{"org":{"structure_name":"core/com/zoho/crm/api/org/org","name":"org","type":"List"}},"core/com/zoho/crm/api/business_hours/action_handler":{"classes":["core/com/zoho/crm/api/business_hours/api_exception","core/com/zoho/crm/api/business_hours/action_wrapper"],"interface":true},"core/com/zoho/crm/api/modules/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/custom_views/shared_to":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"values":["users","roles","groups","territories"],"name":"type","type":"utils/util/choice"},"subordinates":{"name":"subordinates","type":"Boolean"}},"core/com/zoho/crm/api/related_records/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/record/info","name":"info","type":"core/com/zoho/crm/api/record/info"}},"core/com/zoho/crm/api/related_records/delete_related_record_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/record/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/record/info","name":"info","type":"core/com/zoho/crm/api/record/info"}},"core/com/zoho/crm/api/record/get_deleted_records_param":{"perPage":{"name":"per_page","type":"Integer"},"page":{"name":"page","type":"Integer"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/modules/minified_module":{"apiName":{"name":"api_name","type":"String"},"module":{"name":"module","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/profiles/default_view":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/profiles/minified_profile":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"delete1":{"name":"_delete","type":"Boolean"}},"core/com/zoho/crm/api/backup/urls_wrapper":{"urls":{"structure_name":"core/com/zoho/crm/api/backup/urls","name":"urls","type":"core/com/zoho/crm/api/backup/urls"}},"core/com/zoho/crm/api/portal_user_type/user_type":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"personalityModule":{"structure_name":"core/com/zoho/crm/api/portal_user_type/personality_module","name":"personality_module","type":"core/com/zoho/crm/api/portal_user_type/personality_module"},"createdBy":{"structure_name":"core/com/zoho/crm/api/portal_user_type/owner","name":"created_by","type":"core/com/zoho/crm/api/portal_user_type/owner"},"default1":{"name":"default","type":"Boolean"},"name":{"name":"name","type":"String"},"noOfUsers":{"name":"no_of_users","type":"Integer"},"createdTime":{"name":"created_time","type":"DateTime"},"active":{"name":"active","type":"Boolean"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/portal_user_type/owner","name":"modified_by","type":"core/com/zoho/crm/api/portal_user_type/owner"},"id":{"name":"id","type":"Long"},"modules":{"structure_name":"core/com/zoho/crm/api/portal_user_type/modules","name":"modules","type":"List"}},"core/com/zoho/crm/api/associate_email/module_map":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/custom_views/pin_fields":{"apiName":{"name":"api_name","type":"String"},"pin":{"values":[false],"name":"_pin","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/currency":{"roundingOption":{"values":["normal","round_off","round_up","round_down"],"name":"rounding_option","type":"utils/util/choice"},"precision":{"name":"precision","type":"Integer"}},"core/com/zoho/crm/api/notes/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","NO_PERMISSION","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INTERNAL_ERROR","NOT_SUPPORTED","REQUIRED_PARAM_MISSING","INTERNAL_SERVER_ERROR","INVALID_MODULE","BAD_REQUEST","OAUTH_SCOPE_MISMATCH","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"String"},{"name":"api_name","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"permissions","type":"List"},{"name":"param","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"param_name","type":"String"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["record not deleted","required field not found","invalid data","One of the expected parameter is missing","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","the id given seems to be invalid","One of the expected parameter is missing","Internal server error occurred.","the module name given seems to be invalid"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fiscal_year/action_response":{"classes":["core/com/zoho/crm/api/fiscal_year/api_exception","core/com/zoho/crm/api/fiscal_year/success_response"],"interface":true},"core/com/zoho/crm/api/user_groups/response_wrapper":{"userGroups":{"structure_name":"core/com/zoho/crm/api/user_groups/groups","name":"user_groups","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/user_groups/info","name":"info","type":"core/com/zoho/crm/api/user_groups/info"}},"core/com/zoho/crm/api/related_records/delete_related_records_using_external_id_param":{"ids":{"name":"ids","type":"String","required":true}},"core/com/zoho/crm/api/related_records/delink_record_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/share_records/delete_action_response":{"classes":["core/com/zoho/crm/api/share_records/success_response","core/com/zoho/crm/api/share_records/api_exception"],"interface":true},"core/com/zoho/crm/api/attachments/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/attachments/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/notifications/response_wrapper":{"watch":{"structure_name":"core/com/zoho/crm/api/notifications/notification","name":"watch","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/notifications/info","name":"info","type":"core/com/zoho/crm/api/notifications/info"}},"core/com/zoho/crm/api/mail_merge/address_value_map":{"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/modules/modules":{"relatedListProperties":{"structure_name":"core/com/zoho/crm/api/modules/related_list_properties","name":"related_list_properties","type":"core/com/zoho/crm/api/modules/related_list_properties"},"modifiedTime":{"name":"modified_time","type":"DateTime"},"apiName":{"name":"api_name","type":"String"},"trackCurrentData":{"name":"track_current_data","type":"Boolean"},"webLink":{"name":"web_link","type":"String"},"businessCardFields":{"name":"business_card_fields","type":"List"},"moduleName":{"name":"module_name","type":"String"},"relatedLists":{"structure_name":"core/com/zoho/crm/api/related_lists/related_list","name":"related_lists","type":"List"},"defaultMappingFields":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"default_mapping_fields","type":"List"},"feedsRequired":{"name":"feeds_required","type":"Boolean"},"customView":{"structure_name":"core/com/zoho/crm/api/custom_views/custom_view","name":"custom_view","type":"core/com/zoho/crm/api/custom_views/custom_view"},"layouts":{"structure_name":"core/com/zoho/crm/api/layouts/layouts","name":"layouts","type":"List"},"webformSupported":{"name":"webform_supported","type":"Boolean"},"id":{"name":"id","type":"Long"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"globalSearchSupported":{"name":"global_search_supported","type":"Boolean"},"visible":{"name":"visible","type":"Boolean"},"visibility":{"name":"visibility","type":"Integer"},"profiles":{"structure_name":"core/com/zoho/crm/api/profiles/minified_profile","name":"profiles","type":"List"},"filterStatus":{"name":"filter_status","type":"Boolean"},"pluralLabel":{"name":"plural_label","type":"String"},"businessCardFieldLimit":{"name":"business_card_field_limit","type":"Integer"},"onDemandProperties":{"name":"$on_demand_properties","type":"List"},"viewable":{"name":"viewable","type":"Boolean"},"perPage":{"name":"per_page","type":"Integer"},"ziaView":{"name":"zia_view","type":"Boolean"},"displayField":{"name":"display_field","type":"String"},"triggersSupported":{"name":"triggers_supported","type":"Boolean"},"fields":{"structure_name":"core/com/zoho/crm/api/modules/module_fields","name":"fields","type":"List"},"kanbanView":{"name":"kanban_view","type":"Boolean"},"searchLayoutFields":{"name":"search_layout_fields","type":"List"},"status":{"name":"status","type":"String"},"fieldStates":{"name":"$field_states","type":"List"},"generatedType":{"values":["default","web","custom","linking"],"name":"generated_type","type":"utils/util/choice"},"emailParserSupported":{"name":"email_parser_supported","type":"Boolean"},"arguments32":{"structure_name":"core/com/zoho/crm/api/modules/argument","name":"arguments","type":"List"},"deletable":{"name":"deletable","type":"Boolean"},"activityBadge":{"values":["Enabled","Disabled"],"name":"activity_badge","type":"utils/util/choice"},"description":{"name":"description","max-length":255,"type":"String"},"scoringSupported":{"name":"scoring_supported","type":"Boolean"},"filterSupported":{"name":"filter_supported","type":"Boolean"},"creatable":{"name":"creatable","type":"Boolean"},"kanbanViewSupported":{"name":"kanban_view_supported","type":"Boolean"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"showAsTab":{"name":"show_as_tab","type":"Boolean"},"isblueprintsupported":{"name":"isBlueprintSupported","type":"Boolean"},"lookupFieldProperties":{"structure_name":"core/com/zoho/crm/api/modules/lookup_field_properties","name":"lookup_field_properties","type":"core/com/zoho/crm/api/modules/lookup_field_properties"},"convertable":{"name":"convertable","type":"Boolean"},"editable":{"name":"editable","type":"Boolean"},"quickCreate":{"name":"quick_create","type":"Boolean"},"presenceSubMenu":{"name":"presence_sub_menu","type":"Boolean"},"singularLabel":{"name":"singular_label","type":"String"},"parentModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"parent_module","type":"core/com/zoho/crm/api/modules/minified_module"},"apiSupported":{"name":"api_supported","type":"Boolean"},"subMenuAvailable":{"name":"sub_menu_available","type":"Boolean"},"arguments1":{"structure_name":"core/com/zoho/crm/api/modules/argument","name":"arguments","type":"List"},"emailtemplateSupport":{"name":"emailTemplate_support","type":"Boolean"},"inventoryTemplateSupported":{"name":"inventory_template_supported","type":"Boolean"},"properties":{"name":"$properties","type":"List"},"territory":{"structure_name":"core/com/zoho/crm/api/modules/territory","name":"territory","type":"core/com/zoho/crm/api/modules/territory"}},"core/com/zoho/crm/api/record/delete_records_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/territories/delete_territory_param":{"deletePreviousForecasts":{"name":"delete_previous_forecasts","type":"Boolean"}},"core/com/zoho/crm/api/users_territories/manager":{"name":{"name":"Name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/business_hours/response_wrapper":{"businessHours":{"structure_name":"core/com/zoho/crm/api/business_hours/business_hours","name":"business_hours","type":"core/com/zoho/crm/api/business_hours/business_hours"}},"core/com/zoho/crm/api/download_inline_images/response_handler":{"classes":["core/com/zoho/crm/api/download_inline_images/file_body_wrapper","core/com/zoho/crm/api/download_inline_images/api_exception"],"interface":true},"core/com/zoho/crm/api/email_sharing/response_handler":{"classes":["core/com/zoho/crm/api/email_sharing/api_exception","core/com/zoho/crm/api/email_sharing/response_wrapper"],"interface":true},"core/com/zoho/crm/api/taxes/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"name","type":"String"},{"name":"value","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["tax added","tax updated"," tax deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/modules/action_wrapper":{"modules":{"structure_name":"core/com/zoho/crm/api/modules/action_response","name":"modules","type":"List"}},"core/com/zoho/crm/api/privacy_preference/option":{"suboptions":{"name":"suboptions","type":"List"},"name":{"name":"name","type":"String"},"tooltip":{"name":"tooltip","type":"String"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/users_transfer_delete/move_subordinate":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/email_sharing/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","the request does not contain any file","invalid file type"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/view_type":{"view":{"name":"view","type":"Boolean"},"edit":{"name":"edit","type":"Boolean"},"quickCreate":{"name":"quick_create","type":"Boolean"},"create":{"name":"create","type":"Boolean"}},"core/com/zoho/crm/api/attachments/upload_url_attachments_param":{"attachmentUrl":{"name":"attachmentUrl","type":"String","required":true},"title":{"name":"title","type":"String"}},"core/com/zoho/crm/api/field_map_dependency/action_wrapper":{"mapDependency":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/action_response","name":"map_dependency","type":"List"}},"core/com/zoho/crm/api/holidays/delete_holiday_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/email_related_records/module":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/business_hours/create_business_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/portals/response_wrapper":{"portals":{"structure_name":"core/com/zoho/crm/api/portals/portals","name":"portals","type":"List"}},"core/com/zoho/crm/api/backup/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/notes/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/notes/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/org/api_exception":{"code":{"values":["INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/field_attachments/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/profiles/delete_profile_param":{"transferTo":{"name":"transfer_to","type":"Long","required":true}},"core/com/zoho/crm/api/modules/module_field_lookup":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"queryDetails":{"structure_name":"core/com/zoho/crm/api/fields/query_details","name":"query_details","type":"core/com/zoho/crm/api/fields/query_details"},"id":{"name":"id","type":"Long"},"showFields":{"structure_name":"core/com/zoho/crm/api/fields/show_fields","name":"show_fields","type":"List"},"revalidateFilterDuringEdit":{"name":"revalidate_filter_during_edit","type":"Boolean"}},"core/com/zoho/crm/api/holidays/response_wrapper":{"holidays":{"structure_name":"core/com/zoho/crm/api/holidays/holiday","name":"holidays","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/holidays/info","name":"info","type":"core/com/zoho/crm/api/holidays/info"}},"core/com/zoho/crm/api/reschedule_history/get_appointment_rescheduled_history_param":{"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/mass_convert/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/mass_convert/status","name":"data","type":"List"}},"core/com/zoho/crm/api/users/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/download_attachments/response_handler":{"classes":["core/com/zoho/crm/api/download_attachments/file_body_wrapper","core/com/zoho/crm/api/download_attachments/api_exception"],"interface":true},"core/com/zoho/crm/api/layouts/actions_allowed":{"edit":{"name":"edit","type":"Boolean"},"rename":{"name":"rename","type":"Boolean"},"clone":{"name":"clone","type":"Boolean"},"downgrade":{"name":"downgrade","type":"Boolean"},"delete1":{"name":"delete","type":"Boolean"},"setLayoutPermissions":{"name":"set_layout_permissions","type":"Boolean"},"deactivate":{"name":"deactivate","type":"Boolean"}},"core/com/zoho/crm/api/definition/minified_property1":{"apiName":{"name":"api_name","type":"String"},"dataType":{"name":"data_type","type":"String"},"length":{"name":"length","type":"Integer"},"readOnly":{"name":"read_only","type":"Boolean"},"required":{"name":"required","type":"Boolean"}},"core/com/zoho/crm/api/fields/tooltip":{"name":{"values":["Info Icon"],"name":"name","type":"utils/util/choice"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/appointment_preference/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/count_handler":{"classes":["core/com/zoho/crm/api/record/count_wrapper","core/com/zoho/crm/api/record/api_exception"],"interface":true},"core/com/zoho/crm/api/email_templates/response_wrapper":{"emailTemplates":{"structure_name":"core/com/zoho/crm/api/email_templates/email_template","name":"email_templates","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/email_templates/info","name":"info","type":"core/com/zoho/crm/api/email_templates/info"}},"core/com/zoho/crm/api/shift_hours/users":{"role":{"structure_name":"core/com/zoho/crm/api/shift_hours/role","name":"role","type":"core/com/zoho/crm/api/shift_hours/role"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"effectiveFrom":{"name":"effective_from","type":"Date"},"email":{"name":"email","type":"String"},"zuid":{"name":"zuid","type":"String"}},"core/com/zoho/crm/api/inventory_templates/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/associate_email/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","INVALID_MODULE","REQUIRED_PARAM_MISSING","DUPLICATE_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"regex","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/roles/api_exception":{"code":{"values":["INVALID_MODULE","REQUIRED_PARAM_MISSING","MANDATORY_NOT_FOUND","PATTERN_NOT_MATCHED","INVALID_DATA","DUPLICATE_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param_name","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"role_status","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_write/file":{"updatedCount":{"name":"updated_count","type":"Integer"},"name":{"name":"name","type":"String"},"skippedCount":{"name":"skipped_count","type":"Integer"},"addedCount":{"name":"added_count","type":"Integer"},"totalCount":{"name":"total_count","type":"Integer"},"status":{"values":["ADDED","IN PROGRESS","COMPLETED","SKIPPED","FAILED"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/org/checkin_preferences":{"restrictedEventTypes":{"name":"restricted_event_types","type":"String"}},"core/com/zoho/crm/api/send_mail/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_DATA","INTERNAL_SERVER_ERROR","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/layouts/sections":{"displayLabel":{"name":"display_label","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"issubformsection":{"name":"isSubformSection","type":"Boolean"},"tabTraversal":{"name":"tab_traversal","type":"Integer"},"apiName":{"name":"api_name","type":"String"},"generatedType":{"name":"generated_type","type":"String"},"name":{"name":"name","type":"String"},"columnCount":{"name":"column_count","type":"Integer"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"fields":{"structure_name":"core/com/zoho/crm/api/layouts/section_field","name":"fields","type":"List"},"properties":{"structure_name":"core/com/zoho/crm/api/layouts/properties","name":"properties","type":"core/com/zoho/crm/api/layouts/properties"}},"core/com/zoho/crm/api/record/comment":{"commentedTime":{"name":"commented_time","type":"DateTime"},"commentContent":{"name":"comment_content","type":"String"},"id":{"name":"id","type":"Long"},"commentedBy":{"name":"commented_by","type":"String"}},"core/com/zoho/crm/api/holidays/update_holiday_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/privacy_preference/privacy_preference":{"preference":{"structure_name":"core/com/zoho/crm/api/privacy_preference/preference","name":"preference","type":"core/com/zoho/crm/api/privacy_preference/preference"},"config":{"structure_name":"core/com/zoho/crm/api/privacy_preference/config","name":"config","type":"core/com/zoho/crm/api/privacy_preference/config"}},"core/com/zoho/crm/api/shift_hours/mandatory_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/service_preference/response_handler":{"classes":["core/com/zoho/crm/api/service_preference/api_exception","core/com/zoho/crm/api/service_preference/response_wrapper"],"interface":true},"core/com/zoho/crm/api/attachments/action_response":{"classes":["core/com/zoho/crm/api/attachments/success_response"],"interface":true},"core/com/zoho/crm/api/wizards/response_handler":{"classes":["core/com/zoho/crm/api/wizards/api_exception","core/com/zoho/crm/api/wizards/response_wrapper"],"interface":true},"core/com/zoho/crm/api/territory_users/action_response":{"classes":["core/com/zoho/crm/api/territory_users/api_exception","core/com/zoho/crm/api/territory_users/success_response"],"interface":true},"core/com/zoho/crm/api/templates/api_exception":{"code":{"values":["REQUIRED_PARAM_MISSING"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param","type":"String"},{"name":"api_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/business_hours/business_hours":{"businessDays":{"structure_name":"utils/util/choice","values":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"name":"business_days","type":"List"},"sameAsEveryday":{"name":"same_as_everyday","type":"Boolean"},"id":{"name":"id","type":"Long"},"type":{"values":["24_by_7","24_by_5","custom"],"name":"type","type":"utils/util/choice"},"weekStartsOn":{"values":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"name":"week_starts_on","type":"utils/util/choice"},"dailyTiming":{"name":"daily_timing","max-length":2,"type":"List"},"customTiming":{"structure_name":"core/com/zoho/crm/api/business_hours/break_hours_custom_timing","name":"custom_timing","type":"List"}},"core/com/zoho/crm/api/user_type_users/users":{"confirm":{"name":"confirm","type":"Boolean"},"statusReasonS":{"name":"status_reason__s","type":"String"},"module":{"name":"module","type":"String"},"personalityId":{"name":"personality_id","type":"Long"},"name":{"name":"name","type":"String"},"active":{"name":"active","type":"Boolean"},"email":{"name":"email","type":"String"},"invitedTime":{"name":"invited_time","type":"DateTime"}},"core/com/zoho/crm/api/custom_views/sort_by":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"utils/util/Model":{"classes":["core/com/zoho/crm/api/attachments/success_response","core/com/zoho/crm/api/holidays/create_business_holiday","core/com/zoho/crm/api/shift_hours/body_wrapper","core/com/zoho/crm/api/field_map_dependency/child","core/com/zoho/crm/api/territories/api_exception","core/com/zoho/crm/api/field_map_dependency/info","core/com/zoho/crm/api/record/conversion_options_response_wrapper","core/com/zoho/crm/api/wizards/segment","core/com/zoho/crm/api/pipeline/t_pipeline","core/com/zoho/crm/api/business_hours/business_hours_created","core/com/zoho/crm/api/email_related_records/attachments","core/com/zoho/crm/api/mass_delete_cvid/success_response","core/com/zoho/crm/api/users_unavailability/action_wrapper","core/com/zoho/crm/api/user_groups/jobs","core/com/zoho/crm/api/scoring_rules/action_wrapper","core/com/zoho/crm/api/fields/expression","core/com/zoho/crm/api/privacy_configurable_apps/wrapper","core/com/zoho/crm/api/tags/response_wrapper","core/com/zoho/crm/api/fields/api_exception","core/com/zoho/crm/api/notes/action_wrapper","core/com/zoho/crm/api/currencies/base_currency","core/com/zoho/crm/api/isc_signature/signature","core/com/zoho/crm/api/modules/action_wrapper","core/com/zoho/crm/api/entity_scores/scoring_rule_structure","core/com/zoho/crm/api/territories/response_wrapper","core/com/zoho/crm/api/fields/pick_list_value","core/com/zoho/crm/api/tags/action_wrapper","core/com/zoho/crm/api/assignment_rules/default_assignee","core/com/zoho/crm/api/layouts/layouts","core/com/zoho/crm/api/timelines/name_id_structure","core/com/zoho/crm/api/mail_merge/sign_action_wrapper","core/com/zoho/crm/api/mass_convert/response_wrapper","core/com/zoho/crm/api/users_transfer_delete/body_wrapper","core/com/zoho/crm/api/scoring_rules/criteria","core/com/zoho/crm/api/fields/formula","core/com/zoho/crm/api/user_groups/body_wrapper","core/com/zoho/crm/api/change_owner/api_exception","core/com/zoho/crm/api/holidays/shift_hour","core/com/zoho/crm/api/bulk_read/request_wrapper","core/com/zoho/crm/api/taxes/action_wrapper","core/com/zoho/crm/api/definition/api_exception","core/com/zoho/crm/api/record/file_details","core/com/zoho/crm/api/user_groups/sources_count","core/com/zoho/crm/api/service_preference/body_wrapper","core/com/zoho/crm/api/pipeline/regex_details","core/com/zoho/crm/api/wizards/button_background","core/com/zoho/crm/api/users_territories/transfer_to_user","core/com/zoho/crm/api/holidays/holiday","core/com/zoho/crm/api/pipeline/transfer_pipeline_wrapper","core/com/zoho/crm/api/record/multi_select_lookup","core/com/zoho/crm/api/blueprint/process_info","core/com/zoho/crm/api/timelines/field_history_value","core/com/zoho/crm/api/associate_email/body_wrapper","core/com/zoho/crm/api/email_compose_meta/features_available","core/com/zoho/crm/api/privacy_preference/wrapper","core/com/zoho/crm/api/fields/history_tracking","core/com/zoho/crm/api/files/body_wrapper","core/com/zoho/crm/api/appointment_preference/field","core/com/zoho/crm/api/email_templates/attachment","core/com/zoho/crm/api/shift_hours/break_custom_timing","core/com/zoho/crm/api/users/associated_groups_wrapper","core/com/zoho/crm/api/record/price_book","core/com/zoho/crm/api/pipeline/d_pipeline_wrapper","core/com/zoho/crm/api/bulk_read/job_detail","core/com/zoho/crm/api/timelines/picklist_detail","core/com/zoho/crm/api/currencies/api_exception","core/com/zoho/crm/api/fields/lookup","core/com/zoho/crm/api/change_owner/mass_wrapper","core/com/zoho/crm/api/layouts/actions_allowed","core/com/zoho/crm/api/associate_email/action_wrapper","core/com/zoho/crm/api/assignment_rules/created_by","core/com/zoho/crm/api/portals/response_wrapper","core/com/zoho/crm/api/tags/api_exception","core/com/zoho/crm/api/user_type_users/info","core/com/zoho/crm/api/reschedule_history/api_exception","core/com/zoho/crm/api/reschedule_history/appointment_name","core/com/zoho/crm/api/cancel_meetings/success_response","core/com/zoho/crm/api/user_groups/association_module","core/com/zoho/crm/api/email_templates/last_version_statistics","core/com/zoho/crm/api/territories/transfer_body_wrapper","core/com/zoho/crm/api/inventory_templates/inventory_template","core/com/zoho/crm/api/users/response_wrapper","core/com/zoho/crm/api/record/tax","core/com/zoho/crm/api/layouts/convert_mapping","core/com/zoho/crm/api/record/deleted_record","core/com/zoho/crm/api/user_groups/user_group","core/com/zoho/crm/api/currencies/currency_format","core/com/zoho/crm/api/backup/urls_wrapper","core/com/zoho/crm/api/download_inline_images/file_body_wrapper","core/com/zoho/crm/api/mass_convert/related_module","core/com/zoho/crm/api/holidays/api_exception","core/com/zoho/crm/api/mass_convert/assign_to","core/com/zoho/crm/api/notes/response_wrapper","core/com/zoho/crm/api/bulk_read/success_response","core/com/zoho/crm/api/taxes/org_tax","core/com/zoho/crm/api/record/action_wrapper","core/com/zoho/crm/api/timelines/automation_detail","core/com/zoho/crm/api/bulk_write/result","core/com/zoho/crm/api/mail_merge/sign_mail_merge","core/com/zoho/crm/api/templates/templates","core/com/zoho/crm/api/notes/api_exception","core/com/zoho/crm/api/fields/history_tracking_module","core/com/zoho/crm/api/portals/portals","core/com/zoho/crm/api/field_map_dependency/action_wrapper","core/com/zoho/crm/api/custom_views/pin_fields","core/com/zoho/crm/api/profiles/default_view","core/com/zoho/crm/api/shift_hours/break_hours","core/com/zoho/crm/api/email_related_records/user_details","core/com/zoho/crm/api/inventory_templates/info","core/com/zoho/crm/api/record/recurring_activity","core/com/zoho/crm/api/profiles/action_wrapper","core/com/zoho/crm/api/mass_delete_cvid/record_id_body_wrapper","core/com/zoho/crm/api/roles/api_exception","core/com/zoho/crm/api/profiles/section","core/com/zoho/crm/api/blueprint/currency","core/com/zoho/crm/api/portal_user_type/modules","core/com/zoho/crm/api/portal_user_type/owner","core/com/zoho/crm/api/portals_meta/layouts","core/com/zoho/crm/api/reschedule_history/info","core/com/zoho/crm/api/mail_merge/address","core/com/zoho/crm/api/mail_merge/address_value_map","core/com/zoho/crm/api/backup/backup","core/com/zoho/crm/api/users_transfer_delete/response_wrapper","core/com/zoho/crm/api/fields/refer_from_field","core/com/zoho/crm/api/org/response_wrapper","core/com/zoho/crm/api/profiles/category_module","core/com/zoho/crm/api/layouts/response_wrapper","core/com/zoho/crm/api/users_territories/territory","core/com/zoho/crm/api/users_unavailability/user","core/com/zoho/crm/api/available_currencies/response_wrapper","core/com/zoho/crm/api/fields/crypt","core/com/zoho/crm/api/org/hierarchy_preferences","core/com/zoho/crm/api/fields/operation_type","core/com/zoho/crm/api/fields/function_parameter","core/com/zoho/crm/api/email_compose_meta/data","core/com/zoho/crm/api/blueprint/layout","core/com/zoho/crm/api/portal_user_type/personality_module","core/com/zoho/crm/api/layouts/deal_layout_mapping","core/com/zoho/crm/api/deal_contact_roles/body_wrapper","core/com/zoho/crm/api/related_lists/module_map","core/com/zoho/crm/api/entity_scores/entity_scores","core/com/zoho/crm/api/custom_views/translation","core/com/zoho/crm/api/timelines/path_finder","core/com/zoho/crm/api/fields/fields","core/com/zoho/crm/api/share_records/response_wrapper","core/com/zoho/crm/api/users/customize_info","core/com/zoho/crm/api/blueprint/multi_select_lookup","core/com/zoho/crm/api/notifications/api_exception","core/com/zoho/crm/api/record/mass_update_territory","core/com/zoho/crm/api/blueprint/convert_mapping","core/com/zoho/crm/api/mass_change_owner/response_wrapper","core/com/zoho/crm/api/territories/deleted_associated_territories","core/com/zoho/crm/api/shift_hours/api_exception","core/com/zoho/crm/api/definition/response_wrapper","core/com/zoho/crm/api/wizards/api_exception","core/com/zoho/crm/api/templates/wrapper","core/com/zoho/crm/api/record/mass_update_response_wrapper","core/com/zoho/crm/api/blueprint/success_response","core/com/zoho/crm/api/hipaa_compliance/api_exception","core/com/zoho/crm/api/reschedule_history/reschedule_history","core/com/zoho/crm/api/user_groups/source","core/com/zoho/crm/api/users/api_exception","core/com/zoho/crm/api/territory_users/api_exception","core/com/zoho/crm/api/portal_invite/success_response","core/com/zoho/crm/api/mass_change_owner/status","core/com/zoho/crm/api/layouts/default_assignment_view","core/com/zoho/crm/api/user_groups/action_wrapper","core/com/zoho/crm/api/scoring_rules/body_wrapper","core/com/zoho/crm/api/users_transfer_delete/api_exception","core/com/zoho/crm/api/wizards/node","core/com/zoho/crm/api/portals/body_wrapper","core/com/zoho/crm/api/share_records/shared_through","core/com/zoho/crm/api/users_unavailability/response_wrapper","core/com/zoho/crm/api/taxes/success_response","core/com/zoho/crm/api/backup/history_wrapper","core/com/zoho/crm/api/wizards/container","core/com/zoho/crm/api/territories/info","core/com/zoho/crm/api/fiscal_year/api_exception","core/com/zoho/crm/api/deal_contact_roles/contact_role","core/com/zoho/crm/api/files/api_exception","core/com/zoho/crm/api/fields/unique","core/com/zoho/crm/api/fields/query_details","core/com/zoho/crm/api/query/api_exception","core/com/zoho/crm/api/business_hours/business_hours","core/com/zoho/crm/api/cancel_meetings/body_wrapper","core/com/zoho/crm/api/templates/folder","core/com/zoho/crm/api/business_hours/body_wrapper","core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete_by_id","core/com/zoho/crm/api/appointment_preference/field_mappings","core/com/zoho/crm/api/inventory_templates/api_exception","core/com/zoho/crm/api/fields/show_fields","core/com/zoho/crm/api/scoring_rules/layout","core/com/zoho/crm/api/email_related_records/response_wrapper","core/com/zoho/crm/api/reschedule_history/approval","core/com/zoho/crm/api/assignment_rules/api_exception","core/com/zoho/crm/api/change_owner/related_modules","core/com/zoho/crm/api/record/consent","core/com/zoho/crm/api/mass_delete_cvid/mass_delete_scheduled","core/com/zoho/crm/api/custom_views/action_wrapper","core/com/zoho/crm/api/deal_contact_roles/info","core/com/zoho/crm/api/variable_groups/response_wrapper","core/com/zoho/crm/api/users_territories/info","core/com/zoho/crm/api/portal_invite/job_response","core/com/zoho/crm/api/currencies/success_response","core/com/zoho/crm/api/taxes/body_wrapper","core/com/zoho/crm/api/users/role","core/com/zoho/crm/api/backup/urls","core/com/zoho/crm/api/deal_contact_roles/success_response","core/com/zoho/crm/api/shift_hours/success_response","core/com/zoho/crm/api/variables/api_exception","core/com/zoho/crm/api/territories/transfer_territory","core/com/zoho/crm/api/layouts/deal_field","core/com/zoho/crm/api/users/profile","core/com/zoho/crm/api/email_compose_meta/data_map","core/com/zoho/crm/api/backup/requester","core/com/zoho/crm/api/bulk_write/call_back","core/com/zoho/crm/api/send_mail/from","core/com/zoho/crm/api/blueprint/response_wrapper","core/com/zoho/crm/api/reschedule_history/action_wrapper","core/com/zoho/crm/api/taxes/tax","core/com/zoho/crm/api/users_territories/body_wrapper","core/com/zoho/crm/api/record/widget","core/com/zoho/crm/api/business_hours/response_wrapper","core/com/zoho/crm/api/email_related_records/api_exception","core/com/zoho/crm/api/download_attachments/file_body_wrapper","core/com/zoho/crm/api/territories/associated_users_count","core/com/zoho/crm/api/users_territories/manager","core/com/zoho/crm/api/layouts/api_exception","core/com/zoho/crm/api/variables/response_wrapper","core/com/zoho/crm/api/portal_user_type/response_wrapper","core/com/zoho/crm/api/send_mail/body_wrapper","core/com/zoho/crm/api/cancel_meetings/action_wrapper","core/com/zoho/crm/api/mass_change_owner/territory","core/com/zoho/crm/api/mass_convert/api_exception","core/com/zoho/crm/api/associate_email/available","core/com/zoho/crm/api/notifications/success_response","core/com/zoho/crm/api/service_preference/api_exception","core/com/zoho/crm/api/templates/api_exception","core/com/zoho/crm/api/blueprint/crypt","core/com/zoho/crm/api/user_groups/response_wrapper","core/com/zoho/crm/api/modules/success_response","core/com/zoho/crm/api/from_addresses/response_wrapper","core/com/zoho/crm/api/contact_roles/api_exception","core/com/zoho/crm/api/mass_convert/move_attachments_to","core/com/zoho/crm/api/tags/conflict_wrapper","core/com/zoho/crm/api/variables/body_wrapper","core/com/zoho/crm/api/bulk_read/result","core/com/zoho/crm/api/send_mail/data_subject_request","core/com/zoho/crm/api/assignment_rules/response_wrapper","core/com/zoho/crm/api/wizards/wizard","core/com/zoho/crm/api/attachments/attachment","core/com/zoho/crm/api/email_templates/response_wrapper","core/com/zoho/crm/api/mass_change_owner/action_wrapper","core/com/zoho/crm/api/custom_views/custom_view","core/com/zoho/crm/api/custom_views/owner","core/com/zoho/crm/api/field_attachments/file_body_wrapper","core/com/zoho/crm/api/privacy_preference/preference","core/com/zoho/crm/api/fields/profile","core/com/zoho/crm/api/fiscal_year/action_wrapper","core/com/zoho/crm/api/mail_merge/signers","core/com/zoho/crm/api/fields/maps","core/com/zoho/crm/api/users/theme","core/com/zoho/crm/api/custom_views/shared_to","core/com/zoho/crm/api/custom_views/sort_by","core/com/zoho/crm/api/change_owner/success_response","core/com/zoho/crm/api/wizards/actions","core/com/zoho/crm/api/assignment_rules/assignment_rules","core/com/zoho/crm/api/related_lists/response_wrapper","core/com/zoho/crm/api/files/action_wrapper","core/com/zoho/crm/api/tags/record_success_response","core/com/zoho/crm/api/shift_hours/response_wrapper","core/com/zoho/crm/api/bulk_read/api_exception","core/com/zoho/crm/api/custom_views/api_exception","core/com/zoho/crm/api/appointment_preference/appointment_preference","core/com/zoho/crm/api/backup/file_body_wrapper","core/com/zoho/crm/api/shift_hours/role","core/com/zoho/crm/api/territory_users/info","core/com/zoho/crm/api/shift_hours/holidays","core/com/zoho/crm/api/download_inline_images/api_exception","core/com/zoho/crm/api/record/response_wrapper","core/com/zoho/crm/api/email_templates/email_template","core/com/zoho/crm/api/roles/role","core/com/zoho/crm/api/fields/tooltip","core/com/zoho/crm/api/reschedule_history/user","core/com/zoho/crm/api/blueprint/module_fields","core/com/zoho/crm/api/portals/owner","core/com/zoho/crm/api/portals/api_exception","core/com/zoho/crm/api/timelines/record","core/com/zoho/crm/api/record/reminder","core/com/zoho/crm/api/pipeline/d_pipeline","core/com/zoho/crm/api/privacy_configurable_apps/apps","core/com/zoho/crm/api/blueprint/next_transition","core/com/zoho/crm/api/variable_groups/minified_variable_group","core/com/zoho/crm/api/change_owner/error_details","core/com/zoho/crm/api/variable_groups/variable_group","core/com/zoho/crm/api/send_mail/action_wrapper","core/com/zoho/crm/api/record/count_wrapper","core/com/zoho/crm/api/holidays/create_shift_holiday","core/com/zoho/crm/api/blueprint/escalation","core/com/zoho/crm/api/mail_merge/api_exception","core/com/zoho/crm/api/scoring_rules/scoring_rule","core/com/zoho/crm/api/deal_contact_roles/error_details","core/com/zoho/crm/api/bulk_read/call_back","core/com/zoho/crm/api/timelines/info","core/com/zoho/crm/api/users_unavailability/body_wrapper","core/com/zoho/crm/api/user_type_users/users","core/com/zoho/crm/api/associate_email/attachments","core/com/zoho/crm/api/email_sharing/api_exception","core/com/zoho/crm/api/fields/action_wrapper","core/com/zoho/crm/api/entity_scores/info","core/com/zoho/crm/api/scoring_rules/success_response","core/com/zoho/crm/api/mail_merge/mail_merge_template","core/com/zoho/crm/api/record/preference_field_matched_value","core/com/zoho/crm/api/appointment_preference/layout","core/com/zoho/crm/api/users/tab","core/com/zoho/crm/api/territory_users/body_wrapper","core/com/zoho/crm/api/users_transfer_delete/action_wrapper","core/com/zoho/crm/api/roles/reporting_to","core/com/zoho/crm/api/related_records/response_wrapper","core/com/zoho/crm/api/user_groups/associated_user","core/com/zoho/crm/api/record/carry_over_tags","core/com/zoho/crm/api/timelines/state","core/com/zoho/crm/api/timelines/timeline","core/com/zoho/crm/api/tags/new_tag_request_wrapper","core/com/zoho/crm/api/download_attachments/api_exception","core/com/zoho/crm/api/profiles/permission_detail","core/com/zoho/crm/api/portal_user_type/permissions","core/com/zoho/crm/api/custom_views/info","core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/bulk_write/field_mapping","core/com/zoho/crm/api/fields/rollup_criteria","core/com/zoho/crm/api/variable_groups/api_exception","core/com/zoho/crm/api/mail_merge/success_response","core/com/zoho/crm/api/appointment_preference/api_exception","core/com/zoho/crm/api/business_hours/api_exception","core/com/zoho/crm/api/wizards/conditional_rules","core/com/zoho/crm/api/reschedule_history/body_wrapper","core/com/zoho/crm/api/users/action_wrapper","core/com/zoho/crm/api/definition/minified_property1","core/com/zoho/crm/api/profiles/success_response","core/com/zoho/crm/api/record/line_tax","core/com/zoho/crm/api/share_records/delete_action_wrapper","core/com/zoho/crm/api/wizards/resource","core/com/zoho/crm/api/wizards/response_wrapper","core/com/zoho/crm/api/attachments/info","core/com/zoho/crm/api/roles/response_wrapper","core/com/zoho/crm/api/shift_hours/users","core/com/zoho/crm/api/pipeline/mandatory_details","core/com/zoho/crm/api/tags/info","core/com/zoho/crm/api/attachments/action_wrapper","core/com/zoho/crm/api/associate_email/success_response","core/com/zoho/crm/api/record/territory","core/com/zoho/crm/api/custom_views/success_response","core/com/zoho/crm/api/blueprint/lookup_field","core/com/zoho/crm/api/user_groups/associated_user_count","core/com/zoho/crm/api/tags/existing_tag_request_wrapper","core/com/zoho/crm/api/layouts/default_view","core/com/zoho/crm/api/user_type_users/response_wrapper","core/com/zoho/crm/api/send_mail/success_response","core/com/zoho/crm/api/appointment_preference/success_response","core/com/zoho/crm/api/assignment_rules/action_wrapper","core/com/zoho/crm/api/portals_meta/related_lists","core/com/zoho/crm/api/shift_hours/shift_hours","core/com/zoho/crm/api/custom_views/body_wrapper","core/com/zoho/crm/api/tags/count_response_wrapper","core/com/zoho/crm/api/reschedule_history/success_response","core/com/zoho/crm/api/portal_invite/action_wrapper","core/com/zoho/crm/api/privacy_preference/config","core/com/zoho/crm/api/notifications/delete_details","core/com/zoho/crm/api/definition/property","core/com/zoho/crm/api/fields/email_parser","core/com/zoho/crm/api/user_groups/association_wrapper","core/com/zoho/crm/api/mail_merge/download_mail_merge_wrapper","core/com/zoho/crm/api/fiscal_year/response_wrapper","core/com/zoho/crm/api/related_lists/api_exception","core/com/zoho/crm/api/record/conversion_option","core/com/zoho/crm/api/tags/success_response","core/com/zoho/crm/api/profiles/info","core/com/zoho/crm/api/modules/argument","core/com/zoho/crm/api/record/lead_converter","core/com/zoho/crm/api/user_groups/info","core/com/zoho/crm/api/record/criteria","core/com/zoho/crm/api/portal_user_type/api_exception","core/com/zoho/crm/api/territories/success_response","core/com/zoho/crm/api/deal_contact_roles/action_wrapper","core/com/zoho/crm/api/notes/body_wrapper","core/com/zoho/crm/api/currencies/base_currency_wrapper","core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete","core/com/zoho/crm/api/appointment_preference/body_wrapper","core/com/zoho/crm/api/bulk_read/action_wrapper","core/com/zoho/crm/api/portals/success_response","core/com/zoho/crm/api/users_territories/validation","core/com/zoho/crm/api/timelines/module","core/com/zoho/crm/api/org/file_body_wrapper","core/com/zoho/crm/api/attachments/response_wrapper","core/com/zoho/crm/api/tags/associated_places","core/com/zoho/crm/api/tags/error_details","core/com/zoho/crm/api/blueprint/profile","core/com/zoho/crm/api/user_groups/api_exception","core/com/zoho/crm/api/wizards/button","core/com/zoho/crm/api/tags/tag","core/com/zoho/crm/api/users/owner","core/com/zoho/crm/api/user_groups/sources_wrapper","core/com/zoho/crm/api/query/response_wrapper","core/com/zoho/crm/api/definition/minified_property","core/com/zoho/crm/api/variables/action_wrapper","core/com/zoho/crm/api/portal_invite/body_wrapper","core/com/zoho/crm/api/users_territories/response_wrapper","core/com/zoho/crm/api/associate_email/associate_email","core/com/zoho/crm/api/inventory_templates/response_wrapper","core/com/zoho/crm/api/send_mail/inventory_template","core/com/zoho/crm/api/related_records/body_wrapper","core/com/zoho/crm/api/currencies/error_details","core/com/zoho/crm/api/bulk_write/success_response","core/com/zoho/crm/api/send_mail/inventory_details","core/com/zoho/crm/api/timelines/related_record","core/com/zoho/crm/api/users/info","core/com/zoho/crm/api/user_groups/users","core/com/zoho/crm/api/mass_convert/success_response","core/com/zoho/crm/api/pipeline/body_wrapper","core/com/zoho/crm/api/modules/module_field_lookup","core/com/zoho/crm/api/blueprint/field","core/com/zoho/crm/api/backup/info","core/com/zoho/crm/api/users_transfer_delete/success_response","core/com/zoho/crm/api/business_hours/break_hours_custom_timing","core/com/zoho/crm/api/profiles/minified_profile","core/com/zoho/crm/api/email_related_records/info","core/com/zoho/crm/api/files/success_response","core/com/zoho/crm/api/related_lists/related_list","core/com/zoho/crm/api/variables/variable_group","core/com/zoho/crm/api/record/file_body_wrapper","core/com/zoho/crm/api/record/convert_body_wrapper","core/com/zoho/crm/api/record/participants","core/com/zoho/crm/api/blueprint/transition","core/com/zoho/crm/api/fiscal_year/body_wrapper","core/com/zoho/crm/api/notes/success_response","core/com/zoho/crm/api/scoring_rules/layout_request_wrapper","core/com/zoho/crm/api/deal_contact_roles/data","core/com/zoho/crm/api/email_sharing/get_email_sharing","core/com/zoho/crm/api/email_templates/api_exception","core/com/zoho/crm/api/blueprint/module","core/com/zoho/crm/api/associate_email/api_exception","core/com/zoho/crm/api/contact_roles/success_response","core/com/zoho/crm/api/email_related_records/linked_record","core/com/zoho/crm/api/user_groups/resource","core/com/zoho/crm/api/associate_email/module_map","core/com/zoho/crm/api/blueprint/api_exception","core/com/zoho/crm/api/record/mass_update","core/com/zoho/crm/api/roles/body_wrapper","core/com/zoho/crm/api/notifications/event","core/com/zoho/crm/api/portal_user_type/user_type","core/com/zoho/crm/api/fields/auto_number","core/com/zoho/crm/api/users_unavailability/info","core/com/zoho/crm/api/email_templates/info","core/com/zoho/crm/api/timelines/field_history","core/com/zoho/crm/api/cancel_meetings/api_exception","core/com/zoho/crm/api/pipeline/api_exception","core/com/zoho/crm/api/related_lists/field","core/com/zoho/crm/api/change_owner/body_wrapper","core/com/zoho/crm/api/email_compose_meta/default_form","core/com/zoho/crm/api/fields/minified_field","core/com/zoho/crm/api/tags/record_action_wrapper","core/com/zoho/crm/api/query/body_wrapper","core/com/zoho/crm/api/scoring_rules/field","core/com/zoho/crm/api/users/associated_group","core/com/zoho/crm/api/bulk_write/request_wrapper","core/com/zoho/crm/api/share_records/share_record","core/com/zoho/crm/api/pipeline/transfer_pipeline_success_response","core/com/zoho/crm/api/send_mail/attachment","core/com/zoho/crm/api/users_territories/api_exception","core/com/zoho/crm/api/bulk_read/file_body_wrapper","core/com/zoho/crm/api/email_sharing/response_wrapper","core/com/zoho/crm/api/mass_delete_cvid/territory","core/com/zoho/crm/api/modules/minified_module","core/com/zoho/crm/api/notifications/notification","core/com/zoho/crm/api/modules/lookup_field_properties","core/com/zoho/crm/api/mass_delete_cvid/status","core/com/zoho/crm/api/taxes/response_wrapper","core/com/zoho/crm/api/shift_hours/shift_count","core/com/zoho/crm/api/service_preference/success_response","core/com/zoho/crm/api/hipaa_compliance/modules","core/com/zoho/crm/api/fields/body_wrapper","core/com/zoho/crm/api/record/info","core/com/zoho/crm/api/reschedule_history/response_wrapper","core/com/zoho/crm/api/record/record","core/com/zoho/crm/api/record/remind_at","core/com/zoho/crm/api/mail_merge/action_wrapper","core/com/zoho/crm/api/notes/note","core/com/zoho/crm/api/entity_scores/api_exception","core/com/zoho/crm/api/blueprint/module_mapping","core/com/zoho/crm/api/email_compose_meta/from_address","core/com/zoho/crm/api/record/mass_update_success_response","core/com/zoho/crm/api/scoring_rules/signal","core/com/zoho/crm/api/taxes/api_exception","core/com/zoho/crm/api/wizards/exempted_portal_user_type","core/com/zoho/crm/api/share_records/success_response","core/com/zoho/crm/api/portal_user_type/views","core/com/zoho/crm/api/wizards/connection","core/com/zoho/crm/api/portal_invite/api_exception","core/com/zoho/crm/api/pipeline/maps","core/com/zoho/crm/api/taxes/expected_field","core/com/zoho/crm/api/holidays/holidays","core/com/zoho/crm/api/portal_user_type/filters","core/com/zoho/crm/api/users/error_details","core/com/zoho/crm/api/service_preference/action_wrapper","core/com/zoho/crm/api/pipeline/transfer_pipeline","core/com/zoho/crm/api/taxes/preference","core/com/zoho/crm/api/tags/existing_tag","core/com/zoho/crm/api/user_groups/sources_count_wrapper","core/com/zoho/crm/api/org/resource","core/com/zoho/crm/api/backup/history","core/com/zoho/crm/api/mail_merge/download_mail_merge","core/com/zoho/crm/api/appointment_preference/response_wrapper","core/com/zoho/crm/api/related_records/file_body_wrapper","core/com/zoho/crm/api/record/comment","core/com/zoho/crm/api/associate_email/linked_record","core/com/zoho/crm/api/variables/success_response","core/com/zoho/crm/api/backup/action_wrapper","core/com/zoho/crm/api/holidays/response_wrapper","core/com/zoho/crm/api/tags/merge_wrapper","core/com/zoho/crm/api/org/success_response","core/com/zoho/crm/api/bulk_write/api_exception","core/com/zoho/crm/api/layouts/tooltip","core/com/zoho/crm/api/territories/reporting_to","core/com/zoho/crm/api/email_sharing/share_from_user","core/com/zoho/crm/api/portal_invite/portal","core/com/zoho/crm/api/fields/convert_mapping","core/com/zoho/crm/api/mass_delete_cvid/api_exception","core/com/zoho/crm/api/backup/success_response","core/com/zoho/crm/api/contact_roles/body_wrapper","core/com/zoho/crm/api/service_preference/service_preference","core/com/zoho/crm/api/profiles/category_others","core/com/zoho/crm/api/pipeline/forecast_category","core/com/zoho/crm/api/field_map_dependency/pick_list_mapping","core/com/zoho/crm/api/territory_users/response_wrapper","core/com/zoho/crm/api/related_records/api_exception","core/com/zoho/crm/api/fields/view_type","core/com/zoho/crm/api/backup/body_wrapper","core/com/zoho/crm/api/entity_scores/response_wrapper","core/com/zoho/crm/api/portal_invite/response_wrapper","core/com/zoho/crm/api/blueprint/auto_number","core/com/zoho/crm/api/layouts/profiles","core/com/zoho/crm/api/layouts/section_subform_field","core/com/zoho/crm/api/scoring_rules/api_exception","core/com/zoho/crm/api/wizards/chart_data","core/com/zoho/crm/api/users/minified_user","core/com/zoho/crm/api/scoring_rules/role_request_wrapper","core/com/zoho/crm/api/currencies/format","core/com/zoho/crm/api/contact_roles/contact_role","core/com/zoho/crm/api/email_related_records/module","core/com/zoho/crm/api/users/success_response","core/com/zoho/crm/api/entity_scores/entity_structure_with_module","core/com/zoho/crm/api/notifications/response_wrapper","core/com/zoho/crm/api/pipeline/stages","core/com/zoho/crm/api/from_addresses/api_exception","core/com/zoho/crm/api/change_owner/owner","core/com/zoho/crm/api/mass_convert/status","core/com/zoho/crm/api/hipaa_compliance/success_response","core/com/zoho/crm/api/mass_change_owner/api_exception","core/com/zoho/crm/api/portal_invite/portal_invite","core/com/zoho/crm/api/privacy_preference/tpt","core/com/zoho/crm/api/mass_delete_cvid/response_wrapper","core/com/zoho/crm/api/hipaa_compliance/action_wrapper","core/com/zoho/crm/api/users_transfer_delete/move_subordinate","core/com/zoho/crm/api/users_unavailability/api_exception","core/com/zoho/crm/api/fields/hipaa_compliance","core/com/zoho/crm/api/cancel_meetings/notify","core/com/zoho/crm/api/scoring_rules/info","core/com/zoho/crm/api/bulk_write/bulk_write_response","core/com/zoho/crm/api/user_groups/association_response","core/com/zoho/crm/api/users_territories/action_wrapper","core/com/zoho/crm/api/currencies/currency","core/com/zoho/crm/api/scoring_rules/signal_rule","core/com/zoho/crm/api/blueprint/tool_tip","core/com/zoho/crm/api/org/license_details","core/com/zoho/crm/api/roles/action_wrapper","core/com/zoho/crm/api/users/body_wrapper","core/com/zoho/crm/api/record/deleted_records_wrapper","core/com/zoho/crm/api/fields/multiselectlookup","core/com/zoho/crm/api/modules/body_wrapper","core/com/zoho/crm/api/shift_hours/shift_custom_timing","core/com/zoho/crm/api/custom_views/criteria","core/com/zoho/crm/api/privacy_preference/privacy_preference","core/com/zoho/crm/api/holidays/shift_holiday","core/com/zoho/crm/api/scoring_rules/field_rule","core/com/zoho/crm/api/attachments/owner","core/com/zoho/crm/api/users_transfer_delete/status","core/com/zoho/crm/api/pipeline/delete","core/com/zoho/crm/api/layouts/minified_layout","core/com/zoho/crm/api/roles/success_response","core/com/zoho/crm/api/mail_merge/mail_merge","core/com/zoho/crm/api/custom_views/field","core/com/zoho/crm/api/modules/sharing_properties","core/com/zoho/crm/api/users_unavailability/users_unavailability","core/com/zoho/crm/api/assignment_rules/success_response","core/com/zoho/crm/api/blueprint/association_details","core/com/zoho/crm/api/hipaa_compliance/response_wrapper","core/com/zoho/crm/api/associate_email/from","core/com/zoho/crm/api/portal_user_type/layouts","core/com/zoho/crm/api/timelines/api_exception","core/com/zoho/crm/api/fields/currency","core/com/zoho/crm/api/email_related_records/email","core/com/zoho/crm/api/field_map_dependency/body_wrapper","core/com/zoho/crm/api/share_records/action_wrapper","core/com/zoho/crm/api/send_mail/data","core/com/zoho/crm/api/users_territories/transfer_action_wrapper","core/com/zoho/crm/api/wizards/portal_user_type","core/com/zoho/crm/api/layouts/sections","core/com/zoho/crm/api/profiles/profile_wrapper","core/com/zoho/crm/api/record/success_response","core/com/zoho/crm/api/deal_contact_roles/api_exception","core/com/zoho/crm/api/currencies/action_wrapper","core/com/zoho/crm/api/notes/info","core/com/zoho/crm/api/fiscal_year/year","core/com/zoho/crm/api/user_groups/success_response","core/com/zoho/crm/api/modules/response_wrapper","core/com/zoho/crm/api/user_groups/owner","core/com/zoho/crm/api/currencies/disable_success","core/com/zoho/crm/api/fields/association_details","core/com/zoho/crm/api/field_map_dependency/api_exception","core/com/zoho/crm/api/field_map_dependency/success_response","core/com/zoho/crm/api/bulk_write/default_value","core/com/zoho/crm/api/related_records/action_wrapper","core/com/zoho/crm/api/territories/minified_territory","core/com/zoho/crm/api/org/org","core/com/zoho/crm/api/profiles/api_exception","core/com/zoho/crm/api/available_currencies/currency","core/com/zoho/crm/api/mail_merge/sign_mail_merge_wrapper","core/com/zoho/crm/api/blueprint/view_type","core/com/zoho/crm/api/mass_change_owner/owner","core/com/zoho/crm/api/record/line_item_product","core/com/zoho/crm/api/wizards/criteria","core/com/zoho/crm/api/attachments/file_body_wrapper","core/com/zoho/crm/api/modules/related_list_properties","core/com/zoho/crm/api/tags/body_wrapper","core/com/zoho/crm/api/mass_convert/portal_user_type","core/com/zoho/crm/api/wizards/transition","core/com/zoho/crm/api/mass_change_owner/body_wrapper","core/com/zoho/crm/api/record/body_wrapper","core/com/zoho/crm/api/shift_hours/action_wrapper","core/com/zoho/crm/api/org/feature","core/com/zoho/crm/api/privacy_preference/section","core/com/zoho/crm/api/fields/file_upolad_option","core/com/zoho/crm/api/field_map_dependency/parent","core/com/zoho/crm/api/send_mail/invalid_details","core/com/zoho/crm/api/users/users","core/com/zoho/crm/api/modules/territory","core/com/zoho/crm/api/inventory_templates/folder","core/com/zoho/crm/api/territories/deleted_associated_wrapper","core/com/zoho/crm/api/users_territories/bulk_validation","core/com/zoho/crm/api/variables/error_details","core/com/zoho/crm/api/pipeline/transfer_pipeline_action_wrapper","core/com/zoho/crm/api/users_territories/transfer_and_delink","core/com/zoho/crm/api/holidays/success_response","core/com/zoho/crm/api/portals_meta/filters","core/com/zoho/crm/api/bulk_read/response_wrapper","core/com/zoho/crm/api/mass_delete_cvid/cvid_body_wrapper","core/com/zoho/crm/api/users_territories/transfer_wrapper","core/com/zoho/crm/api/territories/associated_users_count_wrapper","core/com/zoho/crm/api/record/mass_update_body_wrapper","core/com/zoho/crm/api/users_unavailability/success_response","core/com/zoho/crm/api/territories/criteria","core/com/zoho/crm/api/record/mass_update_action_wrapper","core/com/zoho/crm/api/blueprint/body_wrapper","core/com/zoho/crm/api/bulk_write/file","core/com/zoho/crm/api/privacy_preference/option","core/com/zoho/crm/api/associate_email/to","core/com/zoho/crm/api/hipaa_compliance/hipaa_compliance","core/com/zoho/crm/api/layouts/section_field","core/com/zoho/crm/api/related_records/success_response","core/com/zoho/crm/api/modules/api_exception","core/com/zoho/crm/api/modules/modules","core/com/zoho/crm/api/record/multi_select_picklist","core/com/zoho/crm/api/mass_change_owner/success_response","core/com/zoho/crm/api/portals_meta/views","core/com/zoho/crm/api/share_records/api_exception","core/com/zoho/crm/api/portals_meta/modules","core/com/zoho/crm/api/fiscal_year/success_response","core/com/zoho/crm/api/backup/api_exception","core/com/zoho/crm/api/mass_convert/error_details","core/com/zoho/crm/api/org/api_exception","core/com/zoho/crm/api/wizards/screen","core/com/zoho/crm/api/contact_roles/action_wrapper","core/com/zoho/crm/api/portals_meta/wrapper","core/com/zoho/crm/api/tags/record_detail_tag","core/com/zoho/crm/api/email_related_records/status","core/com/zoho/crm/api/holidays/action_wrapper","core/com/zoho/crm/api/territories/manager","core/com/zoho/crm/api/modules/lookup_field","core/com/zoho/crm/api/custom_views/pin_unpin_fields","core/com/zoho/crm/api/portals/action_wrapper","core/com/zoho/crm/api/email_compose_meta/user","core/com/zoho/crm/api/bulk_read/criteria","core/com/zoho/crm/api/pipeline/pipeline","core/com/zoho/crm/api/timelines/response_wrapper","core/com/zoho/crm/api/blueprint/formula","core/com/zoho/crm/api/fields/external","core/com/zoho/crm/api/org/checkin_preferences","core/com/zoho/crm/api/user_type_users/api_exception","core/com/zoho/crm/api/service_preference/response_wrapper","core/com/zoho/crm/api/territories/body_wrapper","core/com/zoho/crm/api/fields/forecast_category","core/com/zoho/crm/api/pipeline/action_wrapper","core/com/zoho/crm/api/layouts/properties","core/com/zoho/crm/api/available_currencies/api_exception","core/com/zoho/crm/api/share_records/body_wrapper","core/com/zoho/crm/api/entity_scores/module_structure","core/com/zoho/crm/api/from_addresses/address","core/com/zoho/crm/api/pipeline/success_response","core/com/zoho/crm/api/fields/multi_module_lookup","core/com/zoho/crm/api/territories/action_wrapper","core/com/zoho/crm/api/bulk_write/resource","core/com/zoho/crm/api/users_transfer_delete/transfer","core/com/zoho/crm/api/notifications/info","core/com/zoho/crm/api/notifications/body_wrapper","core/com/zoho/crm/api/users_territories/validation_wrapper","core/com/zoho/crm/api/modules/module_fields","core/com/zoho/crm/api/users_territories/success_response","core/com/zoho/crm/api/field_map_dependency/map_dependency","core/com/zoho/crm/api/currencies/base_currency_action_wrapper","core/com/zoho/crm/api/send_mail/to","core/com/zoho/crm/api/attachments/api_exception","core/com/zoho/crm/api/field_attachments/api_exception","core/com/zoho/crm/api/change_owner/action_wrapper","core/com/zoho/crm/api/variables/variable","core/com/zoho/crm/api/entity_scores/entity_structure","core/com/zoho/crm/api/fields/success","core/com/zoho/crm/api/share_records/module","core/com/zoho/crm/api/fields/private","core/com/zoho/crm/api/user_groups/groups","core/com/zoho/crm/api/territory_users/success_response","core/com/zoho/crm/api/scoring_rules/response_wrapper","core/com/zoho/crm/api/appointment_preference/action_wrapper","core/com/zoho/crm/api/mass_convert/convert","core/com/zoho/crm/api/bulk_write/file_body_wrapper","core/com/zoho/crm/api/holidays/info","core/com/zoho/crm/api/field_map_dependency/sub_module","core/com/zoho/crm/api/fields/rollup_summary","core/com/zoho/crm/api/attachments/parent_id","core/com/zoho/crm/api/mail_merge/mail_merge_wrapper","core/com/zoho/crm/api/holidays/business_holiday","core/com/zoho/crm/api/user_groups/jobs_wrapper","core/com/zoho/crm/api/associate_email/record","core/com/zoho/crm/api/profiles/profile","core/com/zoho/crm/api/territories/field","core/com/zoho/crm/api/portal_user_type/fields","core/com/zoho/crm/api/field_map_dependency/picklist_map","core/com/zoho/crm/api/shift_hours/mandatory_details","core/com/zoho/crm/api/bulk_read/query","core/com/zoho/crm/api/custom_views/fields","core/com/zoho/crm/api/files/file_body_wrapper","core/com/zoho/crm/api/users/shift","core/com/zoho/crm/api/record/wizard","core/com/zoho/crm/api/send_mail/api_exception","core/com/zoho/crm/api/wizards/field","core/com/zoho/crm/api/blueprint/blue_print","core/com/zoho/crm/api/definition/definition","core/com/zoho/crm/api/territories/territories","core/com/zoho/crm/api/notifications/action_wrapper","core/com/zoho/crm/api/user_groups/sources","core/com/zoho/crm/api/share_records/dependee","core/com/zoho/crm/api/mass_delete_cvid/action_wrapper","core/com/zoho/crm/api/email_compose_meta/compose_settings","core/com/zoho/crm/api/currencies/body_wrapper","core/com/zoho/crm/api/record/pricing_details","core/com/zoho/crm/api/business_hours/action_wrapper","core/com/zoho/crm/api/territory_users/action_wrapper","core/com/zoho/crm/api/record/image_upload"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/picklist_map":{"displayValue":{"name":"display_value","type":"String"},"actualValue":{"name":"actual_value","type":"String"},"id":{"name":"id","type":"Long"},"delete1":{"name":"_delete","type":"Boolean"}},"core/com/zoho/crm/api/portal_invite/portal":{"userTypeId":{"name":"user_type_id","type":"Long"},"language":{"values":["en_US","en_GB","bg_BG","zh_CN","zh_TW","hr_HR","ar_EG","in_ID","cs_CZ","da_DK","nl_NL","fr_FR","de_DE","hu_HU","","hi_IN","it_IT","ja_JP","pl_PL","pt_BR","pt_PT","ru_RU","es_ES","sv_SE","th_TH","tr_TR","vi_VN","ko_KR","iw_IL"],"name":"language","type":"utils/util/choice"},"id":{"name":"id","type":"Long"},"type":{"values":["invite","reinvite"],"name":"type","type":"utils/util/choice"}},"core/com/zoho/crm/api/scoring_rules/api_exception":{"code":{"values":["INVALID_DATA","INVALID_URL_PATTERN","EXPECTED_FIELD_MISSING","MANDATORY_NOT_FOUND","LIMIT_EXCEEDED","REQUIRED_PARAM_MISSING","DUPLICATE_DATA","ALREADY_SCHEDULED","INVALID_MODULE","INVALID_TOKEN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param_name","type":"String"},{"name":"expected_fields","type":"List"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"limit","type":"Integer"},{"name":"maximum_length","type":"Integer"},{"name":"param","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["invalid data","the module name given seems to be invalid"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/org/hierarchy_preferences":{"strictlyReporting":{"name":"strictly_reporting","type":"Boolean"},"type":{"values":["Reporting_To_Hierarchy","Role_Hierarchy"],"name":"type","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/get_field_param":{"include":{"values":["allowed_permissions_to_update"],"name":"include","type":"String"},"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/territories/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fiscal_year/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"allowed_values","type":"List"}],"name":"details","type":"Map"},"message":{"values":["required field not found","Please give a valid month","Please give a valid value"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fiscal_year/response_wrapper":{"fiscalYear":{"structure_name":"core/com/zoho/crm/api/fiscal_year/year","name":"fiscal_year","type":"core/com/zoho/crm/api/fiscal_year/year"}},"core/com/zoho/crm/api/entity_scores/entity_structure":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/notes/note":{"owner":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Owner","type":"core/com/zoho/crm/api/users/minified_user"},"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"noteTitle":{"name":"Note_Title","type":"String"},"noteContent":{"name":"Note_Content","type":"String"},"attachments":{"structure_name":"core/com/zoho/crm/api/attachments/attachment","name":"$attachments","type":"List"},"voiceNote":{"name":"$voice_note","type":"Boolean"},"editable":{"name":"$editable","type":"Boolean"},"isSharedToClient":{"name":"$is_shared_to_client","type":"Boolean"},"sharingPermission":{"name":"$sharing_permission","type":"String"},"parentId":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Parent_Id","type":"core/com/zoho/crm/api/record/record"},"seModule":{"values":["Leads"],"name":"$se_module","type":"utils/util/choice"},"size":{"name":"$size","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"state":{"name":"$state","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/timelines/module":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/entity_scores/response_handler":{"classes":["core/com/zoho/crm/api/entity_scores/api_exception","core/com/zoho/crm/api/entity_scores/response_wrapper"],"interface":true},"core/com/zoho/crm/api/fields/unique":{"casesensitive":{"name":"casesensitive","type":"String"}},"core/com/zoho/crm/api/share_records/dependee":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/layouts/response_wrapper":{"layouts":{"structure_name":"core/com/zoho/crm/api/layouts/layouts","name":"layouts","type":"List"}},"core/com/zoho/crm/api/tags/api_exception":{"code":{"values":["INVALID_DATA","REQUIRED_PARAM_MISSING","MANDATORY_NOT_FOUND","INVALID_MODULE","DUPLICATE_DATA","TAG_ID_NOT_FOUND","FAILURE","NO_PERMISSION","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","LICENSE_LIMIT_EXCEEDED","INVALID_REQUEST","EXPECTED_FIELD_MISSING","NOT_ALLOWED","BAD_REQUEST","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"structure_name":"core/com/zoho/crm/api/tags/error_details","name":"expected_fields","type":"List"},{"name":"param_name","type":"String"},{"structure_name":"core/com/zoho/crm/api/tags/associated_places","name":"associated_places","type":"List"},{"name":"id","type":"String"},{"name":"param","type":"String"},{"name":"permissions","type":"List"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["invalid data","tags not found","required field not found","special characters found in the given name","One of the expected parameter is missing","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","record not deleted","the related id given seems to be invalid","The relation name given seems to be invalid","duplicate data","tag edition limit exceeded","tags not updated successfully","the module name given seems to be invalid","unable to process your request. please verify whether you have entered proper method name"," parameter and parameter values."],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/send_mail/inventory_template":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/pipeline/d_pipeline_wrapper":{"pipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/d_pipeline","name":"pipeline","type":"List"}},"core/com/zoho/crm/api/holidays/body_wrapper":{"classes":["core/com/zoho/crm/api/holidays/create_business_holiday","core/com/zoho/crm/api/holidays/create_shift_holiday"],"interface":true},"core/com/zoho/crm/api/blueprint/response_handler":{"classes":["core/com/zoho/crm/api/blueprint/response_wrapper","core/com/zoho/crm/api/blueprint/api_exception"],"interface":true},"core/com/zoho/crm/api/email_templates/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/change_owner/action_response":{"classes":["core/com/zoho/crm/api/change_owner/api_exception","core/com/zoho/crm/api/change_owner/success_response"],"interface":true},"core/com/zoho/crm/api/fields/action_wrapper":{"fields":{"structure_name":"core/com/zoho/crm/api/fields/action_response","name":"fields","type":"List"}},"core/com/zoho/crm/api/download_inline_images/get_download_inline_images_param":{"messageId":{"name":"message_id","type":"String","required":true},"id":{"name":"id","type":"String","required":true},"userId":{"name":"user_id","type":"Long","required":true}},"core/com/zoho/crm/api/shift_hours/get_shift_hour_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/shift_hours/update_shift_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/attachments/delete_attachments_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/pipeline/pipeline":{"displayValue":{"name":"display_value","max-length":120,"type":"String"},"parent":{"structure_name":"core/com/zoho/crm/api/pipeline/pipeline","name":"parent","type":"core/com/zoho/crm/api/pipeline/pipeline"},"maps":{"structure_name":"core/com/zoho/crm/api/pipeline/maps","name":"maps","type":"List"},"default1":{"name":"default","type":"Boolean"},"childAvailable":{"name":"child_available","type":"Boolean"},"actualValue":{"name":"actual_value","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mass_convert/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/currencies/base_currency_wrapper":{"baseCurrency":{"structure_name":"core/com/zoho/crm/api/currencies/base_currency","name":"base_currency","type":"core/com/zoho/crm/api/currencies/base_currency"}},"core/com/zoho/crm/api/user_groups/users":{"inactive":{"name":"inactive","type":"Integer"},"deleted":{"name":"deleted","type":"Integer"},"active":{"name":"active","type":"Integer"}},"core/com/zoho/crm/api/cancel_meetings/notify":{"sendCancellingMail":{"name":"send_cancelling_mail","type":"Boolean"}},"core/com/zoho/crm/api/cancel_meetings/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/cancel_meetings/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/related_records/action_handler":{"classes":["core/com/zoho/crm/api/related_records/api_exception","core/com/zoho/crm/api/related_records/action_wrapper"],"interface":true},"core/com/zoho/crm/api/fiscal_year/action_wrapper":{"fiscalYear":{"structure_name":"core/com/zoho/crm/api/fiscal_year/action_response","name":"fiscal_year","interface":true,"type":"core/com/zoho/crm/api/fiscal_year/action_response"}},"core/com/zoho/crm/api/territories/get_child_territory_param":{"filters":{"name":"filters","type":"String"}},"core/com/zoho/crm/api/holidays/shift_holiday":{"date":{"name":"date","type":"Date"},"name":{"name":"name","max-length":80,"type":"String"},"type":{"values":["shift_holiday"],"name":"type","type":"utils/util/choice"},"shiftHour":{"structure_name":"core/com/zoho/crm/api/holidays/shift_hour","name":"shift_hour","type":"core/com/zoho/crm/api/holidays/shift_hour"}},"core/com/zoho/crm/api/fiscal_year/year":{"startMonth":{"values":["January","February","March","April","May","June","July","August","September","October","November","December"],"name":"start_month","type":"utils/util/choice"},"displayBasedOn":{"values":["end_month","start_month"],"name":"display_based_on","type":"utils/util/choice"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/wizards/chart_data":{"canvasWidth":{"name":"canvas_width","type":"Integer"},"nodes":{"structure_name":"core/com/zoho/crm/api/wizards/node","name":"nodes","type":"List"},"colorPalette":{"structure_name":"core/com/zoho/crm/api/wizards/button_background","name":"color_palette","type":"core/com/zoho/crm/api/wizards/button_background"},"connections":{"structure_name":"core/com/zoho/crm/api/wizards/connection","name":"connections","type":"List"},"canvasHeight":{"name":"canvas_height","type":"Integer"}},"core/com/zoho/crm/api/fields/expression":{"criteria":{"structure_name":"core/com/zoho/crm/api/fields/rollup_criteria","name":"criteria","type":"core/com/zoho/crm/api/fields/rollup_criteria"},"function1":{"name":"function","type":"String"},"functionParameters":{"structure_name":"core/com/zoho/crm/api/fields/function_parameter","name":"function_parameters","type":"List"}},"core/com/zoho/crm/api/blueprint/association_details":{"lookupField":{"structure_name":"core/com/zoho/crm/api/blueprint/lookup_field","name":"lookup_field","type":"core/com/zoho/crm/api/blueprint/lookup_field"},"relatedField":{"structure_name":"core/com/zoho/crm/api/blueprint/lookup_field","name":"related_field","type":"core/com/zoho/crm/api/blueprint/lookup_field"}},"core/com/zoho/crm/api/custom_views/action_response":{"classes":["core/com/zoho/crm/api/custom_views/api_exception","core/com/zoho/crm/api/custom_views/success_response"],"interface":true},"core/com/zoho/crm/api/attachments/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/bulk_read/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/bulk_read/action_response","name":"data","type":"List"},"info":{"name":"info","type":"Map"}},"core/com/zoho/crm/api/scoring_rules/layout_request_wrapper":{"layout":{"structure_name":"core/com/zoho/crm/api/scoring_rules/layout","name":"layout","type":"core/com/zoho/crm/api/scoring_rules/layout"}},"core/com/zoho/crm/api/pipeline/t_pipeline":{"from":{"name":"from","type":"Long"},"to":{"name":"to","type":"Long"}},"core/com/zoho/crm/api/field_map_dependency/response_handler":{"classes":["core/com/zoho/crm/api/field_map_dependency/body_wrapper","core/com/zoho/crm/api/field_map_dependency/api_exception"],"interface":true},"core/com/zoho/crm/api/blueprint/profile":{"permissionType":{"name":"permission_type","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users_territories/response_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/users_territories/territory","name":"territories","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/users_territories/info","name":"info","type":"core/com/zoho/crm/api/users_territories/info"}},"core/com/zoho/crm/api/assignment_rules/get_assignment_rule_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/from_addresses/response_handler":{"classes":["core/com/zoho/crm/api/from_addresses/response_wrapper","core/com/zoho/crm/api/from_addresses/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/response_handler":{"classes":["core/com/zoho/crm/api/users_territories/response_wrapper","core/com/zoho/crm/api/users_territories/api_exception"],"interface":true},"core/com/zoho/crm/api/record/mass_update_action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/mass_update_action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/layouts/profiles":{"defaultassignmentview":{"structure_name":"core/com/zoho/crm/api/layouts/default_assignment_view","name":"_default_assignment_view","type":"core/com/zoho/crm/api/layouts/default_assignment_view"},"defaultview":{"structure_name":"core/com/zoho/crm/api/layouts/default_view","name":"_default_view","type":"core/com/zoho/crm/api/layouts/default_view"},"default1":{"name":"default","type":"Boolean"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users_transfer_delete/transfer":{"records":{"name":"records","type":"Boolean"},"assignment":{"name":"assignment","type":"Boolean"},"criteria":{"name":"criteria","type":"Boolean"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/notes/delete_notes_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/mass_convert/status":{"failedCount":{"name":"Failed_Count","type":"Integer"},"convertedCount":{"name":"Converted_Count","type":"Integer"},"totalCount":{"name":"Total_Count","type":"Integer"},"notConvertedCount":{"name":"Not_Converted_Count","type":"Integer"},"status":{"name":"Status","type":"String"}},"core/com/zoho/crm/api/user_groups/jobs_wrapper":{"deletionJobs":{"structure_name":"core/com/zoho/crm/api/user_groups/jobs","name":"deletion_jobs","type":"List"}},"core/com/zoho/crm/api/layouts/get_layout_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/pipeline/delete":{"permanent":{"name":"permanent","type":"Boolean"}},"core/com/zoho/crm/api/users_transfer_delete/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"jobId","type":"String"}],"name":"details","type":"Map"},"message":{"values":["User added","User updated","User deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_user_type/views":{"displayLabel":{"name":"display_label","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/mass_change_owner/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"values":["cvid"],"name":"api_name","type":"utils/util/choice"},{"name":"expected_data_type","type":"String"},{"name":"json_path","type":"String"}],"name":"details","type":"Map"},"message":{"values":["the cvid given seems to be invalid","required field not found"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/email_compose_meta/features_available":{"emailCloudPicker":{"values":[true],"name":"EMAIL_CLOUD_PICKER","type":"utils/util/choice"},"formIntegrationEnabled":{"values":[true],"name":"form_integration_enabled","type":"utils/util/choice"},"islivedeskenabled":{"values":[true],"name":"isLiveDeskEnabled","type":"utils/util/choice"},"subjectLineSuggestion":{"name":"subject_line_suggestion","type":"Boolean"},"inlineComposeWindow":{"values":[true],"name":"inline_compose_window","type":"utils/util/choice"},"bestTimeToContact":{"values":[true],"name":"best_time_to_contact","type":"utils/util/choice"},"zsurveyEnabled":{"values":[true],"name":"zsurvey_enabled","type":"utils/util/choice"},"oldComposeRevert":{"name":"OLD_COMPOSE_REVERT","type":"Boolean"},"mandateunsublink":{"name":"mandateUnsubLink","type":"Boolean"},"scheduleMail":{"values":[true],"name":"Schedule_Mail","type":"utils/util/choice"},"unsubscribeLink":{"values":[true],"name":"UNSUBSCRIBE_LINK","type":"utils/util/choice"},"attachment":{"name":"ATTACHMENT","type":"Boolean"},"isprivacyenabled":{"values":[true],"name":"isPrivacyEnabled","type":"utils/util/choice"},"autoSuggestion":{"values":[true],"name":"auto_suggestion","type":"utils/util/choice"},"emailPreference":{"name":"EMAIL_PREFERENCE","type":"Boolean"},"attachTeamdrive":{"values":[true],"name":"attach_teamdrive","type":"utils/util/choice"}},"core/com/zoho/crm/api/users/minified_user":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/profiles/profile_wrapper":{"profiles":{"structure_name":"core/com/zoho/crm/api/profiles/profile","name":"profiles","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/profiles/info","name":"info","type":"core/com/zoho/crm/api/profiles/info"}},"core/com/zoho/crm/api/email_sharing/get_email_sharing":{"availableTypes":{"name":"available_types","type":"List"},"shareFromUsers":{"structure_name":"core/com/zoho/crm/api/email_sharing/share_from_user","name":"share_from_users","type":"List"}},"core/com/zoho/crm/api/fields/pick_list_value":{"displayValue":{"name":"display_value","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"maps":{"structure_name":"core/com/zoho/crm/api/fields/maps","name":"maps","type":"List"},"probability":{"name":"probability","type":"Integer"},"forecastCategory":{"structure_name":"core/com/zoho/crm/api/fields/forecast_category","name":"forecast_category","type":"core/com/zoho/crm/api/fields/forecast_category"},"actualValue":{"name":"actual_value","type":"String"},"sysRefName":{"name":"sys_ref_name","type":"String"},"expectedDataType":{"name":"expected_data_type","type":"String"},"colourCode":{"name":"colour_code","type":"String"},"forecastType":{"name":"forecast_type","type":"String"},"id":{"name":"id","type":"Long"},"type":{"values":["used","unused"],"name":"type","type":"utils/util/choice"}},"core/com/zoho/crm/api/roles/action_response":{"classes":["core/com/zoho/crm/api/roles/api_exception","core/com/zoho/crm/api/roles/success_response"],"interface":true},"core/com/zoho/crm/api/change_owner/related_modules":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/line_item_product":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"productCode":{"name":"Product_Code","type":"String"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"Created_Time","type":"DateTime"},"currency":{"name":"Currency","type":"String"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"}},"core/com/zoho/crm/api/territories/action_response":{"classes":["core/com/zoho/crm/api/territories/api_exception","core/com/zoho/crm/api/territories/success_response"],"interface":true},"core/com/zoho/crm/api/fields/refer_from_field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/reminder":{"period":{"name":"period","type":"String"},"unit":{"name":"unit","type":"Integer"},"time":{"name":"time","type":"String"}},"core/com/zoho/crm/api/business_hours/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","INVALID_DATA","INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"},{"name":"regex","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["required field not found"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/templates/wrapper":{"templates":{"structure_name":"core/com/zoho/crm/api/templates/templates","name":"templates","type":"List"}},"core/com/zoho/crm/api/cancel_meetings/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/business_hours/action_wrapper":{"businessHours":{"structure_name":"core/com/zoho/crm/api/business_hours/action_response","name":"business_hours","interface":true,"type":"core/com/zoho/crm/api/business_hours/action_response"}},"core/com/zoho/crm/api/profiles/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","LICENSE_LIMIT_EXCEEDED","INVALID_DATA","DUPLICATE_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"values":[25],"name":"limit","type":"utils/util/choice"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["duplicate data"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/tags/tag":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"colorCode":{"values":["#1DB9B4","#57B1FD","#63C57E","#F48435","#A8C026"],"name":"color_code","type":"utils/util/choice"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portal_user_type/layouts":{"displayLabel":{"name":"display_label","type":"String"},"defaultview":{"structure_name":"core/com/zoho/crm/api/portal_user_type/views","name":"_default_view","type":"core/com/zoho/crm/api/portal_user_type/views"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/field_map_dependency/body_wrapper":{"mapDependency":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/map_dependency","name":"map_dependency","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/info","name":"info","type":"core/com/zoho/crm/api/field_map_dependency/info"}},"core/com/zoho/crm/api/pipeline/regex_details":{"apiName":{"name":"api_name","type":"String"},"regex":{"name":"regex","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/bulk_read/call_back":{"method":{"values":["post"],"name":"method","type":"utils/util/choice"},"url":{"name":"url","type":"String"}},"core/com/zoho/crm/api/fields/private":{"export1":{"name":"export","type":"Boolean"},"restricted":{"name":"restricted","type":"Boolean"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/record/carry_over_tags":{"deals":{"name":"Deals","type":"List"},"accounts":{"name":"Accounts","type":"List"},"contacts":{"name":"Contacts","type":"List"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline_action_wrapper":{"transferPipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/transfer_pipeline_action_response","name":"transfer_pipeline","type":"List"}},"core/com/zoho/crm/api/related_records/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/related_records/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/record/multi_select_picklist":{"fieldname":{"name":"fieldName","type":"Map"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users/get_users_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/assignment_rules/created_by":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"email":{"name":"email","type":"String"},"zuid":{"name":"zuid","type":"String"}},"core/com/zoho/crm/api/timelines/state":{"isLastState":{"name":"is_last_state","type":"Boolean"},"name":{"name":"name","type":"String"},"triggerType":{"name":"trigger_type","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mail_merge/sign_action_wrapper":{"signMailMerge":{"structure_name":"core/com/zoho/crm/api/mail_merge/sign_action_response","name":"sign_mail_merge","type":"List"}},"core/com/zoho/crm/api/layouts/api_exception":{"code":{"values":["InvalidModule","REQUIRED_PARAM_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/custom_views/custom_view":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"criteria":{"structure_name":"core/com/zoho/crm/api/custom_views/criteria","name":"criteria","type":"core/com/zoho/crm/api/custom_views/criteria"},"module":{"structure_name":"core/com/zoho/crm/api/custom_views/owner","name":"module","type":"core/com/zoho/crm/api/custom_views/owner"},"sharedTo":{"structure_name":"core/com/zoho/crm/api/custom_views/shared_to","name":"shared_to","type":"List"},"displayValue":{"name":"display_value","type":"String"},"lastAccessedTime":{"name":"last_accessed_time","type":"DateTime"},"accessType":{"values":["public","only_to_me","shared"],"name":"access_type","type":"utils/util/choice"},"offline":{"name":"offline","type":"Boolean"},"systemName":{"name":"system_name","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/custom_views/owner","name":"created_by","type":"core/com/zoho/crm/api/custom_views/owner"},"default1":{"name":"default","type":"Boolean"},"sortOrder":{"values":["asc","desc"],"name":"sort_order","type":"utils/util/choice"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/custom_views/owner","name":"modified_by","type":"core/com/zoho/crm/api/custom_views/owner"},"sortBy":{"structure_name":"core/com/zoho/crm/api/custom_views/sort_by","name":"sort_by","type":"core/com/zoho/crm/api/custom_views/sort_by"},"id":{"name":"id","type":"Long"},"category":{"name":"category","type":"String"},"systemDefined":{"name":"system_defined","type":"Boolean"},"locked":{"name":"locked","type":"Boolean"},"fields":{"structure_name":"core/com/zoho/crm/api/custom_views/fields","name":"fields","type":"List"},"favorite":{"name":"favorite","type":"Boolean"}},"core/com/zoho/crm/api/backup/body_wrapper":{"backup":{"structure_name":"core/com/zoho/crm/api/backup/backup","name":"backup","type":"core/com/zoho/crm/api/backup/backup"}},"core/com/zoho/crm/api/related_records/update_related_records_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/pipeline/create_pipeline_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/contact_roles/action_handler":{"classes":["core/com/zoho/crm/api/contact_roles/api_exception","core/com/zoho/crm/api/contact_roles/action_wrapper"],"interface":true},"core/com/zoho/crm/api/scoring_rules/scoring_rule":{"layout":{"structure_name":"core/com/zoho/crm/api/scoring_rules/layout","name":"layout","type":"core/com/zoho/crm/api/scoring_rules/layout"},"modifiedTime":{"name":"modified_time","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"fieldRules":{"structure_name":"core/com/zoho/crm/api/scoring_rules/field_rule","name":"field_rules","type":"List"},"module":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"module","type":"core/com/zoho/crm/api/modules/modules"},"name":{"name":"name","max-length":25,"type":"String"},"signalRules":{"structure_name":"core/com/zoho/crm/api/scoring_rules/signal_rule","name":"signal_rules","type":"List"},"description":{"name":"description","max-length":500,"type":"String"},"createdTime":{"name":"created_time","type":"String"},"active":{"name":"active","type":"Boolean"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/fields/association_details":{"lookupField":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"lookup_field","type":"core/com/zoho/crm/api/modules/minified_module"},"relatedField":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"related_field","type":"core/com/zoho/crm/api/modules/minified_module"}},"core/com/zoho/crm/api/attachments/attachment":{"owner":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Owner","type":"core/com/zoho/crm/api/users/minified_user"},"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"fileName":{"name":"File_Name","type":"String"},"attachmentType":{"name":"$attachment_type","type":"Integer"},"editable":{"name":"$editable","type":"Boolean"},"type":{"name":"$type","type":"String"},"sharingPermission":{"name":"$sharing_permission","type":"String"},"parentId":{"structure_name":"core/com/zoho/crm/api/attachments/parent_id","name":"Parent_Id","type":"core/com/zoho/crm/api/attachments/parent_id"},"seModule":{"name":"$se_module","type":"String"},"size":{"name":"Size","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"linkUrl":{"name":"$link_url","type":"String"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"state":{"name":"$state","type":"String"},"fileId":{"name":"$file_id","type":"String"}},"core/com/zoho/crm/api/taxes/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","INVALID_DATA","EXPECTED_FIELD_MISSING","OAUTH_SCOPE_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INTERNAL_ERROR","BAD_REQUEST","NO_PERMISSION","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"param","type":"String"},{"name":"id","type":"String"},{"name":"name","type":"String"},{"name":"value","type":"String"},{"name":"maximum_length","type":"Integer"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"deprecated_version","type":"String"},{"structure_name":"core/com/zoho/crm/api/taxes/expected_field","name":"expected_fields","type":"List"}],"name":"details","type":"Map"},"message":{"values":["One of the expected parameter is missing","Given ID does not exist","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","required field not found","Sequence number out of range","Sequence number cannot be repeated in same request","tax not deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/pipeline/update_pipelines_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/email_templates/email_template":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"attachments":{"structure_name":"core/com/zoho/crm/api/email_templates/attachment","name":"attachments","type":"List"},"subject":{"name":"subject","type":"String"},"consentLinked":{"name":"consent_linked","type":"Boolean"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"lastUsageTime":{"name":"last_usage_time","type":"DateTime"},"editorMode":{"name":"editor_mode","type":"String"},"description":{"name":"description","type":"String"},"lastVersionStatistics":{"structure_name":"core/com/zoho/crm/api/email_templates/last_version_statistics","name":"last_version_statistics","type":"core/com/zoho/crm/api/email_templates/last_version_statistics"},"type":{"name":"type","type":"String"},"content":{"name":"content","type":"String"},"folder":{"structure_name":"core/com/zoho/crm/api/inventory_templates/folder","name":"folder","type":"core/com/zoho/crm/api/inventory_templates/folder"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"associated":{"name":"associated","type":"Boolean"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"category":{"name":"category","type":"String"},"favorite":{"name":"favorite","type":"Boolean"}},"core/com/zoho/crm/api/available_currencies/response_handler":{"classes":["core/com/zoho/crm/api/available_currencies/response_wrapper","core/com/zoho/crm/api/available_currencies/api_exception"],"interface":true},"core/com/zoho/crm/api/holidays/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/email_templates/response_handler":{"classes":["core/com/zoho/crm/api/email_templates/response_wrapper","core/com/zoho/crm/api/email_templates/api_exception"],"interface":true},"core/com/zoho/crm/api/mass_delete_cvid/territory":{"id":{"name":"id","type":"Long"},"includeChild":{"name":"include_child","type":"Boolean"}},"core/com/zoho/crm/api/user_type_users/get_usersof_user_type_param":{"filters":{"name":"filters","type":"String"},"type":{"name":"type","type":"String","required":true}},"core/com/zoho/crm/api/share_records/body_wrapper":{"notifyOnCompletion":{"name":"notify_on_completion","type":"Boolean"},"share":{"structure_name":"core/com/zoho/crm/api/share_records/share_record","name":"share","max-length":10,"type":"List","min-length":1},"notify":{"name":"notify","type":"Boolean"}},"core/com/zoho/crm/api/portal_user_type/api_exception":{"code":{"values":["INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_change_owner/response_handler":{"classes":["core/com/zoho/crm/api/mass_change_owner/response_wrapper","core/com/zoho/crm/api/mass_change_owner/api_exception"],"interface":true},"core/com/zoho/crm/api/users_unavailability/users_unavailability":{"allDay":{"name":"all_day","type":"Boolean"},"comments":{"name":"comments","max-length":250,"type":"String"},"service":{"name":"service","type":"String"},"tpCalendarId":{"name":"tp_calendar_id","type":"String"},"from":{"name":"from","type":"DateTime"},"tpEventId":{"name":"tp_event_id","type":"String"},"id":{"name":"id","type":"Long"},"to":{"name":"to","type":"DateTime"},"title":{"name":"title","type":"String"},"user":{"structure_name":"core/com/zoho/crm/api/users_unavailability/user","name":"user","type":"core/com/zoho/crm/api/users_unavailability/user"}},"core/com/zoho/crm/api/email_related_records/email":{"cc":{"structure_name":"core/com/zoho/crm/api/email_related_records/user_details","name":"cc","type":"List"},"summary":{"name":"summary","type":"String"},"owner":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"owner","type":"core/com/zoho/crm/api/users/minified_user"},"sentimentInfo":{"values":["positive","negative","neutral"],"name":"sentiment_info","type":"utils/util/choice"},"attachments":{"structure_name":"core/com/zoho/crm/api/email_related_records/attachments","name":"attachments","type":"List"},"read":{"name":"read","type":"Boolean"},"subject":{"name":"subject","type":"String"},"editable":{"name":"editable","type":"Boolean"},"messageId":{"name":"message_id","type":"String"},"source":{"name":"source","type":"String"},"sent":{"name":"sent","type":"Boolean"},"intent":{"values":["query","request","purchase","complaints","others","spam"],"name":"intent","type":"utils/util/choice"},"content":{"name":"content","type":"String"},"threadId":{"name":"thread_id","type":"Long"},"linkedRecord":{"structure_name":"core/com/zoho/crm/api/email_related_records/linked_record","name":"linked_record","type":"core/com/zoho/crm/api/email_related_records/linked_record"},"emotion":{"name":"emotion","type":"String"},"replyTo":{"structure_name":"core/com/zoho/crm/api/email_related_records/user_details","name":"reply_to","type":"core/com/zoho/crm/api/email_related_records/user_details"},"sentTime":{"name":"sent_time","type":"String"},"from":{"structure_name":"core/com/zoho/crm/api/email_related_records/user_details","name":"from","type":"core/com/zoho/crm/api/email_related_records/user_details"},"mailFormat":{"name":"mail_format","type":"String"},"to":{"structure_name":"core/com/zoho/crm/api/email_related_records/user_details","name":"to","type":"List"},"time":{"name":"time","type":"DateTime"},"status":{"structure_name":"core/com/zoho/crm/api/email_related_records/status","name":"status","type":"List"}},"core/com/zoho/crm/api/bulk_write/success_response":{"code":{"values":["FILE_UPLOAD_SUCCESS","SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"file_id","type":"Long"},{"name":"created_time","type":"DateTime"},{"name":"id","type":"String"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"}],"name":"details","type":"Map"},"message":{"values":["file uploaded.","success"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/multiselectlookup":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"connectedModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"connected_module","type":"core/com/zoho/crm/api/modules/minified_module"},"connectedlookupApiname":{"name":"connectedlookup_apiname","type":"String"},"connectedfieldApiname":{"name":"connectedfield_apiname","type":"String"},"lookupApiname":{"name":"lookup_apiname","type":"String"},"linkingModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"linking_module","type":"core/com/zoho/crm/api/modules/minified_module"},"id":{"name":"id","type":"Long"},"recordAccess":{"name":"record_access","type":"Boolean"}},"core/com/zoho/crm/api/reschedule_history/approval":{"delegate":{"name":"delegate","type":"Boolean"},"approve":{"name":"approve","type":"Boolean"},"reject":{"name":"reject","type":"Boolean"},"resubmit":{"name":"resubmit","type":"Boolean"}},"core/com/zoho/crm/api/org/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/backup/requester":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"zuid":{"name":"zuid","type":"String"}},"core/com/zoho/crm/api/territory_users/api_exception":{"code":{"values":["INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"owner_status","type":"String"},{"name":"id","type":"Long"},{"name":"resource_path_index","type":"Integer"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/associate_email/record":{"linkedRecord":{"structure_name":"core/com/zoho/crm/api/associate_email/linked_record","name":"linked_record","type":"core/com/zoho/crm/api/associate_email/linked_record"},"module":{"structure_name":"core/com/zoho/crm/api/associate_email/module_map","name":"module","type":"core/com/zoho/crm/api/associate_email/module_map"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/user_groups/sources_count":{"territories":{"name":"territories","type":"Integer"},"roles":{"name":"roles","type":"Integer"},"groups":{"name":"groups","type":"Integer"},"users":{"structure_name":"core/com/zoho/crm/api/user_groups/users","name":"users","type":"core/com/zoho/crm/api/user_groups/users"}},"core/com/zoho/crm/api/record/convert_body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/lead_converter","name":"data","max-length":1,"type":"List","min-length":1}},"core/com/zoho/crm/api/related_records/update_related_record_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/associate_email/linked_record":{"module":{"structure_name":"core/com/zoho/crm/api/associate_email/module_map","name":"module","type":"core/com/zoho/crm/api/associate_email/module_map"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/variable_groups/response_wrapper":{"variableGroups":{"structure_name":"core/com/zoho/crm/api/variable_groups/variable_group","name":"variable_groups","type":"List"}},"core/com/zoho/crm/api/layouts/tooltip":{"name":{"values":["Info Icon"],"name":"name","type":"utils/util/choice"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/layouts/layouts":{"displayLabel":{"name":"display_label","type":"String"},"modifiedTime":{"name":"modified_time","type":"DateTime"},"apiName":{"name":"api_name","type":"String"},"createdFor":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_for","type":"core/com/zoho/crm/api/users/minified_user"},"visible":{"name":"visible","type":"Boolean"},"generatedType":{"name":"generated_type","type":"String"},"actionsAllowed":{"structure_name":"core/com/zoho/crm/api/layouts/actions_allowed","name":"actions_allowed","type":"core/com/zoho/crm/api/layouts/actions_allowed"},"hasMoreProfiles":{"name":"has_more_profiles","type":"Boolean"},"profiles":{"structure_name":"core/com/zoho/crm/api/layouts/profiles","name":"profiles","type":"List"},"source":{"name":"source","type":"String"},"showBusinessCard":{"name":"show_business_card","type":"Boolean"},"sections":{"structure_name":"core/com/zoho/crm/api/layouts/sections","name":"sections","type":"List"},"convertMapping":{"structure_name":"core/com/zoho/crm/api/layouts/convert_mapping","name":"convert_mapping","type":"core/com/zoho/crm/api/layouts/convert_mapping"},"displayType":{"name":"display_type","type":"Integer"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/scoring_rules/layout":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/deleted_record":{"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"displayName":{"name":"display_name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"deletedTime":{"name":"deleted_time","type":"DateTime"},"deletedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"deleted_by","type":"core/com/zoho/crm/api/users/minified_user"}},"core/com/zoho/crm/api/hipaa_compliance/modules":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/notifications/action_handler":{"classes":["core/com/zoho/crm/api/notifications/api_exception","core/com/zoho/crm/api/notifications/action_wrapper"],"interface":true},"core/com/zoho/crm/api/layouts/section_subform_field":{"layout":{"structure_name":"core/com/zoho/crm/api/layouts/minified_layout","name":"layout","type":"core/com/zoho/crm/api/layouts/minified_layout"},"module":{"name":"module","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/fiscal_year/response_handler":{"classes":["core/com/zoho/crm/api/fiscal_year/api_exception","core/com/zoho/crm/api/fiscal_year/response_wrapper"],"interface":true},"core/com/zoho/crm/api/users_transfer_delete/status":{"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/notifications/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"structure_name":"core/com/zoho/crm/api/notifications/event","name":"events","type":"List"},{"name":"resource_uri","type":"String"},{"name":"resource_id","type":"String"},{"name":"channel_id","type":"Long"},{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["Successfully subscribed for actions-watch of the given module","Successfully un-subscribed from actions-watch","Successfully updated the subscribe details","Successfully removed the subscribe details"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/entity_scores/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/entity_scores/entity_scores","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/entity_scores/info","name":"info","type":"core/com/zoho/crm/api/entity_scores/info"}},"core/com/zoho/crm/api/users_unavailability/response_handler":{"classes":["core/com/zoho/crm/api/users_unavailability/response_wrapper","core/com/zoho/crm/api/users_unavailability/api_exception"],"interface":true},"core/com/zoho/crm/api/record/mass_update_body_wrapper":{"cvid":{"name":"cvid","type":"String"},"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"List"},"criteria":{"structure_name":"core/com/zoho/crm/api/record/criteria","name":"criteria","type":"List"},"ids":{"name":"ids","type":"List"},"territory":{"structure_name":"core/com/zoho/crm/api/record/mass_update_territory","name":"territory","type":"core/com/zoho/crm/api/record/mass_update_territory"},"overWrite":{"name":"over_write","type":"Boolean"}},"core/com/zoho/crm/api/taxes/tax":{"displayLabel":{"name":"display_label","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"delete1":{"name":"_delete","type":"Boolean"},"value":{"regex":"[0-9]{7}","name":"value","type":"Double"}},"core/com/zoho/crm/api/modules/related_list_properties":{"sortOrder":{"name":"sort_order","type":"String"},"sortBy":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"sort_by","type":"core/com/zoho/crm/api/fields/minified_field"},"fields":{"name":"fields","type":"List"}},"core/com/zoho/crm/api/users_unavailability/get_users_unavailability_param":{"territoryIds":{"name":"territory_ids","type":"String"},"roleIds":{"name":"role_ids","type":"String"},"groupIds":{"name":"group_ids","type":"String"},"filters":{"name":"filters","type":"String"},"includeInnerDetails":{"values":["user.zuid"],"name":"include_inner_details","type":"String"}},"core/com/zoho/crm/api/appointment_preference/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","DEPENDENT_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"structure_name":"utils/util/choice","values":["create_deal","do_not_create_deal"],"name":"supported_values","type":"List"},{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"}],"name":"dependee","type":"Map"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/conversion_option":{"preferenceFieldMatchedValue":{"structure_name":"core/com/zoho/crm/api/record/preference_field_matched_value","name":"preference_field_matched_value","type":"core/com/zoho/crm/api/record/preference_field_matched_value"},"deals":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Deals","type":"List"},"modulePreference":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"module_preference","type":"core/com/zoho/crm/api/modules/modules"},"accounts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Accounts","type":"List"},"contacts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Contacts","type":"List"},"modulesWithMultipleLayouts":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"modules_with_multiple_layouts","type":"List"}},"core/com/zoho/crm/api/record/mass_update_response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/mass_update_response","name":"data","type":"List"}},"core/com/zoho/crm/api/roles/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/org/license_details":{"paidType":{"name":"paid_type","type":"String"},"trialAction":{"name":"trial_action","type":"String"},"trialType":{"name":"trial_type","type":"String"},"paidExpiry":{"name":"paid_expiry","type":"DateTime"},"paid":{"name":"paid","type":"Boolean"},"usersLicensePurchased":{"name":"users_license_purchased","type":"Integer"},"trialExpiry":{"name":"trial_expiry","type":"String"}},"core/com/zoho/crm/api/pipeline/update_pipeline_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/user_groups/association_response":{"resource":{"structure_name":"core/com/zoho/crm/api/user_groups/resource","name":"resource","type":"core/com/zoho/crm/api/user_groups/resource"},"detail":{"structure_name":"core/com/zoho/crm/api/user_groups/association_module","name":"detail","type":"core/com/zoho/crm/api/user_groups/association_module"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/share_records/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"String"}],"name":"details","type":"Map"},"message":{"values":["record will be shared successfully","Sharing Revoked"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_invite/portal_invite":{"data":{"structure_name":"core/com/zoho/crm/api/portal_invite/portal","name":"data","type":"List"}},"core/com/zoho/crm/api/available_currencies/currency":{"displayValue":{"name":"display_value","type":"String"},"symbol":{"name":"symbol","type":"String"},"thousandSeparator":{"name":"thousand_separator","type":"String"},"decimalPlaces":{"name":"decimal_places","type":"String"},"decimalSeparator":{"name":"decimal_separator","type":"String"},"isoCode":{"name":"iso_code","type":"String"},"displayName":{"name":"display_name","type":"String"}},"core/com/zoho/crm/api/bulk_read/action_response":{"classes":["core/com/zoho/crm/api/bulk_read/success_response","core/com/zoho/crm/api/bulk_read/api_exception"],"interface":true},"core/com/zoho/crm/api/reschedule_history/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/reschedule_history/reschedule_history","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/reschedule_history/info","name":"info","type":"List"}},"core/com/zoho/crm/api/holidays/holiday":{"date":{"name":"date","type":"Date"},"year":{"name":"year","type":"Integer"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"shiftHour":{"structure_name":"core/com/zoho/crm/api/holidays/shift_hour","name":"shift_hour","type":"core/com/zoho/crm/api/holidays/shift_hour"}},"core/com/zoho/crm/api/users/action_handler":{"classes":["core/com/zoho/crm/api/users/api_exception","core/com/zoho/crm/api/users/action_wrapper"],"interface":true},"core/com/zoho/crm/api/variable_groups/response_handler":{"classes":["core/com/zoho/crm/api/variable_groups/response_wrapper","core/com/zoho/crm/api/variable_groups/api_exception"],"interface":true},"core/com/zoho/crm/api/bulk_read/query":{"cvid":{"name":"cvid","type":"Long"},"criteria":{"structure_name":"core/com/zoho/crm/api/bulk_read/criteria","name":"criteria","type":"core/com/zoho/crm/api/bulk_read/criteria"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"page":{"regex":"[0-9]|[1-4][0-9]|50","name":"page","type":"Integer"},"fields":{"name":"fields","type":"List"},"fileType":{"values":["ics"],"name":"file_type","type":"utils/util/choice"}},"core/com/zoho/crm/api/modules/module_fields":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"sharingProperties":{"structure_name":"core/com/zoho/crm/api/modules/sharing_properties","name":"sharing_properties","type":"core/com/zoho/crm/api/modules/sharing_properties"},"apiName":{"name":"api_name","type":"String"},"webhook":{"name":"webhook","type":"Boolean"},"associatedModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"associated_module","type":"core/com/zoho/crm/api/modules/minified_module"},"defaultValue":{"name":"default_value","type":"String"},"tooltip":{"structure_name":"core/com/zoho/crm/api/fields/tooltip","name":"tooltip","type":"core/com/zoho/crm/api/fields/tooltip"},"quickSequenceNumber":{"name":"quick_sequence_number","type":"String"},"jsonType":{"name":"json_type","type":"String"},"type":{"name":"type","type":"String"},"availableInUserLayout":{"name":"available_in_user_layout","type":"Boolean"},"rollupSummary":{"structure_name":"core/com/zoho/crm/api/fields/rollup_summary","name":"rollup_summary","type":"core/com/zoho/crm/api/fields/rollup_summary"},"blueprintSupported":{"name":"blueprint_supported","type":"Boolean"},"createdTime":{"name":"created_time","type":"DateTime"},"showType":{"name":"show_type","type":"Integer"},"globalPicklist":{"name":"global_picklist","type":"Object"},"id":{"name":"id","type":"Long"},"additionalColumn":{"name":"additional_column","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"filterable":{"name":"filterable","type":"Boolean"},"emailParser":{"structure_name":"core/com/zoho/crm/api/fields/email_parser","name":"email_parser","type":"core/com/zoho/crm/api/fields/email_parser"},"visible":{"name":"visible","type":"Boolean"},"dataType":{"values":["formula","text","boolean","picklist","datetime","website","autonumber","textarea","email","phone","integer","double","date","formula","text","boolean","picklist","datetime","website","autonumber","textarea","lookup","email","userlookup","phone","integer","double","date"],"name":"data_type","type":"utils/util/choice"},"profiles":{"structure_name":"core/com/zoho/crm/api/fields/profile","name":"profiles","type":"List"},"readOnly":{"name":"read_only","type":"Boolean"},"historyTracking":{"structure_name":"core/com/zoho/crm/api/fields/history_tracking","name":"history_tracking","type":"core/com/zoho/crm/api/fields/history_tracking"},"systemMandatory":{"name":"system_mandatory","type":"Boolean"},"separator":{"name":"separator","type":"Boolean"},"customField":{"name":"custom_field","type":"Boolean"},"searchable":{"name":"searchable","type":"Boolean"},"decimalPlace":{"name":"decimal_place","type":"Integer"},"createdSource":{"name":"created_source","type":"String"},"displayType":{"name":"display_type","type":"Integer"},"external":{"structure_name":"core/com/zoho/crm/api/fields/external","name":"external","type":"core/com/zoho/crm/api/fields/external"},"subModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"sub_module","type":"core/com/zoho/crm/api/modules/minified_module"},"unique":{"structure_name":"core/com/zoho/crm/api/fields/unique","name":"unique","type":"core/com/zoho/crm/api/fields/unique"},"viewType":{"structure_name":"core/com/zoho/crm/api/fields/view_type","name":"view_type","type":"core/com/zoho/crm/api/fields/view_type"},"displayField":{"name":"display_field","type":"Boolean"},"operationType":{"structure_name":"core/com/zoho/crm/api/fields/operation_type","name":"operation_type","type":"core/com/zoho/crm/api/fields/operation_type"},"hipaaComplianceEnabled":{"name":"hipaa_compliance_enabled","type":"Boolean"},"crypt":{"structure_name":"core/com/zoho/crm/api/fields/crypt","name":"crypt","type":"core/com/zoho/crm/api/fields/crypt"},"fileUpoladOptionlist":{"structure_name":"core/com/zoho/crm/api/fields/file_upolad_option","name":"file_upolad_optionlist","type":"List"},"enableColourCode":{"name":"enable_colour_code","type":"Boolean"},"virtualField":{"name":"virtual_field","type":"Boolean"},"hipaaCompliance":{"structure_name":"core/com/zoho/crm/api/fields/hipaa_compliance","name":"hipaa_compliance","type":"core/com/zoho/crm/api/fields/hipaa_compliance"},"associationDetails":{"structure_name":"core/com/zoho/crm/api/fields/association_details","name":"association_details","type":"core/com/zoho/crm/api/fields/association_details"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/fields/pick_list_value","name":"pick_list_values","type":"List"},"fieldLabel":{"name":"field_label","type":"String"},"referFromField":{"structure_name":"core/com/zoho/crm/api/fields/refer_from_field","name":"refer_from_field","type":"core/com/zoho/crm/api/fields/refer_from_field"},"allowedModules":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"allowed_modules","type":"List"},"fieldReadOnly":{"name":"field_read_only","type":"Boolean"},"businesscardSupported":{"name":"businesscard_supported","type":"Boolean"},"currency":{"structure_name":"core/com/zoho/crm/api/fields/currency","name":"currency","type":"core/com/zoho/crm/api/fields/currency"},"multiuserlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiuserlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"displayLabel":{"name":"display_label","type":"String"},"lookup":{"structure_name":"core/com/zoho/crm/api/modules/module_field_lookup","name":"lookup","type":"core/com/zoho/crm/api/modules/module_field_lookup"},"length":{"values":[120],"name":"length","type":"utils/util/choice"},"pickListValuesSortedLexically":{"name":"pick_list_values_sorted_lexically","type":"Boolean"},"sortable":{"name":"sortable","type":"Boolean"},"autoNumber":{"structure_name":"core/com/zoho/crm/api/fields/auto_number","name":"auto_number","type":"core/com/zoho/crm/api/fields/auto_number"},"private1":{"structure_name":"core/com/zoho/crm/api/fields/private","name":"private","type":"core/com/zoho/crm/api/fields/private"},"convertMapping":{"structure_name":"core/com/zoho/crm/api/fields/convert_mapping","name":"convert_mapping","type":"core/com/zoho/crm/api/fields/convert_mapping"},"multiModuleLookup":{"structure_name":"core/com/zoho/crm/api/fields/multi_module_lookup","name":"multi_module_lookup","type":"core/com/zoho/crm/api/fields/multi_module_lookup"},"massUpdate":{"name":"mass_update","type":"Boolean"},"uiType":{"name":"ui_type","type":"Integer"},"formula":{"structure_name":"core/com/zoho/crm/api/fields/formula","name":"formula","type":"core/com/zoho/crm/api/fields/formula"},"category":{"name":"category","type":"Integer"},"multiselectlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiselectlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"columnName":{"name":"column_name","type":"String"}},"core/com/zoho/crm/api/timelines/name_id_structure":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/variables/api_exception":{"code":{"values":["DUPLICATE_DATA","REQUIRED_PARAM_MISSING","JSON_PARSE_ERROR","PATTERN_NOT_MATCHED","INVALID_DATA","MANDATORY_NOT_FOUND","EXPECTED_FIELD_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"param_name","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"},{"name":"maximum_length","type":"Integer"},{"structure_name":"core/com/zoho/crm/api/variables/error_details","name":"expected_fields","type":"List"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/share_records/delete_action_handler":{"classes":["core/com/zoho/crm/api/share_records/delete_action_wrapper","core/com/zoho/crm/api/share_records/api_exception"],"interface":true},"core/com/zoho/crm/api/scoring_rules/signal":{"namespace":{"values":["EmailInsight"],"name":"namespace","type":"utils/util/choice"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/holidays/create_business_holiday":{"holidays":{"structure_name":"core/com/zoho/crm/api/holidays/business_holiday","name":"holidays","type":"List"}},"core/com/zoho/crm/api/inventory_templates/get_inventory_templates_param":{"module":{"name":"module","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"sortBy":{"name":"sort_by","type":"String"},"category":{"name":"category","type":"String"}},"core/com/zoho/crm/api/tags/count_response_wrapper":{"count":{"name":"count","type":"String"}},"core/com/zoho/crm/api/business_hours/response_handler":{"classes":["core/com/zoho/crm/api/business_hours/response_wrapper","core/com/zoho/crm/api/business_hours/api_exception"],"interface":true},"core/com/zoho/crm/api/portals_meta/filters":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/tags/action_response":{"classes":["core/com/zoho/crm/api/tags/api_exception","core/com/zoho/crm/api/tags/success_response"],"interface":true},"core/com/zoho/crm/api/backup/action_handler":{"classes":["core/com/zoho/crm/api/backup/action_wrapper","core/com/zoho/crm/api/backup/api_exception"],"interface":true},"core/com/zoho/crm/api/mass_convert/portal_user_type":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/tags/body_wrapper":{"tags":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"tags","type":"List"}},"core/com/zoho/crm/api/associate_email/body_wrapper":{"emails":{"structure_name":"core/com/zoho/crm/api/associate_email/associate_email","name":"Emails","type":"List"}},"core/com/zoho/crm/api/bulk_write/field_mapping":{"apiName":{"name":"api_name","type":"String"},"defaultValue":{"structure_name":"core/com/zoho/crm/api/bulk_write/default_value","name":"default_value","type":"core/com/zoho/crm/api/bulk_write/default_value"},"module":{"name":"module","type":"String"},"format":{"name":"format","type":"String"},"index":{"name":"index","type":"Integer"},"findBy":{"name":"find_by","type":"String"}},"core/com/zoho/crm/api/shift_hours/response_wrapper":{"shiftHours":{"structure_name":"core/com/zoho/crm/api/shift_hours/shift_hours","name":"shift_hours","type":"List"},"shiftCount":{"structure_name":"core/com/zoho/crm/api/shift_hours/shift_count","name":"shift_count","type":"core/com/zoho/crm/api/shift_hours/shift_count"}},"core/com/zoho/crm/api/available_currencies/response_wrapper":{"availableCurrencies":{"structure_name":"core/com/zoho/crm/api/available_currencies/currency","name":"available_currencies","type":"List"}},"core/com/zoho/crm/api/mass_delete_cvid/action_handler":{"classes":["core/com/zoho/crm/api/mass_delete_cvid/api_exception","core/com/zoho/crm/api/mass_delete_cvid/action_wrapper"],"interface":true},"core/com/zoho/crm/api/profiles/get_profiles_param":{"includeLiteProfile":{"name":"include_lite_profile","type":"Boolean"}},"core/com/zoho/crm/api/custom_views/get_custom_views_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/variables/body_wrapper":{"variables":{"structure_name":"core/com/zoho/crm/api/variables/variable","name":"variables","type":"List"}},"core/com/zoho/crm/api/blueprint/multi_select_lookup":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"connectedlookupApiname":{"name":"connectedlookup_apiname","type":"String"},"lookupApiname":{"name":"lookup_apiname","type":"String"},"linkingModule":{"name":"linking_module","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/email_templates/attachment":{"fileName":{"name":"file_name","type":"String"},"size":{"name":"size","type":"Long"},"id":{"name":"id","type":"Long"},"fileId":{"name":"file_id","type":"String"}},"core/com/zoho/crm/api/email_related_records/get_emails_related_records_param":{"index":{"name":"index","type":"String"},"type":{"values":["sent_from_crm","scheduled_in_crm","drafts","user_emails"],"name":"type","type":"String","required":true},"ownerId":{"name":"owner_id","type":"Long","required":true}},"core/com/zoho/crm/api/cancel_meetings/action_handler":{"classes":["core/com/zoho/crm/api/cancel_meetings/action_wrapper","core/com/zoho/crm/api/cancel_meetings/api_exception"],"interface":true},"core/com/zoho/crm/api/users_unavailability/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/users_territories/transfer_action_handler":{"classes":["core/com/zoho/crm/api/users_territories/api_exception","core/com/zoho/crm/api/users_territories/action_wrapper","core/com/zoho/crm/api/users_territories/transfer_action_wrapper"],"interface":true},"core/com/zoho/crm/api/email_templates/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_convert/move_attachments_to":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/tags/info":{"count":{"name":"count","type":"Integer"},"allowedCount":{"name":"allowed_count","type":"Integer"}},"core/com/zoho/crm/api/contact_roles/action_response":{"classes":["core/com/zoho/crm/api/contact_roles/api_exception","core/com/zoho/crm/api/contact_roles/success_response"],"interface":true},"core/com/zoho/crm/api/currencies/action_handler":{"classes":["core/com/zoho/crm/api/currencies/api_exception","core/com/zoho/crm/api/currencies/action_wrapper","core/com/zoho/crm/api/currencies/base_currency_action_wrapper"],"interface":true},"core/com/zoho/crm/api/holidays/action_response":{"classes":["core/com/zoho/crm/api/holidays/api_exception","core/com/zoho/crm/api/holidays/success_response"],"interface":true},"core/com/zoho/crm/api/record/mass_update_action_handler":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/mass_update_action_wrapper"],"interface":true},"core/com/zoho/crm/api/send_mail/action_response":{"classes":["core/com/zoho/crm/api/send_mail/success_response","core/com/zoho/crm/api/send_mail/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/body_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/users_territories/territory","name":"territories","type":"List"}},"core/com/zoho/crm/api/reschedule_history/action_handler":{"classes":["core/com/zoho/crm/api/reschedule_history/api_exception","core/com/zoho/crm/api/reschedule_history/action_wrapper"],"interface":true},"core/com/zoho/crm/api/user_groups/user_group":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/deal_contact_roles/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_DATA","EXPECTED_FIELD_MISSING","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR","REQUIRED_PARAM_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"structure_name":"core/com/zoho/crm/api/deal_contact_roles/error_details","name":"expected_fields","type":"List"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/file_upolad_option":{"displayValue":{"name":"display_value","type":"String"},"actualValue":{"name":"actual_value","type":"String"}},"core/com/zoho/crm/api/custom_views/translation":{"createdByMe":{"name":"created_by_me","type":"String"},"otherUsersViews":{"name":"other_users_views","type":"String"},"publicViews":{"name":"public_views","type":"String"},"sharedWithMe":{"name":"shared_with_me","type":"String"}},"core/com/zoho/crm/api/users_territories/validation_wrapper":{"validateBeforeTransfer":{"structure_name":"core/com/zoho/crm/api/users_territories/validation_group","name":"validate_before_transfer","type":"List"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline_action_handler":{"classes":["core/com/zoho/crm/api/pipeline/api_exception","core/com/zoho/crm/api/pipeline/transfer_pipeline_action_wrapper"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/pick_list_mapping":{"displayValue":{"name":"display_value","type":"String"},"maps":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/picklist_map","name":"maps","type":"List"},"actualValue":{"name":"actual_value","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mass_delete_cvid/action_response":{"classes":["core/com/zoho/crm/api/mass_delete_cvid/success_response","core/com/zoho/crm/api/mass_delete_cvid/mass_delete_scheduled","core/com/zoho/crm/api/mass_delete_cvid/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/transfer_action_wrapper":{"transferAndDelink":{"structure_name":"core/com/zoho/crm/api/users_territories/transfer_action_response","name":"transfer_and_delink","type":"List"}},"core/com/zoho/crm/api/wizards/segment":{"displayLabel":{"name":"display_label","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"buttons":{"structure_name":"core/com/zoho/crm/api/wizards/button","name":"buttons","type":"List"},"resource":{"structure_name":"core/com/zoho/crm/api/wizards/resource","name":"resource","type":"core/com/zoho/crm/api/wizards/resource"},"id":{"name":"id","type":"Long"},"columnCount":{"name":"column_count","type":"Integer"},"type":{"name":"type","type":"String"},"fields":{"structure_name":"core/com/zoho/crm/api/fields/fields","name":"fields","type":"List"}},"core/com/zoho/crm/api/hipaa_compliance/api_exception":{"code":{"values":["INVALID_API_NAME","NOT_SUPPORTED"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/wizards/api_exception":{"code":{"values":["INVALID_DATA","INTERNAL_ERROR","OAUTH_SCOPE_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","BAD_REQUEST","NO_PERMISSION","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"permissions","type":"List"},{"name":"param_name","type":"String"},{"name":"api_name","type":"String"}],"name":"details","type":"Map"},"message":{"values":["Invalid Wizard ID","the module name given seems to be invalid","feature not available in this edition","permission denied","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","Internal server error occurred."],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_read/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/mail_merge/download_mail_merge":{"fileName":{"name":"file_name","max-length":255,"type":"String"},"password":{"name":"password","type":"String"},"mailMergeTemplate":{"structure_name":"core/com/zoho/crm/api/mail_merge/mail_merge_template","name":"mail_merge_template","type":"core/com/zoho/crm/api/mail_merge/mail_merge_template"},"outputFormat":{"values":["pdf","docx","html"],"name":"output_format","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_invite/success_response":{"code":{"values":["SUCCESS","SCHEDULED"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"record_id","type":"Long"},{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/users_territories/territory":{"manager":{"structure_name":"core/com/zoho/crm/api/users_territories/manager","name":"Manager","type":"core/com/zoho/crm/api/users_territories/manager"},"name":{"name":"Name","type":"String"},"id":{"name":"id","type":"Long"},"reportingTo":{"structure_name":"core/com/zoho/crm/api/users_territories/manager","name":"Reporting_To","type":"core/com/zoho/crm/api/users_territories/manager"}},"core/com/zoho/crm/api/record/mass_update_response_handler":{"classes":["core/com/zoho/crm/api/record/mass_update_response_wrapper","core/com/zoho/crm/api/record/api_exception"],"interface":true},"core/com/zoho/crm/api/layouts/default_view":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete_by_id":{"transfer":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/transfer","name":"transfer","type":"core/com/zoho/crm/api/users_transfer_delete/transfer"},"moveSubordinate":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/move_subordinate","name":"move_subordinate","type":"core/com/zoho/crm/api/users_transfer_delete/move_subordinate"}},"core/com/zoho/crm/api/contact_roles/contact_role":{"sequenceNumber":{"name":"sequence_number","type":"Integer"},"name":{"regex":"[A-Za-z0-9]{50}","name":"name","max-length":50,"type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/multi_select_lookup":{"fieldname":{"name":"fieldName","type":"Map"},"hasMore":{"name":"$has_more","type":"Map"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/related_records/delete_related_records_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/currencies/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/appointment_preference/field_mappings":{"field":{"structure_name":"core/com/zoho/crm/api/appointment_preference/field","name":"field","type":"core/com/zoho/crm/api/appointment_preference/field"},"type":{"values":["static","merge_field"],"name":"type","type":"utils/util/choice"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/modules/territory":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"subordinates":{"name":"subordinates","type":"Boolean"}},"core/com/zoho/crm/api/attachments/get_attachments_param":{"perPage":{"name":"per_page","type":"Integer"},"ids":{"name":"ids","type":"Long","required":true},"page":{"name":"page","type":"Integer"},"fields":{"name":"fields","type":"String","required":true}},"core/com/zoho/crm/api/mass_delete_cvid/record_id_body_wrapper":{"ids":{"name":"ids","max-length":10,"type":"List"},"territory":{"structure_name":"core/com/zoho/crm/api/mass_delete_cvid/territory","name":"territory","type":"core/com/zoho/crm/api/mass_delete_cvid/territory"}},"core/com/zoho/crm/api/taxes/org_tax":{"preference":{"structure_name":"core/com/zoho/crm/api/taxes/preference","name":"preference","type":"core/com/zoho/crm/api/taxes/preference"},"taxes":{"structure_name":"core/com/zoho/crm/api/taxes/tax","name":"taxes","type":"List"}},"core/com/zoho/crm/api/associate_email/to":{"userName":{"name":"user_name","type":"String"},"email":{"regex":"[a-z]{7}[@]zoho[.]com","name":"email","type":"String"}},"core/com/zoho/crm/api/share_records/delete_action_wrapper":{"share":{"structure_name":"core/com/zoho/crm/api/share_records/delete_action_response","name":"share","interface":true,"type":"core/com/zoho/crm/api/share_records/delete_action_response"}},"core/com/zoho/crm/api/fields/rollup_criteria":{"comparator":{"name":"comparator","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"field","type":"core/com/zoho/crm/api/fields/minified_field"},"value":{"name":"value","type":"Object"}},"core/com/zoho/crm/api/email_compose_meta/compose_settings":{"fontFamily":{"name":"font_family","type":"String"},"emailSignatures":{"name":"email_signatures","type":"List"},"defaultFromAddress":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/default_form","name":"default_from_address","type":"core/com/zoho/crm/api/email_compose_meta/default_form"},"fontSize":{"name":"font_size","type":"Integer"}},"core/com/zoho/crm/api/users_unavailability/user":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"zuid":{"name":"zuid","type":"String"}},"core/com/zoho/crm/api/field_attachments/response_handler":{"classes":["core/com/zoho/crm/api/field_attachments/file_body_wrapper","core/com/zoho/crm/api/field_attachments/api_exception"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_DATA","MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","NOT_SUPPORTED","INVALID_URL_PATTERN","INVALID_TOKEN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"param","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/related_lists/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/custom_views/body_wrapper":{"customViews":{"structure_name":"core/com/zoho/crm/api/custom_views/custom_view","name":"custom_views","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/custom_views/info","name":"info","type":"core/com/zoho/crm/api/custom_views/info"}},"core/com/zoho/crm/api/mass_change_owner/check_status_param":{"jobId":{"name":"job_id","type":"Long","required":true}},"core/com/zoho/crm/api/bulk_write/default_value":{"module":{"name":"module","type":"String"},"name":{"name":"name","type":"String"},"value":{"name":"value","type":"Object"}},"core/com/zoho/crm/api/profiles/category":{"classes":["core/com/zoho/crm/api/profiles/category_module","core/com/zoho/crm/api/profiles/category_others"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/get_map_dependency_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/portal_invite/action_response":{"classes":["core/com/zoho/crm/api/portal_invite/success_response","core/com/zoho/crm/api/portal_invite/api_exception"],"interface":true},"core/com/zoho/crm/api/blueprint/auto_number":{"startNumber":{"name":"start_number","type":"Integer"},"prefix":{"name":"prefix","type":"String"},"suffix":{"name":"suffix","type":"String"}},"core/com/zoho/crm/api/user_groups/sources":{"subTerritories":{"name":"sub_territories","type":"Boolean"},"source":{"structure_name":"core/com/zoho/crm/api/user_groups/source","name":"source","type":"core/com/zoho/crm/api/user_groups/source"},"type":{"values":["users","territories","roles"],"name":"type","type":"utils/util/choice"},"subordinates":{"name":"subordinates","type":"Boolean"}},"core/com/zoho/crm/api/blueprint/response_wrapper":{"blueprint":{"structure_name":"core/com/zoho/crm/api/blueprint/blue_print","name":"blueprint","type":"core/com/zoho/crm/api/blueprint/blue_print"}},"core/com/zoho/crm/api/users/action_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/users/action_response","name":"users","type":"List"}},"core/com/zoho/crm/api/layouts/response_handler":{"classes":["core/com/zoho/crm/api/layouts/response_wrapper","core/com/zoho/crm/api/layouts/api_exception"],"interface":true},"core/com/zoho/crm/api/bulk_read/response_handler":{"classes":["core/com/zoho/crm/api/bulk_read/api_exception","core/com/zoho/crm/api/bulk_read/file_body_wrapper","core/com/zoho/crm/api/bulk_read/response_wrapper"],"interface":true},"core/com/zoho/crm/api/notes/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"Modified_Time","type":"DateTime"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"Created_Time","type":"DateTime"},{"name":"id","type":"String"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"}],"name":"details","type":"Map"},"message":{"values":["record added","record updated","record deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/backup/action_wrapper":{"backup":{"structure_name":"core/com/zoho/crm/api/backup/action_response","name":"backup","interface":true,"type":"core/com/zoho/crm/api/backup/action_response"}},"core/com/zoho/crm/api/tags/add_tags_to_multiple_records_param":{"overWrite":{"name":"over_write","type":"String"}},"core/com/zoho/crm/api/users/profile":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/scoring_rules/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["scoring rule created successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_delete_cvid/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/mass_delete_cvid/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/backup/history_wrapper":{"history":{"structure_name":"core/com/zoho/crm/api/backup/history","name":"history","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/backup/info","name":"info","type":"core/com/zoho/crm/api/backup/info"}},"core/com/zoho/crm/api/territories/criteria":{"comparator":{"name":"comparator","type":"String"},"groupOperator":{"name":"group_operator","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/territories/field","name":"field","type":"core/com/zoho/crm/api/territories/field"},"value":{"name":"value","type":"Object"},"group":{"structure_name":"core/com/zoho/crm/api/territories/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/fields/multi_module_lookup":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"modules":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"modules","type":"List"}},"core/com/zoho/crm/api/change_owner/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_change_owner/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/mass_change_owner/status","name":"data","type":"List"}},"core/com/zoho/crm/api/portal_invite/action_wrapper":{"portalInvite":{"structure_name":"core/com/zoho/crm/api/portal_invite/action_response","name":"portal_invite","type":"List"}},"core/com/zoho/crm/api/notifications/action_wrapper":{"watch":{"structure_name":"core/com/zoho/crm/api/notifications/action_response","name":"watch","type":"List"}},"core/com/zoho/crm/api/tags/merge_wrapper":{"tags":{"structure_name":"core/com/zoho/crm/api/tags/conflict_wrapper","name":"tags","max-length":1,"type":"List","min-length":1}},"core/com/zoho/crm/api/currencies/base_currency":{"symbol":{"name":"symbol","type":"String"},"isoCode":{"name":"iso_code","type":"String"},"exchangeRate":{"regex":"[1-9]{2}[.][1-9]{9}","name":"exchange_rate","type":"String"},"format":{"structure_name":"core/com/zoho/crm/api/currencies/format","name":"format","type":"core/com/zoho/crm/api/currencies/format"},"name":{"name":"name","type":"String"},"prefixSymbol":{"name":"prefix_symbol","type":"Boolean"},"id":{"name":"id","type":"Long"},"isActive":{"name":"is_active","type":"Boolean"}},"core/com/zoho/crm/api/templates/folder":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/notifications/action_response":{"classes":["core/com/zoho/crm/api/notifications/api_exception","core/com/zoho/crm/api/notifications/success_response"],"interface":true},"core/com/zoho/crm/api/shift_hours/delete_shift_hour_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/field_map_dependency/update_map_dependency_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/layouts/deal_field":{"apiName":{"name":"api_name","type":"String"},"fieldLabel":{"name":"field_label","type":"String"},"id":{"name":"id","type":"Long"},"required":{"name":"required","type":"Boolean"}},"core/com/zoho/crm/api/portal_user_type/fields":{"apiName":{"name":"api_name","type":"String"},"readOnly":{"name":"read_only","type":"Boolean"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/currencies/body_wrapper":{"currencies":{"structure_name":"core/com/zoho/crm/api/currencies/currency","name":"currencies","type":"List"}},"core/com/zoho/crm/api/download_inline_images/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/profiles/permission_detail":{"displayLabel":{"name":"display_label","type":"String"},"module":{"name":"module","type":"String"},"name":{"name":"name","type":"String"},"customizable":{"name":"customizable","type":"Boolean"},"id":{"name":"id","type":"Long"},"enabled":{"values":[true],"name":"enabled","type":"utils/util/choice"},"parentPermissions":{"name":"parent_permissions","type":"List"}},"core/com/zoho/crm/api/backup/history":{"fileName":{"name":"file_name","type":"String"},"repeatType":{"name":"repeat_type","type":"String"},"count":{"name":"count","type":"Integer"},"action":{"name":"action","type":"String"},"id":{"name":"id","type":"Long"},"state":{"name":"state","type":"String"},"doneBy":{"structure_name":"core/com/zoho/crm/api/backup/requester","name":"done_by","type":"core/com/zoho/crm/api/backup/requester"},"logTime":{"name":"log_time","type":"DateTime"}},"core/com/zoho/crm/api/associate_email/action_response":{"classes":["core/com/zoho/crm/api/associate_email/success_response","core/com/zoho/crm/api/associate_email/api_exception"],"interface":true},"core/com/zoho/crm/api/entity_scores/scoring_rule_structure":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portal_user_type/permissions":{"view":{"values":[true],"name":"view","type":"utils/util/choice"},"edit":{"name":"edit","type":"Boolean"},"editSharedRecords":{"name":"edit_shared_records","type":"Boolean"},"create":{"name":"create","type":"Boolean"},"createAttachment":{"name":"create_attachment","type":"Boolean"},"delete1":{"name":"delete","type":"Boolean"},"deleteAttachment":{"name":"delete_attachment","type":"Boolean"}},"core/com/zoho/crm/api/wizards/get_wizardby_id_param":{"layoutId":{"name":"layout_id","type":"String","required":true}},"core/com/zoho/crm/api/bulk_read/request_wrapper":{"query":{"structure_name":"core/com/zoho/crm/api/bulk_read/query","name":"query","type":"core/com/zoho/crm/api/bulk_read/query"},"callback":{"structure_name":"core/com/zoho/crm/api/bulk_read/call_back","name":"callback","type":"core/com/zoho/crm/api/bulk_read/call_back"},"fileType":{"values":["ics","csv"],"name":"file_type","type":"utils/util/choice"}},"core/com/zoho/crm/api/field_map_dependency/sub_module":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portal_invite/data":{"classes":["core/com/zoho/crm/api/portal_invite/success_response","core/com/zoho/crm/api/portal_invite/api_exception"],"interface":true},"core/com/zoho/crm/api/profiles/response_handler":{"classes":["core/com/zoho/crm/api/profiles/profile_wrapper","core/com/zoho/crm/api/profiles/api_exception"],"interface":true},"core/com/zoho/crm/api/profiles/category_others":{"displayLabel":{"name":"display_label","type":"String"},"permissionsDetails":{"name":"permissions_details","type":"List"},"name":{"name":"name","type":"String"}},"core/com/zoho/crm/api/territory_users/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/delete_record_using_external_id_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/record/delete_record_using_external_id_param":{"wfTrigger":{"name":"wf_trigger","type":"Boolean"}},"core/com/zoho/crm/api/appointment_preference/layout":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/entity_scores/get_modules_param":{"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/user_groups/response_handler":{"classes":["core/com/zoho/crm/api/user_groups/response_wrapper","core/com/zoho/crm/api/user_groups/associated_user_count","core/com/zoho/crm/api/user_groups/association_wrapper","core/com/zoho/crm/api/user_groups/api_exception","core/com/zoho/crm/api/user_groups/sources_wrapper","core/com/zoho/crm/api/user_groups/sources_count_wrapper"],"interface":true},"core/com/zoho/crm/api/query/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/record/info","name":"info","type":"core/com/zoho/crm/api/record/info"}},"core/com/zoho/crm/api/blueprint/formula":{"expression":{"name":"expression","type":"Integer"},"returnType":{"name":"return_type","type":"String"}},"core/com/zoho/crm/api/related_records/response_handler":{"classes":["core/com/zoho/crm/api/related_records/response_wrapper","core/com/zoho/crm/api/related_records/file_body_wrapper","core/com/zoho/crm/api/related_records/api_exception"],"interface":true},"core/com/zoho/crm/api/users/customize_info":{"bcView":{"name":"bc_view","type":"Object"},"showDetailView":{"name":"show_detail_view","type":"Boolean"},"showHome":{"name":"show_home","type":"Boolean"},"showRightPanel":{"name":"show_right_panel","type":"Object"},"notesDesc":{"name":"notes_desc","type":"Object"},"unpinRecentItem":{"name":"unpin_recent_item","type":"Object"}},"core/com/zoho/crm/api/contact_roles/api_exception":{"code":{"values":["INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/timelines/automation_detail":{"pathfinder":{"structure_name":"core/com/zoho/crm/api/timelines/path_finder","name":"pathfinder","type":"core/com/zoho/crm/api/timelines/path_finder"},"rule":{"structure_name":"core/com/zoho/crm/api/timelines/name_id_structure","name":"rule","type":"core/com/zoho/crm/api/timelines/name_id_structure"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/org/resource":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/holidays/get_holidays_param":{"shiftId":{"name":"shift_id","type":"Long"},"year":{"name":"year","type":"Integer"},"type":{"values":["business_holiday","shift_holiday"],"name":"type","type":"String"}},"core/com/zoho/crm/api/users/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","EXPECTED_FIELD_MISSING","INTERNAL_SERVER_ERROR","DUPLICATE_DATA","MAPPING_MISMATCH","PATTERN_NOT_MATCHED","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"structure_name":"core/com/zoho/crm/api/users/error_details","name":"expected_fields","type":"List"},{"name":"maximum_length","type":"Integer"},{"name":"resource_path_index","type":"Integer"},{"structure_name":"core/com/zoho/crm/api/users/error_details","name":"mapped_field","type":"core/com/zoho/crm/api/users/error_details"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/wizards/container":{"layout":{"structure_name":"core/com/zoho/crm/api/layouts/layouts","name":"layout","type":"core/com/zoho/crm/api/layouts/layouts"},"chartData":{"structure_name":"core/com/zoho/crm/api/wizards/chart_data","name":"chart_data","type":"core/com/zoho/crm/api/wizards/chart_data"},"screens":{"structure_name":"core/com/zoho/crm/api/wizards/screen","name":"screens","type":"List"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/timelines/record":{"module":{"structure_name":"core/com/zoho/crm/api/timelines/module","name":"module","type":"core/com/zoho/crm/api/timelines/module"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/modules/action_response":{"classes":["core/com/zoho/crm/api/modules/success_response","core/com/zoho/crm/api/modules/api_exception"],"interface":true},"core/com/zoho/crm/api/bulk_read/api_exception":{"code":{"values":["REQUEST_BODY_NOT_SUPPORTED","AMBIGUOUS_CRITERIA","AMBIGUOUS_GROUP_IN_CRITERIA","PAGE_RANGE_EXCEEDED","INVALID_CALLBACK_METHOD","INVALID_CALLBACK_URL","GROUP_OPERATOR_NOT_SUPPORTED","MODULE_NOT_SUPPORTED","RESOURCE_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_SERVICE_NAME","INVALID_BULK_OPERATION","MEDIA_TYPE_NOT_SUPPORTED","REQUEST_BODY_NOT_READABLE","REQUEST_BODY_IS_EMPTY","MODULE_NOT_AVAILABLE","NOT_SUPPORTED_FEATURE","NO_PERMISSION","JOB_NOT_SUPPORTED","QUERY_NOT_SUPPORTED","JOIN_LIMIT_EXCEEDED","CRITERIA_NOT_SUPPORTED","INVALID_CRITERIA","CRITERIA_LIMIT_EXCEEDED","FIELD_AND_COMPARATOR_IN_CRITERIA_NOT_COMPATIBLE","FIELD_IN_CRITERIA_NOT_AVAILABLE","VALUE_IN_CRITERIA_NOT_SUPPORTED","FIELD_AND_VALUE_IN_CRITERIA_NOT_COMPATIBLE","COMPARATOR_AND_VALUE_IN_CRITERIA_NOT_COMPATIBLE","COMPARATOR_AND_ENCRYPTED_VALUE_IN_CRITERIA_NOT_COMPATIBLE","FIELD_NOT_AVAILABLE","FIELD_NOT_SUPPORTED","VALUE_LIMIT_EXCEEDED_IN_CRITERIA","PAGE_NOT_SUPPORTED","TOO_MANY_REQUESTS","CALLBACK_FAILURE","FIELD_IN_CRITERIA_NOT_SUPPORTED","FIELD_COMPARATOR_IN_CRITERIA_NOT_SUPPORTED","CVID_NOT_SUPPORTED","BAD_REQUEST","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"max_limit","type":"Integer"},{"name":"resource","type":"String"},{"name":"message","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"info_message","type":"String"},{"name":"parent_api_name","type":"String"}],"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","Provided service name %s is not valid/not supported","Requested operation is an invalid bulk operation","record not in process","The requested resource doesn't exist.","Media type is not supported.","Unable to parse the request body.","Request body is empty.","Requested module '%s' is not available.","Feature is not supported"," permission denied","Invalid module for the query. Module '%s' is not supported.","Invalid bulk %s job.","Invalid query for bulk %s job. Query '%s' is not supported.","Invalid URL '%s' for callback.","Invalid request method %s for callback.","Join limit exceeded for the query. Maximum number of joins supported in a query is %d","Invalid criteria for the query. Criteria %s is not supported.","Invalid criteria %s for the query.","Ambiguous criteria %s. Criteria can have either {group"," group_operator} or {api_name"," comparator"," value}.","Ambiguous group in criteria %s. Group should be used only when there are more than one criteria","Number of criteria exceeded the maximum limit of %d","Field api name '%s' for criteria %s is not supported.","Field api name '%s' is not supported with comparator '%s' for criteria %s.","Field api name '%s' is not available for criteria %s. Check visibility and permission for the field","Field api name '%s' doesn't support this comparator '%s' for criteria %s.","Value '%s' is not supported for criteria %s.","Field '%s' is not supported with value '%s' for criteria %s.","Comparator '%s' is not supported with value '%s' for criteria %s.","Comparator '%s' is not supported with value '%s' for criteria %s as the value is encrypted.","Criteria %s doesn't support this logical group operator '%s'. Supported operators are 'and'"," 'or'.","Requested field api name '%s' is not available for the module '%s'. Check permission or visibility for the field.","Invalid field for the module provided in fields. Field api name '%s' is not supported for this module '%s'.","Value exceeded limit %d","Invalid page number for query. Page %s is not supported for the query.","Invalid page number for query. Page %s is not supported for the query. Page range is from %d to %d.","Many requests fired in concurrent than the allowed limit","Callback failed after %d attempts."],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/related_records/action_response":{"classes":["core/com/zoho/crm/api/related_records/api_exception","core/com/zoho/crm/api/related_records/success_response"],"interface":true},"core/com/zoho/crm/api/fields/history_tracking":{"module":{"structure_name":"core/com/zoho/crm/api/fields/history_tracking_module","name":"module","type":"core/com/zoho/crm/api/fields/history_tracking_module"},"durationConfiguredField":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"duration_configured_field","type":"core/com/zoho/crm/api/modules/minified_module"}},"core/com/zoho/crm/api/blueprint/layout":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/deal_contact_roles/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/deal_contact_roles/data","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/deal_contact_roles/info","name":"info","type":"core/com/zoho/crm/api/deal_contact_roles/info"}},"core/com/zoho/crm/api/record/price_book":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"}},"core/com/zoho/crm/api/shift_hours/shift_count":{"totalShift":{"name":"total_shift","type":"Integer"},"totalShiftWithUser":{"name":"total_shift_with_user","type":"Integer"}},"core/com/zoho/crm/api/user_groups/association_module":{"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"}},"core/com/zoho/crm/api/territories/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/service_preference/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["Appointments preferences updated successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/blueprint/convert_mapping":{"deals":{"structure_name":"core/com/zoho/crm/api/blueprint/module_mapping","name":"Deals","type":"core/com/zoho/crm/api/blueprint/module_mapping"},"accounts":{"structure_name":"core/com/zoho/crm/api/blueprint/module_mapping","name":"Accounts","type":"core/com/zoho/crm/api/blueprint/module_mapping"},"contacts":{"structure_name":"core/com/zoho/crm/api/blueprint/module_mapping","name":"Contacts","type":"core/com/zoho/crm/api/blueprint/module_mapping"}},"core/com/zoho/crm/api/taxes/response_handler":{"classes":["core/com/zoho/crm/api/taxes/response_wrapper","core/com/zoho/crm/api/taxes/api_exception"],"interface":true},"core/com/zoho/crm/api/contact_roles/response_handler":{"classes":["core/com/zoho/crm/api/contact_roles/api_exception","core/com/zoho/crm/api/contact_roles/body_wrapper"],"interface":true},"core/com/zoho/crm/api/definition/minified_property":{"apiName":{"name":"api_name","type":"String"},"dataType":{"name":"data_type","type":"String"},"length":{"name":"length","type":"Integer"},"readOnly":{"name":"read_only","type":"Boolean"},"required":{"name":"required","type":"Boolean"},"properties":{"structure_name":"Object","name":"properties","type":"List"}},"core/com/zoho/crm/api/roles/reporting_to":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/profiles/category_module":{"displayLabel":{"name":"display_label","type":"String"},"permissionsDetails":{"name":"permissions_details","type":"List"},"module":{"name":"module","type":"String"},"name":{"name":"name","type":"String"}},"core/com/zoho/crm/api/mass_delete_cvid/response_handler":{"classes":["core/com/zoho/crm/api/mass_delete_cvid/api_exception","core/com/zoho/crm/api/mass_delete_cvid/response_wrapper"],"interface":true},"core/com/zoho/crm/api/tags/associated_places":{"resources":{"name":"resources","type":"List"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/blueprint/blue_print":{"processInfo":{"structure_name":"core/com/zoho/crm/api/blueprint/process_info","name":"process_info","type":"core/com/zoho/crm/api/blueprint/process_info"},"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"core/com/zoho/crm/api/record/record"},"transitionId":{"name":"transition_id","type":"String"},"transitions":{"structure_name":"core/com/zoho/crm/api/blueprint/transition","name":"transitions","type":"List"}},"core/com/zoho/crm/api/portals/body_wrapper":{"portals":{"structure_name":"core/com/zoho/crm/api/portals/portals","name":"portals","type":"List"}},"core/com/zoho/crm/api/users_unavailability/action_handler":{"classes":["core/com/zoho/crm/api/users_unavailability/action_wrapper","core/com/zoho/crm/api/users_unavailability/api_exception"],"interface":true},"core/com/zoho/crm/api/notifications/get_notifications_param":{"perPage":{"name":"per_page","type":"Integer"},"module":{"name":"module","type":"String"},"page":{"name":"page","type":"Integer"},"channelId":{"name":"channel_id","type":"Long"}},"core/com/zoho/crm/api/fields/crypt":{"mode":{"name":"mode","type":"String"},"column":{"name":"column","type":"String"},"encfldids":{"name":"encFldIds","type":"List"},"table":{"name":"table","type":"String"},"notify":{"name":"notify","type":"String"},"status":{"name":"status","type":"Integer"}},"core/com/zoho/crm/api/mass_change_owner/owner":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/file_details":{"sizeS":{"name":"Size__s","type":"String"},"fileIdS":{"name":"File_Id__s","type":"String"},"id":{"name":"id","type":"Long"},"delete1":{"name":"_delete","type":"String"},"fileNameS":{"name":"File_Name__s","type":"String"}},"core/com/zoho/crm/api/org/response_handler":{"classes":["core/com/zoho/crm/api/org/response_wrapper","core/com/zoho/crm/api/org/api_exception"],"interface":true},"core/com/zoho/crm/api/scoring_rules/get_scoring_rule_param":{"name":{"name":"name","type":"Long"},"active":{"values":[true,false],"name":"active","type":"Boolean"},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/users_unavailability/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["Unavailability Hours saved successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/email_related_records/attachments":{"size":{"name":"size","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/mail_merge/mail_merge_wrapper":{"sendMailMerge":{"structure_name":"core/com/zoho/crm/api/mail_merge/mail_merge","name":"send_mail_merge","type":"List"}},"core/com/zoho/crm/api/scoring_rules/info":{"call":{"name":"call","type":"Boolean"},"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"DateTime"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"},"email":{"name":"email","type":"Boolean"}},"core/com/zoho/crm/api/variables/get_variables_param":{"group":{"name":"group","type":"String"}},"core/com/zoho/crm/api/business_hours/break_hours_custom_timing":{"days":{"values":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"name":"days","type":"utils/util/choice"},"businessTiming":{"name":"business_timing","type":"List"}},"core/com/zoho/crm/api/business_hours/action_response":{"classes":["core/com/zoho/crm/api/business_hours/business_hours_created","core/com/zoho/crm/api/business_hours/api_exception"],"interface":true},"core/com/zoho/crm/api/user_groups/get_groups_param":{"include":{"name":"include","type":"String"},"perPage":{"name":"per_page","type":"String"},"name":{"name":"name","type":"String"},"page":{"name":"page","type":"String"}},"core/com/zoho/crm/api/notifications/delete_details":{"resourceId":{"name":"resource_id","type":"Long"},"resourceUri":{"name":"resource_uri","type":"String"},"channelId":{"name":"channel_id","type":"String"}},"core/com/zoho/crm/api/variables/response_wrapper":{"variables":{"structure_name":"core/com/zoho/crm/api/variables/variable","name":"variables","type":"List"}},"core/com/zoho/crm/api/timelines/related_record":{"module":{"structure_name":"core/com/zoho/crm/api/timelines/name_id_structure","name":"module","type":"core/com/zoho/crm/api/timelines/name_id_structure"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/service_preference/action_wrapper":{"servicePreferences":{"structure_name":"core/com/zoho/crm/api/service_preference/action_response","name":"service_preferences","interface":true,"type":"core/com/zoho/crm/api/service_preference/action_response"}},"core/com/zoho/crm/api/record/pricing_details":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"discount":{"name":"discount","type":"Double"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"},"toRange":{"name":"to_range","type":"Double"},"fromRange":{"name":"from_range","type":"Double"}},"core/com/zoho/crm/api/related_lists/response_wrapper":{"relatedLists":{"structure_name":"core/com/zoho/crm/api/related_lists/related_list","name":"related_lists","type":"List"}},"core/com/zoho/crm/api/mail_merge/action_wrapper":{"sendMailMerge":{"structure_name":"core/com/zoho/crm/api/mail_merge/action_response","name":"send_mail_merge","type":"List"}},"core/com/zoho/crm/api/modules/lookup_field":{"sequenceNumber":{"name":"sequence_number","type":"Integer"},"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/variable_groups/api_exception":{"code":{"values":["OAUTH_SCOPE_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","BAD_REQUEST","NO_PERMISSION","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/territories/action_handler":{"classes":["core/com/zoho/crm/api/territories/api_exception","core/com/zoho/crm/api/territories/action_wrapper"],"interface":true},"core/com/zoho/crm/api/deal_contact_roles/action_response":{"classes":["core/com/zoho/crm/api/deal_contact_roles/success_response","core/com/zoho/crm/api/deal_contact_roles/api_exception"],"interface":true},"core/com/zoho/crm/api/associate_email/from":{"userName":{"name":"user_name","type":"String"},"email":{"regex":"[a-z]{7}[@]zoho[.]com","name":"email","type":"String"}},"core/com/zoho/crm/api/deal_contact_roles/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/service_preference/response_wrapper":{"servicePreferences":{"structure_name":"core/com/zoho/crm/api/service_preference/service_preference","name":"service_preferences","type":"core/com/zoho/crm/api/service_preference/service_preference"}},"core/com/zoho/crm/api/from_addresses/address":{"default1":{"name":"default","type":"Boolean"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"userName":{"name":"user_name","type":"String"},"email":{"regex":"[a-z]{7}[@]zoho[.]com","name":"email","type":"String"}},"core/com/zoho/crm/api/record/create_records_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/currencies/currency_format":{"thousandSeparator":{"values":["Comma","Space","Period","Space"],"name":"thousand_separator","type":"utils/util/choice"},"decimalPlaces":{"values":["0","2","3"],"name":"decimal_places","type":"utils/util/choice"},"decimalSeparator":{"values":["Period","Comma"],"name":"decimal_separator","type":"utils/util/choice"}},"core/com/zoho/crm/api/pipeline/d_pipeline":{"delete1":{"structure_name":"core/com/zoho/crm/api/pipeline/delete","name":"_delete","type":"core/com/zoho/crm/api/pipeline/delete"}},"core/com/zoho/crm/api/reschedule_history/response_handler":{"classes":["core/com/zoho/crm/api/reschedule_history/api_exception","core/com/zoho/crm/api/reschedule_history/response_wrapper"],"interface":true},"core/com/zoho/crm/api/email_related_records/response_handler":{"classes":["core/com/zoho/crm/api/email_related_records/response_wrapper","core/com/zoho/crm/api/email_related_records/api_exception"],"interface":true},"core/com/zoho/crm/api/related_records/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/territory_users/response_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/users/users","name":"users","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/territory_users/info","name":"info","type":"core/com/zoho/crm/api/territory_users/info"}},"core/com/zoho/crm/api/portal_user_type/personality_module":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"},"pluralLabel":{"name":"plural_label","type":"String"}},"core/com/zoho/crm/api/wizards/node":{"posX":{"name":"pos_x","type":"Integer"},"posY":{"name":"pos_y","type":"Integer"},"startNode":{"name":"start_node","type":"Boolean"},"screen":{"structure_name":"core/com/zoho/crm/api/wizards/screen","name":"screen","type":"core/com/zoho/crm/api/wizards/screen"}},"core/com/zoho/crm/api/wizards/conditional_rules":{"criteria":{"structure_name":"core/com/zoho/crm/api/wizards/criteria","name":"criteria","type":"core/com/zoho/crm/api/wizards/criteria"},"executeOn":{"values":["create","edit","create_edit"],"name":"execute_on","type":"utils/util/choice"},"actions":{"structure_name":"core/com/zoho/crm/api/wizards/actions","name":"actions","type":"List"},"queryId":{"name":"query_id","type":"Long"}},"core/com/zoho/crm/api/record/mass_update_territory":{"id":{"name":"id","type":"Long"},"includeChild":{"name":"include_child","type":"Boolean"}},"core/com/zoho/crm/api/cancel_meetings/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/cancel_meetings/notify","name":"data","type":"List"}},"core/com/zoho/crm/api/service_preference/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR","INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"structure_name":"utils/util/choice","values":["create_deal","do_not_create_deal"],"name":"supported_values","type":"List"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/count_wrapper":{"count":{"name":"count","type":"Long"}},"core/com/zoho/crm/api/contact_roles/body_wrapper":{"contactRoles":{"structure_name":"core/com/zoho/crm/api/contact_roles/contact_role","name":"contact_roles","type":"List"}},"core/com/zoho/crm/api/custom_views/fields":{"apiName":{"name":"api_name","type":"String"},"pin":{"name":"_pin","type":"Boolean"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/conversion_options_response_wrapper":{"conversionoptions":{"structure_name":"core/com/zoho/crm/api/record/conversion_option","name":"__conversion_options","type":"core/com/zoho/crm/api/record/conversion_option"}},"core/com/zoho/crm/api/shift_hours/action_wrapper":{"shiftHours":{"structure_name":"core/com/zoho/crm/api/shift_hours/action_response","name":"shift_hours","type":"List"}},"core/com/zoho/crm/api/download_attachments/get_download_attachments_details_param":{"messageId":{"name":"message_id","type":"String","required":true},"userId":{"name":"user_id","type":"Long","required":true}},"core/com/zoho/crm/api/territories/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/pipeline/transfer_pipelines_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/tags/conflict_wrapper":{"conflictId":{"name":"conflict_id","type":"String"}},"core/com/zoho/crm/api/users_transfer_delete/action_response":{"classes":["core/com/zoho/crm/api/users_transfer_delete/api_exception","core/com/zoho/crm/api/users_transfer_delete/success_response"],"interface":true},"core/com/zoho/crm/api/portal_invite/action_handler":{"classes":["core/com/zoho/crm/api/portal_invite/action_wrapper","core/com/zoho/crm/api/portal_invite/api_exception"],"interface":true},"core/com/zoho/crm/api/tags/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"created_time","type":"DateTime"},{"name":"modified_time","type":"DateTime"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"id","type":"Long"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"color_code","type":"String"}],"name":"details","type":"Map"},"message":{"values":["tags created successfully","tags updated successfully","tags deleted successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_invite/body_wrapper":{"portalInvite":{"structure_name":"core/com/zoho/crm/api/portal_invite/portal_invite","name":"portal_invite","type":"List"}},"core/com/zoho/crm/api/blueprint/crypt":{"mode":{"name":"mode","type":"String"},"column":{"name":"column","type":"String"},"table":{"name":"table","type":"String"},"status":{"name":"status","type":"Integer"}},"core/com/zoho/crm/api/blueprint/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","RECORD_NOT_IN_PROCESS","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"message","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"info_message","type":"String"},{"name":"parent_api_name","type":"String"}],"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","invalid transition","invalid data","record not in process"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/currencies/disable_success":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/modules/action_handler":{"classes":["core/com/zoho/crm/api/modules/action_wrapper","core/com/zoho/crm/api/modules/api_exception"],"interface":true},"core/com/zoho/crm/api/wizards/response_wrapper":{"wizards":{"structure_name":"core/com/zoho/crm/api/wizards/wizard","name":"wizards","type":"List"}},"core/com/zoho/crm/api/privacy_configurable_apps/wrapper":{"privacyConfigurableApps":{"structure_name":"core/com/zoho/crm/api/privacy_configurable_apps/apps","name":"privacy_configurable_apps","type":"List"}},"core/com/zoho/crm/api/download_inline_images/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","the request does not contain any file","invalid file type"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/users_territories/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/attachments/parent_id":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/backup/history_param":{"perPage":{"name":"per_page","type":"String"},"page":{"name":"page","type":"String"}},"core/com/zoho/crm/api/notes/get_notes_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"String","required":true}},"core/com/zoho/crm/api/notes/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/notes/note","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/notes/info","name":"info","type":"core/com/zoho/crm/api/notes/info"}},"core/com/zoho/crm/api/bulk_write/response_handler":{"classes":["core/com/zoho/crm/api/bulk_write/api_exception","core/com/zoho/crm/api/bulk_write/file_body_wrapper"],"interface":true},"core/com/zoho/crm/api/appointment_preference/response_wrapper":{"appointmentPreferences":{"structure_name":"core/com/zoho/crm/api/appointment_preference/appointment_preference","name":"appointment_preferences","type":"core/com/zoho/crm/api/appointment_preference/appointment_preference"}},"core/com/zoho/crm/api/users/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/assignment_rules/action_wrapper":{"assignmentRules":{"structure_name":"core/com/zoho/crm/api/assignment_rules/action_response","name":"assignment_rules","type":"List"}},"core/com/zoho/crm/api/field_map_dependency/delete_map_dependency_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline_wrapper":{"transferPipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/transfer_pipeline","name":"transfer_pipeline","type":"List"}},"core/com/zoho/crm/api/users_territories/action_response":{"classes":["core/com/zoho/crm/api/users_territories/api_exception","core/com/zoho/crm/api/users_territories/success_response"],"interface":true},"core/com/zoho/crm/api/mass_delete_cvid/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","INTERNAL_SERVER_ERROR","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"values":["cvid"],"name":"api_name","type":"utils/util/choice"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"}],"name":"details","type":"Map"},"message":{"values":["the cvid given seems to be invalid","the module name given seems to be invalid","required field not found"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/holidays/create_shift_holiday":{"holidays":{"structure_name":"core/com/zoho/crm/api/holidays/shift_holiday","name":"holidays","type":"List"}},"core/com/zoho/crm/api/attachments/action_handler":{"classes":["core/com/zoho/crm/api/attachments/action_wrapper","core/com/zoho/crm/api/attachments/api_exception"],"interface":true},"core/com/zoho/crm/api/record/get_record_using_external_id_param":{"cvid":{"name":"cvid","type":"String"},"uid":{"name":"uid","type":"String"},"approved":{"name":"approved","type":"String"},"startDateTime":{"name":"startDateTime","type":"DateTime"},"converted":{"name":"converted","type":"String"},"territoryId":{"name":"territory_id","type":"String"},"fields":{"name":"fields","type":"String"},"endDateTime":{"name":"endDateTime","type":"DateTime"},"includeChild":{"name":"include_child","type":"String"}},"core/com/zoho/crm/api/profiles/profile":{"displayLabel":{"name":"display_label","type":"String"},"permissionType":{"name":"permission_type","type":"String"},"permissionsDetails":{"structure_name":"core/com/zoho/crm/api/profiles/permission_detail","name":"permissions_details","type":"List"},"modifiedTime":{"name":"modified_time","type":"DateTime"},"defaultview":{"structure_name":"core/com/zoho/crm/api/profiles/default_view","name":"_default_view","type":"core/com/zoho/crm/api/profiles/default_view"},"custom":{"name":"custom","type":"Boolean"},"description":{"name":"description","max-length":250,"type":"String"},"delete1":{"name":"_delete","type":"Boolean"},"type":{"values":["normal_profile","lite_profile"],"name":"type","type":"utils/util/choice"},"sections":{"structure_name":"core/com/zoho/crm/api/profiles/section","name":"sections","type":"List"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"default1":{"name":"default","type":"Boolean"},"name":{"name":"name","max-length":50,"type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/fields/formula":{"expression":{"values":["Dayofmonth(${Created_Time})"],"name":"expression","type":"utils/util/choice"},"returnType":{"values":["double"],"name":"return_type","type":"utils/util/choice"}},"core/com/zoho/crm/api/backup/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/users_transfer_delete/get_status_param":{"jobId":{"name":"job_id","type":"Long","required":true}},"core/com/zoho/crm/api/custom_views/owner":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/holidays/create_holidays_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/scoring_rules/body_wrapper":{"scoringRules":{"structure_name":"core/com/zoho/crm/api/scoring_rules/scoring_rule","name":"scoring_rules","type":"List"}},"core/com/zoho/crm/api/appointment_preference/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["Appointments preferences updated successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_write/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","FILE_TOO_LARGE","INVALID_FILE_FORMAT","MANDATORY_FIELDS_NOT_MAPPED","MANDATORY_NOT_FOUND","INVALID_FIELD","INVALID_FORMAT","INVALID_FILE_ID","HEADER_LIMIT_EXCEEDED","COLUMN_INDEX_NOT_FOUND","MODULE_NOT_AVAILABLE","INVALID_DATA","DUPLICATE_DATA","NOT_APPROVED","BLOCKED_RECORD","CANNOT_PROCESS","LIMIT_EXCEEDED","RESOURCE_NOT_FOUND","MISSING_REQUIRED_KEY","INVALID_FIELD_NAME","FILE_NOT_SUPPORTED","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"xError":{"values":["check if headers [feature, X-CRM-ORG] are present and valid"],"name":"x-error","type":"utils/util/choice"},"httpStatus":{"name":"http_status","type":"String"},"errorMessage":{"values":["Bad Request"],"name":"ERROR_MESSAGE","type":"utils/util/choice"},"errorCode":{"name":"ERROR_CODE","type":"Integer"},"details":{"name":"details","type":"Map"},"xInfo":{"values":["Link not valid"],"name":"x-info","type":"utils/util/choice"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","invalid file format. only zip format is supported","File size too large to process","The requested resource doesn't exist.","required key operation is not found in request body.","improper file id","required key index for field Company is not found in request body.","All mandatory fields are not mapped for the layout","Requested module 'asdf' is not available.","invalid mapping. invalid api_name ast_Name.","File not supported for bulk write"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"},"info":{"values":["Forbidden"],"name":"info","type":"utils/util/choice"}},"core/com/zoho/crm/api/territories/transfer_territory":{"id":{"name":"id","type":"Long"},"deletePreviousForecasts":{"name":"delete_previous_forecasts","type":"Boolean"},"transferToId":{"name":"transfer_to_id","type":"Long"}},"core/com/zoho/crm/api/org/action_handler":{"classes":["core/com/zoho/crm/api/org/success_response","core/com/zoho/crm/api/org/api_exception"],"interface":true},"core/com/zoho/crm/api/users/role":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/scoring_rules/response_wrapper":{"scoringRules":{"structure_name":"core/com/zoho/crm/api/scoring_rules/scoring_rule","name":"scoring_rules","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/scoring_rules/info","name":"info","type":"core/com/zoho/crm/api/scoring_rules/info"}},"core/com/zoho/crm/api/users/action_response":{"classes":["core/com/zoho/crm/api/users/api_exception","core/com/zoho/crm/api/users/success_response"],"interface":true},"core/com/zoho/crm/api/timelines/picklist_detail":{"displayValue":{"name":"display_value","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"actualValue":{"name":"actual_value","type":"String"},"colourCode":{"name":"colour_code","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/definition/response_wrapper":{"definition":{"structure_name":"core/com/zoho/crm/api/definition/definition","name":"definition","type":"core/com/zoho/crm/api/definition/definition"}},"core/com/zoho/crm/api/privacy_preference/section":{"name":{"name":"name","type":"String"},"tooltip":{"name":"tooltip","type":"String"},"options":{"structure_name":"core/com/zoho/crm/api/privacy_preference/option","name":"options","type":"List"},"showType":{"name":"show_type","type":"String"},"title":{"name":"title","type":"String"}},"core/com/zoho/crm/api/shift_hours/action_response":{"classes":["core/com/zoho/crm/api/shift_hours/api_exception","core/com/zoho/crm/api/shift_hours/success_response"],"interface":true},"core/com/zoho/crm/api/territories/associated_users_count":{"count":{"name":"count","type":"String"},"territory":{"structure_name":"core/com/zoho/crm/api/territories/minified_territory","name":"territory","type":"core/com/zoho/crm/api/territories/minified_territory"}},"core/com/zoho/crm/api/holidays/shift_hour":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/related_records/get_related_records_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"},"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/service_preference/service_preference":{"jobSheetEnabled":{"name":"job_sheet_enabled","type":"Boolean"}},"core/com/zoho/crm/api/portals/action_response":{"classes":["core/com/zoho/crm/api/portals/api_exception","core/com/zoho/crm/api/portals/success_response"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/action_handler":{"classes":["core/com/zoho/crm/api/field_map_dependency/action_wrapper","core/com/zoho/crm/api/field_map_dependency/api_exception"],"interface":true},"core/com/zoho/crm/api/custom_views/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"default1":{"name":"default","type":"Long"},"count":{"name":"count","type":"Integer"},"translation":{"structure_name":"core/com/zoho/crm/api/custom_views/translation","name":"translation","type":"core/com/zoho/crm/api/custom_views/translation"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/appointment_preference/action_response":{"classes":["core/com/zoho/crm/api/appointment_preference/api_exception","core/com/zoho/crm/api/appointment_preference/success_response"],"interface":true},"core/com/zoho/crm/api/bulk_write/action_response":{"classes":["core/com/zoho/crm/api/bulk_write/success_response","core/com/zoho/crm/api/bulk_write/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/bulk_validation":{"alert":{"name":"alert","type":"Boolean"},"assignment":{"name":"assignment","type":"Boolean"},"criteria":{"name":"criteria","type":"Boolean"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/fields/external":{"show":{"name":"show","type":"Boolean"},"type":{"values":["user","org"],"name":"type","type":"utils/util/choice"},"allowMultipleConfig":{"name":"allow_multiple_config","type":"Boolean"}},"core/com/zoho/crm/api/bulk_write/result":{"downloadUrl":{"name":"download_url","type":"String"}},"core/com/zoho/crm/api/record/line_tax":{"displayName":{"name":"display_name","type":"String"},"percentage":{"name":"percentage","type":"Double"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"value":{"name":"value","type":"Double"}},"core/com/zoho/crm/api/custom_views/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/business_hours/business_hours_created":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["Business Hours saved successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/assignment_rules/action_response":{"classes":["core/com/zoho/crm/api/assignment_rules/api_exception","core/com/zoho/crm/api/assignment_rules/success_response"],"interface":true},"core/com/zoho/crm/api/appointment_preference/action_handler":{"classes":["core/com/zoho/crm/api/appointment_preference/api_exception","core/com/zoho/crm/api/appointment_preference/action_wrapper"],"interface":true},"core/com/zoho/crm/api/files/get_file_param":{"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/business_hours/body_wrapper":{"businessHours":{"structure_name":"core/com/zoho/crm/api/business_hours/business_hours","name":"business_hours","type":"core/com/zoho/crm/api/business_hours/business_hours"}},"core/com/zoho/crm/api/related_records/get_related_record_param":{"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/mass_convert/get_job_status_param":{"jobId":{"name":"job_id","type":"Long","required":true}},"core/com/zoho/crm/api/email_related_records/user_details":{"userName":{"name":"user_name","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/share_records/response_wrapper":{"share":{"structure_name":"core/com/zoho/crm/api/share_records/share_record","name":"share","type":"List"},"shareableUser":{"structure_name":"core/com/zoho/crm/api/users/users","name":"shareable_user","type":"List"}},"core/com/zoho/crm/api/share_records/module":{"apiName":{"name":"api_name","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/variables/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/fields":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"apiName":{"name":"api_name","type":"String"},"sharingProperties":{"structure_name":"core/com/zoho/crm/api/modules/sharing_properties","name":"sharing_properties","type":"core/com/zoho/crm/api/modules/sharing_properties"},"webhook":{"name":"webhook","type":"Boolean"},"associatedModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"associated_module","type":"core/com/zoho/crm/api/modules/minified_module"},"defaultValue":{"name":"default_value","type":"String"},"tooltip":{"structure_name":"core/com/zoho/crm/api/fields/tooltip","name":"tooltip","type":"core/com/zoho/crm/api/fields/tooltip"},"quickSequenceNumber":{"name":"quick_sequence_number","type":"String"},"jsonType":{"name":"json_type","type":"String"},"type":{"name":"type","type":"String"},"availableInUserLayout":{"name":"available_in_user_layout","type":"Boolean"},"rollupSummary":{"structure_name":"core/com/zoho/crm/api/fields/rollup_summary","name":"rollup_summary","type":"core/com/zoho/crm/api/fields/rollup_summary"},"blueprintSupported":{"name":"blueprint_supported","type":"Boolean"},"createdTime":{"name":"created_time","type":"DateTime"},"showType":{"name":"show_type","type":"Integer"},"globalPicklist":{"name":"global_picklist","type":"Object"},"id":{"name":"id","type":"Long"},"additionalColumn":{"name":"additional_column","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"filterable":{"name":"filterable","type":"Boolean"},"emailParser":{"structure_name":"core/com/zoho/crm/api/fields/email_parser","name":"email_parser","type":"core/com/zoho/crm/api/fields/email_parser"},"visible":{"name":"visible","type":"Boolean"},"dataType":{"values":["formula","text","boolean","picklist","datetime","website","autonumber","textarea","email","phone","integer","double","date","formula","text","boolean","picklist","datetime","website","autonumber","textarea","lookup","email","userlookup","phone","integer","double","date"],"name":"data_type","type":"utils/util/choice"},"profiles":{"structure_name":"core/com/zoho/crm/api/fields/profile","name":"profiles","type":"List"},"readOnly":{"name":"read_only","type":"Boolean"},"historyTracking":{"structure_name":"core/com/zoho/crm/api/fields/history_tracking","name":"history_tracking","type":"core/com/zoho/crm/api/fields/history_tracking"},"systemMandatory":{"name":"system_mandatory","type":"Boolean"},"separator":{"name":"separator","type":"Boolean"},"customField":{"name":"custom_field","type":"Boolean"},"searchable":{"name":"searchable","type":"Boolean"},"decimalPlace":{"name":"decimal_place","type":"Integer"},"createdSource":{"name":"created_source","type":"String"},"displayType":{"name":"display_type","type":"Integer"},"external":{"structure_name":"core/com/zoho/crm/api/fields/external","name":"external","type":"core/com/zoho/crm/api/fields/external"},"subModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"sub_module","type":"core/com/zoho/crm/api/modules/minified_module"},"unique":{"structure_name":"core/com/zoho/crm/api/fields/unique","name":"unique","type":"core/com/zoho/crm/api/fields/unique"},"viewType":{"structure_name":"core/com/zoho/crm/api/fields/view_type","name":"view_type","type":"core/com/zoho/crm/api/fields/view_type"},"displayField":{"name":"display_field","type":"Boolean"},"operationType":{"structure_name":"core/com/zoho/crm/api/fields/operation_type","name":"operation_type","type":"core/com/zoho/crm/api/fields/operation_type"},"hipaaComplianceEnabled":{"name":"hipaa_compliance_enabled","type":"Boolean"},"crypt":{"structure_name":"core/com/zoho/crm/api/fields/crypt","name":"crypt","type":"core/com/zoho/crm/api/fields/crypt"},"fileUpoladOptionlist":{"structure_name":"core/com/zoho/crm/api/fields/file_upolad_option","name":"file_upolad_optionlist","type":"List"},"enableColourCode":{"name":"enable_colour_code","type":"Boolean"},"virtualField":{"name":"virtual_field","type":"Boolean"},"hipaaCompliance":{"structure_name":"core/com/zoho/crm/api/fields/hipaa_compliance","name":"hipaa_compliance","type":"core/com/zoho/crm/api/fields/hipaa_compliance"},"associationDetails":{"structure_name":"core/com/zoho/crm/api/fields/association_details","name":"association_details","type":"core/com/zoho/crm/api/fields/association_details"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/fields/pick_list_value","name":"pick_list_values","type":"List"},"fieldLabel":{"name":"field_label","type":"String"},"referFromField":{"structure_name":"core/com/zoho/crm/api/fields/refer_from_field","name":"refer_from_field","type":"core/com/zoho/crm/api/fields/refer_from_field"},"fieldReadOnly":{"name":"field_read_only","type":"Boolean"},"businesscardSupported":{"name":"businesscard_supported","type":"Boolean"},"allowedModules":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"allowed_modules","type":"List"},"currency":{"structure_name":"core/com/zoho/crm/api/fields/currency","name":"currency","type":"core/com/zoho/crm/api/fields/currency"},"multiuserlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiuserlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"displayLabel":{"name":"display_label","type":"String"},"lookup":{"structure_name":"core/com/zoho/crm/api/fields/lookup","name":"lookup","type":"core/com/zoho/crm/api/fields/lookup"},"length":{"values":[16,120,255,2000,32000,100,50,20],"name":"length","type":"utils/util/choice"},"pickListValuesSortedLexically":{"name":"pick_list_values_sorted_lexically","type":"Boolean"},"sortable":{"name":"sortable","type":"Boolean"},"autoNumber":{"structure_name":"core/com/zoho/crm/api/fields/auto_number","name":"auto_number","type":"core/com/zoho/crm/api/fields/auto_number"},"private1":{"structure_name":"core/com/zoho/crm/api/fields/private","name":"private","type":"core/com/zoho/crm/api/fields/private"},"convertMapping":{"structure_name":"core/com/zoho/crm/api/fields/convert_mapping","name":"convert_mapping","type":"core/com/zoho/crm/api/fields/convert_mapping"},"multiModuleLookup":{"structure_name":"core/com/zoho/crm/api/fields/multi_module_lookup","name":"multi_module_lookup","type":"core/com/zoho/crm/api/fields/multi_module_lookup"},"massUpdate":{"name":"mass_update","type":"Boolean"},"uiType":{"name":"ui_type","type":"Integer"},"formula":{"structure_name":"core/com/zoho/crm/api/fields/formula","name":"formula","type":"core/com/zoho/crm/api/fields/formula"},"category":{"name":"category","type":"Integer"},"multiselectlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiselectlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"columnName":{"name":"column_name","type":"String"}},"core/com/zoho/crm/api/blueprint/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["transition updated successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/maps":{"apiName":{"name":"api_name","type":"String"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/fields/pick_list_value","name":"pick_list_values","type":"List"}},"core/com/zoho/crm/api/notes/get_note_param":{"fields":{"name":"fields","type":"String","required":true}},"core/com/zoho/crm/api/send_mail/inventory_details":{"inventoryTemplate":{"structure_name":"core/com/zoho/crm/api/send_mail/inventory_template","name":"inventory_template","type":"core/com/zoho/crm/api/send_mail/inventory_template"}},"core/com/zoho/crm/api/taxes/preference":{"modifyTaxRates":{"name":"modify_tax_rates","type":"Boolean"},"autoPopulateTax":{"name":"auto_populate_tax","type":"Boolean"}},"core/com/zoho/crm/api/portals/portals":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"createdBy":{"structure_name":"core/com/zoho/crm/api/portals/owner","name":"created_by","type":"core/com/zoho/crm/api/portals/owner"},"name":{"name":"name","max-length":30,"type":"String","min-length":6},"createdTime":{"name":"created_time","type":"DateTime"},"active":{"name":"active","type":"Boolean"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/portals/owner","name":"modified_by","type":"core/com/zoho/crm/api/portals/owner"},"zaid":{"name":"zaid","type":"String"}},"core/com/zoho/crm/api/query/api_exception":{"code":{"values":["INVALID_URL_PATTERN","INVALID_QUERY","SYNTAX_ERROR","OAUTH_SCOPE_MISMATCH","INVALID_REQUEST_METHOD","INVALID_TOKEN","BAD_REQUEST","NO_PERMISSION","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"near","type":"String"},{"name":"column","type":"Integer"},{"name":"line","type":"Integer"},{"name":"clause","type":"String"},{"name":"by","type":"String"},{"name":"limit","type":"Integer"},{"name":"column_name","type":"String"},{"name":"reason","type":"String"},{"name":"module","type":"String"},{"name":"data_type","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"operator","type":"String"}],"name":"details","type":"Map"},"message":{"values":["invalid query formed","value given seems to be invalid for the column","data type not supported","column given seems to be invalid"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/widget":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mail_merge/address":{"addressValueMap":{"structure_name":"core/com/zoho/crm/api/mail_merge/address_value_map","name":"Address_Value_Map","type":"core/com/zoho/crm/api/mail_merge/address_value_map"}},"core/com/zoho/crm/api/reschedule_history/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/reschedule_history/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/notes/action_handler":{"classes":["core/com/zoho/crm/api/notes/action_wrapper","core/com/zoho/crm/api/notes/api_exception"],"interface":true},"core/com/zoho/crm/api/reschedule_history/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/reschedule_history/reschedule_history","name":"data","max-length":100,"type":"List"}},"core/com/zoho/crm/api/users/get_user_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/mass_change_owner/action_response":{"classes":["core/com/zoho/crm/api/mass_change_owner/success_response"],"interface":true},"core/com/zoho/crm/api/record/response_handler":{"classes":["core/com/zoho/crm/api/record/conversion_options_response_wrapper","core/com/zoho/crm/api/record/response_wrapper","core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/file_body_wrapper"],"interface":true},"core/com/zoho/crm/api/portals/response_handler":{"classes":["core/com/zoho/crm/api/portals/response_wrapper","core/com/zoho/crm/api/portals/api_exception"],"interface":true},"core/com/zoho/crm/api/mail_merge/mail_merge_template":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/blueprint/view_type":{"view":{"name":"view","type":"Boolean"},"edit":{"name":"edit","type":"Boolean"},"quickCreate":{"name":"quick_create","type":"Boolean"},"create":{"name":"create","type":"Boolean"}},"core/com/zoho/crm/api/share_records/get_shared_record_details_param":{"view":{"values":["summary","manage"],"name":"view","type":"String"},"sharedTo":{"name":"sharedTo","type":"Long"}},"core/com/zoho/crm/api/layouts/deal_layout_mapping":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"fields":{"structure_name":"core/com/zoho/crm/api/layouts/deal_field","name":"fields","type":"List"}},"core/com/zoho/crm/api/territories/minified_territory":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"subordinates":{"name":"subordinates","type":"Boolean"}},"core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete":{"transfer":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/transfer","name":"transfer","type":"core/com/zoho/crm/api/users_transfer_delete/transfer"},"moveSubordinate":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/move_subordinate","name":"move_subordinate","type":"core/com/zoho/crm/api/users_transfer_delete/move_subordinate"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portals_meta/wrapper":{"relatedLists":{"structure_name":"core/com/zoho/crm/api/portals_meta/related_lists","name":"related_lists","type":"List"}},"core/com/zoho/crm/api/user_groups/associated_user_count":{"associatedUsersCount":{"structure_name":"core/com/zoho/crm/api/user_groups/associated_user","name":"associated_users_count","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/user_groups/info","name":"info","type":"core/com/zoho/crm/api/user_groups/info"}},"core/com/zoho/crm/api/users/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/related_records/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","max-length":100,"type":"List","min-length":1}},"core/com/zoho/crm/api/cancel_meetings/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"expected_data_type","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"id","type":"Long"},{"name":"reason","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/shift_hours/update_shift_hour_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/send_mail/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/send_mail/data","name":"data","type":"List"}},"core/com/zoho/crm/api/email_compose_meta/user":{"zgid":{"name":"zgid","type":"String"},"fullName":{"name":"full_name","type":"String"},"email":{"name":"email","type":"String"},"zuid":{"name":"zuid","type":"String"},"composeSettings":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/compose_settings","name":"compose_settings","type":"core/com/zoho/crm/api/email_compose_meta/compose_settings"}},"core/com/zoho/crm/api/fields/success":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_invite/job_response":{"jobId":{"name":"job_id","type":"Long"},"data":{"structure_name":"core/com/zoho/crm/api/portal_invite/data","name":"data","type":"List"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/blueprint/tool_tip":{"name":{"name":"name","type":"String"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/wizards/screen":{"displayLabel":{"name":"display_label","type":"String"},"conditionalRules":{"structure_name":"core/com/zoho/crm/api/wizards/conditional_rules","name":"conditional_rules","type":"List"},"id":{"name":"id","type":"Long"},"segments":{"structure_name":"core/com/zoho/crm/api/wizards/segment","name":"segments","type":"List"}},"core/com/zoho/crm/api/fields/forecast_category":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users_territories/validation_group":{"classes":["core/com/zoho/crm/api/users_territories/validation","core/com/zoho/crm/api/users_territories/bulk_validation"],"interface":true},"core/com/zoho/crm/api/wizards/criteria":{"comparator":{"name":"comparator","type":"String"},"groupOperator":{"name":"group_operator","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/wizards/field","name":"field","type":"core/com/zoho/crm/api/wizards/field"},"value":{"name":"value","type":"Object"},"group":{"structure_name":"core/com/zoho/crm/api/wizards/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/portal_user_type/owner":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/bulk_read/result":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"downloadUrl":{"name":"download_url","type":"String"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/attachments/owner":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/bulk_write/call_back":{"method":{"values":["post"],"name":"method","type":"utils/util/choice"},"url":{"name":"url","type":"String"}},"core/com/zoho/crm/api/territories/transfer_body_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/territories/transfer_territory","name":"territories","type":"List"}},"core/com/zoho/crm/api/record/delete_records_param":{"ids":{"name":"ids","type":"String","required":true},"wfTrigger":{"name":"wf_trigger","type":"Boolean"}},"core/com/zoho/crm/api/assignment_rules/assignment_rules":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"apiName":{"name":"api_name","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/assignment_rules/created_by","name":"created_by","type":"core/com/zoho/crm/api/assignment_rules/created_by"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"description":{"name":"description","type":"String"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/assignment_rules/created_by","name":"modified_by","type":"core/com/zoho/crm/api/assignment_rules/created_by"},"id":{"name":"id","type":"Long"},"defaultAssignee":{"structure_name":"core/com/zoho/crm/api/assignment_rules/default_assignee","name":"default_assignee","type":"core/com/zoho/crm/api/assignment_rules/default_assignee"}},"core/com/zoho/crm/api/territory_users/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/tags/create_tags_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/related_records/update_related_records_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/assignment_rules/default_assignee":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/holidays/api_exception":{"code":{"values":["DEPENDENT_FIELD_MISSING","PATTERN_NOT_MATCHED","MANDATORY_NOT_FOUND","DUPLICATE_DATA","INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"}],"name":"dependee","type":"Map"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"},{"name":"regex","type":"String"}],"name":"details","type":"Map"},"message":{"values":["Shift id is required for shift holidays","Please check whether the input values are correct","required field not found","duplicate data","Invalid ID","invalid data"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/notifications/delete_notification_param":{"channelIds":{"name":"channel_ids","type":"Long","required":true}},"core/com/zoho/crm/api/layouts/get_layouts_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/taxes/action_handler":{"classes":["core/com/zoho/crm/api/taxes/action_wrapper","core/com/zoho/crm/api/taxes/api_exception"],"interface":true},"core/com/zoho/crm/api/user_groups/action_handler":{"classes":["core/com/zoho/crm/api/user_groups/action_wrapper","core/com/zoho/crm/api/user_groups/api_exception"],"interface":true},"core/com/zoho/crm/api/variable_groups/variable_group":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"name":{"name":"name","type":"String"},"description":{"name":"description","type":"String"},"id":{"name":"id","type":"Long"},"source":{"name":"source","type":"String"}},"core/com/zoho/crm/api/users_territories/action_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/users_territories/action_response","name":"territories","type":"List"}},"core/com/zoho/crm/api/record/upsert_records_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/send_mail/template":{"classes":["core/com/zoho/crm/api/inventory_templates/inventory_template","core/com/zoho/crm/api/email_templates/email_template"],"interface":true},"core/com/zoho/crm/api/hipaa_compliance/action_wrapper":{"hipaaCompliance":{"structure_name":"core/com/zoho/crm/api/hipaa_compliance/action_handler","name":"hipaa_compliance","interface":true,"type":"core/com/zoho/crm/api/hipaa_compliance/action_handler"}},"core/com/zoho/crm/api/from_addresses/response_wrapper":{"fromAddresses":{"structure_name":"core/com/zoho/crm/api/from_addresses/address","name":"from_addresses","type":"List"}},"core/com/zoho/crm/api/record/mass_update_response":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/mass_update"],"interface":true},"core/com/zoho/crm/api/related_records/get_related_records_param":{"perPage":{"name":"per_page","type":"Integer"},"page":{"name":"page","type":"Integer"},"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/user_groups/groups":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"sources":{"structure_name":"core/com/zoho/crm/api/user_groups/sources","name":"sources","type":"List"},"createdBy":{"structure_name":"core/com/zoho/crm/api/user_groups/owner","name":"created_by","type":"core/com/zoho/crm/api/user_groups/owner"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"description":{"name":"description","type":"String"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/user_groups/owner","name":"modified_by","type":"core/com/zoho/crm/api/user_groups/owner"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/change_owner/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/mass_delete_cvid/status":{"failedCount":{"name":"Failed_Count","type":"Integer"},"deletedCount":{"name":"Deleted_Count","type":"Integer"},"totalCount":{"name":"Total_Count","type":"Integer"},"status":{"values":["COMPLETED","RUNNING","FAILED"],"name":"Status","type":"utils/util/choice"}},"core/com/zoho/crm/api/user_groups/get_sources_param":{"perPage":{"name":"per_page","type":"String"},"userType":{"name":"user_type","type":"String"},"page":{"name":"page","type":"String"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/entity_scores/entity_scores":{"scoringRule":{"structure_name":"core/com/zoho/crm/api/entity_scores/scoring_rule_structure","name":"Scoring_Rule","type":"core/com/zoho/crm/api/entity_scores/scoring_rule_structure"},"score":{"name":"Score","type":"Integer"},"fieldStates":{"name":"$field_states","type":"List"},"positiveScore":{"name":"Positive_Score","type":"Integer"},"touchPointPositiveScore":{"name":"Touch_Point_Positive_Score","type":"Integer"},"ziaVisions":{"name":"$zia_visions","type":"Boolean"},"touchPointNegativeScore":{"name":"Touch_Point_Negative_Score","type":"Integer"},"id":{"name":"id","type":"Long"},"negativeScore":{"name":"Negative_Score","type":"Integer"},"entity":{"structure_name":"core/com/zoho/crm/api/entity_scores/entity_structure_group","name":"Entity","interface":true,"type":"core/com/zoho/crm/api/entity_scores/entity_structure_group"},"touchPointScore":{"name":"Touch_Point_Score","type":"Integer"}},"core/com/zoho/crm/api/wizards/connection":{"targetScreen":{"structure_name":"core/com/zoho/crm/api/wizards/screen","name":"target_screen","type":"core/com/zoho/crm/api/wizards/screen"},"sourceButton":{"structure_name":"core/com/zoho/crm/api/wizards/button","name":"source_button","type":"core/com/zoho/crm/api/wizards/button"}},"core/com/zoho/crm/api/modules/response_handler":{"classes":["core/com/zoho/crm/api/modules/response_wrapper","core/com/zoho/crm/api/modules/api_exception"],"interface":true},"core/com/zoho/crm/api/holidays/get_holidays_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/backup/backup":{"requester":{"structure_name":"core/com/zoho/crm/api/backup/requester","name":"requester","type":"core/com/zoho/crm/api/backup/requester"},"rrule":{"name":"rrule","type":"String"},"scheduledDate":{"name":"scheduled_date","type":"DateTime"},"id":{"name":"id","type":"Long"},"startDate":{"name":"start_date","type":"DateTime"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/user_groups/action_response":{"classes":["core/com/zoho/crm/api/user_groups/api_exception","core/com/zoho/crm/api/user_groups/success_response"],"interface":true},"core/com/zoho/crm/api/mass_convert/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/bulk_read/action_handler":{"classes":["core/com/zoho/crm/api/bulk_read/api_exception","core/com/zoho/crm/api/bulk_read/action_wrapper"],"interface":true},"core/com/zoho/crm/api/users_unavailability/response_wrapper":{"usersUnavailability":{"structure_name":"core/com/zoho/crm/api/users_unavailability/users_unavailability","name":"users_unavailability","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/users_unavailability/info","name":"info","type":"core/com/zoho/crm/api/users_unavailability/info"}},"core/com/zoho/crm/api/field_map_dependency/child":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/blueprint/transition":{"executionTime":{"name":"execution_time","type":"DateTime"},"criteriaMatched":{"name":"criteria_matched","type":"Boolean"},"parentTransition":{"structure_name":"core/com/zoho/crm/api/blueprint/transition","name":"parent_transition","type":"core/com/zoho/crm/api/blueprint/transition"},"percentPartialSave":{"name":"percent_partial_save","type":"Integer"},"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"core/com/zoho/crm/api/record/record"},"nextTransitions":{"structure_name":"core/com/zoho/crm/api/blueprint/next_transition","name":"next_transitions","type":"List"},"name":{"name":"name","type":"String"},"criteriaMessage":{"name":"criteria_message","type":"String"},"nextFieldValue":{"name":"next_field_value","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"fields":{"structure_name":"core/com/zoho/crm/api/blueprint/field","name":"fields","type":"List"}},"core/com/zoho/crm/api/users/response_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/users/users","name":"users","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/users/info","name":"info","type":"core/com/zoho/crm/api/users/info"}},"core/com/zoho/crm/api/files/response_handler":{"classes":["core/com/zoho/crm/api/files/api_exception","core/com/zoho/crm/api/files/file_body_wrapper"],"interface":true},"core/com/zoho/crm/api/custom_views/action_handler":{"classes":["core/com/zoho/crm/api/custom_views/api_exception"],"interface":true},"core/com/zoho/crm/api/users_transfer_delete/action_wrapper":{"transferAndDelete":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/action_response","name":"transfer_and_delete","type":"List"}},"core/com/zoho/crm/api/associate_email/associate_email":{"cc":{"structure_name":"core/com/zoho/crm/api/associate_email/to","name":"cc","type":"List"},"dateTime":{"name":"date_time","type":"DateTime"},"bcc":{"structure_name":"core/com/zoho/crm/api/associate_email/to","name":"bcc","type":"List"},"attachments":{"structure_name":"core/com/zoho/crm/api/associate_email/attachments","name":"attachments","type":"List"},"linkedRecord":{"structure_name":"core/com/zoho/crm/api/associate_email/linked_record","name":"linked_record","type":"core/com/zoho/crm/api/associate_email/linked_record"},"subject":{"name":"subject","max-length":250,"type":"String","min-length":1},"from":{"structure_name":"core/com/zoho/crm/api/associate_email/from","name":"from","type":"core/com/zoho/crm/api/associate_email/from"},"mailFormat":{"values":["html","text"],"name":"mail_format","type":"utils/util/choice"},"to":{"structure_name":"core/com/zoho/crm/api/associate_email/to","name":"to","type":"List"},"originalMessageId":{"name":"original_message_id","type":"String"},"sent":{"name":"sent","type":"Boolean"},"content":{"name":"content","type":"String"}},"core/com/zoho/crm/api/fields/api_exception":{"code":{"values":["INVALID_MODULE","MANDATORY_NOT_FOUND","INVALID_DATA","REQUIRED_PARAM_MISSING","LIMIT_EXCEEDED","DEPENDENT_FIELD_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"param_name","type":"String"},{"name":"limit","type":"Integer"},{"structure_name":"core/com/zoho/crm/api/fields/mandatory_details","name":"limit_due_to","type":"List"},{"structure_name":"core/com/zoho/crm/api/fields/mandatory_details","name":"dependee","type":"core/com/zoho/crm/api/fields/mandatory_details"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/blueprint/currency":{"roundingOption":{"name":"rounding_option","type":"String"},"precision":{"name":"precision","type":"Integer"}},"core/com/zoho/crm/api/email_related_records/status":{"lastOpen":{"name":"last_open","type":"DateTime"},"firstOpen":{"name":"first_open","type":"DateTime"},"count":{"name":"count","type":"String"},"bouncedReason":{"name":"bounced_reason","type":"String"},"type":{"name":"type","type":"String"},"bouncedTime":{"name":"bounced_time","type":"DateTime"}},"core/com/zoho/crm/api/record/get_record_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"},"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/users_transfer_delete/body_wrapper":{"transferAndDelete":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete","name":"transfer_and_delete","max-length":1,"type":"List"}},"core/com/zoho/crm/api/scoring_rules/action_handler":{"classes":["core/com/zoho/crm/api/scoring_rules/action_wrapper","core/com/zoho/crm/api/scoring_rules/success_response","core/com/zoho/crm/api/scoring_rules/api_exception"],"interface":true},"core/com/zoho/crm/api/org/org":{"country":{"name":"country","type":"String"},"city":{"name":"city","type":"String"},"companyName":{"name":"company_name","type":"String"},"callIcon":{"name":"call_icon","type":"String"},"description":{"name":"description","type":"String"},"oauthPresence":{"name":"oauth_presence","type":"Boolean"},"gappsEnabled":{"name":"gapps_enabled","type":"Boolean"},"hierarchyPreferences":{"structure_name":"core/com/zoho/crm/api/org/hierarchy_preferences","name":"hierarchy_preferences","type":"core/com/zoho/crm/api/org/hierarchy_preferences"},"ziaPortalId":{"name":"zia_portal_id","type":"String"},"employeeCount":{"regex":"[0-9]+","name":"employee_count","max-length":18,"type":"String"},"street":{"name":"street","type":"String"},"countryCode":{"name":"country_code","type":"String"},"checkinPreferences":{"structure_name":"core/com/zoho/crm/api/org/checkin_preferences","name":"checkin_preferences","type":"core/com/zoho/crm/api/org/checkin_preferences"},"currencyLocale":{"name":"currency_locale","type":"String"},"alias":{"name":"alias","type":"String"},"currency":{"name":"currency","type":"String"},"id":{"name":"id","type":"String"},"state":{"name":"state","type":"String"},"fax":{"name":"fax","type":"String"},"ziaZgid":{"name":"zia_zgid","type":"Integer"},"primaryEmail":{"name":"primary_email","type":"String"},"zip":{"name":"zip","type":"String"},"website":{"regex":"www[.][a-z0-9]+[.][a-z]{3}","name":"website","type":"String"},"ezgid":{"name":"ezgid","type":"String"},"mobile":{"name":"mobile","type":"String"},"photoId":{"name":"photo_id","type":"String"},"translationEnabled":{"name":"translation_enabled","type":"Boolean"},"currencySymbol":{"name":"currency_symbol","type":"String"},"timeZone":{"name":"time_zone","type":"TimeZone"},"privacySettings":{"name":"privacy_settings","type":"Boolean"},"maxPerPage":{"name":"max_per_page","type":"Integer"},"zgid":{"name":"zgid","type":"String"},"licenseDetails":{"structure_name":"core/com/zoho/crm/api/org/license_details","name":"license_details","type":"core/com/zoho/crm/api/org/license_details"},"mcStatus":{"name":"mc_status","type":"Boolean"},"primaryZuid":{"name":"primary_zuid","type":"String"},"liteUsersEnabled":{"name":"lite_users_enabled","type":"Boolean"},"phone":{"name":"phone","type":"String"},"isoCode":{"name":"iso_code","type":"String"},"domainName":{"name":"domain_name","type":"String"},"deletableOrgAccount":{"name":"deletable_org_account","type":"Boolean"},"hipaaComplianceEnabled":{"name":"hipaa_compliance_enabled","type":"Boolean"}},"core/com/zoho/crm/api/attachments/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/attachments/attachment","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/attachments/info","name":"info","type":"core/com/zoho/crm/api/attachments/info"}},"core/com/zoho/crm/api/modules/lookup_field_properties":{"fields":{"structure_name":"core/com/zoho/crm/api/modules/lookup_field","name":"fields","type":"List"}},"core/com/zoho/crm/api/fields/history_tracking_module":{"layout":{"structure_name":"core/com/zoho/crm/api/layouts/layouts","name":"layout","type":"core/com/zoho/crm/api/layouts/layouts"},"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"module":{"structure_name":"core/com/zoho/crm/api/fields/history_tracking_module","name":"module","type":"core/com/zoho/crm/api/fields/history_tracking_module"},"moduleName":{"name":"module_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/pipeline/get_pipelines_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/field_attachments/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/change_owner/api_exception":{"code":{"values":["NO_PERMISSION","INVALID_DATA","MANDATORY_NOT_FOUND","EXPECTED_FIELD_MISSING","NOT_SUPPORTED","AMBIGUITY_DURING_PROCESSING","INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"permissions","type":"List"},{"name":"resource_path_index","type":"Integer"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"structure_name":"core/com/zoho/crm/api/change_owner/error_details","name":"expected_fields","type":"List"},{"structure_name":"core/com/zoho/crm/api/change_owner/error_details","name":"ambiguity_due_to","type":"List"},{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/download_attachments/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","the request does not contain any file","invalid file type"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/backup/action_response":{"classes":["core/com/zoho/crm/api/backup/success_response","core/com/zoho/crm/api/backup/api_exception"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/parent":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/currencies/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/timelines/field_history_value":{"new1":{"name":"new","type":"String"},"old":{"name":"old","type":"String"}},"core/com/zoho/crm/api/assignment_rules/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/mass_update":{"failedCount":{"name":"Failed_Count","type":"Integer"},"updatedCount":{"name":"Updated_Count","type":"Integer"},"notUpdatedCount":{"name":"Not_Updated_Count","type":"Integer"},"totalCount":{"name":"Total_Count","type":"Integer"},"status":{"values":["COMPLETED","SCHEDULED","RUNNING","FAILED"],"name":"Status","type":"utils/util/choice"}},"core/com/zoho/crm/api/field_attachments/get_field_attachments_param":{"fieldsAttachmentId":{"name":"fields_attachment_id","type":"Long"}},"core/com/zoho/crm/api/users/owner":{"lastName":{"name":"last_name","type":"String"},"firstName":{"name":"first_name","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/user_type_users/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"},"totalCount":{"name":"total_count","type":"Integer"}},"core/com/zoho/crm/api/pipeline/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_convert/api_exception":{"code":{"values":["INVALID_DATA","EXPECTED_FIELD_MISSING","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"param","type":"String"},{"structure_name":"core/com/zoho/crm/api/mass_convert/error_details","name":"expected_fields","type":"List"},{"name":"param_name","type":"String"},{"name":"expected_data_type","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/related_lists/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}}} \ No newline at end of file diff --git a/lib/models/authenticator/oauth_token.js b/lib/models/authenticator/oauth_token.js index b41b256..bb67336 100644 --- a/lib/models/authenticator/oauth_token.js +++ b/lib/models/authenticator/oauth_token.js @@ -6,6 +6,7 @@ import pkg from "winston"; let Logger = pkg; import { SDKException } from '../../core/com/zoho/crm/api/exception/sdk_exception.js'; import got from 'got'; +import {DataCenter} from "../../routes/dc/data_center.js"; /** @@ -30,6 +31,8 @@ class OAuthToken extends Token { id; + apiDomain; + /** * This is a setter method to set OAuth client id. * @param {string} clientID - A String containing the client Id. @@ -174,6 +177,22 @@ class OAuthToken extends Token { this.id = id; } + /** + * This is a getter method to get the apiDomain + * @returns the apiDomain + */ + getAPIDomain() { + return this.apiDomain; + } + + /** + * This is a setter method to set the apiDomain + * @param {String} apiDomain A String containing the apiDomain + */ + setAPIDomain(apiDomain) { + this.apiDomain = apiDomain; + } + async generateToken() { await this.getToken().catch((err) => { throw err }); } @@ -181,7 +200,6 @@ class OAuthToken extends Token { async getToken() { let initializer = await Initializer.getInitializer().catch((err) => { throw err }); let store = initializer.getStore(); - let url = initializer.getEnvironment().getAccountsUrl(); let oauthToken = await Reflect.construct(OAuthToken, []); oauthToken = null; if (this.getId() != null) { @@ -197,6 +215,34 @@ class OAuthToken extends Token { } oauthToken = this; } + + if (oauthToken.getAPIDomain() == null || oauthToken.getAPIDomain().length <= 0) + { + if(initializer.getEnvironment() == null) + { + throw new SDKException(Constants.ENVIRONMENT_ERROR_1, Constants.ENVIRONMENT_ERROR_MESSAGE.concat(" : ")); + } + oauthToken.setAPIDomain(initializer.getEnvironment().getUrl()); + } + let environment = await DataCenter.get(oauthToken.getAPIDomain()); + if (environment !== null) { + try{ + let initialzer = await Initializer.getInitializer(); + initializer["_environment"] = environment; + } + catch (error) + { + throw new SDKException(Constants.ENVIRONMENT_ERROR_MESSAGE.concat(" : "), null, null, error); + } + } + else { + if (initializer.getEnvironment() == null) + { + throw new SDKException(Constants.ENVIRONMENT_ERROR_1, Constants.ENVIRONMENT_ERROR_MESSAGE.concat(" : ")); + } + } + + let url = initializer.getEnvironment().getAccountsUrl(); if (oauthToken.getAccessToken() == null || oauthToken.getAccessToken().length == 0) { if (oauthToken.getRefreshToken() != null && oauthToken.getRefreshToken().length > 0) { Logger.info(Constants.ACCESS_TOKEN_USING_REFRESH_TOKEN_MESSAGE); @@ -218,7 +264,7 @@ class OAuthToken extends Token { return oauthToken.getAccessToken(); } getTokenExpiry(oauthToken) { - let num = (parseInt(oauthToken.getExpiresIn()) - parseInt(new Date().getTime())); + let num = (parseInt(oauthToken.getExpiresIn()) - new Date().getTime()); var check = num < 5000; return check; } @@ -339,6 +385,11 @@ class OAuthToken extends Token { if (responseJSON.hasOwnProperty(Constants.REFRESH_TOKEN)) { oauthToken.setRefreshToken(responseJSON[Constants.REFRESH_TOKEN]); } + if (responseJSON.hasOwnProperty(Constants.API_DOMAIN)) + { + oauthToken.setAPIDomain(responseJSON[Constants.API_DOMAIN]); + } + return oauthToken; } @@ -352,7 +403,7 @@ class OAuthToken extends Token { try { let initializer = await Initializer.getInitializer(); - await initializer.store.deleteToken(this).catch((err) => { + await initializer.getStore().deleteToken(this.id).catch((err) => { throw err; }); return true; diff --git a/lib/models/authenticator/store/db_store.js b/lib/models/authenticator/store/db_store.js index 6a828c3..28a2763 100644 --- a/lib/models/authenticator/store/db_store.js +++ b/lib/models/authenticator/store/db_store.js @@ -179,9 +179,9 @@ class DBStore extends TokenStore { oauthToken.setId(newId); } var sqlQuery = - "INSERT INTO " + - that.tableName + - "(id,user_name,client_id,client_secret,refresh_token,access_token,grant_token,expiry_time,redirect_url) VALUES ?"; + "INSERT INTO " + + that.tableName + + "(id,user_name,client_id,client_secret,refresh_token,access_token,grant_token,expiry_time,redirect_url,api_domain) VALUES ?"; var values = [ [ @@ -194,6 +194,7 @@ class DBStore extends TokenStore { token.getGrantToken(), token.getExpiresIn(), token.getRedirectURL(), + token.getAPIDomain(), ], ]; connection.query(sqlQuery, [values], function (err, result) { @@ -223,8 +224,8 @@ class DBStore extends TokenStore { async deleteToken(id) { try { var connection = await this.getConnection(); - let query = "delete from ".this.tableName + " where id='" + id + "';"; - return new promise(function (resolve, reject) { + let query = "delete from " + this.tableName + " where id='" + id + "';"; + return new Promise(function (resolve, reject) { connection.connect(function (err) { if (err) { return reject(err); @@ -251,6 +252,7 @@ class DBStore extends TokenStore { async getTokens() { var tokens = []; + let _this = this; try { var connection = await this.getConnection(); var sqlQuery = "select * from " + this.tableName + ";"; @@ -266,37 +268,10 @@ class DBStore extends TokenStore { } if (result.length > 0) { for (let row of result) { - let grantToken = - row.grant_token !== null && - row.grant_token !== Constants.NULL_VALUE && - row.grant_token.length > 0 - ? row.grant_token - : null; - let token = new OAuthBuilder() - .clientId(row.client_id) - .clientSecret(row.client_secret) - .refreshToken(row.refresh_token) - .build(); - - token.setId(row.id); - - if (grantToken != null) { - token.setGrantToken(grantToken); - } - - let name = result[0].user_name; - - if (name != null) { - token.setUserSignature(new UserSignature(name)); - } - token.setAccessToken(row.access_token); - - token.setExpiresIn(row.expiry_time); - - token.setRedirectURL(row.redirect_url); - - tokens.push(token); + let oauthToken = Reflect.construct(OAuthToken, []); + _this.setMergeData(oauthToken, [row]) + tokens.push(oauthToken); } return resolve(tokens); } @@ -433,6 +408,10 @@ class DBStore extends TokenStore { if (oauthToken.getRedirectURL() == null) { oauthToken.setRedirectURL(result[0].redirect_url); } + if (oauthToken.getAPIDomain() == null) + { + oauthToken.setAPIDomain(result[0].api_domain) + } } } @@ -466,6 +445,9 @@ class DBStore extends TokenStore { if (oauthToken.getRedirectURL() != null) { query.push(this.setTokenInfo(Constants.REDIRECT_URL, oauthToken.getRedirectURL())); } + if (oauthToken.getAPIDomain() != null) { + query.push(this.setTokenInfo(Constants.API_DOMAIN, oauthToken.getAPIDomain())); + } return query.join(","); } setTokenInfo(key, value) { diff --git a/lib/models/authenticator/store/file_store.js b/lib/models/authenticator/store/file_store.js index 916ac60..6f96ce1 100644 --- a/lib/models/authenticator/store/file_store.js +++ b/lib/models/authenticator/store/file_store.js @@ -19,10 +19,31 @@ class FileStore extends TokenStore { constructor(filePath) { super(); this.filePath = filePath; - this.headers = [Constants.ID, Constants.USER_NAME, Constants.CLIENT_ID, Constants.CLIENT_SECRET, Constants.REFRESH_TOKEN, Constants.ACCESS_TOKEN, Constants.GRANT_TOKEN, Constants.EXPIRY_TIME, Constants.REDIRECT_URL]; + let isCreate = false; + this.headers = [Constants.ID, Constants.USER_NAME, Constants.CLIENT_ID, Constants.CLIENT_SECRET, Constants.REFRESH_TOKEN, Constants.ACCESS_TOKEN, Constants.GRANT_TOKEN, Constants.EXPIRY_TIME, Constants.REDIRECT_URL, Constants.API_DOMAIN]; if (!fs.existsSync(this.filePath) || (fs.existsSync(this.filePath) && fs.readFileSync(this.filePath, 'utf-8') === "")) { + isCreate = true; fs.writeFileSync(filePath, this.headers.join(), 'utf-8'); } + if (!isCreate){ + try{ + var allContents = fs.readFileSync(this.filePath, 'utf-8').toString().split("\n"); + let headers = allContents[0].split(","); + if (headers.length === 9) { + allContents = allContents.map(content => { + const arr = content.split(","); + const newArr = arr.slice(); + newArr.push(''); + return newArr; + }); + allContents[0] = this.headers.join(); + fs.writeFileSync(this.filePath, allContents.join("\n")); + } + } + catch (error){ + throw error; + } + } } async findToken(token) { @@ -139,12 +160,12 @@ class FileStore extends TokenStore { if (recordId == id) { isRowPresent = true; - csvReader.slice(index, csvReader.length + 1); + csvReader.splice(index, 1) } } } if (isRowPresent) { - fs.appendFileSync(this.filePath, csvReader.join()); + fs.writeFileSync(this.filePath, csvReader.join("\n")); } else { throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_BY_ID_FILE_ERROR); @@ -161,31 +182,16 @@ class FileStore extends TokenStore { } async getTokens() { + let _this = this; try { var tokens = []; var csvReader = fs.readFileSync(this.filePath, 'utf-8').toString().split("\n"); for (var i = 1; i < csvReader.length; i++) { let allContents = csvReader[i]; let nextRecord = allContents.split(","); - let grantToken = this.getData(nextRecord[6]); - let token = new OAuthBuilder().clientId(nextRecord[2]).clientSecret(nextRecord[3]).refreshToken(nextRecord[4]).build(); - token.setId(nextRecord[0]); - if (grantToken != null) { - token.setGrantToken(grantToken); - } - let name = await this.getData(nextRecord[1]); - if (name != null) { - token.setUserSignature(new UserSignature(name)); - } - else if (name == null) { - token.setUserSignature(null); - } - token.setAccessToken(nextRecord[5]); - token.setExpiresIn(nextRecord[7]); - if (nextRecord[8] != null) { - token.setRedirectURL(nextRecord[8]); - } - tokens.push(token); + let oauthToken = Reflect.construct(OAuthToken, []); + await _this.setMergeData(oauthToken, nextRecord) + tokens.push(oauthToken); } return tokens; } @@ -288,7 +294,7 @@ class FileStore extends TokenStore { if (oauthToken.getAccessToken() == null) { oauthToken.setAccessToken(await this.getData(nextRecord[5])); } - if (oauthToken.setGrantToken() == null) { + if (oauthToken.getGrantToken() == null) { oauthToken.setGrantToken(await this.getData(nextRecord[6])); } if (oauthToken.getExpiresIn() == null) { @@ -300,6 +306,10 @@ class FileStore extends TokenStore { if (oauthToken.getRedirectURL() == null) { oauthToken.setRedirectURL(await this.getData(nextRecord[8])); } + if (oauthToken.getAPIDomain() == null) + { + oauthToken.setAPIDomain(await this.getData(nextRecord[9])); + } } async setToken(oauthToken) { @@ -323,6 +333,8 @@ class FileStore extends TokenStore { data[8] = oauthToken.getRedirectURL(); + data[9] = oauthToken.getAPIDomain(); + return data; } async generateID(allcontents) { diff --git a/lib/routes/dc/data_center.js b/lib/routes/dc/data_center.js index dc8ad0e..9d9e554 100644 --- a/lib/routes/dc/data_center.js +++ b/lib/routes/dc/data_center.js @@ -27,6 +27,90 @@ class DataCenter { static setEnvironment(url, accountsUrl, fileUploadUrl, name) { return new Environment(url, accountsUrl, fileUploadUrl, name); } + + /** + * This method gets the environment based on the api_domain + * @param config - A string representing the api_domain + * @returns {Promise} + */ + + static async get(config){ + const USDataCenter = (await import("./us_data_center.js")).MasterModel; + const JPDataCenter = (await import("./jp_data_center.js")).MasterModel; + const INDataCenter = (await import("./in_data_center.js")).MasterModel; + const EUDataCenter = (await import("./eu_data_center.js")).MasterModel; + const CNDataCenter = (await import("./cn_data_center.js")).MasterModel; + const AUDataCenter = (await import("./au_data_center.js")).MasterModel; + const Constants = (await import("../../utils/util/constants.js")).MasterModel; + + if (Constants.US_DATACENTER.some(a => a === config)){ + if (config.includes(Constants.SANDBOX)) + { + return USDataCenter.SANDBOX(); + } + else if(config.includes(Constants.DEVELOPER)) + { + return USDataCenter.DEVELOPER(); + } + return USDataCenter.PRODUCTION(); + } + else if (Constants.JP_DATACENTER.some(a => a === config)){ + if (config.includes(Constants.SANDBOX)) + { + return JPDataCenter.SANDBOX(); + } + else if(config.includes(Constants.DEVELOPER)) + { + return JPDataCenter.DEVELOPER(); + } + return JPDataCenter.PRODUCTION(); + } + else if (Constants.IN_DATACENTER.some(a => a === config)){ + if (config.includes(Constants.SANDBOX)) + { + return INDataCenter.SANDBOX(); + } + else if(config.includes(Constants.DEVELOPER)) + { + return INDataCenter.DEVELOPER(); + } + return INDataCenter.PRODUCTION(); + } + else if (Constants.EU_DATACENTER.some(a => a === config)){ + if (config.includes(Constants.SANDBOX)) + { + return EUDataCenter.SANDBOX(); + } + else if(config.includes(Constants.DEVELOPER)) + { + return EUDataCenter.DEVELOPER(); + } + return EUDataCenter.PRODUCTION(); + } + else if (Constants.CN_DATACENTER.some(a => a === config)){ + if (config.includes(Constants.SANDBOX)) + { + return CNDataCenter.SANDBOX(); + } + else if(config.includes(Constants.DEVELOPER)) + { + return CNDataCenter.DEVELOPER(); + } + return CNDataCenter.PRODUCTION(); + } + else if (Constants.AU_DATACENTER.some(a => a === config)){ + if (config.includes(Constants.SANDBOX)) + { + return AUDataCenter.SANDBOX(); + } + else if(config.includes(Constants.DEVELOPER)) + { + return AUDataCenter.DEVELOPER(); + } + return AUDataCenter.PRODUCTION(); + } + return null; + } } export { diff --git a/lib/routes/initialize_builder.js b/lib/routes/initialize_builder.js index d24f544..7618f5b 100644 --- a/lib/routes/initialize_builder.js +++ b/lib/routes/initialize_builder.js @@ -74,12 +74,6 @@ class InitializeBuilder { } async initialize() { - Utility.assertNotNull( - this._environment, - this.errorMessage, - Constants.ENVIRONMENT_ERROR_MESSAGE - ); - Utility.assertNotNull( this._token, this.errorMessage, @@ -103,7 +97,7 @@ class InitializeBuilder { if (this._logger == null) { this._logger = new LogBuilder() .level(Levels.INFO) - .filePath(join(__dirname, "../../../../../", Constants.LOG_FILE_NAME)) + .filePath(null) .build(); } diff --git a/lib/routes/logger/sdk_logger.js b/lib/routes/logger/sdk_logger.js index 5f36d6e..a8c7173 100644 --- a/lib/routes/logger/sdk_logger.js +++ b/lib/routes/logger/sdk_logger.js @@ -7,20 +7,34 @@ class SDKLogger { constructor(loggerInstance) { let winston = pkg; - winston.configure({ - level: loggerInstance.level, + if (loggerInstance.getFilePath() == null || loggerInstance.getFilePath == "") + { + winston.configure({ + silent : true, - format: winston.format.combine( - winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }), - winston.format.prettyPrint() - ), + transports: [ + new winston.transports.Console({ + silent: true + }) + ] + }); + } + else { + winston.configure({ - transports: [ - new winston.transports.File({ - filename: loggerInstance.getFilePath() - }) - ] - }); + level: loggerInstance.level, + + format: winston.format.combine( + winston.format.timestamp({format: 'YYYY-MM-DD HH:mm:ss'}), + winston.format.prettyPrint() + ), + transports: [ + new winston.transports.File({ + filename: loggerInstance.getFilePath() + }) + ] + }); + } } /** * The method to initialize SDKLogger diff --git a/lib/utils/util/constants.js b/lib/utils/util/constants.js index 4a10fb4..0afc8b3 100644 --- a/lib/utils/util/constants.js +++ b/lib/utils/util/constants.js @@ -90,7 +90,7 @@ class Constants { static ZOHO_SDK = "X-ZOHO-SDK"; - static SDK_VERSION = "2.0.0"; + static SDK_VERSION = "3.0.0"; static MYSQL_HOST = "localhost"; @@ -720,6 +720,35 @@ class Constants { static MULTI_MODULE_LOOKUP = "multi_module_lookup"; static TIMEZONE_NAMESPACE = "TimeZone"; + + static ENVIRONMENT_ERROR_1 = "ENVIRONMENT_ERROR"; + + static ENVIRONMENT_ERROR_RESPONSE = "Exception in set the api environment."; + + static API_DOMAIN = "api_domain"; + + static US_DATACENTER = ["https://www.zohoapis.com", "https://sandbox.zohoapis.com", "https://developer.zohoapis.com", + "https://accounts.zoho.com/oauth/v2/token", "us"] + + static JP_DATACENTER = ["https://www.zohoapis.jp", "https://sandbox.zohoapis.jp", "https://developer.zohoapis.jp", + "https://accounts.zoho.jp/oauth/v2/token", "jp"] + + static IN_DATACENTER = ["https://www.zohoapis.in", "https://sandbox.zohoapis.in", "https://developer.zohoapis.in", + "https://accounts.zoho.in/oauth/v2/token", "in"] + + static EU_DATACENTER = ["https://www.zohoapis.eu", "https://sandbox.zohoapis.eu", "https://developer.zohoapis.eu", + "https://accounts.zoho.eu/oauth/v2/token", "eu"] + + static CN_DATACENTER = ["https://www.zohoapis.com.cn", "https://sandbox.zohoapis.com.cn", + "https://developer.zohoapis.com.cn", "https://accounts.zoho.com.cn/oauth/v2/token", "cn"] + + static AU_DATACENTER = ["https://www.zohoapis.com.au", "https://sandbox.zohoapis.com.au", + "https://developer.zohoapis.com.au", "https://accounts.zoho.com.au/oauth/v2/token", "au"] + + static SANDBOX = "sandbox"; + + static DEVELOPER = "developer"; + } export { diff --git a/lib/utils/util/utility.js b/lib/utils/util/utility.js index 739495a..0c5f158 100644 --- a/lib/utils/util/utility.js +++ b/lib/utils/util/utility.js @@ -784,8 +784,7 @@ class Utility { .getValue(); errorResponse[Constants.MESSAGE] = responseObject - .getMessage() - .getValue(); + .getMessage(); throw new SDKException( Constants.API_EXCEPTION, @@ -906,8 +905,7 @@ class Utility { .getValue(); errorResponse[Constants.MESSAGE] = responseHandler - .getMessage() - .getValue(); + .getMessage(); let exception = new SDKException( Constants.API_EXCEPTION, @@ -916,7 +914,7 @@ class Utility { null ); - if (this.moduleAPIName.toLowerCase() == moduleAPIName.toLowerCase()) { + if (this.moduleAPIName != null && this.moduleAPIName.toLowerCase() == moduleAPIName.toLowerCase()) { throw exception; } @@ -1109,8 +1107,7 @@ class Utility { .getValue(); errorResponse[Constants.MESSAGE] = responseObject - .getMessage() - .getValue(); + .getMessage(); throw new SDKException( Constants.API_EXCEPTION, diff --git a/package.json b/package.json index 85b4022..0fb90fa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@zohocrm/nodejs-sdk-5.0", - "version": "1.0.0", + "version": "3.0.0", "description": "Node JS SDK for Zoho CRM", "main": "lib/index.js", "type": "module", diff --git a/versions/3.0.0/README.md b/versions/3.0.0/README.md new file mode 100644 index 0000000..3ab84a6 --- /dev/null +++ b/versions/3.0.0/README.md @@ -0,0 +1,958 @@ +# License + + Copyright (c) 2021, ZOHO CORPORATION PRIVATE LIMITED + All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +# ZOHO CRM NODEJS SDK 5.0 for API version 5 + +## Table Of Contents + +- [Overview](#overview) +- [Registering a Zoho Client](#registering-a-zoho-client) +- [Environmental Setup](#environmental-setup) +- [Including the SDK in your project](#including-the-sdk-in-your-project) +- [Persistence](#token-persistence) + - [DataBase Persistence](#database-persistence) + - [File Persistence](#file-persistence) + - [Custom Persistence](#custom-persistence) +- [Configuration](#configuration) +- [Initialization](#initializing-the-application) +- [Class Hierarchy](#class-hierarchy) +- [Responses And Exceptions](#responses-and-exceptions) +- [Multi User Support](#multi-user-support-in-the-nodejs-sdk) +- [Sample Code](#sdk-sample-code) + +## Overview + +Zoho CRM NodeJS SDK offers a way to create client NodeJS applications that can be integrated with Zoho CRM. + +## Registering a Zoho Client + +Since Zoho CRM APIs are authenticated with OAuth2 standards, you should register your client app with Zoho. To register your app: + +- Visit this page [https://api-console.zoho.com/](https://api-console.zoho.com) + +- Click `ADD CLIENT`. + +- Choose the `Client Type`. + +- Enter **Client Name**, **Client Domain** or **Homepage URL** and **Authorized Redirect URIs** then click `CREATE`. + +- Your Client app will be created. + +- Select the created OAuth client. + +- Generate grant token by providing the necessary scopes, time duration (the duration for which the generated token is valid) and Scope Description. + +## Environmental Setup + +NodeJS SDK is installable through **npm**. **npm** is a tool for dependency management in NodeJS. SDK expects the following from the client app. + +- Client app must have Node(version 14.21.3 and above) + +- NodeJS SDK must be installed into client app through **npm**. + +## Including the SDK in your project + +You can include the SDK to your project using: + +- Install **Node** from [nodejs.org](https://nodejs.org/en/download/) (if not installed). + +- Install **NodeJS SDK** + + - Navigate to the workspace of your client app. + - Run the command below: + + ```sh + npm install @zohocrm/nodejs-sdk-5.0 + ``` + +- The NodeJS SDK will be installed and a package named **@zohocrm/nodejs-sdk-5.0** will be created in the local machine. + +- include the field - "type" = "module"; in your package.json file to make use of ES modules. + +- Another method to install the SDK + - Add dependencies to the package.json of the node server with the latest version (recommended) + - Run **npm install** in the directory which installs all the dependencies mentioned in package.json. + +## Token Persistence + +Token persistence refers to storing and utilizing the authentication tokens that are provided by Zoho. Token persistence enables the SDK to automatically refresh the access token after initialization using the refresh token without the need for user intervention. There are three ways provided by the SDK in which persistence can be utilized. They are File Persistence, DataBase Persistence, and Custom Persistence.Please note that the default method of token persistence provided by the Zoho CRM SDK is File persistence + +### Table of Contents + +- [DataBase Persistence](#database-persistence) + +- [File Persistence](#file-persistence) + +- [Custom Persistence](#custom-persistence) + +### Implementing OAuth Persistence + +Once the application is authorized, OAuth access and refresh tokens can be used for subsequent user data requests to Zoho CRM. Hence, they need to be persisted by the client app. + +The persistence is achieved by writing an implementation of the inbuilt **TokenStore class**, which has the following callback methods. + +- **findToken(token)** - invoked before firing a request to fetch the saved tokens. This method should return implementation **Token Class** object for the library to process it. + +- **saveToken(token)** - invoked after fetching access and refresh tokens from Zoho. + +- **deleteToken(id)** - invoked before saving the latest tokens. + +- **getTokens()** - The method to retrieve all the stored tokens. + +- **deleteTokens()** - The method to delete all the stored tokens. + +- **findTokenById(id)** - This method is used to retrieve the user token details based on unique ID. + +Note: + +- id is a string. + +- token is an instance of **Token** class. + +### DataBase Persistence + +Database persistence is a technique that involves storing and retrieving data from a database. In case the user prefers to use default DataBase persistence, **MySQL** can be used. + +- Create a table in your Database with required columns + + - id varchar(10) + + - user_name varchar(255) + + - client_id varchar(255) + + - client_secret varchar(255) + + - refresh_token varchar(255) + + - access_token varchar(255) + + - grant_token varchar(255) + + - expiry_time varchar(20) + + - redirect_url varchar(255) + + - api_domain varchar(255) + +Note: + +- Custom database name and table name can be set in DBStore instance + +#### MySQL Query + +```sql +CREATE TABLE oauthtoken ( + id varchar(10) NOT NULL, + user_name varchar(255), + client_id varchar(255), + client_secret varchar(255), + refresh_token varchar(255), + access_token varchar(255), + grant_token varchar(255), + expiry_time varchar(20), + redirect_url varchar(255), + api_domain varchar(255), + primary key (id) +); +``` + +#### Create DBStore object + +```js +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0" +/* + * DBStore takes the following parameters + * host -> DataBase host name. Default value "localhost" + * databaseName -> DataBase name. Default value "zohooauth" + * userName -> DataBase user name. Default value "root" + * password -> DataBase password. Default value "" + * portNumber -> DataBase port number. Default value "3306" + * tableName -> Table Name. Default value "oauthtoken" + */ + +let tokenstore = new ZOHOCRMSDK.DBBuilder() + .host("hostName") + .databaseName("databaseName") + .userName("userName") + .portNumber("portNumber") + .tableName("tableName") + .password("password") + .build(); +``` + +### File Persistence + +In case of default File Persistence, the user can persist tokens in the local drive, by providing the the absolute file path to the FileStore object. + +- The File contains + + - id + + - user_name + + - client_id + + - client_secret + + - refresh_token + + - access_token + + - grant_token + + - expiry_time + + - redirect_url + + - api_domain + +#### Create FileStore object + +```js +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +/* + * FileStore takes the following parameter + * 1 -> Absolute file path of the file to persist tokens + */ +let tokenstore = new ZOHOCRMSDK.FileStore( + "/Users/username/Documents/nodejs_sdk_tokens.txt" +); +``` + +### Custom Persistence + +Users can create their own logic for storing and retrieving authentication tokens using the custom persistence technique.To use Custom Persistence, the user must extend **[TokenStore Class](models/authenticator/store/token_store.js)** and override the methods. + +```js +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CustomStore extends ZOHOCRMSDK.TokenStore { + constructor() { + super(); + } + + /** + * + * @param {Token} token A Token (@zohocrm/nodejs-sdk-5.0/models/authenticator/oauth_token) class instance. + * @returns A Token class instance representing the user token details. + * @throws {SDKException} if any error occurs. + */ + findToken(token) { + // Add code to get the token + return null; + } + + /** + * + * @param {Token} token A Token (@zohocrm/nodejs-sdk-5.0/models/authenticator/oauth_token) class instance. + * @throws {SDKException} if any error occurs. + */ + saveToken(token) { + // Add code to save the token + } + + /** + * + * @param {String} id A String representing Token ID. + * @throws {SDKException} if any error occurs. + */ + deleteToken(id) { + // Add code to delete the token + } + + /** + * @returns {Array} - An array of Token class instances + * @throws {SDKException} + */ + getTokens() { + //Add code to retrieve all the stored tokens. + } + + /** + * @throws {SDKException} + */ + deleteTokens() { + //Add code to delete all the stored tokens. + } + + /** + * @param {String} id A string. + * @return {Token} A Token class instance representing the user token details. + * @throws {SDKException} if any problem occurs. + */ + findTokenById(id) { + // Add code to get the token using unique id + return null; + } +} + +export { CustomStore as CustomStore }; +``` + +## Configuration + +Before you get started with creating your NodeJS application, you need to register your client and authenticate the app with Zoho. + +| Mandatory Keys | Optional Keys | +| :------------- | :------------ | +| environment | logger | +| token | store | +| | SDKConfig | +| | requestProxy | +| | resourcePath | + +--- +The **environment** key contains the domain information to make API calls. The **token** key represents the OAuth info, including the clientID, clientSecret, grantToken, redirectURL, refreshToken or accessToken depending on the flow that you use. Refer to ##create an instance of OAuthToken## for more details. + +- Configure API environment which decides the domain and the URL to make API calls. + + ```js + import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + /* + * Configure the environment + * which is of the pattern Domain.Environment + * Available Domains: USDataCenter, EUDataCenter, INDataCenter, CNDataCenter, AUDataCenter + * Available Environments: PRODUCTION(), DEVELOPER(), SANDBOX() + */ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + ``` + +- Create an instance of **[OAuthToken](models/authenticator/oauth_token.js)** with the information that you get after registering your Zoho client.In the context of token persistence, the grant token flow and refresh token flow involve storing and persisting the token. However, the access token flow does not involve token persistence and the access token is directly utilized for API calls. Depending on the tokens available with you, choose grantToken flow, refreshToken flow or accessToken flow. + + - Use the following method for **grantToken flow:** + ```js + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("clientId") + .clientSecret("clientSecret") + .grantToken("grantToken") + .redirectURL("redirectURL") + .build(); + ``` + - Use the following method for **refreshToken flow:** + ```js + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("clientId") + .clientSecret("clientSecret") + .refreshToken("refreshToken") + .redirectURL("redirectURL") + .build(); + ``` + - Use the following method for **accessToken flow:** + ```js + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .accessToken("accessToken") + .build(); + ``` + - Use the following method for **Id flow :** + ```js + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .id("id") + .build(); + ``` + +- Create an instance of **Logger** Class to log exception and API information. By default, the SDK constructs a Logger instance with level - INFO and file_path - (sdk_logs.log parallel to node_modules) + + ```js + import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + /* + * Create an instance of Logger Class that requires the following + * level -> Level of the log messages to be logged. Can be configured by typing Levels "." and choose any level from the list displayed. + * filePath -> Absolute file path, where messages need to be logged. + */ + let logger = new ZOHOCRMSDK.LogBuilder() + .level(ZOHOCRMSDK.Levels.INFO) + .filePath("/Users/Documents/final-logs.txt") + .build(); + ``` + +- Create an instance of **TokenStore** to persist tokens, used for authenticating all the requests. By default, the SDK creates the sdk_tokens.txt file (parallel to node_modules folder) to persist the tokens. + + - Use the following method for DBStore + ```js + /* + * Create an instance of DBStore that requires the following + * host -> DataBase host name. Default value "localhost" + * databaseName -> DataBase name. Default value "zohooauth" + * userName -> DataBase user name. Default value "root" + * password -> DataBase password. Default value "" + * portNumber -> DataBase port number. Default value "3306" + * tabletName -> DataBase table name. Default value "oauthtoken" + */ + + let tokenstore = new ZOHOCRMSDK.DBBuilder() + .host("hostName") + .databaseName("databaseName") + .userName("userName") + .portNumber("portNumber") + .tableName("tableName") + .password("password") + .build(); + ``` + - Use the following method for FileStore + ```js + let tokenstore = new ZOHOCRMSDK.FileStore("absolute_file_path"); + ``` + - Use the following method for Custom Store + ```js + let tokenstore = new CustomStore(); + ``` + +- Create an instance of **SDKConfig** containing the SDK configuration. + + ```js + import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + + /* + * By default, the SDK creates the SDKConfig instance + * autoRefreshFields (default value is false) + * if true - all the modules' fields will be auto-refreshed in the background, every hour. + * if false - the fields will not be auto-refreshed in the background. The user can manually delete the file(s) or refresh the fields using methods from ModuleFieldsHandler(utils/util/module_fields_handler.js) + * + * pickListValidation + * A boolean field that validates user input for a pick list field and allows or disallows the addition of a new value to the list. + * if true - the SDK validates the input. If the value does not exist in the pick list, the SDK throws an error. + * if false - the SDK does not validate the input and makes the API request with the user’s input to the pick list + */ + let sdkConfig = new ZOHOCRMSDK.SDKConfigBuilder() + .pickListValidation(false) + .autoRefreshFields(true) + .build(); + ``` + +- Create an instance of **[RequestProxy](routes/request_proxy.js)** containing the proxy properties of the user. + + ```js + import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + + /* + * RequestProxy class takes the following parameters + * host -> Host + * port -> Port Number + * user -> User Name. Default null. + * password -> Password. Default null + */ + let requestProxy = new ZOHOCRMSDK.ProxyBuilder() + .host("proxyHost") + .port("proxyPort") + .user("proxyUser") + .password("password") + .build(); + ``` + +- The path containing the absolute directory path to store user specific files containing module fields information. By default, the SDK stores the user-specific files in a folder parallel to node_modules + + ```js + let resourcePath = "/Users/nodejs-app"; + ``` + +## Initializing the Application + +Initialize the SDK using the following code. + +```js +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class Initializer { + static async initialize() { + let logger = new ZOHOCRMSDK.LogBuilder() + .level(ZOHOCRMSDK.Levels.INFO) + .filePath("/Users/user_name/Documents/nodejs_sdk_log.log") + .build(); + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = new ZOHOCRMSDK.OAuthBuilder() + .clientId("clientId") + .clientSecret("clientSecret") + .grantToken("GRANT Token") + .redirectURL("redirectURL") + .build(); + let tokenstore = new ZOHOCRMSDK.DBBuilder() + .host("hostName") + .databaseName("databaseName") + .userName("userName") + .portNumber("portNumber") + .tableName("tableName") + .password("password") + .build(); + let sdkConfig = new ZOHOCRMSDK.SDKConfigBuilder() + .pickListValidation(false) + .autoRefreshFields(true) + .build(); + let resourcePath = "/Users/nodejssdk-application"; + let requestProxy = new ZOHOCRMSDK.ProxyBuilder() + .host("proxyHost") + .port("proxyPort") + .user("proxyUser") + .password("password") + .build(); + (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .store(tokenstore) + .SDKConfig(sdkConfig) + .resourcePath(resourcePath) + .logger(logger) + .requestProxy(requestProxy) + .initialize() + .catch((err) => { + console.log(err); + }); + } +} +``` +- You can now access the functionalities of the SDK. Refer to the sample codes to make various API calls through the SDK. + +## Class Hierarchy + +![classdiagram](class_hierarchy.png) + +## Responses and Exceptions + +All SDK method calls return an instance of **[APIResponse](routes/controllers/api_response.js)**. + +After a successful API request, the **getObject()** method returns an instance of the ResponseWrapper (for **GET**) or the ActionWrapper (for **POST, PUT, DELETE**). + +Whenever the API returns an error response, the **getObject()** returns an instance of **APIException** class. + +**ResponseWrapper** (for **GET** requests) and ActionWrapper (for **POST, PUT, DELETE** requests) are the expected objects for Zoho CRM APIs’ responses + +However, some specific operations have different expected objects, such as the following + +- Operations involving records in Tags + + - **RecordActionWrapper** + +- Getting Record Count for a specific Tag operation + + - **CountWrapper** + +- Operations involving BaseCurrency + + - **BaseCurrencyActionWrapper** + +- Lead convert operation + + - **ConvertActionWrapper** + +- Retrieving Deleted records operation + + - **DeletedRecordsWrapper** + +- Record image download operation + + - **FileBodyWrapper** + +- MassUpdate record operations + + - **MassUpdateActionWrapper** + - **MassUpdateResponseWrapper** + +- For Transfer Pipeline operation + - **APIResponse<TransferPipelineActionHandler>** + +All other exceptions such as SDK anomalies and other unexpected behaviours are thrown under the **[SDKException](core/com/zoho/crm/api/exception/sdk_exception.js)** class. + +### GET Requests + +- The **getObject()** of the returned APIResponse instance returns the response as follows. + +- Most of the APIs follows the **Common** Structure as below. + + - The **ResponseHandler class** encompasses the following + - **ResponseWrapper class** (for **application/json** responses) + - **FileBodyWrapper class** (for File download responses) + - **APIException class** + + +- Some of the APIs follow the **Particular** Structure as below. + + - The **ResponseHandler class** encompasses the following + - **BodyWrapper class** (for **application/json** responses in **backup** API , holds the instance of **Backup class**) + - **HistoryWrapper class** (for **application/json** responses in **backup** API, holds the list of instances of **History class** and instance of **Info class**) + - **UrlsWrapper class** (for **application/json** responses in **backup** API, holds the instance of **Urls class**) + - **BodyWrapper class** (for **application/json** responses in **ContactRoles** API, holds the list of instances of **ContactRole class**) + - **BodyWrapper class** (for **application/json** responses in **Currencies** API, holds the list of instances of **Currency class**) + - **BodyWrapper class** (for **application/json** responses in **CustomView** API, holds the list of instances of **CustomView class** and instance of **Info class** ) + - **BodyWrapper class** (for **application/json** responses in **DealContactroles** API, holds the list of instances of **Data class** and instance of **Info class** ) + - **BodyWrapper class** (for **application/json** responses in **FieldMapDependency** API, holds the list of instances of **MapDependency class** and instance of **Info class** ) + - **BodyWrapper class** (for **application/json** responses in **Fields** API, holds the list of instances of **Field class**) + - **BodyWrapper class** (for **application/json** responses in **Pipeline** API, holds the list of instances of **Pipeline class**) + - **ProfieWrapper class** (for **application/json** responses in **Profiles** API, holds the list of instances of **Profile class** and instance of **Info class**) + - **ConversionOptionsResponseWrapper class** (for **application/json** responses in **Record** API, holds the instance of **ConversionOption class**) + - **SourcesCountWrapper class** (for **application/json** responses in **UserGroups** API, holds the List of instances of **SourceCount class**) + - **SourcesWrapper class** (for **application/json** responses in **Usergroups** APi, holds the List of instances of **Sources class** and instance of **Info class**) + + + - The **ResponseWrapper class** in **BulkWrite** API encompasses the following + - **BulkWriteResponse class** (for **application/json** responses) + - **APIException class** + + - The **CountHandler class** encompasses the following + - **CountWrapper class** (for **application/json** responses in **Record** API, holds the Long **count**) + - **APIException class** + + - The **DeletedRecordsHandler class** encompasses the following + - **DeletedRecordsWrapper class** (for **application/json** responses in **Record** API, holds the list of instances of **DeletedRecord class** and instance of **Info class**) + - **APIException class** + + - The **DownloadHandler class** encompasses the following + - **FileBodyWrapper class** (for File download responses) + - **APIException class** + + - The **MassUpdateResponseHandler class** encompasses the following + - **MassUpdateResponseWrapper class** (for **application/json** responses in **Record** API, holds the list of instances of **MassUpdateResponse class**) + - **APIException class** + + - The **MassUpdateResponse class** encompasses of following + - **MassUpdate class** (for **application/json** responses) + - **APIException class** + + - The **ValidationHandler class** in **UserTerritories** API encomposses the following + - **ValidationWrapper class** (for **application/json** responses, holds the list of instances of **ValidationGroup class**) + - **APIException class** + + - The **ValidationGroup class** in **UserTerritories** API encompasses the following + - **Validation class** + - **BulkValidation class** + +### POST, PUT, DELETE Requests + +- The **getObject()** of the returned APIResponse instance returns the response as follows. + +- Most of the APIs follows the **Common** Structure as. + + - The **ActionHandler class** encompasses the following + - **ActionWrapper class** (for **application/json** responses) + - **APIException class** + + - The **ActionWrapper class** contains **Property/Properties** that may contain one/list of **ActionResponse class**. + + - The **ActionResponse class** encompasses the following + - **SuccessResponse class** (for **application/json** responses) + - **APIException class** + +- Some of the APIs follow the **Particular** Structure as. + + - The **ActionHandler class** encompasses the following + - **ActionWrapper class** (for **application/json** responses) + - **APIException class** + + - The **ActionWrapper class** contains **Property/Properties** that may contain one/list of **ActionResponse class**. + + - The **ActionResponse class** encompasses the following + - **BusinessHoursCreated class** (for **application/json** responses in **BusinessHours** API) + - **MassDeleteScheduled class** (for **application/json** responses in **MassDeleteCVID** API) + - **APIEXception class** + + - The **RecordActionHandler class** encompasses the following + - **RecordActionWrapper class** (for **application/json** responses in **Tags** API, holds the list of instance of **RecordActionResponse class**, Boolean **wfScheduler**, String **successCount** and Boolean **lockedCount**) + - **APIException class** + + - **RecordActionResponse class** encompasses the following + - **RecordSuccessResponse class** (for **application/json** responses) + - **APIException class** + + - The **ActionHandler class** in **Currencies** API encompasses the following + - **BaseCurrencyActionWrapper class** (for **application/json** responses) + - **APIException class** + + - The **BaseCurrencyActionWrapper class** contains **Property/Properties** that contain **BaseCurrencyActionResponse class**. + + - The **BaseCurrencyActionResponse class** encompasses the following + - **SuccessResponse class** (for **application/json** responses) + - **APIException class** + + - The **MassUpdateActionHandler class** encompasses the following + - **MassUpdateActionWrapper class** (for **application/json** responses in **Record** API, holds the list of instances of **MassUpdateActionResponse class**) + - **APIException class** + + - The **MassUpdateActionResponse class** encompasses of following + - **MassUpdateSuccessResponse class** (for **application/json** responses) + - **APIException class** + + - The **FileHandler class** in **Record** API encompasses the following + - **SuccessResponse class** (for **application/json** responses) + - **APIException class** + + - The **SignActionHandler class** in **MailMerge** API encompasses the following + - **SignActionWrapper class** (for **application/json** responses) + - **APIException class** + + - The **DeleteActionHandler class** encompasses the following + - **DeleteActionWrapper class** (for **application/json** responses in **ShareRecords** API, holds the instance of **DeleteActionResponse class**) + - **APIException class** + - The **DeleteActionResponse class** encompasses the following + - **SuccessResponse class** (for **application/json** responses) + - **APIException class** + + - The **TransferActionHandler class** in **UserTerritories** API encompasses the following + - **TransferActionWrapper class** (fro **application/json** responses , holds the list of instances of **TransferActionResponse class**) + + - The **TransferActionResponse class** encompasses the following + - **SuccessResponse class** (for **application/json** responses) + - **APIException class** + + - The **ActionResponse class** in **Territories** API encompasses the following + - **Success class** (for **application/json** responses) + - **APIException class** + + - The **TransferPipelineActionHandler class** in **Pipeline** API encompasses the following + - **TransferPipelineActionWrapper class** (for **application/json** responses, holds the list of insatnces of **TransferPipelineActionResponse class**) + - **APIException class** + + - The **TransferPipelineActionResponse class** in **Pipeline** API encompasses the following + - **TransferPipelineSuccessResponse class** (for **application/json** responses) + - **APIException class** + +## Multi-user App + +In the NodeJS SDK, multi-user functionality is achieved using the **switchUser()**method. + +Please note that only one user can send requests at a time. If another user need to send requests, the **switchUser()** method must be used prior to sending the requests. +```js +//If proxy needs to be configured for the User +(await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .SDKConfig(sdkConfig) + .switchUser() + .catch((err) => { + console.log(err); + }); +``` + +To Remove a user's configuration in SDK. Use the below code + +```js +await ZOHOCRMSDK.Initializer.removeUserConfiguration(token).catch((err) => { + console.log(err); +}); +``` + +### Sample Multi-user code + +```js +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class Record { + static async call() { + let environment1 = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token1 = new ZOHOCRMSDK.OAuthBuilder() + .clientId("clientId") + .clientSecret("clientSecret") + .refreshToken("refreshToken") + .redirectURL("redirectURL") + .build(); + (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment1) + .token(token1) + .initialize() + .catch((err) => { + console.log(err); + }); + await Record.getRecords("Leads").catch((err) => { + console.log(err); + }); + await ZOHOCRMSDK.Initializer.removeUserConfiguration(token).catch( + (err) => { + console.log(err); + } + ); + let environment2 = ZOHOCRMSDK.EUDataCenter.SANDBOX(); + let token2 = new ZOHOCRMSDK.OAuthBuilder() + .clientId("clientId") + .clientSecret("clientSecret") + .refreshToken("REFRESH Token") + .redirectURL("redirectURL") + .build(); + (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment2) + .token(token2) + .switchUser() + .catch((err) => { + console.log(err); + }); + await Record.getRecords("Leads").catch((err) => { + console.log(err); + }); + } + static async getRecords(moduleAPIName) { + try { + let recordOperations = new ZOHOCRMSDK.Records.RecordOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Records.GetRecordsParam.APPROVED, "both"); + let fieldNames = ["Company", "Email"]; + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordsParam.FIELDS, fieldNames.toString()); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + await headerInstance.add( + ZOHOCRMSDK.Records.GetRecordsHeader.IF_MODIFIED_SINCE, + new Date("2020-01-01T00:00:00+05:30") + ); + let response = await recordOperations.getRecords( + moduleAPIName, + paramInstance, + headerInstance + ); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log( + response.getStatusCode() == 204 ? "No Content" : "Not Modified" + ); + return; + } + let responseObject = response.getObject(); + + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Records.ResponseWrapper) { + let records = responseObject.getData(); + + for (let index = 0; index < records.length; index++) { + let record = records[index]; + console.log("Record ID: " + record.getId()); + let createdBy = record.getCreatedBy(); + if (createdBy != null) { + console.log("Record Created By User-ID: " + createdBy.getId()); + console.log( + "Record Created By User-Name: " + createdBy.getName() + ); + console.log( + "Record Created By User-Email: " + createdBy.getEmail() + ); + } + console.log("Record CreatedTime: " + record.getCreatedTime()); + let modifiedBy = record.getModifiedBy(); + if (modifiedBy != null) { + console.log( + "Record Modified By User-ID: " + modifiedBy.getId() + ); + console.log( + "Record Modified By User-Name: " + modifiedBy.getName() + ); + console.log( + "Record Modified By User-Email: " + modifiedBy.getEmail() + ); + } + console.log("Record ModifiedTime: " + record.getModifiedTime()); + let tags = record.getTag(); + if (tags != null) { + tags.forEach((tag) => { + console.log("Record Tag Name: " + tag.getName()); + console.log("Record Tag ID: " + tag.getId()); + }); + } + let keyValues = record.getKeyValues(); + let keyArray = Array.from(keyValues.keys()); + for (let keyIndex = 0; keyIndex < keyArray.length; keyIndex++) { + const keyName = keyArray[keyIndex]; + let value = keyValues.get(keyName); + console.log(keyName + " : " + value); + } + } + } + } + } + } catch (error) { + console.log(error); + } + } +} + +Record.call(); +``` + +- The program execution starts from call(). + +- The details of **"user1"** are is given in the variables user1, token1, environment1. + +- Similarly, the details of another user **"user2"** is given in the variables user2, token2, environment2. + +- The **switchUser()** function is used to switch between the **"user1"** and **"user2"** as required. + +- Based on the latest switched user, the **Record.getRecords(moduleAPIName)** will fetch records. + +## SDK Sample code + +```js +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateRecords { + + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createRecords(moduleAPIName) { + //example + //let moduleAPIName = "module_api_name"; + let recordOperations = new ZOHOCRMSDK.Records.RecordOperations(); + let request = new ZOHOCRMSDK.Records.BodyWrapper(); + let recordsArray = []; + let record = new ZOHOCRMSDK.Records.Record(); + record.addFieldValue(ZOHOCRMSDK.Records.Field.Leads.LAST_NAME, "Node JS SDK"); + record.addFieldValue(ZOHOCRMSDK.Records.Field.Leads.FIRST_NAME, "Node"); + recordsArray.push(record); + request.setData(recordsArray); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + let response = await recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Records.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Records.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Records.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + } + } + } + } +await CreateRecords.initialize(); +let moduleAPIName = "leads"; +await CreateRecords.createRecords(moduleAPIName); +``` diff --git a/versions/3.0.0/class_hierarchy.png b/versions/3.0.0/class_hierarchy.png new file mode 100644 index 0000000000000000000000000000000000000000..8691f20c6ab8dbd86ab5ebc0f29a42bf0bb1aa01 GIT binary patch literal 54307 zcmeFZcQoAJ_b-e{5F`>oqL+k3841yAln8<#dW+sij5@jqBBC3;ghcPXj24~I+ZZ)^ zFTv={efyMea)0YSe>~56*1C7C`(s)2w%=!;vd=#IoU>nhPtY4h8RDCiH?gp=h-F_% zsbFE@Ah58m-NL^CP*%0&Er1VP^A`#)u&_$P2+s|#1OL+-zfw`a!g6EA!t(iug>?#$ zd{(iroStG~t-r&<5{$#bqIjQFt1Jw>_-LvrYo?%p#R@#*V_nC-i**fn!Ule^uqm;w zY6G6I6E2s~erIT`8yD&lA@!l12k4xj{w z0~G9N=*j_hVEVg~f9sJlbufllzIU{=1JhsCYiMNWsYw0(ZuBJAc zQkJ%+V27)I@jvJOhv~n*`CoEs{pNi3OaSQNU+w+H`p2t(ScN&SCgYFE`FrO7q5@Md zdQ+J5KWZd;^Tk`2IZ-d65){eVBykZVdINq;gDEJ&^L75CBJ(7O%25|iYLYXlkx(eKE}_- z@Y#R(fWjn*q-%dLk>E>Ul~Cgn1vC6p^;La7n#m~6KC&Br&ME_2c=v&4J05n6(O(_>hnqe|0Po*EUy(>YiW`M5u?Jw`N=VTceN|6^*04)uC=&s1 z2yt)Sk72BL*fnpHFc@y%W%1Fxg%M2;xTE;9-*go6WAxNNJ}s<&kj9zA?@#t-p#j;u;}cCk(W;zyn1j+ouvsk? z%E+%Hw<>f>ZK|Y84|Ig|Mb9$jW?UO}8_sHKy*x|F9nK@x_O_JNN{_cbpDrC5cGyOl z?2dKq{ZxGvX`rdo2zD|Zvm0NPtgFSVoO!P7Jk20|BR`dX$5ZSHP1l(WzrWh_G#OLA#2mUg(Bju5`Q5Z*h3+^SaxrYq8Ju^ zRzmjIjkdh>$^knGj5{8>40PVg4~j2Wl`U0Nnf3;TGth`FSG-$FFpe9{auAiIx`MO% zlNV6WdfOHS-q+Ffffm=+^D{HmKg(M!U0~F@`NY(r!Fuo`sswFJ{jWe416EiDq5{Xu z?4o|DT^7=B+@_+wtz+m}hB)jh{ZUJ>*HKD&av*PdqCPFx=y@SlILxAdI4z>aJM0_{ zLw3i`s&&a1#mK&h2=lg{EQTG<4bZ55x7Vwh9n#2(9MY~i`W4_X(0I!OP*C~-bzqV! z?;5+~i;IWSC4RHJ6dwrARO_4!8%Ou8xHQ*1agdm!Zz1as>Xx zwa^3J+hj9UXx;n4N}@y=JNI!8(@+>W7K75I$aok$#ZwiyS>qt-8A|zt^)=;wti6sPhaIwntB^4vXrz367t7-lrt>FnPnd>KRT2O}1dVtGqb zs@zLG3tSh6d!FT96$_ddRFj}d7J8D(;oxIfr>95<4Od;otoxML!7qZdpa;4<93?#0jR)`cELTvn2c3(@4d!3*_jw0_Z zhl87F$Z1_f@W`;0b6X8c@p0q%%XlKXD%~5Kzhb|L+GcnhI%RyB;8ZAV_^Ok5QXm`e zqQ6Djy-Yw09g;(N?3hBPM$}Za)i-eWGO2iuZ|Q5QERRj{3eoOWy-tW=fnMh^Vs!FE ze?LtmaPwAj+(~jp>*jIU`4>zJy)a89O_DqU+e13kM83Q9yVk77NT945O-s?2h{a7U zs7l(cH7YYR#EcgolXK^OQIE?->Fh@`$htIi@2Hzn;N0iA!2a!k_pQE-%G*L@4*6y#YTE%R3<`^+v%zG{90(bGDWo59vgOMKl+L)ZQHIt)g+ToVI| z?-JfAMjvuu?Pvj=e zSl(*5NHeOLOEDtbtYB5KUMivJPV!ND{UvIl)&>=!z3XA4DWo%qZPZ<# zE$f`=O*m*&bazK`r%Xe!_(-&VUhnazXWX3Sqg|(?QoECMYSpK_RdyIB555P^Wk#M2=XsXQULCz9>@vOXWRF-7`a!N757@zNVsg%UVw~ZvAJ40iM zPfuEtp(=QmQ{`>fD9Di2;UxP330mhB{yK5uUh@9wsI;>Tt859__lHILPy4krA5$cy zJkdy=RhYpz`je&V~fa57dmHtjE3`uV?l$fN33FZK66 zdwHStX03a^tA*SiTy!ty-7IteoW#%DQX;zaL2YkpKE^mR@m>$k)ygdZ&IaJ?4|#pD za1&UH0~OCpk4HauYqLaSaue^HrQw^A*A66k>hR6=Fo!^mpiQSi9PNZv89nVr&@x}q z7bl6I>&D`sX|t~RE=`%_h4yU<(rD5tn0O9GWo-QP``1IxlNQqQm9@O%ArwY6k3Qu4Vc|~5W0g$lLpJez@3Xv%nj+Vq z(3@XaFsW@1@;cU%R1bs@8$aC-TS9lhQkM5?wJY)aXD+@=nDue)Hq;(<2?lM@hY;{u zE5(ClE{qxQ%skz$w^PCWd(TfUS6HFvZ7S2E`t6~wV#`PPYu1;WnIDk%aG!k%5Y!am zP(L1Ct=Dbg79IXV zaakmGA)LGQWSB+@6Nfi$lh~UOz^Tbyq&s|`co@{IPtT|?B{-c9NP24OYvuRgl zA|IMl_*?UM&&SzLPgOnL1C3d}&m#6Z&oLdivm*ixi67bew#Z5L&wMjIxw#Ed;I~Cd76YpZpbb;T^?^ ze$SYO7BkM=YO5WCIV$sMcq0btdd-;6sdT*SOWc)ePmG}f@#gupf^ z`h#a&4bEuuiHDbujiNd0)5Pt1*w5rD_jEjuO9?Q*4Z8xBXOgr>w1881v70o(xNfu)F&aUnFLu zd-gyE*=u9$FHsXiN%2{GhkWl2+N2{`?A3x_oV);Yv8y(6AsvE7j_-KHGLHqhxW+r4BhTvxVai+Nx~ zVQ4#j{0i-)J-DTj|`=I3$s8J4|*X;dqH+ z?$%=8|23>GR)T1Jm-u*mhRb$n&T@Ev(f33o>FC#|YpSO4?HZG~&j@>q#|;s#bDXa( z!bFZLB~S(}M7(1JR#|y2j)T^|q+RUDUs^23Mm_~ehvTLRFk?>7H$mQ_rljl0)e=Ay zOU&(Bu7OaqkTfWaBdT>u=bFP!rLnp;-mU>=W^GTT0pH-(u&YqweREQ7s>$Jr7>&1@ zJ9)Q3&-7!^&CT-cWkL4kT~Gv%ZVQCQu2PwErJ`u4LBOJVCo{Vy@wz+zXa6|rO7Dca zY<)}8?GwtoMo(th)u)*~P6Ol1D~T_i#8yf@peMfip&`(=9gmNJk;nUU+`zfi3pke^ zmKiJIw?4$i;3*!9{cQ0w)R!Pd9FjyV^mRoA$z;Hv;*grfC^WZ@Rk+++yC&qpfW53$ zj%WV%`GQvdNNLaO@9`CtuV=@6y*bd6sIvW~>y&zM(@*JiX&^&=Y6>Iu$6k9LxTR#Z{MV3 z2}JHRf;vQ?{W_wULL(Mu4zk(fmLc6Q)dZUExpVm&griIwwrlQHvMzpAC4mJa-8Yk; zAC-!xz4whV+&u41X+S1vX^RB6%$UMe>R-HaqBY$AsaVV3Zwt2X$D?UfS+?%<6VV%# z&oH;2iv@MYcBI%{n*A8p$qs3Q=y+6W*~^Ax{$O*eNt^yqD+U|`p6%P9K2shw#U*lX zfGDgwdyM;IZwR9YCqw@}j6NdC5+fqkNUYrMJtXmIvLeuI&~X=+VoxMS>ZItopC&er z>yt7AC#2GVU2RYHNAXZArnb_u`G-s*eWP&hbsK0gH`=tMt5@s8VV>!DvByZv-Qo%} z(rX+QGo0RU`D6`{6I|(@a2C6b2jOQz6O;01^dx<_yX=7uJ8$^#r3idkohsdEk#Be` z6}q1*p>HR+^AE8%7FVj)XUzC%eXuX3NxX`*DT&wu!LVk78#g_yW=;`LYT--lyxwL?Bnj5@5g7e3f zmI%1gwiK&o-~HW+xGQkW50nvmL-@yK_31<4uHK@UCijP5VeSRsR-nBQ=lJ9L|No+c z_7zr!nw+_~zS#_K-n?Z4Oj20F;XwERN!-)gRJPU24zJq^zR`Epa1Y0yNV}PINUJ4U z5aBYy012qLhq?g=ygLeC-H)~lFQHKAo#|VwSC@SH2?COUJ6j^J&;IDtgaWXugB>^V z{}9F&AdJD8mh#)bh4FP7pl!YE2>oM>gNncy|GT>Xmfio&igI_do<&IF%KO$tc_%wN zJN#^?(L1F3-Ado1ryj@e*N{a9E40zy0Gp&IM_;I3AaC9DV^ZPWa!)+=nb*;@%iey! zn7q2WdK08UoIVo&d=J67hejI6sK9dAu1-ygEXD7B;KU0T;O+uIFf*rS;})5?=~&Fi2LD}Q|FiR*F^CAk7zlz(rF@O zn)-gg*fd`1w=tEse_F!d;?HwlAUuqGB(H0IIP2|w)JKOe#pqi#>ouvCxX*vrJxuWG zruaz|=k;!IgJ_2IA8Vh15wLl8UVR2GLjM{QpxmdW)eTkcKkX_bKqK+}e*X`1xyt0D z8T#MV{a-D+ph4urfAvJu0S5+y4OQ70boKT+`Hzl`)gGbB%;85#Nz_`kjyVq>Jt{c) z@fh&zY>zq8^ou7iJ z7w>em*bVO&;F5(V!lI+A37vFxlg2kjH4L0Mci?)hwp2tobFZ67A2N#z-!Vd?8<<`- z*Bqrcf*0CD2q!vY#;#8Xk&#&7VHZYi`H(m3ksug8qEONqSy_nMjY6t};>y0tAM_;K zxY~DVI0^`loRu3pS^iq}!&ypE0pnacfiJ$6;g>sd*jVbBk8&o2`Dupk&d`W?c?^)3 zmxERn^L@lANW{Y(u^n%rSaApl2)Nu1R+%R!{^5L|yvaVK0C0i3AEw77xy(RcY)lT- zeibUg!O;`PdNFi;K)@uA;Q300HCQW;&_oiy+z$)cmQ+%nLzRRsL4hY5!kr8e;e4+8=G#@XTL}g z$^$JdN$(}1)Sp-7cfDly5x;*&Jp7}w`5PD(4zHzKPuw#!VzZ2+g?<2qTdnBKYd;Gx z>9vS_mr3R_m22{!1kG0x`H4RSxTI9<+Vu4<>Rm2Vjl*y`w&ieiS>OSpMm5&efd|=7 zo;)dSBi9*;wM?~raKrZ%(@#!`b1@lhp=`T@JNJcMi;1ZD2kJMuZ}=86{`9szz)Y#3 zgZvlv-b6lLTT)dLQDat0+0-^peFhjXY^89`={pZ2#{CBMR!WRJUbqtdgTo+JmCZhf?rD;Q% zvS_YJ+p1)?)TvaOfcOtWzE~f=lhPN>F<4ni?Gaidi=#UyJ*O{qYUPT$!|E%u9tMBU zdY1D{w@>@37Sg|JNt4-cekyoCe{Y7-S7Wvyd`ejD?l>jM{nf*Z?XXgw$9{St;)+ME zCYY$ZIZPWr45H(IPZfwBf~^j zBn)nUysanq?u;W!jeW(@l7^ojcS7Q4upOJ}-Xo|j%HNh@fYJAbPQi)OQ}$NK3*`cj zJ!#Y65YtDvf>Gix7-r`B7JEznG5m9KJ|p&X6Wk+&e;gMPz}XpIN0|M4d+-sjz6+e4 zt^40_{;?T=0Gw-k5A^jnD;Cb29B{5I6p^g|cV__(@3lz)fQ5kj+`Kx$|8toC$Oatl zs}G6Lf1p~c5Wqx$c5qn#fb&QSuMYSBTRQ05`o7@)zx~5y3Xi8{xk8KJo8b>-gY5UZ zb(Z!HWyn;tmL`pV-XJL5+0Ma+BS%K$^j{Rzoyq#2pSxG+RJFASm9F$XG1>sTXG>XG zUvrKCTr}U!k6fWU!#7WM%etFjUbCUX{0eU9PqBYvMAqxb?-}h~B{JXTb#*Tob8>TG zWO-JLjdn5eFCun)BwgfU3V3BB;TSb`s)E?Z#^`E{Tfd{txD&GUZ;hD7=kNf8?TlCf7OT$|MdxjM;%!t#6KOih5xKbRO^(MF zx}+@rt_(Y9uQNnoNVP4;oFxPie%?&^z`j}TM7Ai|eJ6&IA~|BI;Fc>VM;=U-vnL9Z z+a&7hnw#V#k*R}O(}3;ubr63T?@o1p!6*CbQ&deA*$py;^-*Z7HR!-Lc34Ca)L4>z z>FVj$hB)ZzMSlBU{<1x#L{9WFUFFs|lUgWEGN`CQ6?7=(G(S#svVO+O661mrmEBI5 zl&m%7El1wk9kzeKW!RnTHfP}dM$}Qzx8?RLm}vdo1d;8%DJ$saNvRpqX{>pBdVVUz z$UsCxW-E0pcf-fK7NE^UCC_x40dJ0S<1kc#1wNAj?)4zuoZRjy>s!r3=s)TJ)kKANJgMfX^u zFRCoJ%b+lYH;ExM5g-RUjv>M8;F?!nDXlHNC z%BkW!fbR&Vc>wUv-blJiSLdfF)v&&B`@rvr@5Wpv6G4C{a5rC?10L^QTGx~A zLNdga>)$za`~5BirEAx^nWPi1@eMgVWVV55&IDGnLcHT?WLYLfr@XvJy6bcU0oS_E zy?76!fFz+OOb?Bqa1N(9t}Z*G;$fXmY-9f>0Fq1mL`>R!A6G*9owpNL+?xip@4U~Q zk9l@aAhcS9@#ERvet|{V-_>shd#2qoz`S`hn;R~o;J@5NoN#$g^ITZkOqUJKr~U0v z!CI|?!=$-x;^+e2O7P1MjrkcAiz5tvW&By2Aw zAUF<i3F5CFPk)N+;ph0ur#%Y9;bBGXXs5do% zqzrVf&>v7j&Q*l)S*@lFhbqK=3wssiG{U_XsQ(^=ejPvM8r$#g+?Vr!%V_o<>a26> zlyIf&=qS9+PVH5Nexl2`pzP4l^UR$R>IV*xlwg-c(MPI>4-y!8pYOwH_e)Qt_qJtV z>oj-b9Smcrzlu@DKlruYn-}9w#{qMv1qGdYef70gY-$aF_SezvN{%8X$K94%^URr4 z4+rk|5{Ym&UY5u$¹S*=FI6MOax3aJKcM>8&w5leKinG=#xaQAgb+w#gs-qgdi zJk(>; zcb?+y3i?b_WjkYRAyZ5eM11k{i_n$xpWASPfBKwb{&UXfBMoGl{cD9XSq(eWWtNzXxgV+MT6 zm%8d(m5tJN_qXCWr-oH8NA|NDQ#Pm$mF`i^mA!c$98{&;NHby>17OUYVgst6;la2v zrOt2xzOilt1fs35gPeKMTcqK1nbAe05>rt_sedrT0xO;TYNC~;^ugoE0jB%Bs>%P> zNfqaW7+-b?NyR~m`*uX*<*B^$xM3g(?EXdDf$C1vjdg-&x0B#;VXvLi(J0KZFlonz z*ry;JsxfyR{~wBzEC{H%Np_WHV5J=>#+UM}E~tI?Wb%+T9CIws5?+_~L5t_()>-Ih z!$gzP-Open272a?VkhZx&NNBvVN+w00W_5=0mQNqzgWA)Ftu_G=b5^PC~h^7n3$^Q z2z;QwAvaNA!JA%G@@r^Qq8s?uphHf{`0-C~7?&$mYEy~Bc_>?18>o4ip-fh;a@%(U zj(E|r)UDz6&2>0q+C(Enr1IEA$bfGwNIM1Pe^H|2_DNyeZD&|+tzh={G~Xz6=A{DB zy;}=1Ys8tC#~#0IVeDQy{ieyAPHO^gAa8wTG0SeY*rQH{VieYF&A~>hg0z`KK^y=N z^d#J^UhXi+Gnu>awcqMLuj&a}l05L>D)Gp6gDo83ddL;Ea0D&cGkK;TJxl&#UNS`I zr9M|#Rc*Cz;_m!4fX%j4St$tVFi|(b`>VgFZZM>mv}M_WV(S$1v8i>(jwWCN_QE>Bq8e>lMR=9WMH#dN*v7H(M+9!nSn1-@mvm zusaSLVw$Wfu*FO(sVO#1RzNS?P^By5nY0JY#9`^zeQ&Z!5eqGbOPb8L1{Hv|DqL6> z3t4cCE4Aw#?%D8LYiEulX1!F>ig&@Y(g$zRtchDwSq31PCq+(Pe-D7)+6Q<-{$MG)FU+$A+C?m-oGntJVD~S_kGC_^?ko4pt zm;Nn~`&P_mw-eRqg;rxK=jDPx0g@){9>O6QVH(|@2LYX_ey;0Z4&t#dcHY4~k+wV5 zFehg_&$)SvlVC(>RIj{9KgXd8Xy5C)xa`aG$(KJmyzt5$2AS~_ zXfh<6r(P-dr|v9+n+?|>gFM6~tzBLAk;zN&(93go*uJ>vrBS?a9;2s|8PiAZWwP!h zf9Y*+o7K=R5bvz;+!eHG_ngY8TtkC=Lnx++MgwgD@uAw`7}`*ac#YgQq##QqpS3}9 z!Ji1K8n1Imbu=W>*jp8nX7FmAY+KhNeBHdDIOq5wwwTv6TD(CA^;u&>*5(1Eh#BnL z{AL;B3X1^ZvDm#|x&**c(*njjI^cXt@qTN#x|? zf}|ad770wG-Db;sK|kY?g_D zf&SDa27|iFnAiL&=Dnc7XxVj|R{DXv*rZf3p$K5-Vt<)y!K(yd9>sIg+*In7gk`8Q z!50V{AGgUmv|WS2oY$+(j>RYShWj>6ZlVm3<~Sm)z4uC5=WqH?gE2nnYdaSdjax#o z{i9DaF!j|jUyyX)q>I$5<3x&tXPCl#pldyqs3{lFN!7b$l-Axahk71&IX{=3J2dSL z`jTVpQVW+X9=GuKYcqIlR17{sV>yUAfo`q$xa zLN$;jZG{QqCD!HUN*pTv=vA`qik)K^*F&B&Ku?Tr_Bkk*X|ESo(jaCE9uSpTgv<8HYr-}>UH2Hn~trKt(keuIk(1GY4;kMla{bGL6Cypd*Rrj;f$ zXx?%3_#{$dTKH^^BK1}fPnP7*qF@=nBgIF%ovNmLM$O&NA6njw=Jn@ZurLF$BoB%*aVPL>Es}d8b06iE-@54G&@aHvEvoCP%l`4 zK&Hu_^zBs5*14phZhwqd@G8A;QWm!1rF*Fjo~81l*7q)I&R8n#(%?0;N}cvB>S3E- zoHOT-rK!U|-|y=nOTd<3saEKMkp7G*7zj>D2uYyvHmM!|*l>i=NGnNHU|H!+FrZ&9 znFQibXmI)+XGFbm`|EUG zcqAXya-`(+3_Y`VShuo_?2Jk9MtzJ3a@nb?!X&aL^P34I)??BRqx(hEnBE};`>Ck% z-xAvH+USK~ANGLrMT_8f4q~*rk&xb;vVpG^9~Ro8e4fyaVA?icd*VU0K{9PIANIVQSCxipsWiM_6w{`x-{l)^^a^)IB!M)3*{>HwlS{cPY9n z>!D@6%&St3JUof`W^2FLHy7K^+`2zRKFP;{&TrFFMkO&|yc%?A zN3}}HQ*9oAY=&mN1bb{<5`y*71f)t>ldU5AM0B36UuD|rI<-!3^E+5&PPuspd3+PY z*RhFw95yqi$3mo@OQFT`$}(yC!z8*(`SiBA#Kj?Wx~*CAFhAJt^z`hf7^PuA__`wl zU^982*)i4El=U<7-msm1uLPzQBOEOz!nxhEv)%mMrg}n{tH|PzJkioND&6L8*R)`* z(UZoPR-4)8N)}(T+V~TXYEuJP;$Ic-EbE=8w(p(jfb|R97Vj=qvK{D-kz|QD4F#i+ zV!*!X@VT|0!a#@KbX|+4QvNf7&YJXBkG$F1BBfFs8;JN`-_Azs0G<=5V^9$L0HfIL zm`2pzG}#B<%}k10tE;Z8`wqt3B`dfzVZ!Z#-nVj^fe|lQg=3`4Ar%(~cg1^AM%_I+t7ooz1 zo?r$EUhTuCs7L5NF2Z2fy-I4nTu7_0CFrPn+9ZA{??y4+gl>A@HNx2a9^e3MTdz9vthnBYC$*&qXvO||}71Bpy^sqULL zm{H$PpZ}rXxbe{^kAhq%?INa~c}wsWOY`c-++_5#Qu52W#7(4Qd!>fK48uFzy8ZFi zfDGo+AWySPqi-tc%`S@76Bm0v1>)Fz&cOp|9!OB87k5}%d>dp&Fblp}5Ug1=IF zjp~QD&12U?wEwngR5I7_!jcOO$Np^%xLO(Rc%FdJPB%_Tths}owd?#$-DGg9ehNy# zpi%E~uVJil@}a6bkGb>Z)^n982Ben5nfpfF5gVBGEyKaOk}K@yr42IS$H@1 zq6r>fYD3YB5@P)nXsrv+aN@?cSy}%84>rlYx#*zO3*i$Xk1?`a5 zf>NV4IJ;s*-iGg#lySn+GBD*EC8ncK^K1r?AiXUA%eb$hkAjEivcoHn7o(J7Xk4aB zdQnf?Q>fvnr`qn#8LLohXpFb2y$;!`l!Nqv`U}Hna^A?c-IG{=uIl8Cnd<@zatpx| zms4%cUe?$)7An$~8$*8$UM@+Wt(@6y&VlbwO!P&tEUn{~26U0wPK(7y4k@MO{Y;xAw*d-PmWI=#-T=BP|{qbU+0N7;ov$cp*&q1o9t=ZfTht;EwKy zXnB%w_@H2>`-C-DaH8iMbW@<=H9w7K{(JUWuN4l_>6bq#6GI;B%)E!k#1Ei1&os_H zWo!#;u~6JV+%-nNU=tcgLx62*M>FCWtfcO-9-73HE10sx(~PVUn!H_~5lv{Of3EDX z(MzQ_VNqTzK0JEw9q(4Nn|2&(3J{)E9QnG1Hrh76LP^P#CVs`NZ^K0 zGV>J*dgXH_p~2mJ@hGPE<_15o`a+H6yZ&`Wi+`0QI2K#3m%M$i#h>rBYM3GZbDIA+ zssW#M?;UY=J{f=0|1bbmzQOrqs(9_UGaMTqmjOUkaRS=@EG5qFaO)4Jw>UjM;PobX zdX+@-+dpm;@9^6%4wU}?n)%YSQ20;A%2x&4vGsWRScR>zOwV!tQUW4fx*8Ic$g3^n zM{&)h3(vEMogW9+tcPwL`is9J03!7V3ioK?0y0)s6BTSiqj#z|hvK(~4<0le)wb1D z_=$Vqh0r+fkh65y_kv}@iV^Gho4k*;^f4McqqgMx8$0!9FFSsYFZ6$clIL9uPoS)- zRZxeEvbXNFQ!#grQY>U>+S--87$<$Dc=L=k!1FrkMxk8J6GHicW1M)x%|zm} zs(!6I^SK{g?0NEZFW!v`OpmfC!g|dfk7B@RJ2Fqo1}#{|c1( zN0b8*fVYuGHn#MS+#tpTAjBpe9@hP@P5?NA<3nIZWQH9|4HW=FuWRL zK+FdQEZ;+tP6WcbAG~?(?^vK!5}c2Qj`->~{eP?4ryGErELNo_{=ioT7_RF00F(Gb zPU%3xkpQJz1n(cJ>v*NPf$uWj{2?a`AfP%lK>s`OpK_7_0Hwd{^BudJou41w;CUto z1{Y3dR924FcXXU>FF8OUCTl|(k4hfXEL(+{7Wt(>uaeBafd& zY!aBVb)11WNV>Ne5TbvzLvj-s#hW+ZiSWhWh2Vdo;sdQ-0sw9;Dce6w>W}b-38i<( zyK_TXN~z4(|3Y;C){ffG03emu>7a`*{xwBhLgK?0T9MjI_|cCTl;A(fY6EJ3T=b+< z7J%>&Y}^FGDhseylcL9!Dw15owPAED(ywo27M-*n%h%do@~m>IBp!QqCCV0<3NRhK zckgqVd^*^fZS>;&3!Mc-S)%9@G@$2x0|3`z#AJYAxOM#2wzjUgXU6N$adVx3ze3-9 zUdc1rauoPYCjiM-MFNs?fbEiyYQlWj!3apTsRG$%SiYYgHA$@&ZV0wQkR>affJJ1& z@x!|vLo4D|9ScCBSF_tBbJdm$GtgG3hzzh+5*UitG7~@7KmBX|@E;CLebRA2;2h0Q zCIAbn=*f#iphFUJ^p74%Z~Fh$6LETMW(mB#)qK04WGDL2YrdNFyL(hirABHB?9VG& zCN!fK2^(FHbrG*p+cFX@zwG2gPeEpPt2fCrU)c7yx2 zj9Vcqd&?I8sx>ad?rc@}Qnkb0hkR4}YrZp1bg?|_^Qv!fVv~{|v4kkxuJv+aBSGXb zwf-kHPB2is;FWE`B@kjDfn)6^7hx{&G5Lk^zf}V2FenWmrFs{#*1vZGT!~izO(O2z zpE-PbfL0BTrk3CM!}5FtXbc}^|BtAyR*GFiUHv6Rn|is~s$v&p;+RNQLF=O3)4c<3 z%csrx!#3%woxt?M)Jpq?HmhwFjYmhh?L?`8ylE-u6o0c=EmCOKdG=Y2UdYBw!S<9c z!es_LKI<}5nO8izxk!WHP2>mZ1#As92=a-3@vaF${`z}!HcAvX(s+(U&ri)OHbvb`6DM3Q zEgwJ@e^_!^wBAG+Ej+CGc|fFcFHwlYW;h`s)fSE=4s-Jz*{f#_DrKeMr~tFpMH5HQiw#rY%lL(0&5S zfdTG_C$s0{yF!hlnL%8R9rvJn87f+}b(tx1hdRt%Kqi~KtYv}l`RgERZnpJV{hAnBvd_`B-kf|XqVpjoQEx@jq^{3sjoNK%CJTa1%!j7}k*tFF zo28zSSBZp<2qJ19%vv>3{8Lld6<)r{_guP9Oe9a%&)V90DJZskF<ozApXKL^rY z62CWRPKGu@z4Y3NN9qj?&oAv!5jq|4>t`x~wPQ4n^}@(q;x#Mp*n4M91Ib|~J)azb ztjN1LDrt0tV~>nbbepB72$Q*H|LxI6Z|?`(W?xAA0K<7W%bqJbS$s4_2=8)ti>>~j z;T6Cgo33(|)@Gg>&foyfhXFSTM_aM^rnhSmG&^;zGqsH|v4}am@7+Ph+>WWZvWlOh zb}EwM_X!u1!>;X!Um%1HU#m1t7vmjO9I={=olBr3cG5XTh2$$y?6Rz^R!bqbSr;QW zZkjITQUW=6L;@x|Z*vCbx8e@_A)~$0`giJN?)#Q7spy3iRp*RD{cWE&8?a+mQUyv^ zDFp`Og*YMs3)jyc7m_fdSspE!r1?ekQMZ#+#+%S#u8T0I zk$5N<+9cH+Rmb7{tnoOX9VOY4yxFle>ViOfXGn=+GP|d7b<;bhwEI_5MCMKXQ#ycr zwYT8vtnuXj5CqNFIi-~~%=EIh2I<0beTtK3#Cd&b`?RL6JvipPKK-Q#o9rGe^lnIE zom{=*9O~Dsha;>fDV{t97QClTW8ZqG6g{RR17-VG1lM|$YF9XU;dSy z_(kZU9`jm-6@W>fwx@cVHn2mhB&x!qLdN8ywNy(Fsst3gjw|E}8xbyB`Lmj0nw^u= ztgWigKX0Dr?M<&t7B>R zf9W_p_c57N3!%2)R6n zm$7!Dx)CsQ%4YuWcL5CFn&y)}9AuD&TX0@Xx){zlerxp!|IAL7&U+9Co14tk<}0IO zf&bb+N9b&XFUYtJn^U;JpVfJp@u6Hi3Wcg@;TbYbHBPGyIonf|JoYe~a<32L@0Z9a z0}c*5$c7C1S0oQ*ojNc}{gjp-?0JFHP4Rl(vX#{Q>}^on9(UsuYEt-_LMP09%gBaDzh(Rg#N%Tr+p4+Q*a_{9H4=6-g3+ubbg~(C&P0cieo^L|GvK_Vd zoc(ok8E2AkkMt)c-PW9}&QW<&JV%jb@az16vDI#>BT=o$IOy?{CO)3>9>c8%Nu%Y(*}f z50~Ol6LG^}0{43eAjSG&R6;K{1DXiUEvNe4pVLB0s6#`Dkb)dT-p!JDm2szEAAXBi_xNdx?%|*kp!Ap`IZ`$MC}Y82d?SMmwv4qk`du zMO)swVf@oJ7yZUV3#A9eUg>T@(xJ34;8vg9p)sSo*;fExadufL$JC&`W63%j4cMd5 zNQH1DW>l3|`G;5U)(LjUUQw`u7f+f^OS(Hv#Zbl4kOP+!?n8yc84hVybbFsycwf@m z{#cTWRlq(G+JI#+x#iNf`hBF`-E9x_4ZS>~&4Bqqe-Yg;DbP_7oqRF%j+6!KZ&mEn zvwYKY!f5t0uhr%fuR-mscy9BT*26}bdcm`-E}_0aut227K^cLhdq{k_RRs|M@-xk1 zRJINcbXYdsEBm*ffFJTd5>QmEc?T1&s$L5pIlZ{Mc@CfO_i$D8^Xw>!rZP82h*ElAAn2CA<_#%t z-GgdM@9N9M`}H~CJnXJoZ_T*95m%KYznIE;IiaGEdNJLc86b?N#>89}-Wrt;6cyFnh0xExkhbp$4jwzmQ{0 z%v=icxcAo;lH+os@bi|W$hMZWlYLojdKB+RrD2L27~DvO%x2)8Kn`*yX0ehwm>NeP zKS1GWjq^)BzR&L}#MTF%$9ub!ysdJWZ?|TR5jp!=CWitdLE^HSo2h!v`#Crlf-yCw zd;w;>I4U`q!@RT9;vj!BXI;C}t}jq&BhIq^#)9Z?6$(dI9$%q_w&kttIq`X^8e_ro z9xGMQaPqb65Cw||Ut99jS<3jtY%IR%G|>Skl3e_rt3+D#z*^^j9JP`yK_?sTT-Cw`qGKuDU9hh z=*>=fAH|8Xq)29eS=ijud=4jh#+T5(yULiDTiVbDClK8Ao6f38Gp!4cye3-)?72D3FSSr zhWfdc3MsKe2sB-Nli8SGo*l@&=d=zX&WW#rVnkFHPXvnsF(I+UO9g%EYfsb7M@NbI z+VaGzJkpUEOghg85k1ZkvqlTv+x>vMKEu!bu#lQ1oWo>cxF}cmaa6B_U0>b(I>zL| zZ7t}uXPUpYYx~Jg#7`QWLD{B45$?Ai`?NG4O5R|x<_$KXh^&B{RTRG|@C&sTa0mw= z2(7q8b6z~7G4ypvm)5lId08*1o1VetArMjsi3;81*;{z_)E}up*WcyACRaZeOjJ%ftxP4B}8#dAd(c z#L0f>9~I~KLqdc7;Yjyk&n$t8vKCyMjZ&{;7-;3lt{8=>YS&Q_&F`YTa&YmdIwI1EqD zV5Wtt*k89`rUb<~7YjtH5`7IT78eP`j1il9&Hnf**#TlXne}Er=Ar zu}oN*Dm9Gj5SeK+!erDaiw*ZsNGN9-PyYvPZy8n9_l1orqJWBkptK;Vbax!3qy?nA z8>G8Lx|BF{moyx@K~Un*-QCTh^W1&>>0j@--|l$d4>EMiUVH7e=2~mc=b7`_Dh;-5 zDzSm9DmdLDl<4|3DY!+DMI!sxQ#&LBpUYg1dMtPeA40nBuWdr&3&Hb)>c%OIR~@Av zA3r+QR>K{!?)u&sHRtbPp#sQU)ZdAl6mBY)F$qkEcr{J4&4O3`lWx3bH44F_9Yd3< zu3Y<1hPsbQA|3q>sr69f#trm)pXg4$AQ0qh|IQ+%lk$zz2<3@n%;cko$!E(X1V`rU z8QF5>J@h{u){kg;ER2QR9m$QOmViUW{K}%u*0Curjo;1DN3y^^T86CRXsE9U$S^Gy ztfsRPP}%TOmbK=KM!dj<1UEg4|^;nZJ zTz&0UyK1t>>B3xNuU2_uVAUXblPGfwJ}4(UDz@}_mu=MSL@>o5IIG)hO<5aPYRO$&nD`8MZ}{@ zM;TL5_7Nk;31Ir~JxR!nCMN!?iX0JT*&;_?uY$N^=_2ZTFI3a|?$w)e^1>^m&fZ7f zP!*!0x>Zy}b83&x2F>66Ecrs2&`UGnJGtYu8lYXE=}|n=74ZCpo`d`CUP|91&%$8C zN3AtBN@uRtdjWM3hEPb&#@&S0C7$Hml^-05fu0AZ+D$H!)Ie5G)b|11={y;Y7jw`g@;>>gUM^N>Z!F7$)a_TxS@og}P%}PUklM>Tc!z!8yrteR0te@Qztz`7Tz73o9M&{Y zGb6xRTg#2OYxMGUd^4p+|A*Ew5!Mm0s(eK9*x{9NW}EP_G9MIc*5kup*|LgM@72`m z3l5c!088Lou8aQX(E$1#ijXBcM*|)GLt%UZuAvyW5&RGIy#olJ0Bpq}w)fgU><=K!(cf6!YlpFroC6CjD6q9l#OnO5Znl5efcfXSz~FXTWe)vwZ!%CuKZ765{osG&=nWDE$ObWkYB|$??(G9;q`k-8 zMECv~A~FQE2ATfG_Rqb>nD2H%eLwzwEU4mNcFA1N(z3`cmEWz(t-q`5>whkTd<9vW zCT5@+U^1C?Zl*-P+OlW6i`|+j8uk>sE9HHazU#at@!Q%=Hy_x`0UHE=(*chB^{%9% zzqln6Np&?`duk=%Rdt0($-Xmro@c9d)4I2*=?aAh3$yuTWpPb9`+g3zx)%dj%=dtn zgT=ON*;E0D#U#XAViHjdcn9gLBq>=t3=sb4ifC36VK6j%;fQ>BBK^fFWrNu9B;ze$ z#RgB`y?gg%FjEZr-S5#o0v)IYG2*mmxci-nta|?&_pi=>#`0PFPM@IuTvRcK2Dph9 zp}u!FNc#887LYR;bYgDKH+$U}olb&v5zPV%LCg^@=Y}fGcUQ80v_P3LC?dkCM77)~ zsIg)HPZ8wO(vkt9B5<^#A1L|*>?0Ad56D%-lo06>+80OKrTQ-q&anJQ*M)o3ID z!-a~d1TKA&S%(=YibNk23?369e>8e3uVewA`))yc7yHlg%KP82zVA-*hMWL-H;D58B`6jS0wnkjB@ zqBd==t|32snmln22@B-S6pFe*k&gbIvlKyYZ$QfX7uL(c+ z`Zr4^^j{mIPboF91Sg!Zo_z-GU>*!vsfLKxKjXcTkwlo)XI5a1ah*MJ@C7}7O1i7` z*pWvXu~adC0=B0+!~Fprsq7uVL8 zGP)^IZ9XlY_Lxj~);0&3eJ&0g+2#I%NOZX4!%jLtsaN}(7>TWzO_?#opa^7_9CPzS zpuyH&`H?@Ym66%J{@?0~gry8P+Tq+}09IP7Hh0Z*P?P?OcMSS%ut$7!G=0BZWnJQG z8mL1T`;Q_W3kAg*v~~9O#_;YpD4fnZX{$QTI;@7W_I=@;a~3i)*B3Le-+#^slzzR| z7tLbdZ1wfe?!2FC+3nr2?N4kYd+WDvd8{$ z0ff(On`K~VC~kNmSW#&81{!kuO#QJ`G`_LnmcDRQRz`->+<6*8=qfU%z>I>PT_z_v z@}=8u0@-$PGU;m7?ajklK+AAt?Sk*bIQh#*B~%OIzt%WrFO&h1^W zeSdINiRZUSZqDajZmCMae!hROZ6Mj6Lfb=|a+#_m5&|=!mia5-;T-|${K29#Evj>L zH^_Et5dSW3Jkv>`vP=V?qa+5ioHJaEfg$awi>dZZ;(2x(2y~Eg|U;pv$M!J>@LRSlxGz&yfI&Lu~1w3T)I`mA=l-FS>31UF|{G zzK}$~J1#%$y16=wW!C>$6XbP^LE&uJ^N_xP#>C}ogI?yz)0OYyK0t8EFBTzT_x2*^ zDrB`gF@%yqW@WE-*05wY(lDSXGRfq2v)T+FD6%=Cu&x!)X!s}_URWJoV%|Zr79u_8 zbS-hQT!N4z{1ER|)-NfjbAwDB?RDFz2EgU=SHcE`Ki~H^GD%VqrBLmA?m)M6urVX} zsr#GN{;><@H>3bgUo>)gyh)xZ7U78G()r~j%>zaBpI_puoySi6?$Qe&7?1bV7xC!t znJpcGG;nSm+0+AeA4?9M8)5FVU?gtX0$V&krDW9vmw4>O7^PW1)uwriYmlDa6u@-> z0)kQIxmWEl(Coa0uO}MhJUwO4&fm4P*FsR1E{eVF(q0>z zPrGPMJl|fn+ib#S`xPN8$t_Os_ zs0ciQlj?kfC`X%?pNB;>AG^52)wFg$@4rKbz8c?#t3kwOtp)zdsFnM1 z3R-R-W^>wroiOLCjGEiYcnt1Hl= z?8eX(z|0LdzS3r;eN*y(Ea9lft>p)iZf6}dpIZaiAkCS>FRfiCVz-sWJA&|H@aytN zGqBxisi6vocvy(Pkq%<@>xH$zM_kGPeq%fFX2^qI5pTS6f>mjh@v5=UMy}Z#12D=D z*c(sFdWNsmykz(f_2MT==T`Jtv*xD`WiY4D3=`6qG8yyR8K$;34VuvcawSC!i=+}3 zLcI1;R_&+-i=u9UY|@wTG4W3&4T=l_yYoy9CUaZXo`p}LRfhxUv#Z2maxd&kWnSzg zl5)xFMkLsA)Hv3+3^6+AfL&Kheme8*!lw zBS9)ZF$(&XQ<`Pnlck~DClXbT1i{es6iQEQupH5<$<1}Y(9E{T(*3AznLt5nTd=y< zA+b`0B1uLN`V>WEfA<1##pQRiK@HjZBF$ml~|jq77?+t zNXsadz^DoQbyF4)!mpQLy^EU?Gw%J7$MMYE3Qf0VLqCQrYsDiURmXWLm+>9j=N)U( zzL6Oz#9yWP#$W#EDi3$HzJoPUYzktea{hB>I(YTujHbQ$#hgF`!XFGYL;~xY{EVN~ z$nSF!%=H*1w$PPUU%(ebzc4v@&HL;P; z%~mdcqF`U`P=@VFmd@oghNUdlCD!i9Oe2`fT5$iSf%efVf+7Xdz!T&dm>QM>wDVWr zOTQVXXO)4B67K#GnQj8#Cs!eEgt#F5c1%g+h7YMIFY4u+Zt^4=p@*Xt z;+H)Gr1D}oY4UrxrT_r_j9=Ssxm&(WO>rbYTU%7DhsoTr1@~H@eY_^;V0~$gXxkRJ z{-92rXY%UPaJj}qS*TqE;Miyi0p2b9%(TNuwiimO$+!wKr-1hl#_Ec&AH29Y_aAQl zG(12gDuC#)-;Lp%Q-uS&ST~xX{^2@=V4ZUAO=G*qNvo{U4O?_?&s$C{*WNQ6YR0Pp z{~K(>uC~S*SNM()qEb=fXmOekr+lBiz+crCVx3Wa^&LR0(}n^6n3tFv1>s|q9{Zte zQ+x<%?&%JU+8@C_OYlFB6YFDzPDK{UMjWSbZPKq3BQ1)yuq3LTt1V9$Jc?&6$Uov# zL7kRQ=CZulquz9n+GZ!}g9=p8H0Ow)rjvM@o_oEbvqFt2S1|=n`wdqhf+*gocQpA|J$gAkTSuEh>29ZC_(+SwE%NqL zuV#SPVoTxDqFxw%=c<fa&vL0#!sfSCyc^csZb~T=?@tR~ z&r-;%kQE`I7MtcP`HRA)rn`^SyYvs|C)Ib$Ex`tWF?F1qMxwo<0D_4!%jf_ z`74l0JaWV@L&tD&WKFxeO+sTR>ES%m#(DasT&DAjU#t@#Qu ztEHUC#X~ggB_6cs1omscKaO-IEAZWDUk|D_6)00l!? z*%cZ<*73`Lo#cGer$1cI_BHB2l05YxY`Z7DbM-CCZntPoG$nf4;`HUT&h))|5r(z56mYn&PbPLTr>&5Euh(d#fNaf=x9@Rd6O6U)2uLCLTN$G%;-kt&@ zBjyy&O(EjzVOwI4F`7xc9ou9n#qA;6TJ-H(srn3%R6Aeow-Gc$$&N}uYL&%kh=v}ufq{o&*O-2g?)yb23hZu_iC(%6`+9Z zcqBZjpNqq-qmu6_6N$o(vitGmTFvNAzgi*~TIF@*Ta~>G3vcE9FPcp&0-SwI%AbH@ zAE*G8E-rp|DY7HK`V62%W}qns9Oe>W0cjQ?|J_J3*@h2l+Dhibwv$i5el3NSn>8~( z5i^Mh_yD;WUA$fIpA3L})fSqH*6K?FLHCKWD^8nGVC(wR;|g!egTj~emv_o+T&B*$&PeVxy)>KC*oz`v|{$tejv*(ew2FU?-vs#kIcsWI@D z8j^o2e&kR^ou|rE93fEhF|Q`abPe5&snm<7SV<8a_B%X&gSw#lUxs!|0=CMrYwZLy zWyILD3Se;Q4bl6pKB910nWa3cF15EUkc6^dJavP`?{6Aw?IL1+HHnT@%Z@)Y$d63+ zmTo$t&?Sut^>c8`)FtR~;Sp*a==N}Y0p3pOc?eaaWu#YDH#6C+c^LeOB$M8-jQ+pb zZy^UV5-%1B-DNLeG`+tYM0nl6`t-fCSNVSwsR0Q~9c(|w{Ee;f__sK!Q*_Z{oNUE? zZz~-kT0%%`PLtuaBZr|per)Y z5HsJujH29*Dz8`yB*wOE%T|PANJ88Sr2pP3ah1GKh{db&$ z@DzRkx5&-ZvH_O=D|!b0OQ#nI@5e()-2MT_gqeZB9mk15`Y-B`zmi^t`$w*w+knk)d= zpS}(&kKp|3)%WO@8k^-$V};ocZ=Ce*14GY&z&wVZeL(*8|A6udkP1y9(6lL=PhakU z2mC@Ua>A{#n3ei(^b3?GiCS3R$HQX3F+kN(WmxqDfmFo;!(n?Bp73k30Ff&bhM6V! zWIe_?Rl$kRvg}ljX`+>Ak&0YvQ1HXRhp*C{<#6P%J}x3@)D*kXp5>1hXy7_)o;zu* zJ81l%xBBp5Cb;JP8;)B_0Mdkn`vKiq+z_NvI%VaS1D&n`-H1qn|6KEBW}sx zy4ddDMdoZ%eWdissCg_gO7$UovR$RQ*<>*pvK9kfNWd8`0PVDR?^8}UD`wmjF zaGLpevF(Bn%2>6i_O=@iGG?Ha&l5DTgLJnFjo2-v2-S<^x;L>^8(>o7lm+mt1?jTyykYbm(?0?~|PWOnwuPWaFM-IWHY+6sXGD{D%9w1*d*DxO`T=)KJgY^7_*q zBvjIYik7cpFJ3dmLIsZ5fq}@-P80gH`u+Rccy@DeC?4}$KpO3(Lat0qt=;2unJVd4wzj-fRK zlowCs-oMuw&m0ldJOQ%n(JO^JiZ@N4)asel5pi`=PEz$Q252|hE{C#Q9GiQob&nY# zpQ*9RH%!aOY(_?rnvackd!>{_*T0~tCZ6%yH{f>DOW2vDR`pb0in-oH7jtJXTB7v$W&$ax_Ox$DJcVR@|3ga8xTMXs=Es!K3EphNnq1wI`ll z(}YQ(+6be;dro>o=FiBW86xRZiUM6-U1f1QwEz_KOv}?82pZYtz;vo)fG}Nk#9X5r zbYn1+lAK(KZ?q%6ku{Mk!>%#=qA}gDfS%yV%)Em~4tg{$<58FLBdPbb$`C#qc~qA zLd4TUsSGdpU}i4Dc3)_iWzB2(>uvp&uMz+0sX0q_O@++db($L64}<+CncCegy2-O| z?2zQV=JCr8l+>|_Q&Vp(IZE5JOynM)?RHkALz<7%h36M=ki*GGxA^6}{>5{Rvrbmd zkIb8XILJJSpb6jAzOmMKRboeOiL?aowgMp!exQVEn~S-1B*I_M*oyckIe*CKI}rAB zZg7A#bLOwiY)e?M$EGZDkas1pCK>o@qDNaZkq@3FEGUbm%zM>^7}VT!{Zt4)l07DL z8{@ffOjouoCx&&w>n72>3FuI|DdDeT;7uB)Ui^9<`F`Pdwq4j-ZV!$K25}x+u8#{M z`>tv_y@TvabCUmHY*01y-E>Ob(G!aoI!cBg?%NU)ZC^CI*CrAPQu*m{d-t;<+0djd zlMnARhPBOg=%;etu(k;@V9VghoFfvAQmXzi)FO@fevfikrI=sNGIxpeT)D*7Xw#>dT=uUOMWhvhlDE7McJGFx0`5UOc(wKmmg+>VP-I>1&x`Ae?T ztL>DNw=(j_ncp)&|J;1rO3SVKBr0`B))$p-UP%-CF%LWHXrzgr8Tz-%&tt^SMbq~T zrPI60O+Gxo-eKn+5WsfM?aXJt-32C#z9amJ3~ZP!%+2ZmWvTgkFA5O+1N%Ox2l8qs z#EO)za9;_e!X4grUfi2@7QOSk+Zk^Vo88Qe1|p^0#GB7zf=OKJF@8emgGyxua!Ot*U;|U#AmnL|Zx$p1|3RR+gphW%Y zA?S#jmR?KY1g2OC$?iIcnvR8O6^qiLXeka(l%AP(#f! zFJa|-J=j09x}Qu_cB2{H7}2ZZqrvLpKRB%gS=D|=9_O`)qVRCCnet{I0Ov}-fL-L) ztse5)u1qS^?gkUM4o7xqe`Bj1@M%o&8vF1V9bDPKW!&~5Y`%Akkc?rF&$u^sjIeAa z5eI{QstI&)C4vv>U=U|9u#UZWO2P5*iN!MhAFB!E@X?9JZUuL!rOjvvSh>7QDK2KQ z`5E&AwtDsg-vF#sKM=ZLhSWxX786qZ;xM^u-{ZJeqH8;Wlv68Gm+EJBQ243YV1xFo z=iL1cC<1EAoNqZR?kxsVr2 zv#K;K_z-d0Av2{im}6y3q20#RCJi%PwkV}`TG=VADAbEW=3Y7L)R?+-0qDhhwF zmuB+oI``S|HsxviNJVoG4laz@T-HXVOqYJAZ7Jyt`tAGnpGv__^B&^@N933HkG11J zc_<5eiEX^8f4E_W*FPIIUA&%Vi_9UCCN#vvk)2*~P zr*LKBT^MyTRZvJfwy)Id)jYJXRTqwMkNz{U!25SUt*X=nC#PZX_{i($*L`cT`Z+^upH=xCE6hWa_gcW8W{7e_$1m< zw9Sa0thq_74zAO*FJf|k6pWp*HwDi)Xo5d{80k_cQ5-*eFBZf8evIX|l&yAkj%ASW zou$-fr9(zmJtxERVK@rZU`*jz)zoeM#l1_h)RHgp5z*6U4RbkSjhs2eJHB_25*bQu z;P% zCH7Lu$B7;5*2IXN)E7gS&6{uPPmyuiK4f6|=EdZ(1S=m}tqiE|^fdZ#k#EPc(==St z9hoWiAfog3UH4xzPb=8$Z1 zu1&l?cXV=D^wGc{VRW9m6phE7lC>PCHxkwe$w}nnCKr3&v&o>{IMf?jXe^E!rIcY< zqIu&{vl%JnvY%HBJF0hqbqi@4^b5$;CzGJI*WYQiZSX?c5JYS!Vo3EC`xtlNN7w#& z53SwbTOzHi4bCir26dbhiy~KIobp#TW3M};_-OE?%oiG$9s4d@6e6}wPv;%Pa_N}w z?l}p%SSp6Zx>zz1eLGut$#Ah$Pr&+ClUgiHspDIkY{Ee$waN7)Bz7(7B<)qt<&k07eb9Ppt%uk{u8jOTvOnPqB zTY)5#OGR_NJ_6mYs4VO6J&3|#osEqf7ZcSOFnd4OS;1@s@Yl6tRXui zv|THhSNC*h=ROSTs8S>El^a85boXrYxuF5XDW-!uaZrQ@;@-{)k%`-=erQavWi=flI6y70U63Sox9$bnw zRAG@)_dfAnS?9pmM-zBR^-ij{GX$L zVOQC!ls-s>wR}5IG>X=^XGq`Zc3BPZjr8Og2WPqCmuJVd15yu10AD}MV~nKvcCoS* zQj8;SN+lqV8EAahe|+g;YuE|cg-QF60k=Lip3|VkzqYAvOT-%6nSm+qp&}J{bo4b_ zOnO6xlK=iTB*n*f4{BnIV3P}1S!Je<$LdZpHW$-JfE(g&Do=NO*i#U5TBhgl@pEGq-9!!u zq~*n;MT*&hgbcNDKiuR&SiUvVzULCjVB?Tf!!!%yxojG=y^m8P$@CsHLaOfb^W=%# z)q~-OhG$<3wn*wKl8QgtjA+ZZmkYd~%}5kf8*_D>;NTiEr)3gkOV+iM(D^>^J?s1C z_U^sjLXg7q>!%tC`j;MtwlVmJjtN1*@H!qzw(*OI>|5{iS(j1U+mj!shc~h>CV2$q z__oESICCwDLO_L&EY7v<3(w+iUm}i%_M#Rb(CI8Xi|H0oV6iAZ2(eb0{HoGBKPtBh zV3!<{Z81~c%GNJ3-ej*a2Y_>Xgqz8GkhzmFo%S4lI1a~C*X#=O^d9x@zX%Nt={4Y? zH^M;SW}5 z>)IDeX6|`ZOPwp}gZ9PYQ|fJ#t#pxl`GB@DVPe}JYI_Xmz}!K@A+e9_SDy=7c8wsj z^LunV#5>lQ;%E z7rJb_*tR)jxyLN2cW!Dr^_6SiYil0rov5Yu!udTzy|U`MXL?HxXRi|KpRdN;>ZpsA zQfn(2_@3SL210UFqru}{BAnn(UXty6f?EP4@*lA`neADTBVG4%v!VM&1{Zv+8HIU7 z9q}{UuRC%kpE24;*M1)%;rfY9lm;eNCrG1S~fB1watK-0eXMCydE4gxRO%1cT4X;Osw7$ld@uf!_&8D4H=Mn}@`-y3ZOp zS?T%~M-}GbCBO#GwH2jX2O1Wukh|!Uy6H~VN-u`$)Wp;!Js+%M>lMley|eiK zH#=JDuKstBh-m@8sO&b0*rya#Dvl|A(p7D0Z0C(dpo9;&*g70e4b;&ujXQpWa0#16m_eweIr=)uU1*sDBP42B6cr z6aHDzAdI^LD2F!5o0LeX!b;vc+>p5>bRS1-ldb+8=|MNf(p{fG zR4$??h$3^TRDszPSpc_-K7YCqntJaBPm7D2yomw1(Xt#A!S{22D)i@FEUds_or{5} z@$P-EOERSI;!8ql9nXVcYhHEj8pbF6yFNPcf{h(BtFs$V9Deq<-p{S&th?C>1bPO1 zBKR9B7)rC1l~q{9T001Sh1*FN(Tg>HdvhhZKi9ZBIyfGEj$a)Go*XM_2lgzH8RKSo}F6kKq+jW{M;D;HRP5?mU!!Mp#$>a1hMQe7LR&rYa zIOzP0R3&_zR<>Ck$N6CMVP28BO{`3V4exZ7%e=Dv5=YfcMWdrbx0Xi|{XUL=k@@&& z_mTAnzx13w6_I1FCu$0_8Rnme9Cakj>&p;f`~)5Fu->KR1(j!Uj>dV;jdFzaVmF2t z+gZnf$WW-#ShquUjBulJgJasfRTsis4*_$=j@EZ!Bc|ewjAn2c{-q-h&Q}CiH*p8~Hvem^`pI?@wq8fRU1bP1F_R7K!{? zdB1$(G+_Rb%ebHYz0V#EKxxNMGAjS99pF1mKv0|*>CE@ShG!bSr-5ZZQ>YNe&n8m0 zN;NhvXKqETtffi~d?uJ2I4ldiQgQ#@`Ssav%=Kp|J~=j(6e5vITu+bbeW=A5Z^tB6 zm=gfLaNMjeo~jz!Zr>OtXQo#GIwQYhC03s&;%%?!=%Rrv&8|Q!@+`547c352AL4nP zibqC&?C<({H1SNXcaEOgw49IH_En0=t7*}$r-B(Y?RZyMeoT5jw8#C^+Qj=bAyKeU zVwvr#L_D`$jt347PA7oG?*!VxZ*PR0LN3PHUjU*AC<+X0H+ns-dA19rv4GDcE>LpN zNokw~J@C*R(hm{NE6$6mO&#rAh0}q*XYjb(3^D*(AVtTs+~PF(TPu-?5?OAs$lSf5 zYS!vsUUkU?T*K;>i|ZSO*E}}A=3&p;PWZfrK}oc@bFH~9y@(% zxR!~zzA2V}T@pCY$jl6H%>)RXUpv@91_I)P!EED!++I4(x{66`PR>sa23=3%1w86J zj`wEOMI&C&_!@Zw7txJ!W0F#uY{|m034kJ*Tn#UT_=rY zb3+MI$N=wl)gRvw(pDutWb76|9Ojry8OS^O(n%|pUWBp|wuUkaQS{7sJVUN()l4-V zu5~s=)s^FUycKU?mx;2s7%kb~QyM*gv+)(sYT!QXWV_fnB5-R`Vat*IV+J5|BwY-! zI`7Nr#OLp%Z91Xw@gG(*8S0-_98T74ypCNelUI~W4KwJ}c4GAVXe!9NJRILej+1QC zs9WPVd|rK4$+8m14#_E1`uQS~teO6>8}J&s9$6~|wY`MRDQFtj7e(!CgJ_HEDuq*A z^W^*Zf6&JQ+VTiIwnh|5K*p=pAv18{+MQWW)yuu5XfJqf!{D4We2b0b{tZ(0#Xi1O!1Z;a@*KQE)Dv)i zGluU$ScpzpahxO8!?6b7YqC5%MXg>D*@l&n_G>@!5_J=$sY88vN>={3@a!mW1RCv@ zI`Ymh{xQ)j_XkK%`4FM-^sIrqBJ_0o4U>kIAq zGFb_FbY-})R#9X&t-0ZGAP)Cx9Gjg~WLEYiylga${=EPjd50QX=@83$o7q)^MYbR% z#g9r|9b=~jvBdjB(s$f?YkT2-E7{cr2HzL+SoTWUTqd&GlRg^c*8)}B`^&5H>eH~z zp$fc()o2?A6_zMlq+y2ObS?AfiNG_V#EBSWUUcIL7 zuF~;5o8KK^9rAFm00g~bS@rND!sF)dBd?QAoAu%-MRRk%evrP1rx>tLeJ3wngnP6p z?2C>^#>P_XcZ65EbOYatV#%aC#7|O;$8$JPxse~RM-fM1hQ5!KQF zU=!D_DBcx+v;a(hpqq^|N=hn^bd&chc5m-1bK=okl zLNH}^c6I>Mk50mPGrX0)*1t{A`Q$~tnnd@O!TV+dLOSZtp-)kew2IWkC@Q6z3g2nD zl}v@xG{NVss8pVpe@LA*@M4P*Jl3RGmYNeD|rSHKEG$ZU(K4w;K}hx->7p0kjMks>=0NueAw} zaE{kJ1Qy9QhF`n%fp3OVDSH?zIAzD<<(s={JGtc%=Z%acwe?cGPj=6b5_YI?TWedj z&BjL`4a%KdV|*!iZDzaHOEDnZYr<|gj0|{(TY?xN&#zYWj|{i)kCZ<(_7eF52vF5) ze6?~uUnyryF;f~wX=uujUa*nC47;a z1?ggq=kY9cZEIK4&7isOoR&Iuclb0nWxAYJIRnZ0PGjw<>@Go^BWv?^<*3FfIn}dn zwF<~~?`mC``6vV6 zc_g**O80^Oc;JJN(Y?3>(S$c-S*;M6nbB)Q`h@aA?X2Sx@!Cl=DrxH8Cb)lmOMzd% zx8VW`!fSB!@%M_ta66G!?wq|MsN0ymRHNkt;w3mhWyGe&yc|!7ef_96A8$L@-0~nw zr&w=!b=Dr|V7SCgc$nF$i4OW;D%EQnE>^wYcdN)@pVd7s<(>)G*?zbDv!bZ7s=P7X zTc%~0l>L|)b|>on%-caUt-7T7*$6On&={xt?(%r2I#qMSd~p|KyjbSqd+4iFQ_*1M z;=@U_Pdus$M^WqjdsJ8PgW~j@^9p9E4qb1GjIVX`INmq)&YZ6S@v9}l0QDMc=3Urb zDnIh~3>;9*z0+7lfZd|8Oe@3|V>dLJncQCa-i$kKh(?_dWEOpZc6|`ymE~#9I>_;! zElgCornZf*m>(!BRe#4~hvN=QzF5ixwjEF~!eJzBKq6*=5X~_Ndsz}(S18%TVg>B& zRfn0o35q-#wp$AbK9tQA*1AXMaZ*EH78?WKt$7}U-284kR#`fEFvE+U2f!LNZw$uhxotPP z%y+NcAJE+sM68$6hsbb|$L5tE#h{CtGR3PA z(z=Nx8SdwKn6H&ev->Ehz~S{<`r;GXOp^g(E~m8b+P%G&uNJX4n(Ms`w8!Nza2hjn zZ`ohIPvMXhXoA}-C$<%v@{A`Xwi=Uqx3MDZR}|qNqUvAeJ@l!;M5TLqy4PUF4Zqa8 zI=`iku&|^$b&+~fUtGY~xq?A*feZg;cSmG@?HeUqG8I#+U8Sm(R7i0H=Buj`*=Ci4 zBY*7E=Ox-dE#hm%Wzx_w1QlNL!=Cm|4f+r`&uRGF*7F*E68}2LmRBvk=VB)kn=rD9 z>d?DNW0!pKn2q|!72xc&tf4VM8eBYy!a%~vDQ=ZRGp)?hef-?B#qQ~}85{ezU9Ldn zx++os_6I;-L74-Tp#4V4TGIUkScZ+NVGlHU#AWXlq*HOF7=Vf0)?y@Bb=gLXPYSj_ zZr3%}b^FaR%Tp6^F!1CTZC{=;ZxYJ(b(YZ@o6MEZ;jQ-t5ah(L34rGlaq;*_CvOc& zC$l6^Iwecoy@Sgt$Wx?gQLoumisn8JRK1~hCCAeAc^k5pXLeh|fZ~*bFE=(H!AmBcLzHNw zlzA|Lr6rv^;7~!Wsb;Vb`_?*cx;)F$&S&oJ*1q!At(<_r`9ZIX=F=URHP6ePB|^!a zEt-x9@u)>A6eZsk8)MutS-jDs`|>PoxfjQ@!BU>~VUPFrBSU(-2@}c+u~7t7nt=oh zHbD*vkaFcdTWyeP@C$tHJ8Qt5vG4yqsIw57@lNZjKLQZ!{fmRsrVh z)s2S9BC8JmIU?5mtl6SFHhBUk;gwR9jb{;g@EC7kiTHZTHUFlU`1)9>9|!q6WoeAK zcHEhJwNb&e(Lwj6cjaUqmDz-cBt3M|9Krw=%Nt~bNDbLg+G9pvjaG8>`Qj~Z<|yL#sze{1ZY*E;F=Zmgqk zaXfawIFnk>To1tjjJdQ6DNEOag&2iwfElT7NL*6no!mTyi|bq^rgXo&6hIE{Op#;{U&Yc z(tKJS!68djDxu*0jm!L+7H_uD(kS_te?!nhR7|>#?wBl+KM@1~xZnl`1HX2b@DR&H zWMTXamQ@_%F)`zb6ohq2FkdP8Ns4=H){{7W&GFd;jbNGPcCIb(njjzsz91qU_zWV0 zKj2J%>Sn#_B>Ba>4;t7QK1hxj2cJ?jVUueri`{Ip{|yU(u}}dKHnW+`=f4rQB_hIh z{9(fQx0~(2fRc;$2K^VUA^__QX<+oGit%>;PDEfFFcIzFxUv4;SAmGIr=Mju{(U_x zY#_?VW2b(L2+DtP(SaNQfM8OuSMk397DTEC^Z_e#P5AG9gNTk=DuRv>LjJxqGth@XIlI3@ z<70yTZfgg8;U~W-Z#iR8Q z8=ux2P1s6k65c-Ltk8dN>C^j+6kXr$KKF~iT{Qw`O#gIf2+$DyL&*cb1$>U`O*kSD z_&qiVBqy%1!v67}DW_0t0D0$xq+|-E*z{kqP*B40tyjEKILt#FZ zzW#nhky__xG;D*3Qr*ZnyvL%vghN?}R+A1LIrpxnjbpls&SD*^sH_K4p#2iD`l8w0 zTA51LrIz}0cJH6w~5#A*DW%esmUlG+#2|U4TR_m*+dM5!j zU%eh4$~L!ZznCfC8!iXyTUD9*e0M3AYnbvo0(-Xd*gLE7^deTy&$y?3Nb4;Woa=0VUeLb!iHD~C19`Z{3#ravgB2@>oYpDwzU4C z;yE;2Wc)3?9Q}nn&qrxFXB5qbUh%P{l_=cWnC29!DbU_H+I0iWp>(3z)(r;nT4Vv7 zl8UkoJ{E_C?rZGfv`vq_T6e^1P@SAqwTnpZ%j{R|1nAw6)7>%Ja;b+Q%4~tM4&0%N zl~VPYAHXGA+NL*?&WKa-*V?ylK%h&{Xq7rc7@J;6#xht!oO;7Z8C4;|IkKr%B#mxo zV4x&hQdHD`glZ+xHQWSJ9PVrfz)KeI^VYSRx~Yv*H^5!kGq7c{h@KP$%B!8tXt_28 zgF_bV&wa0=h^wR{1*Um-Oe%Qk-^}DasXeN*h!WDEwf1~Zuf9s%-NGNadTI{Y-Efdm z`m|G%JS-q^(@pX%950gWQl)XsSf1F-;M|iTFTXhIbu4ZdK(9?}kN zu2EqB3LYcpo4Wq?G=dhd%NQ|xcbA_PblfH%gRjd*Xtn7Nx;<|+fGtP^-*bnctLt%+ zx`A}MEXxpf`*uW!<$GRdZ^=_;%bQN*{fk-b!Zu?nWf#!=%BAGt!7{n~_bwrAMCBc_k75gF!)Ji1f9+ z&c2F{S_K6n7!2-Erf5A#{{~ifX;&zC*)Syoqh%t`3wiFg8dv^s_nmDjaU@`qbqQEw zq?RrsMUT0S!qA_v*W6eJDO)v`NNG8jOAt|g@&E{M$n2Q-sY4pZzPkoJwN`0gL+Y!2 z!P#EqNC%c4>UUp?rK-M~XE+A3Cxiq%((BO|P(ron#S)KB z0NhA_{~MOv0K6|Jmv zzwihPP5EHb4_^r-!k?KpoQk8Ek30RFfYnEV8M^U(B%i)&;w|8zkw#I=T0wrA4(G7P zr_N{){KTaqUTjq!<4{$mm>c46n z;$laef$}L|3!ip~+{%6MfX6Er7;JW{;ah&{QwSGl?Vy-sLvxer)aZy1IE$cR1d`}{ zV7T)xTgnv!Si8w?SH9-xkjkDKfoXy52%M<7FZ29zYy%hw&iHKhcd#|PB6GAq3?0eb ze4$nm5e9gB{2ZNv_9np^rbzqbQdcLE-<<^SQ(v3X{1C@2jslX!y2#<(%u(b~Qr$s7 z?UCJ9_eo6CkxdwS^vU?y+9;3(H!O(?CM-DO{j)wRK=0n+UgWH-u69k7>0742(%$&) zyfa);AB5o-NX>9L?<5#G)%`}l%+=bR1YK9kaLrcQ$%ievg%;8(sjNBQv+bWXCED)b z`fGchbpaosNgULQMe8J#c|M{sKOnC{bUkaJG7)L=WRUa&5Y&BoW4=&ng+b4NEo`o8 zy!CJgd!pE--6vxcOZpkHroh>XJ@;bghr}rNL{%&bd##*sv+Y+64>}WmrgM*Ss|rLF z5J?RWxH=qjzi%*V*N}XhS@odmDD;0jP8O)$7swTy`34|Zm5(xgw$iBtYfHb4A&(Rw z(jy+6NLIDlzU_QvV*=uKy~(QSihb5)zOR@lr}Om;KHZB9)l&karj*sr>@Bm{7Ekwv=*!@jk0v{moXj00PQtQAQmR*+-i~Dyvf@LQ7A)`j1*r#X&8iAM&QD zAqKAMS9Hb>gqKVtw38H)<~ml9Hax17IjqD{s6cXfH&90-arh&-K4z}Y+5e1K+^5}@)%O?7Gtn1lnQBa z2bCtZUtTmwT|h0=K!1GX4#4sKDY2fXNtC%xe=R`<;$TPGUYJ>>dy4(PL80R+g(IC` z+z7aFbJ?tMs|4wedHg?_?J}|T#D|FQ9ZzGS%-E<9{M)-5RCb%OueF0JyIy#9snc8Z zhh5#T=o|W~qu=rBOB)246-l%?bLaf_%T`wOlQ`&oxusRxI6#miw^CW1%?`8mRp>yN ztb?@nm7JgA&C1e#!d2Od_+`e~+08++d zPR|G9Q;?42$&M#is1%iCUJj~r9>MD5Yk8Xz9bbeKE?U1k_yaA0vMv1e_k+s17d#bl zAqn8RZ;awlt43*s!c(hBab;w13pEGJGK}KA6q@ir=e$fsD3kw< zq`6tHp(`INs@oM@2D`@T?^w$C-!2g-=Dlu&5c1aMQKx(CXl3;Tlgg>!;4X9R3D|6H2%hmUA z-z@N3dO68z_UsR!O9MC@jrO)hwTrZE2d}mt*&3(`oMK`#6$~b0FZT<%$DYb+WOhmB zi*%16c~JWw%rBNr{M@KgO~-G?>@9>ooB!^|Q&QGN`?cA=REK%^U)dOD(GuHXxImCWHI$+lbjQ#K}I>jPc}?*J2F-tKU^>$HzXG zCIzs%R?)R3jNI@K$p3;NPAvj|@xoHT3m+k%X-QZDL~?U(!)0aU#R#3Ng|tn>i~BFE z2>ww>l^1i?{0sbPgw7?2JX2D3Xihz9`8Cg8cG^vl*}e$$Jj1UWi?DB8r3YQmA4nL- zQmRt%*Uu{npDhMrd!-M0wdzze|5w750m|%xo!xii&Kuz+AvREV83#(WK-}h;hh2*dJL_69mHBAO+*#4z*A(lEvb(L*)b{3H#8)?*@DDZoISCCgDP<|?SatwAn-a=98Af}(4 z==w$*q$DY<2%0F`>B0d6YF3{$YDUHww`Q!GgCy?^a+AJJ`;G9ivo_y_o`Dlp z&h@w_{-Q1w;EN23FA@Ih`O^vS#xIWWZO3fz_zQWu6fM?9mWZqO@jBVBhBU5$z z$T0VbEDotb;B&NbqTXI}5W8KssmC#dQL`S;=y6j%NpIbEgeH1>hSMbs?(PwA(YIV? z@Lo-N)Lxw@Gk%-_9}5Ag-D{?*vwO5X%Skghf2ITR_PH0-nh*|-n4uC=M0ciqLStcm zzNP(01iicwuu$3Rs&cW#Tn%7kWb{6J?|zB5No12_7JnFd9PMmU1O!84hMmgR>a+Xo z$CfgI5P?xp)gx0j`~J%h@-W5WA4GL-(|%QQ(>=w)Y4eoFUwG7>7Un{|ssw;|jZfebp3-c|EISt$a>f^Z6Z2!nv zByo0moL=0fN>CogO*-YxU~H&sR~RfRq}a|^pC3)u1Dld0b#xPQTI)L(Mrf9j7|uFk z1!WSLiKVJ=X#G&53yfwN$>#Cb`bWt@iDqO_mQgdo_H1iq_7`I!ZumYw>2qqAaY0RZ z+EaTN<<=KSCCEo2w#TB_eHCa9KnR0WhH>z#j<02mY(;y^TFPWYdbdIi10KJ1=e4kr z;uhG_1B^a`kC|RiKMBKN=`+i?EM5g71N3V1o_fsOB248S>|dRxs*sOZdbpNdh8*_4 z>>?3)DA3mHgt)G$`n*MDA`g>h>2yXTbcJ=3> z1i6_x5WzeBa>dC3_MJbk?E*Tu#qZfw6eh~1o}~|^Ck<1Ibk*N+_&9Ntqs4IKr0W^f zUJaAU(v3BjPKaEZjOdYiTD00CFmMg=Xdw)LQE2PK6Ip&A6p$h{1LvIB)Ui7$b-iOa zt%Pcf)ov zsqoYD9a+Hm;ML(2{^Op;+s+$t@74-i(CtX)=4=kfinDv3VH#Fe&_(}~lT`8v&0@X1 zw)VsjXxe9++ zcXO43lCE5lXIC=x1_@`H5a=ffO&0T24iUNE>F@fV=Fgl9ynOJYbroLbPdi1Df6UCu zP!idPOJ5}7M7X|=Rs zab6a2cAn)x7R(IsmnD@gWu}2LIQjll`iYV0IP&=*@!s*(uvS)9asg4`gEyEWC~jJc zxXcc|%*OnI{=flkMq!0e+sW>+jH_l{U6U-N>9@U5S^~SVJY@FecHrc-!GAGJa`;E86g^d zG0Z9MwT3)XW|lS&gx*-xM34KIrByI5D^;t%@H z6v^)yh@a;8OWuI;WuM}sB$d>M-=d}wF^Ka-LNvHkj*qjiL~Xt?7pojpi0U~Q)ooL? z_UWc)6u-Ew9K9B()s^~kq9$UxUfX_gs@gYHpA}RfvI}bE2{Z)7?4_$xxr$(tbKtI| zOBAp9Z!(#Dp>mGeYp%<{Q8G_)T1$+!j~t=Y^5SK_rsWrh@21tQN@eo7NA=hWuO5jVlL3fXOMt6gT*<;^vd zWCLCXfMC_Kd)jD!dU`cnuCdHS>iyECtMokzuX-rr=j3hxgwu>+WV72XWCClSTlo7E zjgh#u>mRvfdFSy$5Ir0k!}xA4ai#AJuN0QEYG5=|kD_?R20VU_xm?n#eUw}n6=1TK z94fSsM=2Oyl-nErW43ETn4$fsry%)rS&Mc*{%c;7tG{~#=A8!?FCTB`8btPg^n`C6 zT&|oIop#P7q!JiN$ei;uc3ewir*LkpEj+CJS?cKeyIse1t50qSN%_D-G)8Ev?vlIL zas9z5xE72N^ABcofxPM0b{HwJuN+{r%M#CkcxOefZG?^y39CW8`SaDxG|OR6kAQkn z*IYv5Q>=aBh(hdoOC$fak!_{AwB~{!EBp8RRZ|8fx`wR@Xl7mnqA&J&mnbYRz079~ zRn^Be-%a~q-e%>sQG(k&kPiG=C|^Hs=KS1S_XQ?uX5T6$1>%Lpi{RR2~#uCS5TFV)NSxeBGwF*>thWE!qtC2Rxk` zgN2b?_Mpbtpn_VIK{50Jt-8qGXbNlLtW};U_iaezqm=v)>}?S)vq|wb-D-(ztq;^q z)>0=r_(HMA6eH=&Sas%ad;BZRYFW*%&z{%PAxtm42!HdosJD|Wut=Lt+N!ce&8Eo8 zQaU;a*=-5Wlbno*Tjs22Qu?$&!$00XiWZb8T%cVTZiuHCdqT$BMxPz*fZ#o53BMrf zzLWz~V(3-B=S*3fm-{f@L-|n*FI9Sh!T0h7nKH=3>`2_Qxd!1eZ)nTH_#nPp{MyHb z#|tv$p=K^my7=1MYqcLGC9nVCBVti_ILD#X^n}ZECKv5(wJn-#%ZN3^Ok?W|p9SR6%fAYR*21CjIvHwIf2_^JeN3Olpz`+d|0$CDG6vFE$|*b zA$?*rq+n8dn$Q%ZQNp>U7ZgdL$dCPkVL*UKow-9#BMijvNkPNzS9Us*o^~>I z39v_N{z*J+Tkm7I^#8o-|IxAX$uOHUwKGrZ?U#NiZ*EwMM;BWhph*^LW)3-tSomDI ziqX2S^z^r;HI84Q{ayN*=@SsnVpcDkbBM@E(B;+zneTXa8Pu_f*M?{?nXPn{-9W+K z2^o1eIpR6a469@DA%72SjiTUFoZig|JUz;a9>EdfKg-eby zpAu72I3gJoBLo~~-gnFf$qt6hKLJ%H?LzhJ?%Pf_ZOfQ4#*XfrmeO6& z<6LeVW-ZOl#LAm?Sw(Fo3qjL_n0ThKsY!EtO=JcvPYK+aCJm(DPo5SQmW_#^pHu{k zFiDjU)2hsPFNBv~^Y=LPZCdW(~J#-ufmx2)TiKO1PEzO->~y9|n7DO&8*@9*~r^KkZa8EQpS^4ym?dWM36+C}3! zFNmwXbkSu|=a4BQhGw9UL_YkJW5bK$pEa;&`}0#uW`ca9am5Hb#@Mzcl98W)>tDe$ z!KF(^qhIW}UVOv($G&;hHcZ=4&war=EaoP-mk{6z>ylQZy+dQZGe_vLO0Jh-MgoAH zCJON(1+M_^k8yUuWU;L^Of{1MR|DGIZ2i9GF4G(FhmyDBli6_z*KphZ$#U&h(CZCN z?4X>5CpPk7MrrupX5&b#*nv+MJLxgJy>aetqOp>>ugzSxok&;nzx- zTX|XXvr+GurNexq>OCdsl3rm;^{c}}778}B(VJh^<#JK_$16i(nl7)_eOX91_IlL! z7Jt^2g4+ZQK^dmVtS@Tsd8Lc;@s>3~#MBsL70Sdeq4Y9)O}SDYQS@v(Bl=s~%K1OX z#&6ZX+!Y8v_!Ckv1Ox=w1x#pVv$7oK`$nnnq&OX;#1<`nYbjQ)m~*Y|U4_TKXC0#6 z@w3_9?MYl3hs1dA!+&e-+KYd8D)v6Sdq1!)i*qXVYXH{6;kP8_TL9z_>S-DNR_OWT zX>m#ezm6>enRXpQ`vq!pL1B1L=QyCA8ATkX47HC3)T zy>+XQ@$n6g&0^acE2wgNUF~3PjVX1uj-9jLfsHCR)5+XCbB-27wMd!x59UH{Sv^hX zBt=Oef*kUu;xt&M8`4#$SxO8V!R?N+dILCB_Ko(WKfU(THIC46mmbuksUoF6qA#ej zmL@CLt~I|&5$3bqU1Ed>HmNasI^%hXW2Ch=j!@wu41JRTpgThek(%Rf2)arPK-U#r zqa0=cbwhu4msN&NPKlt3ahI3g=UomVoM%zM#fC!2G4~5co2o64*wgYdbP9VZ#9yB1 zF#bohCRZto{Ic-T9#iOQ2KSq}y#TY<$~#ncHb_?LTnLY$0bv>ARj%Xrc4aN_&V$*W zVkWM;y}Vq5!6Kl9FFw|8T{sg&i+F#p?)5ydAU81^+}k}($TtLG0D2RFjpgA1FtjKi zHkAsh5*DaZ-S`a7l&I)FIXiRCN17V7GJL*`=bH-3>(QxREf`k_#g66{`{ugiWOhLb zs%OaG3?(*e0go7lmfTd6DDS(eel*H@K*xGlJerMY-0dJK%u>r*JBZNq?&)Md53q@f zJ<0K9e53P|n2u?^i(O(-1}M+??ZtE|<}9O(cC|hWcf` z11#VMul3lZ-m`s|ktt|2Cl<44xV(`ad33by@viN# zEydsNV0U5aOII#~jPp=w;H+LgmkXM;%$!1H)H*)&<@l%xu@gUDxh8^p8ibsDPvY0|QN*yCOHZ$?b95g9m=Eo^QJ#)^E2Eaqyn{g0q z?B6Q>4Dg_-w7YiFlh|)Papi61Z$cs1b@Uda5B=})DsZy63nkym z$dJeO=rhBIUJ|O-|0s-$y|rp$6&FKu_hNRl5`b=ba3x@h1Ra>jkBEQ?jznYhOXqPb zQ6uWw+KkiJoz{lh@CS{0<>~t?CMllrpRh+9@;xir@A(p zb=0Yej*N?DP=CxFgvmYb*GWgmI@>4=RTcMaunr~L1}z8J?|?c&5X&g13JIeww}oMh zt!}@{OIv05r)27%MI;!4LEe94dHc->MC50~rs1!yovGr#JLh0Y2oZNdOt_AYyXM!| zJzK`A=>~%S79bm#0%jMLiv_`iTB;fv7%>n1tgb%WOy)JKI3^7xpkFoB?y*eBojp-LaErybvr?4t2$cyAIVvDE{DHwmQJ;~2Nnal!Q_)2C+ zJhSN*V2+u^EzeyKewlMw#0EXDyhmI2XI~S`zG`-h-5IDE{&Rd^VJY7(bZ6{ht9M=g zlZ%wKa(+tB*p=IhK47rdV!-mn+1f?wMp#F9{`61Mfx%R}zF{p;36+=VF8BTL9PYG{ zz*KJBkr+k>7H9SbeTg*3f+p8z4O3aU`P-@6v_X!{wVQl*DxVz4n&{OilK3C%Yp1xN zpmacR)$IK6Y3nq9OtX2+PDkD6%|r+5@WuQ?;TIt~M;!*T&Vf3{wU@0FT&F5q`BH2R zQO49K`)O)A&NmU5j-DQ*#Iz$CIMMTsFj6I1=dt}K+PqhJVcb>xl;PH>9bm`z$hWNe z$O|eeY*5y`SrOCPKXa(%T`uXVj?n09O6x91D4=^2dS#G7rrf$%a_YwuporMnLcz@EYH0zAH7Rg=l+KBUgf7+ zYI%(vR1XBRH`XOb+iZ7HIZ7V+1#wTudqameE_jh={prIF|H?T|3d@snh?sa)nqO_LXUUlxW@lP#S+-})YB?Pv>aq0-NpK}UJ#vE0bSca$<2OSE410wZTe z*p9oQ7~O@k-+n@I=(mzXtTkLeV#zmo09qh=IGtJ#>8eKYkmgukaj1X3Gc(K_$rJw@BFp66U1B;6q{F>)|`Vkd)frpWw!B6bJS{OFQm z=IF8oazc)g!g^}agT>E2S)q~|v59)@@#_>!Be7>x&p)O@_Q8_knrGykd&36zCdO7~ zZA>DPfZ5S_uPAD&%vp8Zh}zx4C+k!+P(k`0az;`D|*mvbn%sn?$665xnU0@nD@?7BM zw;)@V@Z;J=qS5o{)zesJX|~wQ_n(A2x+TU0>(PrP9nnN0J7PyWlSGx^{%?Ao$2Pw@ z6~{AjNi>u>pt?kQ^o;tYN+!bUko^8VqfcbAo*U(fPZykuiPi$;$g?7aRx;wIOzl7L z68?r0yz$AKVYY1HPA_G@P9@xzc6Y+3k5!K=_nMYlTvwl1oaNITyeNI7Sy{A^DT4H_ z%TT@d!2){!yp8ofxQSx{zt;ufnQ7nsZegk|KTsiFHcpp$>Z7)URiNDSlyVW=z0GBz z{J@hRWC0CahfJWk(P;&D#W3!+j=k7%R8=m=e2iKc|r??P0`%@&qbUc0lzBV z(4%gsHHl8Dvhf^WPdJ{Z1!A|z?HP3hP&kfE&z;-1SjlEpz>y2oEL7|f=eb{tw)4JH z+9Hy}(Z_qF?{Vk+0!WmFqs1QUdW&&$=q&iocdGA^&zdfLq)r%}`+D_N2@*}-mh3JE z$56kz$8#dGckX#VcYHQsTQo-}&hAq?XQ|lI8DW;gt0;wtVJM_~e6HBZJ+*-O^45cu z+Z`w1L(Kis+qbk!uJL|O9Qw67w_p7{D=?SpOI!QH{-frDFJUdzB13GGSw0S_W;CRs*JllpOI95LX7#-K4O?$eD8^PO9#L>i2p=0LD{etJZ~ z%g!v$qhKVo0EM?|Py&HPpRK};e2+=2U8uu3FS{>I;e7xfq_!p+8PHFep|ccmw9IU} z;dNJ$zY8pVZO8SxY<)_e?W(f1L*=9M+thQSDHl7=Z?Dw#Ki6kevFHk4Tt`ND#Ed>; zGyfr1SIXnUuJwR%TLJ^yx+Ed=#aaDa%H&rS4d9V$f15&Hh_aRf`TaChUy znnnit7b|BRB7>7^q&} zA6=FWuTrq6zh`>Ab<-uPb(}%0cXVa|=_N912J``O1XWtTKVimts*J&G#a3bNMw1HOh0FdLC|my5mZZ9Qz(JqM^`% zR$P;FMkaouE28T-6?1u1@vLL7)Pux?KXw$yQ7&*RJ0hT_rXZ>%n2Clcxi5dksl)g= zUNGq+)J@Q0Bt`A@3Pv0b9FY-%x`h4brOrDop-Fy7#bhOH8;6*?gzFk8qjhpzhxQs@1d@>qsIzf&~Qa*|-d2TMuEHnAiJ5^4I6J&a!9 z#Jc_=cRqOd_uJ<5I8`rwm(5m)qdkA|vY8!kaCx$ccM18Av`upyYvJ;;LtaG*jl53n zhyEIA)7%TzxdKU-(&+j(_cr~5 zZ#d7jKR)m?v&k^}x(QB=+xNW^v4r1w}++PaHdl+s`8WXN`x*G#8NbsP0j_O~MO$AKMqro_X^kh2& zcO`%aM{no#{-qHm#jr{{vUwaVs{|MBH7d%EnqQH1Aswh_!llt$aLitF4IHpkuKRcE zFbfiUf`cd)>CI&KG|)f6y+8;0jrQw`*0Wo=e`N=6fG~yOYF;AwL_C1N)Jcj0m; zqYA2oQ~*c4QOx3rt){~Z0zLZw`Bgi|Tg$@tTT#K2JGLc5I?fNz;ardu3(~q?nl$G~ zY?pJBDfKDNL$RPn0`cn9LaEQHy%v_ahJ8rWB9nXTX_y7-R4g?7|_I1c4u#b{0eIY*+zl=OI#Q7Hq^2 zFHNj`0#{uV+B+2o^+GcoA~=0iOs7#Z<`>BNE#W66k-F?Z_n!-lC-#n@8>@!jZJmQ~ z?!1-x`lxy3&+Pk3aJHMX`f~wZ|$|numQx^H$k)Ym{k7?VbOrzo);**deVwPXW+A;_u;baRlNa7piA>=SEU*xiaM_t0gEelmIi!KJA8BKy@+ z9mQ6?Rn(MPRZF}#uE=;8fO)qy3uaGSRHd7DpcM#&2tK-b{&sQN7GUeL5a5 z$66CTl7+{tz8BxB6EEyUDZn`=F0`iDT6aN9$}Lx#*~t$NFC8vyG7yRiYYga*e|8>O z(9yGzVZ0Jp>OwGZGGsnqFMWb7{_6Fr<^8CvNdA@`eUPnLTxi*iqJLzzmw8XPG_}1( z)XOosh$U!#@aV;~q=eh?cayQ*=OHkOJIKmAWrCi^iL_(eGKELAX(|;uYN-zG&FXa` zFL?Rr%j~TqHGdU4Gm}Jev}(x9cVCz(uD$NEsbOp8%sLb_yWQE+l$}*UL*BiVWs|@H zBxq^{{LJK{`-+AAv3&;G(IR?QdlUl$7mX~N2kz$OSalhC=MAKL7YwBNyTjcXf?L$W z(%1(2Tbhh5mlekxQ2`{pLn1ZZ84qsf^xYgGT_*A+=s>DP<_?Fh2AHCF(Jl{ks60-~ zZ@CmxClRr6d|cEUErpenj>cqZf;O4!^k_WlGn47FmANgFEXy zz{t?7x2?z0u`{WN%*&HS!I|$VCR|f1!GC|eCE;sfK`MBhD1_Y6Qy?M5B@(z}fUWC!cS1h|t5YQ_r&hq->{e8RUW*_=?0ciQ*l zwb|T`AcGF?*p)0^tWoB#nB(YJa@-zPpSyWHlyfx0z2!Dv2HmS4>w~*F_Z7imV=OOi zl$tLLEhG7A3CVBuyMABSsrt^5+u5*CzA)pSHZV7#e9WuhN;qt;

BSP_!+&F>T6VST@AqO5y!2Z6ci_vA^wMf@9x zOU1Yd*5S%-G$5KeHa{?bwQGkYdZH+`Hwa{Z+2oD3^Ub zDdTTPsi*rW8T-qhOofsDJmBgAC=_bm5eo{FoF+x8{PT|@}OPpGC! zy9=yGL9lTslGQO^KsepTl%=`Ml&s>${_qT481HTiR2?6hSf@VO%DP$5qFqjJIZ(rq zFgb0Ndhm5Ltv?K&(!^3%K6q{B>>rtyJ4sgkC$_pAli(Dqku6hnUEZghncX0H<&r8uZYnSjU zk)=0TPZrMnRwO;LkWgM4iyPH|^s9P5)I0Eyqpm*#MzE$>V^Z>K61Rh~oV9)H4(kLT zqrHyqjlPtaWuAm9>G1+(Vuy;atu($Yp>qjeBjIhEAFzT5PMj+*tUo(k)KODQe@AfB zVsY>@swX=PR5}-d#CO6O_Vpu*;|(3&3s% z&|35r16o|Rds_@YPxG%oaU>YLohM}GkKZzLa16{K6Vz2zyG<0=XFD{cq@)rCmfqER z?&p=3K1u(flQr*h#cX?Ap=vOliOxNuamHFdl*t@-l|nhJG^&>_Ia?O3CM(}QQ0EbyO1}8T#l~^sZi!B(6+efGR@^J`Cw1{9 z=tv@N>&qJ_#ukG5U)K};bJemfz-7lt6YH04?l_?ue9kLS(4gzO_gAxYRo2CSjK(XE z_FFsC!%ZGFp@!>1`_(6FCMt+tV2jqoZ>$JCyUk}6yQtxA+?6JUtD^~lK>C6EfzHty zaF0~T6OTr`gO-4NucQZ&bVQkuTj@IXKcND~8ft9zXlZjooYXvHT z@FzBtfBv)U1@v+#xP*55^otn*%8hfyB1kbBU2qO$$R|6W{tJ!=2LO!w%xNbEl|V=_ z53EX+VuY5k40J~iK+kP8NnGr6-JrZK5#l)inyo=_&CI@K@}%fx_Q!l%qn<`J>j*KKg-)~3)3Vw3zIAOH_Lw)8+w$Llp3U~NxP zDMw=LsAB9>=OeOpv8-hRT#T^q6*xz8`kWXX41Ev1auxO`tGx;E@Zq&C@zdvgFz%_@ e|3w3}B6^`lM}SWJjolgWCo82SStRlN&Hn=OIaZ7S literal 0 HcmV?d00001 diff --git a/versions/3.0.0/lib/config/json_details.json b/versions/3.0.0/lib/config/json_details.json new file mode 100644 index 0000000..a7ac08f --- /dev/null +++ b/versions/3.0.0/lib/config/json_details.json @@ -0,0 +1 @@ +{"core/com/zoho/crm/api/record/api_exception":{"code":{"values":["NO_CONTENT","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","TERRITORY_NOT_ENABLED","DEPENDENT_FIELD_MISSING","EXPECTED_FIELD_MISSING","FEATURE_NOT_SUPPORTED","CONVERTED_RECORD","NOT_FOUND","NO_RECORDS_FOUND","NOT_APPROVED","LIMIT_EXCEEDED","ALREADY_SCHEDULED","CANNOT_PERFORM_ACTION","CANNOT_PROCESS","INTERNAL_ERROR","INVALID_TOKEN","INVALID_DATA","STORAGE_SPACE_EXCEEDED","MANDATORY_NOT_FOUND","NO_PERMISSION","INVALID_MODULE","NOT_SUPPORTED","PATTERN_NOT_MATCHED","OAUTH_SCOPE_MISMATCH","DUPLICATE_DATA","INVALID_QUERY","MAPPING_MISMATCH","ID_ALREADY_CONVERTED","FILE_SIZE_MORE_THAN_ALLOWED_SIZE","RECORD_IN_BLUEPRINT","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","CANNOT_DELETE","REQUIRED_PARAM_MISSING","DATA_MISMATCH","RECORD_LOCKED","BAD_REQUEST","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"permissions","type":"List"},{"name":"param_name","type":"String"},{"name":"api_name","type":"String"},{"name":"id","type":"Long"},{"name":"module","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"index","type":"Integer"},{"name":"maximum_length","type":"String"},{"name":"mapped_field","type":"String"},{"name":"reason","type":"String"},{"name":"operator","type":"String"},{"name":"allowed_count","type":"Integer"},{"name":"limit","type":"Integer"},{"name":"json_path","type":"String"},{"name":"parent_api_name","type":"String"},{"name":"param","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"External","type":"String"}],"name":"details","type":"Map"},"message":{"values":["The record under merge is locked","the given id seems to be invalid","The record is not approved","The external ID of the lookup field or the Price Book is incorrect","The value of the external field is invalid.","There is no data for the ID specified or there is no matching record in the given module.","The external field contains duplicate data.","the territory feature is not enabled","Given Probability is not valid","duplicate territory id found","Given Territory id already exists for that record","User has no permission to assign this territory","Maximum limit of territories for that record exceeds","Invalid Sequence Number","Record insertion limit for Image upload field has been exceeded.","Record insertion limit has been exceeded.","The image format is invalid.","Dependent Fields missing","Specify Atleast one field","the id given seems to be invalid.","Already an Mass Action scheduler is runing for the given cvid","Scheduled Mass Operation feature is not available in your edition","can't update the converted record","Field cannot be updated in Scheduled Mass Update","Field is not visible","Field cannot be updated as it is associated with a validation rule.","Field cannot be updated as it is associated with a layout rule.This field cannot be updated in the Mass Update","Max field limit exceeded","Maximum lookup field limit in criteria exceeded","No field found","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","Territory is not supported for the given module","Please check whether the input values are correct","invalid data","permission denied","Internal server error occurred.","duplicate data","required field not found","Layout doesn't contain the Pipeline","Pipeline doesn't contain the Stage","the id given seems to be invalid","record not deleted","record not deletable","Authentication failed","One of the expected parameter is missing","mandatory param missing","invalid query formed","id already converted","body","given id is invalid","Already a Mass Action scheduler is running for the given cvid","The record is in stop processing","The record is in blue print","no permission to perform an action on this record","Record count exceeded","record not approved","no record found to update","Field Edit Permission not given","Customview not accessible","Empty response","give contact id is mismatched with the data","give account id is mismatched with the data","Territory id which you are trying to remove was system assigned"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/pipeline/forecast_category":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline_success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/variables/action_handler":{"classes":["core/com/zoho/crm/api/variables/api_exception","core/com/zoho/crm/api/variables/action_wrapper"],"interface":true},"core/com/zoho/crm/api/associate_email/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"message_id","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/modules/get_modules_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/attachments/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/roles/role":{"displayLabel":{"name":"display_label","type":"String"},"forecastManager":{"structure_name":"core/com/zoho/crm/api/roles/reporting_to","name":"forecast_manager","type":"core/com/zoho/crm/api/roles/reporting_to"},"adminUser":{"name":"admin_user","type":"Boolean"},"modifiedByS":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by__s","type":"core/com/zoho/crm/api/users/minified_user"},"shareWithPeers":{"name":"share_with_peers","type":"Boolean"},"createdByS":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by__s","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"description":{"name":"description","type":"String"},"id":{"name":"id","type":"Long"},"createdTimeS":{"name":"created_time__s","type":"DateTime"},"modifiedTimeS":{"name":"modified_time__s","type":"DateTime"},"reportingTo":{"structure_name":"core/com/zoho/crm/api/roles/reporting_to","name":"reporting_to","type":"core/com/zoho/crm/api/roles/reporting_to"}},"core/com/zoho/crm/api/entity_scores/module_structure":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/deleted_records_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/deleted_record","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/record/info","name":"info","type":"core/com/zoho/crm/api/record/info"}},"core/com/zoho/crm/api/taxes/action_wrapper":{"orgTaxes":{"structure_name":"core/com/zoho/crm/api/taxes/action_response","name":"org_taxes","interface":true,"type":"core/com/zoho/crm/api/taxes/action_response"}},"core/com/zoho/crm/api/inventory_templates/response_handler":{"classes":["core/com/zoho/crm/api/inventory_templates/api_exception","core/com/zoho/crm/api/inventory_templates/response_wrapper"],"interface":true},"core/com/zoho/crm/api/entity_scores/entity_structure_with_module":{"module":{"structure_name":"core/com/zoho/crm/api/entity_scores/module_structure","name":"module","type":"core/com/zoho/crm/api/entity_scores/module_structure"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mail_merge/sign_mail_merge_wrapper":{"signMailMerge":{"structure_name":"core/com/zoho/crm/api/mail_merge/sign_mail_merge","name":"sign_mail_merge","type":"List"}},"core/com/zoho/crm/api/record/get_mass_update_status_param":{"jobId":{"name":"job_id","type":"String"}},"core/com/zoho/crm/api/currencies/api_exception":{"code":{"values":["INTERNAL_SERVER_ERROR","ALREADY_ENABLED","INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"regex","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"related_status","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_write/upload_file_header":{"feature":{"values":["bulk-write"],"name":"feature","type":"String"},"XCRMORG":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/wizards/button":{"displayLabel":{"name":"display_label","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"backgroundColor":{"name":"background_color","type":"String"},"color":{"name":"color","type":"String"},"shape":{"name":"shape","type":"String"},"visibility":{"name":"visibility","type":"String"},"resource":{"name":"resource","type":"Object"},"criteria":{"structure_name":"core/com/zoho/crm/api/wizards/criteria","name":"criteria","type":"core/com/zoho/crm/api/wizards/criteria"},"targetScreen":{"structure_name":"core/com/zoho/crm/api/wizards/screen","name":"target_screen","type":"core/com/zoho/crm/api/wizards/screen"},"type":{"name":"type","type":"String"},"transition":{"structure_name":"core/com/zoho/crm/api/wizards/transition","name":"transition","type":"core/com/zoho/crm/api/wizards/transition"},"id":{"name":"id","type":"Long"},"category":{"name":"category","type":"String"}},"core/com/zoho/crm/api/mass_change_owner/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["owner is successfully updated"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/holidays/action_wrapper":{"holidays":{"structure_name":"core/com/zoho/crm/api/holidays/action_response","name":"holidays","type":"List"}},"core/com/zoho/crm/api/users/associated_groups_wrapper":{"userGroups":{"structure_name":"core/com/zoho/crm/api/users/associated_group","name":"user_groups","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/users/info","name":"info","type":"core/com/zoho/crm/api/users/info"}},"core/com/zoho/crm/api/record/tax":{"id":{"name":"id","type":"Long"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/send_mail/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/send_mail/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/layouts/section_field":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"sharingProperties":{"structure_name":"core/com/zoho/crm/api/modules/sharing_properties","name":"sharing_properties","type":"core/com/zoho/crm/api/modules/sharing_properties"},"apiName":{"name":"api_name","type":"String"},"webhook":{"name":"webhook","type":"Boolean"},"defaultValue":{"name":"default_value","type":"String"},"associatedModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"associated_module","type":"core/com/zoho/crm/api/modules/minified_module"},"tooltip":{"structure_name":"core/com/zoho/crm/api/fields/tooltip","name":"tooltip","type":"core/com/zoho/crm/api/fields/tooltip"},"quickSequenceNumber":{"name":"quick_sequence_number","type":"String"},"jsonType":{"name":"json_type","type":"String"},"type":{"name":"type","type":"String"},"required":{"name":"required","type":"Boolean"},"availableInUserLayout":{"name":"available_in_user_layout","type":"Boolean"},"rollupSummary":{"structure_name":"core/com/zoho/crm/api/fields/rollup_summary","name":"rollup_summary","type":"core/com/zoho/crm/api/fields/rollup_summary"},"blueprintSupported":{"name":"blueprint_supported","type":"Boolean"},"createdTime":{"name":"created_time","type":"DateTime"},"showType":{"name":"show_type","type":"Integer"},"globalPicklist":{"name":"global_picklist","type":"Object"},"id":{"name":"id","type":"Long"},"additionalColumn":{"name":"additional_column","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"filterable":{"name":"filterable","type":"Boolean"},"emailParser":{"structure_name":"core/com/zoho/crm/api/fields/email_parser","name":"email_parser","type":"core/com/zoho/crm/api/fields/email_parser"},"visible":{"name":"visible","type":"Boolean"},"dataType":{"values":["formula","text","boolean","picklist","datetime","website","autonumber","textarea","email","phone","integer","double","date","formula","text","boolean","picklist","datetime","website","autonumber","textarea","lookup","email","userlookup","phone","integer","double","date"],"name":"data_type","type":"utils/util/choice"},"profiles":{"structure_name":"core/com/zoho/crm/api/fields/profile","name":"profiles","type":"List"},"readOnly":{"name":"read_only","type":"Boolean"},"historyTracking":{"structure_name":"core/com/zoho/crm/api/fields/history_tracking","name":"history_tracking","type":"core/com/zoho/crm/api/fields/history_tracking"},"subform":{"structure_name":"core/com/zoho/crm/api/layouts/section_subform_field","name":"subform","type":"core/com/zoho/crm/api/layouts/section_subform_field"},"systemMandatory":{"name":"system_mandatory","type":"Boolean"},"separator":{"name":"separator","type":"Boolean"},"customField":{"name":"custom_field","type":"Boolean"},"searchable":{"name":"searchable","type":"Boolean"},"decimalPlace":{"name":"decimal_place","type":"Integer"},"createdSource":{"name":"created_source","type":"String"},"displayType":{"name":"display_type","type":"Integer"},"external":{"structure_name":"core/com/zoho/crm/api/fields/external","name":"external","type":"core/com/zoho/crm/api/fields/external"},"subModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"sub_module","type":"core/com/zoho/crm/api/modules/minified_module"},"unique":{"structure_name":"core/com/zoho/crm/api/fields/unique","name":"unique","type":"core/com/zoho/crm/api/fields/unique"},"viewType":{"structure_name":"core/com/zoho/crm/api/fields/view_type","name":"view_type","type":"core/com/zoho/crm/api/fields/view_type"},"displayField":{"name":"display_field","type":"Boolean"},"operationType":{"structure_name":"core/com/zoho/crm/api/fields/operation_type","name":"operation_type","type":"core/com/zoho/crm/api/fields/operation_type"},"hipaaComplianceEnabled":{"name":"hipaa_compliance_enabled","type":"Boolean"},"validationRule":{"name":"validation_rule","type":"Map"},"crypt":{"structure_name":"core/com/zoho/crm/api/fields/crypt","name":"crypt","type":"core/com/zoho/crm/api/fields/crypt"},"fileUpoladOptionlist":{"structure_name":"core/com/zoho/crm/api/fields/file_upolad_option","name":"file_upolad_optionlist","type":"List"},"enableColourCode":{"name":"enable_colour_code","type":"Boolean"},"virtualField":{"name":"virtual_field","type":"Boolean"},"hipaaCompliance":{"structure_name":"core/com/zoho/crm/api/fields/hipaa_compliance","name":"hipaa_compliance","type":"core/com/zoho/crm/api/fields/hipaa_compliance"},"associationDetails":{"structure_name":"core/com/zoho/crm/api/fields/association_details","name":"association_details","type":"core/com/zoho/crm/api/fields/association_details"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/fields/pick_list_value","name":"pick_list_values","type":"List"},"fieldLabel":{"name":"field_label","type":"String"},"referFromField":{"structure_name":"core/com/zoho/crm/api/fields/refer_from_field","name":"refer_from_field","type":"core/com/zoho/crm/api/fields/refer_from_field"},"allowedModules":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"allowed_modules","type":"List"},"fieldReadOnly":{"name":"field_read_only","type":"Boolean"},"businesscardSupported":{"name":"businesscard_supported","type":"Boolean"},"currency":{"structure_name":"core/com/zoho/crm/api/fields/currency","name":"currency","type":"core/com/zoho/crm/api/fields/currency"},"multiuserlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiuserlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"displayLabel":{"name":"display_label","type":"String"},"lookup":{"structure_name":"core/com/zoho/crm/api/fields/lookup","name":"lookup","type":"core/com/zoho/crm/api/fields/lookup"},"length":{"values":[120],"name":"length","type":"utils/util/choice"},"pickListValuesSortedLexically":{"name":"pick_list_values_sorted_lexically","type":"Boolean"},"sectionId":{"name":"section_id","type":"Integer"},"sortable":{"name":"sortable","type":"Boolean"},"autoNumber":{"structure_name":"core/com/zoho/crm/api/fields/auto_number","name":"auto_number","type":"core/com/zoho/crm/api/fields/auto_number"},"private1":{"structure_name":"core/com/zoho/crm/api/fields/private","name":"private","type":"core/com/zoho/crm/api/fields/private"},"convertMapping":{"structure_name":"core/com/zoho/crm/api/fields/convert_mapping","name":"convert_mapping","type":"core/com/zoho/crm/api/fields/convert_mapping"},"multiModuleLookup":{"structure_name":"core/com/zoho/crm/api/fields/multi_module_lookup","name":"multi_module_lookup","type":"core/com/zoho/crm/api/fields/multi_module_lookup"},"massUpdate":{"name":"mass_update","type":"Boolean"},"uiType":{"name":"ui_type","type":"Integer"},"formula":{"structure_name":"core/com/zoho/crm/api/fields/formula","name":"formula","type":"core/com/zoho/crm/api/fields/formula"},"category":{"name":"category","type":"Integer"},"multiselectlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiselectlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"columnName":{"name":"column_name","type":"String"}},"core/com/zoho/crm/api/timelines/response_wrapper":{"timeline":{"structure_name":"core/com/zoho/crm/api/timelines/timeline","name":"__timeline","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/timelines/info","name":"info","type":"core/com/zoho/crm/api/timelines/info"}},"core/com/zoho/crm/api/record/criteria":{"comparator":{"values":["equal","not_equal","in","not_in","less_than","less_equal","greater_than","greater_equal","contains","not_contains","starts_with","ends_with","between","not_between"],"name":"comparator","type":"utils/util/choice"},"groupOperator":{"values":["and","or"],"name":"group_operator","type":"utils/util/choice"},"field":{"name":"field","type":"String"},"value":{"name":"value","type":"Object"},"group":{"lookup":true,"structure_name":"core/com/zoho/crm/api/record/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/custom_views/api_exception":{"code":{"values":["INVALID_DATA","REQUIRED_PARAM_MISSING","MANDATORY_NOT_FOUND","EXPECTED_FIELD_MISSING","DUPLICATE_DATA","INVALID_MODULE","INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"name":"id","type":"Long"},{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"param_name","type":"String"},{"structure_name":"core/com/zoho/crm/api/custom_views/error_details","name":"expected_fields","type":"List"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_write/resource":{"code":{"name":"code","type":"String"},"file":{"structure_name":"core/com/zoho/crm/api/bulk_write/file","name":"file","type":"core/com/zoho/crm/api/bulk_write/file"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"ignoreEmpty":{"name":"ignore_empty","type":"Boolean"},"findBy":{"name":"find_by","type":"String"},"fieldMappings":{"structure_name":"core/com/zoho/crm/api/bulk_write/field_mapping","name":"field_mappings","type":"List"},"type":{"values":["data"],"name":"type","type":"utils/util/choice"},"status":{"values":["ADDED","IN PROGRESS","COMPLETED","SKIPPED","FAILED"],"name":"status","type":"utils/util/choice"},"fileId":{"name":"file_id","type":"String"}},"core/com/zoho/crm/api/backup/api_exception":{"code":{"values":["BACKUP_ALREADY_SCHEDULED","ALREADY_CANCELLED","RESOURCE_NOT_FOUND","REQUEST_BODY_NOT_READABLE","INVALID_DATA","INPROGRESS","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/deal_contact_roles/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/roles/delete_role_param":{"transferToId":{"name":"transfer_to_id","type":"Long","required":true}},"core/com/zoho/crm/api/record/recurring_activity":{"rrule":{"name":"RRULE","type":"String"},"exdate":{"name":"EXDATE","type":"String"}},"core/com/zoho/crm/api/notifications/response_handler":{"classes":["core/com/zoho/crm/api/notifications/api_exception","core/com/zoho/crm/api/notifications/response_wrapper"],"interface":true},"core/com/zoho/crm/api/record/update_records_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/fields/body_wrapper":{"fields":{"structure_name":"core/com/zoho/crm/api/fields/fields","name":"fields","type":"List"}},"core/com/zoho/crm/api/pipeline/getpipeline_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/layouts/properties":{"maximumRows":{"name":"maximum_rows","type":"Integer"},"tooltip":{"structure_name":"core/com/zoho/crm/api/layouts/tooltip","name":"tooltip","type":"core/com/zoho/crm/api/layouts/tooltip"},"reorderRows":{"name":"reorder_rows","type":"Boolean"}},"core/com/zoho/crm/api/users_transfer_delete/response_wrapper":{"transferAndDelete":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/status","name":"transfer_and_delete","type":"List"}},"core/com/zoho/crm/api/taxes/action_response":{"classes":["core/com/zoho/crm/api/taxes/success_response","core/com/zoho/crm/api/taxes/api_exception"],"interface":true},"core/com/zoho/crm/api/privacy_preference/preference":{"dataProcessingDuration":{"name":"data_processing_duration","type":"String"},"excludeExport":{"name":"exclude_export","type":"String"},"restrictZohoIntegFields":{"name":"restrict_zoho_integ_fields","type":"String"},"restrictTpt":{"name":"restrict_tpt","type":"String"},"excludeExportFields":{"name":"exclude_export_fields","type":"String"},"restrictTptServices":{"name":"restrict_tpt_services","type":"String"},"restrictTptFields":{"name":"restrict_tpt_fields","type":"String"},"restrictZohoIntegServices":{"name":"restrict_zoho_integ_services","type":"String"},"restrictZohoInteg":{"name":"restrict_zoho_integ","type":"String"},"excludeAPITpt":{"name":"exclude_api_tpt","type":"String"},"limitActions":{"name":"limit_actions","type":"String"},"excludeAPIZohoFields":{"name":"exclude_api_zoho_fields","type":"String"},"actionsWhileAwaiting":{"name":"actions_while_awaiting","type":"String"},"doubleOptIn":{"name":"double_opt_in","type":"String"},"blockList":{"name":"block_list","type":"String"},"excludeAPIZoho":{"name":"exclude_api_zoho","type":"String"},"privacySettingStatus":{"name":"privacy_setting_status","type":"String"},"excludeAPITptFields":{"name":"exclude_api_tpt_fields","type":"String"},"consentModules":{"name":"consent_modules","type":"String"},"durationTiming":{"name":"duration_timing","type":"String"},"consentMailSend":{"name":"consent_mail_send","type":"String"},"awaitingPeriod":{"name":"awaiting_period","type":"String"}},"core/com/zoho/crm/api/fields/query_details":{"criteria":{"name":"criteria","type":"Map"},"queryId":{"name":"query_id","type":"Long"}},"core/com/zoho/crm/api/pipeline/maps":{"displayValue":{"name":"display_value","type":"String"},"sequenceNumber":{"name":"sequence_number","max-length":10,"type":"Integer"},"forecastCategory":{"structure_name":"core/com/zoho/crm/api/pipeline/forecast_category","name":"forecast_category","type":"core/com/zoho/crm/api/pipeline/forecast_category"},"actualValue":{"name":"actual_value","type":"String"},"colourCode":{"name":"colour_code","type":"String"},"id":{"name":"id","type":"Long"},"forecastType":{"name":"forecast_type","type":"String"},"delete1":{"name":"_delete","type":"Boolean"}},"core/com/zoho/crm/api/tags/record_action_response":{"classes":["core/com/zoho/crm/api/tags/api_exception","core/com/zoho/crm/api/tags/record_success_response"],"interface":true},"core/com/zoho/crm/api/files/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/files/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/user_groups/associated_user":{"count":{"name":"count","type":"Integer"},"userGroup":{"structure_name":"core/com/zoho/crm/api/user_groups/user_group","name":"user_group","type":"core/com/zoho/crm/api/user_groups/user_group"}},"core/com/zoho/crm/api/record/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/territories/manager":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users/get_users_param":{"perPage":{"name":"per_page","type":"Integer"},"ids":{"name":"ids","type":"String"},"page":{"name":"page","type":"Integer"},"type":{"values":["ActiveUsers","DeactiveUsers","NotConfirmedUsers","ConfirmedUsers","CurrentUser","ActiveConfirmedUsers"],"name":"type","type":"String"}},"core/com/zoho/crm/api/cancel_meetings/action_response":{"classes":["core/com/zoho/crm/api/cancel_meetings/success_response","core/com/zoho/crm/api/cancel_meetings/api_exception"],"interface":true},"core/com/zoho/crm/api/files/action_handler":{"classes":["core/com/zoho/crm/api/files/api_exception","core/com/zoho/crm/api/files/action_wrapper"],"interface":true},"core/com/zoho/crm/api/record/action_response":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/success_response"],"interface":true},"core/com/zoho/crm/api/scoring_rules/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/territory_users/deassociate_territory_users_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/notes/get_notes_param":{"perPage":{"name":"per_page","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"String"},"fields":{"name":"fields","type":"String","required":true}},"core/com/zoho/crm/api/bulk_read/criteria":{"groupOperator":{"values":["and","or"],"name":"group_operator","type":"utils/util/choice"},"comparator":{"values":["equal","not_equal","in","not_in","less_than","less_equal","greater_than","greater_equal","contains","not_contains","starts_with","ends_with","between","not_between"],"name":"comparator","type":"utils/util/choice"},"apiName":{"name":"api_name","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"field","type":"core/com/zoho/crm/api/fields/minified_field"},"value":{"name":"value","type":"Object"},"group":{"structure_name":"core/com/zoho/crm/api/bulk_read/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/share_records/response_handler":{"classes":["core/com/zoho/crm/api/share_records/response_wrapper","core/com/zoho/crm/api/share_records/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/transfer_to_user":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/related_records/get_related_record_using_external_id_param":{"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/send_mail/action_handler":{"classes":["core/com/zoho/crm/api/send_mail/action_wrapper","core/com/zoho/crm/api/send_mail/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/transfer_action_response":{"classes":["core/com/zoho/crm/api/users_territories/success_response"],"interface":true},"core/com/zoho/crm/api/wizards/portal_user_type":{"layout":{"structure_name":"core/com/zoho/crm/api/layouts/layouts","name":"layout","type":"core/com/zoho/crm/api/layouts/layouts"},"chartData":{"structure_name":"core/com/zoho/crm/api/wizards/chart_data","name":"chart_data","type":"core/com/zoho/crm/api/wizards/chart_data"},"screens":{"structure_name":"core/com/zoho/crm/api/wizards/screen","name":"screens","type":"List"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mass_convert/assign_to":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/change_owner/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/change_owner/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/shift_hours/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/currencies/currency":{"symbol":{"name":"symbol","type":"String"},"modifiedTime":{"name":"modified_time","type":"DateTime"},"format":{"structure_name":"core/com/zoho/crm/api/currencies/currency_format","name":"format","type":"core/com/zoho/crm/api/currencies/currency_format"},"isActive":{"name":"is_active","type":"Boolean"},"exchangeRate":{"regex":"[1-9]{2}[.][1-9]{9}","name":"exchange_rate","type":"String"},"isoCode":{"name":"iso_code","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"prefixSymbol":{"name":"prefix_symbol","type":"Boolean"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"isBase":{"name":"is_base","type":"Boolean"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/shift_hours/shift_hours":{"holidays":{"structure_name":"core/com/zoho/crm/api/shift_hours/holidays","name":"holidays","type":"List"},"timezone":{"name":"timezone","type":"TimeZone"},"sameAsEveryday":{"name":"same_as_everyday","type":"Boolean"},"name":{"name":"name","type":"String"},"usersCount":{"name":"users_count","type":"Integer"},"id":{"name":"id","type":"Long"},"breakHours":{"structure_name":"core/com/zoho/crm/api/shift_hours/break_hours","name":"break_hours","type":"List"},"dailyTiming":{"name":"daily_timing","type":"List"},"shiftDays":{"name":"shift_days","type":"List"},"users":{"structure_name":"core/com/zoho/crm/api/shift_hours/users","name":"users","type":"List"},"customTiming":{"structure_name":"core/com/zoho/crm/api/shift_hours/shift_custom_timing","name":"custom_timing","type":"List"}},"core/com/zoho/crm/api/backup/urls":{"expiryDate":{"name":"expiry_date","type":"DateTime"},"attachmentLinks":{"name":"attachment_links","type":"List"},"dataLinks":{"name":"data_links","type":"List"}},"core/com/zoho/crm/api/holidays/holidays":{"holidays":{"structure_name":"core/com/zoho/crm/api/holidays/holiday","name":"holidays","type":"List"}},"core/com/zoho/crm/api/wizards/resource":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/change_owner/action_handler":{"classes":["core/com/zoho/crm/api/change_owner/api_exception","core/com/zoho/crm/api/change_owner/action_wrapper"],"interface":true},"core/com/zoho/crm/api/timelines/path_finder":{"processExit":{"name":"process_exit","type":"Boolean"},"state":{"structure_name":"core/com/zoho/crm/api/timelines/state","name":"state","type":"core/com/zoho/crm/api/timelines/state"},"processEntry":{"name":"process_entry","type":"Boolean"}},"core/com/zoho/crm/api/territories/reporting_to":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/related_records/delink_records_param":{"ids":{"name":"ids","type":"String","required":true}},"core/com/zoho/crm/api/portal_user_type/get_user_types_param":{"include":{"values":["modules"],"name":"include","type":"String"}},"core/com/zoho/crm/api/fields/function_parameter":{"apiName":{"name":"api_name","type":"String"}},"core/com/zoho/crm/api/assignment_rules/response_wrapper":{"assignmentRules":{"structure_name":"core/com/zoho/crm/api/assignment_rules/assignment_rules","name":"assignment_rules","type":"List"}},"core/com/zoho/crm/api/record/search_records_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/users_territories/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portals/action_wrapper":{"portals":{"structure_name":"core/com/zoho/crm/api/portals/action_response","name":"portals","type":"List"}},"core/com/zoho/crm/api/wizards/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/timelines/response_handler":{"classes":["core/com/zoho/crm/api/timelines/api_exception","core/com/zoho/crm/api/timelines/response_wrapper"],"interface":true},"core/com/zoho/crm/api/user_groups/body_wrapper":{"userGroups":{"structure_name":"core/com/zoho/crm/api/user_groups/groups","name":"user_groups","type":"List"}},"core/com/zoho/crm/api/templates/templates":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"folder":{"structure_name":"core/com/zoho/crm/api/templates/folder","name":"folder","type":"core/com/zoho/crm/api/templates/folder"},"attachmentPresent":{"name":"attachment_present","type":"Boolean"},"subject":{"name":"subject","type":"String"},"module":{"name":"module","type":"String"},"consentLinked":{"name":"consent_linked","type":"Boolean"},"name":{"name":"name","type":"String"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/templates/folder","name":"modified_by","type":"core/com/zoho/crm/api/templates/folder"},"id":{"name":"id","type":"Long"},"favourite":{"name":"favourite","type":"Boolean"}},"core/com/zoho/crm/api/mass_delete_cvid/cvid_body_wrapper":{"cvid":{"name":"cvid","type":"Long"},"territory":{"structure_name":"core/com/zoho/crm/api/mass_delete_cvid/territory","name":"territory","type":"core/com/zoho/crm/api/mass_delete_cvid/territory"}},"core/com/zoho/crm/api/reschedule_history/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"Modified_Time","type":"String"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"Created_Time","type":"String"},{"name":"id","type":"Long"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"$approval_state","type":"String"}],"name":"details","type":"Map"},"message":{"values":["record added","record updated","record deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/notifications/notification":{"resourceId":{"name":"resource_id","type":"Long"},"deleteevents":{"values":[true],"name":"_delete_events","type":"utils/util/choice"},"notifyOnRelatedAction":{"name":"notify_on_related_action","type":"Boolean"},"returnAffectedFieldValues":{"name":"return_affected_field_values","type":"Boolean"},"notifyUrl":{"regex":"www[.][a-z]{5}zoho[.]com","name":"notify_url","type":"String"},"resourceName":{"name":"resource_name","type":"String"},"resourceUri":{"name":"resource_uri","type":"String"},"fields":{"name":"fields","type":"Map"},"channelExpiry":{"name":"channel_expiry","type":"DateTime"},"channelId":{"name":"channel_id","type":"String"},"events":{"name":"events","type":"List"},"token":{"name":"token","type":"String"}},"core/com/zoho/crm/api/record/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"duplicateField":{"name":"duplicate_field","type":"String"},"action":{"values":["insert","update"],"name":"action","type":"utils/util/choice"},"details":{"keys":[{"name":"Modified_Time","type":"DateTime"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"Created_Time","type":"DateTime"},{"name":"id","type":"String"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"External_Contact_ID","type":"String"},{"name":"$approval_state","type":"String"},{"structure_name":"core/com/zoho/crm/api/record/record","name":"Contacts","type":"core/com/zoho/crm/api/record/record"},{"structure_name":"core/com/zoho/crm/api/record/record","name":"Deals","type":"core/com/zoho/crm/api/record/record"},{"structure_name":"core/com/zoho/crm/api/record/record","name":"Accounts","type":"core/com/zoho/crm/api/record/record"}],"name":"details","type":"Map"},"message":{"values":["The record has been converted successfully","record updated","record deleted","record added","photo uploaded successfully","Photo deleted","the territories data updated successfully","the territories are removed successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/users_unavailability/action_response":{"classes":["core/com/zoho/crm/api/users_unavailability/api_exception","core/com/zoho/crm/api/users_unavailability/success_response"],"interface":true},"core/com/zoho/crm/api/pipeline/mandatory_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/available_currencies/api_exception":{"code":{"values":["INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/shift_hours/get_shift_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/mass_delete_cvid/mass_delete_scheduled":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["mass delete scheduled successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/rollup_summary":{"expression":{"structure_name":"core/com/zoho/crm/api/fields/expression","name":"expression","type":"core/com/zoho/crm/api/fields/expression"},"basedOnModule":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"based_on_module","type":"core/com/zoho/crm/api/fields/minified_field"},"relatedList":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"related_list","type":"core/com/zoho/crm/api/fields/minified_field"},"rollupBasedOn":{"name":"rollup_based_on","type":"String"},"returnType":{"name":"return_type","type":"String"}},"core/com/zoho/crm/api/inventory_templates/response_wrapper":{"inventoryTemplates":{"structure_name":"core/com/zoho/crm/api/inventory_templates/inventory_template","name":"inventory_templates","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/inventory_templates/info","name":"info","type":"core/com/zoho/crm/api/inventory_templates/info"}},"core/com/zoho/crm/api/holidays/response_handler":{"classes":["core/com/zoho/crm/api/holidays/api_exception","core/com/zoho/crm/api/holidays/response_wrapper"],"interface":true},"core/com/zoho/crm/api/mail_merge/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"report_link","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/blueprint/next_transition":{"criteriaMatched":{"name":"criteria_matched","type":"Boolean"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/definition/api_exception":{"code":{"values":["INVALID_DATA","REQUIRED_PARAM_MISSING"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"values":["resource"],"name":"param_name","type":"utils/util/choice"},{"values":["resource"],"name":"param","type":"utils/util/choice"}],"name":"details","type":"Map"},"message":{"values":["invalid param","One of the expected parameter is missing"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/user_groups/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"regex","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fiscal_year/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["The fiscal year configuration has been updated successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/shift_hours/body_wrapper":{"shiftHours":{"structure_name":"core/com/zoho/crm/api/shift_hours/shift_hours","name":"shift_hours","type":"List"}},"core/com/zoho/crm/api/users/response_handler":{"classes":["core/com/zoho/crm/api/users/associated_groups_wrapper","core/com/zoho/crm/api/users/response_wrapper","core/com/zoho/crm/api/users/api_exception"],"interface":true},"core/com/zoho/crm/api/users_unavailability/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","MANDATORY_NOT_FOUND","PATTERN_NOT_MATCHED","INVALID_URL_PATTERN","UNABLE_TO_PARSE_DATA_TYPE","INVALID_TOKEN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"index","type":"Integer"},{"name":"param_name","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["Ids should be Long value with comma separated","required field not found","Please check whether the input values are correct","Please check if the URL trying to access is a correct one","either the request body or parameters is in wrong format"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/backup/response_handler":{"classes":["core/com/zoho/crm/api/backup/urls_wrapper","core/com/zoho/crm/api/backup/history_wrapper","core/com/zoho/crm/api/backup/file_body_wrapper","core/com/zoho/crm/api/backup/body_wrapper","core/com/zoho/crm/api/backup/api_exception"],"interface":true},"core/com/zoho/crm/api/mass_convert/action_response":{"classes":["core/com/zoho/crm/api/mass_convert/api_exception","core/com/zoho/crm/api/mass_convert/success_response"],"interface":true},"core/com/zoho/crm/api/fields/hipaa_compliance":{"restricted":{"name":"restricted","type":"Boolean"},"restrictedInExport":{"name":"restricted_in_export","type":"Boolean"}},"core/com/zoho/crm/api/fields/convert_mapping":{"deals":{"name":"Deals","type":"String"},"accounts":{"name":"Accounts","type":"String"},"contacts":{"name":"Contacts","type":"String"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline_action_response":{"classes":["core/com/zoho/crm/api/pipeline/api_exception","core/com/zoho/crm/api/pipeline/transfer_pipeline_success_response"],"interface":true},"core/com/zoho/crm/api/mass_change_owner/action_handler":{"classes":["core/com/zoho/crm/api/mass_change_owner/action_wrapper","core/com/zoho/crm/api/mass_change_owner/api_exception"],"interface":true},"core/com/zoho/crm/api/blueprint/escalation":{"days":{"name":"days","type":"Integer"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/layouts/default_assignment_view":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/record/get_deleted_records_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/user_groups/owner":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/reschedule_history/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"DateTime"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"}},"core/com/zoho/crm/api/send_mail/from":{"userName":{"name":"user_name","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/territories/associated_users_count_wrapper":{"associatedUsersCount":{"structure_name":"core/com/zoho/crm/api/territories/associated_users_count","name":"associated_users_count","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/territories/info","name":"info","type":"core/com/zoho/crm/api/territories/info"}},"core/com/zoho/crm/api/tags/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/contact_roles/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/send_mail/data":{"cc":{"structure_name":"core/com/zoho/crm/api/send_mail/to","name":"cc","type":"List"},"template":{"structure_name":"core/com/zoho/crm/api/send_mail/template","name":"template","interface":true,"type":"core/com/zoho/crm/api/send_mail/template"},"bcc":{"structure_name":"core/com/zoho/crm/api/send_mail/to","name":"bcc","type":"List"},"scheduledTime":{"name":"scheduled_time","type":"DateTime"},"attachments":{"structure_name":"core/com/zoho/crm/api/send_mail/attachment","name":"attachments","type":"List"},"subject":{"name":"subject","type":"String"},"inReplyTo":{"name":"in_reply_to","type":"String"},"inventoryDetails":{"structure_name":"core/com/zoho/crm/api/send_mail/inventory_details","name":"inventory_details","type":"core/com/zoho/crm/api/send_mail/inventory_details"},"content":{"name":"content","type":"String"},"orgEmail":{"name":"org_email","type":"Boolean"},"replyTo":{"structure_name":"core/com/zoho/crm/api/send_mail/to","name":"reply_to","type":"core/com/zoho/crm/api/send_mail/to"},"from":{"structure_name":"core/com/zoho/crm/api/send_mail/from","name":"from","type":"core/com/zoho/crm/api/send_mail/from"},"mailFormat":{"values":["html","text"],"name":"mail_format","type":"utils/util/choice"},"to":{"structure_name":"core/com/zoho/crm/api/send_mail/to","name":"to","type":"List"},"consentEmail":{"name":"consent_email","type":"Boolean"},"dataSubjectRequest":{"structure_name":"core/com/zoho/crm/api/send_mail/data_subject_request","name":"data_subject_request","type":"core/com/zoho/crm/api/send_mail/data_subject_request"}},"core/com/zoho/crm/api/tags/response_handler":{"classes":["core/com/zoho/crm/api/tags/response_wrapper","core/com/zoho/crm/api/tags/api_exception","core/com/zoho/crm/api/tags/count_response_wrapper"],"interface":true},"core/com/zoho/crm/api/reschedule_history/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","INVALID_DATA","INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["required field not found","record not deleted","the module name given seems to be invalid","invalid data"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/scoring_rules/get_scoring_rules_param":{"perPage":{"values":[10],"name":"per_page","type":"Integer"},"module":{"name":"module","type":"String"},"name":{"name":"name","type":"Long"},"active":{"values":[true,false],"name":"active","type":"Boolean"},"page":{"values":[2],"name":"page","type":"Integer"},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/record/download_handler":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/file_body_wrapper"],"interface":true},"core/com/zoho/crm/api/portal_invite/response_wrapper":{"portalInvite":{"structure_name":"core/com/zoho/crm/api/portal_invite/job_response","name":"portal_invite","type":"List"}},"core/com/zoho/crm/api/tags/get_tags_param":{"myTags":{"values":["true","false"],"name":"my_tags","type":"String"},"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/notifications/body_wrapper":{"watch":{"structure_name":"core/com/zoho/crm/api/notifications/notification","name":"watch","max-length":100,"type":"List","min-length":1}},"core/com/zoho/crm/api/email_sharing/response_wrapper":{"emailssharingdetails":{"structure_name":"core/com/zoho/crm/api/email_sharing/get_email_sharing","name":"__emails_sharing_details","type":"List"}},"core/com/zoho/crm/api/user_groups/association_wrapper":{"associations":{"structure_name":"core/com/zoho/crm/api/user_groups/association_response","name":"associations","type":"List"}},"core/com/zoho/crm/api/territories/body_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/territories/territories","name":"territories","type":"List"}},"core/com/zoho/crm/api/portal_user_type/response_handler":{"classes":["core/com/zoho/crm/api/portal_user_type/response_wrapper","core/com/zoho/crm/api/portal_user_type/api_exception"],"interface":true},"core/com/zoho/crm/api/portal_invite/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"},{"name":"param","type":"String"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_convert/response_handler":{"classes":["core/com/zoho/crm/api/mass_convert/response_wrapper","core/com/zoho/crm/api/mass_convert/api_exception"],"interface":true},"core/com/zoho/crm/api/fields/profile":{"permissionType":{"name":"permission_type","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/variables/action_wrapper":{"variables":{"structure_name":"core/com/zoho/crm/api/variables/action_response","name":"variables","type":"List"}},"core/com/zoho/crm/api/org/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/notes/get_note_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"String","required":true}},"core/com/zoho/crm/api/service_preference/action_handler":{"classes":["core/com/zoho/crm/api/service_preference/api_exception","core/com/zoho/crm/api/service_preference/action_wrapper"],"interface":true},"core/com/zoho/crm/api/mass_change_owner/status":{"failedCount":{"name":"Failed_Count","type":"Integer"},"notUpdatedCount":{"name":"Not_Updated_Count","type":"Integer"},"updatedCount":{"name":"Updated_Count","type":"Integer"},"totalCount":{"name":"Total_Count","type":"Integer"},"status":{"values":["COMPLETED","SCHEDULED","RUNNING","FAILED"],"name":"Status","type":"utils/util/choice"}},"core/com/zoho/crm/api/territories/get_territories_param":{"filters":{"name":"filters","type":"String"}},"core/com/zoho/crm/api/bulk_write/bulk_write_response":{"result":{"structure_name":"core/com/zoho/crm/api/bulk_write/result","name":"result","type":"core/com/zoho/crm/api/bulk_write/result"},"resource":{"structure_name":"core/com/zoho/crm/api/bulk_write/resource","name":"resource","type":"List"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"createdTime":{"name":"created_time","type":"DateTime"},"callback":{"structure_name":"core/com/zoho/crm/api/bulk_write/call_back","name":"callback","type":"core/com/zoho/crm/api/bulk_write/call_back"},"id":{"name":"id","type":"String"},"characterEncoding":{"name":"character_encoding","type":"String"},"operation":{"name":"operation","type":"String"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/tags/record_detail_tag":{"name":{"name":"name","type":"String"},"colorCode":{"name":"color_code","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/appointment_preference/get_appointment_preference_param":{"include":{"values":["deal_record_configuration"],"name":"include","type":"String"}},"core/com/zoho/crm/api/fields/get_fields_param":{"include":{"values":["allowed_permissions_to_update"],"name":"include","type":"String"},"component":{"values":["criteria"],"name":"component","type":"String"},"featureName":{"values":["layout_rule"],"name":"feature_name","type":"String"},"module":{"name":"module","type":"String","required":true},"dataType":{"values":["boolean","profileimage","datetime","website","ownerlookup","autonumber","subform","RRULE","textarea","lookup","bigint","currency","text","multiselectpicklist","ALARM","integer","phone","userlookup","picklist","email","event_reminder","double","date","multi_module_lookup","multiuserlookup","multiselectlookup","formula","module"],"name":"data_type","type":"String"},"type":{"values":["used","unused","all"],"name":"type","type":"String"},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/variables/delete_variables_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/tags/action_handler":{"classes":["core/com/zoho/crm/api/tags/action_wrapper","core/com/zoho/crm/api/tags/api_exception"],"interface":true},"core/com/zoho/crm/api/related_records/delink_records_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/send_mail/attachment":{"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/attachments/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"Modified_Time","type":"DateTime"},{"name":"Created_Time","type":"DateTime"},{"structure_name":"core/com/zoho/crm/api/attachments/owner","name":"Modified_By","type":"core/com/zoho/crm/api/attachments/owner"},{"structure_name":"core/com/zoho/crm/api/attachments/owner","name":"Created_By","type":"core/com/zoho/crm/api/attachments/owner"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/user_groups/sources_wrapper":{"sources":{"structure_name":"core/com/zoho/crm/api/user_groups/sources","name":"sources","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/user_groups/info","name":"info","type":"core/com/zoho/crm/api/user_groups/info"}},"core/com/zoho/crm/api/mail_merge/download_mail_merge_wrapper":{"downloadMailMerge":{"structure_name":"core/com/zoho/crm/api/mail_merge/download_mail_merge","name":"download_mail_merge","type":"List"}},"core/com/zoho/crm/api/territories/response_handler":{"classes":["core/com/zoho/crm/api/territories/api_exception","core/com/zoho/crm/api/territories/response_wrapper","core/com/zoho/crm/api/territories/associated_users_count_wrapper"],"interface":true},"core/com/zoho/crm/api/blueprint/process_info":{"apiName":{"name":"api_name","type":"String"},"fieldName":{"name":"field_name","type":"String"},"escalation":{"structure_name":"core/com/zoho/crm/api/blueprint/escalation","name":"escalation","type":"core/com/zoho/crm/api/blueprint/escalation"},"continuous":{"name":"continuous","type":"Boolean"},"fieldLabel":{"name":"field_label","type":"String"},"name":{"name":"name","type":"String"},"isContinuous":{"name":"is_continuous","type":"Boolean"},"id":{"name":"id","type":"String"},"fieldValue":{"name":"field_value","type":"String"},"fieldId":{"name":"field_id","type":"Long"},"columnName":{"name":"column_name","type":"String"}},"core/com/zoho/crm/api/reschedule_history/reschedule_history":{"rescheduleReason":{"name":"Reschedule_Reason","type":"String"},"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"orchestration":{"name":"$orchestration","type":"Boolean"},"inMerge":{"name":"$in_merge","type":"Boolean"},"sharingPermission":{"name":"$sharing_permission","type":"String"},"rescheduledFrom":{"name":"Rescheduled_From","type":"DateTime"},"approved":{"name":"$approved","type":"Boolean"},"review":{"name":"$review","type":"Boolean"},"rescheduledTo":{"name":"Rescheduled_To","type":"DateTime"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/reschedule_history/user","name":"Modified_By","type":"core/com/zoho/crm/api/reschedule_history/user"},"state":{"name":"$state","type":"String"},"id":{"name":"id","type":"Long"},"reviewProcess":{"name":"$review_process","type":"Boolean"},"appointmentName":{"structure_name":"core/com/zoho/crm/api/reschedule_history/appointment_name","name":"Appointment_Name","type":"core/com/zoho/crm/api/reschedule_history/appointment_name"},"canvasId":{"name":"$canvas_id","type":"String"},"approval":{"structure_name":"core/com/zoho/crm/api/reschedule_history/approval","name":"$approval","type":"core/com/zoho/crm/api/reschedule_history/approval"},"editable":{"name":"$editable","type":"Boolean"},"rescheduledTime":{"name":"Rescheduled_Time","type":"DateTime"},"approvalState":{"name":"$approval_state","type":"String"},"currencySymbol":{"name":"$currency_symbol","type":"String"},"rescheduleNote":{"name":"Reschedule_Note","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/reschedule_history/user","name":"Created_By","type":"core/com/zoho/crm/api/reschedule_history/user"},"processFlow":{"name":"$process_flow","type":"Boolean"},"ziaVisions":{"name":"$zia_visions","type":"Boolean"},"name":{"name":"Name","type":"String"},"rescheduledBy":{"structure_name":"core/com/zoho/crm/api/reschedule_history/user","name":"Rescheduled_By","type":"core/com/zoho/crm/api/reschedule_history/user"}},"core/com/zoho/crm/api/fields/auto_number":{"startingNumberLength":{"name":"starting_number_length","type":"Integer"},"startNumber":{"name":"start_number","type":"Integer"},"prefix":{"name":"prefix","type":"String"},"suffix":{"name":"suffix","type":"String"}},"core/com/zoho/crm/api/roles/action_wrapper":{"roles":{"structure_name":"core/com/zoho/crm/api/roles/action_response","name":"roles","type":"List"}},"core/com/zoho/crm/api/users_unavailability/get_user_unavailability_param":{"filters":{"name":"filters","type":"String"},"includeInnerDetails":{"values":["user.zuid"],"name":"include_inner_details","type":"String"}},"core/com/zoho/crm/api/email_compose_meta/data_map":{"relayDomains":{"name":"relay_domains","type":"List"},"mergefieldsdata":{"name":"mergeFieldsData","type":"String"},"defaultFrom":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/default_form","name":"default_from","type":"core/com/zoho/crm/api/email_compose_meta/default_form"},"fromAddress":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/from_address","name":"from_address","type":"List"},"featuresAvailable":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/features_available","name":"features_available","type":"core/com/zoho/crm/api/email_compose_meta/features_available"},"user":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/user","name":"user","type":"core/com/zoho/crm/api/email_compose_meta/user"}},"core/com/zoho/crm/api/users_territories/transfer_and_delink":{"transferToUser":{"structure_name":"core/com/zoho/crm/api/users_territories/transfer_to_user","name":"transfer_to_user","type":"core/com/zoho/crm/api/users_territories/transfer_to_user"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/fields/lookup":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"queryDetails":{"structure_name":"core/com/zoho/crm/api/fields/query_details","name":"query_details","type":"core/com/zoho/crm/api/fields/query_details"},"id":{"name":"id","type":"Long"},"showFields":{"structure_name":"core/com/zoho/crm/api/fields/show_fields","name":"show_fields","type":"List"},"revalidateFilterDuringEdit":{"name":"revalidate_filter_during_edit","type":"Boolean"}},"core/com/zoho/crm/api/territory_users/response_handler":{"classes":["core/com/zoho/crm/api/territory_users/api_exception","core/com/zoho/crm/api/territory_users/response_wrapper"],"interface":true},"core/com/zoho/crm/api/privacy_configurable_apps/apps":{"name":{"name":"name","type":"String"}},"core/com/zoho/crm/api/user_type_users/response_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/user_type_users/users","name":"users","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/user_type_users/info","name":"info","type":"core/com/zoho/crm/api/user_type_users/info"}},"core/com/zoho/crm/api/service_preference/action_response":{"classes":["core/com/zoho/crm/api/service_preference/api_exception","core/com/zoho/crm/api/service_preference/success_response"],"interface":true},"core/com/zoho/crm/api/blueprint/module_fields":{"apiName":{"name":"api_name","type":"String"},"fieldLabel":{"name":"field_label","type":"String"},"id":{"name":"id","type":"Long"},"required":{"name":"required","type":"Boolean"}},"core/com/zoho/crm/api/portals/action_handler":{"classes":["core/com/zoho/crm/api/portals/api_exception","core/com/zoho/crm/api/portals/action_wrapper"],"interface":true},"core/com/zoho/crm/api/layouts/convert_mapping":{"salesorders":{"structure_name":"core/com/zoho/crm/api/layouts/minified_layout","name":"SalesOrders","type":"core/com/zoho/crm/api/layouts/minified_layout"},"invoices":{"structure_name":"core/com/zoho/crm/api/layouts/minified_layout","name":"Invoices","type":"core/com/zoho/crm/api/layouts/minified_layout"},"deals":{"structure_name":"core/com/zoho/crm/api/layouts/deal_layout_mapping","name":"Deals","type":"core/com/zoho/crm/api/layouts/deal_layout_mapping"},"accounts":{"structure_name":"core/com/zoho/crm/api/layouts/minified_layout","name":"Accounts","type":"core/com/zoho/crm/api/layouts/minified_layout"},"contacts":{"structure_name":"core/com/zoho/crm/api/layouts/minified_layout","name":"Contacts","type":"core/com/zoho/crm/api/layouts/minified_layout"}},"core/com/zoho/crm/api/tags/new_tag_request_wrapper":{"ids":{"name":"ids","type":"List"},"tags":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"tags","type":"List"},"overWrite":{"name":"over_write","type":"Boolean"}},"core/com/zoho/crm/api/deal_contact_roles/action_handler":{"classes":["core/com/zoho/crm/api/deal_contact_roles/action_wrapper","core/com/zoho/crm/api/deal_contact_roles/api_exception"],"interface":true},"core/com/zoho/crm/api/blueprint/action_handler":{"classes":["core/com/zoho/crm/api/blueprint/success_response","core/com/zoho/crm/api/blueprint/api_exception"],"interface":true},"core/com/zoho/crm/api/record/participants":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"invited":{"name":"invited","type":"Boolean"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"},"type":{"name":"type","type":"String"},"email":{"name":"Email","type":"String"},"participant":{"name":"participant","type":"String"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/layouts/minified_layout":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/pipeline/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","INVALID_DATA","INTERNAL_SERVER_ERROR","DUPLICATE_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"param_name","type":"String"},{"name":"maximum_length","type":"Integer"},{"name":"regex","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portals/owner":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/user_groups/sources_count_wrapper":{"sourcesCount":{"structure_name":"core/com/zoho/crm/api/user_groups/sources_count","name":"sources_count","type":"List"}},"core/com/zoho/crm/api/related_records/get_related_record_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"},"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/email_sharing/share_from_user":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"_type","type":"String"}},"core/com/zoho/crm/api/assignment_rules/get_assignment_rules_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/record/preference_field_matched_value":{"deals":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Deals","type":"List"},"accounts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Accounts","type":"List"},"contacts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Contacts","type":"List"}},"core/com/zoho/crm/api/notes/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"DateTime"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"}},"core/com/zoho/crm/api/service_preference/body_wrapper":{"servicePreferences":{"structure_name":"core/com/zoho/crm/api/service_preference/service_preference","name":"service_preferences","type":"core/com/zoho/crm/api/service_preference/service_preference"}},"core/com/zoho/crm/api/files/body_wrapper":{"file":{"name":"file","max-length":10,"type":"List","min-length":1}},"core/com/zoho/crm/api/variable_groups/minified_variable_group":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/privacy_preference/wrapper":{"privacypreference":{"structure_name":"core/com/zoho/crm/api/privacy_preference/privacy_preference","name":"privacyPreference","type":"List"}},"core/com/zoho/crm/api/user_groups/resource":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/backup/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/pipeline/action_handler":{"classes":["core/com/zoho/crm/api/pipeline/api_exception","core/com/zoho/crm/api/pipeline/transfer_pipeline_action_wrapper","core/com/zoho/crm/api/pipeline/action_wrapper"],"interface":true},"core/com/zoho/crm/api/mass_delete_cvid/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["record is deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/shift_hours/api_exception":{"code":{"values":["INVALID_DATA","DEPENDENT_FIELD_MISSING","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"},{"name":"details","type":"String"},{"structure_name":"core/com/zoho/crm/api/shift_hours/mandatory_details","name":"dependee","type":"core/com/zoho/crm/api/shift_hours/mandatory_details"},{"name":"resource_path_index","type":"Integer"},{"name":"minimum_length","type":"Integer"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/deal_contact_roles/get_associated_contact_roles_param":{"ids":{"name":"ids","type":"Long"},"fields":{"values":["id"],"name":"fields","type":"String","required":true}},"core/com/zoho/crm/api/holidays/get_holiday_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/inventory_templates/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/notes/action_response":{"classes":["core/com/zoho/crm/api/notes/api_exception","core/com/zoho/crm/api/notes/success_response"],"interface":true},"core/com/zoho/crm/api/related_records/update_related_record_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/users_unavailability/body_wrapper":{"usersUnavailability":{"structure_name":"core/com/zoho/crm/api/users_unavailability/users_unavailability","name":"users_unavailability","type":"List"}},"core/com/zoho/crm/api/pipeline/stages":{"from":{"name":"from","type":"Long"},"to":{"name":"to","type":"Long"}},"core/com/zoho/crm/api/record/get_records_param":{"cvid":{"name":"cvid","type":"String"},"endDateTime":{"name":"endDateTime","type":"DateTime"},"includeChild":{"name":"include_child","type":"String"},"uid":{"name":"uid","type":"String"},"approved":{"name":"approved","type":"String"},"perPage":{"name":"per_page","type":"Integer"},"startDateTime":{"name":"startDateTime","type":"DateTime"},"converted":{"name":"converted","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"ids":{"name":"ids","type":"String","required":true},"territoryId":{"name":"territory_id","type":"String"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"Integer"},"pageToken":{"name":"page_token","type":"String"},"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/record/record":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"}},"core/com/zoho/crm/api/contact_roles/delete_roles_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/record/get_record_param":{"cvid":{"name":"cvid","type":"String"},"uid":{"name":"uid","type":"String"},"onDemandProperties":{"name":"on_demand_properties","type":"String"},"approved":{"name":"approved","type":"String"},"startDateTime":{"name":"startDateTime","type":"DateTime"},"converted":{"name":"converted","type":"String"},"territoryId":{"name":"territory_id","type":"String"},"fields":{"name":"fields","type":"String"},"endDateTime":{"name":"endDateTime","type":"DateTime"},"includeChild":{"name":"include_child","type":"String"}},"core/com/zoho/crm/api/record/get_record_using_external_id_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"},"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/reschedule_history/user":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/mass_convert/related_module":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/deleted_records_handler":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/deleted_records_wrapper"],"interface":true},"core/com/zoho/crm/api/shift_hours/role":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/upload_photo_param":{"restrictTriggers":{"name":"restrict_triggers","type":"String"}},"core/com/zoho/crm/api/portal_user_type/response_wrapper":{"userType":{"structure_name":"core/com/zoho/crm/api/portal_user_type/user_type","name":"user_type","type":"List"}},"core/com/zoho/crm/api/email_related_records/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","the request does not contain any file","invalid file type"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/profiles/action_response":{"classes":["core/com/zoho/crm/api/profiles/success_response","core/com/zoho/crm/api/profiles/api_exception"],"interface":true},"core/com/zoho/crm/api/wizards/exempted_portal_user_type":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/update_record_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/record/get_records_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"},"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/record/consent":{"owner":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Owner","type":"core/com/zoho/crm/api/users/minified_user"},"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"mailSentTime":{"name":"Mail_Sent_Time","type":"DateTime"},"consentThrough":{"name":"Consent_Through","type":"String"},"consentDate":{"name":"Consent_Date","type":"Date"},"contactThroughEmail":{"name":"Contact_Through_Email","type":"Boolean"},"consentRemarks":{"name":"Consent_Remarks","type":"String"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"contactThroughSocial":{"name":"Contact_Through_Social","type":"Boolean"},"name":{"name":"name","type":"String"},"contactThroughPhone":{"name":"Contact_Through_Phone","type":"Boolean"},"createdTime":{"name":"Created_Time","type":"DateTime"},"contactThroughSurvey":{"name":"Contact_Through_Survey","type":"Boolean"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"},"dataProcessingBasis":{"name":"Data_Processing_Basis","type":"String"}},"core/com/zoho/crm/api/currencies/base_currency_action_response":{"classes":["core/com/zoho/crm/api/currencies/api_exception","core/com/zoho/crm/api/currencies/success_response"],"interface":true},"core/com/zoho/crm/api/portal_user_type/filters":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/send_mail/to":{"userName":{"name":"user_name","type":"String"},"email":{"regex":"[a-z]{7}[@]zoho[.]com","name":"email","type":"String"}},"core/com/zoho/crm/api/appointment_preference/action_wrapper":{"appointmentPreferences":{"structure_name":"core/com/zoho/crm/api/appointment_preference/action_response","name":"appointment_preferences","interface":true,"type":"core/com/zoho/crm/api/appointment_preference/action_response"}},"core/com/zoho/crm/api/territory_users/action_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/territory_users/action_response","name":"users","type":"List"}},"core/com/zoho/crm/api/pipeline/action_wrapper":{"pipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/action_response","name":"pipeline","type":"List"}},"core/com/zoho/crm/api/reschedule_history/get_appointments_rescheduled_history_param":{"perPage":{"name":"per_page","type":"Integer"},"sortOrder":{"name":"sort_order","type":"String"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"Integer"},"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/record/mass_update_success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"job_id","type":"String"},{"name":"id","type":"Long"},{"name":"Modified_Time","type":"DateTime"},{"name":"Created_Time","type":"DateTime"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"}],"name":"details","type":"Map"},"message":{"values":["record updated","mass update scheduled successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/image_upload":{"sequenceNumberS":{"name":"Sequence_Number__s","type":"Long"},"previewIdS":{"name":"Preview_Id__s","type":"String"},"sizeS":{"name":"Size__s","type":"String"},"fileIdS":{"name":"File_Id__s","type":"String"},"id":{"name":"id","type":"Long"},"delete1":{"name":"_delete","type":"String"},"descriptionS":{"name":"Description__s","type":"String"},"fileNameS":{"name":"File_Name__s","type":"String"},"stateS":{"name":"State__s","type":"String"}},"core/com/zoho/crm/api/roles/response_wrapper":{"roles":{"structure_name":"core/com/zoho/crm/api/roles/role","name":"roles","type":"List"}},"core/com/zoho/crm/api/record/delete_record_param":{"wfTrigger":{"name":"wf_trigger","type":"Boolean"}},"core/com/zoho/crm/api/profiles/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/business_hours/get_business_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/record/lead_converter":{"notifyLeadOwner":{"name":"notify_lead_owner","type":"Boolean"},"notifyNewEntityOwner":{"name":"notify_new_entity_owner","type":"Boolean"},"deals":{"structure_name":"core/com/zoho/crm/api/record/record","module":"Deals","name":"Deals","type":"core/com/zoho/crm/api/record/record"},"accounts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Accounts","type":"core/com/zoho/crm/api/record/record"},"carryOverTags":{"structure_name":"core/com/zoho/crm/api/record/carry_over_tags","name":"carry_over_tags","type":"core/com/zoho/crm/api/record/carry_over_tags"},"overwrite":{"name":"overwrite","type":"Boolean"},"contacts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Contacts","type":"core/com/zoho/crm/api/record/record"},"assignTo":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"assign_to","type":"core/com/zoho/crm/api/users/minified_user"}},"core/com/zoho/crm/api/currencies/base_currency_action_wrapper":{"baseCurrency":{"structure_name":"core/com/zoho/crm/api/currencies/base_currency_action_response","name":"base_currency","interface":true,"type":"core/com/zoho/crm/api/currencies/base_currency_action_response"}},"core/com/zoho/crm/api/associate_email/action_handler":{"classes":["core/com/zoho/crm/api/associate_email/action_wrapper","core/com/zoho/crm/api/associate_email/api_exception"],"interface":true},"core/com/zoho/crm/api/email_compose_meta/from_address":{"default1":{"values":[true],"name":"default","type":"utils/util/choice"},"id":{"name":"id","type":"Long"},"userName":{"name":"user_name","type":"String"},"type":{"name":"type","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/scoring_rules/response_handler":{"classes":["core/com/zoho/crm/api/scoring_rules/api_exception","core/com/zoho/crm/api/scoring_rules/response_wrapper"],"interface":true},"core/com/zoho/crm/api/share_records/action_handler":{"classes":["core/com/zoho/crm/api/share_records/action_wrapper","core/com/zoho/crm/api/share_records/api_exception"],"interface":true},"core/com/zoho/crm/api/fields/response_handler":{"classes":["core/com/zoho/crm/api/fields/api_exception","core/com/zoho/crm/api/fields/body_wrapper"],"interface":true},"core/com/zoho/crm/api/files/action_response":{"classes":["core/com/zoho/crm/api/files/success_response"],"interface":true},"core/com/zoho/crm/api/deal_contact_roles/data":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"contactRole":{"structure_name":"core/com/zoho/crm/api/deal_contact_roles/contact_role","name":"Contact_Role","type":"core/com/zoho/crm/api/deal_contact_roles/contact_role"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"}},"core/com/zoho/crm/api/record/action_handler":{"classes":["core/com/zoho/crm/api/record/action_wrapper","core/com/zoho/crm/api/record/api_exception"],"interface":true},"core/com/zoho/crm/api/related_lists/module_map":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portals/api_exception":{"code":{"values":["INVALID_DATA","JSON_PARSE_ERROR","MANDATORY_NOT_FOUND","PATTERN_NOT_MATCHED","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"maximum_length","type":"Integer"},{"name":"minimum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_change_owner/territory":{"id":{"name":"id","type":"Long"},"includeChild":{"name":"include_child","type":"Boolean"}},"core/com/zoho/crm/api/timelines/field_history":{"pickListValues":{"structure_name":"core/com/zoho/crm/api/timelines/picklist_detail","name":"pick_list_values","type":"List"},"apiName":{"name":"api_name","type":"String"},"dataType":{"name":"data_type","type":"String"},"fieldLabel":{"name":"field_label","type":"String"},"enableColourCode":{"name":"enable_colour_code","type":"Boolean"},"id":{"name":"id","type":"Long"},"value":{"structure_name":"core/com/zoho/crm/api/timelines/field_history_value","name":"_value","type":"core/com/zoho/crm/api/timelines/field_history_value"}},"core/com/zoho/crm/api/tags/record_action_wrapper":{"lockedCount":{"name":"locked_count","type":"Boolean"},"data":{"structure_name":"core/com/zoho/crm/api/tags/record_action_response","name":"data","type":"List"},"successCount":{"name":"success_count","type":"String"},"wfScheduler":{"name":"wf_scheduler","type":"Boolean"}},"core/com/zoho/crm/api/share_records/shared_through":{"entityName":{"name":"entity_name","type":"String"},"module":{"structure_name":"core/com/zoho/crm/api/share_records/module","name":"module","type":"core/com/zoho/crm/api/share_records/module"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/scoring_rules/role_request_wrapper":{"scoringRules":{"name":"scoring_rules","type":"List"}},"core/com/zoho/crm/api/field_map_dependency/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/deal_contact_roles/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/deal_contact_roles/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/related_lists/get_related_lists_param":{"module":{"name":"module","type":"String","required":true},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/variables/variable_group":{"apiName":{"name":"api_name","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/taxes/expected_field":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/entity_scores/api_exception":{"code":{"values":["INVALID_MODULE","REQUIRED_PARAM_MISSING","INVALID_REQUEST","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/user_type_users/response_handler":{"classes":["core/com/zoho/crm/api/user_type_users/response_wrapper","core/com/zoho/crm/api/user_type_users/api_exception"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/tags/response_wrapper":{"tags":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"tags","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/tags/info","name":"info","type":"core/com/zoho/crm/api/tags/info"}},"core/com/zoho/crm/api/users/tab":{"background":{"values":["#222222"],"name":"background","type":"utils/util/choice"},"fontColor":{"values":["#FFFFFF"],"name":"font_color","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_write/response_wrapper":{"classes":["core/com/zoho/crm/api/bulk_write/api_exception","core/com/zoho/crm/api/bulk_write/bulk_write_response"],"interface":true},"core/com/zoho/crm/api/territories/response_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/territories/territories","name":"territories","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/territories/info","name":"info","type":"core/com/zoho/crm/api/territories/info"}},"core/com/zoho/crm/api/users_transfer_delete/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","ID_ALREADY_DELETED","CANNOT_UPDATE_DELETED_USER","AUTHORIZATION_FAILED","PATTERN_NOT_MATCHED","INVALID_REQUEST","LICENSE_LIMIT_EXCEEDED","DUPLICATE_DATA","UNAPPROVABLE","EMAIL_UPDATE_NOT_ALLOWED","ID_ALREADY_DEACTIVATED","ID_ALREADY_ACTIVE","FEATURE_PERMISSION","OAUTH_SCOPE_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","EMAIL_UPDATE_NOT_ALOWED","INVALID_MODULE","BAD_REQUEST","NO_PERMISSION","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"id","type":"Long"},{"name":"email","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"owner_status","type":"String"}],"name":"details","type":"Map"},"message":{"values":["invalid data","required field not found","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","Please check whether the input values are correct","the id given seems to be invalid","Cannot add user under CRM Plus account. Kindly use CRMPlus URL to add user","Request exceeds your license limit. Need to upgrade in order to add","Failed to add user since same email id is already present","Email Id should not contain @skydesk.jp. Please choose a different email id","Invalid Email Id. Please choose a different email id","Cannot add user for CRMPlus account from CRM. Kindly add user through CRMPlus","Company Name is required","Error occurred in resending the invitation of CRMPLUS user in CRM account","Cannot update the time_zone of another User","Either trial has expired or user does not have sufficient privilege to perform this action","Error occurred while updating CRMPlus User in CRM Account","invalid_data","Deleted user cannot be updated","Re-invite is not allowed for a confirmed user","Cannot update email of a confirmed CRM User","User with same email id is already in CRM Plus","User is already deactivated","Primary Contact cannot be deactivated","User is already active","Share among Subordinates Feature is not available","Profile and Role cannot be Updated by the user.","the_id_given_seems_to_be_invalid","Primary contact cannot be deleted","User is already deleted","User does not have sufficient privilege to delete users","Cannot update email of a confirmed CRM User"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/holidays/action_handler":{"classes":["core/com/zoho/crm/api/holidays/api_exception","core/com/zoho/crm/api/holidays/action_wrapper"],"interface":true},"core/com/zoho/crm/api/appointment_preference/appointment_preference":{"dealRecordConfiguration":{"keys":[{"structure_name":"core/com/zoho/crm/api/appointment_preference/layout","name":"layout","type":"core/com/zoho/crm/api/appointment_preference/layout"},{"structure_name":"core/com/zoho/crm/api/appointment_preference/field_mappings","name":"field_mappings","type":"List"},{"name":"id","type":"Long"}],"name":"deal_record_configuration","type":"Map"},"whenAppointmentCompleted":{"values":["do_not_create_deal","create_deal"],"name":"when_appointment_completed","type":"utils/util/choice"},"allowBookingOutsideServiceAvailability":{"name":"allow_booking_outside_service_availability","type":"Boolean"},"allowBookingOutsideBusinesshours":{"name":"allow_booking_outside_businesshours","type":"Boolean"},"showJobSheet":{"name":"show_job_sheet","type":"Boolean"},"whenDurationExceeds":{"values":["ask_appointment_provider_to_complete","mark_as_complete","ask_appointment_provider_to_complete","mark_as_complete"],"name":"when_duration_exceeds","type":"utils/util/choice"}},"core/com/zoho/crm/api/wizards/transition":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/currencies/action_response":{"classes":["core/com/zoho/crm/api/currencies/api_exception","core/com/zoho/crm/api/currencies/success_response"],"interface":true},"core/com/zoho/crm/api/related_records/get_related_records_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"},"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/custom_views/get_custom_view_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/scoring_rules/action_response":{"classes":["core/com/zoho/crm/api/scoring_rules/success_response","core/com/zoho/crm/api/scoring_rules/api_exception"],"interface":true},"core/com/zoho/crm/api/tags/add_tags_param":{"overWrite":{"name":"over_write","type":"String"}},"core/com/zoho/crm/api/mass_change_owner/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/mass_change_owner/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/variables/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/bulk_read/success_response":{"code":{"values":["ADDED_SUCCESSFULLY"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"String"},{"name":"operation","type":"String"},{"values":["COMPLETED","IN PROGRESS","ADDED","FAILURE"],"name":"state","type":"utils/util/choice"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"created_time","type":"DateTime"}],"name":"details","type":"Map"},"message":{"values":["Added successfully."],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/field_map_dependency/get_map_dependencies_param":{"perPage":{"values":[-1,0,1,2],"name":"per_page","type":"Integer"},"module":{"name":"module","type":"String"},"page":{"values":[-1,0,1],"name":"page","type":"Integer"},"filters":{"values":["Leads"],"name":"filters","type":"String"},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/business_hours/update_business_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/tags/action_wrapper":{"tags":{"structure_name":"core/com/zoho/crm/api/tags/action_response","name":"tags","type":"List"}},"core/com/zoho/crm/api/record/remind_at":{"alarm":{"name":"ALARM","type":"String"}},"core/com/zoho/crm/api/users/shift":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/fields/email_parser":{"fieldsUpdateSupported":{"name":"fields_update_supported","type":"Boolean"},"recordOperationsSupported":{"name":"record_operations_supported","type":"Boolean"}},"core/com/zoho/crm/api/notes/response_handler":{"classes":["core/com/zoho/crm/api/notes/response_wrapper","core/com/zoho/crm/api/notes/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"owner_status","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/blueprint/lookup_field":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/related_lists/response_handler":{"classes":["core/com/zoho/crm/api/related_lists/response_wrapper","core/com/zoho/crm/api/related_lists/api_exception"],"interface":true},"core/com/zoho/crm/api/scoring_rules/signal_rule":{"score":{"name":"score","type":"Integer"},"id":{"name":"id","type":"String"},"signal":{"structure_name":"core/com/zoho/crm/api/scoring_rules/signal","name":"signal","type":"core/com/zoho/crm/api/scoring_rules/signal"}},"core/com/zoho/crm/api/appointment_preference/response_handler":{"classes":["core/com/zoho/crm/api/appointment_preference/api_exception","core/com/zoho/crm/api/appointment_preference/response_wrapper"],"interface":true},"core/com/zoho/crm/api/privacy_preference/config":{"tpt":{"structure_name":"core/com/zoho/crm/api/privacy_preference/tpt","name":"tpt","type":"List"},"section":{"structure_name":"core/com/zoho/crm/api/privacy_preference/section","name":"section","type":"List"},"zohoInteg":{"structure_name":"core/com/zoho/crm/api/privacy_preference/tpt","name":"zoho_integ","type":"List"}},"core/com/zoho/crm/api/notes/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/notes/note","name":"data","type":"List"}},"core/com/zoho/crm/api/modules/argument":{"name":{"name":"name","type":"String"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/holidays/business_holiday":{"date":{"name":"date","type":"Date"},"name":{"name":"name","max-length":80,"type":"String"},"type":{"values":["business_holiday"],"name":"type","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/operation_type":{"webUpdate":{"name":"web_update","type":"Boolean"},"webCreate":{"name":"web_create","type":"Boolean"},"apiUpdate":{"name":"api_update","type":"Boolean"},"apiCreate":{"name":"api_create","type":"Boolean"}},"core/com/zoho/crm/api/related_records/api_exception":{"code":{"values":["NO_PERMISSION","CANNOT_BE_UPDATED","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","INTERNAL_ERROR","BAD_REQUEST","OAUTH_SCOPE_MISMATCH","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"permissions","type":"List"},{"name":"id","type":"Long"},{"name":"param_name","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["invalid data","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","record not deleted","the related id given seems to be invalid","Internal server error occurred.","The relation name given seems to be invalid"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/email_templates/last_version_statistics":{"tracked":{"name":"tracked","type":"Integer"},"delivered":{"name":"delivered","type":"Integer"},"opened":{"name":"opened","type":"Integer"},"bounced":{"name":"bounced","type":"Integer"},"sent":{"name":"sent","type":"Integer"},"clicked":{"name":"clicked","type":"Integer"}},"core/com/zoho/crm/api/variables/response_handler":{"classes":["core/com/zoho/crm/api/variables/api_exception","core/com/zoho/crm/api/variables/response_wrapper"],"interface":true},"core/com/zoho/crm/api/related_lists/related_list":{"displayLabel":{"name":"display_label","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"String"},"customizeSort":{"name":"customize_sort","type":"Boolean"},"apiName":{"name":"api_name","type":"String"},"visible":{"name":"visible","type":"Boolean"},"module":{"structure_name":"core/com/zoho/crm/api/related_lists/module_map","name":"module","type":"core/com/zoho/crm/api/related_lists/module_map"},"type":{"name":"type","type":"String"},"connectedmodule":{"name":"connectedmodule","type":"String"},"linkingmodule":{"name":"linkingmodule","type":"String"},"customizeDisplayLabel":{"name":"customize_display_label","type":"Boolean"},"sortOrder":{"name":"sort_order","type":"String"},"name":{"name":"name","type":"String"},"action":{"name":"action","type":"String"},"sortBy":{"structure_name":"core/com/zoho/crm/api/related_lists/field","name":"sort_by","type":"core/com/zoho/crm/api/related_lists/field"},"id":{"name":"id","type":"Long"},"href":{"name":"href","type":"String"},"fields":{"structure_name":"core/com/zoho/crm/api/related_lists/field","name":"fields","type":"List"},"customizeFields":{"name":"customize_fields","type":"Boolean"}},"core/com/zoho/crm/api/deal_contact_roles/contact_role":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/scoring_rules/action_wrapper":{"scoringRules":{"structure_name":"core/com/zoho/crm/api/scoring_rules/action_response","name":"scoring_rules","max-length":100,"type":"List"}},"core/com/zoho/crm/api/associate_email/action_wrapper":{"emails":{"structure_name":"core/com/zoho/crm/api/associate_email/action_response","name":"Emails","type":"List"}},"core/com/zoho/crm/api/hipaa_compliance/response_wrapper":{"hipaaCompliance":{"structure_name":"core/com/zoho/crm/api/hipaa_compliance/hipaa_compliance","name":"hipaa_compliance","type":"core/com/zoho/crm/api/hipaa_compliance/hipaa_compliance"}},"core/com/zoho/crm/api/profiles/action_wrapper":{"profiles":{"structure_name":"core/com/zoho/crm/api/profiles/action_response","name":"profiles","type":"List"}},"core/com/zoho/crm/api/variables/variable":{"apiName":{"name":"api_name","type":"String"},"variableGroup":{"structure_name":"core/com/zoho/crm/api/variables/variable_group","name":"variable_group","type":"core/com/zoho/crm/api/variables/variable_group"},"name":{"name":"name","type":"String"},"description":{"name":"description","type":"String"},"readOnly":{"name":"read_only","type":"Boolean"},"source":{"name":"source","type":"String"},"id":{"name":"id","type":"Long"},"type":{"values":["text","integer","percent","double","currency","date","datetime","email","phone","website","textarea","checkbox","long"],"name":"type","type":"utils/util/choice"},"value":{"name":"value","type":"Object"}},"core/com/zoho/crm/api/shift_hours/break_custom_timing":{"breakTiming":{"name":"break_timing","type":"List"},"days":{"name":"days","type":"String"}},"core/com/zoho/crm/api/fiscal_year/body_wrapper":{"fiscalYear":{"structure_name":"core/com/zoho/crm/api/fiscal_year/year","name":"fiscal_year","type":"core/com/zoho/crm/api/fiscal_year/year"}},"core/com/zoho/crm/api/users_territories/action_handler":{"classes":["core/com/zoho/crm/api/users_territories/api_exception","core/com/zoho/crm/api/users_territories/action_wrapper"],"interface":true},"core/com/zoho/crm/api/holidays/resonse_handler":{"classes":["core/com/zoho/crm/api/holidays/api_exception","core/com/zoho/crm/api/holidays/response_wrapper"],"interface":true},"core/com/zoho/crm/api/holidays/update_holidays_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline":{"pipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/t_pipeline","name":"pipeline","type":"core/com/zoho/crm/api/pipeline/t_pipeline"},"stages":{"structure_name":"core/com/zoho/crm/api/pipeline/stages","name":"stages","type":"List"}},"core/com/zoho/crm/api/related_records/get_related_record_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"},"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/email_related_records/linked_record":{"module":{"structure_name":"core/com/zoho/crm/api/email_related_records/module","name":"module","type":"core/com/zoho/crm/api/email_related_records/module"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/fields/minified_field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/body_wrapper":{"process":{"name":"process","type":"List"},"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","max-length":100,"type":"List","min-length":1},"larId":{"name":"lar_id","type":"String"},"wfTrigger":{"name":"wf_trigger","type":"String"},"trigger":{"name":"trigger","type":"List"},"duplicateCheckFields":{"name":"duplicate_check_fields","type":"List"}},"core/com/zoho/crm/api/taxes/body_wrapper":{"orgTaxes":{"structure_name":"core/com/zoho/crm/api/taxes/org_tax","name":"org_taxes","type":"core/com/zoho/crm/api/taxes/org_tax"}},"core/com/zoho/crm/api/modules/body_wrapper":{"modules":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"modules","type":"List"}},"core/com/zoho/crm/api/inventory_templates/folder":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users/associated_group":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"description":{"name":"description","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portals_meta/modules":{"apiName":{"name":"api_name","type":"String"},"sharedType":{"name":"shared_type","type":"String"},"pluralLabel":{"name":"plural_label","type":"String"},"id":{"name":"id","type":"Long"},"filters":{"structure_name":"core/com/zoho/crm/api/portals_meta/filters","name":"filters","type":"List"},"layouts":{"structure_name":"core/com/zoho/crm/api/portals_meta/layouts","name":"layouts","type":"List"},"views":{"structure_name":"core/com/zoho/crm/api/portals_meta/views","name":"views","type":"List"}},"core/com/zoho/crm/api/blueprint/body_wrapper":{"blueprint":{"structure_name":"core/com/zoho/crm/api/blueprint/blue_print","name":"blueprint","type":"List"}},"core/com/zoho/crm/api/mass_convert/convert":{"relatedModules":{"structure_name":"core/com/zoho/crm/api/mass_convert/related_module","name":"related_modules","type":"List"},"applyAssignmentThreshold":{"name":"apply_assignment_threshold","type":"Boolean"},"deals":{"structure_name":"core/com/zoho/crm/api/record/record","module":"Deals","name":"Deals","type":"core/com/zoho/crm/api/record/record"},"ids":{"name":"ids","type":"List"},"carryOverTags":{"structure_name":"core/com/zoho/crm/api/mass_convert/move_attachments_to","name":"carry_over_tags","type":"List"},"assignTo":{"structure_name":"core/com/zoho/crm/api/mass_convert/assign_to","name":"assign_to","type":"core/com/zoho/crm/api/mass_convert/assign_to"},"portalUserType":{"structure_name":"core/com/zoho/crm/api/mass_convert/portal_user_type","name":"portal_user_type","type":"core/com/zoho/crm/api/mass_convert/portal_user_type"},"moveAttachmentsTo":{"structure_name":"core/com/zoho/crm/api/mass_convert/move_attachments_to","name":"move_attachments_to","type":"core/com/zoho/crm/api/mass_convert/move_attachments_to"}},"core/com/zoho/crm/api/taxes/response_wrapper":{"orgTaxes":{"structure_name":"core/com/zoho/crm/api/taxes/org_tax","name":"org_taxes","type":"core/com/zoho/crm/api/taxes/org_tax"}},"core/com/zoho/crm/api/entity_scores/get_module_param":{"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/record/update_record_using_external_id_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/files/upload_files_param":{"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/bulk_write/request_wrapper":{"resource":{"structure_name":"core/com/zoho/crm/api/bulk_write/resource","name":"resource","type":"List"},"ignoreEmpty":{"name":"ignore_empty","type":"Boolean"},"callback":{"structure_name":"core/com/zoho/crm/api/bulk_write/call_back","name":"callback","type":"core/com/zoho/crm/api/bulk_write/call_back"},"characterEncoding":{"name":"character_encoding","type":"String"},"operation":{"values":["insert","update","upsert"],"name":"operation","type":"utils/util/choice"}},"core/com/zoho/crm/api/currencies/response_handler":{"classes":["core/com/zoho/crm/api/currencies/api_exception","core/com/zoho/crm/api/currencies/body_wrapper"],"interface":true},"core/com/zoho/crm/api/share_records/share_record":{"shareRelatedRecords":{"name":"share_related_records","type":"Boolean"},"sharedThrough":{"structure_name":"core/com/zoho/crm/api/share_records/shared_through","name":"shared_through","type":"core/com/zoho/crm/api/share_records/shared_through"},"sharedTime":{"name":"shared_time","type":"DateTime"},"sharedBy":{"structure_name":"core/com/zoho/crm/api/users/users","name":"shared_by","type":"core/com/zoho/crm/api/users/users"},"permission":{"values":["full_access","read_only","read_write"],"name":"permission","type":"utils/util/choice"},"sharedWith":{"structure_name":"core/com/zoho/crm/api/users/users","name":"shared_with","type":"core/com/zoho/crm/api/users/users"},"type":{"values":["public","private"],"name":"type","type":"utils/util/choice"},"user":{"structure_name":"core/com/zoho/crm/api/users/users","name":"user","type":"core/com/zoho/crm/api/users/users"}},"core/com/zoho/crm/api/tags/update_tags_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/modules/sharing_properties":{"sharePermission":{"values":["full-access","read-write","read-only"],"name":"share_permission","type":"utils/util/choice"},"schedulerStatus":{"name":"scheduler_status","type":"String"},"sharePreferenceEnabled":{"name":"share_preference_enabled","type":"Boolean"}},"core/com/zoho/crm/api/record/mass_update_action_response":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/mass_update_success_response"],"interface":true},"core/com/zoho/crm/api/profiles/info":{"licenseLimit":{"name":"license_limit","type":"Integer"}},"core/com/zoho/crm/api/roles/response_handler":{"classes":["core/com/zoho/crm/api/roles/api_exception","core/com/zoho/crm/api/roles/response_wrapper"],"interface":true},"core/com/zoho/crm/api/custom_views/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/attachments/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","INVALID_REQUEST","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"values":["invalid"],"name":"related_status","type":"utils/util/choice"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_type","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/field_map_dependency/map_dependency":{"parent":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/parent","name":"parent","type":"core/com/zoho/crm/api/field_map_dependency/parent"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/pick_list_mapping","name":"pick_list_values","type":"List"},"internal":{"name":"internal","type":"Boolean"},"subModule":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/sub_module","name":"sub_module","type":"core/com/zoho/crm/api/field_map_dependency/sub_module"},"active":{"name":"active","type":"Boolean"},"id":{"name":"id","type":"Long"},"source":{"name":"source","type":"Integer"},"category":{"name":"category","type":"Integer"},"child":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/child","name":"child","type":"core/com/zoho/crm/api/field_map_dependency/child"}},"core/com/zoho/crm/api/custom_views/criteria":{"comparator":{"name":"comparator","type":"String"},"groupOperator":{"name":"group_operator","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/custom_views/field","name":"field","type":"core/com/zoho/crm/api/custom_views/field"},"value":{"name":"value","type":"Object"},"group":{"structure_name":"core/com/zoho/crm/api/custom_views/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/inventory_templates/inventory_template":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"lastUsageTime":{"name":"last_usage_time","type":"DateTime"},"editorMode":{"name":"editor_mode","type":"String"},"type":{"name":"type","type":"String"},"content":{"name":"content","type":"String"},"folder":{"structure_name":"core/com/zoho/crm/api/inventory_templates/folder","name":"folder","type":"core/com/zoho/crm/api/inventory_templates/folder"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"category":{"name":"category","type":"String"},"favorite":{"name":"favorite","type":"Boolean"}},"core/com/zoho/crm/api/variables/get_variable_by_api_name_param":{"group":{"name":"group","type":"String"}},"core/com/zoho/crm/api/custom_views/pin_unpin_fields":{"fields":{"structure_name":"core/com/zoho/crm/api/custom_views/pin_fields","name":"fields","type":"List"}},"core/com/zoho/crm/api/portals_meta/views":{"displayLabel":{"name":"display_label","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/record/wizard":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users_unavailability/action_wrapper":{"usersUnavailability":{"structure_name":"core/com/zoho/crm/api/users_unavailability/action_response","name":"users_unavailability","type":"List"}},"core/com/zoho/crm/api/query/body_wrapper":{"selectQuery":{"name":"select_query","type":"String"}},"core/com/zoho/crm/api/shift_hours/create_shifts_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/user_groups/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/custom_views/response_handler":{"classes":["core/com/zoho/crm/api/custom_views/api_exception","core/com/zoho/crm/api/custom_views/body_wrapper"],"interface":true},"core/com/zoho/crm/api/org/feature":{"name":{"name":"name","type":"String"},"resources":{"structure_name":"core/com/zoho/crm/api/org/resource","name":"resources","type":"List"}},"core/com/zoho/crm/api/modules/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","NOT_SUPPORTED","INVALID_DATA","INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_user_type/modules":{"apiName":{"name":"api_name","type":"String"},"permissions":{"structure_name":"core/com/zoho/crm/api/portal_user_type/permissions","name":"permissions","type":"core/com/zoho/crm/api/portal_user_type/permissions"},"sharedType":{"values":["private"],"name":"shared_type","type":"utils/util/choice"},"id":{"name":"id","type":"Long"},"pluralLabel":{"name":"plural_label","type":"String"},"filters":{"structure_name":"core/com/zoho/crm/api/portal_user_type/filters","name":"filters","type":"List"},"fields":{"structure_name":"core/com/zoho/crm/api/portal_user_type/fields","name":"fields","type":"List"},"layouts":{"structure_name":"core/com/zoho/crm/api/portal_user_type/layouts","name":"layouts","type":"List"},"views":{"structure_name":"core/com/zoho/crm/api/portal_user_type/views","name":"views","type":"core/com/zoho/crm/api/portal_user_type/views"}},"core/com/zoho/crm/api/files/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"name","type":"String"},{"name":"id","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/currencies/action_wrapper":{"currencies":{"structure_name":"core/com/zoho/crm/api/currencies/action_response","name":"currencies","type":"List"}},"core/com/zoho/crm/api/change_owner/mass_wrapper":{"owner":{"structure_name":"core/com/zoho/crm/api/change_owner/owner","name":"owner","type":"core/com/zoho/crm/api/change_owner/owner"},"relatedModules":{"structure_name":"core/com/zoho/crm/api/change_owner/related_modules","name":"related_modules","type":"List"},"ids":{"name":"ids","type":"List"},"notify":{"name":"notify","type":"Boolean"}},"core/com/zoho/crm/api/query/response_handler":{"classes":["core/com/zoho/crm/api/query/api_exception","core/com/zoho/crm/api/query/response_wrapper"],"interface":true},"core/com/zoho/crm/api/portal_invite/invite_users_param":{"userTypeId":{"name":"user_type_id","type":"Long","required":true},"language":{"values":["en_US","en_GB","bg_BG","zh_CN","zh_TW","hr_HR","ar_EG","in_ID","cs_CZ","da_DK","nl_NL","fr_FR","de_DE","hu_HU","","hi_IN","it_IT","ja_JP","pl_PL","pt_BR","pt_PT","ru_RU","es_ES","sv_SE","th_TH","tr_TR","vi_VN","ko_KR","iw_IL"],"name":"language","type":"String"},"type":{"values":["invite","reinvite"],"name":"type","type":"String","required":true}},"core/com/zoho/crm/api/currencies/format":{"thousandSeparator":{"values":["Comma","Space","Period","Space"],"name":"thousand_separator","type":"utils/util/choice"},"decimalPlaces":{"values":["0","2","3"],"name":"decimal_places","type":"utils/util/choice"},"decimalSeparator":{"values":["Period","Comma"],"name":"decimal_separator","type":"utils/util/choice"}},"core/com/zoho/crm/api/share_records/action_response":{"classes":["core/com/zoho/crm/api/share_records/success_response","core/com/zoho/crm/api/share_records/api_exception"],"interface":true},"core/com/zoho/crm/api/shift_hours/shift_custom_timing":{"days":{"name":"days","type":"String"},"shiftTiming":{"name":"shift_timing","type":"List"}},"core/com/zoho/crm/api/blueprint/module_mapping":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"fields":{"structure_name":"core/com/zoho/crm/api/blueprint/module_fields","name":"fields","type":"List"}},"core/com/zoho/crm/api/record/info":{"call":{"name":"call","type":"Boolean"},"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"DateTime"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"},"email":{"name":"email","type":"Boolean"}},"core/com/zoho/crm/api/assignment_rules/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","DUPLICATE_DATA","REQUIRED_PARAM_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"name","type":"String"},{"name":"param","type":"String"}],"name":"details","type":"Map"},"message":{"values":["the name given seems to be invalid","the id given seems to be invalid","the default_assignee given seems to be invalid","the module name given seems to be invalid","the given assignment rule name already exists","One of the expected parameter is missing"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/tags/existing_tag_request_wrapper":{"ids":{"name":"ids","type":"List"},"tags":{"structure_name":"core/com/zoho/crm/api/tags/existing_tag","name":"tags","type":"List"}},"core/com/zoho/crm/api/variables/get_variable_by_id_param":{"group":{"name":"group","type":"String"}},"core/com/zoho/crm/api/users_territories/validation_handler":{"classes":["core/com/zoho/crm/api/users_territories/api_exception","core/com/zoho/crm/api/users_territories/validation_wrapper"],"interface":true},"core/com/zoho/crm/api/tags/get_record_count_for_tag_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/user_groups/jobs":{"status":{"name":"Status","type":"String"}},"core/com/zoho/crm/api/territories/territories":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"permissionType":{"values":["read_write_delete","read_only"],"name":"permission_type","type":"utils/util/choice"},"manager":{"structure_name":"core/com/zoho/crm/api/territories/manager","name":"manager","type":"core/com/zoho/crm/api/territories/manager"},"description":{"name":"description","type":"String"},"accountRuleCriteria":{"structure_name":"core/com/zoho/crm/api/territories/criteria","name":"account_rule_criteria","type":"core/com/zoho/crm/api/territories/criteria"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"leadRuleCriteria":{"structure_name":"core/com/zoho/crm/api/territories/criteria","name":"lead_rule_criteria","type":"core/com/zoho/crm/api/territories/criteria"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"reportingTo":{"structure_name":"core/com/zoho/crm/api/territories/reporting_to","name":"reporting_to","type":"core/com/zoho/crm/api/territories/reporting_to"},"dealRuleCriteria":{"structure_name":"core/com/zoho/crm/api/territories/criteria","name":"deal_rule_criteria","type":"core/com/zoho/crm/api/territories/criteria"}},"core/com/zoho/crm/api/profiles/action_handler":{"classes":["core/com/zoho/crm/api/profiles/action_wrapper","core/com/zoho/crm/api/profiles/success_response","core/com/zoho/crm/api/profiles/api_exception"],"interface":true},"core/com/zoho/crm/api/hipaa_compliance/hipaa_compliance":{"restrictDataAccessThroughAPI":{"name":"restrict_data_access_through_api","type":"Boolean"},"enabledForModules":{"structure_name":"core/com/zoho/crm/api/hipaa_compliance/modules","name":"enabled_for_modules","type":"List"},"restrictToZohoApps":{"name":"restrict_to_zoho_apps","type":"Boolean"},"enabled":{"name":"enabled","type":"Boolean"},"restrictToThirdPartyApps":{"name":"restrict_to_third_party_apps","type":"List"},"restrictDataInExport":{"name":"restrict_data_in_export","type":"Boolean"}},"core/com/zoho/crm/api/timelines/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"values":["the related id given seems to be invalid","the module name given seems to be invalid","the relation name given seems to be invalid"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/profiles/section":{"name":{"name":"name","type":"String"},"categories":{"structure_name":"core/com/zoho/crm/api/profiles/category","name":"categories","type":"List"}},"core/com/zoho/crm/api/record/delete_record_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/bulk_read/job_detail":{"result":{"structure_name":"core/com/zoho/crm/api/bulk_read/result","name":"result","type":"core/com/zoho/crm/api/bulk_read/result"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"query":{"structure_name":"core/com/zoho/crm/api/bulk_read/query","name":"query","type":"core/com/zoho/crm/api/bulk_read/query"},"createdTime":{"name":"created_time","type":"DateTime"},"id":{"name":"id","type":"String"},"state":{"values":["COMPLETED","IN PROGRESS","ADDED","FAILURE"],"name":"state","type":"utils/util/choice"},"operation":{"name":"operation","type":"String"},"fileType":{"values":["csv"],"name":"file_type","type":"utils/util/choice"}},"core/com/zoho/crm/api/shift_hours/response_handler":{"classes":["core/com/zoho/crm/api/shift_hours/api_exception","core/com/zoho/crm/api/shift_hours/response_wrapper"],"interface":true},"core/com/zoho/crm/api/timelines/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"}},"core/com/zoho/crm/api/email_related_records/info":{"prevIndex":{"name":"prev_index","type":"String"},"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"nextIndex":{"name":"next_index","type":"String"}},"core/com/zoho/crm/api/portals_meta/related_lists":{"module":{"structure_name":"core/com/zoho/crm/api/portals_meta/modules","name":"module","type":"core/com/zoho/crm/api/portals_meta/modules"}},"core/com/zoho/crm/api/reschedule_history/action_response":{"classes":["core/com/zoho/crm/api/reschedule_history/api_exception","core/com/zoho/crm/api/reschedule_history/success_response"],"interface":true},"core/com/zoho/crm/api/deal_contact_roles/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"String"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"}},"core/com/zoho/crm/api/pipeline/body_wrapper":{"pipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/pipeline","name":"pipeline","type":"List"}},"core/com/zoho/crm/api/scoring_rules/delete_scoring_rules_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/users_transfer_delete/action_handler":{"classes":["core/com/zoho/crm/api/users_transfer_delete/api_exception","core/com/zoho/crm/api/users_transfer_delete/action_wrapper"],"interface":true},"core/com/zoho/crm/api/files/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","VIRUS_DETECTED","FILE_SIZE_MORE_THAN_ALLOWED_SIZE","failure_in_attachment_handling","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/action_response":{"classes":["core/com/zoho/crm/api/fields/api_exception","core/com/zoho/crm/api/fields/success"],"interface":true},"core/com/zoho/crm/api/attachments/response_handler":{"classes":["core/com/zoho/crm/api/attachments/response_wrapper","core/com/zoho/crm/api/attachments/file_body_wrapper","core/com/zoho/crm/api/attachments/api_exception"],"interface":true},"core/com/zoho/crm/api/tags/record_action_handler":{"classes":["core/com/zoho/crm/api/tags/api_exception","core/com/zoho/crm/api/tags/record_action_wrapper"],"interface":true},"core/com/zoho/crm/api/notifications/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/record/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/field_map_dependency/action_response":{"classes":["core/com/zoho/crm/api/field_map_dependency/api_exception","core/com/zoho/crm/api/field_map_dependency/success_response"],"interface":true},"core/com/zoho/crm/api/related_lists/get_related_list_param":{"module":{"name":"module","type":"String","required":true},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/users_territories/transfer_wrapper":{"transferAndDelink":{"structure_name":"core/com/zoho/crm/api/users_territories/transfer_and_delink","name":"transfer_and_delink","type":"List"}},"core/com/zoho/crm/api/mail_merge/action_response":{"classes":["core/com/zoho/crm/api/mail_merge/success_response"],"interface":true},"core/com/zoho/crm/api/from_addresses/api_exception":{"code":{"values":["INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/scoring_rules/field_rule":{"score":{"name":"score","type":"Integer"},"criteria":{"structure_name":"core/com/zoho/crm/api/scoring_rules/criteria","name":"criteria","type":"core/com/zoho/crm/api/scoring_rules/criteria"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/deal_contact_roles/response_handler":{"classes":["core/com/zoho/crm/api/deal_contact_roles/body_wrapper","core/com/zoho/crm/api/deal_contact_roles/api_exception"],"interface":true},"core/com/zoho/crm/api/user_groups/source":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mass_change_owner/body_wrapper":{"cvid":{"name":"cvid","type":"Long"},"owner":{"structure_name":"core/com/zoho/crm/api/mass_change_owner/owner","name":"owner","type":"core/com/zoho/crm/api/mass_change_owner/owner"},"territory":{"structure_name":"core/com/zoho/crm/api/mass_change_owner/territory","name":"territory","type":"core/com/zoho/crm/api/mass_change_owner/territory"}},"core/com/zoho/crm/api/roles/action_handler":{"classes":["core/com/zoho/crm/api/roles/api_exception","core/com/zoho/crm/api/roles/action_wrapper"],"interface":true},"core/com/zoho/crm/api/timelines/get_timelines_param":{"include":{"values":["extension","type"],"name":"include","type":"String"},"perPage":{"values":["100"],"name":"per_page","type":"String"},"sortOrder":{"values":["desc","asc"],"name":"sort_order","type":"String"},"sortBy":{"values":["audited_time"],"name":"sort_by","type":"String"},"filters":{"values":["200"],"name":"filters","type":"String"},"page":{"values":["1"],"name":"page","type":"String"},"pageToken":{"values":["11df637fbecf52dc6721f7cf588f4272d552eda3311af76764d4cda650a7b0e01ffc5cd572030fe293f5ea9d60a3c144869fe7eae4e2ac683c08cf2dda07ed56d3d5f9ce4e351049c24a4363c5771087ad78caa76984c0ca4a1b2264808735ea8035cca85aa72c9142808916935c4744"],"name":"page_token","type":"String"},"includeInnerDetails":{"values":["field_history.data_type","field_history.enable_colour_code","field_history.pick_list_values","field_history.field_label"],"name":"include_inner_details","type":"String"},"includeTimelineType":{"values":["signals"],"name":"include_timeline_type","type":"String"}},"core/com/zoho/crm/api/files/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/territories/deleted_associated_territories":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"},"deletedTime":{"name":"deleted_time","type":"DateTime"},"deletedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"deleted_by","type":"core/com/zoho/crm/api/users/minified_user"}},"core/com/zoho/crm/api/record/file_handler":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/success_response"],"interface":true},"core/com/zoho/crm/api/mass_delete_cvid/get_mass_delete_status_param":{"jobId":{"name":"job_id","type":"Long","required":true}},"core/com/zoho/crm/api/blueprint/field":{"apiName":{"name":"api_name","type":"String"},"webhook":{"name":"webhook","type":"Boolean"},"crypt":{"structure_name":"core/com/zoho/crm/api/blueprint/crypt","name":"crypt","type":"core/com/zoho/crm/api/blueprint/crypt"},"validationRule":{"name":"validation_rule","type":"String"},"tooltip":{"structure_name":"core/com/zoho/crm/api/blueprint/tool_tip","name":"tooltip","type":"core/com/zoho/crm/api/blueprint/tool_tip"},"quickSequenceNumber":{"name":"quick_sequence_number","type":"Long"},"jsonType":{"name":"json_type","type":"String"},"type":{"name":"_type","type":"String"},"layouts":{"structure_name":"core/com/zoho/crm/api/blueprint/layout","name":"layouts","type":"core/com/zoho/crm/api/blueprint/layout"},"mandatory":{"name":"mandatory","type":"Boolean"},"content":{"name":"content","type":"String"},"associationDetails":{"structure_name":"core/com/zoho/crm/api/blueprint/association_details","name":"association_details","type":"core/com/zoho/crm/api/blueprint/association_details"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/fields/pick_list_value","name":"pick_list_values","type":"List"},"fieldLabel":{"name":"field_label","type":"String"},"fieldReadOnly":{"name":"field_read_only","type":"Boolean"},"currency":{"structure_name":"core/com/zoho/crm/api/blueprint/currency","name":"currency","type":"core/com/zoho/crm/api/blueprint/currency"},"id":{"name":"id","type":"String"},"displayLabel":{"name":"display_label","type":"String"},"filterable":{"name":"filterable","type":"Boolean"},"lookup":{"structure_name":"core/com/zoho/crm/api/blueprint/module","name":"lookup","type":"core/com/zoho/crm/api/blueprint/module"},"personalityName":{"name":"personality_name","type":"String"},"visible":{"name":"visible","type":"Boolean"},"dataType":{"name":"data_type","type":"String"},"length":{"name":"length","type":"Integer"},"profiles":{"structure_name":"core/com/zoho/crm/api/blueprint/profile","name":"profiles","type":"List"},"pickListValuesSortedLexically":{"name":"pick_list_values_sorted_lexically","type":"Boolean"},"readOnly":{"name":"read_only","type":"Boolean"},"sortable":{"name":"sortable","type":"Boolean"},"historyTracking":{"name":"history_tracking","type":"Boolean"},"systemMandatory":{"name":"system_mandatory","type":"Boolean"},"autoNumber":{"structure_name":"core/com/zoho/crm/api/blueprint/auto_number","name":"auto_number","type":"core/com/zoho/crm/api/blueprint/auto_number"},"private1":{"structure_name":"core/com/zoho/crm/api/fields/private","name":"private","type":"core/com/zoho/crm/api/fields/private"},"customField":{"name":"custom_field","type":"Boolean"},"convertMapping":{"structure_name":"core/com/zoho/crm/api/blueprint/convert_mapping","name":"convert_mapping","type":"core/com/zoho/crm/api/blueprint/convert_mapping"},"decimalPlace":{"name":"decimal_place","type":"String"},"createdSource":{"name":"created_source","type":"String"},"multiModuleLookup":{"structure_name":"core/com/zoho/crm/api/fields/multi_module_lookup","name":"multi_module_lookup","type":"core/com/zoho/crm/api/fields/multi_module_lookup"},"external":{"structure_name":"core/com/zoho/crm/api/fields/external","name":"external","type":"core/com/zoho/crm/api/fields/external"},"displayType":{"values":[-1,2],"name":"display_type","type":"utils/util/choice"},"transitionSequence":{"name":"transition_sequence","type":"Integer"},"unique":{"structure_name":"core/com/zoho/crm/api/fields/unique","name":"unique","type":"core/com/zoho/crm/api/fields/unique"},"uiType":{"name":"ui_type","type":"Integer"},"viewType":{"structure_name":"core/com/zoho/crm/api/blueprint/view_type","name":"view_type","type":"core/com/zoho/crm/api/blueprint/view_type"},"formula":{"structure_name":"core/com/zoho/crm/api/blueprint/formula","name":"formula","type":"core/com/zoho/crm/api/blueprint/formula"},"multiselectlookup":{"structure_name":"core/com/zoho/crm/api/blueprint/multi_select_lookup","name":"multiselectlookup","type":"core/com/zoho/crm/api/blueprint/multi_select_lookup"},"columnName":{"name":"column_name","type":"String"}},"core/com/zoho/crm/api/portals/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/timelines/timeline":{"fieldHistory":{"structure_name":"core/com/zoho/crm/api/timelines/field_history","name":"field_history","type":"List"},"extension":{"name":"extension","type":"String"},"auditedTime":{"name":"audited_time","type":"DateTime"},"record":{"structure_name":"core/com/zoho/crm/api/timelines/record","name":"record","type":"core/com/zoho/crm/api/timelines/record"},"action":{"name":"action","type":"String"},"id":{"name":"id","type":"Long"},"source":{"name":"source","type":"String"},"type":{"name":"type","type":"String"},"doneBy":{"structure_name":"core/com/zoho/crm/api/timelines/name_id_structure","name":"done_by","type":"core/com/zoho/crm/api/timelines/name_id_structure"},"relatedRecord":{"structure_name":"core/com/zoho/crm/api/timelines/related_record","name":"related_record","type":"core/com/zoho/crm/api/timelines/related_record"},"automationDetails":{"structure_name":"core/com/zoho/crm/api/timelines/automation_detail","name":"automation_details","type":"core/com/zoho/crm/api/timelines/automation_detail"}},"core/com/zoho/crm/api/notifications/event":{"resourceId":{"name":"resource_id","type":"Long"},"resourceName":{"name":"resource_name","type":"String"},"resourceUri":{"name":"resource_uri","type":"String"},"channelExpiry":{"name":"channel_expiry","type":"DateTime"},"channelId":{"name":"channel_id","type":"String"}},"core/com/zoho/crm/api/tags/existing_tag":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/territories/api_exception":{"code":{"values":["DUPLICATE_DATA","INVALID_DATA","NOT_ALLOWED","INTERNAL_SERVER_ERROR","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"supported_values","type":"List"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/territories/delete_territories_param":{"ids":{"name":"ids","type":"Long"},"deletePreviousForecasts":{"name":"delete_previous_forecasts","type":"Boolean"}},"core/com/zoho/crm/api/fields/show_fields":{"showData":{"name":"show_data","type":"Boolean"},"field":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"field","type":"core/com/zoho/crm/api/fields/minified_field"}},"core/com/zoho/crm/api/roles/body_wrapper":{"roles":{"structure_name":"core/com/zoho/crm/api/roles/role","name":"roles","type":"List"}},"core/com/zoho/crm/api/download_attachments/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/entity_scores/entity_structure_group":{"classes":["core/com/zoho/crm/api/entity_scores/entity_structure_with_module","core/com/zoho/crm/api/entity_scores/entity_structure"],"interface":true},"core/com/zoho/crm/api/hipaa_compliance/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/send_mail/invalid_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/entity_scores/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"String"},"sortBy":{"name":"sort_by","type":"String"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"}},"core/com/zoho/crm/api/users/body_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/users/users","name":"users","type":"List"}},"core/com/zoho/crm/api/holidays/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["Holidays created successfully","Holidays updated successfully","Holidays deleted successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/tags/update_tag_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/isc_signature/signature":{"iscSignature":{"name":"isc_signature","type":"Object"}},"core/com/zoho/crm/api/territory_users/body_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/users/users","name":"users","type":"List"}},"core/com/zoho/crm/api/associate_email/attachments":{"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/custom_views/action_wrapper":{"customViews":{"structure_name":"core/com/zoho/crm/api/custom_views/action_response","name":"custom_views","type":"List"}},"core/com/zoho/crm/api/users_territories/validation":{"records":{"name":"records","type":"Boolean"},"name":{"name":"Name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/appointment_preference/body_wrapper":{"appointmentPreferences":{"structure_name":"core/com/zoho/crm/api/appointment_preference/appointment_preference","name":"appointment_preferences","type":"core/com/zoho/crm/api/appointment_preference/appointment_preference"}},"core/com/zoho/crm/api/change_owner/body_wrapper":{"owner":{"structure_name":"core/com/zoho/crm/api/change_owner/owner","name":"owner","type":"core/com/zoho/crm/api/change_owner/owner"},"relatedModules":{"structure_name":"core/com/zoho/crm/api/change_owner/related_modules","name":"related_modules","type":"List"},"notify":{"name":"notify","type":"Boolean"}},"core/com/zoho/crm/api/bulk_write/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/definition/definition":{"rootElementName":{"name":"root_element_name","type":"String"},"extradetails":{"name":"extraDetails","type":"Map"},"properties":{"structure_name":"core/com/zoho/crm/api/definition/property","name":"properties","type":"List"}},"core/com/zoho/crm/api/mail_merge/signers":{"actionType":{"values":["sign","approve"],"name":"action_type","type":"utils/util/choice"},"recipient":{"structure_name":"core/com/zoho/crm/api/mail_merge/address","name":"recipient","type":"core/com/zoho/crm/api/mail_merge/address"},"recipientName":{"name":"recipient_name","type":"String"}},"core/com/zoho/crm/api/territory_users/action_handler":{"classes":["core/com/zoho/crm/api/territory_users/api_exception","core/com/zoho/crm/api/territory_users/action_wrapper"],"interface":true},"core/com/zoho/crm/api/mail_merge/mail_merge":{"bccEmail":{"structure_name":"core/com/zoho/crm/api/mail_merge/address","name":"bcc_email","type":"List"},"ccEmail":{"structure_name":"core/com/zoho/crm/api/mail_merge/address","name":"cc_email","type":"List"},"subject":{"name":"subject","type":"String"},"fromAddress":{"structure_name":"core/com/zoho/crm/api/mail_merge/address","name":"from_address","type":"core/com/zoho/crm/api/mail_merge/address"},"attachmentName":{"name":"attachment_name","type":"String"},"mailMergeTemplate":{"structure_name":"core/com/zoho/crm/api/mail_merge/mail_merge_template","name":"mail_merge_template","type":"core/com/zoho/crm/api/mail_merge/mail_merge_template"},"message":{"name":"message","type":"String"},"type":{"values":["inline","attachment"],"name":"type","type":"utils/util/choice"},"toAddress":{"structure_name":"core/com/zoho/crm/api/mail_merge/address","name":"to_address","type":"List"}},"core/com/zoho/crm/api/record/search_records_param":{"cvid":{"name":"cvid","type":"String"},"approved":{"name":"approved","type":"String"},"perPage":{"name":"per_page","type":"Integer"},"phone":{"name":"phone","type":"String"},"converted":{"name":"converted","type":"String"},"criteria":{"name":"criteria","type":"String"},"page":{"name":"page","type":"Integer"},"fields":{"name":"fields","type":"String"},"word":{"name":"word","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/assignment_rules/response_handler":{"classes":["core/com/zoho/crm/api/assignment_rules/api_exception","core/com/zoho/crm/api/assignment_rules/response_wrapper"],"interface":true},"core/com/zoho/crm/api/mail_merge/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","INVALID_DATA"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"supported_values","type":"List"},{"name":"regex","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/user_groups/action_wrapper":{"userGroups":{"structure_name":"core/com/zoho/crm/api/user_groups/action_response","name":"user_groups","type":"List"}},"core/com/zoho/crm/api/change_owner/owner":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mail_merge/sign_action_response":{"classes":["core/com/zoho/crm/api/mail_merge/success_response"],"interface":true},"core/com/zoho/crm/api/email_compose_meta/data":{"data":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/data_map","name":"data","type":"List"}},"core/com/zoho/crm/api/contact_roles/action_wrapper":{"contactRoles":{"structure_name":"core/com/zoho/crm/api/contact_roles/action_response","name":"contact_roles","type":"List"}},"core/com/zoho/crm/api/user_type_users/api_exception":{"code":{"values":["INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/send_mail/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"message_id","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/share_records/action_wrapper":{"share":{"structure_name":"core/com/zoho/crm/api/share_records/action_response","name":"share","type":"List"}},"core/com/zoho/crm/api/users/users":{"country":{"name":"country","type":"String"},"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy17":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"decimalSeparator":{"values":["Comma","Period"],"name":"decimal_separator","type":"utils/util/choice"},"dateFormat":{"values":["MMM d, yyyy"],"name":"date_format","type":"utils/util/choice"},"numberSeparator":{"values":["Space"],"name":"number_separator","type":"utils/util/choice"},"language":{"name":"language","type":"String"},"rtlEnabled":{"name":"rtl_enabled","type":"Boolean"},"telephonyEnabled":{"name":"telephony_enabled","type":"Boolean"},"microsoft":{"name":"microsoft","type":"Boolean"},"sandboxdeveloper":{"name":"sandboxDeveloper","type":"Boolean"},"isonline":{"name":"Isonline","type":"Boolean"},"nextShift":{"structure_name":"core/com/zoho/crm/api/users/shift","name":"$next_shift","type":"core/com/zoho/crm/api/users/shift"},"ntcNotificationType":{"name":"ntc_notification_type","type":"List"},"createdTime":{"name":"created_time","type":"DateTime"},"id":{"name":"id","type":"Long"},"state":{"name":"state","type":"String"},"personalAccount":{"name":"personal_account","type":"Boolean"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"},"fax":{"name":"fax","type":"String"},"reportingTo":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Reporting_To","type":"core/com/zoho/crm/api/users/minified_user"},"zip":{"name":"zip","type":"String"},"offset":{"name":"offset","type":"Integer"},"imapStatus":{"name":"imap_status","type":"Boolean"},"profile":{"structure_name":"core/com/zoho/crm/api/users/profile","name":"profile","type":"core/com/zoho/crm/api/users/profile"},"sortOrderPreference":{"name":"sort_order_preference","type":"String"},"timeZone":{"name":"time_zone","type":"TimeZone"},"customizeInfo":{"structure_name":"core/com/zoho/crm/api/users/customize_info","name":"customize_info","type":"core/com/zoho/crm/api/users/customize_info"},"zuid":{"name":"zuid","type":"String"},"firstName":{"regex":"[A-Za-z0-9]","name":"first_name","max-length":50,"type":"String"},"ezuid":{"name":"ezuid","type":"String"},"phone":{"name":"phone","type":"String"},"dob":{"name":"dob","type":"Date"},"name":{"name":"name","type":"String"},"status":{"name":"status","type":"String"},"lastName":{"regex":"[A-Za-z0-9]","name":"last_name","max-length":50,"type":"String"},"createdTime9":{"name":"Created_Time","type":"DateTime"},"role":{"structure_name":"core/com/zoho/crm/api/users/role","name":"role","type":"core/com/zoho/crm/api/users/role"},"city":{"name":"city","type":"String"},"signature":{"name":"signature","type":"String"},"ntcEnabled":{"name":"ntc_enabled","type":"Boolean"},"countryLocale":{"name":"country_locale","type":"String"},"locale":{"name":"locale","type":"String"},"imageLink":{"name":"image_link","type":"String"},"currentShift":{"structure_name":"core/com/zoho/crm/api/users/shift","name":"$current_shift","type":"core/com/zoho/crm/api/users/shift"},"street":{"name":"street","type":"String"},"sortOrderPreferenceS":{"name":"sort_order_preference__s","type":"String"},"alias":{"name":"alias","type":"String"},"currency":{"name":"Currency","type":"String"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"theme":{"structure_name":"core/com/zoho/crm/api/users/theme","name":"theme","type":"core/com/zoho/crm/api/users/theme"},"nameFormatS":{"values":["Salutation,First Name,Last Name","Saluation,Last Name,First Name","First Name,Last Name,Saluation"],"name":"name_format__s","type":"utils/util/choice"},"email":{"regex":"[a-z0-9]{9}[@][a-z0-9]{5}[.]com","name":"email","type":"String"},"statusReasonS":{"name":"status_reason__s","type":"String"},"website":{"regex":"[a-z0-9]{5}[.]com","name":"website","type":"String"},"mobile":{"name":"mobile","type":"String"},"fullName":{"name":"full_name","type":"String"},"confirm":{"name":"confirm","type":"Boolean"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"timeFormat":{"values":["HH:mm","hh:mm a"],"name":"time_format","type":"utils/util/choice"},"shiftEffectiveFrom":{"name":"$shift_effective_from","type":"Object"},"category":{"name":"category","type":"String"},"defaultTabGroup":{"name":"default_tab_group","type":"String"}},"core/com/zoho/crm/api/related_records/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"External_Deal_ID","type":"String"}],"name":"details","type":"Map"},"message":{"values":["relation added","relation removed"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_read/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/bulk_read/job_detail","name":"data","type":"List"}},"core/com/zoho/crm/api/record/record_count_param":{"phone":{"name":"phone","type":"String"},"criteria":{"name":"criteria","type":"String"},"word":{"name":"word","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/modules/response_wrapper":{"modules":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"modules","type":"List"}},"core/com/zoho/crm/api/wizards/wizard":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"module":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"module","type":"core/com/zoho/crm/api/modules/modules"},"profiles":{"structure_name":"core/com/zoho/crm/api/profiles/profile","name":"profiles","type":"List"},"active":{"name":"active","type":"Boolean"},"parentWizard":{"structure_name":"core/com/zoho/crm/api/wizards/wizard","name":"parent_wizard","type":"core/com/zoho/crm/api/wizards/wizard"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"exemptedPortalUserTypes":{"structure_name":"core/com/zoho/crm/api/wizards/exempted_portal_user_type","name":"exempted_portal_user_types","type":"List"},"draft":{"name":"draft","type":"Boolean"},"portalUserTypes":{"structure_name":"core/com/zoho/crm/api/wizards/portal_user_type","name":"portal_user_types","type":"List"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"containers":{"structure_name":"core/com/zoho/crm/api/wizards/container","name":"containers","type":"List"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/reschedule_history/appointment_name":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/email_related_records/response_wrapper":{"emails":{"structure_name":"core/com/zoho/crm/api/email_related_records/email","name":"Emails","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/email_related_records/info","name":"info","type":"core/com/zoho/crm/api/email_related_records/info"}},"core/com/zoho/crm/api/user_groups/success_response":{"code":{"values":["SUCCESS","SCHEDULED"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mail_merge/sign_mail_merge":{"signers":{"structure_name":"core/com/zoho/crm/api/mail_merge/signers","name":"signers","type":"List"},"fileName":{"name":"file_name","max-length":255,"type":"String"},"mailMergeTemplate":{"structure_name":"core/com/zoho/crm/api/mail_merge/mail_merge_template","name":"mail_merge_template","type":"core/com/zoho/crm/api/mail_merge/mail_merge_template"},"signInOrder":{"name":"sign_in_order","type":"Boolean"}},"core/com/zoho/crm/api/associate_email/available":{"linkedRecord":{"structure_name":"core/com/zoho/crm/api/associate_email/linked_record","name":"linked_record","type":"core/com/zoho/crm/api/associate_email/linked_record"},"record":{"structure_name":"core/com/zoho/crm/api/associate_email/record","name":"record","type":"core/com/zoho/crm/api/associate_email/record"},"available":{"name":"available","type":"Boolean"}},"core/com/zoho/crm/api/variables/action_response":{"classes":["core/com/zoho/crm/api/variables/api_exception","core/com/zoho/crm/api/variables/success_response"],"interface":true},"core/com/zoho/crm/api/territories/action_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/territories/action_response","name":"territories","type":"List"}},"core/com/zoho/crm/api/tags/remove_tags_from_multiple_records_param":{"ids":{"name":"ids","type":"String","required":true}},"core/com/zoho/crm/api/hipaa_compliance/action_handler":{"classes":["core/com/zoho/crm/api/hipaa_compliance/api_exception","core/com/zoho/crm/api/hipaa_compliance/success_response"],"interface":true},"core/com/zoho/crm/api/tags/record_success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"structure_name":"core/com/zoho/crm/api/tags/record_detail_tag","name":"tags","type":"List"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/territories/deleted_associated_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/territories/deleted_associated_territories","name":"territories","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/territories/info","name":"info","type":"core/com/zoho/crm/api/territories/info"}},"core/com/zoho/crm/api/pipeline/response_handler":{"classes":["core/com/zoho/crm/api/pipeline/body_wrapper","core/com/zoho/crm/api/pipeline/api_exception"],"interface":true},"core/com/zoho/crm/api/notifications/api_exception":{"code":{"values":["NOT_SUBSCRIBED","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portals_meta/layouts":{"displayLabel":{"name":"display_label","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mass_delete_cvid/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/mass_delete_cvid/status","name":"data","type":"List"}},"core/com/zoho/crm/api/wizards/button_background":{"buttonBackground":{"name":"button_background","type":"List"}},"core/com/zoho/crm/api/users/theme":{"newBackground":{"name":"new_background","type":"String"},"normalTab":{"structure_name":"core/com/zoho/crm/api/users/tab","name":"normal_tab","type":"core/com/zoho/crm/api/users/tab"},"background":{"values":["#F3F0EB"],"name":"background","type":"utils/util/choice"},"screen":{"values":["fixed"],"name":"screen","type":"utils/util/choice"},"type":{"name":"type","type":"String"},"selectedTab":{"structure_name":"core/com/zoho/crm/api/users/tab","name":"selected_tab","type":"core/com/zoho/crm/api/users/tab"}},"core/com/zoho/crm/api/pipeline/action_response":{"classes":["core/com/zoho/crm/api/pipeline/api_exception","core/com/zoho/crm/api/pipeline/success_response"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/create_map_dependency_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/fiscal_year/action_handler":{"classes":["core/com/zoho/crm/api/fiscal_year/api_exception","core/com/zoho/crm/api/fiscal_year/action_wrapper"],"interface":true},"core/com/zoho/crm/api/definition/property":{"displayLabel":{"name":"display_label","type":"String"},"allowedValues":{"name":"allowed_values","type":"List"},"regex":{"name":"regex","type":"String"},"apiName":{"name":"api_name","type":"String"},"fieldLabel":{"name":"field_label","type":"String"},"dataType":{"name":"data_type","type":"String"},"uiType":{"name":"ui_type","type":"Integer"},"length":{"name":"length","type":"Integer"},"readOnly":{"name":"read_only","type":"Boolean"},"availableInUserLayout":{"name":"available_in_user_layout","type":"Boolean"},"required":{"name":"required","type":"Boolean"},"properties":{"structure_name":"core/com/zoho/crm/api/definition/minified_property","name":"properties","type":"List"}},"core/com/zoho/crm/api/users_transfer_delete/response_handler":{"classes":["core/com/zoho/crm/api/users_transfer_delete/response_wrapper","core/com/zoho/crm/api/users_transfer_delete/api_exception"],"interface":true},"core/com/zoho/crm/api/share_records/api_exception":{"code":{"values":["BAD_REQUEST","INVALID_MODULE","SHARE_LIMIT_EXCEEDED","OAUTH_SCOPE_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","DUPLICATE_DATA","LIMIT_EXCEEDED","MANDATORY_NOT_FOUND","INVALID_DATA","ENTITY_ID_INVALID","NO_PERMISSION","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"permissions","type":"List"},{"structure_name":"core/com/zoho/crm/api/share_records/dependee","name":"dependee","type":"core/com/zoho/crm/api/share_records/dependee"},{"structure_name":"core/com/zoho/crm/api/share_records/dependee","name":"ambiguity_due_to","type":"List"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["Scheduler is running","cannot share to the user","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","record not deleted","the related id given seems to be invalid","The relation name given seems to be invalid.","invalid oauth scope to access this URL","Please check if the URL trying to access is a correct one.","Permission is invalid","record is already visible to the user.","Cannot share a record to more than 10 users.","No sharing through this record is available to revoke.","ENTITY_ID_INVALID"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/send_mail/data_subject_request":{"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/scoring_rules/criteria":{"comparator":{"name":"comparator","type":"String"},"groupOperator":{"name":"group_operator","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/scoring_rules/field","name":"field","type":"core/com/zoho/crm/api/scoring_rules/field"},"value":{"name":"value","type":"Object"},"group":{"structure_name":"core/com/zoho/crm/api/scoring_rules/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/shift_hours/break_hours":{"sameAsEveryday":{"name":"same_as_everyday","type":"Boolean"},"id":{"name":"id","type":"Long"},"dailyTiming":{"name":"daily_timing","type":"List"},"breakDays":{"name":"break_days","type":"List"},"customTiming":{"structure_name":"core/com/zoho/crm/api/shift_hours/break_custom_timing","name":"custom_timing","type":"List"}},"core/com/zoho/crm/api/related_records/get_related_records_using_external_id_param":{"perPage":{"name":"per_page","type":"Integer"},"page":{"name":"page","type":"Integer"},"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/email_templates/get_email_templates_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/record/territory":{"assignedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"$assigned_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"Name","type":"String"},"assigned":{"name":"$assigned","type":"String"},"id":{"name":"id","type":"Long"},"assignedTime":{"name":"$assigned_time","type":"DateTime"}},"core/com/zoho/crm/api/privacy_preference/tpt":{"name":{"name":"name","type":"String"},"issupported":{"name":"isSupported","type":"String"},"isenabled":{"name":"isEnabled","type":"String"}},"core/com/zoho/crm/api/shift_hours/action_handler":{"classes":["core/com/zoho/crm/api/shift_hours/api_exception","core/com/zoho/crm/api/shift_hours/action_wrapper"],"interface":true},"core/com/zoho/crm/api/shift_hours/holidays":{"date":{"name":"date","type":"Date"},"year":{"name":"year","type":"Integer"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/wizards/actions":{"exemptedProfiles":{"structure_name":"core/com/zoho/crm/api/profiles/profile","name":"exempted_profiles","type":"List"},"segment":{"structure_name":"core/com/zoho/crm/api/wizards/segment","name":"segment","type":"core/com/zoho/crm/api/wizards/segment"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"fields":{"structure_name":"core/com/zoho/crm/api/fields/fields","name":"fields","type":"core/com/zoho/crm/api/fields/fields"},"value":{"name":"value","type":"Object"}},"core/com/zoho/crm/api/blueprint/module":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"module":{"name":"module","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/email_compose_meta/default_form":{"default1":{"name":"default","type":"Boolean"},"userName":{"name":"user_name","type":"String"},"type":{"name":"type","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/org/response_wrapper":{"org":{"structure_name":"core/com/zoho/crm/api/org/org","name":"org","type":"List"}},"core/com/zoho/crm/api/business_hours/action_handler":{"classes":["core/com/zoho/crm/api/business_hours/api_exception","core/com/zoho/crm/api/business_hours/action_wrapper"],"interface":true},"core/com/zoho/crm/api/modules/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/custom_views/shared_to":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"values":["users","roles","groups","territories"],"name":"type","type":"utils/util/choice"},"subordinates":{"name":"subordinates","type":"Boolean"}},"core/com/zoho/crm/api/related_records/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/record/info","name":"info","type":"core/com/zoho/crm/api/record/info"}},"core/com/zoho/crm/api/related_records/delete_related_record_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/record/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/record/info","name":"info","type":"core/com/zoho/crm/api/record/info"}},"core/com/zoho/crm/api/record/get_deleted_records_param":{"perPage":{"name":"per_page","type":"Integer"},"page":{"name":"page","type":"Integer"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/modules/minified_module":{"apiName":{"name":"api_name","type":"String"},"module":{"name":"module","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/profiles/default_view":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/profiles/minified_profile":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"delete1":{"name":"_delete","type":"Boolean"}},"core/com/zoho/crm/api/backup/urls_wrapper":{"urls":{"structure_name":"core/com/zoho/crm/api/backup/urls","name":"urls","type":"core/com/zoho/crm/api/backup/urls"}},"core/com/zoho/crm/api/portal_user_type/user_type":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"personalityModule":{"structure_name":"core/com/zoho/crm/api/portal_user_type/personality_module","name":"personality_module","type":"core/com/zoho/crm/api/portal_user_type/personality_module"},"createdBy":{"structure_name":"core/com/zoho/crm/api/portal_user_type/owner","name":"created_by","type":"core/com/zoho/crm/api/portal_user_type/owner"},"default1":{"name":"default","type":"Boolean"},"name":{"name":"name","type":"String"},"noOfUsers":{"name":"no_of_users","type":"Integer"},"createdTime":{"name":"created_time","type":"DateTime"},"active":{"name":"active","type":"Boolean"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/portal_user_type/owner","name":"modified_by","type":"core/com/zoho/crm/api/portal_user_type/owner"},"id":{"name":"id","type":"Long"},"modules":{"structure_name":"core/com/zoho/crm/api/portal_user_type/modules","name":"modules","type":"List"}},"core/com/zoho/crm/api/associate_email/module_map":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/custom_views/pin_fields":{"apiName":{"name":"api_name","type":"String"},"pin":{"values":[false],"name":"_pin","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/currency":{"roundingOption":{"values":["normal","round_off","round_up","round_down"],"name":"rounding_option","type":"utils/util/choice"},"precision":{"name":"precision","type":"Integer"}},"core/com/zoho/crm/api/notes/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","NO_PERMISSION","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INTERNAL_ERROR","NOT_SUPPORTED","REQUIRED_PARAM_MISSING","INTERNAL_SERVER_ERROR","INVALID_MODULE","BAD_REQUEST","OAUTH_SCOPE_MISMATCH","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"String"},{"name":"api_name","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"permissions","type":"List"},{"name":"param","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"param_name","type":"String"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["record not deleted","required field not found","invalid data","One of the expected parameter is missing","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","the id given seems to be invalid","One of the expected parameter is missing","Internal server error occurred.","the module name given seems to be invalid"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fiscal_year/action_response":{"classes":["core/com/zoho/crm/api/fiscal_year/api_exception","core/com/zoho/crm/api/fiscal_year/success_response"],"interface":true},"core/com/zoho/crm/api/user_groups/response_wrapper":{"userGroups":{"structure_name":"core/com/zoho/crm/api/user_groups/groups","name":"user_groups","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/user_groups/info","name":"info","type":"core/com/zoho/crm/api/user_groups/info"}},"core/com/zoho/crm/api/related_records/delete_related_records_using_external_id_param":{"ids":{"name":"ids","type":"String","required":true}},"core/com/zoho/crm/api/related_records/delink_record_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/share_records/delete_action_response":{"classes":["core/com/zoho/crm/api/share_records/success_response","core/com/zoho/crm/api/share_records/api_exception"],"interface":true},"core/com/zoho/crm/api/attachments/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/attachments/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/notifications/response_wrapper":{"watch":{"structure_name":"core/com/zoho/crm/api/notifications/notification","name":"watch","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/notifications/info","name":"info","type":"core/com/zoho/crm/api/notifications/info"}},"core/com/zoho/crm/api/mail_merge/address_value_map":{"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/modules/modules":{"relatedListProperties":{"structure_name":"core/com/zoho/crm/api/modules/related_list_properties","name":"related_list_properties","type":"core/com/zoho/crm/api/modules/related_list_properties"},"modifiedTime":{"name":"modified_time","type":"DateTime"},"apiName":{"name":"api_name","type":"String"},"trackCurrentData":{"name":"track_current_data","type":"Boolean"},"webLink":{"name":"web_link","type":"String"},"businessCardFields":{"name":"business_card_fields","type":"List"},"moduleName":{"name":"module_name","type":"String"},"relatedLists":{"structure_name":"core/com/zoho/crm/api/related_lists/related_list","name":"related_lists","type":"List"},"defaultMappingFields":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"default_mapping_fields","type":"List"},"feedsRequired":{"name":"feeds_required","type":"Boolean"},"customView":{"structure_name":"core/com/zoho/crm/api/custom_views/custom_view","name":"custom_view","type":"core/com/zoho/crm/api/custom_views/custom_view"},"layouts":{"structure_name":"core/com/zoho/crm/api/layouts/layouts","name":"layouts","type":"List"},"webformSupported":{"name":"webform_supported","type":"Boolean"},"id":{"name":"id","type":"Long"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"globalSearchSupported":{"name":"global_search_supported","type":"Boolean"},"visible":{"name":"visible","type":"Boolean"},"visibility":{"name":"visibility","type":"Integer"},"profiles":{"structure_name":"core/com/zoho/crm/api/profiles/minified_profile","name":"profiles","type":"List"},"filterStatus":{"name":"filter_status","type":"Boolean"},"pluralLabel":{"name":"plural_label","type":"String"},"businessCardFieldLimit":{"name":"business_card_field_limit","type":"Integer"},"onDemandProperties":{"name":"$on_demand_properties","type":"List"},"viewable":{"name":"viewable","type":"Boolean"},"perPage":{"name":"per_page","type":"Integer"},"ziaView":{"name":"zia_view","type":"Boolean"},"displayField":{"name":"display_field","type":"String"},"triggersSupported":{"name":"triggers_supported","type":"Boolean"},"fields":{"structure_name":"core/com/zoho/crm/api/modules/module_fields","name":"fields","type":"List"},"kanbanView":{"name":"kanban_view","type":"Boolean"},"searchLayoutFields":{"name":"search_layout_fields","type":"List"},"status":{"name":"status","type":"String"},"fieldStates":{"name":"$field_states","type":"List"},"generatedType":{"values":["default","web","custom","linking"],"name":"generated_type","type":"utils/util/choice"},"emailParserSupported":{"name":"email_parser_supported","type":"Boolean"},"arguments32":{"structure_name":"core/com/zoho/crm/api/modules/argument","name":"arguments","type":"List"},"deletable":{"name":"deletable","type":"Boolean"},"activityBadge":{"values":["Enabled","Disabled"],"name":"activity_badge","type":"utils/util/choice"},"description":{"name":"description","max-length":255,"type":"String"},"scoringSupported":{"name":"scoring_supported","type":"Boolean"},"filterSupported":{"name":"filter_supported","type":"Boolean"},"creatable":{"name":"creatable","type":"Boolean"},"kanbanViewSupported":{"name":"kanban_view_supported","type":"Boolean"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"showAsTab":{"name":"show_as_tab","type":"Boolean"},"isblueprintsupported":{"name":"isBlueprintSupported","type":"Boolean"},"lookupFieldProperties":{"structure_name":"core/com/zoho/crm/api/modules/lookup_field_properties","name":"lookup_field_properties","type":"core/com/zoho/crm/api/modules/lookup_field_properties"},"convertable":{"name":"convertable","type":"Boolean"},"editable":{"name":"editable","type":"Boolean"},"quickCreate":{"name":"quick_create","type":"Boolean"},"presenceSubMenu":{"name":"presence_sub_menu","type":"Boolean"},"singularLabel":{"name":"singular_label","type":"String"},"parentModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"parent_module","type":"core/com/zoho/crm/api/modules/minified_module"},"apiSupported":{"name":"api_supported","type":"Boolean"},"subMenuAvailable":{"name":"sub_menu_available","type":"Boolean"},"arguments1":{"structure_name":"core/com/zoho/crm/api/modules/argument","name":"arguments","type":"List"},"emailtemplateSupport":{"name":"emailTemplate_support","type":"Boolean"},"inventoryTemplateSupported":{"name":"inventory_template_supported","type":"Boolean"},"properties":{"name":"$properties","type":"List"},"territory":{"structure_name":"core/com/zoho/crm/api/modules/territory","name":"territory","type":"core/com/zoho/crm/api/modules/territory"}},"core/com/zoho/crm/api/record/delete_records_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/territories/delete_territory_param":{"deletePreviousForecasts":{"name":"delete_previous_forecasts","type":"Boolean"}},"core/com/zoho/crm/api/users_territories/manager":{"name":{"name":"Name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/business_hours/response_wrapper":{"businessHours":{"structure_name":"core/com/zoho/crm/api/business_hours/business_hours","name":"business_hours","type":"core/com/zoho/crm/api/business_hours/business_hours"}},"core/com/zoho/crm/api/download_inline_images/response_handler":{"classes":["core/com/zoho/crm/api/download_inline_images/file_body_wrapper","core/com/zoho/crm/api/download_inline_images/api_exception"],"interface":true},"core/com/zoho/crm/api/email_sharing/response_handler":{"classes":["core/com/zoho/crm/api/email_sharing/api_exception","core/com/zoho/crm/api/email_sharing/response_wrapper"],"interface":true},"core/com/zoho/crm/api/taxes/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"name","type":"String"},{"name":"value","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["tax added","tax updated"," tax deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/modules/action_wrapper":{"modules":{"structure_name":"core/com/zoho/crm/api/modules/action_response","name":"modules","type":"List"}},"core/com/zoho/crm/api/privacy_preference/option":{"suboptions":{"name":"suboptions","type":"List"},"name":{"name":"name","type":"String"},"tooltip":{"name":"tooltip","type":"String"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/users_transfer_delete/move_subordinate":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/email_sharing/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","the request does not contain any file","invalid file type"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/view_type":{"view":{"name":"view","type":"Boolean"},"edit":{"name":"edit","type":"Boolean"},"quickCreate":{"name":"quick_create","type":"Boolean"},"create":{"name":"create","type":"Boolean"}},"core/com/zoho/crm/api/attachments/upload_url_attachments_param":{"attachmentUrl":{"name":"attachmentUrl","type":"String","required":true},"title":{"name":"title","type":"String"}},"core/com/zoho/crm/api/field_map_dependency/action_wrapper":{"mapDependency":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/action_response","name":"map_dependency","type":"List"}},"core/com/zoho/crm/api/holidays/delete_holiday_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/email_related_records/module":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/business_hours/create_business_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/portals/response_wrapper":{"portals":{"structure_name":"core/com/zoho/crm/api/portals/portals","name":"portals","type":"List"}},"core/com/zoho/crm/api/backup/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/notes/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/notes/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/org/api_exception":{"code":{"values":["INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/field_attachments/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/profiles/delete_profile_param":{"transferTo":{"name":"transfer_to","type":"Long","required":true}},"core/com/zoho/crm/api/modules/module_field_lookup":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"queryDetails":{"structure_name":"core/com/zoho/crm/api/fields/query_details","name":"query_details","type":"core/com/zoho/crm/api/fields/query_details"},"id":{"name":"id","type":"Long"},"showFields":{"structure_name":"core/com/zoho/crm/api/fields/show_fields","name":"show_fields","type":"List"},"revalidateFilterDuringEdit":{"name":"revalidate_filter_during_edit","type":"Boolean"}},"core/com/zoho/crm/api/holidays/response_wrapper":{"holidays":{"structure_name":"core/com/zoho/crm/api/holidays/holiday","name":"holidays","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/holidays/info","name":"info","type":"core/com/zoho/crm/api/holidays/info"}},"core/com/zoho/crm/api/reschedule_history/get_appointment_rescheduled_history_param":{"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/mass_convert/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/mass_convert/status","name":"data","type":"List"}},"core/com/zoho/crm/api/users/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/download_attachments/response_handler":{"classes":["core/com/zoho/crm/api/download_attachments/file_body_wrapper","core/com/zoho/crm/api/download_attachments/api_exception"],"interface":true},"core/com/zoho/crm/api/layouts/actions_allowed":{"edit":{"name":"edit","type":"Boolean"},"rename":{"name":"rename","type":"Boolean"},"clone":{"name":"clone","type":"Boolean"},"downgrade":{"name":"downgrade","type":"Boolean"},"delete1":{"name":"delete","type":"Boolean"},"setLayoutPermissions":{"name":"set_layout_permissions","type":"Boolean"},"deactivate":{"name":"deactivate","type":"Boolean"}},"core/com/zoho/crm/api/definition/minified_property1":{"apiName":{"name":"api_name","type":"String"},"dataType":{"name":"data_type","type":"String"},"length":{"name":"length","type":"Integer"},"readOnly":{"name":"read_only","type":"Boolean"},"required":{"name":"required","type":"Boolean"}},"core/com/zoho/crm/api/fields/tooltip":{"name":{"values":["Info Icon"],"name":"name","type":"utils/util/choice"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/appointment_preference/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/count_handler":{"classes":["core/com/zoho/crm/api/record/count_wrapper","core/com/zoho/crm/api/record/api_exception"],"interface":true},"core/com/zoho/crm/api/email_templates/response_wrapper":{"emailTemplates":{"structure_name":"core/com/zoho/crm/api/email_templates/email_template","name":"email_templates","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/email_templates/info","name":"info","type":"core/com/zoho/crm/api/email_templates/info"}},"core/com/zoho/crm/api/shift_hours/users":{"role":{"structure_name":"core/com/zoho/crm/api/shift_hours/role","name":"role","type":"core/com/zoho/crm/api/shift_hours/role"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"effectiveFrom":{"name":"effective_from","type":"Date"},"email":{"name":"email","type":"String"},"zuid":{"name":"zuid","type":"String"}},"core/com/zoho/crm/api/inventory_templates/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/associate_email/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","INVALID_MODULE","REQUIRED_PARAM_MISSING","DUPLICATE_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"regex","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/roles/api_exception":{"code":{"values":["INVALID_MODULE","REQUIRED_PARAM_MISSING","MANDATORY_NOT_FOUND","PATTERN_NOT_MATCHED","INVALID_DATA","DUPLICATE_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param_name","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"role_status","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_write/file":{"updatedCount":{"name":"updated_count","type":"Integer"},"name":{"name":"name","type":"String"},"skippedCount":{"name":"skipped_count","type":"Integer"},"addedCount":{"name":"added_count","type":"Integer"},"totalCount":{"name":"total_count","type":"Integer"},"status":{"values":["ADDED","IN PROGRESS","COMPLETED","SKIPPED","FAILED"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/org/checkin_preferences":{"restrictedEventTypes":{"name":"restricted_event_types","type":"String"}},"core/com/zoho/crm/api/send_mail/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_DATA","INTERNAL_SERVER_ERROR","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/layouts/sections":{"displayLabel":{"name":"display_label","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"issubformsection":{"name":"isSubformSection","type":"Boolean"},"tabTraversal":{"name":"tab_traversal","type":"Integer"},"apiName":{"name":"api_name","type":"String"},"generatedType":{"name":"generated_type","type":"String"},"name":{"name":"name","type":"String"},"columnCount":{"name":"column_count","type":"Integer"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"fields":{"structure_name":"core/com/zoho/crm/api/layouts/section_field","name":"fields","type":"List"},"properties":{"structure_name":"core/com/zoho/crm/api/layouts/properties","name":"properties","type":"core/com/zoho/crm/api/layouts/properties"}},"core/com/zoho/crm/api/record/comment":{"commentedTime":{"name":"commented_time","type":"DateTime"},"commentContent":{"name":"comment_content","type":"String"},"id":{"name":"id","type":"Long"},"commentedBy":{"name":"commented_by","type":"String"}},"core/com/zoho/crm/api/holidays/update_holiday_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/privacy_preference/privacy_preference":{"preference":{"structure_name":"core/com/zoho/crm/api/privacy_preference/preference","name":"preference","type":"core/com/zoho/crm/api/privacy_preference/preference"},"config":{"structure_name":"core/com/zoho/crm/api/privacy_preference/config","name":"config","type":"core/com/zoho/crm/api/privacy_preference/config"}},"core/com/zoho/crm/api/shift_hours/mandatory_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/service_preference/response_handler":{"classes":["core/com/zoho/crm/api/service_preference/api_exception","core/com/zoho/crm/api/service_preference/response_wrapper"],"interface":true},"core/com/zoho/crm/api/attachments/action_response":{"classes":["core/com/zoho/crm/api/attachments/success_response"],"interface":true},"core/com/zoho/crm/api/wizards/response_handler":{"classes":["core/com/zoho/crm/api/wizards/api_exception","core/com/zoho/crm/api/wizards/response_wrapper"],"interface":true},"core/com/zoho/crm/api/territory_users/action_response":{"classes":["core/com/zoho/crm/api/territory_users/api_exception","core/com/zoho/crm/api/territory_users/success_response"],"interface":true},"core/com/zoho/crm/api/templates/api_exception":{"code":{"values":["REQUIRED_PARAM_MISSING"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param","type":"String"},{"name":"api_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/business_hours/business_hours":{"businessDays":{"structure_name":"utils/util/choice","values":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"name":"business_days","type":"List"},"sameAsEveryday":{"name":"same_as_everyday","type":"Boolean"},"id":{"name":"id","type":"Long"},"type":{"values":["24_by_7","24_by_5","custom"],"name":"type","type":"utils/util/choice"},"weekStartsOn":{"values":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"name":"week_starts_on","type":"utils/util/choice"},"dailyTiming":{"name":"daily_timing","max-length":2,"type":"List"},"customTiming":{"structure_name":"core/com/zoho/crm/api/business_hours/break_hours_custom_timing","name":"custom_timing","type":"List"}},"core/com/zoho/crm/api/user_type_users/users":{"confirm":{"name":"confirm","type":"Boolean"},"statusReasonS":{"name":"status_reason__s","type":"String"},"module":{"name":"module","type":"String"},"personalityId":{"name":"personality_id","type":"Long"},"name":{"name":"name","type":"String"},"active":{"name":"active","type":"Boolean"},"email":{"name":"email","type":"String"},"invitedTime":{"name":"invited_time","type":"DateTime"}},"core/com/zoho/crm/api/custom_views/sort_by":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"utils/util/Model":{"classes":["core/com/zoho/crm/api/attachments/success_response","core/com/zoho/crm/api/holidays/create_business_holiday","core/com/zoho/crm/api/shift_hours/body_wrapper","core/com/zoho/crm/api/field_map_dependency/child","core/com/zoho/crm/api/territories/api_exception","core/com/zoho/crm/api/field_map_dependency/info","core/com/zoho/crm/api/record/conversion_options_response_wrapper","core/com/zoho/crm/api/wizards/segment","core/com/zoho/crm/api/pipeline/t_pipeline","core/com/zoho/crm/api/business_hours/business_hours_created","core/com/zoho/crm/api/email_related_records/attachments","core/com/zoho/crm/api/mass_delete_cvid/success_response","core/com/zoho/crm/api/users_unavailability/action_wrapper","core/com/zoho/crm/api/user_groups/jobs","core/com/zoho/crm/api/scoring_rules/action_wrapper","core/com/zoho/crm/api/fields/expression","core/com/zoho/crm/api/privacy_configurable_apps/wrapper","core/com/zoho/crm/api/tags/response_wrapper","core/com/zoho/crm/api/fields/api_exception","core/com/zoho/crm/api/notes/action_wrapper","core/com/zoho/crm/api/currencies/base_currency","core/com/zoho/crm/api/isc_signature/signature","core/com/zoho/crm/api/modules/action_wrapper","core/com/zoho/crm/api/entity_scores/scoring_rule_structure","core/com/zoho/crm/api/territories/response_wrapper","core/com/zoho/crm/api/fields/pick_list_value","core/com/zoho/crm/api/tags/action_wrapper","core/com/zoho/crm/api/assignment_rules/default_assignee","core/com/zoho/crm/api/layouts/layouts","core/com/zoho/crm/api/timelines/name_id_structure","core/com/zoho/crm/api/mail_merge/sign_action_wrapper","core/com/zoho/crm/api/mass_convert/response_wrapper","core/com/zoho/crm/api/users_transfer_delete/body_wrapper","core/com/zoho/crm/api/scoring_rules/criteria","core/com/zoho/crm/api/fields/formula","core/com/zoho/crm/api/user_groups/body_wrapper","core/com/zoho/crm/api/change_owner/api_exception","core/com/zoho/crm/api/holidays/shift_hour","core/com/zoho/crm/api/bulk_read/request_wrapper","core/com/zoho/crm/api/taxes/action_wrapper","core/com/zoho/crm/api/definition/api_exception","core/com/zoho/crm/api/record/file_details","core/com/zoho/crm/api/user_groups/sources_count","core/com/zoho/crm/api/service_preference/body_wrapper","core/com/zoho/crm/api/pipeline/regex_details","core/com/zoho/crm/api/wizards/button_background","core/com/zoho/crm/api/users_territories/transfer_to_user","core/com/zoho/crm/api/holidays/holiday","core/com/zoho/crm/api/pipeline/transfer_pipeline_wrapper","core/com/zoho/crm/api/record/multi_select_lookup","core/com/zoho/crm/api/blueprint/process_info","core/com/zoho/crm/api/timelines/field_history_value","core/com/zoho/crm/api/associate_email/body_wrapper","core/com/zoho/crm/api/email_compose_meta/features_available","core/com/zoho/crm/api/privacy_preference/wrapper","core/com/zoho/crm/api/fields/history_tracking","core/com/zoho/crm/api/files/body_wrapper","core/com/zoho/crm/api/appointment_preference/field","core/com/zoho/crm/api/email_templates/attachment","core/com/zoho/crm/api/shift_hours/break_custom_timing","core/com/zoho/crm/api/users/associated_groups_wrapper","core/com/zoho/crm/api/record/price_book","core/com/zoho/crm/api/pipeline/d_pipeline_wrapper","core/com/zoho/crm/api/bulk_read/job_detail","core/com/zoho/crm/api/timelines/picklist_detail","core/com/zoho/crm/api/currencies/api_exception","core/com/zoho/crm/api/fields/lookup","core/com/zoho/crm/api/change_owner/mass_wrapper","core/com/zoho/crm/api/layouts/actions_allowed","core/com/zoho/crm/api/associate_email/action_wrapper","core/com/zoho/crm/api/assignment_rules/created_by","core/com/zoho/crm/api/portals/response_wrapper","core/com/zoho/crm/api/tags/api_exception","core/com/zoho/crm/api/user_type_users/info","core/com/zoho/crm/api/reschedule_history/api_exception","core/com/zoho/crm/api/reschedule_history/appointment_name","core/com/zoho/crm/api/cancel_meetings/success_response","core/com/zoho/crm/api/user_groups/association_module","core/com/zoho/crm/api/email_templates/last_version_statistics","core/com/zoho/crm/api/territories/transfer_body_wrapper","core/com/zoho/crm/api/inventory_templates/inventory_template","core/com/zoho/crm/api/users/response_wrapper","core/com/zoho/crm/api/record/tax","core/com/zoho/crm/api/layouts/convert_mapping","core/com/zoho/crm/api/record/deleted_record","core/com/zoho/crm/api/user_groups/user_group","core/com/zoho/crm/api/currencies/currency_format","core/com/zoho/crm/api/backup/urls_wrapper","core/com/zoho/crm/api/download_inline_images/file_body_wrapper","core/com/zoho/crm/api/mass_convert/related_module","core/com/zoho/crm/api/holidays/api_exception","core/com/zoho/crm/api/mass_convert/assign_to","core/com/zoho/crm/api/notes/response_wrapper","core/com/zoho/crm/api/bulk_read/success_response","core/com/zoho/crm/api/taxes/org_tax","core/com/zoho/crm/api/record/action_wrapper","core/com/zoho/crm/api/timelines/automation_detail","core/com/zoho/crm/api/bulk_write/result","core/com/zoho/crm/api/mail_merge/sign_mail_merge","core/com/zoho/crm/api/templates/templates","core/com/zoho/crm/api/notes/api_exception","core/com/zoho/crm/api/fields/history_tracking_module","core/com/zoho/crm/api/portals/portals","core/com/zoho/crm/api/field_map_dependency/action_wrapper","core/com/zoho/crm/api/custom_views/pin_fields","core/com/zoho/crm/api/profiles/default_view","core/com/zoho/crm/api/shift_hours/break_hours","core/com/zoho/crm/api/email_related_records/user_details","core/com/zoho/crm/api/inventory_templates/info","core/com/zoho/crm/api/record/recurring_activity","core/com/zoho/crm/api/profiles/action_wrapper","core/com/zoho/crm/api/mass_delete_cvid/record_id_body_wrapper","core/com/zoho/crm/api/roles/api_exception","core/com/zoho/crm/api/profiles/section","core/com/zoho/crm/api/blueprint/currency","core/com/zoho/crm/api/portal_user_type/modules","core/com/zoho/crm/api/portal_user_type/owner","core/com/zoho/crm/api/portals_meta/layouts","core/com/zoho/crm/api/reschedule_history/info","core/com/zoho/crm/api/mail_merge/address","core/com/zoho/crm/api/mail_merge/address_value_map","core/com/zoho/crm/api/backup/backup","core/com/zoho/crm/api/users_transfer_delete/response_wrapper","core/com/zoho/crm/api/fields/refer_from_field","core/com/zoho/crm/api/org/response_wrapper","core/com/zoho/crm/api/profiles/category_module","core/com/zoho/crm/api/layouts/response_wrapper","core/com/zoho/crm/api/users_territories/territory","core/com/zoho/crm/api/users_unavailability/user","core/com/zoho/crm/api/available_currencies/response_wrapper","core/com/zoho/crm/api/fields/crypt","core/com/zoho/crm/api/org/hierarchy_preferences","core/com/zoho/crm/api/fields/operation_type","core/com/zoho/crm/api/fields/function_parameter","core/com/zoho/crm/api/email_compose_meta/data","core/com/zoho/crm/api/blueprint/layout","core/com/zoho/crm/api/portal_user_type/personality_module","core/com/zoho/crm/api/layouts/deal_layout_mapping","core/com/zoho/crm/api/deal_contact_roles/body_wrapper","core/com/zoho/crm/api/related_lists/module_map","core/com/zoho/crm/api/entity_scores/entity_scores","core/com/zoho/crm/api/custom_views/translation","core/com/zoho/crm/api/timelines/path_finder","core/com/zoho/crm/api/fields/fields","core/com/zoho/crm/api/share_records/response_wrapper","core/com/zoho/crm/api/users/customize_info","core/com/zoho/crm/api/blueprint/multi_select_lookup","core/com/zoho/crm/api/notifications/api_exception","core/com/zoho/crm/api/record/mass_update_territory","core/com/zoho/crm/api/blueprint/convert_mapping","core/com/zoho/crm/api/mass_change_owner/response_wrapper","core/com/zoho/crm/api/territories/deleted_associated_territories","core/com/zoho/crm/api/shift_hours/api_exception","core/com/zoho/crm/api/definition/response_wrapper","core/com/zoho/crm/api/wizards/api_exception","core/com/zoho/crm/api/templates/wrapper","core/com/zoho/crm/api/record/mass_update_response_wrapper","core/com/zoho/crm/api/blueprint/success_response","core/com/zoho/crm/api/hipaa_compliance/api_exception","core/com/zoho/crm/api/reschedule_history/reschedule_history","core/com/zoho/crm/api/user_groups/source","core/com/zoho/crm/api/users/api_exception","core/com/zoho/crm/api/territory_users/api_exception","core/com/zoho/crm/api/portal_invite/success_response","core/com/zoho/crm/api/mass_change_owner/status","core/com/zoho/crm/api/layouts/default_assignment_view","core/com/zoho/crm/api/user_groups/action_wrapper","core/com/zoho/crm/api/scoring_rules/body_wrapper","core/com/zoho/crm/api/users_transfer_delete/api_exception","core/com/zoho/crm/api/wizards/node","core/com/zoho/crm/api/portals/body_wrapper","core/com/zoho/crm/api/share_records/shared_through","core/com/zoho/crm/api/users_unavailability/response_wrapper","core/com/zoho/crm/api/taxes/success_response","core/com/zoho/crm/api/backup/history_wrapper","core/com/zoho/crm/api/wizards/container","core/com/zoho/crm/api/territories/info","core/com/zoho/crm/api/fiscal_year/api_exception","core/com/zoho/crm/api/deal_contact_roles/contact_role","core/com/zoho/crm/api/files/api_exception","core/com/zoho/crm/api/fields/unique","core/com/zoho/crm/api/fields/query_details","core/com/zoho/crm/api/query/api_exception","core/com/zoho/crm/api/business_hours/business_hours","core/com/zoho/crm/api/cancel_meetings/body_wrapper","core/com/zoho/crm/api/templates/folder","core/com/zoho/crm/api/business_hours/body_wrapper","core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete_by_id","core/com/zoho/crm/api/appointment_preference/field_mappings","core/com/zoho/crm/api/inventory_templates/api_exception","core/com/zoho/crm/api/fields/show_fields","core/com/zoho/crm/api/scoring_rules/layout","core/com/zoho/crm/api/email_related_records/response_wrapper","core/com/zoho/crm/api/reschedule_history/approval","core/com/zoho/crm/api/assignment_rules/api_exception","core/com/zoho/crm/api/change_owner/related_modules","core/com/zoho/crm/api/record/consent","core/com/zoho/crm/api/mass_delete_cvid/mass_delete_scheduled","core/com/zoho/crm/api/custom_views/action_wrapper","core/com/zoho/crm/api/deal_contact_roles/info","core/com/zoho/crm/api/variable_groups/response_wrapper","core/com/zoho/crm/api/users_territories/info","core/com/zoho/crm/api/portal_invite/job_response","core/com/zoho/crm/api/currencies/success_response","core/com/zoho/crm/api/taxes/body_wrapper","core/com/zoho/crm/api/users/role","core/com/zoho/crm/api/backup/urls","core/com/zoho/crm/api/deal_contact_roles/success_response","core/com/zoho/crm/api/shift_hours/success_response","core/com/zoho/crm/api/variables/api_exception","core/com/zoho/crm/api/territories/transfer_territory","core/com/zoho/crm/api/layouts/deal_field","core/com/zoho/crm/api/users/profile","core/com/zoho/crm/api/email_compose_meta/data_map","core/com/zoho/crm/api/backup/requester","core/com/zoho/crm/api/bulk_write/call_back","core/com/zoho/crm/api/send_mail/from","core/com/zoho/crm/api/blueprint/response_wrapper","core/com/zoho/crm/api/reschedule_history/action_wrapper","core/com/zoho/crm/api/taxes/tax","core/com/zoho/crm/api/users_territories/body_wrapper","core/com/zoho/crm/api/record/widget","core/com/zoho/crm/api/business_hours/response_wrapper","core/com/zoho/crm/api/email_related_records/api_exception","core/com/zoho/crm/api/download_attachments/file_body_wrapper","core/com/zoho/crm/api/territories/associated_users_count","core/com/zoho/crm/api/users_territories/manager","core/com/zoho/crm/api/layouts/api_exception","core/com/zoho/crm/api/variables/response_wrapper","core/com/zoho/crm/api/portal_user_type/response_wrapper","core/com/zoho/crm/api/send_mail/body_wrapper","core/com/zoho/crm/api/cancel_meetings/action_wrapper","core/com/zoho/crm/api/mass_change_owner/territory","core/com/zoho/crm/api/mass_convert/api_exception","core/com/zoho/crm/api/associate_email/available","core/com/zoho/crm/api/notifications/success_response","core/com/zoho/crm/api/service_preference/api_exception","core/com/zoho/crm/api/templates/api_exception","core/com/zoho/crm/api/blueprint/crypt","core/com/zoho/crm/api/user_groups/response_wrapper","core/com/zoho/crm/api/modules/success_response","core/com/zoho/crm/api/from_addresses/response_wrapper","core/com/zoho/crm/api/contact_roles/api_exception","core/com/zoho/crm/api/mass_convert/move_attachments_to","core/com/zoho/crm/api/tags/conflict_wrapper","core/com/zoho/crm/api/variables/body_wrapper","core/com/zoho/crm/api/bulk_read/result","core/com/zoho/crm/api/send_mail/data_subject_request","core/com/zoho/crm/api/assignment_rules/response_wrapper","core/com/zoho/crm/api/wizards/wizard","core/com/zoho/crm/api/attachments/attachment","core/com/zoho/crm/api/email_templates/response_wrapper","core/com/zoho/crm/api/mass_change_owner/action_wrapper","core/com/zoho/crm/api/custom_views/custom_view","core/com/zoho/crm/api/custom_views/owner","core/com/zoho/crm/api/field_attachments/file_body_wrapper","core/com/zoho/crm/api/privacy_preference/preference","core/com/zoho/crm/api/fields/profile","core/com/zoho/crm/api/fiscal_year/action_wrapper","core/com/zoho/crm/api/mail_merge/signers","core/com/zoho/crm/api/fields/maps","core/com/zoho/crm/api/users/theme","core/com/zoho/crm/api/custom_views/shared_to","core/com/zoho/crm/api/custom_views/sort_by","core/com/zoho/crm/api/change_owner/success_response","core/com/zoho/crm/api/wizards/actions","core/com/zoho/crm/api/assignment_rules/assignment_rules","core/com/zoho/crm/api/related_lists/response_wrapper","core/com/zoho/crm/api/files/action_wrapper","core/com/zoho/crm/api/tags/record_success_response","core/com/zoho/crm/api/shift_hours/response_wrapper","core/com/zoho/crm/api/bulk_read/api_exception","core/com/zoho/crm/api/custom_views/api_exception","core/com/zoho/crm/api/appointment_preference/appointment_preference","core/com/zoho/crm/api/backup/file_body_wrapper","core/com/zoho/crm/api/shift_hours/role","core/com/zoho/crm/api/territory_users/info","core/com/zoho/crm/api/shift_hours/holidays","core/com/zoho/crm/api/download_inline_images/api_exception","core/com/zoho/crm/api/record/response_wrapper","core/com/zoho/crm/api/email_templates/email_template","core/com/zoho/crm/api/roles/role","core/com/zoho/crm/api/fields/tooltip","core/com/zoho/crm/api/reschedule_history/user","core/com/zoho/crm/api/blueprint/module_fields","core/com/zoho/crm/api/portals/owner","core/com/zoho/crm/api/portals/api_exception","core/com/zoho/crm/api/timelines/record","core/com/zoho/crm/api/record/reminder","core/com/zoho/crm/api/pipeline/d_pipeline","core/com/zoho/crm/api/privacy_configurable_apps/apps","core/com/zoho/crm/api/blueprint/next_transition","core/com/zoho/crm/api/variable_groups/minified_variable_group","core/com/zoho/crm/api/change_owner/error_details","core/com/zoho/crm/api/variable_groups/variable_group","core/com/zoho/crm/api/send_mail/action_wrapper","core/com/zoho/crm/api/record/count_wrapper","core/com/zoho/crm/api/holidays/create_shift_holiday","core/com/zoho/crm/api/blueprint/escalation","core/com/zoho/crm/api/mail_merge/api_exception","core/com/zoho/crm/api/scoring_rules/scoring_rule","core/com/zoho/crm/api/deal_contact_roles/error_details","core/com/zoho/crm/api/bulk_read/call_back","core/com/zoho/crm/api/timelines/info","core/com/zoho/crm/api/users_unavailability/body_wrapper","core/com/zoho/crm/api/user_type_users/users","core/com/zoho/crm/api/associate_email/attachments","core/com/zoho/crm/api/email_sharing/api_exception","core/com/zoho/crm/api/fields/action_wrapper","core/com/zoho/crm/api/entity_scores/info","core/com/zoho/crm/api/scoring_rules/success_response","core/com/zoho/crm/api/mail_merge/mail_merge_template","core/com/zoho/crm/api/record/preference_field_matched_value","core/com/zoho/crm/api/appointment_preference/layout","core/com/zoho/crm/api/users/tab","core/com/zoho/crm/api/territory_users/body_wrapper","core/com/zoho/crm/api/users_transfer_delete/action_wrapper","core/com/zoho/crm/api/roles/reporting_to","core/com/zoho/crm/api/related_records/response_wrapper","core/com/zoho/crm/api/user_groups/associated_user","core/com/zoho/crm/api/record/carry_over_tags","core/com/zoho/crm/api/timelines/state","core/com/zoho/crm/api/timelines/timeline","core/com/zoho/crm/api/tags/new_tag_request_wrapper","core/com/zoho/crm/api/download_attachments/api_exception","core/com/zoho/crm/api/profiles/permission_detail","core/com/zoho/crm/api/portal_user_type/permissions","core/com/zoho/crm/api/custom_views/info","core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/bulk_write/field_mapping","core/com/zoho/crm/api/fields/rollup_criteria","core/com/zoho/crm/api/variable_groups/api_exception","core/com/zoho/crm/api/mail_merge/success_response","core/com/zoho/crm/api/appointment_preference/api_exception","core/com/zoho/crm/api/business_hours/api_exception","core/com/zoho/crm/api/wizards/conditional_rules","core/com/zoho/crm/api/reschedule_history/body_wrapper","core/com/zoho/crm/api/users/action_wrapper","core/com/zoho/crm/api/definition/minified_property1","core/com/zoho/crm/api/profiles/success_response","core/com/zoho/crm/api/record/line_tax","core/com/zoho/crm/api/share_records/delete_action_wrapper","core/com/zoho/crm/api/wizards/resource","core/com/zoho/crm/api/wizards/response_wrapper","core/com/zoho/crm/api/attachments/info","core/com/zoho/crm/api/roles/response_wrapper","core/com/zoho/crm/api/shift_hours/users","core/com/zoho/crm/api/pipeline/mandatory_details","core/com/zoho/crm/api/tags/info","core/com/zoho/crm/api/attachments/action_wrapper","core/com/zoho/crm/api/associate_email/success_response","core/com/zoho/crm/api/record/territory","core/com/zoho/crm/api/custom_views/success_response","core/com/zoho/crm/api/blueprint/lookup_field","core/com/zoho/crm/api/user_groups/associated_user_count","core/com/zoho/crm/api/tags/existing_tag_request_wrapper","core/com/zoho/crm/api/layouts/default_view","core/com/zoho/crm/api/user_type_users/response_wrapper","core/com/zoho/crm/api/send_mail/success_response","core/com/zoho/crm/api/appointment_preference/success_response","core/com/zoho/crm/api/assignment_rules/action_wrapper","core/com/zoho/crm/api/portals_meta/related_lists","core/com/zoho/crm/api/shift_hours/shift_hours","core/com/zoho/crm/api/custom_views/body_wrapper","core/com/zoho/crm/api/tags/count_response_wrapper","core/com/zoho/crm/api/reschedule_history/success_response","core/com/zoho/crm/api/portal_invite/action_wrapper","core/com/zoho/crm/api/privacy_preference/config","core/com/zoho/crm/api/notifications/delete_details","core/com/zoho/crm/api/definition/property","core/com/zoho/crm/api/fields/email_parser","core/com/zoho/crm/api/user_groups/association_wrapper","core/com/zoho/crm/api/mail_merge/download_mail_merge_wrapper","core/com/zoho/crm/api/fiscal_year/response_wrapper","core/com/zoho/crm/api/related_lists/api_exception","core/com/zoho/crm/api/record/conversion_option","core/com/zoho/crm/api/tags/success_response","core/com/zoho/crm/api/profiles/info","core/com/zoho/crm/api/modules/argument","core/com/zoho/crm/api/record/lead_converter","core/com/zoho/crm/api/user_groups/info","core/com/zoho/crm/api/record/criteria","core/com/zoho/crm/api/portal_user_type/api_exception","core/com/zoho/crm/api/territories/success_response","core/com/zoho/crm/api/deal_contact_roles/action_wrapper","core/com/zoho/crm/api/notes/body_wrapper","core/com/zoho/crm/api/currencies/base_currency_wrapper","core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete","core/com/zoho/crm/api/appointment_preference/body_wrapper","core/com/zoho/crm/api/bulk_read/action_wrapper","core/com/zoho/crm/api/portals/success_response","core/com/zoho/crm/api/users_territories/validation","core/com/zoho/crm/api/timelines/module","core/com/zoho/crm/api/org/file_body_wrapper","core/com/zoho/crm/api/attachments/response_wrapper","core/com/zoho/crm/api/tags/associated_places","core/com/zoho/crm/api/tags/error_details","core/com/zoho/crm/api/blueprint/profile","core/com/zoho/crm/api/user_groups/api_exception","core/com/zoho/crm/api/wizards/button","core/com/zoho/crm/api/tags/tag","core/com/zoho/crm/api/users/owner","core/com/zoho/crm/api/user_groups/sources_wrapper","core/com/zoho/crm/api/query/response_wrapper","core/com/zoho/crm/api/definition/minified_property","core/com/zoho/crm/api/variables/action_wrapper","core/com/zoho/crm/api/portal_invite/body_wrapper","core/com/zoho/crm/api/users_territories/response_wrapper","core/com/zoho/crm/api/associate_email/associate_email","core/com/zoho/crm/api/inventory_templates/response_wrapper","core/com/zoho/crm/api/send_mail/inventory_template","core/com/zoho/crm/api/related_records/body_wrapper","core/com/zoho/crm/api/currencies/error_details","core/com/zoho/crm/api/bulk_write/success_response","core/com/zoho/crm/api/send_mail/inventory_details","core/com/zoho/crm/api/timelines/related_record","core/com/zoho/crm/api/users/info","core/com/zoho/crm/api/user_groups/users","core/com/zoho/crm/api/mass_convert/success_response","core/com/zoho/crm/api/pipeline/body_wrapper","core/com/zoho/crm/api/modules/module_field_lookup","core/com/zoho/crm/api/blueprint/field","core/com/zoho/crm/api/backup/info","core/com/zoho/crm/api/users_transfer_delete/success_response","core/com/zoho/crm/api/business_hours/break_hours_custom_timing","core/com/zoho/crm/api/profiles/minified_profile","core/com/zoho/crm/api/email_related_records/info","core/com/zoho/crm/api/files/success_response","core/com/zoho/crm/api/related_lists/related_list","core/com/zoho/crm/api/variables/variable_group","core/com/zoho/crm/api/record/file_body_wrapper","core/com/zoho/crm/api/record/convert_body_wrapper","core/com/zoho/crm/api/record/participants","core/com/zoho/crm/api/blueprint/transition","core/com/zoho/crm/api/fiscal_year/body_wrapper","core/com/zoho/crm/api/notes/success_response","core/com/zoho/crm/api/scoring_rules/layout_request_wrapper","core/com/zoho/crm/api/deal_contact_roles/data","core/com/zoho/crm/api/email_sharing/get_email_sharing","core/com/zoho/crm/api/email_templates/api_exception","core/com/zoho/crm/api/blueprint/module","core/com/zoho/crm/api/associate_email/api_exception","core/com/zoho/crm/api/contact_roles/success_response","core/com/zoho/crm/api/email_related_records/linked_record","core/com/zoho/crm/api/user_groups/resource","core/com/zoho/crm/api/associate_email/module_map","core/com/zoho/crm/api/blueprint/api_exception","core/com/zoho/crm/api/record/mass_update","core/com/zoho/crm/api/roles/body_wrapper","core/com/zoho/crm/api/notifications/event","core/com/zoho/crm/api/portal_user_type/user_type","core/com/zoho/crm/api/fields/auto_number","core/com/zoho/crm/api/users_unavailability/info","core/com/zoho/crm/api/email_templates/info","core/com/zoho/crm/api/timelines/field_history","core/com/zoho/crm/api/cancel_meetings/api_exception","core/com/zoho/crm/api/pipeline/api_exception","core/com/zoho/crm/api/related_lists/field","core/com/zoho/crm/api/change_owner/body_wrapper","core/com/zoho/crm/api/email_compose_meta/default_form","core/com/zoho/crm/api/fields/minified_field","core/com/zoho/crm/api/tags/record_action_wrapper","core/com/zoho/crm/api/query/body_wrapper","core/com/zoho/crm/api/scoring_rules/field","core/com/zoho/crm/api/users/associated_group","core/com/zoho/crm/api/bulk_write/request_wrapper","core/com/zoho/crm/api/share_records/share_record","core/com/zoho/crm/api/pipeline/transfer_pipeline_success_response","core/com/zoho/crm/api/send_mail/attachment","core/com/zoho/crm/api/users_territories/api_exception","core/com/zoho/crm/api/bulk_read/file_body_wrapper","core/com/zoho/crm/api/email_sharing/response_wrapper","core/com/zoho/crm/api/mass_delete_cvid/territory","core/com/zoho/crm/api/modules/minified_module","core/com/zoho/crm/api/notifications/notification","core/com/zoho/crm/api/modules/lookup_field_properties","core/com/zoho/crm/api/mass_delete_cvid/status","core/com/zoho/crm/api/taxes/response_wrapper","core/com/zoho/crm/api/shift_hours/shift_count","core/com/zoho/crm/api/service_preference/success_response","core/com/zoho/crm/api/hipaa_compliance/modules","core/com/zoho/crm/api/fields/body_wrapper","core/com/zoho/crm/api/record/info","core/com/zoho/crm/api/reschedule_history/response_wrapper","core/com/zoho/crm/api/record/record","core/com/zoho/crm/api/record/remind_at","core/com/zoho/crm/api/mail_merge/action_wrapper","core/com/zoho/crm/api/notes/note","core/com/zoho/crm/api/entity_scores/api_exception","core/com/zoho/crm/api/blueprint/module_mapping","core/com/zoho/crm/api/email_compose_meta/from_address","core/com/zoho/crm/api/record/mass_update_success_response","core/com/zoho/crm/api/scoring_rules/signal","core/com/zoho/crm/api/taxes/api_exception","core/com/zoho/crm/api/wizards/exempted_portal_user_type","core/com/zoho/crm/api/share_records/success_response","core/com/zoho/crm/api/portal_user_type/views","core/com/zoho/crm/api/wizards/connection","core/com/zoho/crm/api/portal_invite/api_exception","core/com/zoho/crm/api/pipeline/maps","core/com/zoho/crm/api/taxes/expected_field","core/com/zoho/crm/api/holidays/holidays","core/com/zoho/crm/api/portal_user_type/filters","core/com/zoho/crm/api/users/error_details","core/com/zoho/crm/api/service_preference/action_wrapper","core/com/zoho/crm/api/pipeline/transfer_pipeline","core/com/zoho/crm/api/taxes/preference","core/com/zoho/crm/api/tags/existing_tag","core/com/zoho/crm/api/user_groups/sources_count_wrapper","core/com/zoho/crm/api/org/resource","core/com/zoho/crm/api/backup/history","core/com/zoho/crm/api/mail_merge/download_mail_merge","core/com/zoho/crm/api/appointment_preference/response_wrapper","core/com/zoho/crm/api/related_records/file_body_wrapper","core/com/zoho/crm/api/record/comment","core/com/zoho/crm/api/associate_email/linked_record","core/com/zoho/crm/api/variables/success_response","core/com/zoho/crm/api/backup/action_wrapper","core/com/zoho/crm/api/holidays/response_wrapper","core/com/zoho/crm/api/tags/merge_wrapper","core/com/zoho/crm/api/org/success_response","core/com/zoho/crm/api/bulk_write/api_exception","core/com/zoho/crm/api/layouts/tooltip","core/com/zoho/crm/api/territories/reporting_to","core/com/zoho/crm/api/email_sharing/share_from_user","core/com/zoho/crm/api/portal_invite/portal","core/com/zoho/crm/api/fields/convert_mapping","core/com/zoho/crm/api/mass_delete_cvid/api_exception","core/com/zoho/crm/api/backup/success_response","core/com/zoho/crm/api/contact_roles/body_wrapper","core/com/zoho/crm/api/service_preference/service_preference","core/com/zoho/crm/api/profiles/category_others","core/com/zoho/crm/api/pipeline/forecast_category","core/com/zoho/crm/api/field_map_dependency/pick_list_mapping","core/com/zoho/crm/api/territory_users/response_wrapper","core/com/zoho/crm/api/related_records/api_exception","core/com/zoho/crm/api/fields/view_type","core/com/zoho/crm/api/backup/body_wrapper","core/com/zoho/crm/api/entity_scores/response_wrapper","core/com/zoho/crm/api/portal_invite/response_wrapper","core/com/zoho/crm/api/blueprint/auto_number","core/com/zoho/crm/api/layouts/profiles","core/com/zoho/crm/api/layouts/section_subform_field","core/com/zoho/crm/api/scoring_rules/api_exception","core/com/zoho/crm/api/wizards/chart_data","core/com/zoho/crm/api/users/minified_user","core/com/zoho/crm/api/scoring_rules/role_request_wrapper","core/com/zoho/crm/api/currencies/format","core/com/zoho/crm/api/contact_roles/contact_role","core/com/zoho/crm/api/email_related_records/module","core/com/zoho/crm/api/users/success_response","core/com/zoho/crm/api/entity_scores/entity_structure_with_module","core/com/zoho/crm/api/notifications/response_wrapper","core/com/zoho/crm/api/pipeline/stages","core/com/zoho/crm/api/from_addresses/api_exception","core/com/zoho/crm/api/change_owner/owner","core/com/zoho/crm/api/mass_convert/status","core/com/zoho/crm/api/hipaa_compliance/success_response","core/com/zoho/crm/api/mass_change_owner/api_exception","core/com/zoho/crm/api/portal_invite/portal_invite","core/com/zoho/crm/api/privacy_preference/tpt","core/com/zoho/crm/api/mass_delete_cvid/response_wrapper","core/com/zoho/crm/api/hipaa_compliance/action_wrapper","core/com/zoho/crm/api/users_transfer_delete/move_subordinate","core/com/zoho/crm/api/users_unavailability/api_exception","core/com/zoho/crm/api/fields/hipaa_compliance","core/com/zoho/crm/api/cancel_meetings/notify","core/com/zoho/crm/api/scoring_rules/info","core/com/zoho/crm/api/bulk_write/bulk_write_response","core/com/zoho/crm/api/user_groups/association_response","core/com/zoho/crm/api/users_territories/action_wrapper","core/com/zoho/crm/api/currencies/currency","core/com/zoho/crm/api/scoring_rules/signal_rule","core/com/zoho/crm/api/blueprint/tool_tip","core/com/zoho/crm/api/org/license_details","core/com/zoho/crm/api/roles/action_wrapper","core/com/zoho/crm/api/users/body_wrapper","core/com/zoho/crm/api/record/deleted_records_wrapper","core/com/zoho/crm/api/fields/multiselectlookup","core/com/zoho/crm/api/modules/body_wrapper","core/com/zoho/crm/api/shift_hours/shift_custom_timing","core/com/zoho/crm/api/custom_views/criteria","core/com/zoho/crm/api/privacy_preference/privacy_preference","core/com/zoho/crm/api/holidays/shift_holiday","core/com/zoho/crm/api/scoring_rules/field_rule","core/com/zoho/crm/api/attachments/owner","core/com/zoho/crm/api/users_transfer_delete/status","core/com/zoho/crm/api/pipeline/delete","core/com/zoho/crm/api/layouts/minified_layout","core/com/zoho/crm/api/roles/success_response","core/com/zoho/crm/api/mail_merge/mail_merge","core/com/zoho/crm/api/custom_views/field","core/com/zoho/crm/api/modules/sharing_properties","core/com/zoho/crm/api/users_unavailability/users_unavailability","core/com/zoho/crm/api/assignment_rules/success_response","core/com/zoho/crm/api/blueprint/association_details","core/com/zoho/crm/api/hipaa_compliance/response_wrapper","core/com/zoho/crm/api/associate_email/from","core/com/zoho/crm/api/portal_user_type/layouts","core/com/zoho/crm/api/timelines/api_exception","core/com/zoho/crm/api/fields/currency","core/com/zoho/crm/api/email_related_records/email","core/com/zoho/crm/api/field_map_dependency/body_wrapper","core/com/zoho/crm/api/share_records/action_wrapper","core/com/zoho/crm/api/send_mail/data","core/com/zoho/crm/api/users_territories/transfer_action_wrapper","core/com/zoho/crm/api/wizards/portal_user_type","core/com/zoho/crm/api/layouts/sections","core/com/zoho/crm/api/profiles/profile_wrapper","core/com/zoho/crm/api/record/success_response","core/com/zoho/crm/api/deal_contact_roles/api_exception","core/com/zoho/crm/api/currencies/action_wrapper","core/com/zoho/crm/api/notes/info","core/com/zoho/crm/api/fiscal_year/year","core/com/zoho/crm/api/user_groups/success_response","core/com/zoho/crm/api/modules/response_wrapper","core/com/zoho/crm/api/user_groups/owner","core/com/zoho/crm/api/currencies/disable_success","core/com/zoho/crm/api/fields/association_details","core/com/zoho/crm/api/field_map_dependency/api_exception","core/com/zoho/crm/api/field_map_dependency/success_response","core/com/zoho/crm/api/bulk_write/default_value","core/com/zoho/crm/api/related_records/action_wrapper","core/com/zoho/crm/api/territories/minified_territory","core/com/zoho/crm/api/org/org","core/com/zoho/crm/api/profiles/api_exception","core/com/zoho/crm/api/available_currencies/currency","core/com/zoho/crm/api/mail_merge/sign_mail_merge_wrapper","core/com/zoho/crm/api/blueprint/view_type","core/com/zoho/crm/api/mass_change_owner/owner","core/com/zoho/crm/api/record/line_item_product","core/com/zoho/crm/api/wizards/criteria","core/com/zoho/crm/api/attachments/file_body_wrapper","core/com/zoho/crm/api/modules/related_list_properties","core/com/zoho/crm/api/tags/body_wrapper","core/com/zoho/crm/api/mass_convert/portal_user_type","core/com/zoho/crm/api/wizards/transition","core/com/zoho/crm/api/mass_change_owner/body_wrapper","core/com/zoho/crm/api/record/body_wrapper","core/com/zoho/crm/api/shift_hours/action_wrapper","core/com/zoho/crm/api/org/feature","core/com/zoho/crm/api/privacy_preference/section","core/com/zoho/crm/api/fields/file_upolad_option","core/com/zoho/crm/api/field_map_dependency/parent","core/com/zoho/crm/api/send_mail/invalid_details","core/com/zoho/crm/api/users/users","core/com/zoho/crm/api/modules/territory","core/com/zoho/crm/api/inventory_templates/folder","core/com/zoho/crm/api/territories/deleted_associated_wrapper","core/com/zoho/crm/api/users_territories/bulk_validation","core/com/zoho/crm/api/variables/error_details","core/com/zoho/crm/api/pipeline/transfer_pipeline_action_wrapper","core/com/zoho/crm/api/users_territories/transfer_and_delink","core/com/zoho/crm/api/holidays/success_response","core/com/zoho/crm/api/portals_meta/filters","core/com/zoho/crm/api/bulk_read/response_wrapper","core/com/zoho/crm/api/mass_delete_cvid/cvid_body_wrapper","core/com/zoho/crm/api/users_territories/transfer_wrapper","core/com/zoho/crm/api/territories/associated_users_count_wrapper","core/com/zoho/crm/api/record/mass_update_body_wrapper","core/com/zoho/crm/api/users_unavailability/success_response","core/com/zoho/crm/api/territories/criteria","core/com/zoho/crm/api/record/mass_update_action_wrapper","core/com/zoho/crm/api/blueprint/body_wrapper","core/com/zoho/crm/api/bulk_write/file","core/com/zoho/crm/api/privacy_preference/option","core/com/zoho/crm/api/associate_email/to","core/com/zoho/crm/api/hipaa_compliance/hipaa_compliance","core/com/zoho/crm/api/layouts/section_field","core/com/zoho/crm/api/related_records/success_response","core/com/zoho/crm/api/modules/api_exception","core/com/zoho/crm/api/modules/modules","core/com/zoho/crm/api/record/multi_select_picklist","core/com/zoho/crm/api/mass_change_owner/success_response","core/com/zoho/crm/api/portals_meta/views","core/com/zoho/crm/api/share_records/api_exception","core/com/zoho/crm/api/portals_meta/modules","core/com/zoho/crm/api/fiscal_year/success_response","core/com/zoho/crm/api/backup/api_exception","core/com/zoho/crm/api/mass_convert/error_details","core/com/zoho/crm/api/org/api_exception","core/com/zoho/crm/api/wizards/screen","core/com/zoho/crm/api/contact_roles/action_wrapper","core/com/zoho/crm/api/portals_meta/wrapper","core/com/zoho/crm/api/tags/record_detail_tag","core/com/zoho/crm/api/email_related_records/status","core/com/zoho/crm/api/holidays/action_wrapper","core/com/zoho/crm/api/territories/manager","core/com/zoho/crm/api/modules/lookup_field","core/com/zoho/crm/api/custom_views/pin_unpin_fields","core/com/zoho/crm/api/portals/action_wrapper","core/com/zoho/crm/api/email_compose_meta/user","core/com/zoho/crm/api/bulk_read/criteria","core/com/zoho/crm/api/pipeline/pipeline","core/com/zoho/crm/api/timelines/response_wrapper","core/com/zoho/crm/api/blueprint/formula","core/com/zoho/crm/api/fields/external","core/com/zoho/crm/api/org/checkin_preferences","core/com/zoho/crm/api/user_type_users/api_exception","core/com/zoho/crm/api/service_preference/response_wrapper","core/com/zoho/crm/api/territories/body_wrapper","core/com/zoho/crm/api/fields/forecast_category","core/com/zoho/crm/api/pipeline/action_wrapper","core/com/zoho/crm/api/layouts/properties","core/com/zoho/crm/api/available_currencies/api_exception","core/com/zoho/crm/api/share_records/body_wrapper","core/com/zoho/crm/api/entity_scores/module_structure","core/com/zoho/crm/api/from_addresses/address","core/com/zoho/crm/api/pipeline/success_response","core/com/zoho/crm/api/fields/multi_module_lookup","core/com/zoho/crm/api/territories/action_wrapper","core/com/zoho/crm/api/bulk_write/resource","core/com/zoho/crm/api/users_transfer_delete/transfer","core/com/zoho/crm/api/notifications/info","core/com/zoho/crm/api/notifications/body_wrapper","core/com/zoho/crm/api/users_territories/validation_wrapper","core/com/zoho/crm/api/modules/module_fields","core/com/zoho/crm/api/users_territories/success_response","core/com/zoho/crm/api/field_map_dependency/map_dependency","core/com/zoho/crm/api/currencies/base_currency_action_wrapper","core/com/zoho/crm/api/send_mail/to","core/com/zoho/crm/api/attachments/api_exception","core/com/zoho/crm/api/field_attachments/api_exception","core/com/zoho/crm/api/change_owner/action_wrapper","core/com/zoho/crm/api/variables/variable","core/com/zoho/crm/api/entity_scores/entity_structure","core/com/zoho/crm/api/fields/success","core/com/zoho/crm/api/share_records/module","core/com/zoho/crm/api/fields/private","core/com/zoho/crm/api/user_groups/groups","core/com/zoho/crm/api/territory_users/success_response","core/com/zoho/crm/api/scoring_rules/response_wrapper","core/com/zoho/crm/api/appointment_preference/action_wrapper","core/com/zoho/crm/api/mass_convert/convert","core/com/zoho/crm/api/bulk_write/file_body_wrapper","core/com/zoho/crm/api/holidays/info","core/com/zoho/crm/api/field_map_dependency/sub_module","core/com/zoho/crm/api/fields/rollup_summary","core/com/zoho/crm/api/attachments/parent_id","core/com/zoho/crm/api/mail_merge/mail_merge_wrapper","core/com/zoho/crm/api/holidays/business_holiday","core/com/zoho/crm/api/user_groups/jobs_wrapper","core/com/zoho/crm/api/associate_email/record","core/com/zoho/crm/api/profiles/profile","core/com/zoho/crm/api/territories/field","core/com/zoho/crm/api/portal_user_type/fields","core/com/zoho/crm/api/field_map_dependency/picklist_map","core/com/zoho/crm/api/shift_hours/mandatory_details","core/com/zoho/crm/api/bulk_read/query","core/com/zoho/crm/api/custom_views/fields","core/com/zoho/crm/api/files/file_body_wrapper","core/com/zoho/crm/api/users/shift","core/com/zoho/crm/api/record/wizard","core/com/zoho/crm/api/send_mail/api_exception","core/com/zoho/crm/api/wizards/field","core/com/zoho/crm/api/blueprint/blue_print","core/com/zoho/crm/api/definition/definition","core/com/zoho/crm/api/territories/territories","core/com/zoho/crm/api/notifications/action_wrapper","core/com/zoho/crm/api/user_groups/sources","core/com/zoho/crm/api/share_records/dependee","core/com/zoho/crm/api/mass_delete_cvid/action_wrapper","core/com/zoho/crm/api/email_compose_meta/compose_settings","core/com/zoho/crm/api/currencies/body_wrapper","core/com/zoho/crm/api/record/pricing_details","core/com/zoho/crm/api/business_hours/action_wrapper","core/com/zoho/crm/api/territory_users/action_wrapper","core/com/zoho/crm/api/record/image_upload"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/picklist_map":{"displayValue":{"name":"display_value","type":"String"},"actualValue":{"name":"actual_value","type":"String"},"id":{"name":"id","type":"Long"},"delete1":{"name":"_delete","type":"Boolean"}},"core/com/zoho/crm/api/portal_invite/portal":{"userTypeId":{"name":"user_type_id","type":"Long"},"language":{"values":["en_US","en_GB","bg_BG","zh_CN","zh_TW","hr_HR","ar_EG","in_ID","cs_CZ","da_DK","nl_NL","fr_FR","de_DE","hu_HU","","hi_IN","it_IT","ja_JP","pl_PL","pt_BR","pt_PT","ru_RU","es_ES","sv_SE","th_TH","tr_TR","vi_VN","ko_KR","iw_IL"],"name":"language","type":"utils/util/choice"},"id":{"name":"id","type":"Long"},"type":{"values":["invite","reinvite"],"name":"type","type":"utils/util/choice"}},"core/com/zoho/crm/api/scoring_rules/api_exception":{"code":{"values":["INVALID_DATA","INVALID_URL_PATTERN","EXPECTED_FIELD_MISSING","MANDATORY_NOT_FOUND","LIMIT_EXCEEDED","REQUIRED_PARAM_MISSING","DUPLICATE_DATA","ALREADY_SCHEDULED","INVALID_MODULE","INVALID_TOKEN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param_name","type":"String"},{"name":"expected_fields","type":"List"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"limit","type":"Integer"},{"name":"maximum_length","type":"Integer"},{"name":"param","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["invalid data","the module name given seems to be invalid"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/org/hierarchy_preferences":{"strictlyReporting":{"name":"strictly_reporting","type":"Boolean"},"type":{"values":["Reporting_To_Hierarchy","Role_Hierarchy"],"name":"type","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/get_field_param":{"include":{"values":["allowed_permissions_to_update"],"name":"include","type":"String"},"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/territories/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fiscal_year/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"allowed_values","type":"List"}],"name":"details","type":"Map"},"message":{"values":["required field not found","Please give a valid month","Please give a valid value"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fiscal_year/response_wrapper":{"fiscalYear":{"structure_name":"core/com/zoho/crm/api/fiscal_year/year","name":"fiscal_year","type":"core/com/zoho/crm/api/fiscal_year/year"}},"core/com/zoho/crm/api/entity_scores/entity_structure":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/notes/note":{"owner":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Owner","type":"core/com/zoho/crm/api/users/minified_user"},"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"noteTitle":{"name":"Note_Title","type":"String"},"noteContent":{"name":"Note_Content","type":"String"},"attachments":{"structure_name":"core/com/zoho/crm/api/attachments/attachment","name":"$attachments","type":"List"},"voiceNote":{"name":"$voice_note","type":"Boolean"},"editable":{"name":"$editable","type":"Boolean"},"isSharedToClient":{"name":"$is_shared_to_client","type":"Boolean"},"sharingPermission":{"name":"$sharing_permission","type":"String"},"parentId":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Parent_Id","type":"core/com/zoho/crm/api/record/record"},"seModule":{"values":["Leads"],"name":"$se_module","type":"utils/util/choice"},"size":{"name":"$size","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"state":{"name":"$state","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/timelines/module":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/entity_scores/response_handler":{"classes":["core/com/zoho/crm/api/entity_scores/api_exception","core/com/zoho/crm/api/entity_scores/response_wrapper"],"interface":true},"core/com/zoho/crm/api/fields/unique":{"casesensitive":{"name":"casesensitive","type":"String"}},"core/com/zoho/crm/api/share_records/dependee":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/layouts/response_wrapper":{"layouts":{"structure_name":"core/com/zoho/crm/api/layouts/layouts","name":"layouts","type":"List"}},"core/com/zoho/crm/api/tags/api_exception":{"code":{"values":["INVALID_DATA","REQUIRED_PARAM_MISSING","MANDATORY_NOT_FOUND","INVALID_MODULE","DUPLICATE_DATA","TAG_ID_NOT_FOUND","FAILURE","NO_PERMISSION","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","LICENSE_LIMIT_EXCEEDED","INVALID_REQUEST","EXPECTED_FIELD_MISSING","NOT_ALLOWED","BAD_REQUEST","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"structure_name":"core/com/zoho/crm/api/tags/error_details","name":"expected_fields","type":"List"},{"name":"param_name","type":"String"},{"structure_name":"core/com/zoho/crm/api/tags/associated_places","name":"associated_places","type":"List"},{"name":"id","type":"String"},{"name":"param","type":"String"},{"name":"permissions","type":"List"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["invalid data","tags not found","required field not found","special characters found in the given name","One of the expected parameter is missing","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","record not deleted","the related id given seems to be invalid","The relation name given seems to be invalid","duplicate data","tag edition limit exceeded","tags not updated successfully","the module name given seems to be invalid","unable to process your request. please verify whether you have entered proper method name"," parameter and parameter values."],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/send_mail/inventory_template":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/pipeline/d_pipeline_wrapper":{"pipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/d_pipeline","name":"pipeline","type":"List"}},"core/com/zoho/crm/api/holidays/body_wrapper":{"classes":["core/com/zoho/crm/api/holidays/create_business_holiday","core/com/zoho/crm/api/holidays/create_shift_holiday"],"interface":true},"core/com/zoho/crm/api/blueprint/response_handler":{"classes":["core/com/zoho/crm/api/blueprint/response_wrapper","core/com/zoho/crm/api/blueprint/api_exception"],"interface":true},"core/com/zoho/crm/api/email_templates/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/change_owner/action_response":{"classes":["core/com/zoho/crm/api/change_owner/api_exception","core/com/zoho/crm/api/change_owner/success_response"],"interface":true},"core/com/zoho/crm/api/fields/action_wrapper":{"fields":{"structure_name":"core/com/zoho/crm/api/fields/action_response","name":"fields","type":"List"}},"core/com/zoho/crm/api/download_inline_images/get_download_inline_images_param":{"messageId":{"name":"message_id","type":"String","required":true},"id":{"name":"id","type":"String","required":true},"userId":{"name":"user_id","type":"Long","required":true}},"core/com/zoho/crm/api/shift_hours/get_shift_hour_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/shift_hours/update_shift_hours_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/attachments/delete_attachments_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/pipeline/pipeline":{"displayValue":{"name":"display_value","max-length":120,"type":"String"},"parent":{"structure_name":"core/com/zoho/crm/api/pipeline/pipeline","name":"parent","type":"core/com/zoho/crm/api/pipeline/pipeline"},"maps":{"structure_name":"core/com/zoho/crm/api/pipeline/maps","name":"maps","type":"List"},"default1":{"name":"default","type":"Boolean"},"childAvailable":{"name":"child_available","type":"Boolean"},"actualValue":{"name":"actual_value","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mass_convert/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/currencies/base_currency_wrapper":{"baseCurrency":{"structure_name":"core/com/zoho/crm/api/currencies/base_currency","name":"base_currency","type":"core/com/zoho/crm/api/currencies/base_currency"}},"core/com/zoho/crm/api/user_groups/users":{"inactive":{"name":"inactive","type":"Integer"},"deleted":{"name":"deleted","type":"Integer"},"active":{"name":"active","type":"Integer"}},"core/com/zoho/crm/api/cancel_meetings/notify":{"sendCancellingMail":{"name":"send_cancelling_mail","type":"Boolean"}},"core/com/zoho/crm/api/cancel_meetings/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/cancel_meetings/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/related_records/action_handler":{"classes":["core/com/zoho/crm/api/related_records/api_exception","core/com/zoho/crm/api/related_records/action_wrapper"],"interface":true},"core/com/zoho/crm/api/fiscal_year/action_wrapper":{"fiscalYear":{"structure_name":"core/com/zoho/crm/api/fiscal_year/action_response","name":"fiscal_year","interface":true,"type":"core/com/zoho/crm/api/fiscal_year/action_response"}},"core/com/zoho/crm/api/territories/get_child_territory_param":{"filters":{"name":"filters","type":"String"}},"core/com/zoho/crm/api/holidays/shift_holiday":{"date":{"name":"date","type":"Date"},"name":{"name":"name","max-length":80,"type":"String"},"type":{"values":["shift_holiday"],"name":"type","type":"utils/util/choice"},"shiftHour":{"structure_name":"core/com/zoho/crm/api/holidays/shift_hour","name":"shift_hour","type":"core/com/zoho/crm/api/holidays/shift_hour"}},"core/com/zoho/crm/api/fiscal_year/year":{"startMonth":{"values":["January","February","March","April","May","June","July","August","September","October","November","December"],"name":"start_month","type":"utils/util/choice"},"displayBasedOn":{"values":["end_month","start_month"],"name":"display_based_on","type":"utils/util/choice"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/wizards/chart_data":{"canvasWidth":{"name":"canvas_width","type":"Integer"},"nodes":{"structure_name":"core/com/zoho/crm/api/wizards/node","name":"nodes","type":"List"},"colorPalette":{"structure_name":"core/com/zoho/crm/api/wizards/button_background","name":"color_palette","type":"core/com/zoho/crm/api/wizards/button_background"},"connections":{"structure_name":"core/com/zoho/crm/api/wizards/connection","name":"connections","type":"List"},"canvasHeight":{"name":"canvas_height","type":"Integer"}},"core/com/zoho/crm/api/fields/expression":{"criteria":{"structure_name":"core/com/zoho/crm/api/fields/rollup_criteria","name":"criteria","type":"core/com/zoho/crm/api/fields/rollup_criteria"},"function1":{"name":"function","type":"String"},"functionParameters":{"structure_name":"core/com/zoho/crm/api/fields/function_parameter","name":"function_parameters","type":"List"}},"core/com/zoho/crm/api/blueprint/association_details":{"lookupField":{"structure_name":"core/com/zoho/crm/api/blueprint/lookup_field","name":"lookup_field","type":"core/com/zoho/crm/api/blueprint/lookup_field"},"relatedField":{"structure_name":"core/com/zoho/crm/api/blueprint/lookup_field","name":"related_field","type":"core/com/zoho/crm/api/blueprint/lookup_field"}},"core/com/zoho/crm/api/custom_views/action_response":{"classes":["core/com/zoho/crm/api/custom_views/api_exception","core/com/zoho/crm/api/custom_views/success_response"],"interface":true},"core/com/zoho/crm/api/attachments/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/bulk_read/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/bulk_read/action_response","name":"data","type":"List"},"info":{"name":"info","type":"Map"}},"core/com/zoho/crm/api/scoring_rules/layout_request_wrapper":{"layout":{"structure_name":"core/com/zoho/crm/api/scoring_rules/layout","name":"layout","type":"core/com/zoho/crm/api/scoring_rules/layout"}},"core/com/zoho/crm/api/pipeline/t_pipeline":{"from":{"name":"from","type":"Long"},"to":{"name":"to","type":"Long"}},"core/com/zoho/crm/api/field_map_dependency/response_handler":{"classes":["core/com/zoho/crm/api/field_map_dependency/body_wrapper","core/com/zoho/crm/api/field_map_dependency/api_exception"],"interface":true},"core/com/zoho/crm/api/blueprint/profile":{"permissionType":{"name":"permission_type","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users_territories/response_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/users_territories/territory","name":"territories","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/users_territories/info","name":"info","type":"core/com/zoho/crm/api/users_territories/info"}},"core/com/zoho/crm/api/assignment_rules/get_assignment_rule_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/from_addresses/response_handler":{"classes":["core/com/zoho/crm/api/from_addresses/response_wrapper","core/com/zoho/crm/api/from_addresses/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/response_handler":{"classes":["core/com/zoho/crm/api/users_territories/response_wrapper","core/com/zoho/crm/api/users_territories/api_exception"],"interface":true},"core/com/zoho/crm/api/record/mass_update_action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/mass_update_action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/layouts/profiles":{"defaultassignmentview":{"structure_name":"core/com/zoho/crm/api/layouts/default_assignment_view","name":"_default_assignment_view","type":"core/com/zoho/crm/api/layouts/default_assignment_view"},"defaultview":{"structure_name":"core/com/zoho/crm/api/layouts/default_view","name":"_default_view","type":"core/com/zoho/crm/api/layouts/default_view"},"default1":{"name":"default","type":"Boolean"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users_transfer_delete/transfer":{"records":{"name":"records","type":"Boolean"},"assignment":{"name":"assignment","type":"Boolean"},"criteria":{"name":"criteria","type":"Boolean"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/notes/delete_notes_param":{"ids":{"name":"ids","type":"Long","required":true}},"core/com/zoho/crm/api/mass_convert/status":{"failedCount":{"name":"Failed_Count","type":"Integer"},"convertedCount":{"name":"Converted_Count","type":"Integer"},"totalCount":{"name":"Total_Count","type":"Integer"},"notConvertedCount":{"name":"Not_Converted_Count","type":"Integer"},"status":{"name":"Status","type":"String"}},"core/com/zoho/crm/api/user_groups/jobs_wrapper":{"deletionJobs":{"structure_name":"core/com/zoho/crm/api/user_groups/jobs","name":"deletion_jobs","type":"List"}},"core/com/zoho/crm/api/layouts/get_layout_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/pipeline/delete":{"permanent":{"name":"permanent","type":"Boolean"}},"core/com/zoho/crm/api/users_transfer_delete/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"jobId","type":"String"}],"name":"details","type":"Map"},"message":{"values":["User added","User updated","User deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_user_type/views":{"displayLabel":{"name":"display_label","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/mass_change_owner/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"values":["cvid"],"name":"api_name","type":"utils/util/choice"},{"name":"expected_data_type","type":"String"},{"name":"json_path","type":"String"}],"name":"details","type":"Map"},"message":{"values":["the cvid given seems to be invalid","required field not found"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/email_compose_meta/features_available":{"emailCloudPicker":{"values":[true],"name":"EMAIL_CLOUD_PICKER","type":"utils/util/choice"},"formIntegrationEnabled":{"values":[true],"name":"form_integration_enabled","type":"utils/util/choice"},"islivedeskenabled":{"values":[true],"name":"isLiveDeskEnabled","type":"utils/util/choice"},"subjectLineSuggestion":{"name":"subject_line_suggestion","type":"Boolean"},"inlineComposeWindow":{"values":[true],"name":"inline_compose_window","type":"utils/util/choice"},"bestTimeToContact":{"values":[true],"name":"best_time_to_contact","type":"utils/util/choice"},"zsurveyEnabled":{"values":[true],"name":"zsurvey_enabled","type":"utils/util/choice"},"oldComposeRevert":{"name":"OLD_COMPOSE_REVERT","type":"Boolean"},"mandateunsublink":{"name":"mandateUnsubLink","type":"Boolean"},"scheduleMail":{"values":[true],"name":"Schedule_Mail","type":"utils/util/choice"},"unsubscribeLink":{"values":[true],"name":"UNSUBSCRIBE_LINK","type":"utils/util/choice"},"attachment":{"name":"ATTACHMENT","type":"Boolean"},"isprivacyenabled":{"values":[true],"name":"isPrivacyEnabled","type":"utils/util/choice"},"autoSuggestion":{"values":[true],"name":"auto_suggestion","type":"utils/util/choice"},"emailPreference":{"name":"EMAIL_PREFERENCE","type":"Boolean"},"attachTeamdrive":{"values":[true],"name":"attach_teamdrive","type":"utils/util/choice"}},"core/com/zoho/crm/api/users/minified_user":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/profiles/profile_wrapper":{"profiles":{"structure_name":"core/com/zoho/crm/api/profiles/profile","name":"profiles","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/profiles/info","name":"info","type":"core/com/zoho/crm/api/profiles/info"}},"core/com/zoho/crm/api/email_sharing/get_email_sharing":{"availableTypes":{"name":"available_types","type":"List"},"shareFromUsers":{"structure_name":"core/com/zoho/crm/api/email_sharing/share_from_user","name":"share_from_users","type":"List"}},"core/com/zoho/crm/api/fields/pick_list_value":{"displayValue":{"name":"display_value","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"maps":{"structure_name":"core/com/zoho/crm/api/fields/maps","name":"maps","type":"List"},"probability":{"name":"probability","type":"Integer"},"forecastCategory":{"structure_name":"core/com/zoho/crm/api/fields/forecast_category","name":"forecast_category","type":"core/com/zoho/crm/api/fields/forecast_category"},"actualValue":{"name":"actual_value","type":"String"},"sysRefName":{"name":"sys_ref_name","type":"String"},"expectedDataType":{"name":"expected_data_type","type":"String"},"colourCode":{"name":"colour_code","type":"String"},"forecastType":{"name":"forecast_type","type":"String"},"id":{"name":"id","type":"Long"},"type":{"values":["used","unused"],"name":"type","type":"utils/util/choice"}},"core/com/zoho/crm/api/roles/action_response":{"classes":["core/com/zoho/crm/api/roles/api_exception","core/com/zoho/crm/api/roles/success_response"],"interface":true},"core/com/zoho/crm/api/change_owner/related_modules":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/line_item_product":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"productCode":{"name":"Product_Code","type":"String"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"Created_Time","type":"DateTime"},"currency":{"name":"Currency","type":"String"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"}},"core/com/zoho/crm/api/territories/action_response":{"classes":["core/com/zoho/crm/api/territories/api_exception","core/com/zoho/crm/api/territories/success_response"],"interface":true},"core/com/zoho/crm/api/fields/refer_from_field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/reminder":{"period":{"name":"period","type":"String"},"unit":{"name":"unit","type":"Integer"},"time":{"name":"time","type":"String"}},"core/com/zoho/crm/api/business_hours/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","INVALID_DATA","INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"},{"name":"regex","type":"String"},{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["required field not found"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/templates/wrapper":{"templates":{"structure_name":"core/com/zoho/crm/api/templates/templates","name":"templates","type":"List"}},"core/com/zoho/crm/api/cancel_meetings/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/business_hours/action_wrapper":{"businessHours":{"structure_name":"core/com/zoho/crm/api/business_hours/action_response","name":"business_hours","interface":true,"type":"core/com/zoho/crm/api/business_hours/action_response"}},"core/com/zoho/crm/api/profiles/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","LICENSE_LIMIT_EXCEEDED","INVALID_DATA","DUPLICATE_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"values":[25],"name":"limit","type":"utils/util/choice"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"}],"name":"details","type":"Map"},"message":{"values":["duplicate data"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/tags/tag":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"colorCode":{"values":["#1DB9B4","#57B1FD","#63C57E","#F48435","#A8C026"],"name":"color_code","type":"utils/util/choice"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portal_user_type/layouts":{"displayLabel":{"name":"display_label","type":"String"},"defaultview":{"structure_name":"core/com/zoho/crm/api/portal_user_type/views","name":"_default_view","type":"core/com/zoho/crm/api/portal_user_type/views"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/field_map_dependency/body_wrapper":{"mapDependency":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/map_dependency","name":"map_dependency","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/info","name":"info","type":"core/com/zoho/crm/api/field_map_dependency/info"}},"core/com/zoho/crm/api/pipeline/regex_details":{"apiName":{"name":"api_name","type":"String"},"regex":{"name":"regex","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/bulk_read/call_back":{"method":{"values":["post"],"name":"method","type":"utils/util/choice"},"url":{"name":"url","type":"String"}},"core/com/zoho/crm/api/fields/private":{"export1":{"name":"export","type":"Boolean"},"restricted":{"name":"restricted","type":"Boolean"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/record/carry_over_tags":{"deals":{"name":"Deals","type":"List"},"accounts":{"name":"Accounts","type":"List"},"contacts":{"name":"Contacts","type":"List"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline_action_wrapper":{"transferPipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/transfer_pipeline_action_response","name":"transfer_pipeline","type":"List"}},"core/com/zoho/crm/api/related_records/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/related_records/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/record/multi_select_picklist":{"fieldname":{"name":"fieldName","type":"Map"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users/get_users_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/assignment_rules/created_by":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"email":{"name":"email","type":"String"},"zuid":{"name":"zuid","type":"String"}},"core/com/zoho/crm/api/timelines/state":{"isLastState":{"name":"is_last_state","type":"Boolean"},"name":{"name":"name","type":"String"},"triggerType":{"name":"trigger_type","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mail_merge/sign_action_wrapper":{"signMailMerge":{"structure_name":"core/com/zoho/crm/api/mail_merge/sign_action_response","name":"sign_mail_merge","type":"List"}},"core/com/zoho/crm/api/layouts/api_exception":{"code":{"values":["InvalidModule","REQUIRED_PARAM_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/custom_views/custom_view":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"criteria":{"structure_name":"core/com/zoho/crm/api/custom_views/criteria","name":"criteria","type":"core/com/zoho/crm/api/custom_views/criteria"},"module":{"structure_name":"core/com/zoho/crm/api/custom_views/owner","name":"module","type":"core/com/zoho/crm/api/custom_views/owner"},"sharedTo":{"structure_name":"core/com/zoho/crm/api/custom_views/shared_to","name":"shared_to","type":"List"},"displayValue":{"name":"display_value","type":"String"},"lastAccessedTime":{"name":"last_accessed_time","type":"DateTime"},"accessType":{"values":["public","only_to_me","shared"],"name":"access_type","type":"utils/util/choice"},"offline":{"name":"offline","type":"Boolean"},"systemName":{"name":"system_name","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/custom_views/owner","name":"created_by","type":"core/com/zoho/crm/api/custom_views/owner"},"default1":{"name":"default","type":"Boolean"},"sortOrder":{"values":["asc","desc"],"name":"sort_order","type":"utils/util/choice"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/custom_views/owner","name":"modified_by","type":"core/com/zoho/crm/api/custom_views/owner"},"sortBy":{"structure_name":"core/com/zoho/crm/api/custom_views/sort_by","name":"sort_by","type":"core/com/zoho/crm/api/custom_views/sort_by"},"id":{"name":"id","type":"Long"},"category":{"name":"category","type":"String"},"systemDefined":{"name":"system_defined","type":"Boolean"},"locked":{"name":"locked","type":"Boolean"},"fields":{"structure_name":"core/com/zoho/crm/api/custom_views/fields","name":"fields","type":"List"},"favorite":{"name":"favorite","type":"Boolean"}},"core/com/zoho/crm/api/backup/body_wrapper":{"backup":{"structure_name":"core/com/zoho/crm/api/backup/backup","name":"backup","type":"core/com/zoho/crm/api/backup/backup"}},"core/com/zoho/crm/api/related_records/update_related_records_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/pipeline/create_pipeline_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/contact_roles/action_handler":{"classes":["core/com/zoho/crm/api/contact_roles/api_exception","core/com/zoho/crm/api/contact_roles/action_wrapper"],"interface":true},"core/com/zoho/crm/api/scoring_rules/scoring_rule":{"layout":{"structure_name":"core/com/zoho/crm/api/scoring_rules/layout","name":"layout","type":"core/com/zoho/crm/api/scoring_rules/layout"},"modifiedTime":{"name":"modified_time","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"fieldRules":{"structure_name":"core/com/zoho/crm/api/scoring_rules/field_rule","name":"field_rules","type":"List"},"module":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"module","type":"core/com/zoho/crm/api/modules/modules"},"name":{"name":"name","max-length":25,"type":"String"},"signalRules":{"structure_name":"core/com/zoho/crm/api/scoring_rules/signal_rule","name":"signal_rules","type":"List"},"description":{"name":"description","max-length":500,"type":"String"},"createdTime":{"name":"created_time","type":"String"},"active":{"name":"active","type":"Boolean"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/fields/association_details":{"lookupField":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"lookup_field","type":"core/com/zoho/crm/api/modules/minified_module"},"relatedField":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"related_field","type":"core/com/zoho/crm/api/modules/minified_module"}},"core/com/zoho/crm/api/attachments/attachment":{"owner":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Owner","type":"core/com/zoho/crm/api/users/minified_user"},"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"fileName":{"name":"File_Name","type":"String"},"attachmentType":{"name":"$attachment_type","type":"Integer"},"editable":{"name":"$editable","type":"Boolean"},"type":{"name":"$type","type":"String"},"sharingPermission":{"name":"$sharing_permission","type":"String"},"parentId":{"structure_name":"core/com/zoho/crm/api/attachments/parent_id","name":"Parent_Id","type":"core/com/zoho/crm/api/attachments/parent_id"},"seModule":{"name":"$se_module","type":"String"},"size":{"name":"Size","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"linkUrl":{"name":"$link_url","type":"String"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"state":{"name":"$state","type":"String"},"fileId":{"name":"$file_id","type":"String"}},"core/com/zoho/crm/api/taxes/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","INVALID_DATA","EXPECTED_FIELD_MISSING","OAUTH_SCOPE_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INTERNAL_ERROR","BAD_REQUEST","NO_PERMISSION","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"param","type":"String"},{"name":"id","type":"String"},{"name":"name","type":"String"},{"name":"value","type":"String"},{"name":"maximum_length","type":"Integer"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"deprecated_version","type":"String"},{"structure_name":"core/com/zoho/crm/api/taxes/expected_field","name":"expected_fields","type":"List"}],"name":"details","type":"Map"},"message":{"values":["One of the expected parameter is missing","Given ID does not exist","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","required field not found","Sequence number out of range","Sequence number cannot be repeated in same request","tax not deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/pipeline/update_pipelines_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/email_templates/email_template":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"attachments":{"structure_name":"core/com/zoho/crm/api/email_templates/attachment","name":"attachments","type":"List"},"subject":{"name":"subject","type":"String"},"consentLinked":{"name":"consent_linked","type":"Boolean"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"lastUsageTime":{"name":"last_usage_time","type":"DateTime"},"editorMode":{"name":"editor_mode","type":"String"},"description":{"name":"description","type":"String"},"lastVersionStatistics":{"structure_name":"core/com/zoho/crm/api/email_templates/last_version_statistics","name":"last_version_statistics","type":"core/com/zoho/crm/api/email_templates/last_version_statistics"},"type":{"name":"type","type":"String"},"content":{"name":"content","type":"String"},"folder":{"structure_name":"core/com/zoho/crm/api/inventory_templates/folder","name":"folder","type":"core/com/zoho/crm/api/inventory_templates/folder"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"associated":{"name":"associated","type":"Boolean"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"category":{"name":"category","type":"String"},"favorite":{"name":"favorite","type":"Boolean"}},"core/com/zoho/crm/api/available_currencies/response_handler":{"classes":["core/com/zoho/crm/api/available_currencies/response_wrapper","core/com/zoho/crm/api/available_currencies/api_exception"],"interface":true},"core/com/zoho/crm/api/holidays/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/email_templates/response_handler":{"classes":["core/com/zoho/crm/api/email_templates/response_wrapper","core/com/zoho/crm/api/email_templates/api_exception"],"interface":true},"core/com/zoho/crm/api/mass_delete_cvid/territory":{"id":{"name":"id","type":"Long"},"includeChild":{"name":"include_child","type":"Boolean"}},"core/com/zoho/crm/api/user_type_users/get_usersof_user_type_param":{"filters":{"name":"filters","type":"String"},"type":{"name":"type","type":"String","required":true}},"core/com/zoho/crm/api/share_records/body_wrapper":{"notifyOnCompletion":{"name":"notify_on_completion","type":"Boolean"},"share":{"structure_name":"core/com/zoho/crm/api/share_records/share_record","name":"share","max-length":10,"type":"List","min-length":1},"notify":{"name":"notify","type":"Boolean"}},"core/com/zoho/crm/api/portal_user_type/api_exception":{"code":{"values":["INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_change_owner/response_handler":{"classes":["core/com/zoho/crm/api/mass_change_owner/response_wrapper","core/com/zoho/crm/api/mass_change_owner/api_exception"],"interface":true},"core/com/zoho/crm/api/users_unavailability/users_unavailability":{"allDay":{"name":"all_day","type":"Boolean"},"comments":{"name":"comments","max-length":250,"type":"String"},"service":{"name":"service","type":"String"},"tpCalendarId":{"name":"tp_calendar_id","type":"String"},"from":{"name":"from","type":"DateTime"},"tpEventId":{"name":"tp_event_id","type":"String"},"id":{"name":"id","type":"Long"},"to":{"name":"to","type":"DateTime"},"title":{"name":"title","type":"String"},"user":{"structure_name":"core/com/zoho/crm/api/users_unavailability/user","name":"user","type":"core/com/zoho/crm/api/users_unavailability/user"}},"core/com/zoho/crm/api/email_related_records/email":{"cc":{"structure_name":"core/com/zoho/crm/api/email_related_records/user_details","name":"cc","type":"List"},"summary":{"name":"summary","type":"String"},"owner":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"owner","type":"core/com/zoho/crm/api/users/minified_user"},"sentimentInfo":{"values":["positive","negative","neutral"],"name":"sentiment_info","type":"utils/util/choice"},"attachments":{"structure_name":"core/com/zoho/crm/api/email_related_records/attachments","name":"attachments","type":"List"},"read":{"name":"read","type":"Boolean"},"subject":{"name":"subject","type":"String"},"editable":{"name":"editable","type":"Boolean"},"messageId":{"name":"message_id","type":"String"},"source":{"name":"source","type":"String"},"sent":{"name":"sent","type":"Boolean"},"intent":{"values":["query","request","purchase","complaints","others","spam"],"name":"intent","type":"utils/util/choice"},"content":{"name":"content","type":"String"},"threadId":{"name":"thread_id","type":"Long"},"linkedRecord":{"structure_name":"core/com/zoho/crm/api/email_related_records/linked_record","name":"linked_record","type":"core/com/zoho/crm/api/email_related_records/linked_record"},"emotion":{"name":"emotion","type":"String"},"replyTo":{"structure_name":"core/com/zoho/crm/api/email_related_records/user_details","name":"reply_to","type":"core/com/zoho/crm/api/email_related_records/user_details"},"sentTime":{"name":"sent_time","type":"String"},"from":{"structure_name":"core/com/zoho/crm/api/email_related_records/user_details","name":"from","type":"core/com/zoho/crm/api/email_related_records/user_details"},"mailFormat":{"name":"mail_format","type":"String"},"to":{"structure_name":"core/com/zoho/crm/api/email_related_records/user_details","name":"to","type":"List"},"time":{"name":"time","type":"DateTime"},"status":{"structure_name":"core/com/zoho/crm/api/email_related_records/status","name":"status","type":"List"}},"core/com/zoho/crm/api/bulk_write/success_response":{"code":{"values":["FILE_UPLOAD_SUCCESS","SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"file_id","type":"Long"},{"name":"created_time","type":"DateTime"},{"name":"id","type":"String"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"}],"name":"details","type":"Map"},"message":{"values":["file uploaded.","success"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/multiselectlookup":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"connectedModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"connected_module","type":"core/com/zoho/crm/api/modules/minified_module"},"connectedlookupApiname":{"name":"connectedlookup_apiname","type":"String"},"connectedfieldApiname":{"name":"connectedfield_apiname","type":"String"},"lookupApiname":{"name":"lookup_apiname","type":"String"},"linkingModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"linking_module","type":"core/com/zoho/crm/api/modules/minified_module"},"id":{"name":"id","type":"Long"},"recordAccess":{"name":"record_access","type":"Boolean"}},"core/com/zoho/crm/api/reschedule_history/approval":{"delegate":{"name":"delegate","type":"Boolean"},"approve":{"name":"approve","type":"Boolean"},"reject":{"name":"reject","type":"Boolean"},"resubmit":{"name":"resubmit","type":"Boolean"}},"core/com/zoho/crm/api/org/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/backup/requester":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"zuid":{"name":"zuid","type":"String"}},"core/com/zoho/crm/api/territory_users/api_exception":{"code":{"values":["INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"owner_status","type":"String"},{"name":"id","type":"Long"},{"name":"resource_path_index","type":"Integer"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/associate_email/record":{"linkedRecord":{"structure_name":"core/com/zoho/crm/api/associate_email/linked_record","name":"linked_record","type":"core/com/zoho/crm/api/associate_email/linked_record"},"module":{"structure_name":"core/com/zoho/crm/api/associate_email/module_map","name":"module","type":"core/com/zoho/crm/api/associate_email/module_map"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/user_groups/sources_count":{"territories":{"name":"territories","type":"Integer"},"roles":{"name":"roles","type":"Integer"},"groups":{"name":"groups","type":"Integer"},"users":{"structure_name":"core/com/zoho/crm/api/user_groups/users","name":"users","type":"core/com/zoho/crm/api/user_groups/users"}},"core/com/zoho/crm/api/record/convert_body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/lead_converter","name":"data","max-length":1,"type":"List","min-length":1}},"core/com/zoho/crm/api/related_records/update_related_record_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/associate_email/linked_record":{"module":{"structure_name":"core/com/zoho/crm/api/associate_email/module_map","name":"module","type":"core/com/zoho/crm/api/associate_email/module_map"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/variable_groups/response_wrapper":{"variableGroups":{"structure_name":"core/com/zoho/crm/api/variable_groups/variable_group","name":"variable_groups","type":"List"}},"core/com/zoho/crm/api/layouts/tooltip":{"name":{"values":["Info Icon"],"name":"name","type":"utils/util/choice"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/layouts/layouts":{"displayLabel":{"name":"display_label","type":"String"},"modifiedTime":{"name":"modified_time","type":"DateTime"},"apiName":{"name":"api_name","type":"String"},"createdFor":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_for","type":"core/com/zoho/crm/api/users/minified_user"},"visible":{"name":"visible","type":"Boolean"},"generatedType":{"name":"generated_type","type":"String"},"actionsAllowed":{"structure_name":"core/com/zoho/crm/api/layouts/actions_allowed","name":"actions_allowed","type":"core/com/zoho/crm/api/layouts/actions_allowed"},"hasMoreProfiles":{"name":"has_more_profiles","type":"Boolean"},"profiles":{"structure_name":"core/com/zoho/crm/api/layouts/profiles","name":"profiles","type":"List"},"source":{"name":"source","type":"String"},"showBusinessCard":{"name":"show_business_card","type":"Boolean"},"sections":{"structure_name":"core/com/zoho/crm/api/layouts/sections","name":"sections","type":"List"},"convertMapping":{"structure_name":"core/com/zoho/crm/api/layouts/convert_mapping","name":"convert_mapping","type":"core/com/zoho/crm/api/layouts/convert_mapping"},"displayType":{"name":"display_type","type":"Integer"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/scoring_rules/layout":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/deleted_record":{"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"displayName":{"name":"display_name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"deletedTime":{"name":"deleted_time","type":"DateTime"},"deletedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"deleted_by","type":"core/com/zoho/crm/api/users/minified_user"}},"core/com/zoho/crm/api/hipaa_compliance/modules":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/notifications/action_handler":{"classes":["core/com/zoho/crm/api/notifications/api_exception","core/com/zoho/crm/api/notifications/action_wrapper"],"interface":true},"core/com/zoho/crm/api/layouts/section_subform_field":{"layout":{"structure_name":"core/com/zoho/crm/api/layouts/minified_layout","name":"layout","type":"core/com/zoho/crm/api/layouts/minified_layout"},"module":{"name":"module","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/fiscal_year/response_handler":{"classes":["core/com/zoho/crm/api/fiscal_year/api_exception","core/com/zoho/crm/api/fiscal_year/response_wrapper"],"interface":true},"core/com/zoho/crm/api/users_transfer_delete/status":{"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/notifications/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"structure_name":"core/com/zoho/crm/api/notifications/event","name":"events","type":"List"},{"name":"resource_uri","type":"String"},{"name":"resource_id","type":"String"},{"name":"channel_id","type":"Long"},{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["Successfully subscribed for actions-watch of the given module","Successfully un-subscribed from actions-watch","Successfully updated the subscribe details","Successfully removed the subscribe details"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/entity_scores/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/entity_scores/entity_scores","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/entity_scores/info","name":"info","type":"core/com/zoho/crm/api/entity_scores/info"}},"core/com/zoho/crm/api/users_unavailability/response_handler":{"classes":["core/com/zoho/crm/api/users_unavailability/response_wrapper","core/com/zoho/crm/api/users_unavailability/api_exception"],"interface":true},"core/com/zoho/crm/api/record/mass_update_body_wrapper":{"cvid":{"name":"cvid","type":"String"},"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"List"},"criteria":{"structure_name":"core/com/zoho/crm/api/record/criteria","name":"criteria","type":"List"},"ids":{"name":"ids","type":"List"},"territory":{"structure_name":"core/com/zoho/crm/api/record/mass_update_territory","name":"territory","type":"core/com/zoho/crm/api/record/mass_update_territory"},"overWrite":{"name":"over_write","type":"Boolean"}},"core/com/zoho/crm/api/taxes/tax":{"displayLabel":{"name":"display_label","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"delete1":{"name":"_delete","type":"Boolean"},"value":{"regex":"[0-9]{7}","name":"value","type":"Double"}},"core/com/zoho/crm/api/modules/related_list_properties":{"sortOrder":{"name":"sort_order","type":"String"},"sortBy":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"sort_by","type":"core/com/zoho/crm/api/fields/minified_field"},"fields":{"name":"fields","type":"List"}},"core/com/zoho/crm/api/users_unavailability/get_users_unavailability_param":{"territoryIds":{"name":"territory_ids","type":"String"},"roleIds":{"name":"role_ids","type":"String"},"groupIds":{"name":"group_ids","type":"String"},"filters":{"name":"filters","type":"String"},"includeInnerDetails":{"values":["user.zuid"],"name":"include_inner_details","type":"String"}},"core/com/zoho/crm/api/appointment_preference/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","DEPENDENT_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"structure_name":"utils/util/choice","values":["create_deal","do_not_create_deal"],"name":"supported_values","type":"List"},{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"}],"name":"dependee","type":"Map"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/conversion_option":{"preferenceFieldMatchedValue":{"structure_name":"core/com/zoho/crm/api/record/preference_field_matched_value","name":"preference_field_matched_value","type":"core/com/zoho/crm/api/record/preference_field_matched_value"},"deals":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Deals","type":"List"},"modulePreference":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"module_preference","type":"core/com/zoho/crm/api/modules/modules"},"accounts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Accounts","type":"List"},"contacts":{"structure_name":"core/com/zoho/crm/api/record/record","name":"Contacts","type":"List"},"modulesWithMultipleLayouts":{"structure_name":"core/com/zoho/crm/api/modules/modules","name":"modules_with_multiple_layouts","type":"List"}},"core/com/zoho/crm/api/record/mass_update_response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/mass_update_response","name":"data","type":"List"}},"core/com/zoho/crm/api/roles/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/org/license_details":{"paidType":{"name":"paid_type","type":"String"},"trialAction":{"name":"trial_action","type":"String"},"trialType":{"name":"trial_type","type":"String"},"paidExpiry":{"name":"paid_expiry","type":"DateTime"},"paid":{"name":"paid","type":"Boolean"},"usersLicensePurchased":{"name":"users_license_purchased","type":"Integer"},"trialExpiry":{"name":"trial_expiry","type":"String"}},"core/com/zoho/crm/api/pipeline/update_pipeline_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/user_groups/association_response":{"resource":{"structure_name":"core/com/zoho/crm/api/user_groups/resource","name":"resource","type":"core/com/zoho/crm/api/user_groups/resource"},"detail":{"structure_name":"core/com/zoho/crm/api/user_groups/association_module","name":"detail","type":"core/com/zoho/crm/api/user_groups/association_module"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/share_records/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"String"}],"name":"details","type":"Map"},"message":{"values":["record will be shared successfully","Sharing Revoked"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_invite/portal_invite":{"data":{"structure_name":"core/com/zoho/crm/api/portal_invite/portal","name":"data","type":"List"}},"core/com/zoho/crm/api/available_currencies/currency":{"displayValue":{"name":"display_value","type":"String"},"symbol":{"name":"symbol","type":"String"},"thousandSeparator":{"name":"thousand_separator","type":"String"},"decimalPlaces":{"name":"decimal_places","type":"String"},"decimalSeparator":{"name":"decimal_separator","type":"String"},"isoCode":{"name":"iso_code","type":"String"},"displayName":{"name":"display_name","type":"String"}},"core/com/zoho/crm/api/bulk_read/action_response":{"classes":["core/com/zoho/crm/api/bulk_read/success_response","core/com/zoho/crm/api/bulk_read/api_exception"],"interface":true},"core/com/zoho/crm/api/reschedule_history/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/reschedule_history/reschedule_history","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/reschedule_history/info","name":"info","type":"List"}},"core/com/zoho/crm/api/holidays/holiday":{"date":{"name":"date","type":"Date"},"year":{"name":"year","type":"Integer"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"shiftHour":{"structure_name":"core/com/zoho/crm/api/holidays/shift_hour","name":"shift_hour","type":"core/com/zoho/crm/api/holidays/shift_hour"}},"core/com/zoho/crm/api/users/action_handler":{"classes":["core/com/zoho/crm/api/users/api_exception","core/com/zoho/crm/api/users/action_wrapper"],"interface":true},"core/com/zoho/crm/api/variable_groups/response_handler":{"classes":["core/com/zoho/crm/api/variable_groups/response_wrapper","core/com/zoho/crm/api/variable_groups/api_exception"],"interface":true},"core/com/zoho/crm/api/bulk_read/query":{"cvid":{"name":"cvid","type":"Long"},"criteria":{"structure_name":"core/com/zoho/crm/api/bulk_read/criteria","name":"criteria","type":"core/com/zoho/crm/api/bulk_read/criteria"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"page":{"regex":"[0-9]|[1-4][0-9]|50","name":"page","type":"Integer"},"fields":{"name":"fields","type":"List"},"fileType":{"values":["ics"],"name":"file_type","type":"utils/util/choice"}},"core/com/zoho/crm/api/modules/module_fields":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"sharingProperties":{"structure_name":"core/com/zoho/crm/api/modules/sharing_properties","name":"sharing_properties","type":"core/com/zoho/crm/api/modules/sharing_properties"},"apiName":{"name":"api_name","type":"String"},"webhook":{"name":"webhook","type":"Boolean"},"associatedModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"associated_module","type":"core/com/zoho/crm/api/modules/minified_module"},"defaultValue":{"name":"default_value","type":"String"},"tooltip":{"structure_name":"core/com/zoho/crm/api/fields/tooltip","name":"tooltip","type":"core/com/zoho/crm/api/fields/tooltip"},"quickSequenceNumber":{"name":"quick_sequence_number","type":"String"},"jsonType":{"name":"json_type","type":"String"},"type":{"name":"type","type":"String"},"availableInUserLayout":{"name":"available_in_user_layout","type":"Boolean"},"rollupSummary":{"structure_name":"core/com/zoho/crm/api/fields/rollup_summary","name":"rollup_summary","type":"core/com/zoho/crm/api/fields/rollup_summary"},"blueprintSupported":{"name":"blueprint_supported","type":"Boolean"},"createdTime":{"name":"created_time","type":"DateTime"},"showType":{"name":"show_type","type":"Integer"},"globalPicklist":{"name":"global_picklist","type":"Object"},"id":{"name":"id","type":"Long"},"additionalColumn":{"name":"additional_column","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"filterable":{"name":"filterable","type":"Boolean"},"emailParser":{"structure_name":"core/com/zoho/crm/api/fields/email_parser","name":"email_parser","type":"core/com/zoho/crm/api/fields/email_parser"},"visible":{"name":"visible","type":"Boolean"},"dataType":{"values":["formula","text","boolean","picklist","datetime","website","autonumber","textarea","email","phone","integer","double","date","formula","text","boolean","picklist","datetime","website","autonumber","textarea","lookup","email","userlookup","phone","integer","double","date"],"name":"data_type","type":"utils/util/choice"},"profiles":{"structure_name":"core/com/zoho/crm/api/fields/profile","name":"profiles","type":"List"},"readOnly":{"name":"read_only","type":"Boolean"},"historyTracking":{"structure_name":"core/com/zoho/crm/api/fields/history_tracking","name":"history_tracking","type":"core/com/zoho/crm/api/fields/history_tracking"},"systemMandatory":{"name":"system_mandatory","type":"Boolean"},"separator":{"name":"separator","type":"Boolean"},"customField":{"name":"custom_field","type":"Boolean"},"searchable":{"name":"searchable","type":"Boolean"},"decimalPlace":{"name":"decimal_place","type":"Integer"},"createdSource":{"name":"created_source","type":"String"},"displayType":{"name":"display_type","type":"Integer"},"external":{"structure_name":"core/com/zoho/crm/api/fields/external","name":"external","type":"core/com/zoho/crm/api/fields/external"},"subModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"sub_module","type":"core/com/zoho/crm/api/modules/minified_module"},"unique":{"structure_name":"core/com/zoho/crm/api/fields/unique","name":"unique","type":"core/com/zoho/crm/api/fields/unique"},"viewType":{"structure_name":"core/com/zoho/crm/api/fields/view_type","name":"view_type","type":"core/com/zoho/crm/api/fields/view_type"},"displayField":{"name":"display_field","type":"Boolean"},"operationType":{"structure_name":"core/com/zoho/crm/api/fields/operation_type","name":"operation_type","type":"core/com/zoho/crm/api/fields/operation_type"},"hipaaComplianceEnabled":{"name":"hipaa_compliance_enabled","type":"Boolean"},"crypt":{"structure_name":"core/com/zoho/crm/api/fields/crypt","name":"crypt","type":"core/com/zoho/crm/api/fields/crypt"},"fileUpoladOptionlist":{"structure_name":"core/com/zoho/crm/api/fields/file_upolad_option","name":"file_upolad_optionlist","type":"List"},"enableColourCode":{"name":"enable_colour_code","type":"Boolean"},"virtualField":{"name":"virtual_field","type":"Boolean"},"hipaaCompliance":{"structure_name":"core/com/zoho/crm/api/fields/hipaa_compliance","name":"hipaa_compliance","type":"core/com/zoho/crm/api/fields/hipaa_compliance"},"associationDetails":{"structure_name":"core/com/zoho/crm/api/fields/association_details","name":"association_details","type":"core/com/zoho/crm/api/fields/association_details"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/fields/pick_list_value","name":"pick_list_values","type":"List"},"fieldLabel":{"name":"field_label","type":"String"},"referFromField":{"structure_name":"core/com/zoho/crm/api/fields/refer_from_field","name":"refer_from_field","type":"core/com/zoho/crm/api/fields/refer_from_field"},"allowedModules":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"allowed_modules","type":"List"},"fieldReadOnly":{"name":"field_read_only","type":"Boolean"},"businesscardSupported":{"name":"businesscard_supported","type":"Boolean"},"currency":{"structure_name":"core/com/zoho/crm/api/fields/currency","name":"currency","type":"core/com/zoho/crm/api/fields/currency"},"multiuserlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiuserlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"displayLabel":{"name":"display_label","type":"String"},"lookup":{"structure_name":"core/com/zoho/crm/api/modules/module_field_lookup","name":"lookup","type":"core/com/zoho/crm/api/modules/module_field_lookup"},"length":{"values":[120],"name":"length","type":"utils/util/choice"},"pickListValuesSortedLexically":{"name":"pick_list_values_sorted_lexically","type":"Boolean"},"sortable":{"name":"sortable","type":"Boolean"},"autoNumber":{"structure_name":"core/com/zoho/crm/api/fields/auto_number","name":"auto_number","type":"core/com/zoho/crm/api/fields/auto_number"},"private1":{"structure_name":"core/com/zoho/crm/api/fields/private","name":"private","type":"core/com/zoho/crm/api/fields/private"},"convertMapping":{"structure_name":"core/com/zoho/crm/api/fields/convert_mapping","name":"convert_mapping","type":"core/com/zoho/crm/api/fields/convert_mapping"},"multiModuleLookup":{"structure_name":"core/com/zoho/crm/api/fields/multi_module_lookup","name":"multi_module_lookup","type":"core/com/zoho/crm/api/fields/multi_module_lookup"},"massUpdate":{"name":"mass_update","type":"Boolean"},"uiType":{"name":"ui_type","type":"Integer"},"formula":{"structure_name":"core/com/zoho/crm/api/fields/formula","name":"formula","type":"core/com/zoho/crm/api/fields/formula"},"category":{"name":"category","type":"Integer"},"multiselectlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiselectlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"columnName":{"name":"column_name","type":"String"}},"core/com/zoho/crm/api/timelines/name_id_structure":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/variables/api_exception":{"code":{"values":["DUPLICATE_DATA","REQUIRED_PARAM_MISSING","JSON_PARSE_ERROR","PATTERN_NOT_MATCHED","INVALID_DATA","MANDATORY_NOT_FOUND","EXPECTED_FIELD_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"param_name","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"},{"name":"maximum_length","type":"Integer"},{"structure_name":"core/com/zoho/crm/api/variables/error_details","name":"expected_fields","type":"List"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/share_records/delete_action_handler":{"classes":["core/com/zoho/crm/api/share_records/delete_action_wrapper","core/com/zoho/crm/api/share_records/api_exception"],"interface":true},"core/com/zoho/crm/api/scoring_rules/signal":{"namespace":{"values":["EmailInsight"],"name":"namespace","type":"utils/util/choice"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/holidays/create_business_holiday":{"holidays":{"structure_name":"core/com/zoho/crm/api/holidays/business_holiday","name":"holidays","type":"List"}},"core/com/zoho/crm/api/inventory_templates/get_inventory_templates_param":{"module":{"name":"module","type":"String"},"sortOrder":{"name":"sort_order","type":"String"},"sortBy":{"name":"sort_by","type":"String"},"category":{"name":"category","type":"String"}},"core/com/zoho/crm/api/tags/count_response_wrapper":{"count":{"name":"count","type":"String"}},"core/com/zoho/crm/api/business_hours/response_handler":{"classes":["core/com/zoho/crm/api/business_hours/response_wrapper","core/com/zoho/crm/api/business_hours/api_exception"],"interface":true},"core/com/zoho/crm/api/portals_meta/filters":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/tags/action_response":{"classes":["core/com/zoho/crm/api/tags/api_exception","core/com/zoho/crm/api/tags/success_response"],"interface":true},"core/com/zoho/crm/api/backup/action_handler":{"classes":["core/com/zoho/crm/api/backup/action_wrapper","core/com/zoho/crm/api/backup/api_exception"],"interface":true},"core/com/zoho/crm/api/mass_convert/portal_user_type":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/tags/body_wrapper":{"tags":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"tags","type":"List"}},"core/com/zoho/crm/api/associate_email/body_wrapper":{"emails":{"structure_name":"core/com/zoho/crm/api/associate_email/associate_email","name":"Emails","type":"List"}},"core/com/zoho/crm/api/bulk_write/field_mapping":{"apiName":{"name":"api_name","type":"String"},"defaultValue":{"structure_name":"core/com/zoho/crm/api/bulk_write/default_value","name":"default_value","type":"core/com/zoho/crm/api/bulk_write/default_value"},"module":{"name":"module","type":"String"},"format":{"name":"format","type":"String"},"index":{"name":"index","type":"Integer"},"findBy":{"name":"find_by","type":"String"}},"core/com/zoho/crm/api/shift_hours/response_wrapper":{"shiftHours":{"structure_name":"core/com/zoho/crm/api/shift_hours/shift_hours","name":"shift_hours","type":"List"},"shiftCount":{"structure_name":"core/com/zoho/crm/api/shift_hours/shift_count","name":"shift_count","type":"core/com/zoho/crm/api/shift_hours/shift_count"}},"core/com/zoho/crm/api/available_currencies/response_wrapper":{"availableCurrencies":{"structure_name":"core/com/zoho/crm/api/available_currencies/currency","name":"available_currencies","type":"List"}},"core/com/zoho/crm/api/mass_delete_cvid/action_handler":{"classes":["core/com/zoho/crm/api/mass_delete_cvid/api_exception","core/com/zoho/crm/api/mass_delete_cvid/action_wrapper"],"interface":true},"core/com/zoho/crm/api/profiles/get_profiles_param":{"includeLiteProfile":{"name":"include_lite_profile","type":"Boolean"}},"core/com/zoho/crm/api/custom_views/get_custom_views_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/variables/body_wrapper":{"variables":{"structure_name":"core/com/zoho/crm/api/variables/variable","name":"variables","type":"List"}},"core/com/zoho/crm/api/blueprint/multi_select_lookup":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"connectedlookupApiname":{"name":"connectedlookup_apiname","type":"String"},"lookupApiname":{"name":"lookup_apiname","type":"String"},"linkingModule":{"name":"linking_module","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/email_templates/attachment":{"fileName":{"name":"file_name","type":"String"},"size":{"name":"size","type":"Long"},"id":{"name":"id","type":"Long"},"fileId":{"name":"file_id","type":"String"}},"core/com/zoho/crm/api/email_related_records/get_emails_related_records_param":{"index":{"name":"index","type":"String"},"type":{"values":["sent_from_crm","scheduled_in_crm","drafts","user_emails"],"name":"type","type":"String","required":true},"ownerId":{"name":"owner_id","type":"Long","required":true}},"core/com/zoho/crm/api/cancel_meetings/action_handler":{"classes":["core/com/zoho/crm/api/cancel_meetings/action_wrapper","core/com/zoho/crm/api/cancel_meetings/api_exception"],"interface":true},"core/com/zoho/crm/api/users_unavailability/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/users_territories/transfer_action_handler":{"classes":["core/com/zoho/crm/api/users_territories/api_exception","core/com/zoho/crm/api/users_territories/action_wrapper","core/com/zoho/crm/api/users_territories/transfer_action_wrapper"],"interface":true},"core/com/zoho/crm/api/email_templates/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_convert/move_attachments_to":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/tags/info":{"count":{"name":"count","type":"Integer"},"allowedCount":{"name":"allowed_count","type":"Integer"}},"core/com/zoho/crm/api/contact_roles/action_response":{"classes":["core/com/zoho/crm/api/contact_roles/api_exception","core/com/zoho/crm/api/contact_roles/success_response"],"interface":true},"core/com/zoho/crm/api/currencies/action_handler":{"classes":["core/com/zoho/crm/api/currencies/api_exception","core/com/zoho/crm/api/currencies/action_wrapper","core/com/zoho/crm/api/currencies/base_currency_action_wrapper"],"interface":true},"core/com/zoho/crm/api/holidays/action_response":{"classes":["core/com/zoho/crm/api/holidays/api_exception","core/com/zoho/crm/api/holidays/success_response"],"interface":true},"core/com/zoho/crm/api/record/mass_update_action_handler":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/mass_update_action_wrapper"],"interface":true},"core/com/zoho/crm/api/send_mail/action_response":{"classes":["core/com/zoho/crm/api/send_mail/success_response","core/com/zoho/crm/api/send_mail/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/body_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/users_territories/territory","name":"territories","type":"List"}},"core/com/zoho/crm/api/reschedule_history/action_handler":{"classes":["core/com/zoho/crm/api/reschedule_history/api_exception","core/com/zoho/crm/api/reschedule_history/action_wrapper"],"interface":true},"core/com/zoho/crm/api/user_groups/user_group":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/deal_contact_roles/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_DATA","EXPECTED_FIELD_MISSING","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR","REQUIRED_PARAM_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"resource_path_index","type":"Integer"},{"structure_name":"core/com/zoho/crm/api/deal_contact_roles/error_details","name":"expected_fields","type":"List"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"param_name","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/file_upolad_option":{"displayValue":{"name":"display_value","type":"String"},"actualValue":{"name":"actual_value","type":"String"}},"core/com/zoho/crm/api/custom_views/translation":{"createdByMe":{"name":"created_by_me","type":"String"},"otherUsersViews":{"name":"other_users_views","type":"String"},"publicViews":{"name":"public_views","type":"String"},"sharedWithMe":{"name":"shared_with_me","type":"String"}},"core/com/zoho/crm/api/users_territories/validation_wrapper":{"validateBeforeTransfer":{"structure_name":"core/com/zoho/crm/api/users_territories/validation_group","name":"validate_before_transfer","type":"List"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline_action_handler":{"classes":["core/com/zoho/crm/api/pipeline/api_exception","core/com/zoho/crm/api/pipeline/transfer_pipeline_action_wrapper"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/pick_list_mapping":{"displayValue":{"name":"display_value","type":"String"},"maps":{"structure_name":"core/com/zoho/crm/api/field_map_dependency/picklist_map","name":"maps","type":"List"},"actualValue":{"name":"actual_value","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mass_delete_cvid/action_response":{"classes":["core/com/zoho/crm/api/mass_delete_cvid/success_response","core/com/zoho/crm/api/mass_delete_cvid/mass_delete_scheduled","core/com/zoho/crm/api/mass_delete_cvid/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/transfer_action_wrapper":{"transferAndDelink":{"structure_name":"core/com/zoho/crm/api/users_territories/transfer_action_response","name":"transfer_and_delink","type":"List"}},"core/com/zoho/crm/api/wizards/segment":{"displayLabel":{"name":"display_label","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"buttons":{"structure_name":"core/com/zoho/crm/api/wizards/button","name":"buttons","type":"List"},"resource":{"structure_name":"core/com/zoho/crm/api/wizards/resource","name":"resource","type":"core/com/zoho/crm/api/wizards/resource"},"id":{"name":"id","type":"Long"},"columnCount":{"name":"column_count","type":"Integer"},"type":{"name":"type","type":"String"},"fields":{"structure_name":"core/com/zoho/crm/api/fields/fields","name":"fields","type":"List"}},"core/com/zoho/crm/api/hipaa_compliance/api_exception":{"code":{"values":["INVALID_API_NAME","NOT_SUPPORTED"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/wizards/api_exception":{"code":{"values":["INVALID_DATA","INTERNAL_ERROR","OAUTH_SCOPE_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","BAD_REQUEST","NO_PERMISSION","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"permissions","type":"List"},{"name":"param_name","type":"String"},{"name":"api_name","type":"String"}],"name":"details","type":"Map"},"message":{"values":["Invalid Wizard ID","the module name given seems to be invalid","feature not available in this edition","permission denied","invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","Internal server error occurred."],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_read/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/mail_merge/download_mail_merge":{"fileName":{"name":"file_name","max-length":255,"type":"String"},"password":{"name":"password","type":"String"},"mailMergeTemplate":{"structure_name":"core/com/zoho/crm/api/mail_merge/mail_merge_template","name":"mail_merge_template","type":"core/com/zoho/crm/api/mail_merge/mail_merge_template"},"outputFormat":{"values":["pdf","docx","html"],"name":"output_format","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_invite/success_response":{"code":{"values":["SUCCESS","SCHEDULED"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"record_id","type":"Long"},{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/users_territories/territory":{"manager":{"structure_name":"core/com/zoho/crm/api/users_territories/manager","name":"Manager","type":"core/com/zoho/crm/api/users_territories/manager"},"name":{"name":"Name","type":"String"},"id":{"name":"id","type":"Long"},"reportingTo":{"structure_name":"core/com/zoho/crm/api/users_territories/manager","name":"Reporting_To","type":"core/com/zoho/crm/api/users_territories/manager"}},"core/com/zoho/crm/api/record/mass_update_response_handler":{"classes":["core/com/zoho/crm/api/record/mass_update_response_wrapper","core/com/zoho/crm/api/record/api_exception"],"interface":true},"core/com/zoho/crm/api/layouts/default_view":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete_by_id":{"transfer":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/transfer","name":"transfer","type":"core/com/zoho/crm/api/users_transfer_delete/transfer"},"moveSubordinate":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/move_subordinate","name":"move_subordinate","type":"core/com/zoho/crm/api/users_transfer_delete/move_subordinate"}},"core/com/zoho/crm/api/contact_roles/contact_role":{"sequenceNumber":{"name":"sequence_number","type":"Integer"},"name":{"regex":"[A-Za-z0-9]{50}","name":"name","max-length":50,"type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/multi_select_lookup":{"fieldname":{"name":"fieldName","type":"Map"},"hasMore":{"name":"$has_more","type":"Map"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/related_records/delete_related_records_using_external_id_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/currencies/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/appointment_preference/field_mappings":{"field":{"structure_name":"core/com/zoho/crm/api/appointment_preference/field","name":"field","type":"core/com/zoho/crm/api/appointment_preference/field"},"type":{"values":["static","merge_field"],"name":"type","type":"utils/util/choice"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/modules/territory":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"subordinates":{"name":"subordinates","type":"Boolean"}},"core/com/zoho/crm/api/attachments/get_attachments_param":{"perPage":{"name":"per_page","type":"Integer"},"ids":{"name":"ids","type":"Long","required":true},"page":{"name":"page","type":"Integer"},"fields":{"name":"fields","type":"String","required":true}},"core/com/zoho/crm/api/mass_delete_cvid/record_id_body_wrapper":{"ids":{"name":"ids","max-length":10,"type":"List"},"territory":{"structure_name":"core/com/zoho/crm/api/mass_delete_cvid/territory","name":"territory","type":"core/com/zoho/crm/api/mass_delete_cvid/territory"}},"core/com/zoho/crm/api/taxes/org_tax":{"preference":{"structure_name":"core/com/zoho/crm/api/taxes/preference","name":"preference","type":"core/com/zoho/crm/api/taxes/preference"},"taxes":{"structure_name":"core/com/zoho/crm/api/taxes/tax","name":"taxes","type":"List"}},"core/com/zoho/crm/api/associate_email/to":{"userName":{"name":"user_name","type":"String"},"email":{"regex":"[a-z]{7}[@]zoho[.]com","name":"email","type":"String"}},"core/com/zoho/crm/api/share_records/delete_action_wrapper":{"share":{"structure_name":"core/com/zoho/crm/api/share_records/delete_action_response","name":"share","interface":true,"type":"core/com/zoho/crm/api/share_records/delete_action_response"}},"core/com/zoho/crm/api/fields/rollup_criteria":{"comparator":{"name":"comparator","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/fields/minified_field","name":"field","type":"core/com/zoho/crm/api/fields/minified_field"},"value":{"name":"value","type":"Object"}},"core/com/zoho/crm/api/email_compose_meta/compose_settings":{"fontFamily":{"name":"font_family","type":"String"},"emailSignatures":{"name":"email_signatures","type":"List"},"defaultFromAddress":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/default_form","name":"default_from_address","type":"core/com/zoho/crm/api/email_compose_meta/default_form"},"fontSize":{"name":"font_size","type":"Integer"}},"core/com/zoho/crm/api/users_unavailability/user":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"zuid":{"name":"zuid","type":"String"}},"core/com/zoho/crm/api/field_attachments/response_handler":{"classes":["core/com/zoho/crm/api/field_attachments/file_body_wrapper","core/com/zoho/crm/api/field_attachments/api_exception"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_DATA","MANDATORY_NOT_FOUND","REQUIRED_PARAM_MISSING","NOT_SUPPORTED","INVALID_URL_PATTERN","INVALID_TOKEN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"param","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/related_lists/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/custom_views/body_wrapper":{"customViews":{"structure_name":"core/com/zoho/crm/api/custom_views/custom_view","name":"custom_views","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/custom_views/info","name":"info","type":"core/com/zoho/crm/api/custom_views/info"}},"core/com/zoho/crm/api/mass_change_owner/check_status_param":{"jobId":{"name":"job_id","type":"Long","required":true}},"core/com/zoho/crm/api/bulk_write/default_value":{"module":{"name":"module","type":"String"},"name":{"name":"name","type":"String"},"value":{"name":"value","type":"Object"}},"core/com/zoho/crm/api/profiles/category":{"classes":["core/com/zoho/crm/api/profiles/category_module","core/com/zoho/crm/api/profiles/category_others"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/get_map_dependency_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/portal_invite/action_response":{"classes":["core/com/zoho/crm/api/portal_invite/success_response","core/com/zoho/crm/api/portal_invite/api_exception"],"interface":true},"core/com/zoho/crm/api/blueprint/auto_number":{"startNumber":{"name":"start_number","type":"Integer"},"prefix":{"name":"prefix","type":"String"},"suffix":{"name":"suffix","type":"String"}},"core/com/zoho/crm/api/user_groups/sources":{"subTerritories":{"name":"sub_territories","type":"Boolean"},"source":{"structure_name":"core/com/zoho/crm/api/user_groups/source","name":"source","type":"core/com/zoho/crm/api/user_groups/source"},"type":{"values":["users","territories","roles"],"name":"type","type":"utils/util/choice"},"subordinates":{"name":"subordinates","type":"Boolean"}},"core/com/zoho/crm/api/blueprint/response_wrapper":{"blueprint":{"structure_name":"core/com/zoho/crm/api/blueprint/blue_print","name":"blueprint","type":"core/com/zoho/crm/api/blueprint/blue_print"}},"core/com/zoho/crm/api/users/action_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/users/action_response","name":"users","type":"List"}},"core/com/zoho/crm/api/layouts/response_handler":{"classes":["core/com/zoho/crm/api/layouts/response_wrapper","core/com/zoho/crm/api/layouts/api_exception"],"interface":true},"core/com/zoho/crm/api/bulk_read/response_handler":{"classes":["core/com/zoho/crm/api/bulk_read/api_exception","core/com/zoho/crm/api/bulk_read/file_body_wrapper","core/com/zoho/crm/api/bulk_read/response_wrapper"],"interface":true},"core/com/zoho/crm/api/notes/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"Modified_Time","type":"DateTime"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"Created_Time","type":"DateTime"},{"name":"id","type":"String"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"}],"name":"details","type":"Map"},"message":{"values":["record added","record updated","record deleted"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/backup/action_wrapper":{"backup":{"structure_name":"core/com/zoho/crm/api/backup/action_response","name":"backup","interface":true,"type":"core/com/zoho/crm/api/backup/action_response"}},"core/com/zoho/crm/api/tags/add_tags_to_multiple_records_param":{"overWrite":{"name":"over_write","type":"String"}},"core/com/zoho/crm/api/users/profile":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/scoring_rules/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"},{"name":"job_id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["scoring rule created successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_delete_cvid/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/mass_delete_cvid/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/backup/history_wrapper":{"history":{"structure_name":"core/com/zoho/crm/api/backup/history","name":"history","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/backup/info","name":"info","type":"core/com/zoho/crm/api/backup/info"}},"core/com/zoho/crm/api/territories/criteria":{"comparator":{"name":"comparator","type":"String"},"groupOperator":{"name":"group_operator","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/territories/field","name":"field","type":"core/com/zoho/crm/api/territories/field"},"value":{"name":"value","type":"Object"},"group":{"structure_name":"core/com/zoho/crm/api/territories/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/fields/multi_module_lookup":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"modules":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"modules","type":"List"}},"core/com/zoho/crm/api/change_owner/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_change_owner/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/mass_change_owner/status","name":"data","type":"List"}},"core/com/zoho/crm/api/portal_invite/action_wrapper":{"portalInvite":{"structure_name":"core/com/zoho/crm/api/portal_invite/action_response","name":"portal_invite","type":"List"}},"core/com/zoho/crm/api/notifications/action_wrapper":{"watch":{"structure_name":"core/com/zoho/crm/api/notifications/action_response","name":"watch","type":"List"}},"core/com/zoho/crm/api/tags/merge_wrapper":{"tags":{"structure_name":"core/com/zoho/crm/api/tags/conflict_wrapper","name":"tags","max-length":1,"type":"List","min-length":1}},"core/com/zoho/crm/api/currencies/base_currency":{"symbol":{"name":"symbol","type":"String"},"isoCode":{"name":"iso_code","type":"String"},"exchangeRate":{"regex":"[1-9]{2}[.][1-9]{9}","name":"exchange_rate","type":"String"},"format":{"structure_name":"core/com/zoho/crm/api/currencies/format","name":"format","type":"core/com/zoho/crm/api/currencies/format"},"name":{"name":"name","type":"String"},"prefixSymbol":{"name":"prefix_symbol","type":"Boolean"},"id":{"name":"id","type":"Long"},"isActive":{"name":"is_active","type":"Boolean"}},"core/com/zoho/crm/api/templates/folder":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/notifications/action_response":{"classes":["core/com/zoho/crm/api/notifications/api_exception","core/com/zoho/crm/api/notifications/success_response"],"interface":true},"core/com/zoho/crm/api/shift_hours/delete_shift_hour_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/field_map_dependency/update_map_dependency_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/layouts/deal_field":{"apiName":{"name":"api_name","type":"String"},"fieldLabel":{"name":"field_label","type":"String"},"id":{"name":"id","type":"Long"},"required":{"name":"required","type":"Boolean"}},"core/com/zoho/crm/api/portal_user_type/fields":{"apiName":{"name":"api_name","type":"String"},"readOnly":{"name":"read_only","type":"Boolean"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/currencies/body_wrapper":{"currencies":{"structure_name":"core/com/zoho/crm/api/currencies/currency","name":"currencies","type":"List"}},"core/com/zoho/crm/api/download_inline_images/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/profiles/permission_detail":{"displayLabel":{"name":"display_label","type":"String"},"module":{"name":"module","type":"String"},"name":{"name":"name","type":"String"},"customizable":{"name":"customizable","type":"Boolean"},"id":{"name":"id","type":"Long"},"enabled":{"values":[true],"name":"enabled","type":"utils/util/choice"},"parentPermissions":{"name":"parent_permissions","type":"List"}},"core/com/zoho/crm/api/backup/history":{"fileName":{"name":"file_name","type":"String"},"repeatType":{"name":"repeat_type","type":"String"},"count":{"name":"count","type":"Integer"},"action":{"name":"action","type":"String"},"id":{"name":"id","type":"Long"},"state":{"name":"state","type":"String"},"doneBy":{"structure_name":"core/com/zoho/crm/api/backup/requester","name":"done_by","type":"core/com/zoho/crm/api/backup/requester"},"logTime":{"name":"log_time","type":"DateTime"}},"core/com/zoho/crm/api/associate_email/action_response":{"classes":["core/com/zoho/crm/api/associate_email/success_response","core/com/zoho/crm/api/associate_email/api_exception"],"interface":true},"core/com/zoho/crm/api/entity_scores/scoring_rule_structure":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portal_user_type/permissions":{"view":{"values":[true],"name":"view","type":"utils/util/choice"},"edit":{"name":"edit","type":"Boolean"},"editSharedRecords":{"name":"edit_shared_records","type":"Boolean"},"create":{"name":"create","type":"Boolean"},"createAttachment":{"name":"create_attachment","type":"Boolean"},"delete1":{"name":"delete","type":"Boolean"},"deleteAttachment":{"name":"delete_attachment","type":"Boolean"}},"core/com/zoho/crm/api/wizards/get_wizardby_id_param":{"layoutId":{"name":"layout_id","type":"String","required":true}},"core/com/zoho/crm/api/bulk_read/request_wrapper":{"query":{"structure_name":"core/com/zoho/crm/api/bulk_read/query","name":"query","type":"core/com/zoho/crm/api/bulk_read/query"},"callback":{"structure_name":"core/com/zoho/crm/api/bulk_read/call_back","name":"callback","type":"core/com/zoho/crm/api/bulk_read/call_back"},"fileType":{"values":["ics","csv"],"name":"file_type","type":"utils/util/choice"}},"core/com/zoho/crm/api/field_map_dependency/sub_module":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portal_invite/data":{"classes":["core/com/zoho/crm/api/portal_invite/success_response","core/com/zoho/crm/api/portal_invite/api_exception"],"interface":true},"core/com/zoho/crm/api/profiles/response_handler":{"classes":["core/com/zoho/crm/api/profiles/profile_wrapper","core/com/zoho/crm/api/profiles/api_exception"],"interface":true},"core/com/zoho/crm/api/profiles/category_others":{"displayLabel":{"name":"display_label","type":"String"},"permissionsDetails":{"name":"permissions_details","type":"List"},"name":{"name":"name","type":"String"}},"core/com/zoho/crm/api/territory_users/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/delete_record_using_external_id_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/record/delete_record_using_external_id_param":{"wfTrigger":{"name":"wf_trigger","type":"Boolean"}},"core/com/zoho/crm/api/appointment_preference/layout":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/entity_scores/get_modules_param":{"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/user_groups/response_handler":{"classes":["core/com/zoho/crm/api/user_groups/response_wrapper","core/com/zoho/crm/api/user_groups/associated_user_count","core/com/zoho/crm/api/user_groups/association_wrapper","core/com/zoho/crm/api/user_groups/api_exception","core/com/zoho/crm/api/user_groups/sources_wrapper","core/com/zoho/crm/api/user_groups/sources_count_wrapper"],"interface":true},"core/com/zoho/crm/api/query/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/record/info","name":"info","type":"core/com/zoho/crm/api/record/info"}},"core/com/zoho/crm/api/blueprint/formula":{"expression":{"name":"expression","type":"Integer"},"returnType":{"name":"return_type","type":"String"}},"core/com/zoho/crm/api/related_records/response_handler":{"classes":["core/com/zoho/crm/api/related_records/response_wrapper","core/com/zoho/crm/api/related_records/file_body_wrapper","core/com/zoho/crm/api/related_records/api_exception"],"interface":true},"core/com/zoho/crm/api/users/customize_info":{"bcView":{"name":"bc_view","type":"Object"},"showDetailView":{"name":"show_detail_view","type":"Boolean"},"showHome":{"name":"show_home","type":"Boolean"},"showRightPanel":{"name":"show_right_panel","type":"Object"},"notesDesc":{"name":"notes_desc","type":"Object"},"unpinRecentItem":{"name":"unpin_recent_item","type":"Object"}},"core/com/zoho/crm/api/contact_roles/api_exception":{"code":{"values":["INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/timelines/automation_detail":{"pathfinder":{"structure_name":"core/com/zoho/crm/api/timelines/path_finder","name":"pathfinder","type":"core/com/zoho/crm/api/timelines/path_finder"},"rule":{"structure_name":"core/com/zoho/crm/api/timelines/name_id_structure","name":"rule","type":"core/com/zoho/crm/api/timelines/name_id_structure"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/org/resource":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/holidays/get_holidays_param":{"shiftId":{"name":"shift_id","type":"Long"},"year":{"name":"year","type":"Integer"},"type":{"values":["business_holiday","shift_holiday"],"name":"type","type":"String"}},"core/com/zoho/crm/api/users/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","EXPECTED_FIELD_MISSING","INTERNAL_SERVER_ERROR","DUPLICATE_DATA","MAPPING_MISMATCH","PATTERN_NOT_MATCHED","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"structure_name":"core/com/zoho/crm/api/users/error_details","name":"expected_fields","type":"List"},{"name":"maximum_length","type":"Integer"},{"name":"resource_path_index","type":"Integer"},{"structure_name":"core/com/zoho/crm/api/users/error_details","name":"mapped_field","type":"core/com/zoho/crm/api/users/error_details"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/wizards/container":{"layout":{"structure_name":"core/com/zoho/crm/api/layouts/layouts","name":"layout","type":"core/com/zoho/crm/api/layouts/layouts"},"chartData":{"structure_name":"core/com/zoho/crm/api/wizards/chart_data","name":"chart_data","type":"core/com/zoho/crm/api/wizards/chart_data"},"screens":{"structure_name":"core/com/zoho/crm/api/wizards/screen","name":"screens","type":"List"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/timelines/record":{"module":{"structure_name":"core/com/zoho/crm/api/timelines/module","name":"module","type":"core/com/zoho/crm/api/timelines/module"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/modules/action_response":{"classes":["core/com/zoho/crm/api/modules/success_response","core/com/zoho/crm/api/modules/api_exception"],"interface":true},"core/com/zoho/crm/api/bulk_read/api_exception":{"code":{"values":["REQUEST_BODY_NOT_SUPPORTED","AMBIGUOUS_CRITERIA","AMBIGUOUS_GROUP_IN_CRITERIA","PAGE_RANGE_EXCEEDED","INVALID_CALLBACK_METHOD","INVALID_CALLBACK_URL","GROUP_OPERATOR_NOT_SUPPORTED","MODULE_NOT_SUPPORTED","RESOURCE_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_SERVICE_NAME","INVALID_BULK_OPERATION","MEDIA_TYPE_NOT_SUPPORTED","REQUEST_BODY_NOT_READABLE","REQUEST_BODY_IS_EMPTY","MODULE_NOT_AVAILABLE","NOT_SUPPORTED_FEATURE","NO_PERMISSION","JOB_NOT_SUPPORTED","QUERY_NOT_SUPPORTED","JOIN_LIMIT_EXCEEDED","CRITERIA_NOT_SUPPORTED","INVALID_CRITERIA","CRITERIA_LIMIT_EXCEEDED","FIELD_AND_COMPARATOR_IN_CRITERIA_NOT_COMPATIBLE","FIELD_IN_CRITERIA_NOT_AVAILABLE","VALUE_IN_CRITERIA_NOT_SUPPORTED","FIELD_AND_VALUE_IN_CRITERIA_NOT_COMPATIBLE","COMPARATOR_AND_VALUE_IN_CRITERIA_NOT_COMPATIBLE","COMPARATOR_AND_ENCRYPTED_VALUE_IN_CRITERIA_NOT_COMPATIBLE","FIELD_NOT_AVAILABLE","FIELD_NOT_SUPPORTED","VALUE_LIMIT_EXCEEDED_IN_CRITERIA","PAGE_NOT_SUPPORTED","TOO_MANY_REQUESTS","CALLBACK_FAILURE","FIELD_IN_CRITERIA_NOT_SUPPORTED","FIELD_COMPARATOR_IN_CRITERIA_NOT_SUPPORTED","CVID_NOT_SUPPORTED","BAD_REQUEST","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"max_limit","type":"Integer"},{"name":"resource","type":"String"},{"name":"message","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"info_message","type":"String"},{"name":"parent_api_name","type":"String"}],"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","Provided service name %s is not valid/not supported","Requested operation is an invalid bulk operation","record not in process","The requested resource doesn't exist.","Media type is not supported.","Unable to parse the request body.","Request body is empty.","Requested module '%s' is not available.","Feature is not supported"," permission denied","Invalid module for the query. Module '%s' is not supported.","Invalid bulk %s job.","Invalid query for bulk %s job. Query '%s' is not supported.","Invalid URL '%s' for callback.","Invalid request method %s for callback.","Join limit exceeded for the query. Maximum number of joins supported in a query is %d","Invalid criteria for the query. Criteria %s is not supported.","Invalid criteria %s for the query.","Ambiguous criteria %s. Criteria can have either {group"," group_operator} or {api_name"," comparator"," value}.","Ambiguous group in criteria %s. Group should be used only when there are more than one criteria","Number of criteria exceeded the maximum limit of %d","Field api name '%s' for criteria %s is not supported.","Field api name '%s' is not supported with comparator '%s' for criteria %s.","Field api name '%s' is not available for criteria %s. Check visibility and permission for the field","Field api name '%s' doesn't support this comparator '%s' for criteria %s.","Value '%s' is not supported for criteria %s.","Field '%s' is not supported with value '%s' for criteria %s.","Comparator '%s' is not supported with value '%s' for criteria %s.","Comparator '%s' is not supported with value '%s' for criteria %s as the value is encrypted.","Criteria %s doesn't support this logical group operator '%s'. Supported operators are 'and'"," 'or'.","Requested field api name '%s' is not available for the module '%s'. Check permission or visibility for the field.","Invalid field for the module provided in fields. Field api name '%s' is not supported for this module '%s'.","Value exceeded limit %d","Invalid page number for query. Page %s is not supported for the query.","Invalid page number for query. Page %s is not supported for the query. Page range is from %d to %d.","Many requests fired in concurrent than the allowed limit","Callback failed after %d attempts."],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/related_records/action_response":{"classes":["core/com/zoho/crm/api/related_records/api_exception","core/com/zoho/crm/api/related_records/success_response"],"interface":true},"core/com/zoho/crm/api/fields/history_tracking":{"module":{"structure_name":"core/com/zoho/crm/api/fields/history_tracking_module","name":"module","type":"core/com/zoho/crm/api/fields/history_tracking_module"},"durationConfiguredField":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"duration_configured_field","type":"core/com/zoho/crm/api/modules/minified_module"}},"core/com/zoho/crm/api/blueprint/layout":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/deal_contact_roles/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/deal_contact_roles/data","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/deal_contact_roles/info","name":"info","type":"core/com/zoho/crm/api/deal_contact_roles/info"}},"core/com/zoho/crm/api/record/price_book":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"}},"core/com/zoho/crm/api/shift_hours/shift_count":{"totalShift":{"name":"total_shift","type":"Integer"},"totalShiftWithUser":{"name":"total_shift_with_user","type":"Integer"}},"core/com/zoho/crm/api/user_groups/association_module":{"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"}},"core/com/zoho/crm/api/territories/field":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/service_preference/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["Appointments preferences updated successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/blueprint/convert_mapping":{"deals":{"structure_name":"core/com/zoho/crm/api/blueprint/module_mapping","name":"Deals","type":"core/com/zoho/crm/api/blueprint/module_mapping"},"accounts":{"structure_name":"core/com/zoho/crm/api/blueprint/module_mapping","name":"Accounts","type":"core/com/zoho/crm/api/blueprint/module_mapping"},"contacts":{"structure_name":"core/com/zoho/crm/api/blueprint/module_mapping","name":"Contacts","type":"core/com/zoho/crm/api/blueprint/module_mapping"}},"core/com/zoho/crm/api/taxes/response_handler":{"classes":["core/com/zoho/crm/api/taxes/response_wrapper","core/com/zoho/crm/api/taxes/api_exception"],"interface":true},"core/com/zoho/crm/api/contact_roles/response_handler":{"classes":["core/com/zoho/crm/api/contact_roles/api_exception","core/com/zoho/crm/api/contact_roles/body_wrapper"],"interface":true},"core/com/zoho/crm/api/definition/minified_property":{"apiName":{"name":"api_name","type":"String"},"dataType":{"name":"data_type","type":"String"},"length":{"name":"length","type":"Integer"},"readOnly":{"name":"read_only","type":"Boolean"},"required":{"name":"required","type":"Boolean"},"properties":{"structure_name":"Object","name":"properties","type":"List"}},"core/com/zoho/crm/api/roles/reporting_to":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/profiles/category_module":{"displayLabel":{"name":"display_label","type":"String"},"permissionsDetails":{"name":"permissions_details","type":"List"},"module":{"name":"module","type":"String"},"name":{"name":"name","type":"String"}},"core/com/zoho/crm/api/mass_delete_cvid/response_handler":{"classes":["core/com/zoho/crm/api/mass_delete_cvid/api_exception","core/com/zoho/crm/api/mass_delete_cvid/response_wrapper"],"interface":true},"core/com/zoho/crm/api/tags/associated_places":{"resources":{"name":"resources","type":"List"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/blueprint/blue_print":{"processInfo":{"structure_name":"core/com/zoho/crm/api/blueprint/process_info","name":"process_info","type":"core/com/zoho/crm/api/blueprint/process_info"},"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"core/com/zoho/crm/api/record/record"},"transitionId":{"name":"transition_id","type":"String"},"transitions":{"structure_name":"core/com/zoho/crm/api/blueprint/transition","name":"transitions","type":"List"}},"core/com/zoho/crm/api/portals/body_wrapper":{"portals":{"structure_name":"core/com/zoho/crm/api/portals/portals","name":"portals","type":"List"}},"core/com/zoho/crm/api/users_unavailability/action_handler":{"classes":["core/com/zoho/crm/api/users_unavailability/action_wrapper","core/com/zoho/crm/api/users_unavailability/api_exception"],"interface":true},"core/com/zoho/crm/api/notifications/get_notifications_param":{"perPage":{"name":"per_page","type":"Integer"},"module":{"name":"module","type":"String"},"page":{"name":"page","type":"Integer"},"channelId":{"name":"channel_id","type":"Long"}},"core/com/zoho/crm/api/fields/crypt":{"mode":{"name":"mode","type":"String"},"column":{"name":"column","type":"String"},"encfldids":{"name":"encFldIds","type":"List"},"table":{"name":"table","type":"String"},"notify":{"name":"notify","type":"String"},"status":{"name":"status","type":"Integer"}},"core/com/zoho/crm/api/mass_change_owner/owner":{"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/file_details":{"sizeS":{"name":"Size__s","type":"String"},"fileIdS":{"name":"File_Id__s","type":"String"},"id":{"name":"id","type":"Long"},"delete1":{"name":"_delete","type":"String"},"fileNameS":{"name":"File_Name__s","type":"String"}},"core/com/zoho/crm/api/org/response_handler":{"classes":["core/com/zoho/crm/api/org/response_wrapper","core/com/zoho/crm/api/org/api_exception"],"interface":true},"core/com/zoho/crm/api/scoring_rules/get_scoring_rule_param":{"name":{"name":"name","type":"Long"},"active":{"values":[true,false],"name":"active","type":"Boolean"},"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/users_unavailability/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["Unavailability Hours saved successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/email_related_records/attachments":{"size":{"name":"size","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/mail_merge/mail_merge_wrapper":{"sendMailMerge":{"structure_name":"core/com/zoho/crm/api/mail_merge/mail_merge","name":"send_mail_merge","type":"List"}},"core/com/zoho/crm/api/scoring_rules/info":{"call":{"name":"call","type":"Boolean"},"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"nextPageToken":{"name":"next_page_token","type":"String"},"count":{"name":"count","type":"Integer"},"pageTokenExpiry":{"name":"page_token_expiry","type":"DateTime"},"page":{"name":"page","type":"Integer"},"previousPageToken":{"name":"previous_page_token","type":"String"},"email":{"name":"email","type":"Boolean"}},"core/com/zoho/crm/api/variables/get_variables_param":{"group":{"name":"group","type":"String"}},"core/com/zoho/crm/api/business_hours/break_hours_custom_timing":{"days":{"values":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"name":"days","type":"utils/util/choice"},"businessTiming":{"name":"business_timing","type":"List"}},"core/com/zoho/crm/api/business_hours/action_response":{"classes":["core/com/zoho/crm/api/business_hours/business_hours_created","core/com/zoho/crm/api/business_hours/api_exception"],"interface":true},"core/com/zoho/crm/api/user_groups/get_groups_param":{"include":{"name":"include","type":"String"},"perPage":{"name":"per_page","type":"String"},"name":{"name":"name","type":"String"},"page":{"name":"page","type":"String"}},"core/com/zoho/crm/api/notifications/delete_details":{"resourceId":{"name":"resource_id","type":"Long"},"resourceUri":{"name":"resource_uri","type":"String"},"channelId":{"name":"channel_id","type":"String"}},"core/com/zoho/crm/api/variables/response_wrapper":{"variables":{"structure_name":"core/com/zoho/crm/api/variables/variable","name":"variables","type":"List"}},"core/com/zoho/crm/api/timelines/related_record":{"module":{"structure_name":"core/com/zoho/crm/api/timelines/name_id_structure","name":"module","type":"core/com/zoho/crm/api/timelines/name_id_structure"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/service_preference/action_wrapper":{"servicePreferences":{"structure_name":"core/com/zoho/crm/api/service_preference/action_response","name":"service_preferences","interface":true,"type":"core/com/zoho/crm/api/service_preference/action_response"}},"core/com/zoho/crm/api/record/pricing_details":{"modifiedTime":{"name":"Modified_Time","type":"DateTime"},"createdBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Created_By","type":"core/com/zoho/crm/api/users/minified_user"},"name":{"name":"name","type":"String"},"discount":{"name":"discount","type":"Double"},"createdTime":{"name":"Created_Time","type":"DateTime"},"modifiedBy":{"lookup":true,"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"Modified_By","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"},"tag":{"structure_name":"core/com/zoho/crm/api/tags/tag","name":"Tag","type":"List"},"toRange":{"name":"to_range","type":"Double"},"fromRange":{"name":"from_range","type":"Double"}},"core/com/zoho/crm/api/related_lists/response_wrapper":{"relatedLists":{"structure_name":"core/com/zoho/crm/api/related_lists/related_list","name":"related_lists","type":"List"}},"core/com/zoho/crm/api/mail_merge/action_wrapper":{"sendMailMerge":{"structure_name":"core/com/zoho/crm/api/mail_merge/action_response","name":"send_mail_merge","type":"List"}},"core/com/zoho/crm/api/modules/lookup_field":{"sequenceNumber":{"name":"sequence_number","type":"Integer"},"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/variable_groups/api_exception":{"code":{"values":["OAUTH_SCOPE_MISMATCH","INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","BAD_REQUEST","NO_PERMISSION","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/territories/action_handler":{"classes":["core/com/zoho/crm/api/territories/api_exception","core/com/zoho/crm/api/territories/action_wrapper"],"interface":true},"core/com/zoho/crm/api/deal_contact_roles/action_response":{"classes":["core/com/zoho/crm/api/deal_contact_roles/success_response","core/com/zoho/crm/api/deal_contact_roles/api_exception"],"interface":true},"core/com/zoho/crm/api/associate_email/from":{"userName":{"name":"user_name","type":"String"},"email":{"regex":"[a-z]{7}[@]zoho[.]com","name":"email","type":"String"}},"core/com/zoho/crm/api/deal_contact_roles/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/service_preference/response_wrapper":{"servicePreferences":{"structure_name":"core/com/zoho/crm/api/service_preference/service_preference","name":"service_preferences","type":"core/com/zoho/crm/api/service_preference/service_preference"}},"core/com/zoho/crm/api/from_addresses/address":{"default1":{"name":"default","type":"Boolean"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"userName":{"name":"user_name","type":"String"},"email":{"regex":"[a-z]{7}[@]zoho[.]com","name":"email","type":"String"}},"core/com/zoho/crm/api/record/create_records_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/currencies/currency_format":{"thousandSeparator":{"values":["Comma","Space","Period","Space"],"name":"thousand_separator","type":"utils/util/choice"},"decimalPlaces":{"values":["0","2","3"],"name":"decimal_places","type":"utils/util/choice"},"decimalSeparator":{"values":["Period","Comma"],"name":"decimal_separator","type":"utils/util/choice"}},"core/com/zoho/crm/api/pipeline/d_pipeline":{"delete1":{"structure_name":"core/com/zoho/crm/api/pipeline/delete","name":"_delete","type":"core/com/zoho/crm/api/pipeline/delete"}},"core/com/zoho/crm/api/reschedule_history/response_handler":{"classes":["core/com/zoho/crm/api/reschedule_history/api_exception","core/com/zoho/crm/api/reschedule_history/response_wrapper"],"interface":true},"core/com/zoho/crm/api/email_related_records/response_handler":{"classes":["core/com/zoho/crm/api/email_related_records/response_wrapper","core/com/zoho/crm/api/email_related_records/api_exception"],"interface":true},"core/com/zoho/crm/api/related_records/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/territory_users/response_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/users/users","name":"users","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/territory_users/info","name":"info","type":"core/com/zoho/crm/api/territory_users/info"}},"core/com/zoho/crm/api/portal_user_type/personality_module":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"},"pluralLabel":{"name":"plural_label","type":"String"}},"core/com/zoho/crm/api/wizards/node":{"posX":{"name":"pos_x","type":"Integer"},"posY":{"name":"pos_y","type":"Integer"},"startNode":{"name":"start_node","type":"Boolean"},"screen":{"structure_name":"core/com/zoho/crm/api/wizards/screen","name":"screen","type":"core/com/zoho/crm/api/wizards/screen"}},"core/com/zoho/crm/api/wizards/conditional_rules":{"criteria":{"structure_name":"core/com/zoho/crm/api/wizards/criteria","name":"criteria","type":"core/com/zoho/crm/api/wizards/criteria"},"executeOn":{"values":["create","edit","create_edit"],"name":"execute_on","type":"utils/util/choice"},"actions":{"structure_name":"core/com/zoho/crm/api/wizards/actions","name":"actions","type":"List"},"queryId":{"name":"query_id","type":"Long"}},"core/com/zoho/crm/api/record/mass_update_territory":{"id":{"name":"id","type":"Long"},"includeChild":{"name":"include_child","type":"Boolean"}},"core/com/zoho/crm/api/cancel_meetings/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/cancel_meetings/notify","name":"data","type":"List"}},"core/com/zoho/crm/api/service_preference/api_exception":{"code":{"values":["MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR","INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"structure_name":"utils/util/choice","values":["create_deal","do_not_create_deal"],"name":"supported_values","type":"List"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/count_wrapper":{"count":{"name":"count","type":"Long"}},"core/com/zoho/crm/api/contact_roles/body_wrapper":{"contactRoles":{"structure_name":"core/com/zoho/crm/api/contact_roles/contact_role","name":"contact_roles","type":"List"}},"core/com/zoho/crm/api/custom_views/fields":{"apiName":{"name":"api_name","type":"String"},"pin":{"name":"_pin","type":"Boolean"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/record/conversion_options_response_wrapper":{"conversionoptions":{"structure_name":"core/com/zoho/crm/api/record/conversion_option","name":"__conversion_options","type":"core/com/zoho/crm/api/record/conversion_option"}},"core/com/zoho/crm/api/shift_hours/action_wrapper":{"shiftHours":{"structure_name":"core/com/zoho/crm/api/shift_hours/action_response","name":"shift_hours","type":"List"}},"core/com/zoho/crm/api/download_attachments/get_download_attachments_details_param":{"messageId":{"name":"message_id","type":"String","required":true},"userId":{"name":"user_id","type":"Long","required":true}},"core/com/zoho/crm/api/territories/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/pipeline/transfer_pipelines_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/tags/conflict_wrapper":{"conflictId":{"name":"conflict_id","type":"String"}},"core/com/zoho/crm/api/users_transfer_delete/action_response":{"classes":["core/com/zoho/crm/api/users_transfer_delete/api_exception","core/com/zoho/crm/api/users_transfer_delete/success_response"],"interface":true},"core/com/zoho/crm/api/portal_invite/action_handler":{"classes":["core/com/zoho/crm/api/portal_invite/action_wrapper","core/com/zoho/crm/api/portal_invite/api_exception"],"interface":true},"core/com/zoho/crm/api/tags/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"created_time","type":"DateTime"},{"name":"modified_time","type":"DateTime"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"id","type":"Long"},{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},{"name":"color_code","type":"String"}],"name":"details","type":"Map"},"message":{"values":["tags created successfully","tags updated successfully","tags deleted successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_invite/body_wrapper":{"portalInvite":{"structure_name":"core/com/zoho/crm/api/portal_invite/portal_invite","name":"portal_invite","type":"List"}},"core/com/zoho/crm/api/blueprint/crypt":{"mode":{"name":"mode","type":"String"},"column":{"name":"column","type":"String"},"table":{"name":"table","type":"String"},"status":{"name":"status","type":"Integer"}},"core/com/zoho/crm/api/blueprint/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","RECORD_NOT_IN_PROCESS","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"message","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"info_message","type":"String"},{"name":"parent_api_name","type":"String"}],"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","invalid transition","invalid data","record not in process"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/currencies/disable_success":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/modules/action_handler":{"classes":["core/com/zoho/crm/api/modules/action_wrapper","core/com/zoho/crm/api/modules/api_exception"],"interface":true},"core/com/zoho/crm/api/wizards/response_wrapper":{"wizards":{"structure_name":"core/com/zoho/crm/api/wizards/wizard","name":"wizards","type":"List"}},"core/com/zoho/crm/api/privacy_configurable_apps/wrapper":{"privacyConfigurableApps":{"structure_name":"core/com/zoho/crm/api/privacy_configurable_apps/apps","name":"privacy_configurable_apps","type":"List"}},"core/com/zoho/crm/api/download_inline_images/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","the request does not contain any file","invalid file type"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/users_territories/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/attachments/parent_id":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/backup/history_param":{"perPage":{"name":"per_page","type":"String"},"page":{"name":"page","type":"String"}},"core/com/zoho/crm/api/notes/get_notes_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"String","required":true}},"core/com/zoho/crm/api/notes/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/notes/note","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/notes/info","name":"info","type":"core/com/zoho/crm/api/notes/info"}},"core/com/zoho/crm/api/bulk_write/response_handler":{"classes":["core/com/zoho/crm/api/bulk_write/api_exception","core/com/zoho/crm/api/bulk_write/file_body_wrapper"],"interface":true},"core/com/zoho/crm/api/appointment_preference/response_wrapper":{"appointmentPreferences":{"structure_name":"core/com/zoho/crm/api/appointment_preference/appointment_preference","name":"appointment_preferences","type":"core/com/zoho/crm/api/appointment_preference/appointment_preference"}},"core/com/zoho/crm/api/users/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/assignment_rules/action_wrapper":{"assignmentRules":{"structure_name":"core/com/zoho/crm/api/assignment_rules/action_response","name":"assignment_rules","type":"List"}},"core/com/zoho/crm/api/field_map_dependency/delete_map_dependency_param":{"module":{"name":"module","type":"String"}},"core/com/zoho/crm/api/pipeline/transfer_pipeline_wrapper":{"transferPipeline":{"structure_name":"core/com/zoho/crm/api/pipeline/transfer_pipeline","name":"transfer_pipeline","type":"List"}},"core/com/zoho/crm/api/users_territories/action_response":{"classes":["core/com/zoho/crm/api/users_territories/api_exception","core/com/zoho/crm/api/users_territories/success_response"],"interface":true},"core/com/zoho/crm/api/mass_delete_cvid/api_exception":{"code":{"values":["INVALID_DATA","INVALID_MODULE","INTERNAL_SERVER_ERROR","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"values":["cvid"],"name":"api_name","type":"utils/util/choice"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"}],"name":"details","type":"Map"},"message":{"values":["the cvid given seems to be invalid","the module name given seems to be invalid","required field not found"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/holidays/create_shift_holiday":{"holidays":{"structure_name":"core/com/zoho/crm/api/holidays/shift_holiday","name":"holidays","type":"List"}},"core/com/zoho/crm/api/attachments/action_handler":{"classes":["core/com/zoho/crm/api/attachments/action_wrapper","core/com/zoho/crm/api/attachments/api_exception"],"interface":true},"core/com/zoho/crm/api/record/get_record_using_external_id_param":{"cvid":{"name":"cvid","type":"String"},"uid":{"name":"uid","type":"String"},"approved":{"name":"approved","type":"String"},"startDateTime":{"name":"startDateTime","type":"DateTime"},"converted":{"name":"converted","type":"String"},"territoryId":{"name":"territory_id","type":"String"},"fields":{"name":"fields","type":"String"},"endDateTime":{"name":"endDateTime","type":"DateTime"},"includeChild":{"name":"include_child","type":"String"}},"core/com/zoho/crm/api/profiles/profile":{"displayLabel":{"name":"display_label","type":"String"},"permissionType":{"name":"permission_type","type":"String"},"permissionsDetails":{"structure_name":"core/com/zoho/crm/api/profiles/permission_detail","name":"permissions_details","type":"List"},"modifiedTime":{"name":"modified_time","type":"DateTime"},"defaultview":{"structure_name":"core/com/zoho/crm/api/profiles/default_view","name":"_default_view","type":"core/com/zoho/crm/api/profiles/default_view"},"custom":{"name":"custom","type":"Boolean"},"description":{"name":"description","max-length":250,"type":"String"},"delete1":{"name":"_delete","type":"Boolean"},"type":{"values":["normal_profile","lite_profile"],"name":"type","type":"utils/util/choice"},"sections":{"structure_name":"core/com/zoho/crm/api/profiles/section","name":"sections","type":"List"},"createdBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"created_by","type":"core/com/zoho/crm/api/users/minified_user"},"default1":{"name":"default","type":"Boolean"},"name":{"name":"name","max-length":50,"type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/users/minified_user","name":"modified_by","type":"core/com/zoho/crm/api/users/minified_user"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/fields/formula":{"expression":{"values":["Dayofmonth(${Created_Time})"],"name":"expression","type":"utils/util/choice"},"returnType":{"values":["double"],"name":"return_type","type":"utils/util/choice"}},"core/com/zoho/crm/api/backup/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/users_transfer_delete/get_status_param":{"jobId":{"name":"job_id","type":"Long","required":true}},"core/com/zoho/crm/api/custom_views/owner":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/holidays/create_holidays_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/scoring_rules/body_wrapper":{"scoringRules":{"structure_name":"core/com/zoho/crm/api/scoring_rules/scoring_rule","name":"scoring_rules","type":"List"}},"core/com/zoho/crm/api/appointment_preference/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["Appointments preferences updated successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/bulk_write/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","FILE_TOO_LARGE","INVALID_FILE_FORMAT","MANDATORY_FIELDS_NOT_MAPPED","MANDATORY_NOT_FOUND","INVALID_FIELD","INVALID_FORMAT","INVALID_FILE_ID","HEADER_LIMIT_EXCEEDED","COLUMN_INDEX_NOT_FOUND","MODULE_NOT_AVAILABLE","INVALID_DATA","DUPLICATE_DATA","NOT_APPROVED","BLOCKED_RECORD","CANNOT_PROCESS","LIMIT_EXCEEDED","RESOURCE_NOT_FOUND","MISSING_REQUIRED_KEY","INVALID_FIELD_NAME","FILE_NOT_SUPPORTED","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"xError":{"values":["check if headers [feature, X-CRM-ORG] are present and valid"],"name":"x-error","type":"utils/util/choice"},"httpStatus":{"name":"http_status","type":"String"},"errorMessage":{"values":["Bad Request"],"name":"ERROR_MESSAGE","type":"utils/util/choice"},"errorCode":{"name":"ERROR_CODE","type":"Integer"},"details":{"name":"details","type":"Map"},"xInfo":{"values":["Link not valid"],"name":"x-info","type":"utils/util/choice"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","invalid file format. only zip format is supported","File size too large to process","The requested resource doesn't exist.","required key operation is not found in request body.","improper file id","required key index for field Company is not found in request body.","All mandatory fields are not mapped for the layout","Requested module 'asdf' is not available.","invalid mapping. invalid api_name ast_Name.","File not supported for bulk write"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"},"info":{"values":["Forbidden"],"name":"info","type":"utils/util/choice"}},"core/com/zoho/crm/api/territories/transfer_territory":{"id":{"name":"id","type":"Long"},"deletePreviousForecasts":{"name":"delete_previous_forecasts","type":"Boolean"},"transferToId":{"name":"transfer_to_id","type":"Long"}},"core/com/zoho/crm/api/org/action_handler":{"classes":["core/com/zoho/crm/api/org/success_response","core/com/zoho/crm/api/org/api_exception"],"interface":true},"core/com/zoho/crm/api/users/role":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/scoring_rules/response_wrapper":{"scoringRules":{"structure_name":"core/com/zoho/crm/api/scoring_rules/scoring_rule","name":"scoring_rules","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/scoring_rules/info","name":"info","type":"core/com/zoho/crm/api/scoring_rules/info"}},"core/com/zoho/crm/api/users/action_response":{"classes":["core/com/zoho/crm/api/users/api_exception","core/com/zoho/crm/api/users/success_response"],"interface":true},"core/com/zoho/crm/api/timelines/picklist_detail":{"displayValue":{"name":"display_value","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"actualValue":{"name":"actual_value","type":"String"},"colourCode":{"name":"colour_code","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/definition/response_wrapper":{"definition":{"structure_name":"core/com/zoho/crm/api/definition/definition","name":"definition","type":"core/com/zoho/crm/api/definition/definition"}},"core/com/zoho/crm/api/privacy_preference/section":{"name":{"name":"name","type":"String"},"tooltip":{"name":"tooltip","type":"String"},"options":{"structure_name":"core/com/zoho/crm/api/privacy_preference/option","name":"options","type":"List"},"showType":{"name":"show_type","type":"String"},"title":{"name":"title","type":"String"}},"core/com/zoho/crm/api/shift_hours/action_response":{"classes":["core/com/zoho/crm/api/shift_hours/api_exception","core/com/zoho/crm/api/shift_hours/success_response"],"interface":true},"core/com/zoho/crm/api/territories/associated_users_count":{"count":{"name":"count","type":"String"},"territory":{"structure_name":"core/com/zoho/crm/api/territories/minified_territory","name":"territory","type":"core/com/zoho/crm/api/territories/minified_territory"}},"core/com/zoho/crm/api/holidays/shift_hour":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/related_records/get_related_records_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"},"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/service_preference/service_preference":{"jobSheetEnabled":{"name":"job_sheet_enabled","type":"Boolean"}},"core/com/zoho/crm/api/portals/action_response":{"classes":["core/com/zoho/crm/api/portals/api_exception","core/com/zoho/crm/api/portals/success_response"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/action_handler":{"classes":["core/com/zoho/crm/api/field_map_dependency/action_wrapper","core/com/zoho/crm/api/field_map_dependency/api_exception"],"interface":true},"core/com/zoho/crm/api/custom_views/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"default1":{"name":"default","type":"Long"},"count":{"name":"count","type":"Integer"},"translation":{"structure_name":"core/com/zoho/crm/api/custom_views/translation","name":"translation","type":"core/com/zoho/crm/api/custom_views/translation"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/appointment_preference/action_response":{"classes":["core/com/zoho/crm/api/appointment_preference/api_exception","core/com/zoho/crm/api/appointment_preference/success_response"],"interface":true},"core/com/zoho/crm/api/bulk_write/action_response":{"classes":["core/com/zoho/crm/api/bulk_write/success_response","core/com/zoho/crm/api/bulk_write/api_exception"],"interface":true},"core/com/zoho/crm/api/users_territories/bulk_validation":{"alert":{"name":"alert","type":"Boolean"},"assignment":{"name":"assignment","type":"Boolean"},"criteria":{"name":"criteria","type":"Boolean"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/fields/external":{"show":{"name":"show","type":"Boolean"},"type":{"values":["user","org"],"name":"type","type":"utils/util/choice"},"allowMultipleConfig":{"name":"allow_multiple_config","type":"Boolean"}},"core/com/zoho/crm/api/bulk_write/result":{"downloadUrl":{"name":"download_url","type":"String"}},"core/com/zoho/crm/api/record/line_tax":{"displayName":{"name":"display_name","type":"String"},"percentage":{"name":"percentage","type":"Double"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"value":{"name":"value","type":"Double"}},"core/com/zoho/crm/api/custom_views/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/business_hours/business_hours_created":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"values":["Business Hours saved successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/assignment_rules/action_response":{"classes":["core/com/zoho/crm/api/assignment_rules/api_exception","core/com/zoho/crm/api/assignment_rules/success_response"],"interface":true},"core/com/zoho/crm/api/appointment_preference/action_handler":{"classes":["core/com/zoho/crm/api/appointment_preference/api_exception","core/com/zoho/crm/api/appointment_preference/action_wrapper"],"interface":true},"core/com/zoho/crm/api/files/get_file_param":{"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/business_hours/body_wrapper":{"businessHours":{"structure_name":"core/com/zoho/crm/api/business_hours/business_hours","name":"business_hours","type":"core/com/zoho/crm/api/business_hours/business_hours"}},"core/com/zoho/crm/api/related_records/get_related_record_param":{"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/mass_convert/get_job_status_param":{"jobId":{"name":"job_id","type":"Long","required":true}},"core/com/zoho/crm/api/email_related_records/user_details":{"userName":{"name":"user_name","type":"String"},"email":{"name":"email","type":"String"}},"core/com/zoho/crm/api/share_records/response_wrapper":{"share":{"structure_name":"core/com/zoho/crm/api/share_records/share_record","name":"share","type":"List"},"shareableUser":{"structure_name":"core/com/zoho/crm/api/users/users","name":"shareable_user","type":"List"}},"core/com/zoho/crm/api/share_records/module":{"apiName":{"name":"api_name","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/variables/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/fields":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"apiName":{"name":"api_name","type":"String"},"sharingProperties":{"structure_name":"core/com/zoho/crm/api/modules/sharing_properties","name":"sharing_properties","type":"core/com/zoho/crm/api/modules/sharing_properties"},"webhook":{"name":"webhook","type":"Boolean"},"associatedModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"associated_module","type":"core/com/zoho/crm/api/modules/minified_module"},"defaultValue":{"name":"default_value","type":"String"},"tooltip":{"structure_name":"core/com/zoho/crm/api/fields/tooltip","name":"tooltip","type":"core/com/zoho/crm/api/fields/tooltip"},"quickSequenceNumber":{"name":"quick_sequence_number","type":"String"},"jsonType":{"name":"json_type","type":"String"},"type":{"name":"type","type":"String"},"availableInUserLayout":{"name":"available_in_user_layout","type":"Boolean"},"rollupSummary":{"structure_name":"core/com/zoho/crm/api/fields/rollup_summary","name":"rollup_summary","type":"core/com/zoho/crm/api/fields/rollup_summary"},"blueprintSupported":{"name":"blueprint_supported","type":"Boolean"},"createdTime":{"name":"created_time","type":"DateTime"},"showType":{"name":"show_type","type":"Integer"},"globalPicklist":{"name":"global_picklist","type":"Object"},"id":{"name":"id","type":"Long"},"additionalColumn":{"name":"additional_column","type":"String"},"sequenceNumber":{"name":"sequence_number","type":"Integer"},"filterable":{"name":"filterable","type":"Boolean"},"emailParser":{"structure_name":"core/com/zoho/crm/api/fields/email_parser","name":"email_parser","type":"core/com/zoho/crm/api/fields/email_parser"},"visible":{"name":"visible","type":"Boolean"},"dataType":{"values":["formula","text","boolean","picklist","datetime","website","autonumber","textarea","email","phone","integer","double","date","formula","text","boolean","picklist","datetime","website","autonumber","textarea","lookup","email","userlookup","phone","integer","double","date"],"name":"data_type","type":"utils/util/choice"},"profiles":{"structure_name":"core/com/zoho/crm/api/fields/profile","name":"profiles","type":"List"},"readOnly":{"name":"read_only","type":"Boolean"},"historyTracking":{"structure_name":"core/com/zoho/crm/api/fields/history_tracking","name":"history_tracking","type":"core/com/zoho/crm/api/fields/history_tracking"},"systemMandatory":{"name":"system_mandatory","type":"Boolean"},"separator":{"name":"separator","type":"Boolean"},"customField":{"name":"custom_field","type":"Boolean"},"searchable":{"name":"searchable","type":"Boolean"},"decimalPlace":{"name":"decimal_place","type":"Integer"},"createdSource":{"name":"created_source","type":"String"},"displayType":{"name":"display_type","type":"Integer"},"external":{"structure_name":"core/com/zoho/crm/api/fields/external","name":"external","type":"core/com/zoho/crm/api/fields/external"},"subModule":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"sub_module","type":"core/com/zoho/crm/api/modules/minified_module"},"unique":{"structure_name":"core/com/zoho/crm/api/fields/unique","name":"unique","type":"core/com/zoho/crm/api/fields/unique"},"viewType":{"structure_name":"core/com/zoho/crm/api/fields/view_type","name":"view_type","type":"core/com/zoho/crm/api/fields/view_type"},"displayField":{"name":"display_field","type":"Boolean"},"operationType":{"structure_name":"core/com/zoho/crm/api/fields/operation_type","name":"operation_type","type":"core/com/zoho/crm/api/fields/operation_type"},"hipaaComplianceEnabled":{"name":"hipaa_compliance_enabled","type":"Boolean"},"crypt":{"structure_name":"core/com/zoho/crm/api/fields/crypt","name":"crypt","type":"core/com/zoho/crm/api/fields/crypt"},"fileUpoladOptionlist":{"structure_name":"core/com/zoho/crm/api/fields/file_upolad_option","name":"file_upolad_optionlist","type":"List"},"enableColourCode":{"name":"enable_colour_code","type":"Boolean"},"virtualField":{"name":"virtual_field","type":"Boolean"},"hipaaCompliance":{"structure_name":"core/com/zoho/crm/api/fields/hipaa_compliance","name":"hipaa_compliance","type":"core/com/zoho/crm/api/fields/hipaa_compliance"},"associationDetails":{"structure_name":"core/com/zoho/crm/api/fields/association_details","name":"association_details","type":"core/com/zoho/crm/api/fields/association_details"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/fields/pick_list_value","name":"pick_list_values","type":"List"},"fieldLabel":{"name":"field_label","type":"String"},"referFromField":{"structure_name":"core/com/zoho/crm/api/fields/refer_from_field","name":"refer_from_field","type":"core/com/zoho/crm/api/fields/refer_from_field"},"fieldReadOnly":{"name":"field_read_only","type":"Boolean"},"businesscardSupported":{"name":"businesscard_supported","type":"Boolean"},"allowedModules":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"allowed_modules","type":"List"},"currency":{"structure_name":"core/com/zoho/crm/api/fields/currency","name":"currency","type":"core/com/zoho/crm/api/fields/currency"},"multiuserlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiuserlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"displayLabel":{"name":"display_label","type":"String"},"lookup":{"structure_name":"core/com/zoho/crm/api/fields/lookup","name":"lookup","type":"core/com/zoho/crm/api/fields/lookup"},"length":{"values":[16,120,255,2000,32000,100,50,20],"name":"length","type":"utils/util/choice"},"pickListValuesSortedLexically":{"name":"pick_list_values_sorted_lexically","type":"Boolean"},"sortable":{"name":"sortable","type":"Boolean"},"autoNumber":{"structure_name":"core/com/zoho/crm/api/fields/auto_number","name":"auto_number","type":"core/com/zoho/crm/api/fields/auto_number"},"private1":{"structure_name":"core/com/zoho/crm/api/fields/private","name":"private","type":"core/com/zoho/crm/api/fields/private"},"convertMapping":{"structure_name":"core/com/zoho/crm/api/fields/convert_mapping","name":"convert_mapping","type":"core/com/zoho/crm/api/fields/convert_mapping"},"multiModuleLookup":{"structure_name":"core/com/zoho/crm/api/fields/multi_module_lookup","name":"multi_module_lookup","type":"core/com/zoho/crm/api/fields/multi_module_lookup"},"massUpdate":{"name":"mass_update","type":"Boolean"},"uiType":{"name":"ui_type","type":"Integer"},"formula":{"structure_name":"core/com/zoho/crm/api/fields/formula","name":"formula","type":"core/com/zoho/crm/api/fields/formula"},"category":{"name":"category","type":"Integer"},"multiselectlookup":{"structure_name":"core/com/zoho/crm/api/fields/multiselectlookup","name":"multiselectlookup","type":"core/com/zoho/crm/api/fields/multiselectlookup"},"columnName":{"name":"column_name","type":"String"}},"core/com/zoho/crm/api/blueprint/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["transition updated successfully"],"name":"message","type":"utils/util/choice"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/fields/maps":{"apiName":{"name":"api_name","type":"String"},"pickListValues":{"structure_name":"core/com/zoho/crm/api/fields/pick_list_value","name":"pick_list_values","type":"List"}},"core/com/zoho/crm/api/notes/get_note_param":{"fields":{"name":"fields","type":"String","required":true}},"core/com/zoho/crm/api/send_mail/inventory_details":{"inventoryTemplate":{"structure_name":"core/com/zoho/crm/api/send_mail/inventory_template","name":"inventory_template","type":"core/com/zoho/crm/api/send_mail/inventory_template"}},"core/com/zoho/crm/api/taxes/preference":{"modifyTaxRates":{"name":"modify_tax_rates","type":"Boolean"},"autoPopulateTax":{"name":"auto_populate_tax","type":"Boolean"}},"core/com/zoho/crm/api/portals/portals":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"createdBy":{"structure_name":"core/com/zoho/crm/api/portals/owner","name":"created_by","type":"core/com/zoho/crm/api/portals/owner"},"name":{"name":"name","max-length":30,"type":"String","min-length":6},"createdTime":{"name":"created_time","type":"DateTime"},"active":{"name":"active","type":"Boolean"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/portals/owner","name":"modified_by","type":"core/com/zoho/crm/api/portals/owner"},"zaid":{"name":"zaid","type":"String"}},"core/com/zoho/crm/api/query/api_exception":{"code":{"values":["INVALID_URL_PATTERN","INVALID_QUERY","SYNTAX_ERROR","OAUTH_SCOPE_MISMATCH","INVALID_REQUEST_METHOD","INVALID_TOKEN","BAD_REQUEST","NO_PERMISSION","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"near","type":"String"},{"name":"column","type":"Integer"},{"name":"line","type":"Integer"},{"name":"clause","type":"String"},{"name":"by","type":"String"},{"name":"limit","type":"Integer"},{"name":"column_name","type":"String"},{"name":"reason","type":"String"},{"name":"module","type":"String"},{"name":"data_type","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"operator","type":"String"}],"name":"details","type":"Map"},"message":{"values":["invalid query formed","value given seems to be invalid for the column","data type not supported","column given seems to be invalid"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/widget":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/mail_merge/address":{"addressValueMap":{"structure_name":"core/com/zoho/crm/api/mail_merge/address_value_map","name":"Address_Value_Map","type":"core/com/zoho/crm/api/mail_merge/address_value_map"}},"core/com/zoho/crm/api/reschedule_history/action_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/reschedule_history/action_response","name":"data","type":"List"}},"core/com/zoho/crm/api/notes/action_handler":{"classes":["core/com/zoho/crm/api/notes/action_wrapper","core/com/zoho/crm/api/notes/api_exception"],"interface":true},"core/com/zoho/crm/api/reschedule_history/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/reschedule_history/reschedule_history","name":"data","max-length":100,"type":"List"}},"core/com/zoho/crm/api/users/get_user_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"}},"core/com/zoho/crm/api/mass_change_owner/action_response":{"classes":["core/com/zoho/crm/api/mass_change_owner/success_response"],"interface":true},"core/com/zoho/crm/api/record/response_handler":{"classes":["core/com/zoho/crm/api/record/conversion_options_response_wrapper","core/com/zoho/crm/api/record/response_wrapper","core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/file_body_wrapper"],"interface":true},"core/com/zoho/crm/api/portals/response_handler":{"classes":["core/com/zoho/crm/api/portals/response_wrapper","core/com/zoho/crm/api/portals/api_exception"],"interface":true},"core/com/zoho/crm/api/mail_merge/mail_merge_template":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/blueprint/view_type":{"view":{"name":"view","type":"Boolean"},"edit":{"name":"edit","type":"Boolean"},"quickCreate":{"name":"quick_create","type":"Boolean"},"create":{"name":"create","type":"Boolean"}},"core/com/zoho/crm/api/share_records/get_shared_record_details_param":{"view":{"values":["summary","manage"],"name":"view","type":"String"},"sharedTo":{"name":"sharedTo","type":"Long"}},"core/com/zoho/crm/api/layouts/deal_layout_mapping":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"fields":{"structure_name":"core/com/zoho/crm/api/layouts/deal_field","name":"fields","type":"List"}},"core/com/zoho/crm/api/territories/minified_territory":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"},"subordinates":{"name":"subordinates","type":"Boolean"}},"core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete":{"transfer":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/transfer","name":"transfer","type":"core/com/zoho/crm/api/users_transfer_delete/transfer"},"moveSubordinate":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/move_subordinate","name":"move_subordinate","type":"core/com/zoho/crm/api/users_transfer_delete/move_subordinate"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/portals_meta/wrapper":{"relatedLists":{"structure_name":"core/com/zoho/crm/api/portals_meta/related_lists","name":"related_lists","type":"List"}},"core/com/zoho/crm/api/user_groups/associated_user_count":{"associatedUsersCount":{"structure_name":"core/com/zoho/crm/api/user_groups/associated_user","name":"associated_users_count","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/user_groups/info","name":"info","type":"core/com/zoho/crm/api/user_groups/info"}},"core/com/zoho/crm/api/users/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/related_records/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","max-length":100,"type":"List","min-length":1}},"core/com/zoho/crm/api/cancel_meetings/api_exception":{"code":{"values":["INVALID_DATA","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"expected_data_type","type":"String"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"id","type":"Long"},{"name":"reason","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/shift_hours/update_shift_hour_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/send_mail/body_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/send_mail/data","name":"data","type":"List"}},"core/com/zoho/crm/api/email_compose_meta/user":{"zgid":{"name":"zgid","type":"String"},"fullName":{"name":"full_name","type":"String"},"email":{"name":"email","type":"String"},"zuid":{"name":"zuid","type":"String"},"composeSettings":{"structure_name":"core/com/zoho/crm/api/email_compose_meta/compose_settings","name":"compose_settings","type":"core/com/zoho/crm/api/email_compose_meta/compose_settings"}},"core/com/zoho/crm/api/fields/success":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/portal_invite/job_response":{"jobId":{"name":"job_id","type":"Long"},"data":{"structure_name":"core/com/zoho/crm/api/portal_invite/data","name":"data","type":"List"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/blueprint/tool_tip":{"name":{"name":"name","type":"String"},"value":{"name":"value","type":"String"}},"core/com/zoho/crm/api/wizards/screen":{"displayLabel":{"name":"display_label","type":"String"},"conditionalRules":{"structure_name":"core/com/zoho/crm/api/wizards/conditional_rules","name":"conditional_rules","type":"List"},"id":{"name":"id","type":"Long"},"segments":{"structure_name":"core/com/zoho/crm/api/wizards/segment","name":"segments","type":"List"}},"core/com/zoho/crm/api/fields/forecast_category":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/users_territories/validation_group":{"classes":["core/com/zoho/crm/api/users_territories/validation","core/com/zoho/crm/api/users_territories/bulk_validation"],"interface":true},"core/com/zoho/crm/api/wizards/criteria":{"comparator":{"name":"comparator","type":"String"},"groupOperator":{"name":"group_operator","type":"String"},"field":{"structure_name":"core/com/zoho/crm/api/wizards/field","name":"field","type":"core/com/zoho/crm/api/wizards/field"},"value":{"name":"value","type":"Object"},"group":{"structure_name":"core/com/zoho/crm/api/wizards/criteria","name":"group","type":"List"}},"core/com/zoho/crm/api/portal_user_type/owner":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/bulk_read/result":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"downloadUrl":{"name":"download_url","type":"String"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/attachments/owner":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/bulk_write/call_back":{"method":{"values":["post"],"name":"method","type":"utils/util/choice"},"url":{"name":"url","type":"String"}},"core/com/zoho/crm/api/territories/transfer_body_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/territories/transfer_territory","name":"territories","type":"List"}},"core/com/zoho/crm/api/record/delete_records_param":{"ids":{"name":"ids","type":"String","required":true},"wfTrigger":{"name":"wf_trigger","type":"Boolean"}},"core/com/zoho/crm/api/assignment_rules/assignment_rules":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"apiName":{"name":"api_name","type":"String"},"createdBy":{"structure_name":"core/com/zoho/crm/api/assignment_rules/created_by","name":"created_by","type":"core/com/zoho/crm/api/assignment_rules/created_by"},"module":{"structure_name":"core/com/zoho/crm/api/modules/minified_module","name":"module","type":"core/com/zoho/crm/api/modules/minified_module"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"description":{"name":"description","type":"String"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/assignment_rules/created_by","name":"modified_by","type":"core/com/zoho/crm/api/assignment_rules/created_by"},"id":{"name":"id","type":"Long"},"defaultAssignee":{"structure_name":"core/com/zoho/crm/api/assignment_rules/default_assignee","name":"default_assignee","type":"core/com/zoho/crm/api/assignment_rules/default_assignee"}},"core/com/zoho/crm/api/territory_users/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"}},"core/com/zoho/crm/api/tags/create_tags_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/related_records/update_related_records_header":{"xExternal":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/assignment_rules/default_assignee":{"name":{"name":"name","type":"String"},"id":{"name":"id","type":"String"}},"core/com/zoho/crm/api/holidays/api_exception":{"code":{"values":["DEPENDENT_FIELD_MISSING","PATTERN_NOT_MATCHED","MANDATORY_NOT_FOUND","DUPLICATE_DATA","INVALID_DATA","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"}],"name":"dependee","type":"Map"},{"name":"resource_path_index","type":"Integer"},{"name":"expected_data_type","type":"String"},{"name":"maximum_length","type":"Integer"},{"name":"regex","type":"String"}],"name":"details","type":"Map"},"message":{"values":["Shift id is required for shift holidays","Please check whether the input values are correct","required field not found","duplicate data","Invalid ID","invalid data"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/notifications/delete_notification_param":{"channelIds":{"name":"channel_ids","type":"Long","required":true}},"core/com/zoho/crm/api/layouts/get_layouts_param":{"module":{"name":"module","type":"String","required":true}},"core/com/zoho/crm/api/taxes/action_handler":{"classes":["core/com/zoho/crm/api/taxes/action_wrapper","core/com/zoho/crm/api/taxes/api_exception"],"interface":true},"core/com/zoho/crm/api/user_groups/action_handler":{"classes":["core/com/zoho/crm/api/user_groups/action_wrapper","core/com/zoho/crm/api/user_groups/api_exception"],"interface":true},"core/com/zoho/crm/api/variable_groups/variable_group":{"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"name":{"name":"name","type":"String"},"description":{"name":"description","type":"String"},"id":{"name":"id","type":"Long"},"source":{"name":"source","type":"String"}},"core/com/zoho/crm/api/users_territories/action_wrapper":{"territories":{"structure_name":"core/com/zoho/crm/api/users_territories/action_response","name":"territories","type":"List"}},"core/com/zoho/crm/api/record/upsert_records_header":{"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/send_mail/template":{"classes":["core/com/zoho/crm/api/inventory_templates/inventory_template","core/com/zoho/crm/api/email_templates/email_template"],"interface":true},"core/com/zoho/crm/api/hipaa_compliance/action_wrapper":{"hipaaCompliance":{"structure_name":"core/com/zoho/crm/api/hipaa_compliance/action_handler","name":"hipaa_compliance","interface":true,"type":"core/com/zoho/crm/api/hipaa_compliance/action_handler"}},"core/com/zoho/crm/api/from_addresses/response_wrapper":{"fromAddresses":{"structure_name":"core/com/zoho/crm/api/from_addresses/address","name":"from_addresses","type":"List"}},"core/com/zoho/crm/api/record/mass_update_response":{"classes":["core/com/zoho/crm/api/record/api_exception","core/com/zoho/crm/api/record/mass_update"],"interface":true},"core/com/zoho/crm/api/related_records/get_related_records_param":{"perPage":{"name":"per_page","type":"Integer"},"page":{"name":"page","type":"Integer"},"fields":{"name":"fields","type":"String"}},"core/com/zoho/crm/api/user_groups/groups":{"modifiedTime":{"name":"modified_time","type":"DateTime"},"sources":{"structure_name":"core/com/zoho/crm/api/user_groups/sources","name":"sources","type":"List"},"createdBy":{"structure_name":"core/com/zoho/crm/api/user_groups/owner","name":"created_by","type":"core/com/zoho/crm/api/user_groups/owner"},"name":{"name":"name","type":"String"},"createdTime":{"name":"created_time","type":"DateTime"},"description":{"name":"description","type":"String"},"modifiedBy":{"structure_name":"core/com/zoho/crm/api/user_groups/owner","name":"modified_by","type":"core/com/zoho/crm/api/user_groups/owner"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/change_owner/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/mass_delete_cvid/status":{"failedCount":{"name":"Failed_Count","type":"Integer"},"deletedCount":{"name":"Deleted_Count","type":"Integer"},"totalCount":{"name":"Total_Count","type":"Integer"},"status":{"values":["COMPLETED","RUNNING","FAILED"],"name":"Status","type":"utils/util/choice"}},"core/com/zoho/crm/api/user_groups/get_sources_param":{"perPage":{"name":"per_page","type":"String"},"userType":{"name":"user_type","type":"String"},"page":{"name":"page","type":"String"},"type":{"name":"type","type":"String"}},"core/com/zoho/crm/api/entity_scores/entity_scores":{"scoringRule":{"structure_name":"core/com/zoho/crm/api/entity_scores/scoring_rule_structure","name":"Scoring_Rule","type":"core/com/zoho/crm/api/entity_scores/scoring_rule_structure"},"score":{"name":"Score","type":"Integer"},"fieldStates":{"name":"$field_states","type":"List"},"positiveScore":{"name":"Positive_Score","type":"Integer"},"touchPointPositiveScore":{"name":"Touch_Point_Positive_Score","type":"Integer"},"ziaVisions":{"name":"$zia_visions","type":"Boolean"},"touchPointNegativeScore":{"name":"Touch_Point_Negative_Score","type":"Integer"},"id":{"name":"id","type":"Long"},"negativeScore":{"name":"Negative_Score","type":"Integer"},"entity":{"structure_name":"core/com/zoho/crm/api/entity_scores/entity_structure_group","name":"Entity","interface":true,"type":"core/com/zoho/crm/api/entity_scores/entity_structure_group"},"touchPointScore":{"name":"Touch_Point_Score","type":"Integer"}},"core/com/zoho/crm/api/wizards/connection":{"targetScreen":{"structure_name":"core/com/zoho/crm/api/wizards/screen","name":"target_screen","type":"core/com/zoho/crm/api/wizards/screen"},"sourceButton":{"structure_name":"core/com/zoho/crm/api/wizards/button","name":"source_button","type":"core/com/zoho/crm/api/wizards/button"}},"core/com/zoho/crm/api/modules/response_handler":{"classes":["core/com/zoho/crm/api/modules/response_wrapper","core/com/zoho/crm/api/modules/api_exception"],"interface":true},"core/com/zoho/crm/api/holidays/get_holidays_header":{"xCrmOrg":{"name":"X-CRM-ORG","type":"String"}},"core/com/zoho/crm/api/backup/backup":{"requester":{"structure_name":"core/com/zoho/crm/api/backup/requester","name":"requester","type":"core/com/zoho/crm/api/backup/requester"},"rrule":{"name":"rrule","type":"String"},"scheduledDate":{"name":"scheduled_date","type":"DateTime"},"id":{"name":"id","type":"Long"},"startDate":{"name":"start_date","type":"DateTime"},"status":{"name":"status","type":"String"}},"core/com/zoho/crm/api/user_groups/action_response":{"classes":["core/com/zoho/crm/api/user_groups/api_exception","core/com/zoho/crm/api/user_groups/success_response"],"interface":true},"core/com/zoho/crm/api/mass_convert/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/bulk_read/action_handler":{"classes":["core/com/zoho/crm/api/bulk_read/api_exception","core/com/zoho/crm/api/bulk_read/action_wrapper"],"interface":true},"core/com/zoho/crm/api/users_unavailability/response_wrapper":{"usersUnavailability":{"structure_name":"core/com/zoho/crm/api/users_unavailability/users_unavailability","name":"users_unavailability","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/users_unavailability/info","name":"info","type":"core/com/zoho/crm/api/users_unavailability/info"}},"core/com/zoho/crm/api/field_map_dependency/child":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/blueprint/transition":{"executionTime":{"name":"execution_time","type":"DateTime"},"criteriaMatched":{"name":"criteria_matched","type":"Boolean"},"parentTransition":{"structure_name":"core/com/zoho/crm/api/blueprint/transition","name":"parent_transition","type":"core/com/zoho/crm/api/blueprint/transition"},"percentPartialSave":{"name":"percent_partial_save","type":"Integer"},"data":{"structure_name":"core/com/zoho/crm/api/record/record","name":"data","type":"core/com/zoho/crm/api/record/record"},"nextTransitions":{"structure_name":"core/com/zoho/crm/api/blueprint/next_transition","name":"next_transitions","type":"List"},"name":{"name":"name","type":"String"},"criteriaMessage":{"name":"criteria_message","type":"String"},"nextFieldValue":{"name":"next_field_value","type":"String"},"id":{"name":"id","type":"Long"},"type":{"name":"type","type":"String"},"fields":{"structure_name":"core/com/zoho/crm/api/blueprint/field","name":"fields","type":"List"}},"core/com/zoho/crm/api/users/response_wrapper":{"users":{"structure_name":"core/com/zoho/crm/api/users/users","name":"users","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/users/info","name":"info","type":"core/com/zoho/crm/api/users/info"}},"core/com/zoho/crm/api/files/response_handler":{"classes":["core/com/zoho/crm/api/files/api_exception","core/com/zoho/crm/api/files/file_body_wrapper"],"interface":true},"core/com/zoho/crm/api/custom_views/action_handler":{"classes":["core/com/zoho/crm/api/custom_views/api_exception"],"interface":true},"core/com/zoho/crm/api/users_transfer_delete/action_wrapper":{"transferAndDelete":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/action_response","name":"transfer_and_delete","type":"List"}},"core/com/zoho/crm/api/associate_email/associate_email":{"cc":{"structure_name":"core/com/zoho/crm/api/associate_email/to","name":"cc","type":"List"},"dateTime":{"name":"date_time","type":"DateTime"},"bcc":{"structure_name":"core/com/zoho/crm/api/associate_email/to","name":"bcc","type":"List"},"attachments":{"structure_name":"core/com/zoho/crm/api/associate_email/attachments","name":"attachments","type":"List"},"linkedRecord":{"structure_name":"core/com/zoho/crm/api/associate_email/linked_record","name":"linked_record","type":"core/com/zoho/crm/api/associate_email/linked_record"},"subject":{"name":"subject","max-length":250,"type":"String","min-length":1},"from":{"structure_name":"core/com/zoho/crm/api/associate_email/from","name":"from","type":"core/com/zoho/crm/api/associate_email/from"},"mailFormat":{"values":["html","text"],"name":"mail_format","type":"utils/util/choice"},"to":{"structure_name":"core/com/zoho/crm/api/associate_email/to","name":"to","type":"List"},"originalMessageId":{"name":"original_message_id","type":"String"},"sent":{"name":"sent","type":"Boolean"},"content":{"name":"content","type":"String"}},"core/com/zoho/crm/api/fields/api_exception":{"code":{"values":["INVALID_MODULE","MANDATORY_NOT_FOUND","INVALID_DATA","REQUIRED_PARAM_MISSING","LIMIT_EXCEEDED","DEPENDENT_FIELD_MISSING","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"expected_data_type","type":"String"},{"name":"param_name","type":"String"},{"name":"limit","type":"Integer"},{"structure_name":"core/com/zoho/crm/api/fields/mandatory_details","name":"limit_due_to","type":"List"},{"structure_name":"core/com/zoho/crm/api/fields/mandatory_details","name":"dependee","type":"core/com/zoho/crm/api/fields/mandatory_details"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/blueprint/currency":{"roundingOption":{"name":"rounding_option","type":"String"},"precision":{"name":"precision","type":"Integer"}},"core/com/zoho/crm/api/email_related_records/status":{"lastOpen":{"name":"last_open","type":"DateTime"},"firstOpen":{"name":"first_open","type":"DateTime"},"count":{"name":"count","type":"String"},"bouncedReason":{"name":"bounced_reason","type":"String"},"type":{"name":"type","type":"String"},"bouncedTime":{"name":"bounced_time","type":"DateTime"}},"core/com/zoho/crm/api/record/get_record_header":{"IfModifiedSince":{"name":"If-Modified-Since","type":"DateTime"},"XEXTERNAL":{"name":"X-EXTERNAL","type":"String"}},"core/com/zoho/crm/api/users_transfer_delete/body_wrapper":{"transferAndDelete":{"structure_name":"core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete","name":"transfer_and_delete","max-length":1,"type":"List"}},"core/com/zoho/crm/api/scoring_rules/action_handler":{"classes":["core/com/zoho/crm/api/scoring_rules/action_wrapper","core/com/zoho/crm/api/scoring_rules/success_response","core/com/zoho/crm/api/scoring_rules/api_exception"],"interface":true},"core/com/zoho/crm/api/org/org":{"country":{"name":"country","type":"String"},"city":{"name":"city","type":"String"},"companyName":{"name":"company_name","type":"String"},"callIcon":{"name":"call_icon","type":"String"},"description":{"name":"description","type":"String"},"oauthPresence":{"name":"oauth_presence","type":"Boolean"},"gappsEnabled":{"name":"gapps_enabled","type":"Boolean"},"hierarchyPreferences":{"structure_name":"core/com/zoho/crm/api/org/hierarchy_preferences","name":"hierarchy_preferences","type":"core/com/zoho/crm/api/org/hierarchy_preferences"},"ziaPortalId":{"name":"zia_portal_id","type":"String"},"employeeCount":{"regex":"[0-9]+","name":"employee_count","max-length":18,"type":"String"},"street":{"name":"street","type":"String"},"countryCode":{"name":"country_code","type":"String"},"checkinPreferences":{"structure_name":"core/com/zoho/crm/api/org/checkin_preferences","name":"checkin_preferences","type":"core/com/zoho/crm/api/org/checkin_preferences"},"currencyLocale":{"name":"currency_locale","type":"String"},"alias":{"name":"alias","type":"String"},"currency":{"name":"currency","type":"String"},"id":{"name":"id","type":"String"},"state":{"name":"state","type":"String"},"fax":{"name":"fax","type":"String"},"ziaZgid":{"name":"zia_zgid","type":"Integer"},"primaryEmail":{"name":"primary_email","type":"String"},"zip":{"name":"zip","type":"String"},"website":{"regex":"www[.][a-z0-9]+[.][a-z]{3}","name":"website","type":"String"},"ezgid":{"name":"ezgid","type":"String"},"mobile":{"name":"mobile","type":"String"},"photoId":{"name":"photo_id","type":"String"},"translationEnabled":{"name":"translation_enabled","type":"Boolean"},"currencySymbol":{"name":"currency_symbol","type":"String"},"timeZone":{"name":"time_zone","type":"TimeZone"},"privacySettings":{"name":"privacy_settings","type":"Boolean"},"maxPerPage":{"name":"max_per_page","type":"Integer"},"zgid":{"name":"zgid","type":"String"},"licenseDetails":{"structure_name":"core/com/zoho/crm/api/org/license_details","name":"license_details","type":"core/com/zoho/crm/api/org/license_details"},"mcStatus":{"name":"mc_status","type":"Boolean"},"primaryZuid":{"name":"primary_zuid","type":"String"},"liteUsersEnabled":{"name":"lite_users_enabled","type":"Boolean"},"phone":{"name":"phone","type":"String"},"isoCode":{"name":"iso_code","type":"String"},"domainName":{"name":"domain_name","type":"String"},"deletableOrgAccount":{"name":"deletable_org_account","type":"Boolean"},"hipaaComplianceEnabled":{"name":"hipaa_compliance_enabled","type":"Boolean"}},"core/com/zoho/crm/api/attachments/response_wrapper":{"data":{"structure_name":"core/com/zoho/crm/api/attachments/attachment","name":"data","type":"List"},"info":{"structure_name":"core/com/zoho/crm/api/attachments/info","name":"info","type":"core/com/zoho/crm/api/attachments/info"}},"core/com/zoho/crm/api/modules/lookup_field_properties":{"fields":{"structure_name":"core/com/zoho/crm/api/modules/lookup_field","name":"fields","type":"List"}},"core/com/zoho/crm/api/fields/history_tracking_module":{"layout":{"structure_name":"core/com/zoho/crm/api/layouts/layouts","name":"layout","type":"core/com/zoho/crm/api/layouts/layouts"},"displayLabel":{"name":"display_label","type":"String"},"apiName":{"name":"api_name","type":"String"},"module":{"structure_name":"core/com/zoho/crm/api/fields/history_tracking_module","name":"module","type":"core/com/zoho/crm/api/fields/history_tracking_module"},"moduleName":{"name":"module_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/pipeline/get_pipelines_param":{"layoutId":{"name":"layout_id","type":"Long"}},"core/com/zoho/crm/api/field_attachments/file_body_wrapper":{"file":{"name":"file","type":"utils/util/stream_wrapper"}},"core/com/zoho/crm/api/change_owner/api_exception":{"code":{"values":["NO_PERMISSION","INVALID_DATA","MANDATORY_NOT_FOUND","EXPECTED_FIELD_MISSING","NOT_SUPPORTED","AMBIGUITY_DURING_PROCESSING","INTERNAL_SERVER_ERROR","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"permissions","type":"List"},{"name":"resource_path_index","type":"Integer"},{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"structure_name":"core/com/zoho/crm/api/change_owner/error_details","name":"expected_fields","type":"List"},{"structure_name":"core/com/zoho/crm/api/change_owner/error_details","name":"ambiguity_due_to","type":"List"},{"name":"expected_data_type","type":"String"},{"name":"regex","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/download_attachments/api_exception":{"code":{"values":["INVALID_TOKEN","INVALID_URL_PATTERN","INVALID_REQUEST_METHOD","INVALID_DATA","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"name":"details","type":"Map"},"message":{"values":["invalid oauth token","Please check if the URL trying to access is a correct one","The http request method type is not a valid one","The module name given seems to be invalid","the request does not contain any file","invalid file type"],"name":"message","type":"utils/util/choice"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/backup/action_response":{"classes":["core/com/zoho/crm/api/backup/success_response","core/com/zoho/crm/api/backup/api_exception"],"interface":true},"core/com/zoho/crm/api/field_map_dependency/parent":{"apiName":{"name":"api_name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/currencies/error_details":{"apiName":{"name":"api_name","type":"String"},"jsonPath":{"name":"json_path","type":"String"}},"core/com/zoho/crm/api/timelines/field_history_value":{"new1":{"name":"new","type":"String"},"old":{"name":"old","type":"String"}},"core/com/zoho/crm/api/assignment_rules/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/record/mass_update":{"failedCount":{"name":"Failed_Count","type":"Integer"},"updatedCount":{"name":"Updated_Count","type":"Integer"},"notUpdatedCount":{"name":"Not_Updated_Count","type":"Integer"},"totalCount":{"name":"Total_Count","type":"Integer"},"status":{"values":["COMPLETED","SCHEDULED","RUNNING","FAILED"],"name":"Status","type":"utils/util/choice"}},"core/com/zoho/crm/api/field_attachments/get_field_attachments_param":{"fieldsAttachmentId":{"name":"fields_attachment_id","type":"Long"}},"core/com/zoho/crm/api/users/owner":{"lastName":{"name":"last_name","type":"String"},"firstName":{"name":"first_name","type":"String"},"name":{"name":"name","type":"String"},"id":{"name":"id","type":"Long"}},"core/com/zoho/crm/api/user_type_users/info":{"perPage":{"name":"per_page","type":"Integer"},"moreRecords":{"name":"more_records","type":"Boolean"},"count":{"name":"count","type":"Integer"},"page":{"name":"page","type":"Integer"},"totalCount":{"name":"total_count","type":"Integer"}},"core/com/zoho/crm/api/pipeline/success_response":{"code":{"values":["SUCCESS"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"id","type":"Long"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["success"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/mass_convert/api_exception":{"code":{"values":["INVALID_DATA","EXPECTED_FIELD_MISSING","MANDATORY_NOT_FOUND","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"api_name","type":"String"},{"name":"json_path","type":"String"},{"name":"param","type":"String"},{"structure_name":"core/com/zoho/crm/api/mass_convert/error_details","name":"expected_fields","type":"List"},{"name":"param_name","type":"String"},{"name":"expected_data_type","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}},"core/com/zoho/crm/api/related_lists/api_exception":{"code":{"values":["INVALID_MODULE","INVALID_TOKEN","INVALID_URL_PATTERN","BAD_REQUEST","NO_PERMISSION","OAUTH_SCOPE_MISMATCH","INTERNAL_ERROR","LIMIT_REACHED","NOT_ALLOWED","ALREADY_USED","INVALID_REQUEST_METHOD","Not Modified","AUTHENTICATION_FAILURE","MANDATORY_NOT_FOUND","INTERNAL_SERVER_ERROR"],"name":"code","type":"utils/util/choice"},"details":{"keys":[{"name":"param","type":"String"}],"name":"details","type":"Map"},"message":{"name":"message","type":"String"},"status":{"values":["error"],"name":"status","type":"utils/util/choice"}}} \ No newline at end of file diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/action_wrapper.js new file mode 100644 index 0000000..44fe1ab --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/action_wrapper.js @@ -0,0 +1,63 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + appointmentPreferences; + keyModified = new Map(); + /** + * The method to get the appointmentPreferences + * @returns {ActionResponse} An instance of ActionResponse + */ + getAppointmentPreferences() { + return this.appointmentPreferences; + + } + + /** + * The method to set the value to appointmentPreferences + * @param {ActionResponse} appointmentPreferences An instance of ActionResponse + */ + setAppointmentPreferences(appointmentPreferences) { + this.appointmentPreferences = appointmentPreferences; + this.keyModified.set("appointment_preferences", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/api_exception.js new file mode 100644 index 0000000..35bf8ba --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/appointment_preference.js b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/appointment_preference.js new file mode 100644 index 0000000..c490883 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/appointment_preference.js @@ -0,0 +1,182 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AppointmentPreference{ + + showJobSheet; + whenDurationExceeds; + whenAppointmentCompleted; + allowBookingOutsideServiceAvailability; + allowBookingOutsideBusinesshours; + dealRecordConfiguration; + keyModified = new Map(); + /** + * The method to get the showJobSheet + * @returns {Boolean} A Boolean representing the showJobSheet + */ + getShowJobSheet() { + return this.showJobSheet; + + } + + /** + * The method to set the value to showJobSheet + * @param {Boolean} showJobSheet A Boolean representing the showJobSheet + */ + setShowJobSheet(showJobSheet) { + if((showJobSheet != null) && (!(Object.prototype.toString.call(showJobSheet) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: showJobSheet EXPECTED TYPE: Boolean", null, null); + } + this.showJobSheet = showJobSheet; + this.keyModified.set("show_job_sheet", 1); + + } + + /** + * The method to get the whenDurationExceeds + * @returns {Choice} An instance of Choice + */ + getWhenDurationExceeds() { + return this.whenDurationExceeds; + + } + + /** + * The method to set the value to whenDurationExceeds + * @param {Choice} whenDurationExceeds An instance of Choice + */ + setWhenDurationExceeds(whenDurationExceeds) { + if((whenDurationExceeds != null) && (!(whenDurationExceeds instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: whenDurationExceeds EXPECTED TYPE: Choice", null, null); + } + this.whenDurationExceeds = whenDurationExceeds; + this.keyModified.set("when_duration_exceeds", 1); + + } + + /** + * The method to get the whenAppointmentCompleted + * @returns {Choice} An instance of Choice + */ + getWhenAppointmentCompleted() { + return this.whenAppointmentCompleted; + + } + + /** + * The method to set the value to whenAppointmentCompleted + * @param {Choice} whenAppointmentCompleted An instance of Choice + */ + setWhenAppointmentCompleted(whenAppointmentCompleted) { + if((whenAppointmentCompleted != null) && (!(whenAppointmentCompleted instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: whenAppointmentCompleted EXPECTED TYPE: Choice", null, null); + } + this.whenAppointmentCompleted = whenAppointmentCompleted; + this.keyModified.set("when_appointment_completed", 1); + + } + + /** + * The method to get the allowBookingOutsideServiceAvailability + * @returns {Boolean} A Boolean representing the allowBookingOutsideServiceAvailability + */ + getAllowBookingOutsideServiceAvailability() { + return this.allowBookingOutsideServiceAvailability; + + } + + /** + * The method to set the value to allowBookingOutsideServiceAvailability + * @param {Boolean} allowBookingOutsideServiceAvailability A Boolean representing the allowBookingOutsideServiceAvailability + */ + setAllowBookingOutsideServiceAvailability(allowBookingOutsideServiceAvailability) { + if((allowBookingOutsideServiceAvailability != null) && (!(Object.prototype.toString.call(allowBookingOutsideServiceAvailability) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: allowBookingOutsideServiceAvailability EXPECTED TYPE: Boolean", null, null); + } + this.allowBookingOutsideServiceAvailability = allowBookingOutsideServiceAvailability; + this.keyModified.set("allow_booking_outside_service_availability", 1); + + } + + /** + * The method to get the allowBookingOutsideBusinesshours + * @returns {Boolean} A Boolean representing the allowBookingOutsideBusinesshours + */ + getAllowBookingOutsideBusinesshours() { + return this.allowBookingOutsideBusinesshours; + + } + + /** + * The method to set the value to allowBookingOutsideBusinesshours + * @param {Boolean} allowBookingOutsideBusinesshours A Boolean representing the allowBookingOutsideBusinesshours + */ + setAllowBookingOutsideBusinesshours(allowBookingOutsideBusinesshours) { + if((allowBookingOutsideBusinesshours != null) && (!(Object.prototype.toString.call(allowBookingOutsideBusinesshours) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: allowBookingOutsideBusinesshours EXPECTED TYPE: Boolean", null, null); + } + this.allowBookingOutsideBusinesshours = allowBookingOutsideBusinesshours; + this.keyModified.set("allow_booking_outside_businesshours", 1); + + } + + /** + * The method to get the dealRecordConfiguration + * @returns {Map} A Map representing the dealRecordConfiguration + */ + getDealRecordConfiguration() { + return this.dealRecordConfiguration; + + } + + /** + * The method to set the value to dealRecordConfiguration + * @param {Map} dealRecordConfiguration A Map representing the dealRecordConfiguration + */ + setDealRecordConfiguration(dealRecordConfiguration) { + if((dealRecordConfiguration != null) && (!(Object.prototype.toString.call(dealRecordConfiguration) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dealRecordConfiguration EXPECTED TYPE: Map", null, null); + } + this.dealRecordConfiguration = dealRecordConfiguration; + this.keyModified.set("deal_record_configuration", 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 { + AppointmentPreference as MasterModel, + AppointmentPreference as AppointmentPreference +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/appointment_preference_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/appointment_preference_operations.js new file mode 100644 index 0000000..ae24d12 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/appointment_preference_operations.js @@ -0,0 +1,69 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 AppointmentPreferenceOperations{ + /** + * The method to get appointment preference + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getAppointmentPreference(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/appointment_preferences"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to update appointment preference + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateAppointmentPreference(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/appointment_preferences"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class GetAppointmentPreferenceParam{ + + static INCLUDE = new Param("include", "com.zoho.crm.api.AppointmentPreference.GetAppointmentPreferenceParam"); +} + +export { + GetAppointmentPreferenceParam as GetAppointmentPreferenceParam, + AppointmentPreferenceOperations as MasterModel, + AppointmentPreferenceOperations as AppointmentPreferenceOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/body_wrapper.js new file mode 100644 index 0000000..05b0287 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/body_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + appointmentPreferences; + keyModified = new Map(); + /** + * The method to get the appointmentPreferences + * @returns {AppointmentPreference} An instance of AppointmentPreference + */ + getAppointmentPreferences() { + return this.appointmentPreferences; + + } + + /** + * The method to set the value to appointmentPreferences + * @param {AppointmentPreference} appointmentPreferences An instance of AppointmentPreference + */ + async setAppointmentPreferences(appointmentPreferences) { + const AppointmentPreference = (await (import("./appointment_preference.js"))).MasterModel; + if((appointmentPreferences != null) && (!(appointmentPreferences instanceof AppointmentPreference))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: appointmentPreferences EXPECTED TYPE: AppointmentPreference", null, null); + } + this.appointmentPreferences = appointmentPreferences; + this.keyModified.set("appointment_preferences", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/field.js b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/field.js new file mode 100644 index 0000000..fb4ef4e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/field.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Field{ + + apiName; + id; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Field as MasterModel, + Field as Field +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/field_mappings.js b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/field_mappings.js new file mode 100644 index 0000000..26801f9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/field_mappings.js @@ -0,0 +1,114 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class FieldMappings{ + + type; + value; + field; + keyModified = new Map(); + /** + * The method to get the type + * @returns {Choice} An instance of Choice + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {Choice} type An instance of Choice + */ + setType(type) { + if((type != null) && (!(type instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: Choice", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the value + * @returns {String} A String representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {String} value A String representing the value + */ + setValue(value) { + if((value != null) && (!(Object.prototype.toString.call(value) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: value EXPECTED TYPE: String", null, null); + } + this.value = value; + this.keyModified.set("value", 1); + + } + + /** + * The method to get the field + * @returns {Field} An instance of Field + */ + getField() { + return this.field; + + } + + /** + * The method to set the value to field + * @param {Field} field An instance of Field + */ + async setField(field) { + const Field = (await (import("./field.js"))).MasterModel; + if((field != null) && (!(field instanceof Field))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: field EXPECTED TYPE: Field", null, null); + } + this.field = field; + this.keyModified.set("field", 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 { + FieldMappings as MasterModel, + FieldMappings as FieldMappings +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/import_appointment_preference.js b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/import_appointment_preference.js new file mode 100644 index 0000000..a2de387 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/import_appointment_preference.js @@ -0,0 +1,14 @@ +export { Field } from "./field.js"; +export { AppointmentPreferenceOperations } from "./appointment_preference_operations.js"; +export { GetAppointmentPreferenceParam } from "./appointment_preference_operations.js"; +export * as ResponseHandler from "./response_handler.js"; +export { FieldMappings } from "./field_mappings.js"; +export { AppointmentPreference } from "./appointment_preference.js"; +export { Layout } from "./layout.js"; +export * as ActionResponse from "./action_response.js"; +export { APIException } from "./api_exception.js"; +export { SuccessResponse } from "./success_response.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export * as ActionHandler from "./action_handler.js"; +export { ActionWrapper } from "./action_wrapper.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/layout.js b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/layout.js new file mode 100644 index 0000000..86326de --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/layout.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Layout{ + + apiName; + id; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Layout as MasterModel, + Layout as Layout +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/response_wrapper.js new file mode 100644 index 0000000..e042eee --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/response_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + appointmentPreferences; + keyModified = new Map(); + /** + * The method to get the appointmentPreferences + * @returns {AppointmentPreference} An instance of AppointmentPreference + */ + getAppointmentPreferences() { + return this.appointmentPreferences; + + } + + /** + * The method to set the value to appointmentPreferences + * @param {AppointmentPreference} appointmentPreferences An instance of AppointmentPreference + */ + async setAppointmentPreferences(appointmentPreferences) { + const AppointmentPreference = (await (import("./appointment_preference.js"))).MasterModel; + if((appointmentPreferences != null) && (!(appointmentPreferences instanceof AppointmentPreference))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: appointmentPreferences EXPECTED TYPE: AppointmentPreference", null, null); + } + this.appointmentPreferences = appointmentPreferences; + this.keyModified.set("appointment_preferences", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/success_response.js new file mode 100644 index 0000000..39525ad --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/appointment_preference/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/action_wrapper.js new file mode 100644 index 0000000..9163653 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + assignmentRules; + keyModified = new Map(); + /** + * The method to get the assignmentRules + * @returns {Array} An Array representing the assignmentRules + */ + getAssignmentRules() { + return this.assignmentRules; + + } + + /** + * The method to set the value to assignmentRules + * @param {Array} assignmentRules An Array representing the assignmentRules + */ + setAssignmentRules(assignmentRules) { + if((assignmentRules != null) && (!(Object.prototype.toString.call(assignmentRules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: assignmentRules EXPECTED TYPE: Array", null, null); + } + this.assignmentRules = assignmentRules; + this.keyModified.set("assignment_rules", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/api_exception.js new file mode 100644 index 0000000..8bc1a10 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/assignment_rules.js b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/assignment_rules.js new file mode 100644 index 0000000..610befe --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/assignment_rules.js @@ -0,0 +1,277 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AssignmentRules{ + + createdTime; + modifiedTime; + defaultAssignee; + apiName; + modifiedBy; + createdBy; + id; + name; + module; + description; + keyModified = new Map(); + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the defaultAssignee + * @returns {DefaultAssignee} An instance of DefaultAssignee + */ + getDefaultAssignee() { + return this.defaultAssignee; + + } + + /** + * The method to set the value to defaultAssignee + * @param {DefaultAssignee} defaultAssignee An instance of DefaultAssignee + */ + async setDefaultAssignee(defaultAssignee) { + const DefaultAssignee = (await (import("./default_assignee.js"))).MasterModel; + if((defaultAssignee != null) && (!(defaultAssignee instanceof DefaultAssignee))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: defaultAssignee EXPECTED TYPE: DefaultAssignee", null, null); + } + this.defaultAssignee = defaultAssignee; + this.keyModified.set("default_assignee", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {CreatedBy} An instance of CreatedBy + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {CreatedBy} modifiedBy An instance of CreatedBy + */ + async setModifiedBy(modifiedBy) { + const CreatedBy = (await (import("./created_by.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof CreatedBy))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: CreatedBy", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("modified_by", 1); + + } + + /** + * The method to get the createdBy + * @returns {CreatedBy} An instance of CreatedBy + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {CreatedBy} createdBy An instance of CreatedBy + */ + async setCreatedBy(createdBy) { + const CreatedBy = (await (import("./created_by.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof CreatedBy))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: CreatedBy", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the module + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {MinifiedModule} module An instance of MinifiedModule + */ + async setModule(module) { + const MinifiedModule = (await (import("../modules/minified_module.js"))).MasterModel; + if((module != null) && (!(module instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: MinifiedModule", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the description + * @returns {String} A String representing the description + */ + getDescription() { + return this.description; + + } + + /** + * The method to set the value to description + * @param {String} description A String representing the description + */ + setDescription(description) { + if((description != null) && (!(Object.prototype.toString.call(description) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: description EXPECTED TYPE: String", null, null); + } + this.description = description; + this.keyModified.set("description", 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 { + AssignmentRules as MasterModel, + AssignmentRules as AssignmentRules +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/assignment_rules_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/assignment_rules_operations.js new file mode 100644 index 0000000..508f4f9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/assignment_rules_operations.js @@ -0,0 +1,77 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 AssignmentRulesOperations{ + /** + * The method to get assignment rules + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getAssignmentRules(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/automation/assignment_rules"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to get assignment rule + * @param {BigInt} id A BigInt representing the id + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getAssignmentRule(id, paramInstance=null) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/automation/assignment_rules/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + +} +class GetAssignmentRulesParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.AssignmentRules.GetAssignmentRulesParam"); +} + +class GetAssignmentRuleParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.AssignmentRules.GetAssignmentRuleParam"); +} + +export { + GetAssignmentRulesParam as GetAssignmentRulesParam, + GetAssignmentRuleParam as GetAssignmentRuleParam, + AssignmentRulesOperations as MasterModel, + AssignmentRulesOperations as AssignmentRulesOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/created_by.js b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/created_by.js new file mode 100644 index 0000000..a095e59 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/created_by.js @@ -0,0 +1,136 @@ +import {MinifiedUser} from "../users/minified_user.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class CreatedBy extends MinifiedUser{ + + zuid; + name; + id; + email; + keyModified = new Map(); + /** + * The method to get the zuid + * @returns {String} A String representing the zuid + */ + getZuid() { + return this.zuid; + + } + + /** + * The method to set the value to zuid + * @param {String} zuid A String representing the zuid + */ + setZuid(zuid) { + if((zuid != null) && (!(Object.prototype.toString.call(zuid) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: zuid EXPECTED TYPE: String", null, null); + } + this.zuid = zuid; + this.keyModified.set("zuid", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the email + * @returns {String} A String representing the email + */ + getEmail() { + return this.email; + + } + + /** + * The method to set the value to email + * @param {String} email A String representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: String", null, null); + } + this.email = email; + this.keyModified.set("email", 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 { + CreatedBy as MasterModel, + CreatedBy as CreatedBy +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/default_assignee.js b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/default_assignee.js new file mode 100644 index 0000000..43aabaf --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/default_assignee.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DefaultAssignee{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + DefaultAssignee as MasterModel, + DefaultAssignee as DefaultAssignee +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/import_assignment_rules.js b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/import_assignment_rules.js new file mode 100644 index 0000000..f3984e0 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/import_assignment_rules.js @@ -0,0 +1,12 @@ +export { DefaultAssignee } from "./default_assignee.js"; +export { CreatedBy } from "./created_by.js"; +export { APIException } from "./api_exception.js"; +export * as ActionResponse from "./action_response.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { AssignmentRules } from "./assignment_rules.js"; +export * as ResponseHandler from "./response_handler.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { AssignmentRulesOperations } from "./assignment_rules_operations.js"; +export { GetAssignmentRulesParam } from "./assignment_rules_operations.js"; +export { GetAssignmentRuleParam } from "./assignment_rules_operations.js"; +export { SuccessResponse } from "./success_response.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/response_wrapper.js new file mode 100644 index 0000000..b03603f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + assignmentRules; + keyModified = new Map(); + /** + * The method to get the assignmentRules + * @returns {Array} An Array representing the assignmentRules + */ + getAssignmentRules() { + return this.assignmentRules; + + } + + /** + * The method to set the value to assignmentRules + * @param {Array} assignmentRules An Array representing the assignmentRules + */ + setAssignmentRules(assignmentRules) { + if((assignmentRules != null) && (!(Object.prototype.toString.call(assignmentRules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: assignmentRules EXPECTED TYPE: Array", null, null); + } + this.assignmentRules = assignmentRules; + this.keyModified.set("assignment_rules", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/success_response.js new file mode 100644 index 0000000..6cdb15e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/assignment_rules/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/action_wrapper.js new file mode 100644 index 0000000..d805999 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + emails; + keyModified = new Map(); + /** + * The method to get the emails + * @returns {Array} An Array representing the emails + */ + getEmails() { + return this.emails; + + } + + /** + * The method to set the value to emails + * @param {Array} emails An Array representing the emails + */ + setEmails(emails) { + if((emails != null) && (!(Object.prototype.toString.call(emails) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: emails EXPECTED TYPE: Array", null, null); + } + this.emails = emails; + this.keyModified.set("Emails", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/api_exception.js new file mode 100644 index 0000000..db2d361 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/associate_email.js b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/associate_email.js new file mode 100644 index 0000000..f7c7d81 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/associate_email.js @@ -0,0 +1,322 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AssociateEmail{ + + from; + to; + cc; + bcc; + attachments; + content; + mailFormat; + subject; + originalMessageId; + sent; + dateTime; + linkedRecord; + keyModified = new Map(); + /** + * The method to get the from + * @returns {From} An instance of From + */ + getFrom() { + return this.from; + + } + + /** + * The method to set the value to from + * @param {From} from An instance of From + */ + async setFrom(from) { + const From = (await (import("./from.js"))).MasterModel; + if((from != null) && (!(from instanceof From))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: from EXPECTED TYPE: From", null, null); + } + this.from = from; + this.keyModified.set("from", 1); + + } + + /** + * The method to get the to + * @returns {Array} An Array representing the to + */ + getTo() { + return this.to; + + } + + /** + * The method to set the value to to + * @param {Array} to An Array representing the to + */ + setTo(to) { + if((to != null) && (!(Object.prototype.toString.call(to) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: to EXPECTED TYPE: Array", null, null); + } + this.to = to; + this.keyModified.set("to", 1); + + } + + /** + * The method to get the cc + * @returns {Array} An Array representing the cc + */ + getCc() { + return this.cc; + + } + + /** + * The method to set the value to cc + * @param {Array} cc An Array representing the cc + */ + setCc(cc) { + if((cc != null) && (!(Object.prototype.toString.call(cc) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: cc EXPECTED TYPE: Array", null, null); + } + this.cc = cc; + this.keyModified.set("cc", 1); + + } + + /** + * The method to get the bcc + * @returns {Array} An Array representing the bcc + */ + getBcc() { + return this.bcc; + + } + + /** + * The method to set the value to bcc + * @param {Array} bcc An Array representing the bcc + */ + setBcc(bcc) { + if((bcc != null) && (!(Object.prototype.toString.call(bcc) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: bcc EXPECTED TYPE: Array", null, null); + } + this.bcc = bcc; + this.keyModified.set("bcc", 1); + + } + + /** + * The method to get the attachments + * @returns {Array} An Array representing the attachments + */ + getAttachments() { + return this.attachments; + + } + + /** + * The method to set the value to attachments + * @param {Array} attachments An Array representing the attachments + */ + setAttachments(attachments) { + if((attachments != null) && (!(Object.prototype.toString.call(attachments) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: attachments EXPECTED TYPE: Array", null, null); + } + this.attachments = attachments; + this.keyModified.set("attachments", 1); + + } + + /** + * The method to get the content + * @returns {String} A String representing the content + */ + getContent() { + return this.content; + + } + + /** + * The method to set the value to content + * @param {String} content A String representing the content + */ + setContent(content) { + if((content != null) && (!(Object.prototype.toString.call(content) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: content EXPECTED TYPE: String", null, null); + } + this.content = content; + this.keyModified.set("content", 1); + + } + + /** + * The method to get the mailFormat + * @returns {Choice} An instance of Choice + */ + getMailFormat() { + return this.mailFormat; + + } + + /** + * The method to set the value to mailFormat + * @param {Choice} mailFormat An instance of Choice + */ + setMailFormat(mailFormat) { + if((mailFormat != null) && (!(mailFormat instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: mailFormat EXPECTED TYPE: Choice", null, null); + } + this.mailFormat = mailFormat; + this.keyModified.set("mail_format", 1); + + } + + /** + * The method to get the subject + * @returns {String} A String representing the subject + */ + getSubject() { + return this.subject; + + } + + /** + * The method to set the value to subject + * @param {String} subject A String representing the subject + */ + setSubject(subject) { + if((subject != null) && (!(Object.prototype.toString.call(subject) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subject EXPECTED TYPE: String", null, null); + } + this.subject = subject; + this.keyModified.set("subject", 1); + + } + + /** + * The method to get the originalMessageId + * @returns {String} A String representing the originalMessageId + */ + getOriginalMessageId() { + return this.originalMessageId; + + } + + /** + * The method to set the value to originalMessageId + * @param {String} originalMessageId A String representing the originalMessageId + */ + setOriginalMessageId(originalMessageId) { + if((originalMessageId != null) && (!(Object.prototype.toString.call(originalMessageId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: originalMessageId EXPECTED TYPE: String", null, null); + } + this.originalMessageId = originalMessageId; + this.keyModified.set("original_message_id", 1); + + } + + /** + * The method to get the sent + * @returns {Boolean} A Boolean representing the sent + */ + getSent() { + return this.sent; + + } + + /** + * The method to set the value to sent + * @param {Boolean} sent A Boolean representing the sent + */ + setSent(sent) { + if((sent != null) && (!(Object.prototype.toString.call(sent) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sent EXPECTED TYPE: Boolean", null, null); + } + this.sent = sent; + this.keyModified.set("sent", 1); + + } + + /** + * The method to get the dateTime + * @returns {Date} An instance of Date + */ + getDateTime() { + return this.dateTime; + + } + + /** + * The method to set the value to dateTime + * @param {Date} dateTime An instance of Date + */ + setDateTime(dateTime) { + if((dateTime != null) && (!(dateTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dateTime EXPECTED TYPE: Date", null, null); + } + this.dateTime = dateTime; + this.keyModified.set("date_time", 1); + + } + + /** + * The method to get the linkedRecord + * @returns {LinkedRecord} An instance of LinkedRecord + */ + getLinkedRecord() { + return this.linkedRecord; + + } + + /** + * The method to set the value to linkedRecord + * @param {LinkedRecord} linkedRecord An instance of LinkedRecord + */ + async setLinkedRecord(linkedRecord) { + const LinkedRecord = (await (import("./linked_record.js"))).MasterModel; + if((linkedRecord != null) && (!(linkedRecord instanceof LinkedRecord))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: linkedRecord EXPECTED TYPE: LinkedRecord", null, null); + } + this.linkedRecord = linkedRecord; + this.keyModified.set("linked_record", 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 { + AssociateEmail as MasterModel, + AssociateEmail as AssociateEmail +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/associate_email_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/associate_email_operations.js new file mode 100644 index 0000000..a510065 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/associate_email_operations.js @@ -0,0 +1,50 @@ +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 AssociateEmailOperations{ + /** + * The method to associate + * @param {BigInt} recordid A BigInt representing the recordid + * @param {String} module A String representing the module + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async associate(recordid, module, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(recordid) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordid EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordid.toString()); + apiPath = apiPath.concat("/actions/associate_email"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +export { + AssociateEmailOperations as MasterModel, + AssociateEmailOperations as AssociateEmailOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/attachments.js b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/attachments.js new file mode 100644 index 0000000..76945c8 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/attachments.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Attachments{ + + id; + keyModified = new Map(); + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Attachments as MasterModel, + Attachments as Attachments +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/available.js b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/available.js new file mode 100644 index 0000000..fe9b3be --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/available.js @@ -0,0 +1,114 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Available{ + + available; + record; + linkedRecord; + keyModified = new Map(); + /** + * The method to get the available + * @returns {Boolean} A Boolean representing the available + */ + getAvailable() { + return this.available; + + } + + /** + * The method to set the value to available + * @param {Boolean} available A Boolean representing the available + */ + setAvailable(available) { + if((available != null) && (!(Object.prototype.toString.call(available) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: available EXPECTED TYPE: Boolean", null, null); + } + this.available = available; + this.keyModified.set("available", 1); + + } + + /** + * The method to get the record + * @returns {Record} An instance of Record + */ + getRecord() { + return this.record; + + } + + /** + * The method to set the value to record + * @param {Record} record An instance of Record + */ + async setRecord(record) { + const Record = (await (import("./record.js"))).MasterModel; + if((record != null) && (!(record instanceof Record))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: record EXPECTED TYPE: Record", null, null); + } + this.record = record; + this.keyModified.set("record", 1); + + } + + /** + * The method to get the linkedRecord + * @returns {LinkedRecord} An instance of LinkedRecord + */ + getLinkedRecord() { + return this.linkedRecord; + + } + + /** + * The method to set the value to linkedRecord + * @param {LinkedRecord} linkedRecord An instance of LinkedRecord + */ + async setLinkedRecord(linkedRecord) { + const LinkedRecord = (await (import("./linked_record.js"))).MasterModel; + if((linkedRecord != null) && (!(linkedRecord instanceof LinkedRecord))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: linkedRecord EXPECTED TYPE: LinkedRecord", null, null); + } + this.linkedRecord = linkedRecord; + this.keyModified.set("linked_record", 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 { + Available as MasterModel, + Available as Available +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/body_wrapper.js new file mode 100644 index 0000000..6ba70fd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + emails; + keyModified = new Map(); + /** + * The method to get the emails + * @returns {Array} An Array representing the emails + */ + getEmails() { + return this.emails; + + } + + /** + * The method to set the value to emails + * @param {Array} emails An Array representing the emails + */ + setEmails(emails) { + if((emails != null) && (!(Object.prototype.toString.call(emails) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: emails EXPECTED TYPE: Array", null, null); + } + this.emails = emails; + this.keyModified.set("Emails", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/from.js b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/from.js new file mode 100644 index 0000000..3688ed6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/from.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class From{ + + userName; + email; + keyModified = new Map(); + /** + * The method to get the userName + * @returns {String} A String representing the userName + */ + getUserName() { + return this.userName; + + } + + /** + * The method to set the value to userName + * @param {String} userName A String representing the userName + */ + setUserName(userName) { + if((userName != null) && (!(Object.prototype.toString.call(userName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: userName EXPECTED TYPE: String", null, null); + } + this.userName = userName; + this.keyModified.set("user_name", 1); + + } + + /** + * The method to get the email + * @returns {String} A String representing the email + */ + getEmail() { + return this.email; + + } + + /** + * The method to set the value to email + * @param {String} email A String representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: String", null, null); + } + this.email = email; + this.keyModified.set("email", 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 { + From as MasterModel, + From as From +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/import_associate_email.js b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/import_associate_email.js new file mode 100644 index 0000000..573dac3 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/import_associate_email.js @@ -0,0 +1,15 @@ +export { BodyWrapper } from "./body_wrapper.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { AssociateEmailOperations } from "./associate_email_operations.js"; +export * as ActionResponse from "./action_response.js"; +export { Available } from "./available.js"; +export { Attachments } from "./attachments.js"; +export { SuccessResponse } from "./success_response.js"; +export { AssociateEmail } from "./associate_email.js"; +export { APIException } from "./api_exception.js"; +export { ModuleMap } from "./module_map.js"; +export { LinkedRecord } from "./linked_record.js"; +export * as ActionHandler from "./action_handler.js"; +export { From } from "./from.js"; +export { To } from "./to.js"; +export { Record } from "./record.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/linked_record.js b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/linked_record.js new file mode 100644 index 0000000..d84b62c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/linked_record.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class LinkedRecord{ + + module; + id; + keyModified = new Map(); + /** + * The method to get the module + * @returns {ModuleMap} An instance of ModuleMap + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {ModuleMap} module An instance of ModuleMap + */ + async setModule(module) { + const ModuleMap = (await (import("./module_map.js"))).MasterModel; + if((module != null) && (!(module instanceof ModuleMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: ModuleMap", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + LinkedRecord as MasterModel, + LinkedRecord as LinkedRecord +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/module_map.js b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/module_map.js new file mode 100644 index 0000000..a7d7a5b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/module_map.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ModuleMap{ + + apiName; + id; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + ModuleMap as MasterModel, + ModuleMap as ModuleMap +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/record.js b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/record.js new file mode 100644 index 0000000..9f72327 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/record.js @@ -0,0 +1,114 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Record{ + + module; + id; + linkedRecord; + keyModified = new Map(); + /** + * The method to get the module + * @returns {ModuleMap} An instance of ModuleMap + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {ModuleMap} module An instance of ModuleMap + */ + async setModule(module) { + const ModuleMap = (await (import("./module_map.js"))).MasterModel; + if((module != null) && (!(module instanceof ModuleMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: ModuleMap", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the linkedRecord + * @returns {LinkedRecord} An instance of LinkedRecord + */ + getLinkedRecord() { + return this.linkedRecord; + + } + + /** + * The method to set the value to linkedRecord + * @param {LinkedRecord} linkedRecord An instance of LinkedRecord + */ + async setLinkedRecord(linkedRecord) { + const LinkedRecord = (await (import("./linked_record.js"))).MasterModel; + if((linkedRecord != null) && (!(linkedRecord instanceof LinkedRecord))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: linkedRecord EXPECTED TYPE: LinkedRecord", null, null); + } + this.linkedRecord = linkedRecord; + this.keyModified.set("linked_record", 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 { + Record as MasterModel, + Record as Record +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/success_response.js new file mode 100644 index 0000000..e8b71a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/to.js b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/to.js new file mode 100644 index 0000000..a969960 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/associate_email/to.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class To{ + + userName; + email; + keyModified = new Map(); + /** + * The method to get the userName + * @returns {String} A String representing the userName + */ + getUserName() { + return this.userName; + + } + + /** + * The method to set the value to userName + * @param {String} userName A String representing the userName + */ + setUserName(userName) { + if((userName != null) && (!(Object.prototype.toString.call(userName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: userName EXPECTED TYPE: String", null, null); + } + this.userName = userName; + this.keyModified.set("user_name", 1); + + } + + /** + * The method to get the email + * @returns {String} A String representing the email + */ + getEmail() { + return this.email; + + } + + /** + * The method to set the value to email + * @param {String} email A String representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: String", null, null); + } + this.email = email; + this.keyModified.set("email", 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 { + To as MasterModel, + To as To +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/action_wrapper.js new file mode 100644 index 0000000..6996d19 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/api_exception.js new file mode 100644 index 0000000..815733c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + details; + code; + message; + status; + keyModified = new Map(); + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/attachment.js b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/attachment.js new file mode 100644 index 0000000..692566d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/attachment.js @@ -0,0 +1,438 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Attachment{ + + owner; + modifiedBy; + createdBy; + parentId; + sharingPermission; + attachmentType; + id; + modifiedTime; + createdTime; + fileName; + size; + editable; + fileId; + type; + seModule; + state; + linkUrl; + keyModified = new Map(); + /** + * The method to get the owner + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getOwner() { + return this.owner; + + } + + /** + * The method to set the value to owner + * @param {MinifiedUser} owner An instance of MinifiedUser + */ + async setOwner(owner) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((owner != null) && (!(owner instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: owner EXPECTED TYPE: MinifiedUser", null, null); + } + this.owner = owner; + this.keyModified.set("Owner", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("Modified_By", 1); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("Created_By", 1); + + } + + /** + * The method to get the parentId + * @returns {ParentId} An instance of ParentId + */ + getParentId() { + return this.parentId; + + } + + /** + * The method to set the value to parentId + * @param {ParentId} parentId An instance of ParentId + */ + async setParentId(parentId) { + const ParentId = (await (import("./parent_id.js"))).MasterModel; + if((parentId != null) && (!(parentId instanceof ParentId))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: parentId EXPECTED TYPE: ParentId", null, null); + } + this.parentId = parentId; + this.keyModified.set("Parent_Id", 1); + + } + + /** + * The method to get the sharingPermission + * @returns {String} A String representing the sharingPermission + */ + getSharingPermission() { + return this.sharingPermission; + + } + + /** + * The method to set the value to sharingPermission + * @param {String} sharingPermission A String representing the sharingPermission + */ + setSharingPermission(sharingPermission) { + if((sharingPermission != null) && (!(Object.prototype.toString.call(sharingPermission) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sharingPermission EXPECTED TYPE: String", null, null); + } + this.sharingPermission = sharingPermission; + this.keyModified.set("$sharing_permission", 1); + + } + + /** + * The method to get the attachmentType + * @returns {number} A number representing the attachmentType + */ + getAttachmentType() { + return this.attachmentType; + + } + + /** + * The method to set the value to attachmentType + * @param {number} attachmentType A number representing the attachmentType + */ + setAttachmentType(attachmentType) { + if((attachmentType != null) && (!(Object.prototype.toString.call(attachmentType) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: attachmentType EXPECTED TYPE: number", null, null); + } + this.attachmentType = attachmentType; + this.keyModified.set("$attachment_type", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("Modified_Time", 1); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("Created_Time", 1); + + } + + /** + * The method to get the fileName + * @returns {String} A String representing the fileName + */ + getFileName() { + return this.fileName; + + } + + /** + * The method to set the value to fileName + * @param {String} fileName A String representing the fileName + */ + setFileName(fileName) { + if((fileName != null) && (!(Object.prototype.toString.call(fileName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileName EXPECTED TYPE: String", null, null); + } + this.fileName = fileName; + this.keyModified.set("File_Name", 1); + + } + + /** + * The method to get the size + * @returns {String} A String representing the size + */ + getSize() { + return this.size; + + } + + /** + * The method to set the value to size + * @param {String} size A String representing the size + */ + setSize(size) { + if((size != null) && (!(Object.prototype.toString.call(size) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: size EXPECTED TYPE: String", null, null); + } + this.size = size; + this.keyModified.set("Size", 1); + + } + + /** + * The method to get the editable + * @returns {Boolean} A Boolean representing the editable + */ + getEditable() { + return this.editable; + + } + + /** + * The method to set the value to editable + * @param {Boolean} editable A Boolean representing the editable + */ + setEditable(editable) { + if((editable != null) && (!(Object.prototype.toString.call(editable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: editable EXPECTED TYPE: Boolean", null, null); + } + this.editable = editable; + this.keyModified.set("$editable", 1); + + } + + /** + * The method to get the fileId + * @returns {String} A String representing the fileId + */ + getFileId() { + return this.fileId; + + } + + /** + * The method to set the value to fileId + * @param {String} fileId A String representing the fileId + */ + setFileId(fileId) { + if((fileId != null) && (!(Object.prototype.toString.call(fileId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileId EXPECTED TYPE: String", null, null); + } + this.fileId = fileId; + this.keyModified.set("$file_id", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("$type", 1); + + } + + /** + * The method to get the seModule + * @returns {String} A String representing the seModule + */ + getSeModule() { + return this.seModule; + + } + + /** + * The method to set the value to seModule + * @param {String} seModule A String representing the seModule + */ + setSeModule(seModule) { + if((seModule != null) && (!(Object.prototype.toString.call(seModule) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: seModule EXPECTED TYPE: String", null, null); + } + this.seModule = seModule; + this.keyModified.set("$se_module", 1); + + } + + /** + * The method to get the state + * @returns {String} A String representing the state + */ + getState() { + return this.state; + + } + + /** + * The method to set the value to state + * @param {String} state A String representing the state + */ + setState(state) { + if((state != null) && (!(Object.prototype.toString.call(state) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: state EXPECTED TYPE: String", null, null); + } + this.state = state; + this.keyModified.set("$state", 1); + + } + + /** + * The method to get the linkUrl + * @returns {String} A String representing the linkUrl + */ + getLinkUrl() { + return this.linkUrl; + + } + + /** + * The method to set the value to linkUrl + * @param {String} linkUrl A String representing the linkUrl + */ + setLinkUrl(linkUrl) { + if((linkUrl != null) && (!(Object.prototype.toString.call(linkUrl) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: linkUrl EXPECTED TYPE: String", null, null); + } + this.linkUrl = linkUrl; + this.keyModified.set("$link_url", 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 { + Attachment as MasterModel, + Attachment as Attachment +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/attachments_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/attachments_operations.js new file mode 100644 index 0000000..8d94efb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/attachments_operations.js @@ -0,0 +1,249 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 AttachmentsOperations{ + /** + * The method to create attachment + * @param {BigInt} recordId A BigInt representing the recordId + * @param {String} module A String representing the module + * @param {FileBodyWrapper} request An instance of FileBodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createAttachment(recordId, module, request) { + const FileBodyWrapper = (await (import("./file_body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof FileBodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: FileBodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/Attachments"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("multipart/form-data"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get attachments + * @param {BigInt} recordId A BigInt representing the recordId + * @param {String} module A String representing the module + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getAttachments(recordId, module, paramInstance=null) { + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/Attachments"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to upload url attachments + * @param {BigInt} recordId A BigInt representing the recordId + * @param {String} module A String representing the module + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async uploadUrlAttachments(recordId, module, paramInstance=null) { + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/Attachments"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete attachments + * @param {BigInt} recordId A BigInt representing the recordId + * @param {String} module A String representing the module + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteAttachments(recordId, module, paramInstance=null) { + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/Attachments"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get attachment + * @param {BigInt} id A BigInt representing the id + * @param {BigInt} recordId A BigInt representing the recordId + * @param {String} module A String representing the module + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getAttachment(id, recordId, module) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/Attachments/"); + apiPath = apiPath.concat(id.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, "image/png"); + + } + + /** + * The method to delete attachment + * @param {BigInt} id A BigInt representing the id + * @param {BigInt} recordId A BigInt representing the recordId + * @param {String} module A String representing the module + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteAttachment(id, recordId, module) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/Attachments/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class GetAttachmentsParam{ + + static FIELDS = new Param("fields", "com.zoho.crm.api.Attachments.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"); +} + +class UploadUrlAttachmentsParam{ + + static ATTACHMENTURL = new Param("attachmentUrl", "com.zoho.crm.api.Attachments.UploadUrlAttachmentsParam"); + static TITLE = new Param("title", "com.zoho.crm.api.Attachments.UploadUrlAttachmentsParam"); +} + +class DeleteAttachmentsParam{ + + static IDS = new Param("ids", "com.zoho.crm.api.Attachments.DeleteAttachmentsParam"); +} + +export { + AttachmentsOperations as MasterModel, + AttachmentsOperations as AttachmentsOperations, + DeleteAttachmentsParam as DeleteAttachmentsParam, + GetAttachmentsParam as GetAttachmentsParam, + UploadUrlAttachmentsParam as UploadUrlAttachmentsParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/file_body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/file_body_wrapper.js new file mode 100644 index 0000000..ac3a3e4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/file_body_wrapper.js @@ -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 +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/import_attachments.js b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/import_attachments.js new file mode 100644 index 0000000..29c4340 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/import_attachments.js @@ -0,0 +1,16 @@ +export { SuccessResponse } from "./success_response.js"; +export * as ActionResponse from "./action_response.js"; +export { AttachmentsOperations } from "./attachments_operations.js"; +export { GetAttachmentsParam } from "./attachments_operations.js"; +export { UploadUrlAttachmentsParam } from "./attachments_operations.js"; +export { DeleteAttachmentsParam } from "./attachments_operations.js"; +export * as ResponseHandler from "./response_handler.js"; +export { Attachment } from "./attachment.js"; +export { Info } from "./info.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export * as ActionHandler from "./action_handler.js"; +export { Owner } from "./owner.js"; +export { FileBodyWrapper } from "./file_body_wrapper.js"; +export { APIException } from "./api_exception.js"; +export { ParentId } from "./parent_id.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/info.js new file mode 100644 index 0000000..d847543 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/info.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + perPage; + page; + count; + moreRecords; + keyModified = new Map(); + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/owner.js b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/owner.js new file mode 100644 index 0000000..53f29ea --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/owner.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Owner{ + + id; + name; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + Owner as MasterModel, + Owner as Owner +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/parent_id.js b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/parent_id.js new file mode 100644 index 0000000..b78a208 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/parent_id.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ParentId{ + + id; + name; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + ParentId as MasterModel, + ParentId as ParentId +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/response_wrapper.js new file mode 100644 index 0000000..4b95f85 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + data; + info; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/success_response.js new file mode 100644 index 0000000..e8b71a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/attachments/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/api_exception.js new file mode 100644 index 0000000..eef1972 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/available_currencies_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/available_currencies_operations.js new file mode 100644 index 0000000..535a6bc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/available_currencies_operations.js @@ -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 AvailableCurrenciesOperations{ + /** + * The method to get available currencies + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getAvailableCurrencies() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/org/currencies/actions/available_currencies"); + 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 { + AvailableCurrenciesOperations as MasterModel, + AvailableCurrenciesOperations as AvailableCurrenciesOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/currency.js b/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/currency.js new file mode 100644 index 0000000..1c7f821 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/currency.js @@ -0,0 +1,204 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Currency{ + + displayValue; + decimalSeparator; + symbol; + thousandSeparator; + displayName; + isoCode; + decimalPlaces; + keyModified = new Map(); + /** + * The method to get the displayValue + * @returns {String} A String representing the displayValue + */ + getDisplayValue() { + return this.displayValue; + + } + + /** + * The method to set the value to displayValue + * @param {String} displayValue A String representing the displayValue + */ + setDisplayValue(displayValue) { + if((displayValue != null) && (!(Object.prototype.toString.call(displayValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayValue EXPECTED TYPE: String", null, null); + } + this.displayValue = displayValue; + this.keyModified.set("display_value", 1); + + } + + /** + * The method to get the decimalSeparator + * @returns {String} A String representing the decimalSeparator + */ + getDecimalSeparator() { + return this.decimalSeparator; + + } + + /** + * The method to set the value to decimalSeparator + * @param {String} decimalSeparator A String representing the decimalSeparator + */ + setDecimalSeparator(decimalSeparator) { + if((decimalSeparator != null) && (!(Object.prototype.toString.call(decimalSeparator) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: decimalSeparator EXPECTED TYPE: String", null, null); + } + this.decimalSeparator = decimalSeparator; + this.keyModified.set("decimal_separator", 1); + + } + + /** + * The method to get the symbol + * @returns {String} A String representing the symbol + */ + getSymbol() { + return this.symbol; + + } + + /** + * The method to set the value to symbol + * @param {String} symbol A String representing the symbol + */ + setSymbol(symbol) { + if((symbol != null) && (!(Object.prototype.toString.call(symbol) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: symbol EXPECTED TYPE: String", null, null); + } + this.symbol = symbol; + this.keyModified.set("symbol", 1); + + } + + /** + * The method to get the thousandSeparator + * @returns {String} A String representing the thousandSeparator + */ + getThousandSeparator() { + return this.thousandSeparator; + + } + + /** + * The method to set the value to thousandSeparator + * @param {String} thousandSeparator A String representing the thousandSeparator + */ + setThousandSeparator(thousandSeparator) { + if((thousandSeparator != null) && (!(Object.prototype.toString.call(thousandSeparator) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: thousandSeparator EXPECTED TYPE: String", null, null); + } + this.thousandSeparator = thousandSeparator; + this.keyModified.set("thousand_separator", 1); + + } + + /** + * The method to get the displayName + * @returns {String} A String representing the displayName + */ + getDisplayName() { + return this.displayName; + + } + + /** + * The method to set the value to displayName + * @param {String} displayName A String representing the displayName + */ + setDisplayName(displayName) { + if((displayName != null) && (!(Object.prototype.toString.call(displayName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayName EXPECTED TYPE: String", null, null); + } + this.displayName = displayName; + this.keyModified.set("display_name", 1); + + } + + /** + * The method to get the isoCode + * @returns {String} A String representing the isoCode + */ + getIsoCode() { + return this.isoCode; + + } + + /** + * The method to set the value to isoCode + * @param {String} isoCode A String representing the isoCode + */ + setIsoCode(isoCode) { + if((isoCode != null) && (!(Object.prototype.toString.call(isoCode) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: isoCode EXPECTED TYPE: String", null, null); + } + this.isoCode = isoCode; + this.keyModified.set("iso_code", 1); + + } + + /** + * The method to get the decimalPlaces + * @returns {String} A String representing the decimalPlaces + */ + getDecimalPlaces() { + return this.decimalPlaces; + + } + + /** + * The method to set the value to decimalPlaces + * @param {String} decimalPlaces A String representing the decimalPlaces + */ + setDecimalPlaces(decimalPlaces) { + if((decimalPlaces != null) && (!(Object.prototype.toString.call(decimalPlaces) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: decimalPlaces EXPECTED TYPE: String", null, null); + } + this.decimalPlaces = decimalPlaces; + this.keyModified.set("decimal_places", 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 { + Currency as MasterModel, + Currency as Currency +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/import_available_currencies.js b/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/import_available_currencies.js new file mode 100644 index 0000000..d950bfb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/import_available_currencies.js @@ -0,0 +1,5 @@ +export { ResponseWrapper } from "./response_wrapper.js"; +export { AvailableCurrenciesOperations } from "./available_currencies_operations.js"; +export * as ResponseHandler from "./response_handler.js"; +export { Currency } from "./currency.js"; +export { APIException } from "./api_exception.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/response_wrapper.js new file mode 100644 index 0000000..9888244 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/available_currencies/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + availableCurrencies; + keyModified = new Map(); + /** + * The method to get the availableCurrencies + * @returns {Array} An Array representing the availableCurrencies + */ + getAvailableCurrencies() { + return this.availableCurrencies; + + } + + /** + * The method to set the value to availableCurrencies + * @param {Array} availableCurrencies An Array representing the availableCurrencies + */ + setAvailableCurrencies(availableCurrencies) { + if((availableCurrencies != null) && (!(Object.prototype.toString.call(availableCurrencies) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: availableCurrencies EXPECTED TYPE: Array", null, null); + } + this.availableCurrencies = availableCurrencies; + this.keyModified.set("available_currencies", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/backup/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/backup/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/backup/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/action_wrapper.js new file mode 100644 index 0000000..25c0408 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/action_wrapper.js @@ -0,0 +1,63 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + backup; + keyModified = new Map(); + /** + * The method to get the backup + * @returns {ActionResponse} An instance of ActionResponse + */ + getBackup() { + return this.backup; + + } + + /** + * The method to set the value to backup + * @param {ActionResponse} backup An instance of ActionResponse + */ + setBackup(backup) { + this.backup = backup; + this.keyModified.set("backup", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/backup/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/api_exception.js new file mode 100644 index 0000000..db2d361 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/backup/backup.js b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/backup.js new file mode 100644 index 0000000..f5f3aa3 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/backup.js @@ -0,0 +1,182 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Backup{ + + rrule; + id; + startDate; + scheduledDate; + status; + requester; + keyModified = new Map(); + /** + * The method to get the rrule + * @returns {String} A String representing the rrule + */ + getRrule() { + return this.rrule; + + } + + /** + * The method to set the value to rrule + * @param {String} rrule A String representing the rrule + */ + setRrule(rrule) { + if((rrule != null) && (!(Object.prototype.toString.call(rrule) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: rrule EXPECTED TYPE: String", null, null); + } + this.rrule = rrule; + this.keyModified.set("rrule", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the startDate + * @returns {Date} An instance of Date + */ + getStartDate() { + return this.startDate; + + } + + /** + * The method to set the value to startDate + * @param {Date} startDate An instance of Date + */ + setStartDate(startDate) { + if((startDate != null) && (!(startDate instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: startDate EXPECTED TYPE: Date", null, null); + } + this.startDate = startDate; + this.keyModified.set("start_date", 1); + + } + + /** + * The method to get the scheduledDate + * @returns {Date} An instance of Date + */ + getScheduledDate() { + return this.scheduledDate; + + } + + /** + * The method to set the value to scheduledDate + * @param {Date} scheduledDate An instance of Date + */ + setScheduledDate(scheduledDate) { + if((scheduledDate != null) && (!(scheduledDate instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: scheduledDate EXPECTED TYPE: Date", null, null); + } + this.scheduledDate = scheduledDate; + this.keyModified.set("scheduled_date", 1); + + } + + /** + * The method to get the status + * @returns {String} A String representing the status + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {String} status A String representing the status + */ + setStatus(status) { + if((status != null) && (!(Object.prototype.toString.call(status) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: String", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the requester + * @returns {Requester} An instance of Requester + */ + getRequester() { + return this.requester; + + } + + /** + * The method to set the value to requester + * @param {Requester} requester An instance of Requester + */ + async setRequester(requester) { + const Requester = (await (import("./requester.js"))).MasterModel; + if((requester != null) && (!(requester instanceof Requester))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: requester EXPECTED TYPE: Requester", null, null); + } + this.requester = requester; + this.keyModified.set("requester", 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 { + Backup as MasterModel, + Backup as Backup +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/backup/backup_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/backup_operations.js new file mode 100644 index 0000000..67d3136 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/backup_operations.js @@ -0,0 +1,153 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 BackupOperations{ + /** + * The method to schedule + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async schedule(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/bulk/v5/backup"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get details + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getDetails() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/bulk/v5/backup"); + 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"); + + } + + /** + * The method to get urls + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getUrls() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/bulk/v5/backup/urls"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to history + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async history(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/bulk/v5/backup/history"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to cancel + * @param {BigInt} id A BigInt representing the id + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async cancel(id) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/bulk/v5/backup/"); + apiPath = apiPath.concat(id.toString()); + apiPath = apiPath.concat("/actions/cancel"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to download backed up data + * @param {String} downloadUrl A String representing the downloadUrl + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async downloadBackedUpData(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"); + + } + +} +class HistoryParam{ + + static PAGE = new Param("page", "com.zoho.crm.api.Backup.HistoryParam"); + static PER_PAGE = new Param("per_page", "com.zoho.crm.api.Backup.HistoryParam"); +} + +export { + HistoryParam as HistoryParam, + BackupOperations as MasterModel, + BackupOperations as BackupOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/backup/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/body_wrapper.js new file mode 100644 index 0000000..5704d4b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/body_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + backup; + keyModified = new Map(); + /** + * The method to get the backup + * @returns {Backup} An instance of Backup + */ + getBackup() { + return this.backup; + + } + + /** + * The method to set the value to backup + * @param {Backup} backup An instance of Backup + */ + async setBackup(backup) { + const Backup = (await (import("./backup.js"))).MasterModel; + if((backup != null) && (!(backup instanceof Backup))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: backup EXPECTED TYPE: Backup", null, null); + } + this.backup = backup; + this.keyModified.set("backup", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/backup/file_body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/file_body_wrapper.js new file mode 100644 index 0000000..ac3a3e4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/file_body_wrapper.js @@ -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 +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/backup/history.js b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/history.js new file mode 100644 index 0000000..e34ce9b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/history.js @@ -0,0 +1,228 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class History{ + + id; + logTime; + action; + repeatType; + count; + fileName; + state; + doneBy; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the logTime + * @returns {Date} An instance of Date + */ + getLogTime() { + return this.logTime; + + } + + /** + * The method to set the value to logTime + * @param {Date} logTime An instance of Date + */ + setLogTime(logTime) { + if((logTime != null) && (!(logTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: logTime EXPECTED TYPE: Date", null, null); + } + this.logTime = logTime; + this.keyModified.set("log_time", 1); + + } + + /** + * The method to get the action + * @returns {String} A String representing the action + */ + getAction() { + return this.action; + + } + + /** + * The method to set the value to action + * @param {String} action A String representing the action + */ + setAction(action) { + if((action != null) && (!(Object.prototype.toString.call(action) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: action EXPECTED TYPE: String", null, null); + } + this.action = action; + this.keyModified.set("action", 1); + + } + + /** + * The method to get the repeatType + * @returns {String} A String representing the repeatType + */ + getRepeatType() { + return this.repeatType; + + } + + /** + * The method to set the value to repeatType + * @param {String} repeatType A String representing the repeatType + */ + setRepeatType(repeatType) { + if((repeatType != null) && (!(Object.prototype.toString.call(repeatType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: repeatType EXPECTED TYPE: String", null, null); + } + this.repeatType = repeatType; + this.keyModified.set("repeat_type", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the fileName + * @returns {String} A String representing the fileName + */ + getFileName() { + return this.fileName; + + } + + /** + * The method to set the value to fileName + * @param {String} fileName A String representing the fileName + */ + setFileName(fileName) { + if((fileName != null) && (!(Object.prototype.toString.call(fileName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileName EXPECTED TYPE: String", null, null); + } + this.fileName = fileName; + this.keyModified.set("file_name", 1); + + } + + /** + * The method to get the state + * @returns {String} A String representing the state + */ + getState() { + return this.state; + + } + + /** + * The method to set the value to state + * @param {String} state A String representing the state + */ + setState(state) { + if((state != null) && (!(Object.prototype.toString.call(state) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: state EXPECTED TYPE: String", null, null); + } + this.state = state; + this.keyModified.set("state", 1); + + } + + /** + * The method to get the doneBy + * @returns {Requester} An instance of Requester + */ + getDoneBy() { + return this.doneBy; + + } + + /** + * The method to set the value to doneBy + * @param {Requester} doneBy An instance of Requester + */ + async setDoneBy(doneBy) { + const Requester = (await (import("./requester.js"))).MasterModel; + if((doneBy != null) && (!(doneBy instanceof Requester))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: doneBy EXPECTED TYPE: Requester", null, null); + } + this.doneBy = doneBy; + this.keyModified.set("done_by", 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 { + History as MasterModel, + History as History +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/backup/history_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/history_wrapper.js new file mode 100644 index 0000000..b0ab3cf --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/history_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class HistoryWrapper{ + + history; + info; + keyModified = new Map(); + /** + * The method to get the history + * @returns {Array} An Array representing the history + */ + getHistory() { + return this.history; + + } + + /** + * The method to set the value to history + * @param {Array} history An Array representing the history + */ + setHistory(history) { + if((history != null) && (!(Object.prototype.toString.call(history) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: history EXPECTED TYPE: Array", null, null); + } + this.history = history; + this.keyModified.set("history", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + HistoryWrapper as MasterModel, + HistoryWrapper as HistoryWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/backup/import_backup.js b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/import_backup.js new file mode 100644 index 0000000..5538521 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/import_backup.js @@ -0,0 +1,17 @@ +export { UrlsWrapper } from "./urls_wrapper.js"; +export { Backup } from "./backup.js"; +export { HistoryWrapper } from "./history_wrapper.js"; +export { Urls } from "./urls.js"; +export { Requester } from "./requester.js"; +export { FileBodyWrapper } from "./file_body_wrapper.js"; +export { BackupOperations } from "./backup_operations.js"; +export { HistoryParam } from "./backup_operations.js"; +export * as ResponseHandler from "./response_handler.js"; +export { Info } from "./info.js"; +export { History } from "./history.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { SuccessResponse } from "./success_response.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export * as ActionResponse from "./action_response.js"; +export { APIException } from "./api_exception.js"; +export * as ActionHandler from "./action_handler.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/backup/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/info.js new file mode 100644 index 0000000..e495623 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/info.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + perPage; + count; + page; + moreRecords; + keyModified = new Map(); + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/backup/requester.js b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/requester.js new file mode 100644 index 0000000..4f96a62 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/requester.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Requester{ + + id; + name; + zuid; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the zuid + * @returns {String} A String representing the zuid + */ + getZuid() { + return this.zuid; + + } + + /** + * The method to set the value to zuid + * @param {String} zuid A String representing the zuid + */ + setZuid(zuid) { + if((zuid != null) && (!(Object.prototype.toString.call(zuid) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: zuid EXPECTED TYPE: String", null, null); + } + this.zuid = zuid; + this.keyModified.set("zuid", 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 { + Requester as MasterModel, + Requester as Requester +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/backup/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/backup/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/success_response.js new file mode 100644 index 0000000..e8b71a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/backup/urls.js b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/urls.js new file mode 100644 index 0000000..a94ccba --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/urls.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Urls{ + + dataLinks; + attachmentLinks; + expiryDate; + keyModified = new Map(); + /** + * The method to get the dataLinks + * @returns {Array} An Array representing the dataLinks + */ + getDataLinks() { + return this.dataLinks; + + } + + /** + * The method to set the value to dataLinks + * @param {Array} dataLinks An Array representing the dataLinks + */ + setDataLinks(dataLinks) { + if((dataLinks != null) && (!(Object.prototype.toString.call(dataLinks) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dataLinks EXPECTED TYPE: Array", null, null); + } + this.dataLinks = dataLinks; + this.keyModified.set("data_links", 1); + + } + + /** + * The method to get the attachmentLinks + * @returns {Array} An Array representing the attachmentLinks + */ + getAttachmentLinks() { + return this.attachmentLinks; + + } + + /** + * The method to set the value to attachmentLinks + * @param {Array} attachmentLinks An Array representing the attachmentLinks + */ + setAttachmentLinks(attachmentLinks) { + if((attachmentLinks != null) && (!(Object.prototype.toString.call(attachmentLinks) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: attachmentLinks EXPECTED TYPE: Array", null, null); + } + this.attachmentLinks = attachmentLinks; + this.keyModified.set("attachment_links", 1); + + } + + /** + * The method to get the expiryDate + * @returns {Date} An instance of Date + */ + getExpiryDate() { + return this.expiryDate; + + } + + /** + * The method to set the value to expiryDate + * @param {Date} expiryDate An instance of Date + */ + setExpiryDate(expiryDate) { + if((expiryDate != null) && (!(expiryDate instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: expiryDate EXPECTED TYPE: Date", null, null); + } + this.expiryDate = expiryDate; + this.keyModified.set("expiry_date", 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 { + Urls as MasterModel, + Urls as Urls +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/backup/urls_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/urls_wrapper.js new file mode 100644 index 0000000..272e567 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/backup/urls_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class UrlsWrapper{ + + urls; + keyModified = new Map(); + /** + * The method to get the urls + * @returns {Urls} An instance of Urls + */ + getUrls() { + return this.urls; + + } + + /** + * The method to set the value to urls + * @param {Urls} urls An instance of Urls + */ + async setUrls(urls) { + const Urls = (await (import("./urls.js"))).MasterModel; + if((urls != null) && (!(urls instanceof Urls))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: urls EXPECTED TYPE: Urls", null, null); + } + this.urls = urls; + this.keyModified.set("urls", 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 { + UrlsWrapper as MasterModel, + UrlsWrapper as UrlsWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/association_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/association_details.js new file mode 100644 index 0000000..422b374 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/association_details.js @@ -0,0 +1,91 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AssociationDetails{ + + lookupField; + relatedField; + keyModified = new Map(); + /** + * The method to get the lookupField + * @returns {LookupField} An instance of LookupField + */ + getLookupField() { + return this.lookupField; + + } + + /** + * The method to set the value to lookupField + * @param {LookupField} lookupField An instance of LookupField + */ + async setLookupField(lookupField) { + const LookupField = (await (import("./lookup_field.js"))).MasterModel; + if((lookupField != null) && (!(lookupField instanceof LookupField))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: lookupField EXPECTED TYPE: LookupField", null, null); + } + this.lookupField = lookupField; + this.keyModified.set("lookup_field", 1); + + } + + /** + * The method to get the relatedField + * @returns {LookupField} An instance of LookupField + */ + getRelatedField() { + return this.relatedField; + + } + + /** + * The method to set the value to relatedField + * @param {LookupField} relatedField An instance of LookupField + */ + async setRelatedField(relatedField) { + const LookupField = (await (import("./lookup_field.js"))).MasterModel; + if((relatedField != null) && (!(relatedField instanceof LookupField))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: relatedField EXPECTED TYPE: LookupField", null, null); + } + this.relatedField = relatedField; + this.keyModified.set("related_field", 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 { + AssociationDetails as MasterModel, + AssociationDetails as AssociationDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/auto_number.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/auto_number.js new file mode 100644 index 0000000..322f45a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/auto_number.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AutoNumber{ + + prefix; + suffix; + startNumber; + keyModified = new Map(); + /** + * The method to get the prefix + * @returns {String} A String representing the prefix + */ + getPrefix() { + return this.prefix; + + } + + /** + * The method to set the value to prefix + * @param {String} prefix A String representing the prefix + */ + setPrefix(prefix) { + if((prefix != null) && (!(Object.prototype.toString.call(prefix) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: prefix EXPECTED TYPE: String", null, null); + } + this.prefix = prefix; + this.keyModified.set("prefix", 1); + + } + + /** + * The method to get the suffix + * @returns {String} A String representing the suffix + */ + getSuffix() { + return this.suffix; + + } + + /** + * The method to set the value to suffix + * @param {String} suffix A String representing the suffix + */ + setSuffix(suffix) { + if((suffix != null) && (!(Object.prototype.toString.call(suffix) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: suffix EXPECTED TYPE: String", null, null); + } + this.suffix = suffix; + this.keyModified.set("suffix", 1); + + } + + /** + * The method to get the startNumber + * @returns {number} A number representing the startNumber + */ + getStartNumber() { + return this.startNumber; + + } + + /** + * The method to set the value to startNumber + * @param {number} startNumber A number representing the startNumber + */ + setStartNumber(startNumber) { + if((startNumber != null) && (!(Object.prototype.toString.call(startNumber) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: startNumber EXPECTED TYPE: number", null, null); + } + this.startNumber = startNumber; + this.keyModified.set("start_number", 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 { + AutoNumber as MasterModel, + AutoNumber as AutoNumber +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/blue_print.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/blue_print.js new file mode 100644 index 0000000..61eefc1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/blue_print.js @@ -0,0 +1,137 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BluePrint{ + + transitionId; + data; + processInfo; + transitions; + keyModified = new Map(); + /** + * The method to get the transitionId + * @returns {String} A String representing the transitionId + */ + getTransitionId() { + return this.transitionId; + + } + + /** + * The method to set the value to transitionId + * @param {String} transitionId A String representing the transitionId + */ + setTransitionId(transitionId) { + if((transitionId != null) && (!(Object.prototype.toString.call(transitionId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: transitionId EXPECTED TYPE: String", null, null); + } + this.transitionId = transitionId; + this.keyModified.set("transition_id", 1); + + } + + /** + * The method to get the data + * @returns {Record} An instance of Record + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Record} data An instance of Record + */ + async setData(data) { + const Record = (await (import("../record/record.js"))).MasterModel; + if((data != null) && (!(data instanceof Record))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Record", null, null); + } + this.data = data; + this.keyModified.set("data", 1); + + } + + /** + * The method to get the processInfo + * @returns {ProcessInfo} An instance of ProcessInfo + */ + getProcessInfo() { + return this.processInfo; + + } + + /** + * The method to set the value to processInfo + * @param {ProcessInfo} processInfo An instance of ProcessInfo + */ + async setProcessInfo(processInfo) { + const ProcessInfo = (await (import("./process_info.js"))).MasterModel; + if((processInfo != null) && (!(processInfo instanceof ProcessInfo))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: processInfo EXPECTED TYPE: ProcessInfo", null, null); + } + this.processInfo = processInfo; + this.keyModified.set("process_info", 1); + + } + + /** + * The method to get the transitions + * @returns {Array} An Array representing the transitions + */ + getTransitions() { + return this.transitions; + + } + + /** + * The method to set the value to transitions + * @param {Array} transitions An Array representing the transitions + */ + setTransitions(transitions) { + if((transitions != null) && (!(Object.prototype.toString.call(transitions) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: transitions EXPECTED TYPE: Array", null, null); + } + this.transitions = transitions; + this.keyModified.set("transitions", 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 { + BluePrint as MasterModel, + BluePrint as BluePrint +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/blueprint_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/blueprint_operations.js new file mode 100644 index 0000000..d550a29 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/blueprint_operations.js @@ -0,0 +1,84 @@ +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 BlueprintOperations{ + + moduleAPIName; + recordId; + /** + * Creates an instance of BlueprintOperations with the given parameters + * @param {String} recordId A String representing the recordId + * @param {String} moduleAPIName A String representing the moduleAPIName + */ + constructor(recordId, moduleAPIName){ + if((!(Object.prototype.toString.call(recordId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: String", null, null); + } + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + this.recordId = recordId; + this.moduleAPIName = moduleAPIName; + + } + + /** + * The method to get blueprint + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getBlueprint() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.recordId.toString()); + apiPath = apiPath.concat("/actions/blueprint"); + 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"); + + } + + /** + * The method to update blueprint + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateBlueprint(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.recordId.toString()); + apiPath = apiPath.concat("/actions/blueprint"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +export { + BlueprintOperations as MasterModel, + BlueprintOperations as BlueprintOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/body_wrapper.js new file mode 100644 index 0000000..5fd7bc0 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + blueprint; + keyModified = new Map(); + /** + * The method to get the blueprint + * @returns {Array} An Array representing the blueprint + */ + getBlueprint() { + return this.blueprint; + + } + + /** + * The method to set the value to blueprint + * @param {Array} blueprint An Array representing the blueprint + */ + setBlueprint(blueprint) { + if((blueprint != null) && (!(Object.prototype.toString.call(blueprint) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: blueprint EXPECTED TYPE: Array", null, null); + } + this.blueprint = blueprint; + this.keyModified.set("blueprint", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/convert_mapping.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/convert_mapping.js new file mode 100644 index 0000000..414cfdb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/convert_mapping.js @@ -0,0 +1,115 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ConvertMapping{ + + contacts; + deals; + accounts; + keyModified = new Map(); + /** + * The method to get the contacts + * @returns {ModuleMapping} An instance of ModuleMapping + */ + getContacts() { + return this.contacts; + + } + + /** + * The method to set the value to contacts + * @param {ModuleMapping} contacts An instance of ModuleMapping + */ + async setContacts(contacts) { + const ModuleMapping = (await (import("./module_mapping.js"))).MasterModel; + if((contacts != null) && (!(contacts instanceof ModuleMapping))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: contacts EXPECTED TYPE: ModuleMapping", null, null); + } + this.contacts = contacts; + this.keyModified.set("Contacts", 1); + + } + + /** + * The method to get the deals + * @returns {ModuleMapping} An instance of ModuleMapping + */ + getDeals() { + return this.deals; + + } + + /** + * The method to set the value to deals + * @param {ModuleMapping} deals An instance of ModuleMapping + */ + async setDeals(deals) { + const ModuleMapping = (await (import("./module_mapping.js"))).MasterModel; + if((deals != null) && (!(deals instanceof ModuleMapping))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deals EXPECTED TYPE: ModuleMapping", null, null); + } + this.deals = deals; + this.keyModified.set("Deals", 1); + + } + + /** + * The method to get the accounts + * @returns {ModuleMapping} An instance of ModuleMapping + */ + getAccounts() { + return this.accounts; + + } + + /** + * The method to set the value to accounts + * @param {ModuleMapping} accounts An instance of ModuleMapping + */ + async setAccounts(accounts) { + const ModuleMapping = (await (import("./module_mapping.js"))).MasterModel; + if((accounts != null) && (!(accounts instanceof ModuleMapping))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: accounts EXPECTED TYPE: ModuleMapping", null, null); + } + this.accounts = accounts; + this.keyModified.set("Accounts", 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 { + ConvertMapping as MasterModel, + ConvertMapping as ConvertMapping +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/crypt.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/crypt.js new file mode 100644 index 0000000..acb8756 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/crypt.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Crypt{ + + mode; + column; + table; + status; + keyModified = new Map(); + /** + * The method to get the mode + * @returns {String} A String representing the mode + */ + getMode() { + return this.mode; + + } + + /** + * The method to set the value to mode + * @param {String} mode A String representing the mode + */ + setMode(mode) { + if((mode != null) && (!(Object.prototype.toString.call(mode) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: mode EXPECTED TYPE: String", null, null); + } + this.mode = mode; + this.keyModified.set("mode", 1); + + } + + /** + * The method to get the column + * @returns {String} A String representing the column + */ + getColumn() { + return this.column; + + } + + /** + * The method to set the value to column + * @param {String} column A String representing the column + */ + setColumn(column) { + if((column != null) && (!(Object.prototype.toString.call(column) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: column EXPECTED TYPE: String", null, null); + } + this.column = column; + this.keyModified.set("column", 1); + + } + + /** + * The method to get the table + * @returns {String} A String representing the table + */ + getTable() { + return this.table; + + } + + /** + * The method to set the value to table + * @param {String} table A String representing the table + */ + setTable(table) { + if((table != null) && (!(Object.prototype.toString.call(table) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: table EXPECTED TYPE: String", null, null); + } + this.table = table; + this.keyModified.set("table", 1); + + } + + /** + * The method to get the status + * @returns {number} A number representing the status + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {number} status A number representing the status + */ + setStatus(status) { + if((status != null) && (!(Object.prototype.toString.call(status) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: number", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + Crypt as MasterModel, + Crypt as Crypt +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/currency.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/currency.js new file mode 100644 index 0000000..e2c4e48 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/currency.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Currency{ + + roundingOption; + precision; + keyModified = new Map(); + /** + * The method to get the roundingOption + * @returns {String} A String representing the roundingOption + */ + getRoundingOption() { + return this.roundingOption; + + } + + /** + * The method to set the value to roundingOption + * @param {String} roundingOption A String representing the roundingOption + */ + setRoundingOption(roundingOption) { + if((roundingOption != null) && (!(Object.prototype.toString.call(roundingOption) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: roundingOption EXPECTED TYPE: String", null, null); + } + this.roundingOption = roundingOption; + this.keyModified.set("rounding_option", 1); + + } + + /** + * The method to get the precision + * @returns {number} A number representing the precision + */ + getPrecision() { + return this.precision; + + } + + /** + * The method to set the value to precision + * @param {number} precision A number representing the precision + */ + setPrecision(precision) { + if((precision != null) && (!(Object.prototype.toString.call(precision) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: precision EXPECTED TYPE: number", null, null); + } + this.precision = precision; + this.keyModified.set("precision", 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 { + Currency as MasterModel, + Currency as Currency +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/escalation.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/escalation.js new file mode 100644 index 0000000..86d370e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/escalation.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Escalation{ + + days; + status; + keyModified = new Map(); + /** + * The method to get the days + * @returns {number} A number representing the days + */ + getDays() { + return this.days; + + } + + /** + * The method to set the value to days + * @param {number} days A number representing the days + */ + setDays(days) { + if((days != null) && (!(Object.prototype.toString.call(days) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: days EXPECTED TYPE: number", null, null); + } + this.days = days; + this.keyModified.set("days", 1); + + } + + /** + * The method to get the status + * @returns {String} A String representing the status + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {String} status A String representing the status + */ + setStatus(status) { + if((status != null) && (!(Object.prototype.toString.call(status) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: String", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + Escalation as MasterModel, + Escalation as Escalation +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/field.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/field.js new file mode 100644 index 0000000..c36517b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/field.js @@ -0,0 +1,1117 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Field{ + + external; + displayType; + filterable; + pickListValuesSortedLexically; + sortable; + uiType; + private1; + systemMandatory; + webhook; + jsonType; + crypt; + fieldLabel; + tooltip; + createdSource; + layouts; + fieldReadOnly; + content; + displayLabel; + validationRule; + readOnly; + associationDetails; + multiModuleLookup; + currency; + id; + customField; + lookup; + convertMapping; + visible; + length; + columnName; + type; + viewType; + transitionSequence; + apiName; + unique; + historyTracking; + dataType; + formula; + decimalPlace; + multiselectlookup; + pickListValues; + autoNumber; + personalityName; + mandatory; + quickSequenceNumber; + profiles; + keyModified = new Map(); + /** + * The method to get the external + * @returns {External} An instance of External + */ + getExternal() { + return this.external; + + } + + /** + * The method to set the value to external + * @param {External} external An instance of External + */ + async setExternal(external) { + const External = (await (import("../fields/external.js"))).MasterModel; + if((external != null) && (!(external instanceof External))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: external EXPECTED TYPE: External", null, null); + } + this.external = external; + this.keyModified.set("external", 1); + + } + + /** + * The method to get the displayType + * @returns {Choice} An instance of Choice + */ + getDisplayType() { + return this.displayType; + + } + + /** + * The method to set the value to displayType + * @param {Choice} displayType An instance of Choice + */ + setDisplayType(displayType) { + if((displayType != null) && (!(displayType instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayType EXPECTED TYPE: Choice", null, null); + } + this.displayType = displayType; + this.keyModified.set("display_type", 1); + + } + + /** + * The method to get the filterable + * @returns {Boolean} A Boolean representing the filterable + */ + getFilterable() { + return this.filterable; + + } + + /** + * The method to set the value to filterable + * @param {Boolean} filterable A Boolean representing the filterable + */ + setFilterable(filterable) { + if((filterable != null) && (!(Object.prototype.toString.call(filterable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: filterable EXPECTED TYPE: Boolean", null, null); + } + this.filterable = filterable; + this.keyModified.set("filterable", 1); + + } + + /** + * The method to get the pickListValuesSortedLexically + * @returns {Boolean} A Boolean representing the pickListValuesSortedLexically + */ + getPickListValuesSortedLexically() { + return this.pickListValuesSortedLexically; + + } + + /** + * The method to set the value to pickListValuesSortedLexically + * @param {Boolean} pickListValuesSortedLexically A Boolean representing the pickListValuesSortedLexically + */ + setPickListValuesSortedLexically(pickListValuesSortedLexically) { + if((pickListValuesSortedLexically != null) && (!(Object.prototype.toString.call(pickListValuesSortedLexically) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pickListValuesSortedLexically EXPECTED TYPE: Boolean", null, null); + } + this.pickListValuesSortedLexically = pickListValuesSortedLexically; + this.keyModified.set("pick_list_values_sorted_lexically", 1); + + } + + /** + * The method to get the sortable + * @returns {Boolean} A Boolean representing the sortable + */ + getSortable() { + return this.sortable; + + } + + /** + * The method to set the value to sortable + * @param {Boolean} sortable A Boolean representing the sortable + */ + setSortable(sortable) { + if((sortable != null) && (!(Object.prototype.toString.call(sortable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortable EXPECTED TYPE: Boolean", null, null); + } + this.sortable = sortable; + this.keyModified.set("sortable", 1); + + } + + /** + * The method to get the uiType + * @returns {number} A number representing the uiType + */ + getUiType() { + return this.uiType; + + } + + /** + * The method to set the value to uiType + * @param {number} uiType A number representing the uiType + */ + setUiType(uiType) { + if((uiType != null) && (!(Object.prototype.toString.call(uiType) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: uiType EXPECTED TYPE: number", null, null); + } + this.uiType = uiType; + this.keyModified.set("ui_type", 1); + + } + + /** + * The method to get the private + * @returns {Private} An instance of Private + */ + getPrivate() { + return this.private1; + + } + + /** + * The method to set the value to private + * @param {Private} private1 An instance of Private + */ + async setPrivate(private1) { + const Private = (await (import("../fields/private.js"))).MasterModel; + if((private1 != null) && (!(private1 instanceof Private))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: private1 EXPECTED TYPE: Private", null, null); + } + this.private1 = private1; + this.keyModified.set("private", 1); + + } + + /** + * The method to get the systemMandatory + * @returns {Boolean} A Boolean representing the systemMandatory + */ + getSystemMandatory() { + return this.systemMandatory; + + } + + /** + * The method to set the value to systemMandatory + * @param {Boolean} systemMandatory A Boolean representing the systemMandatory + */ + setSystemMandatory(systemMandatory) { + if((systemMandatory != null) && (!(Object.prototype.toString.call(systemMandatory) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: systemMandatory EXPECTED TYPE: Boolean", null, null); + } + this.systemMandatory = systemMandatory; + this.keyModified.set("system_mandatory", 1); + + } + + /** + * The method to get the webhook + * @returns {Boolean} A Boolean representing the webhook + */ + getWebhook() { + return this.webhook; + + } + + /** + * The method to set the value to webhook + * @param {Boolean} webhook A Boolean representing the webhook + */ + setWebhook(webhook) { + if((webhook != null) && (!(Object.prototype.toString.call(webhook) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: webhook EXPECTED TYPE: Boolean", null, null); + } + this.webhook = webhook; + this.keyModified.set("webhook", 1); + + } + + /** + * The method to get the jsonType + * @returns {String} A String representing the jsonType + */ + getJsonType() { + return this.jsonType; + + } + + /** + * The method to set the value to jsonType + * @param {String} jsonType A String representing the jsonType + */ + setJsonType(jsonType) { + if((jsonType != null) && (!(Object.prototype.toString.call(jsonType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jsonType EXPECTED TYPE: String", null, null); + } + this.jsonType = jsonType; + this.keyModified.set("json_type", 1); + + } + + /** + * The method to get the crypt + * @returns {Crypt} An instance of Crypt + */ + getCrypt() { + return this.crypt; + + } + + /** + * The method to set the value to crypt + * @param {Crypt} crypt An instance of Crypt + */ + async setCrypt(crypt) { + const Crypt = (await (import("./crypt.js"))).MasterModel; + if((crypt != null) && (!(crypt instanceof Crypt))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: crypt EXPECTED TYPE: Crypt", null, null); + } + this.crypt = crypt; + this.keyModified.set("crypt", 1); + + } + + /** + * The method to get the fieldLabel + * @returns {String} A String representing the fieldLabel + */ + getFieldLabel() { + return this.fieldLabel; + + } + + /** + * The method to set the value to fieldLabel + * @param {String} fieldLabel A String representing the fieldLabel + */ + setFieldLabel(fieldLabel) { + if((fieldLabel != null) && (!(Object.prototype.toString.call(fieldLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldLabel EXPECTED TYPE: String", null, null); + } + this.fieldLabel = fieldLabel; + this.keyModified.set("field_label", 1); + + } + + /** + * The method to get the tooltip + * @returns {ToolTip} An instance of ToolTip + */ + getTooltip() { + return this.tooltip; + + } + + /** + * The method to set the value to tooltip + * @param {ToolTip} tooltip An instance of ToolTip + */ + async setTooltip(tooltip) { + const ToolTip = (await (import("./tool_tip.js"))).MasterModel; + if((tooltip != null) && (!(tooltip instanceof ToolTip))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tooltip EXPECTED TYPE: ToolTip", null, null); + } + this.tooltip = tooltip; + this.keyModified.set("tooltip", 1); + + } + + /** + * The method to get the createdSource + * @returns {String} A String representing the createdSource + */ + getCreatedSource() { + return this.createdSource; + + } + + /** + * The method to set the value to createdSource + * @param {String} createdSource A String representing the createdSource + */ + setCreatedSource(createdSource) { + if((createdSource != null) && (!(Object.prototype.toString.call(createdSource) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdSource EXPECTED TYPE: String", null, null); + } + this.createdSource = createdSource; + this.keyModified.set("created_source", 1); + + } + + /** + * The method to get the layouts + * @returns {Layout} An instance of Layout + */ + getLayouts() { + return this.layouts; + + } + + /** + * The method to set the value to layouts + * @param {Layout} layouts An instance of Layout + */ + async setLayouts(layouts) { + const Layout = (await (import("./layout.js"))).MasterModel; + if((layouts != null) && (!(layouts instanceof Layout))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: layouts EXPECTED TYPE: Layout", null, null); + } + this.layouts = layouts; + this.keyModified.set("layouts", 1); + + } + + /** + * The method to get the fieldReadOnly + * @returns {Boolean} A Boolean representing the fieldReadOnly + */ + getFieldReadOnly() { + return this.fieldReadOnly; + + } + + /** + * The method to set the value to fieldReadOnly + * @param {Boolean} fieldReadOnly A Boolean representing the fieldReadOnly + */ + setFieldReadOnly(fieldReadOnly) { + if((fieldReadOnly != null) && (!(Object.prototype.toString.call(fieldReadOnly) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldReadOnly EXPECTED TYPE: Boolean", null, null); + } + this.fieldReadOnly = fieldReadOnly; + this.keyModified.set("field_read_only", 1); + + } + + /** + * The method to get the content + * @returns {String} A String representing the content + */ + getContent() { + return this.content; + + } + + /** + * The method to set the value to content + * @param {String} content A String representing the content + */ + setContent(content) { + if((content != null) && (!(Object.prototype.toString.call(content) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: content EXPECTED TYPE: String", null, null); + } + this.content = content; + this.keyModified.set("content", 1); + + } + + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the validationRule + * @returns {String} A String representing the validationRule + */ + getValidationRule() { + return this.validationRule; + + } + + /** + * The method to set the value to validationRule + * @param {String} validationRule A String representing the validationRule + */ + setValidationRule(validationRule) { + if((validationRule != null) && (!(Object.prototype.toString.call(validationRule) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: validationRule EXPECTED TYPE: String", null, null); + } + this.validationRule = validationRule; + this.keyModified.set("validation_rule", 1); + + } + + /** + * The method to get the readOnly + * @returns {Boolean} A Boolean representing the readOnly + */ + getReadOnly() { + return this.readOnly; + + } + + /** + * The method to set the value to readOnly + * @param {Boolean} readOnly A Boolean representing the readOnly + */ + setReadOnly(readOnly) { + if((readOnly != null) && (!(Object.prototype.toString.call(readOnly) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: readOnly EXPECTED TYPE: Boolean", null, null); + } + this.readOnly = readOnly; + this.keyModified.set("read_only", 1); + + } + + /** + * The method to get the associationDetails + * @returns {AssociationDetails} An instance of AssociationDetails + */ + getAssociationDetails() { + return this.associationDetails; + + } + + /** + * The method to set the value to associationDetails + * @param {AssociationDetails} associationDetails An instance of AssociationDetails + */ + async setAssociationDetails(associationDetails) { + const AssociationDetails = (await (import("./association_details.js"))).MasterModel; + if((associationDetails != null) && (!(associationDetails instanceof AssociationDetails))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: associationDetails EXPECTED TYPE: AssociationDetails", null, null); + } + this.associationDetails = associationDetails; + this.keyModified.set("association_details", 1); + + } + + /** + * The method to get the multiModuleLookup + * @returns {MultiModuleLookup} An instance of MultiModuleLookup + */ + getMultiModuleLookup() { + return this.multiModuleLookup; + + } + + /** + * The method to set the value to multiModuleLookup + * @param {MultiModuleLookup} multiModuleLookup An instance of MultiModuleLookup + */ + async setMultiModuleLookup(multiModuleLookup) { + const MultiModuleLookup = (await (import("../fields/multi_module_lookup.js"))).MasterModel; + if((multiModuleLookup != null) && (!(multiModuleLookup instanceof MultiModuleLookup))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: multiModuleLookup EXPECTED TYPE: MultiModuleLookup", null, null); + } + this.multiModuleLookup = multiModuleLookup; + this.keyModified.set("multi_module_lookup", 1); + + } + + /** + * The method to get the currency + * @returns {Currency} An instance of Currency + */ + getCurrency() { + return this.currency; + + } + + /** + * The method to set the value to currency + * @param {Currency} currency An instance of Currency + */ + async setCurrency(currency) { + const Currency = (await (import("./currency.js"))).MasterModel; + if((currency != null) && (!(currency instanceof Currency))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: currency EXPECTED TYPE: Currency", null, null); + } + this.currency = currency; + this.keyModified.set("currency", 1); + + } + + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the customField + * @returns {Boolean} A Boolean representing the customField + */ + getCustomField() { + return this.customField; + + } + + /** + * The method to set the value to customField + * @param {Boolean} customField A Boolean representing the customField + */ + setCustomField(customField) { + if((customField != null) && (!(Object.prototype.toString.call(customField) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: customField EXPECTED TYPE: Boolean", null, null); + } + this.customField = customField; + this.keyModified.set("custom_field", 1); + + } + + /** + * The method to get the lookup + * @returns {Module} An instance of Module + */ + getLookup() { + return this.lookup; + + } + + /** + * The method to set the value to lookup + * @param {Module} lookup An instance of Module + */ + async setLookup(lookup) { + const Module = (await (import("./module.js"))).MasterModel; + if((lookup != null) && (!(lookup instanceof Module))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: lookup EXPECTED TYPE: Module", null, null); + } + this.lookup = lookup; + this.keyModified.set("lookup", 1); + + } + + /** + * The method to get the convertMapping + * @returns {ConvertMapping} An instance of ConvertMapping + */ + getConvertMapping() { + return this.convertMapping; + + } + + /** + * The method to set the value to convertMapping + * @param {ConvertMapping} convertMapping An instance of ConvertMapping + */ + async setConvertMapping(convertMapping) { + const ConvertMapping = (await (import("./convert_mapping.js"))).MasterModel; + if((convertMapping != null) && (!(convertMapping instanceof ConvertMapping))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: convertMapping EXPECTED TYPE: ConvertMapping", null, null); + } + this.convertMapping = convertMapping; + this.keyModified.set("convert_mapping", 1); + + } + + /** + * The method to get the visible + * @returns {Boolean} A Boolean representing the visible + */ + getVisible() { + return this.visible; + + } + + /** + * The method to set the value to visible + * @param {Boolean} visible A Boolean representing the visible + */ + setVisible(visible) { + if((visible != null) && (!(Object.prototype.toString.call(visible) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: visible EXPECTED TYPE: Boolean", null, null); + } + this.visible = visible; + this.keyModified.set("visible", 1); + + } + + /** + * The method to get the length + * @returns {number} A number representing the length + */ + getLength() { + return this.length; + + } + + /** + * The method to set the value to length + * @param {number} length A number representing the length + */ + setLength(length) { + if((length != null) && (!(Object.prototype.toString.call(length) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: length EXPECTED TYPE: number", null, null); + } + this.length = length; + this.keyModified.set("length", 1); + + } + + /** + * The method to get the columnName + * @returns {String} A String representing the columnName + */ + getColumnName() { + return this.columnName; + + } + + /** + * The method to set the value to columnName + * @param {String} columnName A String representing the columnName + */ + setColumnName(columnName) { + if((columnName != null) && (!(Object.prototype.toString.call(columnName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: columnName EXPECTED TYPE: String", null, null); + } + this.columnName = columnName; + this.keyModified.set("column_name", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("_type", 1); + + } + + /** + * The method to get the viewType + * @returns {ViewType} An instance of ViewType + */ + getViewType() { + return this.viewType; + + } + + /** + * The method to set the value to viewType + * @param {ViewType} viewType An instance of ViewType + */ + async setViewType(viewType) { + const ViewType = (await (import("./view_type.js"))).MasterModel; + if((viewType != null) && (!(viewType instanceof ViewType))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: viewType EXPECTED TYPE: ViewType", null, null); + } + this.viewType = viewType; + this.keyModified.set("view_type", 1); + + } + + /** + * The method to get the transitionSequence + * @returns {number} A number representing the transitionSequence + */ + getTransitionSequence() { + return this.transitionSequence; + + } + + /** + * The method to set the value to transitionSequence + * @param {number} transitionSequence A number representing the transitionSequence + */ + setTransitionSequence(transitionSequence) { + if((transitionSequence != null) && (!(Object.prototype.toString.call(transitionSequence) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: transitionSequence EXPECTED TYPE: number", null, null); + } + this.transitionSequence = transitionSequence; + this.keyModified.set("transition_sequence", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the unique + * @returns {Unique} An instance of Unique + */ + getUnique() { + return this.unique; + + } + + /** + * The method to set the value to unique + * @param {Unique} unique An instance of Unique + */ + async setUnique(unique) { + const Unique = (await (import("../fields/unique.js"))).MasterModel; + if((unique != null) && (!(unique instanceof Unique))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: unique EXPECTED TYPE: Unique", null, null); + } + this.unique = unique; + this.keyModified.set("unique", 1); + + } + + /** + * The method to get the historyTracking + * @returns {Boolean} A Boolean representing the historyTracking + */ + getHistoryTracking() { + return this.historyTracking; + + } + + /** + * The method to set the value to historyTracking + * @param {Boolean} historyTracking A Boolean representing the historyTracking + */ + setHistoryTracking(historyTracking) { + if((historyTracking != null) && (!(Object.prototype.toString.call(historyTracking) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: historyTracking EXPECTED TYPE: Boolean", null, null); + } + this.historyTracking = historyTracking; + this.keyModified.set("history_tracking", 1); + + } + + /** + * The method to get the dataType + * @returns {String} A String representing the dataType + */ + getDataType() { + return this.dataType; + + } + + /** + * The method to set the value to dataType + * @param {String} dataType A String representing the dataType + */ + setDataType(dataType) { + if((dataType != null) && (!(Object.prototype.toString.call(dataType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dataType EXPECTED TYPE: String", null, null); + } + this.dataType = dataType; + this.keyModified.set("data_type", 1); + + } + + /** + * The method to get the formula + * @returns {Formula} An instance of Formula + */ + getFormula() { + return this.formula; + + } + + /** + * The method to set the value to formula + * @param {Formula} formula An instance of Formula + */ + async setFormula(formula) { + const Formula = (await (import("./formula.js"))).MasterModel; + if((formula != null) && (!(formula instanceof Formula))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: formula EXPECTED TYPE: Formula", null, null); + } + this.formula = formula; + this.keyModified.set("formula", 1); + + } + + /** + * The method to get the decimalPlace + * @returns {String} A String representing the decimalPlace + */ + getDecimalPlace() { + return this.decimalPlace; + + } + + /** + * The method to set the value to decimalPlace + * @param {String} decimalPlace A String representing the decimalPlace + */ + setDecimalPlace(decimalPlace) { + if((decimalPlace != null) && (!(Object.prototype.toString.call(decimalPlace) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: decimalPlace EXPECTED TYPE: String", null, null); + } + this.decimalPlace = decimalPlace; + this.keyModified.set("decimal_place", 1); + + } + + /** + * The method to get the multiselectlookup + * @returns {MultiSelectLookup} An instance of MultiSelectLookup + */ + getMultiselectlookup() { + return this.multiselectlookup; + + } + + /** + * The method to set the value to multiselectlookup + * @param {MultiSelectLookup} multiselectlookup An instance of MultiSelectLookup + */ + async setMultiselectlookup(multiselectlookup) { + const MultiSelectLookup = (await (import("./multi_select_lookup.js"))).MasterModel; + if((multiselectlookup != null) && (!(multiselectlookup instanceof MultiSelectLookup))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: multiselectlookup EXPECTED TYPE: MultiSelectLookup", null, null); + } + this.multiselectlookup = multiselectlookup; + this.keyModified.set("multiselectlookup", 1); + + } + + /** + * The method to get the pickListValues + * @returns {Array} An Array representing the pickListValues + */ + getPickListValues() { + return this.pickListValues; + + } + + /** + * The method to set the value to pickListValues + * @param {Array} pickListValues An Array representing the pickListValues + */ + setPickListValues(pickListValues) { + if((pickListValues != null) && (!(Object.prototype.toString.call(pickListValues) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pickListValues EXPECTED TYPE: Array", null, null); + } + this.pickListValues = pickListValues; + this.keyModified.set("pick_list_values", 1); + + } + + /** + * The method to get the autoNumber + * @returns {AutoNumber} An instance of AutoNumber + */ + getAutoNumber() { + return this.autoNumber; + + } + + /** + * The method to set the value to autoNumber + * @param {AutoNumber} autoNumber An instance of AutoNumber + */ + async setAutoNumber(autoNumber) { + const AutoNumber = (await (import("./auto_number.js"))).MasterModel; + if((autoNumber != null) && (!(autoNumber instanceof AutoNumber))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: autoNumber EXPECTED TYPE: AutoNumber", null, null); + } + this.autoNumber = autoNumber; + this.keyModified.set("auto_number", 1); + + } + + /** + * The method to get the personalityName + * @returns {String} A String representing the personalityName + */ + getPersonalityName() { + return this.personalityName; + + } + + /** + * The method to set the value to personalityName + * @param {String} personalityName A String representing the personalityName + */ + setPersonalityName(personalityName) { + if((personalityName != null) && (!(Object.prototype.toString.call(personalityName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: personalityName EXPECTED TYPE: String", null, null); + } + this.personalityName = personalityName; + this.keyModified.set("personality_name", 1); + + } + + /** + * The method to get the mandatory + * @returns {Boolean} A Boolean representing the mandatory + */ + getMandatory() { + return this.mandatory; + + } + + /** + * The method to set the value to mandatory + * @param {Boolean} mandatory A Boolean representing the mandatory + */ + setMandatory(mandatory) { + if((mandatory != null) && (!(Object.prototype.toString.call(mandatory) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: mandatory EXPECTED TYPE: Boolean", null, null); + } + this.mandatory = mandatory; + this.keyModified.set("mandatory", 1); + + } + + /** + * The method to get the quickSequenceNumber + * @returns {BigInt} A BigInt representing the quickSequenceNumber + */ + getQuickSequenceNumber() { + return this.quickSequenceNumber; + + } + + /** + * The method to set the value to quickSequenceNumber + * @param {BigInt} quickSequenceNumber A BigInt representing the quickSequenceNumber + */ + setQuickSequenceNumber(quickSequenceNumber) { + if((quickSequenceNumber != null) && (!(Object.prototype.toString.call(quickSequenceNumber) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: quickSequenceNumber EXPECTED TYPE: BigInt", null, null); + } + this.quickSequenceNumber = quickSequenceNumber; + this.keyModified.set("quick_sequence_number", 1); + + } + + /** + * The method to get the profiles + * @returns {Array} An Array representing the profiles + */ + getProfiles() { + return this.profiles; + + } + + /** + * The method to set the value to profiles + * @param {Array} profiles An Array representing the profiles + */ + setProfiles(profiles) { + if((profiles != null) && (!(Object.prototype.toString.call(profiles) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: profiles EXPECTED TYPE: Array", null, null); + } + this.profiles = profiles; + this.keyModified.set("profiles", 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 { + Field as MasterModel, + Field as Field +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/formula.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/formula.js new file mode 100644 index 0000000..43c4c12 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/formula.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Formula{ + + returnType; + expression; + keyModified = new Map(); + /** + * The method to get the returnType + * @returns {String} A String representing the returnType + */ + getReturnType() { + return this.returnType; + + } + + /** + * The method to set the value to returnType + * @param {String} returnType A String representing the returnType + */ + setReturnType(returnType) { + if((returnType != null) && (!(Object.prototype.toString.call(returnType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: returnType EXPECTED TYPE: String", null, null); + } + this.returnType = returnType; + this.keyModified.set("return_type", 1); + + } + + /** + * The method to get the expression + * @returns {number} A number representing the expression + */ + getExpression() { + return this.expression; + + } + + /** + * The method to set the value to expression + * @param {number} expression A number representing the expression + */ + setExpression(expression) { + if((expression != null) && (!(Object.prototype.toString.call(expression) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: expression EXPECTED TYPE: number", null, null); + } + this.expression = expression; + this.keyModified.set("expression", 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 { + Formula as MasterModel, + Formula as Formula +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/import_blueprint.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/import_blueprint.js new file mode 100644 index 0000000..0b5e241 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/import_blueprint.js @@ -0,0 +1,28 @@ +export { ProcessInfo } from "./process_info.js"; +export { Currency } from "./currency.js"; +export { Layout } from "./layout.js"; +export * as ActionHandler from "./action_handler.js"; +export { MultiSelectLookup } from "./multi_select_lookup.js"; +export { ConvertMapping } from "./convert_mapping.js"; +export { SuccessResponse } from "./success_response.js"; +export * as ResponseHandler from "./response_handler.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { Crypt } from "./crypt.js"; +export { ModuleFields } from "./module_fields.js"; +export { NextTransition } from "./next_transition.js"; +export { Escalation } from "./escalation.js"; +export { LookupField } from "./lookup_field.js"; +export { Profile } from "./profile.js"; +export { Field } from "./field.js"; +export { Transition } from "./transition.js"; +export { Module } from "./module.js"; +export { APIException } from "./api_exception.js"; +export { ModuleMapping } from "./module_mapping.js"; +export { AutoNumber } from "./auto_number.js"; +export { ToolTip } from "./tool_tip.js"; +export { AssociationDetails } from "./association_details.js"; +export { BlueprintOperations } from "./blueprint_operations.js"; +export { ViewType } from "./view_type.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { Formula } from "./formula.js"; +export { BluePrint } from "./blue_print.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/layout.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/layout.js new file mode 100644 index 0000000..437a6c6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/layout.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Layout{ + + id; + name; + keyModified = new Map(); + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + Layout as MasterModel, + Layout as Layout +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/lookup_field.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/lookup_field.js new file mode 100644 index 0000000..99410a7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/lookup_field.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class LookupField{ + + id; + name; + keyModified = new Map(); + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + LookupField as MasterModel, + LookupField as LookupField +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/module.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/module.js new file mode 100644 index 0000000..7034bb8 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/module.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Module{ + + displayLabel; + apiName; + module; + id; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the module + * @returns {String} A String representing the module + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {String} module A String representing the module + */ + setModule(module) { + if((module != null) && (!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Module as MasterModel, + Module as Module +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/module_fields.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/module_fields.js new file mode 100644 index 0000000..e2d6c00 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/module_fields.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ModuleFields{ + + apiName; + fieldLabel; + id; + required; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the fieldLabel + * @returns {String} A String representing the fieldLabel + */ + getFieldLabel() { + return this.fieldLabel; + + } + + /** + * The method to set the value to fieldLabel + * @param {String} fieldLabel A String representing the fieldLabel + */ + setFieldLabel(fieldLabel) { + if((fieldLabel != null) && (!(Object.prototype.toString.call(fieldLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldLabel EXPECTED TYPE: String", null, null); + } + this.fieldLabel = fieldLabel; + this.keyModified.set("field_label", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the required + * @returns {Boolean} A Boolean representing the required + */ + getRequired() { + return this.required; + + } + + /** + * The method to set the value to required + * @param {Boolean} required A Boolean representing the required + */ + setRequired(required) { + if((required != null) && (!(Object.prototype.toString.call(required) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: required EXPECTED TYPE: Boolean", null, null); + } + this.required = required; + this.keyModified.set("required", 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 { + ModuleFields as MasterModel, + ModuleFields as ModuleFields +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/module_mapping.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/module_mapping.js new file mode 100644 index 0000000..dfd14c2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/module_mapping.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ModuleMapping{ + + name; + id; + fields; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the fields + * @returns {Array} An Array representing the fields + */ + getFields() { + return this.fields; + + } + + /** + * The method to set the value to fields + * @param {Array} fields An Array representing the fields + */ + setFields(fields) { + if((fields != null) && (!(Object.prototype.toString.call(fields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: Array", null, null); + } + this.fields = fields; + this.keyModified.set("fields", 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 { + ModuleMapping as MasterModel, + ModuleMapping as ModuleMapping +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/multi_select_lookup.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/multi_select_lookup.js new file mode 100644 index 0000000..d874fa0 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/multi_select_lookup.js @@ -0,0 +1,181 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MultiSelectLookup{ + + displayLabel; + linkingModule; + lookupApiname; + apiName; + connectedlookupApiname; + id; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the linkingModule + * @returns {String} A String representing the linkingModule + */ + getLinkingModule() { + return this.linkingModule; + + } + + /** + * The method to set the value to linkingModule + * @param {String} linkingModule A String representing the linkingModule + */ + setLinkingModule(linkingModule) { + if((linkingModule != null) && (!(Object.prototype.toString.call(linkingModule) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: linkingModule EXPECTED TYPE: String", null, null); + } + this.linkingModule = linkingModule; + this.keyModified.set("linking_module", 1); + + } + + /** + * The method to get the lookupApiname + * @returns {String} A String representing the lookupApiname + */ + getLookupApiname() { + return this.lookupApiname; + + } + + /** + * The method to set the value to lookupApiname + * @param {String} lookupApiname A String representing the lookupApiname + */ + setLookupApiname(lookupApiname) { + if((lookupApiname != null) && (!(Object.prototype.toString.call(lookupApiname) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: lookupApiname EXPECTED TYPE: String", null, null); + } + this.lookupApiname = lookupApiname; + this.keyModified.set("lookup_apiname", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the connectedlookupApiname + * @returns {String} A String representing the connectedlookupApiname + */ + getConnectedlookupApiname() { + return this.connectedlookupApiname; + + } + + /** + * The method to set the value to connectedlookupApiname + * @param {String} connectedlookupApiname A String representing the connectedlookupApiname + */ + setConnectedlookupApiname(connectedlookupApiname) { + if((connectedlookupApiname != null) && (!(Object.prototype.toString.call(connectedlookupApiname) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: connectedlookupApiname EXPECTED TYPE: String", null, null); + } + this.connectedlookupApiname = connectedlookupApiname; + this.keyModified.set("connectedlookup_apiname", 1); + + } + + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + MultiSelectLookup as MasterModel, + MultiSelectLookup as MultiSelectLookup +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/next_transition.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/next_transition.js new file mode 100644 index 0000000..2cdbaca --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/next_transition.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class NextTransition{ + + id; + criteriaMatched; + name; + type; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the criteriaMatched + * @returns {Boolean} A Boolean representing the criteriaMatched + */ + getCriteriaMatched() { + return this.criteriaMatched; + + } + + /** + * The method to set the value to criteriaMatched + * @param {Boolean} criteriaMatched A Boolean representing the criteriaMatched + */ + setCriteriaMatched(criteriaMatched) { + if((criteriaMatched != null) && (!(Object.prototype.toString.call(criteriaMatched) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: criteriaMatched EXPECTED TYPE: Boolean", null, null); + } + this.criteriaMatched = criteriaMatched; + this.keyModified.set("criteria_matched", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 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 { + NextTransition as MasterModel, + NextTransition as NextTransition +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/process_info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/process_info.js new file mode 100644 index 0000000..29404ca --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/process_info.js @@ -0,0 +1,297 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ProcessInfo{ + + fieldId; + isContinuous; + apiName; + continuous; + fieldLabel; + name; + columnName; + fieldValue; + id; + fieldName; + escalation; + keyModified = new Map(); + /** + * The method to get the fieldId + * @returns {BigInt} A BigInt representing the fieldId + */ + getFieldId() { + return this.fieldId; + + } + + /** + * The method to set the value to fieldId + * @param {BigInt} fieldId A BigInt representing the fieldId + */ + setFieldId(fieldId) { + if((fieldId != null) && (!(Object.prototype.toString.call(fieldId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldId EXPECTED TYPE: BigInt", null, null); + } + this.fieldId = fieldId; + this.keyModified.set("field_id", 1); + + } + + /** + * The method to get the isContinuous + * @returns {Boolean} A Boolean representing the isContinuous + */ + getIsContinuous() { + return this.isContinuous; + + } + + /** + * The method to set the value to isContinuous + * @param {Boolean} isContinuous A Boolean representing the isContinuous + */ + setIsContinuous(isContinuous) { + if((isContinuous != null) && (!(Object.prototype.toString.call(isContinuous) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: isContinuous EXPECTED TYPE: Boolean", null, null); + } + this.isContinuous = isContinuous; + this.keyModified.set("is_continuous", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the continuous + * @returns {Boolean} A Boolean representing the continuous + */ + getContinuous() { + return this.continuous; + + } + + /** + * The method to set the value to continuous + * @param {Boolean} continuous A Boolean representing the continuous + */ + setContinuous(continuous) { + if((continuous != null) && (!(Object.prototype.toString.call(continuous) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: continuous EXPECTED TYPE: Boolean", null, null); + } + this.continuous = continuous; + this.keyModified.set("continuous", 1); + + } + + /** + * The method to get the fieldLabel + * @returns {String} A String representing the fieldLabel + */ + getFieldLabel() { + return this.fieldLabel; + + } + + /** + * The method to set the value to fieldLabel + * @param {String} fieldLabel A String representing the fieldLabel + */ + setFieldLabel(fieldLabel) { + if((fieldLabel != null) && (!(Object.prototype.toString.call(fieldLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldLabel EXPECTED TYPE: String", null, null); + } + this.fieldLabel = fieldLabel; + this.keyModified.set("field_label", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the columnName + * @returns {String} A String representing the columnName + */ + getColumnName() { + return this.columnName; + + } + + /** + * The method to set the value to columnName + * @param {String} columnName A String representing the columnName + */ + setColumnName(columnName) { + if((columnName != null) && (!(Object.prototype.toString.call(columnName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: columnName EXPECTED TYPE: String", null, null); + } + this.columnName = columnName; + this.keyModified.set("column_name", 1); + + } + + /** + * The method to get the fieldValue + * @returns {String} A String representing the fieldValue + */ + getFieldValue() { + return this.fieldValue; + + } + + /** + * The method to set the value to fieldValue + * @param {String} fieldValue A String representing the fieldValue + */ + setFieldValue(fieldValue) { + if((fieldValue != null) && (!(Object.prototype.toString.call(fieldValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldValue EXPECTED TYPE: String", null, null); + } + this.fieldValue = fieldValue; + this.keyModified.set("field_value", 1); + + } + + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the fieldName + * @returns {String} A String representing the fieldName + */ + getFieldName() { + return this.fieldName; + + } + + /** + * The method to set the value to fieldName + * @param {String} fieldName A String representing the fieldName + */ + setFieldName(fieldName) { + if((fieldName != null) && (!(Object.prototype.toString.call(fieldName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldName EXPECTED TYPE: String", null, null); + } + this.fieldName = fieldName; + this.keyModified.set("field_name", 1); + + } + + /** + * The method to get the escalation + * @returns {Escalation} An instance of Escalation + */ + getEscalation() { + return this.escalation; + + } + + /** + * The method to set the value to escalation + * @param {Escalation} escalation An instance of Escalation + */ + async setEscalation(escalation) { + const Escalation = (await (import("./escalation.js"))).MasterModel; + if((escalation != null) && (!(escalation instanceof Escalation))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: escalation EXPECTED TYPE: Escalation", null, null); + } + this.escalation = escalation; + this.keyModified.set("escalation", 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 { + ProcessInfo as MasterModel, + ProcessInfo as ProcessInfo +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/profile.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/profile.js new file mode 100644 index 0000000..fe0bf28 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/profile.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Profile{ + + id; + name; + permissionType; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the permissionType + * @returns {String} A String representing the permissionType + */ + getPermissionType() { + return this.permissionType; + + } + + /** + * The method to set the value to permissionType + * @param {String} permissionType A String representing the permissionType + */ + setPermissionType(permissionType) { + if((permissionType != null) && (!(Object.prototype.toString.call(permissionType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: permissionType EXPECTED TYPE: String", null, null); + } + this.permissionType = permissionType; + this.keyModified.set("permission_type", 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 { + Profile as MasterModel, + Profile as Profile +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/response_wrapper.js new file mode 100644 index 0000000..aa848f4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/response_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + blueprint; + keyModified = new Map(); + /** + * The method to get the blueprint + * @returns {BluePrint} An instance of BluePrint + */ + getBlueprint() { + return this.blueprint; + + } + + /** + * The method to set the value to blueprint + * @param {BluePrint} blueprint An instance of BluePrint + */ + async setBlueprint(blueprint) { + const BluePrint = (await (import("./blue_print.js"))).MasterModel; + if((blueprint != null) && (!(blueprint instanceof BluePrint))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: blueprint EXPECTED TYPE: BluePrint", null, null); + } + this.blueprint = blueprint; + this.keyModified.set("blueprint", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/success_response.js new file mode 100644 index 0000000..39525ad --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/tool_tip.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/tool_tip.js new file mode 100644 index 0000000..e635cd8 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/tool_tip.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ToolTip{ + + name; + value; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the value + * @returns {String} A String representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {String} value A String representing the value + */ + setValue(value) { + if((value != null) && (!(Object.prototype.toString.call(value) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: value EXPECTED TYPE: String", null, null); + } + this.value = value; + this.keyModified.set("value", 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 { + ToolTip as MasterModel, + ToolTip as ToolTip +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/transition.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/transition.js new file mode 100644 index 0000000..4888ecb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/transition.js @@ -0,0 +1,320 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Transition{ + + type; + executionTime; + nextTransitions; + parentTransition; + percentPartialSave; + data; + nextFieldValue; + name; + criteriaMatched; + id; + fields; + criteriaMessage; + keyModified = new Map(); + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the executionTime + * @returns {Date} An instance of Date + */ + getExecutionTime() { + return this.executionTime; + + } + + /** + * The method to set the value to executionTime + * @param {Date} executionTime An instance of Date + */ + setExecutionTime(executionTime) { + if((executionTime != null) && (!(executionTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: executionTime EXPECTED TYPE: Date", null, null); + } + this.executionTime = executionTime; + this.keyModified.set("execution_time", 1); + + } + + /** + * The method to get the nextTransitions + * @returns {Array} An Array representing the nextTransitions + */ + getNextTransitions() { + return this.nextTransitions; + + } + + /** + * The method to set the value to nextTransitions + * @param {Array} nextTransitions An Array representing the nextTransitions + */ + setNextTransitions(nextTransitions) { + if((nextTransitions != null) && (!(Object.prototype.toString.call(nextTransitions) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: nextTransitions EXPECTED TYPE: Array", null, null); + } + this.nextTransitions = nextTransitions; + this.keyModified.set("next_transitions", 1); + + } + + /** + * The method to get the parentTransition + * @returns {Transition} An instance of Transition + */ + getParentTransition() { + return this.parentTransition; + + } + + /** + * The method to set the value to parentTransition + * @param {Transition} parentTransition An instance of Transition + */ + setParentTransition(parentTransition) { + if((parentTransition != null) && (!(parentTransition instanceof Transition))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: parentTransition EXPECTED TYPE: Transition", null, null); + } + this.parentTransition = parentTransition; + this.keyModified.set("parent_transition", 1); + + } + + /** + * The method to get the percentPartialSave + * @returns {number} A number representing the percentPartialSave + */ + getPercentPartialSave() { + return this.percentPartialSave; + + } + + /** + * The method to set the value to percentPartialSave + * @param {number} percentPartialSave A number representing the percentPartialSave + */ + setPercentPartialSave(percentPartialSave) { + if((percentPartialSave != null) && (!(Object.prototype.toString.call(percentPartialSave) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: percentPartialSave EXPECTED TYPE: number", null, null); + } + this.percentPartialSave = percentPartialSave; + this.keyModified.set("percent_partial_save", 1); + + } + + /** + * The method to get the data + * @returns {Record} An instance of Record + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Record} data An instance of Record + */ + async setData(data) { + const Record = (await (import("../record/record.js"))).MasterModel; + if((data != null) && (!(data instanceof Record))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Record", null, null); + } + this.data = data; + this.keyModified.set("data", 1); + + } + + /** + * The method to get the nextFieldValue + * @returns {String} A String representing the nextFieldValue + */ + getNextFieldValue() { + return this.nextFieldValue; + + } + + /** + * The method to set the value to nextFieldValue + * @param {String} nextFieldValue A String representing the nextFieldValue + */ + setNextFieldValue(nextFieldValue) { + if((nextFieldValue != null) && (!(Object.prototype.toString.call(nextFieldValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: nextFieldValue EXPECTED TYPE: String", null, null); + } + this.nextFieldValue = nextFieldValue; + this.keyModified.set("next_field_value", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the criteriaMatched + * @returns {Boolean} A Boolean representing the criteriaMatched + */ + getCriteriaMatched() { + return this.criteriaMatched; + + } + + /** + * The method to set the value to criteriaMatched + * @param {Boolean} criteriaMatched A Boolean representing the criteriaMatched + */ + setCriteriaMatched(criteriaMatched) { + if((criteriaMatched != null) && (!(Object.prototype.toString.call(criteriaMatched) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: criteriaMatched EXPECTED TYPE: Boolean", null, null); + } + this.criteriaMatched = criteriaMatched; + this.keyModified.set("criteria_matched", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the fields + * @returns {Array} An Array representing the fields + */ + getFields() { + return this.fields; + + } + + /** + * The method to set the value to fields + * @param {Array} fields An Array representing the fields + */ + setFields(fields) { + if((fields != null) && (!(Object.prototype.toString.call(fields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: Array", null, null); + } + this.fields = fields; + this.keyModified.set("fields", 1); + + } + + /** + * The method to get the criteriaMessage + * @returns {String} A String representing the criteriaMessage + */ + getCriteriaMessage() { + return this.criteriaMessage; + + } + + /** + * The method to set the value to criteriaMessage + * @param {String} criteriaMessage A String representing the criteriaMessage + */ + setCriteriaMessage(criteriaMessage) { + if((criteriaMessage != null) && (!(Object.prototype.toString.call(criteriaMessage) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: criteriaMessage EXPECTED TYPE: String", null, null); + } + this.criteriaMessage = criteriaMessage; + this.keyModified.set("criteria_message", 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 { + Transition as MasterModel, + Transition as Transition +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/view_type.js b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/view_type.js new file mode 100644 index 0000000..59757ce --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/blueprint/view_type.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ViewType{ + + view; + edit; + create; + quickCreate; + keyModified = new Map(); + /** + * The method to get the view + * @returns {Boolean} A Boolean representing the view + */ + getView() { + return this.view; + + } + + /** + * The method to set the value to view + * @param {Boolean} view A Boolean representing the view + */ + setView(view) { + if((view != null) && (!(Object.prototype.toString.call(view) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: view EXPECTED TYPE: Boolean", null, null); + } + this.view = view; + this.keyModified.set("view", 1); + + } + + /** + * The method to get the edit + * @returns {Boolean} A Boolean representing the edit + */ + getEdit() { + return this.edit; + + } + + /** + * The method to set the value to edit + * @param {Boolean} edit A Boolean representing the edit + */ + setEdit(edit) { + if((edit != null) && (!(Object.prototype.toString.call(edit) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: edit EXPECTED TYPE: Boolean", null, null); + } + this.edit = edit; + this.keyModified.set("edit", 1); + + } + + /** + * The method to get the create + * @returns {Boolean} A Boolean representing the create + */ + getCreate() { + return this.create; + + } + + /** + * The method to set the value to create + * @param {Boolean} create A Boolean representing the create + */ + setCreate(create) { + if((create != null) && (!(Object.prototype.toString.call(create) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: create EXPECTED TYPE: Boolean", null, null); + } + this.create = create; + this.keyModified.set("create", 1); + + } + + /** + * The method to get the quickCreate + * @returns {Boolean} A Boolean representing the quickCreate + */ + getQuickCreate() { + return this.quickCreate; + + } + + /** + * The method to set the value to quickCreate + * @param {Boolean} quickCreate A Boolean representing the quickCreate + */ + setQuickCreate(quickCreate) { + if((quickCreate != null) && (!(Object.prototype.toString.call(quickCreate) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: quickCreate EXPECTED TYPE: Boolean", null, null); + } + this.quickCreate = quickCreate; + this.keyModified.set("quick_create", 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 { + ViewType as MasterModel, + ViewType as ViewType +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/action_wrapper.js new file mode 100644 index 0000000..f284505 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/action_wrapper.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + data; + info; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 1); + + } + + /** + * The method to get the info + * @returns {Map} A Map representing the info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Map} info A Map representing the info + */ + setInfo(info) { + if((info != null) && (!(Object.prototype.toString.call(info) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Map", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/api_exception.js new file mode 100644 index 0000000..a2754d2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/bulk_read_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/bulk_read_operations.js new file mode 100644 index 0000000..66efd82 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/bulk_read_operations.js @@ -0,0 +1,85 @@ +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 BulkReadOperations{ + /** + * The method to create bulk read job + * @param {RequestWrapper} request An instance of RequestWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createBulkReadJob(request) { + const RequestWrapper = (await (import("./request_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof RequestWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: RequestWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/bulk/v5/read"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get bulk read job details + * @param {BigInt} jobId A BigInt representing the jobId + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getBulkReadJobDetails(jobId) { + if((!(Object.prototype.toString.call(jobId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jobId EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/bulk/v5/read/"); + apiPath = apiPath.concat(jobId.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/json"); + + } + + /** + * The method to download result + * @param {BigInt} jobId A BigInt representing the jobId + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async downloadResult(jobId) { + if((!(Object.prototype.toString.call(jobId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jobId EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/bulk/v5/read/"); + apiPath = apiPath.concat(jobId.toString()); + apiPath = apiPath.concat("/result"); + 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/x-download"); + + } + +} +export { + BulkReadOperations as MasterModel, + BulkReadOperations as BulkReadOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/call_back.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/call_back.js new file mode 100644 index 0000000..0ea0199 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/call_back.js @@ -0,0 +1,90 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class CallBack{ + + url; + method; + keyModified = new Map(); + /** + * The method to get the url + * @returns {String} A String representing the url + */ + getUrl() { + return this.url; + + } + + /** + * The method to set the value to url + * @param {String} url A String representing the url + */ + setUrl(url) { + if((url != null) && (!(Object.prototype.toString.call(url) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: url EXPECTED TYPE: String", null, null); + } + this.url = url; + this.keyModified.set("url", 1); + + } + + /** + * The method to get the method + * @returns {Choice} An instance of Choice + */ + getMethod() { + return this.method; + + } + + /** + * The method to set the value to method + * @param {Choice} method An instance of Choice + */ + setMethod(method) { + if((method != null) && (!(method instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: method EXPECTED TYPE: Choice", null, null); + } + this.method = method; + this.keyModified.set("method", 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 { + CallBack as MasterModel, + CallBack as CallBack +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/criteria.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/criteria.js new file mode 100644 index 0000000..80ee191 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/criteria.js @@ -0,0 +1,180 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Criteria{ + + apiName; + value; + groupOperator; + group; + field; + comparator; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the value + * @returns {Object} An Object representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {Object} value An Object representing the value + */ + setValue(value) { + this.value = value; + this.keyModified.set("value", 1); + + } + + /** + * The method to get the groupOperator + * @returns {Choice} An instance of Choice + */ + getGroupOperator() { + return this.groupOperator; + + } + + /** + * The method to set the value to groupOperator + * @param {Choice} groupOperator An instance of Choice + */ + setGroupOperator(groupOperator) { + if((groupOperator != null) && (!(groupOperator instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: groupOperator EXPECTED TYPE: Choice", null, null); + } + this.groupOperator = groupOperator; + this.keyModified.set("group_operator", 1); + + } + + /** + * The method to get the group + * @returns {Array} An Array representing the group + */ + getGroup() { + return this.group; + + } + + /** + * The method to set the value to group + * @param {Array} group An Array representing the group + */ + setGroup(group) { + if((group != null) && (!(Object.prototype.toString.call(group) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: group EXPECTED TYPE: Array", null, null); + } + this.group = group; + this.keyModified.set("group", 1); + + } + + /** + * The method to get the field + * @returns {MinifiedField} An instance of MinifiedField + */ + getField() { + return this.field; + + } + + /** + * The method to set the value to field + * @param {MinifiedField} field An instance of MinifiedField + */ + async setField(field) { + const MinifiedField = (await (import("../fields/minified_field.js"))).MasterModel; + if((field != null) && (!(field instanceof MinifiedField))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: field EXPECTED TYPE: MinifiedField", null, null); + } + this.field = field; + this.keyModified.set("field", 1); + + } + + /** + * The method to get the comparator + * @returns {Choice} An instance of Choice + */ + getComparator() { + return this.comparator; + + } + + /** + * The method to set the value to comparator + * @param {Choice} comparator An instance of Choice + */ + setComparator(comparator) { + if((comparator != null) && (!(comparator instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: comparator EXPECTED TYPE: Choice", null, null); + } + this.comparator = comparator; + this.keyModified.set("comparator", 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 { + Criteria as MasterModel, + Criteria as Criteria +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/file_body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/file_body_wrapper.js new file mode 100644 index 0000000..ac3a3e4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/file_body_wrapper.js @@ -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 +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/import_bulk_read.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/import_bulk_read.js new file mode 100644 index 0000000..7253327 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/import_bulk_read.js @@ -0,0 +1,15 @@ +export { RequestWrapper } from "./request_wrapper.js"; +export { JobDetail } from "./job_detail.js"; +export { BulkReadOperations } from "./bulk_read_operations.js"; +export { SuccessResponse } from "./success_response.js"; +export { Result } from "./result.js"; +export { APIException } from "./api_exception.js"; +export { CallBack } from "./call_back.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export * as ActionHandler from "./action_handler.js"; +export { FileBodyWrapper } from "./file_body_wrapper.js"; +export * as ResponseHandler from "./response_handler.js"; +export * as ActionResponse from "./action_response.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { Criteria } from "./criteria.js"; +export { Query } from "./query.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/job_detail.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/job_detail.js new file mode 100644 index 0000000..59a390f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/job_detail.js @@ -0,0 +1,231 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class JobDetail{ + + id; + operation; + state; + query; + createdBy; + createdTime; + result; + fileType; + keyModified = new Map(); + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the operation + * @returns {String} A String representing the operation + */ + getOperation() { + return this.operation; + + } + + /** + * The method to set the value to operation + * @param {String} operation A String representing the operation + */ + setOperation(operation) { + if((operation != null) && (!(Object.prototype.toString.call(operation) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: operation EXPECTED TYPE: String", null, null); + } + this.operation = operation; + this.keyModified.set("operation", 1); + + } + + /** + * The method to get the state + * @returns {Choice} An instance of Choice + */ + getState() { + return this.state; + + } + + /** + * The method to set the value to state + * @param {Choice} state An instance of Choice + */ + setState(state) { + if((state != null) && (!(state instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: state EXPECTED TYPE: Choice", null, null); + } + this.state = state; + this.keyModified.set("state", 1); + + } + + /** + * The method to get the query + * @returns {Query} An instance of Query + */ + getQuery() { + return this.query; + + } + + /** + * The method to set the value to query + * @param {Query} query An instance of Query + */ + async setQuery(query) { + const Query = (await (import("./query.js"))).MasterModel; + if((query != null) && (!(query instanceof Query))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: query EXPECTED TYPE: Query", null, null); + } + this.query = query; + this.keyModified.set("query", 1); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 1); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the result + * @returns {Result} An instance of Result + */ + getResult() { + return this.result; + + } + + /** + * The method to set the value to result + * @param {Result} result An instance of Result + */ + async setResult(result) { + const Result = (await (import("./result.js"))).MasterModel; + if((result != null) && (!(result instanceof Result))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: result EXPECTED TYPE: Result", null, null); + } + this.result = result; + this.keyModified.set("result", 1); + + } + + /** + * The method to get the fileType + * @returns {Choice} An instance of Choice + */ + getFileType() { + return this.fileType; + + } + + /** + * The method to set the value to fileType + * @param {Choice} fileType An instance of Choice + */ + setFileType(fileType) { + if((fileType != null) && (!(fileType instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileType EXPECTED TYPE: Choice", null, null); + } + this.fileType = fileType; + this.keyModified.set("file_type", 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 { + JobDetail as MasterModel, + JobDetail as JobDetail +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/query.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/query.js new file mode 100644 index 0000000..413adda --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/query.js @@ -0,0 +1,184 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Query{ + + module; + cvid; + fields; + page; + criteria; + fileType; + keyModified = new Map(); + /** + * The method to get the module + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {MinifiedModule} module An instance of MinifiedModule + */ + async setModule(module) { + const MinifiedModule = (await (import("../modules/minified_module.js"))).MasterModel; + if((module != null) && (!(module instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: MinifiedModule", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the cvid + * @returns {BigInt} A BigInt representing the cvid + */ + getCvid() { + return this.cvid; + + } + + /** + * The method to set the value to cvid + * @param {BigInt} cvid A BigInt representing the cvid + */ + setCvid(cvid) { + if((cvid != null) && (!(Object.prototype.toString.call(cvid) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: cvid EXPECTED TYPE: BigInt", null, null); + } + this.cvid = cvid; + this.keyModified.set("cvid", 1); + + } + + /** + * The method to get the fields + * @returns {Array} An Array representing the fields + */ + getFields() { + return this.fields; + + } + + /** + * The method to set the value to fields + * @param {Array} fields An Array representing the fields + */ + setFields(fields) { + if((fields != null) && (!(Object.prototype.toString.call(fields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: Array", null, null); + } + this.fields = fields; + this.keyModified.set("fields", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the criteria + * @returns {Criteria} An instance of Criteria + */ + getCriteria() { + return this.criteria; + + } + + /** + * The method to set the value to criteria + * @param {Criteria} criteria An instance of Criteria + */ + async setCriteria(criteria) { + const Criteria = (await (import("./criteria.js"))).MasterModel; + if((criteria != null) && (!(criteria instanceof Criteria))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: criteria EXPECTED TYPE: Criteria", null, null); + } + this.criteria = criteria; + this.keyModified.set("criteria", 1); + + } + + /** + * The method to get the fileType + * @returns {Choice} An instance of Choice + */ + getFileType() { + return this.fileType; + + } + + /** + * The method to set the value to fileType + * @param {Choice} fileType An instance of Choice + */ + setFileType(fileType) { + if((fileType != null) && (!(fileType instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileType EXPECTED TYPE: Choice", null, null); + } + this.fileType = fileType; + this.keyModified.set("file_type", 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 { + Query as MasterModel, + Query as Query +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/request_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/request_wrapper.js new file mode 100644 index 0000000..ea43266 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/request_wrapper.js @@ -0,0 +1,115 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RequestWrapper{ + + callback; + query; + fileType; + keyModified = new Map(); + /** + * The method to get the callback + * @returns {CallBack} An instance of CallBack + */ + getCallback() { + return this.callback; + + } + + /** + * The method to set the value to callback + * @param {CallBack} callback An instance of CallBack + */ + async setCallback(callback) { + const CallBack = (await (import("./call_back.js"))).MasterModel; + if((callback != null) && (!(callback instanceof CallBack))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: callback EXPECTED TYPE: CallBack", null, null); + } + this.callback = callback; + this.keyModified.set("callback", 1); + + } + + /** + * The method to get the query + * @returns {Query} An instance of Query + */ + getQuery() { + return this.query; + + } + + /** + * The method to set the value to query + * @param {Query} query An instance of Query + */ + async setQuery(query) { + const Query = (await (import("./query.js"))).MasterModel; + if((query != null) && (!(query instanceof Query))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: query EXPECTED TYPE: Query", null, null); + } + this.query = query; + this.keyModified.set("query", 1); + + } + + /** + * The method to get the fileType + * @returns {Choice} An instance of Choice + */ + getFileType() { + return this.fileType; + + } + + /** + * The method to set the value to fileType + * @param {Choice} fileType An instance of Choice + */ + setFileType(fileType) { + if((fileType != null) && (!(fileType instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileType EXPECTED TYPE: Choice", null, null); + } + this.fileType = fileType; + this.keyModified.set("file_type", 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 { + RequestWrapper as MasterModel, + RequestWrapper as RequestWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/response_wrapper.js new file mode 100644 index 0000000..8018183 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/result.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/result.js new file mode 100644 index 0000000..aa2586d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/result.js @@ -0,0 +1,158 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Result{ + + page; + count; + downloadUrl; + perPage; + moreRecords; + keyModified = new Map(); + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the downloadUrl + * @returns {String} A String representing the downloadUrl + */ + getDownloadUrl() { + return this.downloadUrl; + + } + + /** + * The method to set the value to downloadUrl + * @param {String} downloadUrl A String representing the downloadUrl + */ + setDownloadUrl(downloadUrl) { + if((downloadUrl != null) && (!(Object.prototype.toString.call(downloadUrl) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: downloadUrl EXPECTED TYPE: String", null, null); + } + this.downloadUrl = downloadUrl; + this.keyModified.set("download_url", 1); + + } + + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Result as MasterModel, + Result as Result +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/success_response.js new file mode 100644 index 0000000..39525ad --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_read/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/api_exception.js new file mode 100644 index 0000000..e8a6e9c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/api_exception.js @@ -0,0 +1,274 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + status; + details; + errorMessage; + errorCode; + xError; + info; + xInfo; + httpStatus; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the errorMessage + * @returns {Choice} An instance of Choice + */ + getErrorMessage() { + return this.errorMessage; + + } + + /** + * The method to set the value to errorMessage + * @param {Choice} errorMessage An instance of Choice + */ + setErrorMessage(errorMessage) { + if((errorMessage != null) && (!(errorMessage instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: errorMessage EXPECTED TYPE: Choice", null, null); + } + this.errorMessage = errorMessage; + this.keyModified.set("ERROR_MESSAGE", 1); + + } + + /** + * The method to get the errorCode + * @returns {number} A number representing the errorCode + */ + getErrorCode() { + return this.errorCode; + + } + + /** + * The method to set the value to errorCode + * @param {number} errorCode A number representing the errorCode + */ + setErrorCode(errorCode) { + if((errorCode != null) && (!(Object.prototype.toString.call(errorCode) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: errorCode EXPECTED TYPE: number", null, null); + } + this.errorCode = errorCode; + this.keyModified.set("ERROR_CODE", 1); + + } + + /** + * The method to get the xError + * @returns {Choice} An instance of Choice + */ + getXError() { + return this.xError; + + } + + /** + * The method to set the value to xError + * @param {Choice} xError An instance of Choice + */ + setXError(xError) { + if((xError != null) && (!(xError instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: xError EXPECTED TYPE: Choice", null, null); + } + this.xError = xError; + this.keyModified.set("x-error", 1); + + } + + /** + * The method to get the info + * @returns {Choice} An instance of Choice + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Choice} info An instance of Choice + */ + setInfo(info) { + if((info != null) && (!(info instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Choice", null, null); + } + this.info = info; + this.keyModified.set("info", 1); + + } + + /** + * The method to get the xInfo + * @returns {Choice} An instance of Choice + */ + getXInfo() { + return this.xInfo; + + } + + /** + * The method to set the value to xInfo + * @param {Choice} xInfo An instance of Choice + */ + setXInfo(xInfo) { + if((xInfo != null) && (!(xInfo instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: xInfo EXPECTED TYPE: Choice", null, null); + } + this.xInfo = xInfo; + this.keyModified.set("x-info", 1); + + } + + /** + * The method to get the httpStatus + * @returns {String} A String representing the httpStatus + */ + getHttpStatus() { + return this.httpStatus; + + } + + /** + * The method to set the value to httpStatus + * @param {String} httpStatus A String representing the httpStatus + */ + setHttpStatus(httpStatus) { + if((httpStatus != null) && (!(Object.prototype.toString.call(httpStatus) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: httpStatus EXPECTED TYPE: String", null, null); + } + this.httpStatus = httpStatus; + this.keyModified.set("http_status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/bulk_write_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/bulk_write_operations.js new file mode 100644 index 0000000..4a33f87 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/bulk_write_operations.js @@ -0,0 +1,124 @@ +import {Header} from "../../../../../../routes/header.js"; +import {HeaderMap} from "../../../../../../routes/header_map.js"; +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 BulkWriteOperations{ + /** + * The method to upload file + * @param {FileBodyWrapper} request An instance of FileBodyWrapper + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async uploadFile(request, headerInstance=null) { + const FileBodyWrapper = (await (import("./file_body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof FileBodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: FileBodyWrapper", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("https://content.zohoapis.com/crm/v5/upload"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("multipart/form-data"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + handlerInstance.setHeader(headerInstance); + const require = createRequire(import.meta.url); + let ActionResponse = require.resolve("./action_response.js"); + return handlerInstance.apiCall(ActionResponse, "application/json"); + + } + + /** + * The method to create bulk write job + * @param {RequestWrapper} request An instance of RequestWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createBulkWriteJob(request) { + const RequestWrapper = (await (import("./request_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof RequestWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: RequestWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/bulk/v5/write"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionResponse = require.resolve("./action_response.js"); + return handlerInstance.apiCall(ActionResponse, "application/json"); + + } + + /** + * The method to get bulk write job details + * @param {String} jobId A String representing the jobId + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getBulkWriteJobDetails(jobId) { + if((!(Object.prototype.toString.call(jobId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jobId EXPECTED TYPE: String", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/bulk/v5/write/"); + apiPath = apiPath.concat(jobId.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + const require = createRequire(import.meta.url); + let ResponseWrapper = require.resolve("./response_wrapper.js"); + return handlerInstance.apiCall(ResponseWrapper, "application/json"); + + } + + /** + * The method to download bulk write result + * @param {String} downloadUrl A String representing the downloadUrl + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async downloadBulkWriteResult(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"); + + } + +} +class UploadFileHeader{ + + static FEATURE = new Header("feature", "com.zoho.crm.api.BulkWrite.UploadFileHeader"); + static X_CRM_ORG = new Header("X-CRM-ORG", "com.zoho.crm.api.BulkWrite.UploadFileHeader"); +} + +export { + BulkWriteOperations as MasterModel, + BulkWriteOperations as BulkWriteOperations, + UploadFileHeader as UploadFileHeader +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/bulk_write_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/bulk_write_response.js new file mode 100644 index 0000000..92b2cef --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/bulk_write_response.js @@ -0,0 +1,253 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BulkWriteResponse{ + + status; + characterEncoding; + resource; + id; + result; + createdBy; + operation; + createdTime; + callback; + keyModified = new Map(); + /** + * The method to get the status + * @returns {String} A String representing the status + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {String} status A String representing the status + */ + setStatus(status) { + if((status != null) && (!(Object.prototype.toString.call(status) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: String", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the characterEncoding + * @returns {String} A String representing the characterEncoding + */ + getCharacterEncoding() { + return this.characterEncoding; + + } + + /** + * The method to set the value to characterEncoding + * @param {String} characterEncoding A String representing the characterEncoding + */ + setCharacterEncoding(characterEncoding) { + if((characterEncoding != null) && (!(Object.prototype.toString.call(characterEncoding) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: characterEncoding EXPECTED TYPE: String", null, null); + } + this.characterEncoding = characterEncoding; + this.keyModified.set("character_encoding", 1); + + } + + /** + * The method to get the resource + * @returns {Array} An Array representing the resource + */ + getResource() { + return this.resource; + + } + + /** + * The method to set the value to resource + * @param {Array} resource An Array representing the resource + */ + setResource(resource) { + if((resource != null) && (!(Object.prototype.toString.call(resource) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: resource EXPECTED TYPE: Array", null, null); + } + this.resource = resource; + this.keyModified.set("resource", 1); + + } + + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the result + * @returns {Result} An instance of Result + */ + getResult() { + return this.result; + + } + + /** + * The method to set the value to result + * @param {Result} result An instance of Result + */ + async setResult(result) { + const Result = (await (import("./result.js"))).MasterModel; + if((result != null) && (!(result instanceof Result))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: result EXPECTED TYPE: Result", null, null); + } + this.result = result; + this.keyModified.set("result", 1); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 1); + + } + + /** + * The method to get the operation + * @returns {String} A String representing the operation + */ + getOperation() { + return this.operation; + + } + + /** + * The method to set the value to operation + * @param {String} operation A String representing the operation + */ + setOperation(operation) { + if((operation != null) && (!(Object.prototype.toString.call(operation) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: operation EXPECTED TYPE: String", null, null); + } + this.operation = operation; + this.keyModified.set("operation", 1); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the callback + * @returns {CallBack} An instance of CallBack + */ + getCallback() { + return this.callback; + + } + + /** + * The method to set the value to callback + * @param {CallBack} callback An instance of CallBack + */ + async setCallback(callback) { + const CallBack = (await (import("./call_back.js"))).MasterModel; + if((callback != null) && (!(callback instanceof CallBack))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: callback EXPECTED TYPE: CallBack", null, null); + } + this.callback = callback; + this.keyModified.set("callback", 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 { + BulkWriteResponse as MasterModel, + BulkWriteResponse as BulkWriteResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/call_back.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/call_back.js new file mode 100644 index 0000000..0ea0199 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/call_back.js @@ -0,0 +1,90 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class CallBack{ + + url; + method; + keyModified = new Map(); + /** + * The method to get the url + * @returns {String} A String representing the url + */ + getUrl() { + return this.url; + + } + + /** + * The method to set the value to url + * @param {String} url A String representing the url + */ + setUrl(url) { + if((url != null) && (!(Object.prototype.toString.call(url) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: url EXPECTED TYPE: String", null, null); + } + this.url = url; + this.keyModified.set("url", 1); + + } + + /** + * The method to get the method + * @returns {Choice} An instance of Choice + */ + getMethod() { + return this.method; + + } + + /** + * The method to set the value to method + * @param {Choice} method An instance of Choice + */ + setMethod(method) { + if((method != null) && (!(method instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: method EXPECTED TYPE: Choice", null, null); + } + this.method = method; + this.keyModified.set("method", 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 { + CallBack as MasterModel, + CallBack as CallBack +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/default_value.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/default_value.js new file mode 100644 index 0000000..1a18a85 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/default_value.js @@ -0,0 +1,109 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DefaultValue{ + + name; + module; + value; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the module + * @returns {String} A String representing the module + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {String} module A String representing the module + */ + setModule(module) { + if((module != null) && (!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the value + * @returns {Object} An Object representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {Object} value An Object representing the value + */ + setValue(value) { + this.value = value; + this.keyModified.set("value", 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 { + DefaultValue as MasterModel, + DefaultValue as DefaultValue +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/field_mapping.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/field_mapping.js new file mode 100644 index 0000000..64880d2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/field_mapping.js @@ -0,0 +1,182 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class FieldMapping{ + + apiName; + index; + format; + findBy; + defaultValue; + module; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the index + * @returns {number} A number representing the index + */ + getIndex() { + return this.index; + + } + + /** + * The method to set the value to index + * @param {number} index A number representing the index + */ + setIndex(index) { + if((index != null) && (!(Object.prototype.toString.call(index) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: index EXPECTED TYPE: number", null, null); + } + this.index = index; + this.keyModified.set("index", 1); + + } + + /** + * The method to get the format + * @returns {String} A String representing the format + */ + getFormat() { + return this.format; + + } + + /** + * The method to set the value to format + * @param {String} format A String representing the format + */ + setFormat(format) { + if((format != null) && (!(Object.prototype.toString.call(format) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: format EXPECTED TYPE: String", null, null); + } + this.format = format; + this.keyModified.set("format", 1); + + } + + /** + * The method to get the findBy + * @returns {String} A String representing the findBy + */ + getFindBy() { + return this.findBy; + + } + + /** + * The method to set the value to findBy + * @param {String} findBy A String representing the findBy + */ + setFindBy(findBy) { + if((findBy != null) && (!(Object.prototype.toString.call(findBy) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: findBy EXPECTED TYPE: String", null, null); + } + this.findBy = findBy; + this.keyModified.set("find_by", 1); + + } + + /** + * The method to get the defaultValue + * @returns {DefaultValue} An instance of DefaultValue + */ + getDefaultValue() { + return this.defaultValue; + + } + + /** + * The method to set the value to defaultValue + * @param {DefaultValue} defaultValue An instance of DefaultValue + */ + async setDefaultValue(defaultValue) { + const DefaultValue = (await (import("./default_value.js"))).MasterModel; + if((defaultValue != null) && (!(defaultValue instanceof DefaultValue))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: defaultValue EXPECTED TYPE: DefaultValue", null, null); + } + this.defaultValue = defaultValue; + this.keyModified.set("default_value", 1); + + } + + /** + * The method to get the module + * @returns {String} A String representing the module + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {String} module A String representing the module + */ + setModule(module) { + if((module != null) && (!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + this.module = module; + this.keyModified.set("module", 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 { + FieldMapping as MasterModel, + FieldMapping as FieldMapping +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/file.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/file.js new file mode 100644 index 0000000..793f645 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/file.js @@ -0,0 +1,182 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class File{ + + status; + name; + addedCount; + skippedCount; + updatedCount; + totalCount; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the addedCount + * @returns {number} A number representing the addedCount + */ + getAddedCount() { + return this.addedCount; + + } + + /** + * The method to set the value to addedCount + * @param {number} addedCount A number representing the addedCount + */ + setAddedCount(addedCount) { + if((addedCount != null) && (!(Object.prototype.toString.call(addedCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: addedCount EXPECTED TYPE: number", null, null); + } + this.addedCount = addedCount; + this.keyModified.set("added_count", 1); + + } + + /** + * The method to get the skippedCount + * @returns {number} A number representing the skippedCount + */ + getSkippedCount() { + return this.skippedCount; + + } + + /** + * The method to set the value to skippedCount + * @param {number} skippedCount A number representing the skippedCount + */ + setSkippedCount(skippedCount) { + if((skippedCount != null) && (!(Object.prototype.toString.call(skippedCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: skippedCount EXPECTED TYPE: number", null, null); + } + this.skippedCount = skippedCount; + this.keyModified.set("skipped_count", 1); + + } + + /** + * The method to get the updatedCount + * @returns {number} A number representing the updatedCount + */ + getUpdatedCount() { + return this.updatedCount; + + } + + /** + * The method to set the value to updatedCount + * @param {number} updatedCount A number representing the updatedCount + */ + setUpdatedCount(updatedCount) { + if((updatedCount != null) && (!(Object.prototype.toString.call(updatedCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: updatedCount EXPECTED TYPE: number", null, null); + } + this.updatedCount = updatedCount; + this.keyModified.set("updated_count", 1); + + } + + /** + * The method to get the totalCount + * @returns {number} A number representing the totalCount + */ + getTotalCount() { + return this.totalCount; + + } + + /** + * The method to set the value to totalCount + * @param {number} totalCount A number representing the totalCount + */ + setTotalCount(totalCount) { + if((totalCount != null) && (!(Object.prototype.toString.call(totalCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: totalCount EXPECTED TYPE: number", null, null); + } + this.totalCount = totalCount; + this.keyModified.set("total_count", 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 { + File as MasterModel, + File as File +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/file_body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/file_body_wrapper.js new file mode 100644 index 0000000..ac3a3e4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/file_body_wrapper.js @@ -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 +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/import_bulk_write.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/import_bulk_write.js new file mode 100644 index 0000000..7d7bc22 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/import_bulk_write.js @@ -0,0 +1,16 @@ +export { BulkWriteOperations } from "./bulk_write_operations.js"; +export { UploadFileHeader } from "./bulk_write_operations.js"; +export { Result } from "./result.js"; +export * as ResponseWrapper from "./response_wrapper.js"; +export * as ActionResponse from "./action_response.js"; +export { CallBack } from "./call_back.js"; +export { FieldMapping } from "./field_mapping.js"; +export * as ResponseHandler from "./response_handler.js"; +export { SuccessResponse } from "./success_response.js"; +export { RequestWrapper } from "./request_wrapper.js"; +export { APIException } from "./api_exception.js"; +export { BulkWriteResponse } from "./bulk_write_response.js"; +export { DefaultValue } from "./default_value.js"; +export { File } from "./file.js"; +export { Resource } from "./resource.js"; +export { FileBodyWrapper } from "./file_body_wrapper.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/request_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/request_wrapper.js new file mode 100644 index 0000000..0ace56f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/request_wrapper.js @@ -0,0 +1,160 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RequestWrapper{ + + characterEncoding; + operation; + callback; + resource; + ignoreEmpty; + keyModified = new Map(); + /** + * The method to get the characterEncoding + * @returns {String} A String representing the characterEncoding + */ + getCharacterEncoding() { + return this.characterEncoding; + + } + + /** + * The method to set the value to characterEncoding + * @param {String} characterEncoding A String representing the characterEncoding + */ + setCharacterEncoding(characterEncoding) { + if((characterEncoding != null) && (!(Object.prototype.toString.call(characterEncoding) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: characterEncoding EXPECTED TYPE: String", null, null); + } + this.characterEncoding = characterEncoding; + this.keyModified.set("character_encoding", 1); + + } + + /** + * The method to get the operation + * @returns {Choice} An instance of Choice + */ + getOperation() { + return this.operation; + + } + + /** + * The method to set the value to operation + * @param {Choice} operation An instance of Choice + */ + setOperation(operation) { + if((operation != null) && (!(operation instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: operation EXPECTED TYPE: Choice", null, null); + } + this.operation = operation; + this.keyModified.set("operation", 1); + + } + + /** + * The method to get the callback + * @returns {CallBack} An instance of CallBack + */ + getCallback() { + return this.callback; + + } + + /** + * The method to set the value to callback + * @param {CallBack} callback An instance of CallBack + */ + async setCallback(callback) { + const CallBack = (await (import("./call_back.js"))).MasterModel; + if((callback != null) && (!(callback instanceof CallBack))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: callback EXPECTED TYPE: CallBack", null, null); + } + this.callback = callback; + this.keyModified.set("callback", 1); + + } + + /** + * The method to get the resource + * @returns {Array} An Array representing the resource + */ + getResource() { + return this.resource; + + } + + /** + * The method to set the value to resource + * @param {Array} resource An Array representing the resource + */ + setResource(resource) { + if((resource != null) && (!(Object.prototype.toString.call(resource) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: resource EXPECTED TYPE: Array", null, null); + } + this.resource = resource; + this.keyModified.set("resource", 1); + + } + + /** + * The method to get the ignoreEmpty + * @returns {Boolean} A Boolean representing the ignoreEmpty + */ + getIgnoreEmpty() { + return this.ignoreEmpty; + + } + + /** + * The method to set the value to ignoreEmpty + * @param {Boolean} ignoreEmpty A Boolean representing the ignoreEmpty + */ + setIgnoreEmpty(ignoreEmpty) { + if((ignoreEmpty != null) && (!(Object.prototype.toString.call(ignoreEmpty) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ignoreEmpty EXPECTED TYPE: Boolean", null, null); + } + this.ignoreEmpty = ignoreEmpty; + this.keyModified.set("ignore_empty", 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 { + RequestWrapper as MasterModel, + RequestWrapper as RequestWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/resource.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/resource.js new file mode 100644 index 0000000..7817c23 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/resource.js @@ -0,0 +1,253 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Resource{ + + status; + type; + module; + code; + fileId; + ignoreEmpty; + findBy; + fieldMappings; + file; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the type + * @returns {Choice} An instance of Choice + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {Choice} type An instance of Choice + */ + setType(type) { + if((type != null) && (!(type instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: Choice", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the module + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {MinifiedModule} module An instance of MinifiedModule + */ + async setModule(module) { + const MinifiedModule = (await (import("../modules/minified_module.js"))).MasterModel; + if((module != null) && (!(module instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: MinifiedModule", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the code + * @returns {String} A String representing the code + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {String} code A String representing the code + */ + setCode(code) { + if((code != null) && (!(Object.prototype.toString.call(code) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: String", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the fileId + * @returns {String} A String representing the fileId + */ + getFileId() { + return this.fileId; + + } + + /** + * The method to set the value to fileId + * @param {String} fileId A String representing the fileId + */ + setFileId(fileId) { + if((fileId != null) && (!(Object.prototype.toString.call(fileId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileId EXPECTED TYPE: String", null, null); + } + this.fileId = fileId; + this.keyModified.set("file_id", 1); + + } + + /** + * The method to get the ignoreEmpty + * @returns {Boolean} A Boolean representing the ignoreEmpty + */ + getIgnoreEmpty() { + return this.ignoreEmpty; + + } + + /** + * The method to set the value to ignoreEmpty + * @param {Boolean} ignoreEmpty A Boolean representing the ignoreEmpty + */ + setIgnoreEmpty(ignoreEmpty) { + if((ignoreEmpty != null) && (!(Object.prototype.toString.call(ignoreEmpty) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ignoreEmpty EXPECTED TYPE: Boolean", null, null); + } + this.ignoreEmpty = ignoreEmpty; + this.keyModified.set("ignore_empty", 1); + + } + + /** + * The method to get the findBy + * @returns {String} A String representing the findBy + */ + getFindBy() { + return this.findBy; + + } + + /** + * The method to set the value to findBy + * @param {String} findBy A String representing the findBy + */ + setFindBy(findBy) { + if((findBy != null) && (!(Object.prototype.toString.call(findBy) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: findBy EXPECTED TYPE: String", null, null); + } + this.findBy = findBy; + this.keyModified.set("find_by", 1); + + } + + /** + * The method to get the fieldMappings + * @returns {Array} An Array representing the fieldMappings + */ + getFieldMappings() { + return this.fieldMappings; + + } + + /** + * The method to set the value to fieldMappings + * @param {Array} fieldMappings An Array representing the fieldMappings + */ + setFieldMappings(fieldMappings) { + if((fieldMappings != null) && (!(Object.prototype.toString.call(fieldMappings) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldMappings EXPECTED TYPE: Array", null, null); + } + this.fieldMappings = fieldMappings; + this.keyModified.set("field_mappings", 1); + + } + + /** + * The method to get the file + * @returns {File} An instance of File + */ + getFile() { + return this.file; + + } + + /** + * The method to set the value to file + * @param {File} file An instance of File + */ + async setFile(file) { + const File = (await (import("./file.js"))).MasterModel; + if((file != null) && (!(file instanceof File))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: file EXPECTED TYPE: File", 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 { + Resource as MasterModel, + Resource as Resource +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/response_wrapper.js new file mode 100644 index 0000000..7948ca2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/response_wrapper.js @@ -0,0 +1,7 @@ +class ResponseWrapper{ + +} +export { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/result.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/result.js new file mode 100644 index 0000000..3e6e91c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/result.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Result{ + + downloadUrl; + keyModified = new Map(); + /** + * The method to get the downloadUrl + * @returns {String} A String representing the downloadUrl + */ + getDownloadUrl() { + return this.downloadUrl; + + } + + /** + * The method to set the value to downloadUrl + * @param {String} downloadUrl A String representing the downloadUrl + */ + setDownloadUrl(downloadUrl) { + if((downloadUrl != null) && (!(Object.prototype.toString.call(downloadUrl) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: downloadUrl EXPECTED TYPE: String", null, null); + } + this.downloadUrl = downloadUrl; + this.keyModified.set("download_url", 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 { + Result as MasterModel, + Result as Result +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/success_response.js new file mode 100644 index 0000000..39525ad --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/bulk_write/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/action_wrapper.js new file mode 100644 index 0000000..ec4a316 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/action_wrapper.js @@ -0,0 +1,63 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + businessHours; + keyModified = new Map(); + /** + * The method to get the businessHours + * @returns {ActionResponse} An instance of ActionResponse + */ + getBusinessHours() { + return this.businessHours; + + } + + /** + * The method to set the value to businessHours + * @param {ActionResponse} businessHours An instance of ActionResponse + */ + setBusinessHours(businessHours) { + this.businessHours = businessHours; + this.keyModified.set("business_hours", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/body_wrapper.js new file mode 100644 index 0000000..56283e3 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/body_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + businessHours; + keyModified = new Map(); + /** + * The method to get the businessHours + * @returns {BusinessHours} An instance of BusinessHours + */ + getBusinessHours() { + return this.businessHours; + + } + + /** + * The method to set the value to businessHours + * @param {BusinessHours} businessHours An instance of BusinessHours + */ + async setBusinessHours(businessHours) { + const BusinessHours = (await (import("./business_hours.js"))).MasterModel; + if((businessHours != null) && (!(businessHours instanceof BusinessHours))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: businessHours EXPECTED TYPE: BusinessHours", null, null); + } + this.businessHours = businessHours; + this.keyModified.set("business_hours", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/break_hours_custom_timing.js b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/break_hours_custom_timing.js new file mode 100644 index 0000000..1b8fd00 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/break_hours_custom_timing.js @@ -0,0 +1,90 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BreakHoursCustomTiming{ + + days; + businessTiming; + keyModified = new Map(); + /** + * The method to get the days + * @returns {Choice} An instance of Choice + */ + getDays() { + return this.days; + + } + + /** + * The method to set the value to days + * @param {Choice} days An instance of Choice + */ + setDays(days) { + if((days != null) && (!(days instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: days EXPECTED TYPE: Choice", null, null); + } + this.days = days; + this.keyModified.set("days", 1); + + } + + /** + * The method to get the businessTiming + * @returns {Array} An Array representing the businessTiming + */ + getBusinessTiming() { + return this.businessTiming; + + } + + /** + * The method to set the value to businessTiming + * @param {Array} businessTiming An Array representing the businessTiming + */ + setBusinessTiming(businessTiming) { + if((businessTiming != null) && (!(Object.prototype.toString.call(businessTiming) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: businessTiming EXPECTED TYPE: Array", null, null); + } + this.businessTiming = businessTiming; + this.keyModified.set("business_timing", 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 { + BreakHoursCustomTiming as MasterModel, + BreakHoursCustomTiming as BreakHoursCustomTiming +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/business_hours.js b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/business_hours.js new file mode 100644 index 0000000..1a5100e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/business_hours.js @@ -0,0 +1,205 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BusinessHours{ + + weekStartsOn; + type; + id; + businessDays; + sameAsEveryday; + dailyTiming; + customTiming; + keyModified = new Map(); + /** + * The method to get the weekStartsOn + * @returns {Choice} An instance of Choice + */ + getWeekStartsOn() { + return this.weekStartsOn; + + } + + /** + * The method to set the value to weekStartsOn + * @param {Choice} weekStartsOn An instance of Choice + */ + setWeekStartsOn(weekStartsOn) { + if((weekStartsOn != null) && (!(weekStartsOn instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: weekStartsOn EXPECTED TYPE: Choice", null, null); + } + this.weekStartsOn = weekStartsOn; + this.keyModified.set("week_starts_on", 1); + + } + + /** + * The method to get the type + * @returns {Choice} An instance of Choice + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {Choice} type An instance of Choice + */ + setType(type) { + if((type != null) && (!(type instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: Choice", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the businessDays + * @returns {Array} An Array representing the businessDays + */ + getBusinessDays() { + return this.businessDays; + + } + + /** + * The method to set the value to businessDays + * @param {Array} businessDays An Array representing the businessDays + */ + setBusinessDays(businessDays) { + if((businessDays != null) && (!(Object.prototype.toString.call(businessDays) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: businessDays EXPECTED TYPE: Array", null, null); + } + this.businessDays = businessDays; + this.keyModified.set("business_days", 1); + + } + + /** + * The method to get the sameAsEveryday + * @returns {Boolean} A Boolean representing the sameAsEveryday + */ + getSameAsEveryday() { + return this.sameAsEveryday; + + } + + /** + * The method to set the value to sameAsEveryday + * @param {Boolean} sameAsEveryday A Boolean representing the sameAsEveryday + */ + setSameAsEveryday(sameAsEveryday) { + if((sameAsEveryday != null) && (!(Object.prototype.toString.call(sameAsEveryday) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sameAsEveryday EXPECTED TYPE: Boolean", null, null); + } + this.sameAsEveryday = sameAsEveryday; + this.keyModified.set("same_as_everyday", 1); + + } + + /** + * The method to get the dailyTiming + * @returns {Array} An Array representing the dailyTiming + */ + getDailyTiming() { + return this.dailyTiming; + + } + + /** + * The method to set the value to dailyTiming + * @param {Array} dailyTiming An Array representing the dailyTiming + */ + setDailyTiming(dailyTiming) { + if((dailyTiming != null) && (!(Object.prototype.toString.call(dailyTiming) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dailyTiming EXPECTED TYPE: Array", null, null); + } + this.dailyTiming = dailyTiming; + this.keyModified.set("daily_timing", 1); + + } + + /** + * The method to get the customTiming + * @returns {Array} An Array representing the customTiming + */ + getCustomTiming() { + return this.customTiming; + + } + + /** + * The method to set the value to customTiming + * @param {Array} customTiming An Array representing the customTiming + */ + setCustomTiming(customTiming) { + if((customTiming != null) && (!(Object.prototype.toString.call(customTiming) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: customTiming EXPECTED TYPE: Array", null, null); + } + this.customTiming = customTiming; + this.keyModified.set("custom_timing", 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 { + BusinessHours as MasterModel, + BusinessHours as BusinessHours +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/business_hours_created.js b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/business_hours_created.js new file mode 100644 index 0000000..c582efa --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/business_hours_created.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BusinessHoursCreated{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + BusinessHoursCreated as MasterModel, + BusinessHoursCreated as BusinessHoursCreated +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/business_hours_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/business_hours_operations.js new file mode 100644 index 0000000..2d37786 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/business_hours_operations.js @@ -0,0 +1,115 @@ +import {Header} from "../../../../../../routes/header.js"; +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 BusinessHoursOperations{ + + xCrmOrg; + /** + * Creates an instance of BusinessHoursOperations with the given parameters + * @param {String} xCrmOrg A String representing the xCrmOrg + */ + constructor(xCrmOrg=null){ + if((xCrmOrg != null) && (!(Object.prototype.toString.call(xCrmOrg) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: xCrmOrg EXPECTED TYPE: String", null, null); + } + this.xCrmOrg = xCrmOrg; + + } + + /** + * The method to create business hours + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createBusinessHours(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/business_hours"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + await handlerInstance.addHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.BusinessHours.CreateBusinessHoursHeader"), this.xCrmOrg).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update business hours + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateBusinessHours(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/business_hours"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + await handlerInstance.addHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.BusinessHours.UpdateBusinessHoursHeader"), this.xCrmOrg).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get business hours + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getBusinessHours() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/business_hours"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.BusinessHours.GetBusinessHoursHeader"), this.xCrmOrg).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + +} +class CreateBusinessHoursHeader{ + +} + +class UpdateBusinessHoursHeader{ + +} + +class GetBusinessHoursHeader{ + +} + +export { + UpdateBusinessHoursHeader as UpdateBusinessHoursHeader, + CreateBusinessHoursHeader as CreateBusinessHoursHeader, + GetBusinessHoursHeader as GetBusinessHoursHeader, + BusinessHoursOperations as MasterModel, + BusinessHoursOperations as BusinessHoursOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/import_business_hours.js b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/import_business_hours.js new file mode 100644 index 0000000..b680669 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/import_business_hours.js @@ -0,0 +1,14 @@ +export { BusinessHoursCreated } from "./business_hours_created.js"; +export * as ActionHandler from "./action_handler.js"; +export { BusinessHours } from "./business_hours.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { APIException } from "./api_exception.js"; +export { BreakHoursCustomTiming } from "./break_hours_custom_timing.js"; +export { BusinessHoursOperations } from "./business_hours_operations.js"; +export { CreateBusinessHoursHeader } from "./business_hours_operations.js"; +export { UpdateBusinessHoursHeader } from "./business_hours_operations.js"; +export { GetBusinessHoursHeader } from "./business_hours_operations.js"; +export * as ResponseHandler from "./response_handler.js"; +export * as ActionResponse from "./action_response.js"; +export { ActionWrapper } from "./action_wrapper.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/response_wrapper.js new file mode 100644 index 0000000..7dee30a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/business_hours/response_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + businessHours; + keyModified = new Map(); + /** + * The method to get the businessHours + * @returns {BusinessHours} An instance of BusinessHours + */ + getBusinessHours() { + return this.businessHours; + + } + + /** + * The method to set the value to businessHours + * @param {BusinessHours} businessHours An instance of BusinessHours + */ + async setBusinessHours(businessHours) { + const BusinessHours = (await (import("./business_hours.js"))).MasterModel; + if((businessHours != null) && (!(businessHours instanceof BusinessHours))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: businessHours EXPECTED TYPE: BusinessHours", null, null); + } + this.businessHours = businessHours; + this.keyModified.set("business_hours", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/action_wrapper.js new file mode 100644 index 0000000..6996d19 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/api_exception.js new file mode 100644 index 0000000..815733c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + details; + code; + message; + status; + keyModified = new Map(); + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/body_wrapper.js new file mode 100644 index 0000000..3b80d06 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/cancel_meetings_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/cancel_meetings_operations.js new file mode 100644 index 0000000..f7fbdeb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/cancel_meetings_operations.js @@ -0,0 +1,53 @@ +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 CancelMeetingsOperations{ + + event; + /** + * Creates an instance of CancelMeetingsOperations with the given parameters + * @param {BigInt} event A BigInt representing the event + */ + constructor(event){ + if((!(Object.prototype.toString.call(event) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: event EXPECTED TYPE: BigInt", null, null); + } + this.event = event; + + } + + /** + * The method to cancel meetings + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async cancelMeetings(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Events/"); + apiPath = apiPath.concat(this.event.toString()); + apiPath = apiPath.concat("/actions/cancel"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +export { + CancelMeetingsOperations as MasterModel, + CancelMeetingsOperations as CancelMeetingsOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/import_cancel_meetings.js b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/import_cancel_meetings.js new file mode 100644 index 0000000..530abdf --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/import_cancel_meetings.js @@ -0,0 +1,8 @@ +export * as ActionResponse from "./action_response.js"; +export { SuccessResponse } from "./success_response.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export * as ActionHandler from "./action_handler.js"; +export { APIException } from "./api_exception.js"; +export { Notify } from "./notify.js"; +export { CancelMeetingsOperations } from "./cancel_meetings_operations.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/notify.js b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/notify.js new file mode 100644 index 0000000..f983aea --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/notify.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Notify{ + + sendCancellingMail; + keyModified = new Map(); + /** + * The method to get the sendCancellingMail + * @returns {Boolean} A Boolean representing the sendCancellingMail + */ + getSendCancellingMail() { + return this.sendCancellingMail; + + } + + /** + * The method to set the value to sendCancellingMail + * @param {Boolean} sendCancellingMail A Boolean representing the sendCancellingMail + */ + setSendCancellingMail(sendCancellingMail) { + if((sendCancellingMail != null) && (!(Object.prototype.toString.call(sendCancellingMail) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sendCancellingMail EXPECTED TYPE: Boolean", null, null); + } + this.sendCancellingMail = sendCancellingMail; + this.keyModified.set("send_cancelling_mail", 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 { + Notify as MasterModel, + Notify as Notify +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/success_response.js new file mode 100644 index 0000000..e8b71a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/cancel_meetings/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/action_wrapper.js new file mode 100644 index 0000000..6996d19 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/api_exception.js new file mode 100644 index 0000000..db2d361 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/body_wrapper.js new file mode 100644 index 0000000..02d20b0 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/body_wrapper.js @@ -0,0 +1,113 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + owner; + notify; + relatedModules; + keyModified = new Map(); + /** + * The method to get the owner + * @returns {Owner} An instance of Owner + */ + getOwner() { + return this.owner; + + } + + /** + * The method to set the value to owner + * @param {Owner} owner An instance of Owner + */ + async setOwner(owner) { + const Owner = (await (import("./owner.js"))).MasterModel; + if((owner != null) && (!(owner instanceof Owner))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: owner EXPECTED TYPE: Owner", null, null); + } + this.owner = owner; + this.keyModified.set("owner", 1); + + } + + /** + * The method to get the notify + * @returns {Boolean} A Boolean representing the notify + */ + getNotify() { + return this.notify; + + } + + /** + * The method to set the value to notify + * @param {Boolean} notify A Boolean representing the notify + */ + setNotify(notify) { + if((notify != null) && (!(Object.prototype.toString.call(notify) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: notify EXPECTED TYPE: Boolean", null, null); + } + this.notify = notify; + this.keyModified.set("notify", 1); + + } + + /** + * The method to get the relatedModules + * @returns {Array} An Array representing the relatedModules + */ + getRelatedModules() { + return this.relatedModules; + + } + + /** + * The method to set the value to relatedModules + * @param {Array} relatedModules An Array representing the relatedModules + */ + setRelatedModules(relatedModules) { + if((relatedModules != null) && (!(Object.prototype.toString.call(relatedModules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: relatedModules EXPECTED TYPE: Array", null, null); + } + this.relatedModules = relatedModules; + this.keyModified.set("related_modules", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/change_owner_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/change_owner_operations.js new file mode 100644 index 0000000..61ec7e7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/change_owner_operations.js @@ -0,0 +1,86 @@ +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 ChangeOwnerOperations{ + + module; + /** + * Creates an instance of ChangeOwnerOperations with the given parameters + * @param {String} module A String representing the module + */ + constructor(module){ + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + this.module = module; + + } + + /** + * The method to single update + * @param {BigInt} record A BigInt representing the record + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async singleUpdate(record, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(record) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: record EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.module.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(record.toString()); + apiPath = apiPath.concat("/actions/change_owner"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to mass update + * @param {MassWrapper} request An instance of MassWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async massUpdate(request) { + const MassWrapper = (await (import("./mass_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof MassWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: MassWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.module.toString()); + apiPath = apiPath.concat("/actions/change_owner"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +export { + ChangeOwnerOperations as MasterModel, + ChangeOwnerOperations as ChangeOwnerOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/error_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/error_details.js new file mode 100644 index 0000000..bd8bb0c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/error_details.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ErrorDetails{ + + apiName; + jsonPath; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the jsonPath + * @returns {String} A String representing the jsonPath + */ + getJsonPath() { + return this.jsonPath; + + } + + /** + * The method to set the value to jsonPath + * @param {String} jsonPath A String representing the jsonPath + */ + setJsonPath(jsonPath) { + if((jsonPath != null) && (!(Object.prototype.toString.call(jsonPath) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jsonPath EXPECTED TYPE: String", null, null); + } + this.jsonPath = jsonPath; + this.keyModified.set("json_path", 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 { + ErrorDetails as MasterModel, + ErrorDetails as ErrorDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/import_change_owner.js b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/import_change_owner.js new file mode 100644 index 0000000..ee51cfe --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/import_change_owner.js @@ -0,0 +1,11 @@ +export { APIException } from "./api_exception.js"; +export { MassWrapper } from "./mass_wrapper.js"; +export { RelatedModules } from "./related_modules.js"; +export { SuccessResponse } from "./success_response.js"; +export { ErrorDetails } from "./error_details.js"; +export * as ActionResponse from "./action_response.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { Owner } from "./owner.js"; +export * as ActionHandler from "./action_handler.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { ChangeOwnerOperations } from "./change_owner_operations.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/mass_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/mass_wrapper.js new file mode 100644 index 0000000..1c75481 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/mass_wrapper.js @@ -0,0 +1,137 @@ +import {BodyWrapper} from "../change_owner/body_wrapper.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MassWrapper extends BodyWrapper{ + + ids; + owner; + notify; + relatedModules; + keyModified = new Map(); + /** + * The method to get the ids + * @returns {Array} An Array representing the ids + */ + getIds() { + return this.ids; + + } + + /** + * The method to set the value to ids + * @param {Array} ids An Array representing the ids + */ + setIds(ids) { + if((ids != null) && (!(Object.prototype.toString.call(ids) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ids EXPECTED TYPE: Array", null, null); + } + this.ids = ids; + this.keyModified.set("ids", 1); + + } + + /** + * The method to get the owner + * @returns {Owner} An instance of Owner + */ + getOwner() { + return this.owner; + + } + + /** + * The method to set the value to owner + * @param {Owner} owner An instance of Owner + */ + async setOwner(owner) { + const Owner = (await (import("./owner.js"))).MasterModel; + if((owner != null) && (!(owner instanceof Owner))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: owner EXPECTED TYPE: Owner", null, null); + } + this.owner = owner; + this.keyModified.set("owner", 1); + + } + + /** + * The method to get the notify + * @returns {Boolean} A Boolean representing the notify + */ + getNotify() { + return this.notify; + + } + + /** + * The method to set the value to notify + * @param {Boolean} notify A Boolean representing the notify + */ + setNotify(notify) { + if((notify != null) && (!(Object.prototype.toString.call(notify) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: notify EXPECTED TYPE: Boolean", null, null); + } + this.notify = notify; + this.keyModified.set("notify", 1); + + } + + /** + * The method to get the relatedModules + * @returns {Array} An Array representing the relatedModules + */ + getRelatedModules() { + return this.relatedModules; + + } + + /** + * The method to set the value to relatedModules + * @param {Array} relatedModules An Array representing the relatedModules + */ + setRelatedModules(relatedModules) { + if((relatedModules != null) && (!(Object.prototype.toString.call(relatedModules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: relatedModules EXPECTED TYPE: Array", null, null); + } + this.relatedModules = relatedModules; + this.keyModified.set("related_modules", 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 { + MassWrapper as MasterModel, + MassWrapper as MassWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/owner.js b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/owner.js new file mode 100644 index 0000000..5a950fd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/owner.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Owner{ + + id; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Owner as MasterModel, + Owner as Owner +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/related_modules.js b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/related_modules.js new file mode 100644 index 0000000..5b1a8ef --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/related_modules.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RelatedModules{ + + id; + apiName; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 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 { + RelatedModules as MasterModel, + RelatedModules as RelatedModules +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/success_response.js new file mode 100644 index 0000000..e8b71a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/change_owner/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/action_wrapper.js new file mode 100644 index 0000000..557c0ce --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + contactRoles; + keyModified = new Map(); + /** + * The method to get the contactRoles + * @returns {Array} An Array representing the contactRoles + */ + getContactRoles() { + return this.contactRoles; + + } + + /** + * The method to set the value to contactRoles + * @param {Array} contactRoles An Array representing the contactRoles + */ + setContactRoles(contactRoles) { + if((contactRoles != null) && (!(Object.prototype.toString.call(contactRoles) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: contactRoles EXPECTED TYPE: Array", null, null); + } + this.contactRoles = contactRoles; + this.keyModified.set("contact_roles", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/api_exception.js new file mode 100644 index 0000000..eef1972 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/body_wrapper.js new file mode 100644 index 0000000..d16f232 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + contactRoles; + keyModified = new Map(); + /** + * The method to get the contactRoles + * @returns {Array} An Array representing the contactRoles + */ + getContactRoles() { + return this.contactRoles; + + } + + /** + * The method to set the value to contactRoles + * @param {Array} contactRoles An Array representing the contactRoles + */ + setContactRoles(contactRoles) { + if((contactRoles != null) && (!(Object.prototype.toString.call(contactRoles) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: contactRoles EXPECTED TYPE: Array", null, null); + } + this.contactRoles = contactRoles; + this.keyModified.set("contact_roles", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/contact_role.js b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/contact_role.js new file mode 100644 index 0000000..82c5f23 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/contact_role.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ContactRole{ + + name; + id; + sequenceNumber; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the sequenceNumber + * @returns {number} A number representing the sequenceNumber + */ + getSequenceNumber() { + return this.sequenceNumber; + + } + + /** + * The method to set the value to sequenceNumber + * @param {number} sequenceNumber A number representing the sequenceNumber + */ + setSequenceNumber(sequenceNumber) { + if((sequenceNumber != null) && (!(Object.prototype.toString.call(sequenceNumber) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sequenceNumber EXPECTED TYPE: number", null, null); + } + this.sequenceNumber = sequenceNumber; + this.keyModified.set("sequence_number", 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 { + ContactRole as MasterModel, + ContactRole as ContactRole +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/contact_roles_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/contact_roles_operations.js new file mode 100644 index 0000000..9bfb6ea --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/contact_roles_operations.js @@ -0,0 +1,190 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 ContactRolesOperations{ + /** + * The method to get roles + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getRoles() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Contacts/roles"); + 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"); + + } + + /** + * The method to create roles + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createRoles(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Contacts/roles"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update roles + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateRoles(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Contacts/roles"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete roles + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteRoles(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Contacts/roles"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get role + * @param {BigInt} role A BigInt representing the role + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getRole(role) { + if((!(Object.prototype.toString.call(role) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: role EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Contacts/roles/"); + apiPath = apiPath.concat(role.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/json"); + + } + + /** + * The method to update role + * @param {BigInt} role A BigInt representing the role + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateRole(role, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(role) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: role EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Contacts/roles/"); + apiPath = apiPath.concat(role.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete role + * @param {BigInt} role A BigInt representing the role + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteRole(role) { + if((!(Object.prototype.toString.call(role) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: role EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Contacts/roles/"); + apiPath = apiPath.concat(role.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class DeleteRolesParam{ + + static IDS = new Param("ids", "com.zoho.crm.api.ContactRoles.DeleteRolesParam"); +} + +export { + ContactRolesOperations as MasterModel, + ContactRolesOperations as ContactRolesOperations, + DeleteRolesParam as DeleteRolesParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/import_contact_roles.js b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/import_contact_roles.js new file mode 100644 index 0000000..ded1c18 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/import_contact_roles.js @@ -0,0 +1,10 @@ +export * as ActionResponse from "./action_response.js"; +export { APIException } from "./api_exception.js"; +export { SuccessResponse } from "./success_response.js"; +export * as ResponseHandler from "./response_handler.js"; +export { ContactRolesOperations } from "./contact_roles_operations.js"; +export { DeleteRolesParam } from "./contact_roles_operations.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { ContactRole } from "./contact_role.js"; +export * as ActionHandler from "./action_handler.js"; +export { ActionWrapper } from "./action_wrapper.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/success_response.js new file mode 100644 index 0000000..6cdb15e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/contact_roles/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/action_wrapper.js new file mode 100644 index 0000000..2e482b2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + currencies; + keyModified = new Map(); + /** + * The method to get the currencies + * @returns {Array} An Array representing the currencies + */ + getCurrencies() { + return this.currencies; + + } + + /** + * The method to set the value to currencies + * @param {Array} currencies An Array representing the currencies + */ + setCurrencies(currencies) { + if((currencies != null) && (!(Object.prototype.toString.call(currencies) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: currencies EXPECTED TYPE: Array", null, null); + } + this.currencies = currencies; + this.keyModified.set("currencies", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/api_exception.js new file mode 100644 index 0000000..eef1972 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/base_currency.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/base_currency.js new file mode 100644 index 0000000..dfe6dae --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/base_currency.js @@ -0,0 +1,228 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BaseCurrency{ + + prefixSymbol; + isoCode; + symbol; + exchangeRate; + format; + id; + isActive; + name; + keyModified = new Map(); + /** + * The method to get the prefixSymbol + * @returns {Boolean} A Boolean representing the prefixSymbol + */ + getPrefixSymbol() { + return this.prefixSymbol; + + } + + /** + * The method to set the value to prefixSymbol + * @param {Boolean} prefixSymbol A Boolean representing the prefixSymbol + */ + setPrefixSymbol(prefixSymbol) { + if((prefixSymbol != null) && (!(Object.prototype.toString.call(prefixSymbol) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: prefixSymbol EXPECTED TYPE: Boolean", null, null); + } + this.prefixSymbol = prefixSymbol; + this.keyModified.set("prefix_symbol", 1); + + } + + /** + * The method to get the isoCode + * @returns {String} A String representing the isoCode + */ + getIsoCode() { + return this.isoCode; + + } + + /** + * The method to set the value to isoCode + * @param {String} isoCode A String representing the isoCode + */ + setIsoCode(isoCode) { + if((isoCode != null) && (!(Object.prototype.toString.call(isoCode) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: isoCode EXPECTED TYPE: String", null, null); + } + this.isoCode = isoCode; + this.keyModified.set("iso_code", 1); + + } + + /** + * The method to get the symbol + * @returns {String} A String representing the symbol + */ + getSymbol() { + return this.symbol; + + } + + /** + * The method to set the value to symbol + * @param {String} symbol A String representing the symbol + */ + setSymbol(symbol) { + if((symbol != null) && (!(Object.prototype.toString.call(symbol) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: symbol EXPECTED TYPE: String", null, null); + } + this.symbol = symbol; + this.keyModified.set("symbol", 1); + + } + + /** + * The method to get the exchangeRate + * @returns {String} A String representing the exchangeRate + */ + getExchangeRate() { + return this.exchangeRate; + + } + + /** + * The method to set the value to exchangeRate + * @param {String} exchangeRate A String representing the exchangeRate + */ + setExchangeRate(exchangeRate) { + if((exchangeRate != null) && (!(Object.prototype.toString.call(exchangeRate) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: exchangeRate EXPECTED TYPE: String", null, null); + } + this.exchangeRate = exchangeRate; + this.keyModified.set("exchange_rate", 1); + + } + + /** + * The method to get the format + * @returns {Format} An instance of Format + */ + getFormat() { + return this.format; + + } + + /** + * The method to set the value to format + * @param {Format} format An instance of Format + */ + async setFormat(format) { + const Format = (await (import("./format.js"))).MasterModel; + if((format != null) && (!(format instanceof Format))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: format EXPECTED TYPE: Format", null, null); + } + this.format = format; + this.keyModified.set("format", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the isActive + * @returns {Boolean} A Boolean representing the isActive + */ + getIsActive() { + return this.isActive; + + } + + /** + * The method to set the value to isActive + * @param {Boolean} isActive A Boolean representing the isActive + */ + setIsActive(isActive) { + if((isActive != null) && (!(Object.prototype.toString.call(isActive) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: isActive EXPECTED TYPE: Boolean", null, null); + } + this.isActive = isActive; + this.keyModified.set("is_active", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + BaseCurrency as MasterModel, + BaseCurrency as BaseCurrency +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/base_currency_action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/base_currency_action_response.js new file mode 100644 index 0000000..a125ee6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/base_currency_action_response.js @@ -0,0 +1,7 @@ +class BaseCurrencyActionResponse{ + +} +export { + BaseCurrencyActionResponse as MasterModel, + BaseCurrencyActionResponse as BaseCurrencyActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/base_currency_action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/base_currency_action_wrapper.js new file mode 100644 index 0000000..67f2036 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/base_currency_action_wrapper.js @@ -0,0 +1,63 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BaseCurrencyActionWrapper{ + + baseCurrency; + keyModified = new Map(); + /** + * The method to get the baseCurrency + * @returns {BaseCurrencyActionResponse} An instance of BaseCurrencyActionResponse + */ + getBaseCurrency() { + return this.baseCurrency; + + } + + /** + * The method to set the value to baseCurrency + * @param {BaseCurrencyActionResponse} baseCurrency An instance of BaseCurrencyActionResponse + */ + setBaseCurrency(baseCurrency) { + this.baseCurrency = baseCurrency; + this.keyModified.set("base_currency", 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 { + BaseCurrencyActionWrapper as MasterModel, + BaseCurrencyActionWrapper as BaseCurrencyActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/base_currency_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/base_currency_wrapper.js new file mode 100644 index 0000000..57430f5 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/base_currency_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BaseCurrencyWrapper{ + + baseCurrency; + keyModified = new Map(); + /** + * The method to get the baseCurrency + * @returns {BaseCurrency} An instance of BaseCurrency + */ + getBaseCurrency() { + return this.baseCurrency; + + } + + /** + * The method to set the value to baseCurrency + * @param {BaseCurrency} baseCurrency An instance of BaseCurrency + */ + async setBaseCurrency(baseCurrency) { + const BaseCurrency = (await (import("./base_currency.js"))).MasterModel; + if((baseCurrency != null) && (!(baseCurrency instanceof BaseCurrency))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: baseCurrency EXPECTED TYPE: BaseCurrency", null, null); + } + this.baseCurrency = baseCurrency; + this.keyModified.set("base_currency", 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 { + BaseCurrencyWrapper as MasterModel, + BaseCurrencyWrapper as BaseCurrencyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/body_wrapper.js new file mode 100644 index 0000000..2f5440a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + currencies; + keyModified = new Map(); + /** + * The method to get the currencies + * @returns {Array} An Array representing the currencies + */ + getCurrencies() { + return this.currencies; + + } + + /** + * The method to set the value to currencies + * @param {Array} currencies An Array representing the currencies + */ + setCurrencies(currencies) { + if((currencies != null) && (!(Object.prototype.toString.call(currencies) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: currencies EXPECTED TYPE: Array", null, null); + } + this.currencies = currencies; + this.keyModified.set("currencies", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/currencies_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/currencies_operations.js new file mode 100644 index 0000000..3a9448a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/currencies_operations.js @@ -0,0 +1,186 @@ +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 CurrenciesOperations{ + /** + * The method to get currencies + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getCurrencies() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/org/currencies"); + 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"); + + } + + /** + * The method to create currencies + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createCurrencies(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/org/currencies"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update currencies + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateCurrencies(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/org/currencies"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get currency + * @param {BigInt} currency A BigInt representing the currency + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getCurrency(currency) { + if((!(Object.prototype.toString.call(currency) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: currency EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/org/currencies/"); + apiPath = apiPath.concat(currency.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/json"); + + } + + /** + * The method to update currency + * @param {BigInt} currency A BigInt representing the currency + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateCurrency(currency, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(currency) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: currency EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/org/currencies/"); + apiPath = apiPath.concat(currency.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to enable currency + * @param {BaseCurrencyWrapper} request An instance of BaseCurrencyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async enableCurrency(request) { + const BaseCurrencyWrapper = (await (import("./base_currency_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BaseCurrencyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BaseCurrencyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/org/currencies/actions/enable"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update base currency + * @param {BaseCurrencyWrapper} request An instance of BaseCurrencyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateBaseCurrency(request) { + const BaseCurrencyWrapper = (await (import("./base_currency_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BaseCurrencyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BaseCurrencyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/org/currencies/actions/enable"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +export { + CurrenciesOperations as MasterModel, + CurrenciesOperations as CurrenciesOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/currency.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/currency.js new file mode 100644 index 0000000..a1011a6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/currency.js @@ -0,0 +1,345 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Currency{ + + prefixSymbol; + format; + exchangeRate; + isoCode; + symbol; + name; + isActive; + isBase; + id; + createdBy; + modifiedBy; + modifiedTime; + createdTime; + keyModified = new Map(); + /** + * The method to get the prefixSymbol + * @returns {Boolean} A Boolean representing the prefixSymbol + */ + getPrefixSymbol() { + return this.prefixSymbol; + + } + + /** + * The method to set the value to prefixSymbol + * @param {Boolean} prefixSymbol A Boolean representing the prefixSymbol + */ + setPrefixSymbol(prefixSymbol) { + if((prefixSymbol != null) && (!(Object.prototype.toString.call(prefixSymbol) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: prefixSymbol EXPECTED TYPE: Boolean", null, null); + } + this.prefixSymbol = prefixSymbol; + this.keyModified.set("prefix_symbol", 1); + + } + + /** + * The method to get the format + * @returns {CurrencyFormat} An instance of CurrencyFormat + */ + getFormat() { + return this.format; + + } + + /** + * The method to set the value to format + * @param {CurrencyFormat} format An instance of CurrencyFormat + */ + async setFormat(format) { + const CurrencyFormat = (await (import("./currency_format.js"))).MasterModel; + if((format != null) && (!(format instanceof CurrencyFormat))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: format EXPECTED TYPE: CurrencyFormat", null, null); + } + this.format = format; + this.keyModified.set("format", 1); + + } + + /** + * The method to get the exchangeRate + * @returns {String} A String representing the exchangeRate + */ + getExchangeRate() { + return this.exchangeRate; + + } + + /** + * The method to set the value to exchangeRate + * @param {String} exchangeRate A String representing the exchangeRate + */ + setExchangeRate(exchangeRate) { + if((exchangeRate != null) && (!(Object.prototype.toString.call(exchangeRate) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: exchangeRate EXPECTED TYPE: String", null, null); + } + this.exchangeRate = exchangeRate; + this.keyModified.set("exchange_rate", 1); + + } + + /** + * The method to get the isoCode + * @returns {String} A String representing the isoCode + */ + getIsoCode() { + return this.isoCode; + + } + + /** + * The method to set the value to isoCode + * @param {String} isoCode A String representing the isoCode + */ + setIsoCode(isoCode) { + if((isoCode != null) && (!(Object.prototype.toString.call(isoCode) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: isoCode EXPECTED TYPE: String", null, null); + } + this.isoCode = isoCode; + this.keyModified.set("iso_code", 1); + + } + + /** + * The method to get the symbol + * @returns {String} A String representing the symbol + */ + getSymbol() { + return this.symbol; + + } + + /** + * The method to set the value to symbol + * @param {String} symbol A String representing the symbol + */ + setSymbol(symbol) { + if((symbol != null) && (!(Object.prototype.toString.call(symbol) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: symbol EXPECTED TYPE: String", null, null); + } + this.symbol = symbol; + this.keyModified.set("symbol", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the isActive + * @returns {Boolean} A Boolean representing the isActive + */ + getIsActive() { + return this.isActive; + + } + + /** + * The method to set the value to isActive + * @param {Boolean} isActive A Boolean representing the isActive + */ + setIsActive(isActive) { + if((isActive != null) && (!(Object.prototype.toString.call(isActive) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: isActive EXPECTED TYPE: Boolean", null, null); + } + this.isActive = isActive; + this.keyModified.set("is_active", 1); + + } + + /** + * The method to get the isBase + * @returns {Boolean} A Boolean representing the isBase + */ + getIsBase() { + return this.isBase; + + } + + /** + * The method to set the value to isBase + * @param {Boolean} isBase A Boolean representing the isBase + */ + setIsBase(isBase) { + if((isBase != null) && (!(Object.prototype.toString.call(isBase) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: isBase EXPECTED TYPE: Boolean", null, null); + } + this.isBase = isBase; + this.keyModified.set("is_base", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("modified_by", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 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 { + Currency as MasterModel, + Currency as Currency +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/currency_format.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/currency_format.js new file mode 100644 index 0000000..22abbd7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/currency_format.js @@ -0,0 +1,113 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class CurrencyFormat{ + + decimalSeparator; + thousandSeparator; + decimalPlaces; + keyModified = new Map(); + /** + * The method to get the decimalSeparator + * @returns {Choice} An instance of Choice + */ + getDecimalSeparator() { + return this.decimalSeparator; + + } + + /** + * The method to set the value to decimalSeparator + * @param {Choice} decimalSeparator An instance of Choice + */ + setDecimalSeparator(decimalSeparator) { + if((decimalSeparator != null) && (!(decimalSeparator instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: decimalSeparator EXPECTED TYPE: Choice", null, null); + } + this.decimalSeparator = decimalSeparator; + this.keyModified.set("decimal_separator", 1); + + } + + /** + * The method to get the thousandSeparator + * @returns {Choice} An instance of Choice + */ + getThousandSeparator() { + return this.thousandSeparator; + + } + + /** + * The method to set the value to thousandSeparator + * @param {Choice} thousandSeparator An instance of Choice + */ + setThousandSeparator(thousandSeparator) { + if((thousandSeparator != null) && (!(thousandSeparator instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: thousandSeparator EXPECTED TYPE: Choice", null, null); + } + this.thousandSeparator = thousandSeparator; + this.keyModified.set("thousand_separator", 1); + + } + + /** + * The method to get the decimalPlaces + * @returns {Choice} An instance of Choice + */ + getDecimalPlaces() { + return this.decimalPlaces; + + } + + /** + * The method to set the value to decimalPlaces + * @param {Choice} decimalPlaces An instance of Choice + */ + setDecimalPlaces(decimalPlaces) { + if((decimalPlaces != null) && (!(decimalPlaces instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: decimalPlaces EXPECTED TYPE: Choice", null, null); + } + this.decimalPlaces = decimalPlaces; + this.keyModified.set("decimal_places", 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 { + CurrencyFormat as MasterModel, + CurrencyFormat as CurrencyFormat +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/disable_success.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/disable_success.js new file mode 100644 index 0000000..769679e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/disable_success.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DisableSuccess{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + DisableSuccess as MasterModel, + DisableSuccess as DisableSuccess +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/error_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/error_details.js new file mode 100644 index 0000000..bd8bb0c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/error_details.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ErrorDetails{ + + apiName; + jsonPath; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the jsonPath + * @returns {String} A String representing the jsonPath + */ + getJsonPath() { + return this.jsonPath; + + } + + /** + * The method to set the value to jsonPath + * @param {String} jsonPath A String representing the jsonPath + */ + setJsonPath(jsonPath) { + if((jsonPath != null) && (!(Object.prototype.toString.call(jsonPath) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jsonPath EXPECTED TYPE: String", null, null); + } + this.jsonPath = jsonPath; + this.keyModified.set("json_path", 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 { + ErrorDetails as MasterModel, + ErrorDetails as ErrorDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/format.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/format.js new file mode 100644 index 0000000..17a6752 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/format.js @@ -0,0 +1,113 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Format{ + + decimalSeparator; + thousandSeparator; + decimalPlaces; + keyModified = new Map(); + /** + * The method to get the decimalSeparator + * @returns {Choice} An instance of Choice + */ + getDecimalSeparator() { + return this.decimalSeparator; + + } + + /** + * The method to set the value to decimalSeparator + * @param {Choice} decimalSeparator An instance of Choice + */ + setDecimalSeparator(decimalSeparator) { + if((decimalSeparator != null) && (!(decimalSeparator instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: decimalSeparator EXPECTED TYPE: Choice", null, null); + } + this.decimalSeparator = decimalSeparator; + this.keyModified.set("decimal_separator", 1); + + } + + /** + * The method to get the thousandSeparator + * @returns {Choice} An instance of Choice + */ + getThousandSeparator() { + return this.thousandSeparator; + + } + + /** + * The method to set the value to thousandSeparator + * @param {Choice} thousandSeparator An instance of Choice + */ + setThousandSeparator(thousandSeparator) { + if((thousandSeparator != null) && (!(thousandSeparator instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: thousandSeparator EXPECTED TYPE: Choice", null, null); + } + this.thousandSeparator = thousandSeparator; + this.keyModified.set("thousand_separator", 1); + + } + + /** + * The method to get the decimalPlaces + * @returns {Choice} An instance of Choice + */ + getDecimalPlaces() { + return this.decimalPlaces; + + } + + /** + * The method to set the value to decimalPlaces + * @param {Choice} decimalPlaces An instance of Choice + */ + setDecimalPlaces(decimalPlaces) { + if((decimalPlaces != null) && (!(decimalPlaces instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: decimalPlaces EXPECTED TYPE: Choice", null, null); + } + this.decimalPlaces = decimalPlaces; + this.keyModified.set("decimal_places", 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 { + Format as MasterModel, + Format as Format +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/import_currencies.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/import_currencies.js new file mode 100644 index 0000000..73b58b8 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/import_currencies.js @@ -0,0 +1,17 @@ +export { BaseCurrency } from "./base_currency.js"; +export { APIException } from "./api_exception.js"; +export { CurrencyFormat } from "./currency_format.js"; +export * as ActionResponse from "./action_response.js"; +export { SuccessResponse } from "./success_response.js"; +export * as ResponseHandler from "./response_handler.js"; +export { BaseCurrencyWrapper } from "./base_currency_wrapper.js"; +export { ErrorDetails } from "./error_details.js"; +export * as BaseCurrencyActionResponse from "./base_currency_action_response.js"; +export { CurrenciesOperations } from "./currencies_operations.js"; +export { Format } from "./format.js"; +export { Currency } from "./currency.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { DisableSuccess } from "./disable_success.js"; +export { BaseCurrencyActionWrapper } from "./base_currency_action_wrapper.js"; +export * as ActionHandler from "./action_handler.js"; +export { BodyWrapper } from "./body_wrapper.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/success_response.js new file mode 100644 index 0000000..6cdb15e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/currencies/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/action_wrapper.js new file mode 100644 index 0000000..fcd870c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + customViews; + keyModified = new Map(); + /** + * The method to get the customViews + * @returns {Array} An Array representing the customViews + */ + getCustomViews() { + return this.customViews; + + } + + /** + * The method to set the value to customViews + * @param {Array} customViews An Array representing the customViews + */ + setCustomViews(customViews) { + if((customViews != null) && (!(Object.prototype.toString.call(customViews) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: customViews EXPECTED TYPE: Array", null, null); + } + this.customViews = customViews; + this.keyModified.set("custom_views", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/api_exception.js new file mode 100644 index 0000000..eef1972 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/body_wrapper.js new file mode 100644 index 0000000..c08fca6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/body_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + customViews; + info; + keyModified = new Map(); + /** + * The method to get the customViews + * @returns {Array} An Array representing the customViews + */ + getCustomViews() { + return this.customViews; + + } + + /** + * The method to set the value to customViews + * @param {Array} customViews An Array representing the customViews + */ + setCustomViews(customViews) { + if((customViews != null) && (!(Object.prototype.toString.call(customViews) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: customViews EXPECTED TYPE: Array", null, null); + } + this.customViews = customViews; + this.keyModified.set("custom_views", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/criteria.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/criteria.js new file mode 100644 index 0000000..22816f1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/criteria.js @@ -0,0 +1,156 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Criteria{ + + comparator; + field; + value; + groupOperator; + group; + keyModified = new Map(); + /** + * The method to get the comparator + * @returns {String} A String representing the comparator + */ + getComparator() { + return this.comparator; + + } + + /** + * The method to set the value to comparator + * @param {String} comparator A String representing the comparator + */ + setComparator(comparator) { + if((comparator != null) && (!(Object.prototype.toString.call(comparator) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: comparator EXPECTED TYPE: String", null, null); + } + this.comparator = comparator; + this.keyModified.set("comparator", 1); + + } + + /** + * The method to get the field + * @returns {Field} An instance of Field + */ + getField() { + return this.field; + + } + + /** + * The method to set the value to field + * @param {Field} field An instance of Field + */ + async setField(field) { + const Field = (await (import("./field.js"))).MasterModel; + if((field != null) && (!(field instanceof Field))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: field EXPECTED TYPE: Field", null, null); + } + this.field = field; + this.keyModified.set("field", 1); + + } + + /** + * The method to get the value + * @returns {Object} An Object representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {Object} value An Object representing the value + */ + setValue(value) { + this.value = value; + this.keyModified.set("value", 1); + + } + + /** + * The method to get the groupOperator + * @returns {String} A String representing the groupOperator + */ + getGroupOperator() { + return this.groupOperator; + + } + + /** + * The method to set the value to groupOperator + * @param {String} groupOperator A String representing the groupOperator + */ + setGroupOperator(groupOperator) { + if((groupOperator != null) && (!(Object.prototype.toString.call(groupOperator) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: groupOperator EXPECTED TYPE: String", null, null); + } + this.groupOperator = groupOperator; + this.keyModified.set("group_operator", 1); + + } + + /** + * The method to get the group + * @returns {Array} An Array representing the group + */ + getGroup() { + return this.group; + + } + + /** + * The method to set the value to group + * @param {Array} group An Array representing the group + */ + setGroup(group) { + if((group != null) && (!(Object.prototype.toString.call(group) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: group EXPECTED TYPE: Array", null, null); + } + this.group = group; + this.keyModified.set("group", 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 { + Criteria as MasterModel, + Criteria as Criteria +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/custom_view.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/custom_view.js new file mode 100644 index 0000000..e0ea898 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/custom_view.js @@ -0,0 +1,555 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class CustomView{ + + displayValue; + systemName; + category; + createdTime; + modifiedTime; + lastAccessedTime; + name; + createdBy; + modifiedBy; + module; + criteria; + default1; + systemDefined; + locked; + favorite; + offline; + accessType; + sharedTo; + fields; + sortBy; + sortOrder; + id; + keyModified = new Map(); + /** + * The method to get the displayValue + * @returns {String} A String representing the displayValue + */ + getDisplayValue() { + return this.displayValue; + + } + + /** + * The method to set the value to displayValue + * @param {String} displayValue A String representing the displayValue + */ + setDisplayValue(displayValue) { + if((displayValue != null) && (!(Object.prototype.toString.call(displayValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayValue EXPECTED TYPE: String", null, null); + } + this.displayValue = displayValue; + this.keyModified.set("display_value", 1); + + } + + /** + * The method to get the systemName + * @returns {String} A String representing the systemName + */ + getSystemName() { + return this.systemName; + + } + + /** + * The method to set the value to systemName + * @param {String} systemName A String representing the systemName + */ + setSystemName(systemName) { + if((systemName != null) && (!(Object.prototype.toString.call(systemName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: systemName EXPECTED TYPE: String", null, null); + } + this.systemName = systemName; + this.keyModified.set("system_name", 1); + + } + + /** + * The method to get the category + * @returns {String} A String representing the category + */ + getCategory() { + return this.category; + + } + + /** + * The method to set the value to category + * @param {String} category A String representing the category + */ + setCategory(category) { + if((category != null) && (!(Object.prototype.toString.call(category) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: category EXPECTED TYPE: String", null, null); + } + this.category = category; + this.keyModified.set("category", 1); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the lastAccessedTime + * @returns {Date} An instance of Date + */ + getLastAccessedTime() { + return this.lastAccessedTime; + + } + + /** + * The method to set the value to lastAccessedTime + * @param {Date} lastAccessedTime An instance of Date + */ + setLastAccessedTime(lastAccessedTime) { + if((lastAccessedTime != null) && (!(lastAccessedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: lastAccessedTime EXPECTED TYPE: Date", null, null); + } + this.lastAccessedTime = lastAccessedTime; + this.keyModified.set("last_accessed_time", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the createdBy + * @returns {Owner} An instance of Owner + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {Owner} createdBy An instance of Owner + */ + async setCreatedBy(createdBy) { + const Owner = (await (import("./owner.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof Owner))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: Owner", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {Owner} An instance of Owner + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {Owner} modifiedBy An instance of Owner + */ + async setModifiedBy(modifiedBy) { + const Owner = (await (import("./owner.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof Owner))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: Owner", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("modified_by", 1); + + } + + /** + * The method to get the module + * @returns {Owner} An instance of Owner + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {Owner} module An instance of Owner + */ + async setModule(module) { + const Owner = (await (import("./owner.js"))).MasterModel; + if((module != null) && (!(module instanceof Owner))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: Owner", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the criteria + * @returns {Criteria} An instance of Criteria + */ + getCriteria() { + return this.criteria; + + } + + /** + * The method to set the value to criteria + * @param {Criteria} criteria An instance of Criteria + */ + async setCriteria(criteria) { + const Criteria = (await (import("./criteria.js"))).MasterModel; + if((criteria != null) && (!(criteria instanceof Criteria))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: criteria EXPECTED TYPE: Criteria", null, null); + } + this.criteria = criteria; + this.keyModified.set("criteria", 1); + + } + + /** + * The method to get the default + * @returns {Boolean} A Boolean representing the default1 + */ + getDefault() { + return this.default1; + + } + + /** + * The method to set the value to default + * @param {Boolean} default1 A Boolean representing the default1 + */ + setDefault(default1) { + if((default1 != null) && (!(Object.prototype.toString.call(default1) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: default1 EXPECTED TYPE: Boolean", null, null); + } + this.default1 = default1; + this.keyModified.set("default", 1); + + } + + /** + * The method to get the systemDefined + * @returns {Boolean} A Boolean representing the systemDefined + */ + getSystemDefined() { + return this.systemDefined; + + } + + /** + * The method to set the value to systemDefined + * @param {Boolean} systemDefined A Boolean representing the systemDefined + */ + setSystemDefined(systemDefined) { + if((systemDefined != null) && (!(Object.prototype.toString.call(systemDefined) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: systemDefined EXPECTED TYPE: Boolean", null, null); + } + this.systemDefined = systemDefined; + this.keyModified.set("system_defined", 1); + + } + + /** + * The method to get the locked + * @returns {Boolean} A Boolean representing the locked + */ + getLocked() { + return this.locked; + + } + + /** + * The method to set the value to locked + * @param {Boolean} locked A Boolean representing the locked + */ + setLocked(locked) { + if((locked != null) && (!(Object.prototype.toString.call(locked) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: locked EXPECTED TYPE: Boolean", null, null); + } + this.locked = locked; + this.keyModified.set("locked", 1); + + } + + /** + * The method to get the favorite + * @returns {Boolean} A Boolean representing the favorite + */ + getFavorite() { + return this.favorite; + + } + + /** + * The method to set the value to favorite + * @param {Boolean} favorite A Boolean representing the favorite + */ + setFavorite(favorite) { + if((favorite != null) && (!(Object.prototype.toString.call(favorite) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: favorite EXPECTED TYPE: Boolean", null, null); + } + this.favorite = favorite; + this.keyModified.set("favorite", 1); + + } + + /** + * The method to get the offline + * @returns {Boolean} A Boolean representing the offline + */ + getOffline() { + return this.offline; + + } + + /** + * The method to set the value to offline + * @param {Boolean} offline A Boolean representing the offline + */ + setOffline(offline) { + if((offline != null) && (!(Object.prototype.toString.call(offline) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: offline EXPECTED TYPE: Boolean", null, null); + } + this.offline = offline; + this.keyModified.set("offline", 1); + + } + + /** + * The method to get the accessType + * @returns {Choice} An instance of Choice + */ + getAccessType() { + return this.accessType; + + } + + /** + * The method to set the value to accessType + * @param {Choice} accessType An instance of Choice + */ + setAccessType(accessType) { + if((accessType != null) && (!(accessType instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: accessType EXPECTED TYPE: Choice", null, null); + } + this.accessType = accessType; + this.keyModified.set("access_type", 1); + + } + + /** + * The method to get the sharedTo + * @returns {Array} An Array representing the sharedTo + */ + getSharedTo() { + return this.sharedTo; + + } + + /** + * The method to set the value to sharedTo + * @param {Array} sharedTo An Array representing the sharedTo + */ + setSharedTo(sharedTo) { + if((sharedTo != null) && (!(Object.prototype.toString.call(sharedTo) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sharedTo EXPECTED TYPE: Array", null, null); + } + this.sharedTo = sharedTo; + this.keyModified.set("shared_to", 1); + + } + + /** + * The method to get the fields + * @returns {Array} An Array representing the fields + */ + getFields() { + return this.fields; + + } + + /** + * The method to set the value to fields + * @param {Array} fields An Array representing the fields + */ + setFields(fields) { + if((fields != null) && (!(Object.prototype.toString.call(fields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: Array", null, null); + } + this.fields = fields; + this.keyModified.set("fields", 1); + + } + + /** + * The method to get the sortBy + * @returns {SortBy} An instance of SortBy + */ + getSortBy() { + return this.sortBy; + + } + + /** + * The method to set the value to sortBy + * @param {SortBy} sortBy An instance of SortBy + */ + async setSortBy(sortBy) { + const SortBy = (await (import("./sort_by.js"))).MasterModel; + if((sortBy != null) && (!(sortBy instanceof SortBy))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortBy EXPECTED TYPE: SortBy", null, null); + } + this.sortBy = sortBy; + this.keyModified.set("sort_by", 1); + + } + + /** + * The method to get the sortOrder + * @returns {Choice} An instance of Choice + */ + getSortOrder() { + return this.sortOrder; + + } + + /** + * The method to set the value to sortOrder + * @param {Choice} sortOrder An instance of Choice + */ + setSortOrder(sortOrder) { + if((sortOrder != null) && (!(sortOrder instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortOrder EXPECTED TYPE: Choice", null, null); + } + this.sortOrder = sortOrder; + this.keyModified.set("sort_order", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + CustomView as MasterModel, + CustomView as CustomView +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/custom_views_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/custom_views_operations.js new file mode 100644 index 0000000..a5fd2d8 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/custom_views_operations.js @@ -0,0 +1,77 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 CustomViewsOperations{ + /** + * The method to get custom views + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getCustomViews(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/custom_views"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to get custom view + * @param {BigInt} id A BigInt representing the id + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getCustomView(id, paramInstance=null) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/custom_views/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + +} +class GetCustomViewsParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.CustomViews.GetCustomViewsParam"); +} + +class GetCustomViewParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.CustomViews.GetCustomViewParam"); +} + +export { + GetCustomViewsParam as GetCustomViewsParam, + GetCustomViewParam as GetCustomViewParam, + CustomViewsOperations as MasterModel, + CustomViewsOperations as CustomViewsOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/field.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/field.js new file mode 100644 index 0000000..fb4ef4e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/field.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Field{ + + apiName; + id; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Field as MasterModel, + Field as Field +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/fields.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/fields.js new file mode 100644 index 0000000..865ff1a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/fields.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Fields{ + + id; + apiName; + pin; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the pin + * @returns {Boolean} A Boolean representing the pin + */ + getPin() { + return this.pin; + + } + + /** + * The method to set the value to pin + * @param {Boolean} pin A Boolean representing the pin + */ + setPin(pin) { + if((pin != null) && (!(Object.prototype.toString.call(pin) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pin EXPECTED TYPE: Boolean", null, null); + } + this.pin = pin; + this.keyModified.set("_pin", 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 { + Fields as MasterModel, + Fields as Fields +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/import_custom_views.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/import_custom_views.js new file mode 100644 index 0000000..6a72651 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/import_custom_views.js @@ -0,0 +1,21 @@ +export * as ActionResponse from "./action_response.js"; +export { PinFields } from "./pin_fields.js"; +export { Translation } from "./translation.js"; +export { CustomViewsOperations } from "./custom_views_operations.js"; +export { GetCustomViewsParam } from "./custom_views_operations.js"; +export { GetCustomViewParam } from "./custom_views_operations.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export * as ActionHandler from "./action_handler.js"; +export { CustomView } from "./custom_view.js"; +export { Owner } from "./owner.js"; +export { SharedTo } from "./shared_to.js"; +export { SortBy } from "./sort_by.js"; +export { APIException } from "./api_exception.js"; +export { Info } from "./info.js"; +export { SuccessResponse } from "./success_response.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export * as ResponseHandler from "./response_handler.js"; +export { Criteria } from "./criteria.js"; +export { Field } from "./field.js"; +export { PinUnpinFields } from "./pin_unpin_fields.js"; +export { Fields } from "./fields.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/info.js new file mode 100644 index 0000000..6410870 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/info.js @@ -0,0 +1,182 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + perPage; + count; + page; + moreRecords; + default1; + translation; + keyModified = new Map(); + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 1); + + } + + /** + * The method to get the default + * @returns {BigInt} A BigInt representing the default1 + */ + getDefault() { + return this.default1; + + } + + /** + * The method to set the value to default + * @param {BigInt} default1 A BigInt representing the default1 + */ + setDefault(default1) { + if((default1 != null) && (!(Object.prototype.toString.call(default1) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: default1 EXPECTED TYPE: BigInt", null, null); + } + this.default1 = default1; + this.keyModified.set("default", 1); + + } + + /** + * The method to get the translation + * @returns {Translation} An instance of Translation + */ + getTranslation() { + return this.translation; + + } + + /** + * The method to set the value to translation + * @param {Translation} translation An instance of Translation + */ + async setTranslation(translation) { + const Translation = (await (import("./translation.js"))).MasterModel; + if((translation != null) && (!(translation instanceof Translation))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: translation EXPECTED TYPE: Translation", null, null); + } + this.translation = translation; + this.keyModified.set("translation", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/owner.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/owner.js new file mode 100644 index 0000000..b2df4e7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/owner.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Owner{ + + name; + id; + email; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the email + * @returns {String} A String representing the email + */ + getEmail() { + return this.email; + + } + + /** + * The method to set the value to email + * @param {String} email A String representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: String", null, null); + } + this.email = email; + this.keyModified.set("email", 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 { + Owner as MasterModel, + Owner as Owner +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/pin_fields.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/pin_fields.js new file mode 100644 index 0000000..78301a7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/pin_fields.js @@ -0,0 +1,90 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class PinFields{ + + apiName; + pin; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the pin + * @returns {Choice} An instance of Choice + */ + getPin() { + return this.pin; + + } + + /** + * The method to set the value to pin + * @param {Choice} pin An instance of Choice + */ + setPin(pin) { + if((pin != null) && (!(pin instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pin EXPECTED TYPE: Choice", null, null); + } + this.pin = pin; + this.keyModified.set("_pin", 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 { + PinFields as MasterModel, + PinFields as PinFields +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/pin_unpin_fields.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/pin_unpin_fields.js new file mode 100644 index 0000000..03dce40 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/pin_unpin_fields.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class PinUnpinFields{ + + fields; + keyModified = new Map(); + /** + * The method to get the fields + * @returns {Array} An Array representing the fields + */ + getFields() { + return this.fields; + + } + + /** + * The method to set the value to fields + * @param {Array} fields An Array representing the fields + */ + setFields(fields) { + if((fields != null) && (!(Object.prototype.toString.call(fields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: Array", null, null); + } + this.fields = fields; + this.keyModified.set("fields", 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 { + PinUnpinFields as MasterModel, + PinUnpinFields as PinUnpinFields +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/shared_to.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/shared_to.js new file mode 100644 index 0000000..5258d5b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/shared_to.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SharedTo{ + + type; + name; + id; + subordinates; + keyModified = new Map(); + /** + * The method to get the type + * @returns {Choice} An instance of Choice + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {Choice} type An instance of Choice + */ + setType(type) { + if((type != null) && (!(type instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: Choice", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the subordinates + * @returns {Boolean} A Boolean representing the subordinates + */ + getSubordinates() { + return this.subordinates; + + } + + /** + * The method to set the value to subordinates + * @param {Boolean} subordinates A Boolean representing the subordinates + */ + setSubordinates(subordinates) { + if((subordinates != null) && (!(Object.prototype.toString.call(subordinates) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subordinates EXPECTED TYPE: Boolean", null, null); + } + this.subordinates = subordinates; + this.keyModified.set("subordinates", 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 { + SharedTo as MasterModel, + SharedTo as SharedTo +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/sort_by.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/sort_by.js new file mode 100644 index 0000000..aa84540 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/sort_by.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SortBy{ + + id; + apiName; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 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 { + SortBy as MasterModel, + SortBy as SortBy +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/success_response.js new file mode 100644 index 0000000..e8b71a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/translation.js b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/translation.js new file mode 100644 index 0000000..8561d12 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/custom_views/translation.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Translation{ + + publicViews; + otherUsersViews; + sharedWithMe; + createdByMe; + keyModified = new Map(); + /** + * The method to get the publicViews + * @returns {String} A String representing the publicViews + */ + getPublicViews() { + return this.publicViews; + + } + + /** + * The method to set the value to publicViews + * @param {String} publicViews A String representing the publicViews + */ + setPublicViews(publicViews) { + if((publicViews != null) && (!(Object.prototype.toString.call(publicViews) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: publicViews EXPECTED TYPE: String", null, null); + } + this.publicViews = publicViews; + this.keyModified.set("public_views", 1); + + } + + /** + * The method to get the otherUsersViews + * @returns {String} A String representing the otherUsersViews + */ + getOtherUsersViews() { + return this.otherUsersViews; + + } + + /** + * The method to set the value to otherUsersViews + * @param {String} otherUsersViews A String representing the otherUsersViews + */ + setOtherUsersViews(otherUsersViews) { + if((otherUsersViews != null) && (!(Object.prototype.toString.call(otherUsersViews) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: otherUsersViews EXPECTED TYPE: String", null, null); + } + this.otherUsersViews = otherUsersViews; + this.keyModified.set("other_users_views", 1); + + } + + /** + * The method to get the sharedWithMe + * @returns {String} A String representing the sharedWithMe + */ + getSharedWithMe() { + return this.sharedWithMe; + + } + + /** + * The method to set the value to sharedWithMe + * @param {String} sharedWithMe A String representing the sharedWithMe + */ + setSharedWithMe(sharedWithMe) { + if((sharedWithMe != null) && (!(Object.prototype.toString.call(sharedWithMe) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sharedWithMe EXPECTED TYPE: String", null, null); + } + this.sharedWithMe = sharedWithMe; + this.keyModified.set("shared_with_me", 1); + + } + + /** + * The method to get the createdByMe + * @returns {String} A String representing the createdByMe + */ + getCreatedByMe() { + return this.createdByMe; + + } + + /** + * The method to set the value to createdByMe + * @param {String} createdByMe A String representing the createdByMe + */ + setCreatedByMe(createdByMe) { + if((createdByMe != null) && (!(Object.prototype.toString.call(createdByMe) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdByMe EXPECTED TYPE: String", null, null); + } + this.createdByMe = createdByMe; + this.keyModified.set("created_by_me", 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 { + Translation as MasterModel, + Translation as Translation +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/action_wrapper.js new file mode 100644 index 0000000..6996d19 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/api_exception.js new file mode 100644 index 0000000..eef1972 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/body_wrapper.js new file mode 100644 index 0000000..9385520 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/body_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + data; + info; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/contact_role.js b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/contact_role.js new file mode 100644 index 0000000..4fcdb74 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/contact_role.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ContactRole{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + ContactRole as MasterModel, + ContactRole as ContactRole +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/data.js b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/data.js new file mode 100644 index 0000000..9de4f4f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/data.js @@ -0,0 +1,182 @@ +import {Record} from "../record/record.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Data extends Record{ + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.getKeyValue("id"); + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.addKeyValue("id", id); + + } + + /** + * The method to get the contactRole + * @returns {ContactRole} An instance of ContactRole + */ + getContactRole() { + return this.getKeyValue("Contact_Role"); + + } + + /** + * The method to set the value to contactRole + * @param {ContactRole} contactRole An instance of ContactRole + */ + async setContactRole(contactRole) { + const ContactRole = (await (import("./contact_role.js"))).MasterModel; + if((contactRole != null) && (!(contactRole instanceof ContactRole))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: contactRole EXPECTED TYPE: ContactRole", null, null); + } + this.addKeyValue("Contact_Role", contactRole); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.getKeyValue("Created_By"); + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Created_By", createdBy); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.getKeyValue("Created_Time"); + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Created_Time", createdTime); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.getKeyValue("Modified_By"); + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Modified_By", modifiedBy); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.getKeyValue("Modified_Time"); + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Modified_Time", modifiedTime); + + } + + /** + * The method to get the tag + * @returns {Array} An Array representing the tag + */ + getTag() { + return this.getKeyValue("Tag"); + + } + + /** + * The method to set the value to tag + * @param {Array} tag An Array representing the tag + */ + setTag(tag) { + if((tag != null) && (!(Object.prototype.toString.call(tag) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tag EXPECTED TYPE: Array", null, null); + } + this.addKeyValue("Tag", tag); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.getKeyValue("name"); + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.addKeyValue("name", name); + + } + +} +export { + Data as MasterModel, + Data as Data +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/deal_contact_roles_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/deal_contact_roles_operations.js new file mode 100644 index 0000000..5e4d2ca --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/deal_contact_roles_operations.js @@ -0,0 +1,150 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +import {APIResponse} from "../../../../../../routes/controllers/api_response.js"; +import {CommonAPIHandler} from "../../../../../../routes/middlewares/common_api_handler.js"; +import {Utility} from "../../../../../../utils/util/utility.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; +import {createRequire} from "node:module"; + +class DealContactRolesOperations{ + /** + * The method to get associated contact roles + * @param {BigInt} deal A BigInt representing the deal + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getAssociatedContactRoles(deal, paramInstance=null) { + if((!(Object.prototype.toString.call(deal) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deal EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Deals/"); + apiPath = apiPath.concat(deal.toString()); + apiPath = apiPath.concat("/Contact_Roles"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + handlerInstance.setModuleAPIName("Contacts"); + await Utility.getFields("Contacts", handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to get associated contact roles specific to contact + * @param {BigInt} contact A BigInt representing the contact + * @param {BigInt} deal A BigInt representing the deal + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getAssociatedContactRolesSpecificToContact(contact, deal) { + if((!(Object.prototype.toString.call(contact) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: contact EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(deal) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deal EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Deals/"); + apiPath = apiPath.concat(deal.toString()); + apiPath = apiPath.concat("/Contact_Roles/"); + apiPath = apiPath.concat(contact.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setModuleAPIName("Contacts"); + await Utility.getFields("Contacts", handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to associate contact role to deal + * @param {BigInt} contact A BigInt representing the contact + * @param {BigInt} deal A BigInt representing the deal + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async associateContactRoleToDeal(contact, deal, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(contact) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: contact EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(deal) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deal EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Deals/"); + apiPath = apiPath.concat(deal.toString()); + apiPath = apiPath.concat("/Contact_Roles/"); + apiPath = apiPath.concat(contact.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete contact role realation + * @param {BigInt} contact A BigInt representing the contact + * @param {BigInt} deal A BigInt representing the deal + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteContactRoleRealation(contact, deal) { + if((!(Object.prototype.toString.call(contact) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: contact EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(deal) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deal EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Deals/"); + apiPath = apiPath.concat(deal.toString()); + apiPath = apiPath.concat("/Contact_Roles/"); + apiPath = apiPath.concat(contact.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class GetAssociatedContactRolesParam{ + + static IDS = new Param("ids", "com.zoho.crm.api.DealContactRoles.GetAssociatedContactRolesParam"); + static FIELDS = new Param("fields", "com.zoho.crm.api.DealContactRoles.GetAssociatedContactRolesParam"); +} + +export { + GetAssociatedContactRolesParam as GetAssociatedContactRolesParam, + DealContactRolesOperations as MasterModel, + DealContactRolesOperations as DealContactRolesOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/error_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/error_details.js new file mode 100644 index 0000000..bd8bb0c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/error_details.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ErrorDetails{ + + apiName; + jsonPath; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the jsonPath + * @returns {String} A String representing the jsonPath + */ + getJsonPath() { + return this.jsonPath; + + } + + /** + * The method to set the value to jsonPath + * @param {String} jsonPath A String representing the jsonPath + */ + setJsonPath(jsonPath) { + if((jsonPath != null) && (!(Object.prototype.toString.call(jsonPath) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jsonPath EXPECTED TYPE: String", null, null); + } + this.jsonPath = jsonPath; + this.keyModified.set("json_path", 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 { + ErrorDetails as MasterModel, + ErrorDetails as ErrorDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/import_deal_contact_roles.js b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/import_deal_contact_roles.js new file mode 100644 index 0000000..56d7c2d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/import_deal_contact_roles.js @@ -0,0 +1,13 @@ +export * as ResponseHandler from "./response_handler.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { ContactRole } from "./contact_role.js"; +export { Info } from "./info.js"; +export { SuccessResponse } from "./success_response.js"; +export { DealContactRolesOperations } from "./deal_contact_roles_operations.js"; +export { GetAssociatedContactRolesParam } from "./deal_contact_roles_operations.js"; +export { ErrorDetails } from "./error_details.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export * as ActionResponse from "./action_response.js"; +export { Data } from "./data.js"; +export * as ActionHandler from "./action_handler.js"; +export { APIException } from "./api_exception.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/info.js new file mode 100644 index 0000000..e994277 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/info.js @@ -0,0 +1,204 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + count; + page; + perPage; + moreRecords; + previousPageToken; + pageTokenExpiry; + nextPageToken; + keyModified = new Map(); + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 1); + + } + + /** + * The method to get the previousPageToken + * @returns {String} A String representing the previousPageToken + */ + getPreviousPageToken() { + return this.previousPageToken; + + } + + /** + * The method to set the value to previousPageToken + * @param {String} previousPageToken A String representing the previousPageToken + */ + setPreviousPageToken(previousPageToken) { + if((previousPageToken != null) && (!(Object.prototype.toString.call(previousPageToken) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: previousPageToken EXPECTED TYPE: String", null, null); + } + this.previousPageToken = previousPageToken; + this.keyModified.set("previous_page_token", 1); + + } + + /** + * The method to get the pageTokenExpiry + * @returns {String} A String representing the pageTokenExpiry + */ + getPageTokenExpiry() { + return this.pageTokenExpiry; + + } + + /** + * The method to set the value to pageTokenExpiry + * @param {String} pageTokenExpiry A String representing the pageTokenExpiry + */ + setPageTokenExpiry(pageTokenExpiry) { + if((pageTokenExpiry != null) && (!(Object.prototype.toString.call(pageTokenExpiry) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pageTokenExpiry EXPECTED TYPE: String", null, null); + } + this.pageTokenExpiry = pageTokenExpiry; + this.keyModified.set("page_token_expiry", 1); + + } + + /** + * The method to get the nextPageToken + * @returns {String} A String representing the nextPageToken + */ + getNextPageToken() { + return this.nextPageToken; + + } + + /** + * The method to set the value to nextPageToken + * @param {String} nextPageToken A String representing the nextPageToken + */ + setNextPageToken(nextPageToken) { + if((nextPageToken != null) && (!(Object.prototype.toString.call(nextPageToken) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: nextPageToken EXPECTED TYPE: String", null, null); + } + this.nextPageToken = nextPageToken; + this.keyModified.set("next_page_token", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/success_response.js new file mode 100644 index 0000000..e8b71a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/deal_contact_roles/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/definition/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/definition/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/definition/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/definition/definition.js b/versions/3.0.0/lib/core/com/zoho/crm/api/definition/definition.js new file mode 100644 index 0000000..d6fec9f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/definition/definition.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Definition{ + + rootElementName; + extradetails; + properties; + keyModified = new Map(); + /** + * The method to get the rootElementName + * @returns {String} A String representing the rootElementName + */ + getRootElementName() { + return this.rootElementName; + + } + + /** + * The method to set the value to rootElementName + * @param {String} rootElementName A String representing the rootElementName + */ + setRootElementName(rootElementName) { + if((rootElementName != null) && (!(Object.prototype.toString.call(rootElementName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: rootElementName EXPECTED TYPE: String", null, null); + } + this.rootElementName = rootElementName; + this.keyModified.set("root_element_name", 1); + + } + + /** + * The method to get the extradetails + * @returns {Map} A Map representing the extradetails + */ + getExtradetails() { + return this.extradetails; + + } + + /** + * The method to set the value to extradetails + * @param {Map} extradetails A Map representing the extradetails + */ + setExtradetails(extradetails) { + if((extradetails != null) && (!(Object.prototype.toString.call(extradetails) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: extradetails EXPECTED TYPE: Map", null, null); + } + this.extradetails = extradetails; + this.keyModified.set("extraDetails", 1); + + } + + /** + * The method to get the properties + * @returns {Array} An Array representing the properties + */ + getProperties() { + return this.properties; + + } + + /** + * The method to set the value to properties + * @param {Array} properties An Array representing the properties + */ + setProperties(properties) { + if((properties != null) && (!(Object.prototype.toString.call(properties) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: properties EXPECTED TYPE: Array", null, null); + } + this.properties = properties; + this.keyModified.set("properties", 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 { + Definition as MasterModel, + Definition as Definition +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/definition/import_definition.js b/versions/3.0.0/lib/core/com/zoho/crm/api/definition/import_definition.js new file mode 100644 index 0000000..68e3d55 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/definition/import_definition.js @@ -0,0 +1,6 @@ +export { APIException } from "./api_exception.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { MinifiedProperty1 } from "./minified_property1.js"; +export { Property } from "./property.js"; +export { MinifiedProperty } from "./minified_property.js"; +export { Definition } from "./definition.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/definition/minified_property.js b/versions/3.0.0/lib/core/com/zoho/crm/api/definition/minified_property.js new file mode 100644 index 0000000..3de04c2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/definition/minified_property.js @@ -0,0 +1,181 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MinifiedProperty{ + + readOnly; + apiName; + dataType; + length; + required; + properties; + keyModified = new Map(); + /** + * The method to get the readOnly + * @returns {Boolean} A Boolean representing the readOnly + */ + getReadOnly() { + return this.readOnly; + + } + + /** + * The method to set the value to readOnly + * @param {Boolean} readOnly A Boolean representing the readOnly + */ + setReadOnly(readOnly) { + if((readOnly != null) && (!(Object.prototype.toString.call(readOnly) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: readOnly EXPECTED TYPE: Boolean", null, null); + } + this.readOnly = readOnly; + this.keyModified.set("read_only", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the dataType + * @returns {String} A String representing the dataType + */ + getDataType() { + return this.dataType; + + } + + /** + * The method to set the value to dataType + * @param {String} dataType A String representing the dataType + */ + setDataType(dataType) { + if((dataType != null) && (!(Object.prototype.toString.call(dataType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dataType EXPECTED TYPE: String", null, null); + } + this.dataType = dataType; + this.keyModified.set("data_type", 1); + + } + + /** + * The method to get the length + * @returns {number} A number representing the length + */ + getLength() { + return this.length; + + } + + /** + * The method to set the value to length + * @param {number} length A number representing the length + */ + setLength(length) { + if((length != null) && (!(Object.prototype.toString.call(length) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: length EXPECTED TYPE: number", null, null); + } + this.length = length; + this.keyModified.set("length", 1); + + } + + /** + * The method to get the required + * @returns {Boolean} A Boolean representing the required + */ + getRequired() { + return this.required; + + } + + /** + * The method to set the value to required + * @param {Boolean} required A Boolean representing the required + */ + setRequired(required) { + if((required != null) && (!(Object.prototype.toString.call(required) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: required EXPECTED TYPE: Boolean", null, null); + } + this.required = required; + this.keyModified.set("required", 1); + + } + + /** + * The method to get the properties + * @returns {Array} An Array representing the properties + */ + getProperties() { + return this.properties; + + } + + /** + * The method to set the value to properties + * @param {Array} properties An Array representing the properties + */ + setProperties(properties) { + if((properties != null) && (!(Object.prototype.toString.call(properties) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: properties EXPECTED TYPE: Array", null, null); + } + this.properties = properties; + this.keyModified.set("properties", 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 { + MinifiedProperty as MasterModel, + MinifiedProperty as MinifiedProperty +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/definition/minified_property1.js b/versions/3.0.0/lib/core/com/zoho/crm/api/definition/minified_property1.js new file mode 100644 index 0000000..81f12b9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/definition/minified_property1.js @@ -0,0 +1,158 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MinifiedProperty1{ + + readOnly; + apiName; + dataType; + length; + required; + keyModified = new Map(); + /** + * The method to get the readOnly + * @returns {Boolean} A Boolean representing the readOnly + */ + getReadOnly() { + return this.readOnly; + + } + + /** + * The method to set the value to readOnly + * @param {Boolean} readOnly A Boolean representing the readOnly + */ + setReadOnly(readOnly) { + if((readOnly != null) && (!(Object.prototype.toString.call(readOnly) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: readOnly EXPECTED TYPE: Boolean", null, null); + } + this.readOnly = readOnly; + this.keyModified.set("read_only", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the dataType + * @returns {String} A String representing the dataType + */ + getDataType() { + return this.dataType; + + } + + /** + * The method to set the value to dataType + * @param {String} dataType A String representing the dataType + */ + setDataType(dataType) { + if((dataType != null) && (!(Object.prototype.toString.call(dataType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dataType EXPECTED TYPE: String", null, null); + } + this.dataType = dataType; + this.keyModified.set("data_type", 1); + + } + + /** + * The method to get the length + * @returns {number} A number representing the length + */ + getLength() { + return this.length; + + } + + /** + * The method to set the value to length + * @param {number} length A number representing the length + */ + setLength(length) { + if((length != null) && (!(Object.prototype.toString.call(length) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: length EXPECTED TYPE: number", null, null); + } + this.length = length; + this.keyModified.set("length", 1); + + } + + /** + * The method to get the required + * @returns {Boolean} A Boolean representing the required + */ + getRequired() { + return this.required; + + } + + /** + * The method to set the value to required + * @param {Boolean} required A Boolean representing the required + */ + setRequired(required) { + if((required != null) && (!(Object.prototype.toString.call(required) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: required EXPECTED TYPE: Boolean", null, null); + } + this.required = required; + this.keyModified.set("required", 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 { + MinifiedProperty1 as MasterModel, + MinifiedProperty1 as MinifiedProperty1 +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/definition/property.js b/versions/3.0.0/lib/core/com/zoho/crm/api/definition/property.js new file mode 100644 index 0000000..a4c65cb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/definition/property.js @@ -0,0 +1,319 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Property{ + + displayLabel; + allowedValues; + uiType; + regex; + readOnly; + apiName; + fieldLabel; + dataType; + length; + availableInUserLayout; + required; + properties; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the allowedValues + * @returns {Array} An Array representing the allowedValues + */ + getAllowedValues() { + return this.allowedValues; + + } + + /** + * The method to set the value to allowedValues + * @param {Array} allowedValues An Array representing the allowedValues + */ + setAllowedValues(allowedValues) { + if((allowedValues != null) && (!(Object.prototype.toString.call(allowedValues) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: allowedValues EXPECTED TYPE: Array", null, null); + } + this.allowedValues = allowedValues; + this.keyModified.set("allowed_values", 1); + + } + + /** + * The method to get the uiType + * @returns {number} A number representing the uiType + */ + getUiType() { + return this.uiType; + + } + + /** + * The method to set the value to uiType + * @param {number} uiType A number representing the uiType + */ + setUiType(uiType) { + if((uiType != null) && (!(Object.prototype.toString.call(uiType) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: uiType EXPECTED TYPE: number", null, null); + } + this.uiType = uiType; + this.keyModified.set("ui_type", 1); + + } + + /** + * The method to get the regex + * @returns {String} A String representing the regex + */ + getRegex() { + return this.regex; + + } + + /** + * The method to set the value to regex + * @param {String} regex A String representing the regex + */ + setRegex(regex) { + if((regex != null) && (!(Object.prototype.toString.call(regex) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: regex EXPECTED TYPE: String", null, null); + } + this.regex = regex; + this.keyModified.set("regex", 1); + + } + + /** + * The method to get the readOnly + * @returns {Boolean} A Boolean representing the readOnly + */ + getReadOnly() { + return this.readOnly; + + } + + /** + * The method to set the value to readOnly + * @param {Boolean} readOnly A Boolean representing the readOnly + */ + setReadOnly(readOnly) { + if((readOnly != null) && (!(Object.prototype.toString.call(readOnly) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: readOnly EXPECTED TYPE: Boolean", null, null); + } + this.readOnly = readOnly; + this.keyModified.set("read_only", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the fieldLabel + * @returns {String} A String representing the fieldLabel + */ + getFieldLabel() { + return this.fieldLabel; + + } + + /** + * The method to set the value to fieldLabel + * @param {String} fieldLabel A String representing the fieldLabel + */ + setFieldLabel(fieldLabel) { + if((fieldLabel != null) && (!(Object.prototype.toString.call(fieldLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldLabel EXPECTED TYPE: String", null, null); + } + this.fieldLabel = fieldLabel; + this.keyModified.set("field_label", 1); + + } + + /** + * The method to get the dataType + * @returns {String} A String representing the dataType + */ + getDataType() { + return this.dataType; + + } + + /** + * The method to set the value to dataType + * @param {String} dataType A String representing the dataType + */ + setDataType(dataType) { + if((dataType != null) && (!(Object.prototype.toString.call(dataType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dataType EXPECTED TYPE: String", null, null); + } + this.dataType = dataType; + this.keyModified.set("data_type", 1); + + } + + /** + * The method to get the length + * @returns {number} A number representing the length + */ + getLength() { + return this.length; + + } + + /** + * The method to set the value to length + * @param {number} length A number representing the length + */ + setLength(length) { + if((length != null) && (!(Object.prototype.toString.call(length) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: length EXPECTED TYPE: number", null, null); + } + this.length = length; + this.keyModified.set("length", 1); + + } + + /** + * The method to get the availableInUserLayout + * @returns {Boolean} A Boolean representing the availableInUserLayout + */ + getAvailableInUserLayout() { + return this.availableInUserLayout; + + } + + /** + * The method to set the value to availableInUserLayout + * @param {Boolean} availableInUserLayout A Boolean representing the availableInUserLayout + */ + setAvailableInUserLayout(availableInUserLayout) { + if((availableInUserLayout != null) && (!(Object.prototype.toString.call(availableInUserLayout) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: availableInUserLayout EXPECTED TYPE: Boolean", null, null); + } + this.availableInUserLayout = availableInUserLayout; + this.keyModified.set("available_in_user_layout", 1); + + } + + /** + * The method to get the required + * @returns {Boolean} A Boolean representing the required + */ + getRequired() { + return this.required; + + } + + /** + * The method to set the value to required + * @param {Boolean} required A Boolean representing the required + */ + setRequired(required) { + if((required != null) && (!(Object.prototype.toString.call(required) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: required EXPECTED TYPE: Boolean", null, null); + } + this.required = required; + this.keyModified.set("required", 1); + + } + + /** + * The method to get the properties + * @returns {Array} An Array representing the properties + */ + getProperties() { + return this.properties; + + } + + /** + * The method to set the value to properties + * @param {Array} properties An Array representing the properties + */ + setProperties(properties) { + if((properties != null) && (!(Object.prototype.toString.call(properties) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: properties EXPECTED TYPE: Array", null, null); + } + this.properties = properties; + this.keyModified.set("properties", 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 { + Property as MasterModel, + Property as Property +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/definition/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/definition/response_wrapper.js new file mode 100644 index 0000000..c4f2a74 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/definition/response_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + definition; + keyModified = new Map(); + /** + * The method to get the definition + * @returns {Definition} An instance of Definition + */ + getDefinition() { + return this.definition; + + } + + /** + * The method to set the value to definition + * @param {Definition} definition An instance of Definition + */ + async setDefinition(definition) { + const Definition = (await (import("./definition.js"))).MasterModel; + if((definition != null) && (!(definition instanceof Definition))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: definition EXPECTED TYPE: Definition", null, null); + } + this.definition = definition; + this.keyModified.set("definition", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/download_attachments_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/download_attachments_operations.js new file mode 100644 index 0000000..7e88b99 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/download_attachments_operations.js @@ -0,0 +1,56 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 DownloadAttachmentsOperations{ + /** + * The method to get download attachments details + * @param {BigInt} recordId A BigInt representing the recordId + * @param {String} module A String representing the module + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getDownloadAttachmentsDetails(recordId, module, paramInstance=null) { + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/Emails/actions/download_attachments"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "multipart/form-data"); + + } + +} +class GetDownloadAttachmentsDetailsParam{ + + static USER_ID = new Param("user_id", "com.zoho.crm.api.DownloadAttachments.GetDownloadAttachmentsDetailsParam"); + static MESSAGE_ID = new Param("message_id", "com.zoho.crm.api.DownloadAttachments.GetDownloadAttachmentsDetailsParam"); +} + +export { + DownloadAttachmentsOperations as MasterModel, + DownloadAttachmentsOperations as DownloadAttachmentsOperations, + GetDownloadAttachmentsDetailsParam as GetDownloadAttachmentsDetailsParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/file_body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/file_body_wrapper.js new file mode 100644 index 0000000..ac3a3e4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/file_body_wrapper.js @@ -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 +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/import_download_attachments.js b/versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/import_download_attachments.js new file mode 100644 index 0000000..2cbf4a5 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/import_download_attachments.js @@ -0,0 +1,5 @@ +export * as ResponseHandler from "./response_handler.js"; +export { FileBodyWrapper } from "./file_body_wrapper.js"; +export { APIException } from "./api_exception.js"; +export { DownloadAttachmentsOperations } from "./download_attachments_operations.js"; +export { GetDownloadAttachmentsDetailsParam } from "./download_attachments_operations.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/download_attachments/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/download_inline_images_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/download_inline_images_operations.js new file mode 100644 index 0000000..0882bb7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/download_inline_images_operations.js @@ -0,0 +1,57 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 DownloadInlineImagesOperations{ + /** + * The method to get download inline images + * @param {BigInt} recordId A BigInt representing the recordId + * @param {String} module A String representing the module + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getDownloadInlineImages(recordId, module, paramInstance=null) { + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/Emails/actions/download_inline_images"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "multipart/form-data"); + + } + +} +class GetDownloadInlineImagesParam{ + + static USER_ID = new Param("user_id", "com.zoho.crm.api.DownloadInlineImages.GetDownloadInlineImagesParam"); + static MESSAGE_ID = new Param("message_id", "com.zoho.crm.api.DownloadInlineImages.GetDownloadInlineImagesParam"); + static ID = new Param("id", "com.zoho.crm.api.DownloadInlineImages.GetDownloadInlineImagesParam"); +} + +export { + GetDownloadInlineImagesParam as GetDownloadInlineImagesParam, + DownloadInlineImagesOperations as MasterModel, + DownloadInlineImagesOperations as DownloadInlineImagesOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/file_body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/file_body_wrapper.js new file mode 100644 index 0000000..ac3a3e4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/file_body_wrapper.js @@ -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 +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/import_download_inline_images.js b/versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/import_download_inline_images.js new file mode 100644 index 0000000..435e071 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/import_download_inline_images.js @@ -0,0 +1,5 @@ +export { FileBodyWrapper } from "./file_body_wrapper.js"; +export { DownloadInlineImagesOperations } from "./download_inline_images_operations.js"; +export { GetDownloadInlineImagesParam } from "./download_inline_images_operations.js"; +export { APIException } from "./api_exception.js"; +export * as ResponseHandler from "./response_handler.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/download_inline_images/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/compose_settings.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/compose_settings.js new file mode 100644 index 0000000..bc1a26a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/compose_settings.js @@ -0,0 +1,136 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ComposeSettings{ + + defaultFromAddress; + fontSize; + fontFamily; + emailSignatures; + keyModified = new Map(); + /** + * The method to get the defaultFromAddress + * @returns {DefaultForm} An instance of DefaultForm + */ + getDefaultFromAddress() { + return this.defaultFromAddress; + + } + + /** + * The method to set the value to defaultFromAddress + * @param {DefaultForm} defaultFromAddress An instance of DefaultForm + */ + async setDefaultFromAddress(defaultFromAddress) { + const DefaultForm = (await (import("./default_form.js"))).MasterModel; + if((defaultFromAddress != null) && (!(defaultFromAddress instanceof DefaultForm))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: defaultFromAddress EXPECTED TYPE: DefaultForm", null, null); + } + this.defaultFromAddress = defaultFromAddress; + this.keyModified.set("default_from_address", 1); + + } + + /** + * The method to get the fontSize + * @returns {number} A number representing the fontSize + */ + getFontSize() { + return this.fontSize; + + } + + /** + * The method to set the value to fontSize + * @param {number} fontSize A number representing the fontSize + */ + setFontSize(fontSize) { + if((fontSize != null) && (!(Object.prototype.toString.call(fontSize) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fontSize EXPECTED TYPE: number", null, null); + } + this.fontSize = fontSize; + this.keyModified.set("font_size", 1); + + } + + /** + * The method to get the fontFamily + * @returns {String} A String representing the fontFamily + */ + getFontFamily() { + return this.fontFamily; + + } + + /** + * The method to set the value to fontFamily + * @param {String} fontFamily A String representing the fontFamily + */ + setFontFamily(fontFamily) { + if((fontFamily != null) && (!(Object.prototype.toString.call(fontFamily) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fontFamily EXPECTED TYPE: String", null, null); + } + this.fontFamily = fontFamily; + this.keyModified.set("font_family", 1); + + } + + /** + * The method to get the emailSignatures + * @returns {Array} An Array representing the emailSignatures + */ + getEmailSignatures() { + return this.emailSignatures; + + } + + /** + * The method to set the value to emailSignatures + * @param {Array} emailSignatures An Array representing the emailSignatures + */ + setEmailSignatures(emailSignatures) { + if((emailSignatures != null) && (!(Object.prototype.toString.call(emailSignatures) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: emailSignatures EXPECTED TYPE: Array", null, null); + } + this.emailSignatures = emailSignatures; + this.keyModified.set("email_signatures", 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 { + ComposeSettings as MasterModel, + ComposeSettings as ComposeSettings +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/data.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/data.js new file mode 100644 index 0000000..6a93038 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/data.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Data{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + Data as MasterModel, + Data as Data +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/data_map.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/data_map.js new file mode 100644 index 0000000..e2be4d5 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/data_map.js @@ -0,0 +1,184 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DataMap{ + + user; + featuresAvailable; + fromAddress; + relayDomains; + mergefieldsdata; + defaultFrom; + keyModified = new Map(); + /** + * The method to get the user + * @returns {User} An instance of User + */ + getUser() { + return this.user; + + } + + /** + * The method to set the value to user + * @param {User} user An instance of User + */ + async setUser(user) { + const User = (await (import("./user.js"))).MasterModel; + if((user != null) && (!(user instanceof User))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: user EXPECTED TYPE: User", null, null); + } + this.user = user; + this.keyModified.set("user", 1); + + } + + /** + * The method to get the featuresAvailable + * @returns {FeaturesAvailable} An instance of FeaturesAvailable + */ + getFeaturesAvailable() { + return this.featuresAvailable; + + } + + /** + * The method to set the value to featuresAvailable + * @param {FeaturesAvailable} featuresAvailable An instance of FeaturesAvailable + */ + async setFeaturesAvailable(featuresAvailable) { + const FeaturesAvailable = (await (import("./features_available.js"))).MasterModel; + if((featuresAvailable != null) && (!(featuresAvailable instanceof FeaturesAvailable))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: featuresAvailable EXPECTED TYPE: FeaturesAvailable", null, null); + } + this.featuresAvailable = featuresAvailable; + this.keyModified.set("features_available", 1); + + } + + /** + * The method to get the fromAddress + * @returns {Array} An Array representing the fromAddress + */ + getFromAddress() { + return this.fromAddress; + + } + + /** + * The method to set the value to fromAddress + * @param {Array} fromAddress An Array representing the fromAddress + */ + setFromAddress(fromAddress) { + if((fromAddress != null) && (!(Object.prototype.toString.call(fromAddress) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fromAddress EXPECTED TYPE: Array", null, null); + } + this.fromAddress = fromAddress; + this.keyModified.set("from_address", 1); + + } + + /** + * The method to get the relayDomains + * @returns {Array} An Array representing the relayDomains + */ + getRelayDomains() { + return this.relayDomains; + + } + + /** + * The method to set the value to relayDomains + * @param {Array} relayDomains An Array representing the relayDomains + */ + setRelayDomains(relayDomains) { + if((relayDomains != null) && (!(Object.prototype.toString.call(relayDomains) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: relayDomains EXPECTED TYPE: Array", null, null); + } + this.relayDomains = relayDomains; + this.keyModified.set("relay_domains", 1); + + } + + /** + * The method to get the mergefieldsdata + * @returns {String} A String representing the mergefieldsdata + */ + getMergefieldsdata() { + return this.mergefieldsdata; + + } + + /** + * The method to set the value to mergefieldsdata + * @param {String} mergefieldsdata A String representing the mergefieldsdata + */ + setMergefieldsdata(mergefieldsdata) { + if((mergefieldsdata != null) && (!(Object.prototype.toString.call(mergefieldsdata) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: mergefieldsdata EXPECTED TYPE: String", null, null); + } + this.mergefieldsdata = mergefieldsdata; + this.keyModified.set("mergeFieldsData", 1); + + } + + /** + * The method to get the defaultFrom + * @returns {DefaultForm} An instance of DefaultForm + */ + getDefaultFrom() { + return this.defaultFrom; + + } + + /** + * The method to set the value to defaultFrom + * @param {DefaultForm} defaultFrom An instance of DefaultForm + */ + async setDefaultFrom(defaultFrom) { + const DefaultForm = (await (import("./default_form.js"))).MasterModel; + if((defaultFrom != null) && (!(defaultFrom instanceof DefaultForm))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: defaultFrom EXPECTED TYPE: DefaultForm", null, null); + } + this.defaultFrom = defaultFrom; + this.keyModified.set("default_from", 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 { + DataMap as MasterModel, + DataMap as DataMap +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/default_form.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/default_form.js new file mode 100644 index 0000000..204b5c1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/default_form.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DefaultForm{ + + default1; + userName; + type; + email; + keyModified = new Map(); + /** + * The method to get the default + * @returns {Boolean} A Boolean representing the default1 + */ + getDefault() { + return this.default1; + + } + + /** + * The method to set the value to default + * @param {Boolean} default1 A Boolean representing the default1 + */ + setDefault(default1) { + if((default1 != null) && (!(Object.prototype.toString.call(default1) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: default1 EXPECTED TYPE: Boolean", null, null); + } + this.default1 = default1; + this.keyModified.set("default", 1); + + } + + /** + * The method to get the userName + * @returns {String} A String representing the userName + */ + getUserName() { + return this.userName; + + } + + /** + * The method to set the value to userName + * @param {String} userName A String representing the userName + */ + setUserName(userName) { + if((userName != null) && (!(Object.prototype.toString.call(userName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: userName EXPECTED TYPE: String", null, null); + } + this.userName = userName; + this.keyModified.set("user_name", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the email + * @returns {String} A String representing the email + */ + getEmail() { + return this.email; + + } + + /** + * The method to set the value to email + * @param {String} email A String representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: String", null, null); + } + this.email = email; + this.keyModified.set("email", 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 { + DefaultForm as MasterModel, + DefaultForm as DefaultForm +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/features_available.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/features_available.js new file mode 100644 index 0000000..ae5ad16 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/features_available.js @@ -0,0 +1,412 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class FeaturesAvailable{ + + zsurveyEnabled; + inlineComposeWindow; + scheduleMail; + emailCloudPicker; + formIntegrationEnabled; + isprivacyenabled; + autoSuggestion; + unsubscribeLink; + bestTimeToContact; + attachTeamdrive; + islivedeskenabled; + subjectLineSuggestion; + emailPreference; + attachment; + mandateunsublink; + oldComposeRevert; + keyModified = new Map(); + /** + * The method to get the zsurveyEnabled + * @returns {Choice} An instance of Choice + */ + getZsurveyEnabled() { + return this.zsurveyEnabled; + + } + + /** + * The method to set the value to zsurveyEnabled + * @param {Choice} zsurveyEnabled An instance of Choice + */ + setZsurveyEnabled(zsurveyEnabled) { + if((zsurveyEnabled != null) && (!(zsurveyEnabled instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: zsurveyEnabled EXPECTED TYPE: Choice", null, null); + } + this.zsurveyEnabled = zsurveyEnabled; + this.keyModified.set("zsurvey_enabled", 1); + + } + + /** + * The method to get the inlineComposeWindow + * @returns {Choice} An instance of Choice + */ + getInlineComposeWindow() { + return this.inlineComposeWindow; + + } + + /** + * The method to set the value to inlineComposeWindow + * @param {Choice} inlineComposeWindow An instance of Choice + */ + setInlineComposeWindow(inlineComposeWindow) { + if((inlineComposeWindow != null) && (!(inlineComposeWindow instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: inlineComposeWindow EXPECTED TYPE: Choice", null, null); + } + this.inlineComposeWindow = inlineComposeWindow; + this.keyModified.set("inline_compose_window", 1); + + } + + /** + * The method to get the scheduleMail + * @returns {Choice} An instance of Choice + */ + getScheduleMail() { + return this.scheduleMail; + + } + + /** + * The method to set the value to scheduleMail + * @param {Choice} scheduleMail An instance of Choice + */ + setScheduleMail(scheduleMail) { + if((scheduleMail != null) && (!(scheduleMail instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: scheduleMail EXPECTED TYPE: Choice", null, null); + } + this.scheduleMail = scheduleMail; + this.keyModified.set("Schedule_Mail", 1); + + } + + /** + * The method to get the emailCloudPicker + * @returns {Choice} An instance of Choice + */ + getEmailCloudPicker() { + return this.emailCloudPicker; + + } + + /** + * The method to set the value to emailCloudPicker + * @param {Choice} emailCloudPicker An instance of Choice + */ + setEmailCloudPicker(emailCloudPicker) { + if((emailCloudPicker != null) && (!(emailCloudPicker instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: emailCloudPicker EXPECTED TYPE: Choice", null, null); + } + this.emailCloudPicker = emailCloudPicker; + this.keyModified.set("EMAIL_CLOUD_PICKER", 1); + + } + + /** + * The method to get the formIntegrationEnabled + * @returns {Choice} An instance of Choice + */ + getFormIntegrationEnabled() { + return this.formIntegrationEnabled; + + } + + /** + * The method to set the value to formIntegrationEnabled + * @param {Choice} formIntegrationEnabled An instance of Choice + */ + setFormIntegrationEnabled(formIntegrationEnabled) { + if((formIntegrationEnabled != null) && (!(formIntegrationEnabled instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: formIntegrationEnabled EXPECTED TYPE: Choice", null, null); + } + this.formIntegrationEnabled = formIntegrationEnabled; + this.keyModified.set("form_integration_enabled", 1); + + } + + /** + * The method to get the isprivacyenabled + * @returns {Choice} An instance of Choice + */ + getIsprivacyenabled() { + return this.isprivacyenabled; + + } + + /** + * The method to set the value to isprivacyenabled + * @param {Choice} isprivacyenabled An instance of Choice + */ + setIsprivacyenabled(isprivacyenabled) { + if((isprivacyenabled != null) && (!(isprivacyenabled instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: isprivacyenabled EXPECTED TYPE: Choice", null, null); + } + this.isprivacyenabled = isprivacyenabled; + this.keyModified.set("isPrivacyEnabled", 1); + + } + + /** + * The method to get the autoSuggestion + * @returns {Choice} An instance of Choice + */ + getAutoSuggestion() { + return this.autoSuggestion; + + } + + /** + * The method to set the value to autoSuggestion + * @param {Choice} autoSuggestion An instance of Choice + */ + setAutoSuggestion(autoSuggestion) { + if((autoSuggestion != null) && (!(autoSuggestion instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: autoSuggestion EXPECTED TYPE: Choice", null, null); + } + this.autoSuggestion = autoSuggestion; + this.keyModified.set("auto_suggestion", 1); + + } + + /** + * The method to get the unsubscribeLink + * @returns {Choice} An instance of Choice + */ + getUnsubscribeLink() { + return this.unsubscribeLink; + + } + + /** + * The method to set the value to unsubscribeLink + * @param {Choice} unsubscribeLink An instance of Choice + */ + setUnsubscribeLink(unsubscribeLink) { + if((unsubscribeLink != null) && (!(unsubscribeLink instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: unsubscribeLink EXPECTED TYPE: Choice", null, null); + } + this.unsubscribeLink = unsubscribeLink; + this.keyModified.set("UNSUBSCRIBE_LINK", 1); + + } + + /** + * The method to get the bestTimeToContact + * @returns {Choice} An instance of Choice + */ + getBestTimeToContact() { + return this.bestTimeToContact; + + } + + /** + * The method to set the value to bestTimeToContact + * @param {Choice} bestTimeToContact An instance of Choice + */ + setBestTimeToContact(bestTimeToContact) { + if((bestTimeToContact != null) && (!(bestTimeToContact instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: bestTimeToContact EXPECTED TYPE: Choice", null, null); + } + this.bestTimeToContact = bestTimeToContact; + this.keyModified.set("best_time_to_contact", 1); + + } + + /** + * The method to get the attachTeamdrive + * @returns {Choice} An instance of Choice + */ + getAttachTeamdrive() { + return this.attachTeamdrive; + + } + + /** + * The method to set the value to attachTeamdrive + * @param {Choice} attachTeamdrive An instance of Choice + */ + setAttachTeamdrive(attachTeamdrive) { + if((attachTeamdrive != null) && (!(attachTeamdrive instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: attachTeamdrive EXPECTED TYPE: Choice", null, null); + } + this.attachTeamdrive = attachTeamdrive; + this.keyModified.set("attach_teamdrive", 1); + + } + + /** + * The method to get the islivedeskenabled + * @returns {Choice} An instance of Choice + */ + getIslivedeskenabled() { + return this.islivedeskenabled; + + } + + /** + * The method to set the value to islivedeskenabled + * @param {Choice} islivedeskenabled An instance of Choice + */ + setIslivedeskenabled(islivedeskenabled) { + if((islivedeskenabled != null) && (!(islivedeskenabled instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: islivedeskenabled EXPECTED TYPE: Choice", null, null); + } + this.islivedeskenabled = islivedeskenabled; + this.keyModified.set("isLiveDeskEnabled", 1); + + } + + /** + * The method to get the subjectLineSuggestion + * @returns {Boolean} A Boolean representing the subjectLineSuggestion + */ + getSubjectLineSuggestion() { + return this.subjectLineSuggestion; + + } + + /** + * The method to set the value to subjectLineSuggestion + * @param {Boolean} subjectLineSuggestion A Boolean representing the subjectLineSuggestion + */ + setSubjectLineSuggestion(subjectLineSuggestion) { + if((subjectLineSuggestion != null) && (!(Object.prototype.toString.call(subjectLineSuggestion) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subjectLineSuggestion EXPECTED TYPE: Boolean", null, null); + } + this.subjectLineSuggestion = subjectLineSuggestion; + this.keyModified.set("subject_line_suggestion", 1); + + } + + /** + * The method to get the emailPreference + * @returns {Boolean} A Boolean representing the emailPreference + */ + getEmailPreference() { + return this.emailPreference; + + } + + /** + * The method to set the value to emailPreference + * @param {Boolean} emailPreference A Boolean representing the emailPreference + */ + setEmailPreference(emailPreference) { + if((emailPreference != null) && (!(Object.prototype.toString.call(emailPreference) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: emailPreference EXPECTED TYPE: Boolean", null, null); + } + this.emailPreference = emailPreference; + this.keyModified.set("EMAIL_PREFERENCE", 1); + + } + + /** + * The method to get the attachment + * @returns {Boolean} A Boolean representing the attachment + */ + getAttachment() { + return this.attachment; + + } + + /** + * The method to set the value to attachment + * @param {Boolean} attachment A Boolean representing the attachment + */ + setAttachment(attachment) { + if((attachment != null) && (!(Object.prototype.toString.call(attachment) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: attachment EXPECTED TYPE: Boolean", null, null); + } + this.attachment = attachment; + this.keyModified.set("ATTACHMENT", 1); + + } + + /** + * The method to get the mandateunsublink + * @returns {Boolean} A Boolean representing the mandateunsublink + */ + getMandateunsublink() { + return this.mandateunsublink; + + } + + /** + * The method to set the value to mandateunsublink + * @param {Boolean} mandateunsublink A Boolean representing the mandateunsublink + */ + setMandateunsublink(mandateunsublink) { + if((mandateunsublink != null) && (!(Object.prototype.toString.call(mandateunsublink) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: mandateunsublink EXPECTED TYPE: Boolean", null, null); + } + this.mandateunsublink = mandateunsublink; + this.keyModified.set("mandateUnsubLink", 1); + + } + + /** + * The method to get the oldComposeRevert + * @returns {Boolean} A Boolean representing the oldComposeRevert + */ + getOldComposeRevert() { + return this.oldComposeRevert; + + } + + /** + * The method to set the value to oldComposeRevert + * @param {Boolean} oldComposeRevert A Boolean representing the oldComposeRevert + */ + setOldComposeRevert(oldComposeRevert) { + if((oldComposeRevert != null) && (!(Object.prototype.toString.call(oldComposeRevert) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: oldComposeRevert EXPECTED TYPE: Boolean", null, null); + } + this.oldComposeRevert = oldComposeRevert; + this.keyModified.set("OLD_COMPOSE_REVERT", 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 { + FeaturesAvailable as MasterModel, + FeaturesAvailable as FeaturesAvailable +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/from_address.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/from_address.js new file mode 100644 index 0000000..5056e50 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/from_address.js @@ -0,0 +1,159 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class FromAddress{ + + userName; + type; + email; + id; + default1; + keyModified = new Map(); + /** + * The method to get the userName + * @returns {String} A String representing the userName + */ + getUserName() { + return this.userName; + + } + + /** + * The method to set the value to userName + * @param {String} userName A String representing the userName + */ + setUserName(userName) { + if((userName != null) && (!(Object.prototype.toString.call(userName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: userName EXPECTED TYPE: String", null, null); + } + this.userName = userName; + this.keyModified.set("user_name", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the email + * @returns {String} A String representing the email + */ + getEmail() { + return this.email; + + } + + /** + * The method to set the value to email + * @param {String} email A String representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: String", null, null); + } + this.email = email; + this.keyModified.set("email", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the default + * @returns {Choice} An instance of Choice + */ + getDefault() { + return this.default1; + + } + + /** + * The method to set the value to default + * @param {Choice} default1 An instance of Choice + */ + setDefault(default1) { + if((default1 != null) && (!(default1 instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: default1 EXPECTED TYPE: Choice", null, null); + } + this.default1 = default1; + this.keyModified.set("default", 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 { + FromAddress as MasterModel, + FromAddress as FromAddress +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/import_email_compose_meta.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/import_email_compose_meta.js new file mode 100644 index 0000000..5616a39 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/import_email_compose_meta.js @@ -0,0 +1,7 @@ +export { FeaturesAvailable } from "./features_available.js"; +export { Data } from "./data.js"; +export { DataMap } from "./data_map.js"; +export { DefaultForm } from "./default_form.js"; +export { FromAddress } from "./from_address.js"; +export { User } from "./user.js"; +export { ComposeSettings } from "./compose_settings.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/user.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/user.js new file mode 100644 index 0000000..c2a27d8 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_compose_meta/user.js @@ -0,0 +1,159 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class User{ + + fullName; + email; + zuid; + zgid; + composeSettings; + keyModified = new Map(); + /** + * The method to get the fullName + * @returns {String} A String representing the fullName + */ + getFullName() { + return this.fullName; + + } + + /** + * The method to set the value to fullName + * @param {String} fullName A String representing the fullName + */ + setFullName(fullName) { + if((fullName != null) && (!(Object.prototype.toString.call(fullName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fullName EXPECTED TYPE: String", null, null); + } + this.fullName = fullName; + this.keyModified.set("full_name", 1); + + } + + /** + * The method to get the email + * @returns {String} A String representing the email + */ + getEmail() { + return this.email; + + } + + /** + * The method to set the value to email + * @param {String} email A String representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: String", null, null); + } + this.email = email; + this.keyModified.set("email", 1); + + } + + /** + * The method to get the zuid + * @returns {String} A String representing the zuid + */ + getZuid() { + return this.zuid; + + } + + /** + * The method to set the value to zuid + * @param {String} zuid A String representing the zuid + */ + setZuid(zuid) { + if((zuid != null) && (!(Object.prototype.toString.call(zuid) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: zuid EXPECTED TYPE: String", null, null); + } + this.zuid = zuid; + this.keyModified.set("zuid", 1); + + } + + /** + * The method to get the zgid + * @returns {String} A String representing the zgid + */ + getZgid() { + return this.zgid; + + } + + /** + * The method to set the value to zgid + * @param {String} zgid A String representing the zgid + */ + setZgid(zgid) { + if((zgid != null) && (!(Object.prototype.toString.call(zgid) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: zgid EXPECTED TYPE: String", null, null); + } + this.zgid = zgid; + this.keyModified.set("zgid", 1); + + } + + /** + * The method to get the composeSettings + * @returns {ComposeSettings} An instance of ComposeSettings + */ + getComposeSettings() { + return this.composeSettings; + + } + + /** + * The method to set the value to composeSettings + * @param {ComposeSettings} composeSettings An instance of ComposeSettings + */ + async setComposeSettings(composeSettings) { + const ComposeSettings = (await (import("./compose_settings.js"))).MasterModel; + if((composeSettings != null) && (!(composeSettings instanceof ComposeSettings))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: composeSettings EXPECTED TYPE: ComposeSettings", null, null); + } + this.composeSettings = composeSettings; + this.keyModified.set("compose_settings", 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 { + User as MasterModel, + User as User +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/attachments.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/attachments.js new file mode 100644 index 0000000..394354c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/attachments.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Attachments{ + + size; + name; + id; + keyModified = new Map(); + /** + * The method to get the size + * @returns {String} A String representing the size + */ + getSize() { + return this.size; + + } + + /** + * The method to set the value to size + * @param {String} size A String representing the size + */ + setSize(size) { + if((size != null) && (!(Object.prototype.toString.call(size) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: size EXPECTED TYPE: String", null, null); + } + this.size = size; + this.keyModified.set("size", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Attachments as MasterModel, + Attachments as Attachments +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/email.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/email.js new file mode 100644 index 0000000..56298bc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/email.js @@ -0,0 +1,577 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Email{ + + attachments; + threadId; + cc; + summary; + owner; + read; + content; + sent; + subject; + intent; + sentimentInfo; + messageId; + source; + linkedRecord; + sentTime; + emotion; + from; + to; + time; + status; + editable; + mailFormat; + replyTo; + keyModified = new Map(); + /** + * The method to get the attachments + * @returns {Array} An Array representing the attachments + */ + getAttachments() { + return this.attachments; + + } + + /** + * The method to set the value to attachments + * @param {Array} attachments An Array representing the attachments + */ + setAttachments(attachments) { + if((attachments != null) && (!(Object.prototype.toString.call(attachments) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: attachments EXPECTED TYPE: Array", null, null); + } + this.attachments = attachments; + this.keyModified.set("attachments", 1); + + } + + /** + * The method to get the threadId + * @returns {BigInt} A BigInt representing the threadId + */ + getThreadId() { + return this.threadId; + + } + + /** + * The method to set the value to threadId + * @param {BigInt} threadId A BigInt representing the threadId + */ + setThreadId(threadId) { + if((threadId != null) && (!(Object.prototype.toString.call(threadId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: threadId EXPECTED TYPE: BigInt", null, null); + } + this.threadId = threadId; + this.keyModified.set("thread_id", 1); + + } + + /** + * The method to get the cc + * @returns {Array} An Array representing the cc + */ + getCc() { + return this.cc; + + } + + /** + * The method to set the value to cc + * @param {Array} cc An Array representing the cc + */ + setCc(cc) { + if((cc != null) && (!(Object.prototype.toString.call(cc) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: cc EXPECTED TYPE: Array", null, null); + } + this.cc = cc; + this.keyModified.set("cc", 1); + + } + + /** + * The method to get the summary + * @returns {String} A String representing the summary + */ + getSummary() { + return this.summary; + + } + + /** + * The method to set the value to summary + * @param {String} summary A String representing the summary + */ + setSummary(summary) { + if((summary != null) && (!(Object.prototype.toString.call(summary) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: summary EXPECTED TYPE: String", null, null); + } + this.summary = summary; + this.keyModified.set("summary", 1); + + } + + /** + * The method to get the owner + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getOwner() { + return this.owner; + + } + + /** + * The method to set the value to owner + * @param {MinifiedUser} owner An instance of MinifiedUser + */ + async setOwner(owner) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((owner != null) && (!(owner instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: owner EXPECTED TYPE: MinifiedUser", null, null); + } + this.owner = owner; + this.keyModified.set("owner", 1); + + } + + /** + * The method to get the read + * @returns {Boolean} A Boolean representing the read + */ + getRead() { + return this.read; + + } + + /** + * The method to set the value to read + * @param {Boolean} read A Boolean representing the read + */ + setRead(read) { + if((read != null) && (!(Object.prototype.toString.call(read) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: read EXPECTED TYPE: Boolean", null, null); + } + this.read = read; + this.keyModified.set("read", 1); + + } + + /** + * The method to get the content + * @returns {String} A String representing the content + */ + getContent() { + return this.content; + + } + + /** + * The method to set the value to content + * @param {String} content A String representing the content + */ + setContent(content) { + if((content != null) && (!(Object.prototype.toString.call(content) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: content EXPECTED TYPE: String", null, null); + } + this.content = content; + this.keyModified.set("content", 1); + + } + + /** + * The method to get the sent + * @returns {Boolean} A Boolean representing the sent + */ + getSent() { + return this.sent; + + } + + /** + * The method to set the value to sent + * @param {Boolean} sent A Boolean representing the sent + */ + setSent(sent) { + if((sent != null) && (!(Object.prototype.toString.call(sent) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sent EXPECTED TYPE: Boolean", null, null); + } + this.sent = sent; + this.keyModified.set("sent", 1); + + } + + /** + * The method to get the subject + * @returns {String} A String representing the subject + */ + getSubject() { + return this.subject; + + } + + /** + * The method to set the value to subject + * @param {String} subject A String representing the subject + */ + setSubject(subject) { + if((subject != null) && (!(Object.prototype.toString.call(subject) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subject EXPECTED TYPE: String", null, null); + } + this.subject = subject; + this.keyModified.set("subject", 1); + + } + + /** + * The method to get the intent + * @returns {Choice} An instance of Choice + */ + getIntent() { + return this.intent; + + } + + /** + * The method to set the value to intent + * @param {Choice} intent An instance of Choice + */ + setIntent(intent) { + if((intent != null) && (!(intent instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: intent EXPECTED TYPE: Choice", null, null); + } + this.intent = intent; + this.keyModified.set("intent", 1); + + } + + /** + * The method to get the sentimentInfo + * @returns {Choice} An instance of Choice + */ + getSentimentInfo() { + return this.sentimentInfo; + + } + + /** + * The method to set the value to sentimentInfo + * @param {Choice} sentimentInfo An instance of Choice + */ + setSentimentInfo(sentimentInfo) { + if((sentimentInfo != null) && (!(sentimentInfo instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sentimentInfo EXPECTED TYPE: Choice", null, null); + } + this.sentimentInfo = sentimentInfo; + this.keyModified.set("sentiment_info", 1); + + } + + /** + * The method to get the messageId + * @returns {String} A String representing the messageId + */ + getMessageId() { + return this.messageId; + + } + + /** + * The method to set the value to messageId + * @param {String} messageId A String representing the messageId + */ + setMessageId(messageId) { + if((messageId != null) && (!(Object.prototype.toString.call(messageId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: messageId EXPECTED TYPE: String", null, null); + } + this.messageId = messageId; + this.keyModified.set("message_id", 1); + + } + + /** + * The method to get the source + * @returns {String} A String representing the source + */ + getSource() { + return this.source; + + } + + /** + * The method to set the value to source + * @param {String} source A String representing the source + */ + setSource(source) { + if((source != null) && (!(Object.prototype.toString.call(source) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: source EXPECTED TYPE: String", null, null); + } + this.source = source; + this.keyModified.set("source", 1); + + } + + /** + * The method to get the linkedRecord + * @returns {LinkedRecord} An instance of LinkedRecord + */ + getLinkedRecord() { + return this.linkedRecord; + + } + + /** + * The method to set the value to linkedRecord + * @param {LinkedRecord} linkedRecord An instance of LinkedRecord + */ + async setLinkedRecord(linkedRecord) { + const LinkedRecord = (await (import("./linked_record.js"))).MasterModel; + if((linkedRecord != null) && (!(linkedRecord instanceof LinkedRecord))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: linkedRecord EXPECTED TYPE: LinkedRecord", null, null); + } + this.linkedRecord = linkedRecord; + this.keyModified.set("linked_record", 1); + + } + + /** + * The method to get the sentTime + * @returns {String} A String representing the sentTime + */ + getSentTime() { + return this.sentTime; + + } + + /** + * The method to set the value to sentTime + * @param {String} sentTime A String representing the sentTime + */ + setSentTime(sentTime) { + if((sentTime != null) && (!(Object.prototype.toString.call(sentTime) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sentTime EXPECTED TYPE: String", null, null); + } + this.sentTime = sentTime; + this.keyModified.set("sent_time", 1); + + } + + /** + * The method to get the emotion + * @returns {String} A String representing the emotion + */ + getEmotion() { + return this.emotion; + + } + + /** + * The method to set the value to emotion + * @param {String} emotion A String representing the emotion + */ + setEmotion(emotion) { + if((emotion != null) && (!(Object.prototype.toString.call(emotion) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: emotion EXPECTED TYPE: String", null, null); + } + this.emotion = emotion; + this.keyModified.set("emotion", 1); + + } + + /** + * The method to get the from + * @returns {UserDetails} An instance of UserDetails + */ + getFrom() { + return this.from; + + } + + /** + * The method to set the value to from + * @param {UserDetails} from An instance of UserDetails + */ + async setFrom(from) { + const UserDetails = (await (import("./user_details.js"))).MasterModel; + if((from != null) && (!(from instanceof UserDetails))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: from EXPECTED TYPE: UserDetails", null, null); + } + this.from = from; + this.keyModified.set("from", 1); + + } + + /** + * The method to get the to + * @returns {Array} An Array representing the to + */ + getTo() { + return this.to; + + } + + /** + * The method to set the value to to + * @param {Array} to An Array representing the to + */ + setTo(to) { + if((to != null) && (!(Object.prototype.toString.call(to) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: to EXPECTED TYPE: Array", null, null); + } + this.to = to; + this.keyModified.set("to", 1); + + } + + /** + * The method to get the time + * @returns {Date} An instance of Date + */ + getTime() { + return this.time; + + } + + /** + * The method to set the value to time + * @param {Date} time An instance of Date + */ + setTime(time) { + if((time != null) && (!(time instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: time EXPECTED TYPE: Date", null, null); + } + this.time = time; + this.keyModified.set("time", 1); + + } + + /** + * The method to get the status + * @returns {Array} An Array representing the status + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Array} status An Array representing the status + */ + setStatus(status) { + if((status != null) && (!(Object.prototype.toString.call(status) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Array", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the editable + * @returns {Boolean} A Boolean representing the editable + */ + getEditable() { + return this.editable; + + } + + /** + * The method to set the value to editable + * @param {Boolean} editable A Boolean representing the editable + */ + setEditable(editable) { + if((editable != null) && (!(Object.prototype.toString.call(editable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: editable EXPECTED TYPE: Boolean", null, null); + } + this.editable = editable; + this.keyModified.set("editable", 1); + + } + + /** + * The method to get the mailFormat + * @returns {String} A String representing the mailFormat + */ + getMailFormat() { + return this.mailFormat; + + } + + /** + * The method to set the value to mailFormat + * @param {String} mailFormat A String representing the mailFormat + */ + setMailFormat(mailFormat) { + if((mailFormat != null) && (!(Object.prototype.toString.call(mailFormat) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: mailFormat EXPECTED TYPE: String", null, null); + } + this.mailFormat = mailFormat; + this.keyModified.set("mail_format", 1); + + } + + /** + * The method to get the replyTo + * @returns {UserDetails} An instance of UserDetails + */ + getReplyTo() { + return this.replyTo; + + } + + /** + * The method to set the value to replyTo + * @param {UserDetails} replyTo An instance of UserDetails + */ + async setReplyTo(replyTo) { + const UserDetails = (await (import("./user_details.js"))).MasterModel; + if((replyTo != null) && (!(replyTo instanceof UserDetails))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: replyTo EXPECTED TYPE: UserDetails", null, null); + } + this.replyTo = replyTo; + this.keyModified.set("reply_to", 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 { + Email as MasterModel, + Email as Email +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/email_related_records_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/email_related_records_operations.js new file mode 100644 index 0000000..ee224df --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/email_related_records_operations.js @@ -0,0 +1,96 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 EmailRelatedRecordsOperations{ + + moduleName; + recordId; + /** + * Creates an instance of EmailRelatedRecordsOperations with the given parameters + * @param {BigInt} recordId A BigInt representing the recordId + * @param {String} moduleName A String representing the moduleName + */ + constructor(recordId, moduleName){ + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(moduleName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleName EXPECTED TYPE: String", null, null); + } + this.recordId = recordId; + this.moduleName = moduleName; + + } + + /** + * The method to get emails related records + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getEmailsRelatedRecords(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.recordId.toString()); + apiPath = apiPath.concat("/Emails"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to get emails related record + * @param {String} messageId A String representing the messageId + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getEmailsRelatedRecord(messageId) { + if((!(Object.prototype.toString.call(messageId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: messageId EXPECTED TYPE: String", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.recordId.toString()); + apiPath = apiPath.concat("/Emails/"); + apiPath = apiPath.concat(messageId.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/json"); + + } + +} +class GetEmailsRelatedRecordsParam{ + + static TYPE = new Param("type", "com.zoho.crm.api.EmailRelatedRecords.GetEmailsRelatedRecordsParam"); + static INDEX = new Param("index", "com.zoho.crm.api.EmailRelatedRecords.GetEmailsRelatedRecordsParam"); + static OWNER_ID = new Param("owner_id", "com.zoho.crm.api.EmailRelatedRecords.GetEmailsRelatedRecordsParam"); +} + +export { + GetEmailsRelatedRecordsParam as GetEmailsRelatedRecordsParam, + EmailRelatedRecordsOperations as MasterModel, + EmailRelatedRecordsOperations as EmailRelatedRecordsOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/import_email_related_records.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/import_email_related_records.js new file mode 100644 index 0000000..50560b6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/import_email_related_records.js @@ -0,0 +1,12 @@ +export { Attachments } from "./attachments.js"; +export { UserDetails } from "./user_details.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { APIException } from "./api_exception.js"; +export { EmailRelatedRecordsOperations } from "./email_related_records_operations.js"; +export { GetEmailsRelatedRecordsParam } from "./email_related_records_operations.js"; +export { Info } from "./info.js"; +export * as ResponseHandler from "./response_handler.js"; +export { LinkedRecord } from "./linked_record.js"; +export { Module } from "./module.js"; +export { Email } from "./email.js"; +export { Status } from "./status.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/info.js new file mode 100644 index 0000000..61ab8eb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/info.js @@ -0,0 +1,158 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + count; + nextIndex; + prevIndex; + perPage; + moreRecords; + keyModified = new Map(); + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the nextIndex + * @returns {String} A String representing the nextIndex + */ + getNextIndex() { + return this.nextIndex; + + } + + /** + * The method to set the value to nextIndex + * @param {String} nextIndex A String representing the nextIndex + */ + setNextIndex(nextIndex) { + if((nextIndex != null) && (!(Object.prototype.toString.call(nextIndex) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: nextIndex EXPECTED TYPE: String", null, null); + } + this.nextIndex = nextIndex; + this.keyModified.set("next_index", 1); + + } + + /** + * The method to get the prevIndex + * @returns {String} A String representing the prevIndex + */ + getPrevIndex() { + return this.prevIndex; + + } + + /** + * The method to set the value to prevIndex + * @param {String} prevIndex A String representing the prevIndex + */ + setPrevIndex(prevIndex) { + if((prevIndex != null) && (!(Object.prototype.toString.call(prevIndex) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: prevIndex EXPECTED TYPE: String", null, null); + } + this.prevIndex = prevIndex; + this.keyModified.set("prev_index", 1); + + } + + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/linked_record.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/linked_record.js new file mode 100644 index 0000000..d343116 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/linked_record.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class LinkedRecord{ + + id; + module; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the module + * @returns {Module} An instance of Module + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {Module} module An instance of Module + */ + async setModule(module) { + const Module = (await (import("./module.js"))).MasterModel; + if((module != null) && (!(module instanceof Module))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: Module", null, null); + } + this.module = module; + this.keyModified.set("module", 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 { + LinkedRecord as MasterModel, + LinkedRecord as LinkedRecord +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/module.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/module.js new file mode 100644 index 0000000..986d9b3 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/module.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Module{ + + apiName; + id; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Module as MasterModel, + Module as Module +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/response_wrapper.js new file mode 100644 index 0000000..b688134 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + emails; + info; + keyModified = new Map(); + /** + * The method to get the emails + * @returns {Array} An Array representing the emails + */ + getEmails() { + return this.emails; + + } + + /** + * The method to set the value to emails + * @param {Array} emails An Array representing the emails + */ + setEmails(emails) { + if((emails != null) && (!(Object.prototype.toString.call(emails) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: emails EXPECTED TYPE: Array", null, null); + } + this.emails = emails; + this.keyModified.set("Emails", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/status.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/status.js new file mode 100644 index 0000000..cbea027 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/status.js @@ -0,0 +1,181 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Status{ + + firstOpen; + count; + type; + lastOpen; + bouncedTime; + bouncedReason; + keyModified = new Map(); + /** + * The method to get the firstOpen + * @returns {Date} An instance of Date + */ + getFirstOpen() { + return this.firstOpen; + + } + + /** + * The method to set the value to firstOpen + * @param {Date} firstOpen An instance of Date + */ + setFirstOpen(firstOpen) { + if((firstOpen != null) && (!(firstOpen instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: firstOpen EXPECTED TYPE: Date", null, null); + } + this.firstOpen = firstOpen; + this.keyModified.set("first_open", 1); + + } + + /** + * The method to get the count + * @returns {String} A String representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {String} count A String representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: String", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the lastOpen + * @returns {Date} An instance of Date + */ + getLastOpen() { + return this.lastOpen; + + } + + /** + * The method to set the value to lastOpen + * @param {Date} lastOpen An instance of Date + */ + setLastOpen(lastOpen) { + if((lastOpen != null) && (!(lastOpen instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: lastOpen EXPECTED TYPE: Date", null, null); + } + this.lastOpen = lastOpen; + this.keyModified.set("last_open", 1); + + } + + /** + * The method to get the bouncedTime + * @returns {Date} An instance of Date + */ + getBouncedTime() { + return this.bouncedTime; + + } + + /** + * The method to set the value to bouncedTime + * @param {Date} bouncedTime An instance of Date + */ + setBouncedTime(bouncedTime) { + if((bouncedTime != null) && (!(bouncedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: bouncedTime EXPECTED TYPE: Date", null, null); + } + this.bouncedTime = bouncedTime; + this.keyModified.set("bounced_time", 1); + + } + + /** + * The method to get the bouncedReason + * @returns {String} A String representing the bouncedReason + */ + getBouncedReason() { + return this.bouncedReason; + + } + + /** + * The method to set the value to bouncedReason + * @param {String} bouncedReason A String representing the bouncedReason + */ + setBouncedReason(bouncedReason) { + if((bouncedReason != null) && (!(Object.prototype.toString.call(bouncedReason) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: bouncedReason EXPECTED TYPE: String", null, null); + } + this.bouncedReason = bouncedReason; + this.keyModified.set("bounced_reason", 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 { + Status as MasterModel, + Status as Status +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/user_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/user_details.js new file mode 100644 index 0000000..95235e4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_related_records/user_details.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class UserDetails{ + + userName; + email; + keyModified = new Map(); + /** + * The method to get the userName + * @returns {String} A String representing the userName + */ + getUserName() { + return this.userName; + + } + + /** + * The method to set the value to userName + * @param {String} userName A String representing the userName + */ + setUserName(userName) { + if((userName != null) && (!(Object.prototype.toString.call(userName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: userName EXPECTED TYPE: String", null, null); + } + this.userName = userName; + this.keyModified.set("user_name", 1); + + } + + /** + * The method to get the email + * @returns {String} A String representing the email + */ + getEmail() { + return this.email; + + } + + /** + * The method to set the value to email + * @param {String} email A String representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: String", null, null); + } + this.email = email; + this.keyModified.set("email", 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 { + UserDetails as MasterModel, + UserDetails as UserDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/email_sharing_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/email_sharing_operations.js new file mode 100644 index 0000000..cdc2619 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/email_sharing_operations.js @@ -0,0 +1,54 @@ +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 EmailSharingOperations{ + + module; + recordId; + /** + * Creates an instance of EmailSharingOperations with the given parameters + * @param {BigInt} recordId A BigInt representing the recordId + * @param {String} module A String representing the module + */ + constructor(recordId, module){ + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + this.recordId = recordId; + this.module = module; + + } + + /** + * The method to get email sharing details + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getEmailSharingDetails() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.module.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.recordId.toString()); + apiPath = apiPath.concat("/__emails_sharing_details"); + 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 { + EmailSharingOperations as MasterModel, + EmailSharingOperations as EmailSharingOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/get_email_sharing.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/get_email_sharing.js new file mode 100644 index 0000000..e6f44f1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/get_email_sharing.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class GetEmailSharing{ + + shareFromUsers; + availableTypes; + keyModified = new Map(); + /** + * The method to get the shareFromUsers + * @returns {Array} An Array representing the shareFromUsers + */ + getShareFromUsers() { + return this.shareFromUsers; + + } + + /** + * The method to set the value to shareFromUsers + * @param {Array} shareFromUsers An Array representing the shareFromUsers + */ + setShareFromUsers(shareFromUsers) { + if((shareFromUsers != null) && (!(Object.prototype.toString.call(shareFromUsers) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: shareFromUsers EXPECTED TYPE: Array", null, null); + } + this.shareFromUsers = shareFromUsers; + this.keyModified.set("share_from_users", 1); + + } + + /** + * The method to get the availableTypes + * @returns {Array} An Array representing the availableTypes + */ + getAvailableTypes() { + return this.availableTypes; + + } + + /** + * The method to set the value to availableTypes + * @param {Array} availableTypes An Array representing the availableTypes + */ + setAvailableTypes(availableTypes) { + if((availableTypes != null) && (!(Object.prototype.toString.call(availableTypes) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: availableTypes EXPECTED TYPE: Array", null, null); + } + this.availableTypes = availableTypes; + this.keyModified.set("available_types", 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 { + GetEmailSharing as MasterModel, + GetEmailSharing as GetEmailSharing +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/import_email_sharing.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/import_email_sharing.js new file mode 100644 index 0000000..3b91b0d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/import_email_sharing.js @@ -0,0 +1,6 @@ +export { APIException } from "./api_exception.js"; +export * as ResponseHandler from "./response_handler.js"; +export { GetEmailSharing } from "./get_email_sharing.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { ShareFromUser } from "./share_from_user.js"; +export { EmailSharingOperations } from "./email_sharing_operations.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/response_wrapper.js new file mode 100644 index 0000000..41f2e49 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + emailssharingdetails; + keyModified = new Map(); + /** + * The method to get the emailssharingdetails + * @returns {Array} An Array representing the emailssharingdetails + */ + getEmailssharingdetails() { + return this.emailssharingdetails; + + } + + /** + * The method to set the value to emailssharingdetails + * @param {Array} emailssharingdetails An Array representing the emailssharingdetails + */ + setEmailssharingdetails(emailssharingdetails) { + if((emailssharingdetails != null) && (!(Object.prototype.toString.call(emailssharingdetails) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: emailssharingdetails EXPECTED TYPE: Array", null, null); + } + this.emailssharingdetails = emailssharingdetails; + this.keyModified.set("__emails_sharing_details", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/share_from_user.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/share_from_user.js new file mode 100644 index 0000000..271ccd4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_sharing/share_from_user.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ShareFromUser{ + + name; + type; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("_type", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + ShareFromUser as MasterModel, + ShareFromUser as ShareFromUser +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/api_exception.js new file mode 100644 index 0000000..db2d361 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/attachment.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/attachment.js new file mode 100644 index 0000000..3cbb6fb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/attachment.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Attachment{ + + size; + fileName; + fileId; + id; + keyModified = new Map(); + /** + * The method to get the size + * @returns {BigInt} A BigInt representing the size + */ + getSize() { + return this.size; + + } + + /** + * The method to set the value to size + * @param {BigInt} size A BigInt representing the size + */ + setSize(size) { + if((size != null) && (!(Object.prototype.toString.call(size) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: size EXPECTED TYPE: BigInt", null, null); + } + this.size = size; + this.keyModified.set("size", 1); + + } + + /** + * The method to get the fileName + * @returns {String} A String representing the fileName + */ + getFileName() { + return this.fileName; + + } + + /** + * The method to set the value to fileName + * @param {String} fileName A String representing the fileName + */ + setFileName(fileName) { + if((fileName != null) && (!(Object.prototype.toString.call(fileName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileName EXPECTED TYPE: String", null, null); + } + this.fileName = fileName; + this.keyModified.set("file_name", 1); + + } + + /** + * The method to get the fileId + * @returns {String} A String representing the fileId + */ + getFileId() { + return this.fileId; + + } + + /** + * The method to set the value to fileId + * @param {String} fileId A String representing the fileId + */ + setFileId(fileId) { + if((fileId != null) && (!(Object.prototype.toString.call(fileId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileId EXPECTED TYPE: String", null, null); + } + this.fileId = fileId; + this.keyModified.set("file_id", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Attachment as MasterModel, + Attachment as Attachment +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/email_template.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/email_template.js new file mode 100644 index 0000000..702a2ea --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/email_template.js @@ -0,0 +1,510 @@ +import {InventoryTemplate} from "../inventory_templates/inventory_template.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; +import { Template } from "../send_mail/template.js"; + +class EmailTemplate extends (InventoryTemplate, Template){ + + attachments; + subject; + associated; + consentLinked; + description; + lastVersionStatistics; + category; + createdTime; + modifiedTime; + lastUsageTime; + folder; + module; + createdBy; + modifiedBy; + name; + id; + editorMode; + type; + favorite; + content; + keyModified = new Map(); + /** + * The method to get the attachments + * @returns {Array} An Array representing the attachments + */ + getAttachments() { + return this.attachments; + + } + + /** + * The method to set the value to attachments + * @param {Array} attachments An Array representing the attachments + */ + setAttachments(attachments) { + if((attachments != null) && (!(Object.prototype.toString.call(attachments) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: attachments EXPECTED TYPE: Array", null, null); + } + this.attachments = attachments; + this.keyModified.set("attachments", 1); + + } + + /** + * The method to get the subject + * @returns {String} A String representing the subject + */ + getSubject() { + return this.subject; + + } + + /** + * The method to set the value to subject + * @param {String} subject A String representing the subject + */ + setSubject(subject) { + if((subject != null) && (!(Object.prototype.toString.call(subject) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subject EXPECTED TYPE: String", null, null); + } + this.subject = subject; + this.keyModified.set("subject", 1); + + } + + /** + * The method to get the associated + * @returns {Boolean} A Boolean representing the associated + */ + getAssociated() { + return this.associated; + + } + + /** + * The method to set the value to associated + * @param {Boolean} associated A Boolean representing the associated + */ + setAssociated(associated) { + if((associated != null) && (!(Object.prototype.toString.call(associated) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: associated EXPECTED TYPE: Boolean", null, null); + } + this.associated = associated; + this.keyModified.set("associated", 1); + + } + + /** + * The method to get the consentLinked + * @returns {Boolean} A Boolean representing the consentLinked + */ + getConsentLinked() { + return this.consentLinked; + + } + + /** + * The method to set the value to consentLinked + * @param {Boolean} consentLinked A Boolean representing the consentLinked + */ + setConsentLinked(consentLinked) { + if((consentLinked != null) && (!(Object.prototype.toString.call(consentLinked) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: consentLinked EXPECTED TYPE: Boolean", null, null); + } + this.consentLinked = consentLinked; + this.keyModified.set("consent_linked", 1); + + } + + /** + * The method to get the description + * @returns {String} A String representing the description + */ + getDescription() { + return this.description; + + } + + /** + * The method to set the value to description + * @param {String} description A String representing the description + */ + setDescription(description) { + if((description != null) && (!(Object.prototype.toString.call(description) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: description EXPECTED TYPE: String", null, null); + } + this.description = description; + this.keyModified.set("description", 1); + + } + + /** + * The method to get the lastVersionStatistics + * @returns {LastVersionStatistics} An instance of LastVersionStatistics + */ + getLastVersionStatistics() { + return this.lastVersionStatistics; + + } + + /** + * The method to set the value to lastVersionStatistics + * @param {LastVersionStatistics} lastVersionStatistics An instance of LastVersionStatistics + */ + async setLastVersionStatistics(lastVersionStatistics) { + const LastVersionStatistics = (await (import("./last_version_statistics.js"))).MasterModel; + if((lastVersionStatistics != null) && (!(lastVersionStatistics instanceof LastVersionStatistics))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: lastVersionStatistics EXPECTED TYPE: LastVersionStatistics", null, null); + } + this.lastVersionStatistics = lastVersionStatistics; + this.keyModified.set("last_version_statistics", 1); + + } + + /** + * The method to get the category + * @returns {String} A String representing the category + */ + getCategory() { + return this.category; + + } + + /** + * The method to set the value to category + * @param {String} category A String representing the category + */ + setCategory(category) { + if((category != null) && (!(Object.prototype.toString.call(category) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: category EXPECTED TYPE: String", null, null); + } + this.category = category; + this.keyModified.set("category", 1); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the lastUsageTime + * @returns {Date} An instance of Date + */ + getLastUsageTime() { + return this.lastUsageTime; + + } + + /** + * The method to set the value to lastUsageTime + * @param {Date} lastUsageTime An instance of Date + */ + setLastUsageTime(lastUsageTime) { + if((lastUsageTime != null) && (!(lastUsageTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: lastUsageTime EXPECTED TYPE: Date", null, null); + } + this.lastUsageTime = lastUsageTime; + this.keyModified.set("last_usage_time", 1); + + } + + /** + * The method to get the folder + * @returns {Folder} An instance of Folder + */ + getFolder() { + return this.folder; + + } + + /** + * The method to set the value to folder + * @param {Folder} folder An instance of Folder + */ + async setFolder(folder) { + const Folder = (await (import("../inventory_templates/folder.js"))).MasterModel; + if((folder != null) && (!(folder instanceof Folder))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: folder EXPECTED TYPE: Folder", null, null); + } + this.folder = folder; + this.keyModified.set("folder", 1); + + } + + /** + * The method to get the module + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {MinifiedModule} module An instance of MinifiedModule + */ + async setModule(module) { + const MinifiedModule = (await (import("../modules/minified_module.js"))).MasterModel; + if((module != null) && (!(module instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: MinifiedModule", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("modified_by", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the editorMode + * @returns {String} A String representing the editorMode + */ + getEditorMode() { + return this.editorMode; + + } + + /** + * The method to set the value to editorMode + * @param {String} editorMode A String representing the editorMode + */ + setEditorMode(editorMode) { + if((editorMode != null) && (!(Object.prototype.toString.call(editorMode) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: editorMode EXPECTED TYPE: String", null, null); + } + this.editorMode = editorMode; + this.keyModified.set("editor_mode", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the favorite + * @returns {Boolean} A Boolean representing the favorite + */ + getFavorite() { + return this.favorite; + + } + + /** + * The method to set the value to favorite + * @param {Boolean} favorite A Boolean representing the favorite + */ + setFavorite(favorite) { + if((favorite != null) && (!(Object.prototype.toString.call(favorite) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: favorite EXPECTED TYPE: Boolean", null, null); + } + this.favorite = favorite; + this.keyModified.set("favorite", 1); + + } + + /** + * The method to get the content + * @returns {String} A String representing the content + */ + getContent() { + return this.content; + + } + + /** + * The method to set the value to content + * @param {String} content A String representing the content + */ + setContent(content) { + if((content != null) && (!(Object.prototype.toString.call(content) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: content EXPECTED TYPE: String", null, null); + } + this.content = content; + this.keyModified.set("content", 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 { + EmailTemplate as MasterModel, + EmailTemplate as EmailTemplate +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/email_templates_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/email_templates_operations.js new file mode 100644 index 0000000..1d75dbd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/email_templates_operations.js @@ -0,0 +1,66 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 EmailTemplatesOperations{ + /** + * The method to get email templates + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getEmailTemplates(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/email_templates"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to get email template + * @param {BigInt} template A BigInt representing the template + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getEmailTemplate(template) { + if((!(Object.prototype.toString.call(template) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: template EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/email_templates/"); + apiPath = apiPath.concat(template.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/json"); + + } + +} +class GetEmailTemplatesParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.EmailTemplates.GetEmailTemplatesParam"); +} + +export { + EmailTemplatesOperations as MasterModel, + EmailTemplatesOperations as EmailTemplatesOperations, + GetEmailTemplatesParam as GetEmailTemplatesParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/import_email_templates.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/import_email_templates.js new file mode 100644 index 0000000..e07a54a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/import_email_templates.js @@ -0,0 +1,9 @@ +export { Attachment } from "./attachment.js"; +export { LastVersionStatistics } from "./last_version_statistics.js"; +export { EmailTemplatesOperations } from "./email_templates_operations.js"; +export { GetEmailTemplatesParam } from "./email_templates_operations.js"; +export * as ResponseHandler from "./response_handler.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { EmailTemplate } from "./email_template.js"; +export { APIException } from "./api_exception.js"; +export { Info } from "./info.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/info.js new file mode 100644 index 0000000..d847543 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/info.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + perPage; + page; + count; + moreRecords; + keyModified = new Map(); + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/last_version_statistics.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/last_version_statistics.js new file mode 100644 index 0000000..db62a85 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/last_version_statistics.js @@ -0,0 +1,181 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class LastVersionStatistics{ + + tracked; + delivered; + opened; + bounced; + sent; + clicked; + keyModified = new Map(); + /** + * The method to get the tracked + * @returns {number} A number representing the tracked + */ + getTracked() { + return this.tracked; + + } + + /** + * The method to set the value to tracked + * @param {number} tracked A number representing the tracked + */ + setTracked(tracked) { + if((tracked != null) && (!(Object.prototype.toString.call(tracked) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tracked EXPECTED TYPE: number", null, null); + } + this.tracked = tracked; + this.keyModified.set("tracked", 1); + + } + + /** + * The method to get the delivered + * @returns {number} A number representing the delivered + */ + getDelivered() { + return this.delivered; + + } + + /** + * The method to set the value to delivered + * @param {number} delivered A number representing the delivered + */ + setDelivered(delivered) { + if((delivered != null) && (!(Object.prototype.toString.call(delivered) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: delivered EXPECTED TYPE: number", null, null); + } + this.delivered = delivered; + this.keyModified.set("delivered", 1); + + } + + /** + * The method to get the opened + * @returns {number} A number representing the opened + */ + getOpened() { + return this.opened; + + } + + /** + * The method to set the value to opened + * @param {number} opened A number representing the opened + */ + setOpened(opened) { + if((opened != null) && (!(Object.prototype.toString.call(opened) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: opened EXPECTED TYPE: number", null, null); + } + this.opened = opened; + this.keyModified.set("opened", 1); + + } + + /** + * The method to get the bounced + * @returns {number} A number representing the bounced + */ + getBounced() { + return this.bounced; + + } + + /** + * The method to set the value to bounced + * @param {number} bounced A number representing the bounced + */ + setBounced(bounced) { + if((bounced != null) && (!(Object.prototype.toString.call(bounced) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: bounced EXPECTED TYPE: number", null, null); + } + this.bounced = bounced; + this.keyModified.set("bounced", 1); + + } + + /** + * The method to get the sent + * @returns {number} A number representing the sent + */ + getSent() { + return this.sent; + + } + + /** + * The method to set the value to sent + * @param {number} sent A number representing the sent + */ + setSent(sent) { + if((sent != null) && (!(Object.prototype.toString.call(sent) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sent EXPECTED TYPE: number", null, null); + } + this.sent = sent; + this.keyModified.set("sent", 1); + + } + + /** + * The method to get the clicked + * @returns {number} A number representing the clicked + */ + getClicked() { + return this.clicked; + + } + + /** + * The method to set the value to clicked + * @param {number} clicked A number representing the clicked + */ + setClicked(clicked) { + if((clicked != null) && (!(Object.prototype.toString.call(clicked) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: clicked EXPECTED TYPE: number", null, null); + } + this.clicked = clicked; + this.keyModified.set("clicked", 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 { + LastVersionStatistics as MasterModel, + LastVersionStatistics as LastVersionStatistics +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/response_wrapper.js new file mode 100644 index 0000000..8060896 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/email_templates/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + emailTemplates; + info; + keyModified = new Map(); + /** + * The method to get the emailTemplates + * @returns {Array} An Array representing the emailTemplates + */ + getEmailTemplates() { + return this.emailTemplates; + + } + + /** + * The method to set the value to emailTemplates + * @param {Array} emailTemplates An Array representing the emailTemplates + */ + setEmailTemplates(emailTemplates) { + if((emailTemplates != null) && (!(Object.prototype.toString.call(emailTemplates) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: emailTemplates EXPECTED TYPE: Array", null, null); + } + this.emailTemplates = emailTemplates; + this.keyModified.set("email_templates", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/api_exception.js new file mode 100644 index 0000000..35bf8ba --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_scores.js b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_scores.js new file mode 100644 index 0000000..983e3f4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_scores.js @@ -0,0 +1,294 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class EntityScores{ + + score; + positiveScore; + touchPointScore; + negativeScore; + entity; + scoringRule; + touchPointNegativeScore; + id; + touchPointPositiveScore; + fieldStates; + ziaVisions; + keyModified = new Map(); + /** + * The method to get the score + * @returns {number} A number representing the score + */ + getScore() { + return this.score; + + } + + /** + * The method to set the value to score + * @param {number} score A number representing the score + */ + setScore(score) { + if((score != null) && (!(Object.prototype.toString.call(score) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: score EXPECTED TYPE: number", null, null); + } + this.score = score; + this.keyModified.set("Score", 1); + + } + + /** + * The method to get the positiveScore + * @returns {number} A number representing the positiveScore + */ + getPositiveScore() { + return this.positiveScore; + + } + + /** + * The method to set the value to positiveScore + * @param {number} positiveScore A number representing the positiveScore + */ + setPositiveScore(positiveScore) { + if((positiveScore != null) && (!(Object.prototype.toString.call(positiveScore) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: positiveScore EXPECTED TYPE: number", null, null); + } + this.positiveScore = positiveScore; + this.keyModified.set("Positive_Score", 1); + + } + + /** + * The method to get the touchPointScore + * @returns {number} A number representing the touchPointScore + */ + getTouchPointScore() { + return this.touchPointScore; + + } + + /** + * The method to set the value to touchPointScore + * @param {number} touchPointScore A number representing the touchPointScore + */ + setTouchPointScore(touchPointScore) { + if((touchPointScore != null) && (!(Object.prototype.toString.call(touchPointScore) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: touchPointScore EXPECTED TYPE: number", null, null); + } + this.touchPointScore = touchPointScore; + this.keyModified.set("Touch_Point_Score", 1); + + } + + /** + * The method to get the negativeScore + * @returns {number} A number representing the negativeScore + */ + getNegativeScore() { + return this.negativeScore; + + } + + /** + * The method to set the value to negativeScore + * @param {number} negativeScore A number representing the negativeScore + */ + setNegativeScore(negativeScore) { + if((negativeScore != null) && (!(Object.prototype.toString.call(negativeScore) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: negativeScore EXPECTED TYPE: number", null, null); + } + this.negativeScore = negativeScore; + this.keyModified.set("Negative_Score", 1); + + } + + /** + * The method to get the entity + * @returns {EntityStructureGroup} An instance of EntityStructureGroup + */ + getEntity() { + return this.entity; + + } + + /** + * The method to set the value to entity + * @param {EntityStructureGroup} entity An instance of EntityStructureGroup + */ + setEntity(entity) { + this.entity = entity; + this.keyModified.set("Entity", 1); + + } + + /** + * The method to get the scoringRule + * @returns {ScoringRuleStructure} An instance of ScoringRuleStructure + */ + getScoringRule() { + return this.scoringRule; + + } + + /** + * The method to set the value to scoringRule + * @param {ScoringRuleStructure} scoringRule An instance of ScoringRuleStructure + */ + async setScoringRule(scoringRule) { + const ScoringRuleStructure = (await (import("./scoring_rule_structure.js"))).MasterModel; + if((scoringRule != null) && (!(scoringRule instanceof ScoringRuleStructure))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: scoringRule EXPECTED TYPE: ScoringRuleStructure", null, null); + } + this.scoringRule = scoringRule; + this.keyModified.set("Scoring_Rule", 1); + + } + + /** + * The method to get the touchPointNegativeScore + * @returns {number} A number representing the touchPointNegativeScore + */ + getTouchPointNegativeScore() { + return this.touchPointNegativeScore; + + } + + /** + * The method to set the value to touchPointNegativeScore + * @param {number} touchPointNegativeScore A number representing the touchPointNegativeScore + */ + setTouchPointNegativeScore(touchPointNegativeScore) { + if((touchPointNegativeScore != null) && (!(Object.prototype.toString.call(touchPointNegativeScore) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: touchPointNegativeScore EXPECTED TYPE: number", null, null); + } + this.touchPointNegativeScore = touchPointNegativeScore; + this.keyModified.set("Touch_Point_Negative_Score", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the touchPointPositiveScore + * @returns {number} A number representing the touchPointPositiveScore + */ + getTouchPointPositiveScore() { + return this.touchPointPositiveScore; + + } + + /** + * The method to set the value to touchPointPositiveScore + * @param {number} touchPointPositiveScore A number representing the touchPointPositiveScore + */ + setTouchPointPositiveScore(touchPointPositiveScore) { + if((touchPointPositiveScore != null) && (!(Object.prototype.toString.call(touchPointPositiveScore) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: touchPointPositiveScore EXPECTED TYPE: number", null, null); + } + this.touchPointPositiveScore = touchPointPositiveScore; + this.keyModified.set("Touch_Point_Positive_Score", 1); + + } + + /** + * The method to get the fieldStates + * @returns {Array} An Array representing the fieldStates + */ + getFieldStates() { + return this.fieldStates; + + } + + /** + * The method to set the value to fieldStates + * @param {Array} fieldStates An Array representing the fieldStates + */ + setFieldStates(fieldStates) { + if((fieldStates != null) && (!(Object.prototype.toString.call(fieldStates) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldStates EXPECTED TYPE: Array", null, null); + } + this.fieldStates = fieldStates; + this.keyModified.set("$field_states", 1); + + } + + /** + * The method to get the ziaVisions + * @returns {Boolean} A Boolean representing the ziaVisions + */ + getZiaVisions() { + return this.ziaVisions; + + } + + /** + * The method to set the value to ziaVisions + * @param {Boolean} ziaVisions A Boolean representing the ziaVisions + */ + setZiaVisions(ziaVisions) { + if((ziaVisions != null) && (!(Object.prototype.toString.call(ziaVisions) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ziaVisions EXPECTED TYPE: Boolean", null, null); + } + this.ziaVisions = ziaVisions; + this.keyModified.set("$zia_visions", 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 { + EntityScores as MasterModel, + EntityScores as EntityScores +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_scores_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_scores_operations.js new file mode 100644 index 0000000..eb071b6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_scores_operations.js @@ -0,0 +1,87 @@ +import {Param} from "../../../../../../routes/param.js"; +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 EntityScoresOperations{ + + fields; + /** + * Creates an instance of EntityScoresOperations with the given parameters + * @param {String} fields A String representing the fields + */ + constructor(fields=null){ + if((fields != null) && (!(Object.prototype.toString.call(fields) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: String", null, null); + } + this.fields = fields; + + } + + /** + * The method to get module + * @param {BigInt} recordId A BigInt representing the recordId + * @param {String} module A String representing the module + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getModule(recordId, module) { + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/Entity_Scores__s"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addParam(new Param("fields", "com.zoho.crm.api.EntityScores.GetModuleParam"), this.fields).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to get modules + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getModules() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Entity_Scores__s"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addParam(new Param("fields", "com.zoho.crm.api.EntityScores.GetModulesParam"), this.fields).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + +} +class GetModuleParam{ + +} + +class GetModulesParam{ + +} + +export { + GetModuleParam as GetModuleParam, + GetModulesParam as GetModulesParam, + EntityScoresOperations as MasterModel, + EntityScoresOperations as EntityScoresOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_structure.js b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_structure.js new file mode 100644 index 0000000..6d22936 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_structure.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class EntityStructure{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + EntityStructure as MasterModel, + EntityStructure as EntityStructure +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_structure_group.js b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_structure_group.js new file mode 100644 index 0000000..d332ef9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_structure_group.js @@ -0,0 +1,7 @@ +class EntityStructureGroup{ + +} +export { + EntityStructureGroup as MasterModel, + EntityStructureGroup as EntityStructureGroup +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_structure_with_module.js b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_structure_with_module.js new file mode 100644 index 0000000..4d57fc9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/entity_structure_with_module.js @@ -0,0 +1,113 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class EntityStructureWithModule{ + + name; + id; + module; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the module + * @returns {ModuleStructure} An instance of ModuleStructure + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {ModuleStructure} module An instance of ModuleStructure + */ + async setModule(module) { + const ModuleStructure = (await (import("./module_structure.js"))).MasterModel; + if((module != null) && (!(module instanceof ModuleStructure))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: ModuleStructure", null, null); + } + this.module = module; + this.keyModified.set("module", 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 { + EntityStructureWithModule as MasterModel, + EntityStructureWithModule as EntityStructureWithModule +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/import_entity_scores.js b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/import_entity_scores.js new file mode 100644 index 0000000..73919ea --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/import_entity_scores.js @@ -0,0 +1,13 @@ +export { ScoringRuleStructure } from "./scoring_rule_structure.js"; +export * as ResponseHandler from "./response_handler.js"; +export { EntityScores } from "./entity_scores.js"; +export { Info } from "./info.js"; +export { APIException } from "./api_exception.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { EntityStructureWithModule } from "./entity_structure_with_module.js"; +export * as EntityStructureGroup from "./entity_structure_group.js"; +export { ModuleStructure } from "./module_structure.js"; +export { EntityScoresOperations } from "./entity_scores_operations.js"; +export { GetModuleParam } from "./entity_scores_operations.js"; +export { GetModulesParam } from "./entity_scores_operations.js"; +export { EntityStructure } from "./entity_structure.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/info.js new file mode 100644 index 0000000..f933742 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/info.js @@ -0,0 +1,250 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + perPage; + nextPageToken; + count; + sortBy; + page; + previousPageToken; + pageTokenExpiry; + sortOrder; + moreRecords; + keyModified = new Map(); + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the nextPageToken + * @returns {String} A String representing the nextPageToken + */ + getNextPageToken() { + return this.nextPageToken; + + } + + /** + * The method to set the value to nextPageToken + * @param {String} nextPageToken A String representing the nextPageToken + */ + setNextPageToken(nextPageToken) { + if((nextPageToken != null) && (!(Object.prototype.toString.call(nextPageToken) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: nextPageToken EXPECTED TYPE: String", null, null); + } + this.nextPageToken = nextPageToken; + this.keyModified.set("next_page_token", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the sortBy + * @returns {String} A String representing the sortBy + */ + getSortBy() { + return this.sortBy; + + } + + /** + * The method to set the value to sortBy + * @param {String} sortBy A String representing the sortBy + */ + setSortBy(sortBy) { + if((sortBy != null) && (!(Object.prototype.toString.call(sortBy) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortBy EXPECTED TYPE: String", null, null); + } + this.sortBy = sortBy; + this.keyModified.set("sort_by", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the previousPageToken + * @returns {String} A String representing the previousPageToken + */ + getPreviousPageToken() { + return this.previousPageToken; + + } + + /** + * The method to set the value to previousPageToken + * @param {String} previousPageToken A String representing the previousPageToken + */ + setPreviousPageToken(previousPageToken) { + if((previousPageToken != null) && (!(Object.prototype.toString.call(previousPageToken) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: previousPageToken EXPECTED TYPE: String", null, null); + } + this.previousPageToken = previousPageToken; + this.keyModified.set("previous_page_token", 1); + + } + + /** + * The method to get the pageTokenExpiry + * @returns {String} A String representing the pageTokenExpiry + */ + getPageTokenExpiry() { + return this.pageTokenExpiry; + + } + + /** + * The method to set the value to pageTokenExpiry + * @param {String} pageTokenExpiry A String representing the pageTokenExpiry + */ + setPageTokenExpiry(pageTokenExpiry) { + if((pageTokenExpiry != null) && (!(Object.prototype.toString.call(pageTokenExpiry) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pageTokenExpiry EXPECTED TYPE: String", null, null); + } + this.pageTokenExpiry = pageTokenExpiry; + this.keyModified.set("page_token_expiry", 1); + + } + + /** + * The method to get the sortOrder + * @returns {String} A String representing the sortOrder + */ + getSortOrder() { + return this.sortOrder; + + } + + /** + * The method to set the value to sortOrder + * @param {String} sortOrder A String representing the sortOrder + */ + setSortOrder(sortOrder) { + if((sortOrder != null) && (!(Object.prototype.toString.call(sortOrder) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortOrder EXPECTED TYPE: String", null, null); + } + this.sortOrder = sortOrder; + this.keyModified.set("sort_order", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/module_structure.js b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/module_structure.js new file mode 100644 index 0000000..1206606 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/module_structure.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ModuleStructure{ + + apiName; + id; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + ModuleStructure as MasterModel, + ModuleStructure as ModuleStructure +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/response_wrapper.js new file mode 100644 index 0000000..4b95f85 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + data; + info; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/scoring_rule_structure.js b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/scoring_rule_structure.js new file mode 100644 index 0000000..8cfe31e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/entity_scores/scoring_rule_structure.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ScoringRuleStructure{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + ScoringRuleStructure as MasterModel, + ScoringRuleStructure as ScoringRuleStructure +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/exception/sdk_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/exception/sdk_exception.js new file mode 100644 index 0000000..76cbc13 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/exception/sdk_exception.js @@ -0,0 +1,53 @@ +/** + * This class is the common SDKException object. + */ +class SDKException extends Error { + /** + * + * @param {string} code - A String containing the Exception error code. + * @param {string} message - A String containing the Exception error message. + * @param {object} details - A key/value pair object containing the error response. + * @param {Error} cause - A Error class instance. + */ + constructor(code, message, details = null, cause = null) { + super(); + + this.code = code; + + this.message = (message === null) ? "" : message; + + this.cause = cause; + + this.details = details; + + if (this.details != null) { + this.message = this.message + JSON.stringify(this.details); + } + + if (this.cause != null) { + this.message = this.message.concat(this.cause.toString()); + } + } + + toString() { + let returnMessage = "Caused By : "; + + if (this.details != null) { + this.message = (this.message != null ? this.message : "") + JSON.stringify(this.details); + } + + if (this.code != null) { + returnMessage += this.code + " - " + this.message; + } + else { + returnMessage += this.message; + } + + return returnMessage; + } +} + +export { + SDKException as SDKException, + SDKException as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/api_exception.js new file mode 100644 index 0000000..db2d361 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/field_attachments_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/field_attachments_operations.js new file mode 100644 index 0000000..da8503f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/field_attachments_operations.js @@ -0,0 +1,67 @@ +import {Param} from "../../../../../../routes/param.js"; +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 FieldAttachmentsOperations{ + + fieldsAttachmentId; + recordId; + moduleAPIName; + /** + * Creates an instance of FieldAttachmentsOperations with the given parameters + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {BigInt} recordId A BigInt representing the recordId + * @param {BigInt} fieldsAttachmentId A BigInt representing the fieldsAttachmentId + */ + constructor(moduleAPIName, recordId, fieldsAttachmentId=null){ + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((fieldsAttachmentId != null) && (!(Object.prototype.toString.call(fieldsAttachmentId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldsAttachmentId EXPECTED TYPE: BigInt", null, null); + } + this.moduleAPIName = moduleAPIName; + this.recordId = recordId; + this.fieldsAttachmentId = fieldsAttachmentId; + + } + + /** + * The method to get field attachments + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getFieldAttachments() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.recordId.toString()); + apiPath = apiPath.concat("/actions/download_fields_attachment"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addParam(new Param("fields_attachment_id", "com.zoho.crm.api.FieldAttachments.GetFieldAttachmentsParam"), this.fieldsAttachmentId).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/x-download"); + + } + +} +class GetFieldAttachmentsParam{ + +} + +export { + FieldAttachmentsOperations as MasterModel, + FieldAttachmentsOperations as FieldAttachmentsOperations, + GetFieldAttachmentsParam as GetFieldAttachmentsParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/file_body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/file_body_wrapper.js new file mode 100644 index 0000000..ac3a3e4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/file_body_wrapper.js @@ -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 +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/import_field_attachments.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/import_field_attachments.js new file mode 100644 index 0000000..08b9734 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/import_field_attachments.js @@ -0,0 +1,5 @@ +export * as ResponseHandler from "./response_handler.js"; +export { FieldAttachmentsOperations } from "./field_attachments_operations.js"; +export { GetFieldAttachmentsParam } from "./field_attachments_operations.js"; +export { FileBodyWrapper } from "./file_body_wrapper.js"; +export { APIException } from "./api_exception.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_attachments/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/action_wrapper.js new file mode 100644 index 0000000..018a188 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + mapDependency; + keyModified = new Map(); + /** + * The method to get the mapDependency + * @returns {Array} An Array representing the mapDependency + */ + getMapDependency() { + return this.mapDependency; + + } + + /** + * The method to set the value to mapDependency + * @param {Array} mapDependency An Array representing the mapDependency + */ + setMapDependency(mapDependency) { + if((mapDependency != null) && (!(Object.prototype.toString.call(mapDependency) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: mapDependency EXPECTED TYPE: Array", null, null); + } + this.mapDependency = mapDependency; + this.keyModified.set("map_dependency", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/api_exception.js new file mode 100644 index 0000000..35bf8ba --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/body_wrapper.js new file mode 100644 index 0000000..693ce66 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/body_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + mapDependency; + info; + keyModified = new Map(); + /** + * The method to get the mapDependency + * @returns {Array} An Array representing the mapDependency + */ + getMapDependency() { + return this.mapDependency; + + } + + /** + * The method to set the value to mapDependency + * @param {Array} mapDependency An Array representing the mapDependency + */ + setMapDependency(mapDependency) { + if((mapDependency != null) && (!(Object.prototype.toString.call(mapDependency) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: mapDependency EXPECTED TYPE: Array", null, null); + } + this.mapDependency = mapDependency; + this.keyModified.set("map_dependency", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/child.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/child.js new file mode 100644 index 0000000..154bdec --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/child.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Child{ + + apiName; + id; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Child as MasterModel, + Child as Child +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/field_map_dependency_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/field_map_dependency_operations.js new file mode 100644 index 0000000..887bfbd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/field_map_dependency_operations.js @@ -0,0 +1,204 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 FieldMapDependencyOperations{ + + module; + layoutId; + /** + * Creates an instance of FieldMapDependencyOperations with the given parameters + * @param {BigInt} layoutId A BigInt representing the layoutId + * @param {String} module A String representing the module + */ + constructor(layoutId, module=null){ + if((!(Object.prototype.toString.call(layoutId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: layoutId EXPECTED TYPE: BigInt", null, null); + } + if((module != null) && (!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + this.layoutId = layoutId; + this.module = module; + + } + + /** + * The method to create map dependency + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createMapDependency(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/layouts/"); + apiPath = apiPath.concat(this.layoutId.toString()); + apiPath = apiPath.concat("/map_dependency"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + await handlerInstance.addParam(new Param("module", "com.zoho.crm.api.FieldMapDependency.CreateMapDependencyParam"), this.module).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get map dependencies + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getMapDependencies(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/layouts/"); + apiPath = apiPath.concat(this.layoutId.toString()); + apiPath = apiPath.concat("/map_dependency"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addParam(new Param("module", "com.zoho.crm.api.FieldMapDependency.GetMapDependenciesParam"), this.module).catch(err => { throw err; }); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to update map dependency + * @param {BigInt} dependencyId A BigInt representing the dependencyId + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateMapDependency(dependencyId, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(dependencyId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dependencyId EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/layouts/"); + apiPath = apiPath.concat(this.layoutId.toString()); + apiPath = apiPath.concat("/map_dependency/"); + apiPath = apiPath.concat(dependencyId.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + await handlerInstance.addParam(new Param("module", "com.zoho.crm.api.FieldMapDependency.UpdateMapDependencyParam"), this.module).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get map dependency + * @param {BigInt} dependencyId A BigInt representing the dependencyId + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getMapDependency(dependencyId) { + if((!(Object.prototype.toString.call(dependencyId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dependencyId EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/layouts/"); + apiPath = apiPath.concat(this.layoutId.toString()); + apiPath = apiPath.concat("/map_dependency/"); + apiPath = apiPath.concat(dependencyId.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addParam(new Param("module", "com.zoho.crm.api.FieldMapDependency.GetMapDependencyParam"), this.module).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to delete map dependency + * @param {BigInt} dependencyId A BigInt representing the dependencyId + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteMapDependency(dependencyId) { + if((!(Object.prototype.toString.call(dependencyId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dependencyId EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/layouts/"); + apiPath = apiPath.concat(this.layoutId.toString()); + apiPath = apiPath.concat("/map_dependency/"); + apiPath = apiPath.concat(dependencyId.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + await handlerInstance.addParam(new Param("module", "com.zoho.crm.api.FieldMapDependency.DeleteMapDependencyParam"), this.module).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class CreateMapDependencyParam{ + +} + +class GetMapDependenciesParam{ + + static PAGE = new Param("page", "com.zoho.crm.api.FieldMapDependency.GetMapDependenciesParam"); + static PER_PAGE = new Param("per_page", "com.zoho.crm.api.FieldMapDependency.GetMapDependenciesParam"); + static FILTERS = new Param("filters", "com.zoho.crm.api.FieldMapDependency.GetMapDependenciesParam"); + static LAYOUT_ID = new Param("layout_id", "com.zoho.crm.api.FieldMapDependency.GetMapDependenciesParam"); +} + +class UpdateMapDependencyParam{ + +} + +class GetMapDependencyParam{ + +} + +class DeleteMapDependencyParam{ + +} + +export { + CreateMapDependencyParam as CreateMapDependencyParam, + GetMapDependencyParam as GetMapDependencyParam, + FieldMapDependencyOperations as MasterModel, + FieldMapDependencyOperations as FieldMapDependencyOperations, + UpdateMapDependencyParam as UpdateMapDependencyParam, + GetMapDependenciesParam as GetMapDependenciesParam, + DeleteMapDependencyParam as DeleteMapDependencyParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/import_field_map_dependency.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/import_field_map_dependency.js new file mode 100644 index 0000000..c083a2c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/import_field_map_dependency.js @@ -0,0 +1,20 @@ +export { Child } from "./child.js"; +export { Info } from "./info.js"; +export * as ResponseHandler from "./response_handler.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export * as ActionResponse from "./action_response.js"; +export { PickListMapping } from "./pick_list_mapping.js"; +export { FieldMapDependencyOperations } from "./field_map_dependency_operations.js"; +export { CreateMapDependencyParam } from "./field_map_dependency_operations.js"; +export { GetMapDependenciesParam } from "./field_map_dependency_operations.js"; +export { UpdateMapDependencyParam } from "./field_map_dependency_operations.js"; +export { GetMapDependencyParam } from "./field_map_dependency_operations.js"; +export { DeleteMapDependencyParam } from "./field_map_dependency_operations.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { APIException } from "./api_exception.js"; +export { SuccessResponse } from "./success_response.js"; +export { Parent } from "./parent.js"; +export { MapDependency } from "./map_dependency.js"; +export { SubModule } from "./sub_module.js"; +export { PicklistMap } from "./picklist_map.js"; +export * as ActionHandler from "./action_handler.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/info.js new file mode 100644 index 0000000..6acaddc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/info.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + page; + perPage; + count; + moreRecords; + keyModified = new Map(); + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/map_dependency.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/map_dependency.js new file mode 100644 index 0000000..bce581a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/map_dependency.js @@ -0,0 +1,253 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MapDependency{ + + parent; + child; + pickListValues; + internal; + active; + id; + source; + category; + subModule; + keyModified = new Map(); + /** + * The method to get the parent + * @returns {Parent} An instance of Parent + */ + getParent() { + return this.parent; + + } + + /** + * The method to set the value to parent + * @param {Parent} parent An instance of Parent + */ + async setParent(parent) { + const Parent = (await (import("./parent.js"))).MasterModel; + if((parent != null) && (!(parent instanceof Parent))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: parent EXPECTED TYPE: Parent", null, null); + } + this.parent = parent; + this.keyModified.set("parent", 1); + + } + + /** + * The method to get the child + * @returns {Child} An instance of Child + */ + getChild() { + return this.child; + + } + + /** + * The method to set the value to child + * @param {Child} child An instance of Child + */ + async setChild(child) { + const Child = (await (import("./child.js"))).MasterModel; + if((child != null) && (!(child instanceof Child))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: child EXPECTED TYPE: Child", null, null); + } + this.child = child; + this.keyModified.set("child", 1); + + } + + /** + * The method to get the pickListValues + * @returns {Array} An Array representing the pickListValues + */ + getPickListValues() { + return this.pickListValues; + + } + + /** + * The method to set the value to pickListValues + * @param {Array} pickListValues An Array representing the pickListValues + */ + setPickListValues(pickListValues) { + if((pickListValues != null) && (!(Object.prototype.toString.call(pickListValues) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pickListValues EXPECTED TYPE: Array", null, null); + } + this.pickListValues = pickListValues; + this.keyModified.set("pick_list_values", 1); + + } + + /** + * The method to get the internal + * @returns {Boolean} A Boolean representing the internal + */ + getInternal() { + return this.internal; + + } + + /** + * The method to set the value to internal + * @param {Boolean} internal A Boolean representing the internal + */ + setInternal(internal) { + if((internal != null) && (!(Object.prototype.toString.call(internal) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: internal EXPECTED TYPE: Boolean", null, null); + } + this.internal = internal; + this.keyModified.set("internal", 1); + + } + + /** + * The method to get the active + * @returns {Boolean} A Boolean representing the active + */ + getActive() { + return this.active; + + } + + /** + * The method to set the value to active + * @param {Boolean} active A Boolean representing the active + */ + setActive(active) { + if((active != null) && (!(Object.prototype.toString.call(active) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: active EXPECTED TYPE: Boolean", null, null); + } + this.active = active; + this.keyModified.set("active", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the source + * @returns {number} A number representing the source + */ + getSource() { + return this.source; + + } + + /** + * The method to set the value to source + * @param {number} source A number representing the source + */ + setSource(source) { + if((source != null) && (!(Object.prototype.toString.call(source) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: source EXPECTED TYPE: number", null, null); + } + this.source = source; + this.keyModified.set("source", 1); + + } + + /** + * The method to get the category + * @returns {number} A number representing the category + */ + getCategory() { + return this.category; + + } + + /** + * The method to set the value to category + * @param {number} category A number representing the category + */ + setCategory(category) { + if((category != null) && (!(Object.prototype.toString.call(category) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: category EXPECTED TYPE: number", null, null); + } + this.category = category; + this.keyModified.set("category", 1); + + } + + /** + * The method to get the subModule + * @returns {SubModule} An instance of SubModule + */ + getSubModule() { + return this.subModule; + + } + + /** + * The method to set the value to subModule + * @param {SubModule} subModule An instance of SubModule + */ + async setSubModule(subModule) { + const SubModule = (await (import("./sub_module.js"))).MasterModel; + if((subModule != null) && (!(subModule instanceof SubModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subModule EXPECTED TYPE: SubModule", null, null); + } + this.subModule = subModule; + this.keyModified.set("sub_module", 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 { + MapDependency as MasterModel, + MapDependency as MapDependency +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/parent.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/parent.js new file mode 100644 index 0000000..49989cd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/parent.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Parent{ + + apiName; + id; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Parent as MasterModel, + Parent as Parent +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/pick_list_mapping.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/pick_list_mapping.js new file mode 100644 index 0000000..8f9149f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/pick_list_mapping.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class PickListMapping{ + + id; + actualValue; + displayValue; + maps; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the actualValue + * @returns {String} A String representing the actualValue + */ + getActualValue() { + return this.actualValue; + + } + + /** + * The method to set the value to actualValue + * @param {String} actualValue A String representing the actualValue + */ + setActualValue(actualValue) { + if((actualValue != null) && (!(Object.prototype.toString.call(actualValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: actualValue EXPECTED TYPE: String", null, null); + } + this.actualValue = actualValue; + this.keyModified.set("actual_value", 1); + + } + + /** + * The method to get the displayValue + * @returns {String} A String representing the displayValue + */ + getDisplayValue() { + return this.displayValue; + + } + + /** + * The method to set the value to displayValue + * @param {String} displayValue A String representing the displayValue + */ + setDisplayValue(displayValue) { + if((displayValue != null) && (!(Object.prototype.toString.call(displayValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayValue EXPECTED TYPE: String", null, null); + } + this.displayValue = displayValue; + this.keyModified.set("display_value", 1); + + } + + /** + * The method to get the maps + * @returns {Array} An Array representing the maps + */ + getMaps() { + return this.maps; + + } + + /** + * The method to set the value to maps + * @param {Array} maps An Array representing the maps + */ + setMaps(maps) { + if((maps != null) && (!(Object.prototype.toString.call(maps) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: maps EXPECTED TYPE: Array", null, null); + } + this.maps = maps; + this.keyModified.set("maps", 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 { + PickListMapping as MasterModel, + PickListMapping as PickListMapping +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/picklist_map.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/picklist_map.js new file mode 100644 index 0000000..3c9d97d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/picklist_map.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class PicklistMap{ + + id; + actualValue; + displayValue; + delete1; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the actualValue + * @returns {String} A String representing the actualValue + */ + getActualValue() { + return this.actualValue; + + } + + /** + * The method to set the value to actualValue + * @param {String} actualValue A String representing the actualValue + */ + setActualValue(actualValue) { + if((actualValue != null) && (!(Object.prototype.toString.call(actualValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: actualValue EXPECTED TYPE: String", null, null); + } + this.actualValue = actualValue; + this.keyModified.set("actual_value", 1); + + } + + /** + * The method to get the displayValue + * @returns {String} A String representing the displayValue + */ + getDisplayValue() { + return this.displayValue; + + } + + /** + * The method to set the value to displayValue + * @param {String} displayValue A String representing the displayValue + */ + setDisplayValue(displayValue) { + if((displayValue != null) && (!(Object.prototype.toString.call(displayValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayValue EXPECTED TYPE: String", null, null); + } + this.displayValue = displayValue; + this.keyModified.set("display_value", 1); + + } + + /** + * The method to get the delete + * @returns {Boolean} A Boolean representing the delete1 + */ + getDelete() { + return this.delete1; + + } + + /** + * The method to set the value to delete + * @param {Boolean} delete1 A Boolean representing the delete1 + */ + setDelete(delete1) { + if((delete1 != null) && (!(Object.prototype.toString.call(delete1) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: delete1 EXPECTED TYPE: Boolean", null, null); + } + this.delete1 = delete1; + this.keyModified.set("_delete", 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 { + PicklistMap as MasterModel, + PicklistMap as PicklistMap +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/sub_module.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/sub_module.js new file mode 100644 index 0000000..ec3796d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/sub_module.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SubModule{ + + apiName; + id; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + SubModule as MasterModel, + SubModule as SubModule +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/success_response.js new file mode 100644 index 0000000..e6c4d45 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/field_map_dependency/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/action_wrapper.js new file mode 100644 index 0000000..0b4f8b0 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + fields; + keyModified = new Map(); + /** + * The method to get the fields + * @returns {Array} An Array representing the fields + */ + getFields() { + return this.fields; + + } + + /** + * The method to set the value to fields + * @param {Array} fields An Array representing the fields + */ + setFields(fields) { + if((fields != null) && (!(Object.prototype.toString.call(fields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: Array", null, null); + } + this.fields = fields; + this.keyModified.set("fields", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/api_exception.js new file mode 100644 index 0000000..db2d361 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/association_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/association_details.js new file mode 100644 index 0000000..959d9d3 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/association_details.js @@ -0,0 +1,91 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AssociationDetails{ + + relatedField; + lookupField; + keyModified = new Map(); + /** + * The method to get the relatedField + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getRelatedField() { + return this.relatedField; + + } + + /** + * The method to set the value to relatedField + * @param {MinifiedModule} relatedField An instance of MinifiedModule + */ + async setRelatedField(relatedField) { + const MinifiedModule = (await (import("../modules/minified_module.js"))).MasterModel; + if((relatedField != null) && (!(relatedField instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: relatedField EXPECTED TYPE: MinifiedModule", null, null); + } + this.relatedField = relatedField; + this.keyModified.set("related_field", 1); + + } + + /** + * The method to get the lookupField + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getLookupField() { + return this.lookupField; + + } + + /** + * The method to set the value to lookupField + * @param {MinifiedModule} lookupField An instance of MinifiedModule + */ + async setLookupField(lookupField) { + const MinifiedModule = (await (import("../modules/minified_module.js"))).MasterModel; + if((lookupField != null) && (!(lookupField instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: lookupField EXPECTED TYPE: MinifiedModule", null, null); + } + this.lookupField = lookupField; + this.keyModified.set("lookup_field", 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 { + AssociationDetails as MasterModel, + AssociationDetails as AssociationDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/auto_number.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/auto_number.js new file mode 100644 index 0000000..0b9db2f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/auto_number.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AutoNumber{ + + startingNumberLength; + prefix; + suffix; + startNumber; + keyModified = new Map(); + /** + * The method to get the startingNumberLength + * @returns {number} A number representing the startingNumberLength + */ + getStartingNumberLength() { + return this.startingNumberLength; + + } + + /** + * The method to set the value to startingNumberLength + * @param {number} startingNumberLength A number representing the startingNumberLength + */ + setStartingNumberLength(startingNumberLength) { + if((startingNumberLength != null) && (!(Object.prototype.toString.call(startingNumberLength) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: startingNumberLength EXPECTED TYPE: number", null, null); + } + this.startingNumberLength = startingNumberLength; + this.keyModified.set("starting_number_length", 1); + + } + + /** + * The method to get the prefix + * @returns {String} A String representing the prefix + */ + getPrefix() { + return this.prefix; + + } + + /** + * The method to set the value to prefix + * @param {String} prefix A String representing the prefix + */ + setPrefix(prefix) { + if((prefix != null) && (!(Object.prototype.toString.call(prefix) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: prefix EXPECTED TYPE: String", null, null); + } + this.prefix = prefix; + this.keyModified.set("prefix", 1); + + } + + /** + * The method to get the suffix + * @returns {String} A String representing the suffix + */ + getSuffix() { + return this.suffix; + + } + + /** + * The method to set the value to suffix + * @param {String} suffix A String representing the suffix + */ + setSuffix(suffix) { + if((suffix != null) && (!(Object.prototype.toString.call(suffix) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: suffix EXPECTED TYPE: String", null, null); + } + this.suffix = suffix; + this.keyModified.set("suffix", 1); + + } + + /** + * The method to get the startNumber + * @returns {number} A number representing the startNumber + */ + getStartNumber() { + return this.startNumber; + + } + + /** + * The method to set the value to startNumber + * @param {number} startNumber A number representing the startNumber + */ + setStartNumber(startNumber) { + if((startNumber != null) && (!(Object.prototype.toString.call(startNumber) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: startNumber EXPECTED TYPE: number", null, null); + } + this.startNumber = startNumber; + this.keyModified.set("start_number", 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 { + AutoNumber as MasterModel, + AutoNumber as AutoNumber +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/body_wrapper.js new file mode 100644 index 0000000..d8761f9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + fields; + keyModified = new Map(); + /** + * The method to get the fields + * @returns {Array} An Array representing the fields + */ + getFields() { + return this.fields; + + } + + /** + * The method to set the value to fields + * @param {Array} fields An Array representing the fields + */ + setFields(fields) { + if((fields != null) && (!(Object.prototype.toString.call(fields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: Array", null, null); + } + this.fields = fields; + this.keyModified.set("fields", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/convert_mapping.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/convert_mapping.js new file mode 100644 index 0000000..3d62f0d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/convert_mapping.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ConvertMapping{ + + contacts; + deals; + accounts; + keyModified = new Map(); + /** + * The method to get the contacts + * @returns {String} A String representing the contacts + */ + getContacts() { + return this.contacts; + + } + + /** + * The method to set the value to contacts + * @param {String} contacts A String representing the contacts + */ + setContacts(contacts) { + if((contacts != null) && (!(Object.prototype.toString.call(contacts) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: contacts EXPECTED TYPE: String", null, null); + } + this.contacts = contacts; + this.keyModified.set("Contacts", 1); + + } + + /** + * The method to get the deals + * @returns {String} A String representing the deals + */ + getDeals() { + return this.deals; + + } + + /** + * The method to set the value to deals + * @param {String} deals A String representing the deals + */ + setDeals(deals) { + if((deals != null) && (!(Object.prototype.toString.call(deals) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deals EXPECTED TYPE: String", null, null); + } + this.deals = deals; + this.keyModified.set("Deals", 1); + + } + + /** + * The method to get the accounts + * @returns {String} A String representing the accounts + */ + getAccounts() { + return this.accounts; + + } + + /** + * The method to set the value to accounts + * @param {String} accounts A String representing the accounts + */ + setAccounts(accounts) { + if((accounts != null) && (!(Object.prototype.toString.call(accounts) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: accounts EXPECTED TYPE: String", null, null); + } + this.accounts = accounts; + this.keyModified.set("Accounts", 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 { + ConvertMapping as MasterModel, + ConvertMapping as ConvertMapping +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/crypt.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/crypt.js new file mode 100644 index 0000000..1676b8f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/crypt.js @@ -0,0 +1,181 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Crypt{ + + mode; + column; + table; + status; + encfldids; + notify; + keyModified = new Map(); + /** + * The method to get the mode + * @returns {String} A String representing the mode + */ + getMode() { + return this.mode; + + } + + /** + * The method to set the value to mode + * @param {String} mode A String representing the mode + */ + setMode(mode) { + if((mode != null) && (!(Object.prototype.toString.call(mode) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: mode EXPECTED TYPE: String", null, null); + } + this.mode = mode; + this.keyModified.set("mode", 1); + + } + + /** + * The method to get the column + * @returns {String} A String representing the column + */ + getColumn() { + return this.column; + + } + + /** + * The method to set the value to column + * @param {String} column A String representing the column + */ + setColumn(column) { + if((column != null) && (!(Object.prototype.toString.call(column) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: column EXPECTED TYPE: String", null, null); + } + this.column = column; + this.keyModified.set("column", 1); + + } + + /** + * The method to get the table + * @returns {String} A String representing the table + */ + getTable() { + return this.table; + + } + + /** + * The method to set the value to table + * @param {String} table A String representing the table + */ + setTable(table) { + if((table != null) && (!(Object.prototype.toString.call(table) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: table EXPECTED TYPE: String", null, null); + } + this.table = table; + this.keyModified.set("table", 1); + + } + + /** + * The method to get the status + * @returns {number} A number representing the status + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {number} status A number representing the status + */ + setStatus(status) { + if((status != null) && (!(Object.prototype.toString.call(status) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: number", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the encfldids + * @returns {Array} An Array representing the encfldids + */ + getEncfldids() { + return this.encfldids; + + } + + /** + * The method to set the value to encfldids + * @param {Array} encfldids An Array representing the encfldids + */ + setEncfldids(encfldids) { + if((encfldids != null) && (!(Object.prototype.toString.call(encfldids) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: encfldids EXPECTED TYPE: Array", null, null); + } + this.encfldids = encfldids; + this.keyModified.set("encFldIds", 1); + + } + + /** + * The method to get the notify + * @returns {String} A String representing the notify + */ + getNotify() { + return this.notify; + + } + + /** + * The method to set the value to notify + * @param {String} notify A String representing the notify + */ + setNotify(notify) { + if((notify != null) && (!(Object.prototype.toString.call(notify) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: notify EXPECTED TYPE: String", null, null); + } + this.notify = notify; + this.keyModified.set("notify", 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 { + Crypt as MasterModel, + Crypt as Crypt +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/currency.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/currency.js new file mode 100644 index 0000000..fb36dc9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/currency.js @@ -0,0 +1,90 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Currency{ + + roundingOption; + precision; + keyModified = new Map(); + /** + * The method to get the roundingOption + * @returns {Choice} An instance of Choice + */ + getRoundingOption() { + return this.roundingOption; + + } + + /** + * The method to set the value to roundingOption + * @param {Choice} roundingOption An instance of Choice + */ + setRoundingOption(roundingOption) { + if((roundingOption != null) && (!(roundingOption instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: roundingOption EXPECTED TYPE: Choice", null, null); + } + this.roundingOption = roundingOption; + this.keyModified.set("rounding_option", 1); + + } + + /** + * The method to get the precision + * @returns {number} A number representing the precision + */ + getPrecision() { + return this.precision; + + } + + /** + * The method to set the value to precision + * @param {number} precision A number representing the precision + */ + setPrecision(precision) { + if((precision != null) && (!(Object.prototype.toString.call(precision) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: precision EXPECTED TYPE: number", null, null); + } + this.precision = precision; + this.keyModified.set("precision", 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 { + Currency as MasterModel, + Currency as Currency +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/email_parser.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/email_parser.js new file mode 100644 index 0000000..1a15149 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/email_parser.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class EmailParser{ + + fieldsUpdateSupported; + recordOperationsSupported; + keyModified = new Map(); + /** + * The method to get the fieldsUpdateSupported + * @returns {Boolean} A Boolean representing the fieldsUpdateSupported + */ + getFieldsUpdateSupported() { + return this.fieldsUpdateSupported; + + } + + /** + * The method to set the value to fieldsUpdateSupported + * @param {Boolean} fieldsUpdateSupported A Boolean representing the fieldsUpdateSupported + */ + setFieldsUpdateSupported(fieldsUpdateSupported) { + if((fieldsUpdateSupported != null) && (!(Object.prototype.toString.call(fieldsUpdateSupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldsUpdateSupported EXPECTED TYPE: Boolean", null, null); + } + this.fieldsUpdateSupported = fieldsUpdateSupported; + this.keyModified.set("fields_update_supported", 1); + + } + + /** + * The method to get the recordOperationsSupported + * @returns {Boolean} A Boolean representing the recordOperationsSupported + */ + getRecordOperationsSupported() { + return this.recordOperationsSupported; + + } + + /** + * The method to set the value to recordOperationsSupported + * @param {Boolean} recordOperationsSupported A Boolean representing the recordOperationsSupported + */ + setRecordOperationsSupported(recordOperationsSupported) { + if((recordOperationsSupported != null) && (!(Object.prototype.toString.call(recordOperationsSupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordOperationsSupported EXPECTED TYPE: Boolean", null, null); + } + this.recordOperationsSupported = recordOperationsSupported; + this.keyModified.set("record_operations_supported", 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 { + EmailParser as MasterModel, + EmailParser as EmailParser +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/expression.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/expression.js new file mode 100644 index 0000000..56d53c2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/expression.js @@ -0,0 +1,113 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Expression{ + + functionParameters; + criteria; + function1; + keyModified = new Map(); + /** + * The method to get the functionParameters + * @returns {Array} An Array representing the functionParameters + */ + getFunctionParameters() { + return this.functionParameters; + + } + + /** + * The method to set the value to functionParameters + * @param {Array} functionParameters An Array representing the functionParameters + */ + setFunctionParameters(functionParameters) { + if((functionParameters != null) && (!(Object.prototype.toString.call(functionParameters) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: functionParameters EXPECTED TYPE: Array", null, null); + } + this.functionParameters = functionParameters; + this.keyModified.set("function_parameters", 1); + + } + + /** + * The method to get the criteria + * @returns {RollupCriteria} An instance of RollupCriteria + */ + getCriteria() { + return this.criteria; + + } + + /** + * The method to set the value to criteria + * @param {RollupCriteria} criteria An instance of RollupCriteria + */ + async setCriteria(criteria) { + const RollupCriteria = (await (import("./rollup_criteria.js"))).MasterModel; + if((criteria != null) && (!(criteria instanceof RollupCriteria))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: criteria EXPECTED TYPE: RollupCriteria", null, null); + } + this.criteria = criteria; + this.keyModified.set("criteria", 1); + + } + + /** + * The method to get the function + * @returns {String} A String representing the function1 + */ + getFunction() { + return this.function1; + + } + + /** + * The method to set the value to function + * @param {String} function1 A String representing the function1 + */ + setFunction(function1) { + if((function1 != null) && (!(Object.prototype.toString.call(function1) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: function1 EXPECTED TYPE: String", null, null); + } + this.function1 = function1; + this.keyModified.set("function", 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 { + Expression as MasterModel, + Expression as Expression +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/external.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/external.js new file mode 100644 index 0000000..4cb7f60 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/external.js @@ -0,0 +1,113 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class External{ + + show; + type; + allowMultipleConfig; + keyModified = new Map(); + /** + * The method to get the show + * @returns {Boolean} A Boolean representing the show + */ + getShow() { + return this.show; + + } + + /** + * The method to set the value to show + * @param {Boolean} show A Boolean representing the show + */ + setShow(show) { + if((show != null) && (!(Object.prototype.toString.call(show) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: show EXPECTED TYPE: Boolean", null, null); + } + this.show = show; + this.keyModified.set("show", 1); + + } + + /** + * The method to get the type + * @returns {Choice} An instance of Choice + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {Choice} type An instance of Choice + */ + setType(type) { + if((type != null) && (!(type instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: Choice", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the allowMultipleConfig + * @returns {Boolean} A Boolean representing the allowMultipleConfig + */ + getAllowMultipleConfig() { + return this.allowMultipleConfig; + + } + + /** + * The method to set the value to allowMultipleConfig + * @param {Boolean} allowMultipleConfig A Boolean representing the allowMultipleConfig + */ + setAllowMultipleConfig(allowMultipleConfig) { + if((allowMultipleConfig != null) && (!(Object.prototype.toString.call(allowMultipleConfig) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: allowMultipleConfig EXPECTED TYPE: Boolean", null, null); + } + this.allowMultipleConfig = allowMultipleConfig; + this.keyModified.set("allow_multiple_config", 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 { + External as MasterModel, + External as External +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/fields.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/fields.js new file mode 100644 index 0000000..d669cc6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/fields.js @@ -0,0 +1,1652 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Fields{ + + associatedModule; + operationType; + dataType; + systemMandatory; + webhook; + sequenceNumber; + defaultValue; + blueprintSupported; + virtualField; + fieldReadOnly; + readOnly; + customField; + businesscardSupported; + filterable; + visible; + availableInUserLayout; + displayField; + pickListValuesSortedLexically; + sortable; + separator; + searchable; + enableColourCode; + massUpdate; + jsonType; + createdSource; + type; + displayLabel; + columnName; + apiName; + displayType; + uiType; + length; + decimalPlace; + quickSequenceNumber; + emailParser; + rollupSummary; + referFromField; + createdTime; + modifiedTime; + showType; + category; + id; + multiModuleLookup; + sharingProperties; + currency; + fileUpoladOptionlist; + lookup; + profiles; + viewType; + unique; + subModule; + external; + formula; + private1; + convertMapping; + multiselectlookup; + multiuserlookup; + autoNumber; + pickListValues; + crypt; + tooltip; + historyTracking; + associationDetails; + allowedModules; + additionalColumn; + fieldLabel; + globalPicklist; + hipaaComplianceEnabled; + hipaaCompliance; + keyModified = new Map(); + /** + * The method to get the associatedModule + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getAssociatedModule() { + return this.associatedModule; + + } + + /** + * The method to set the value to associatedModule + * @param {MinifiedModule} associatedModule An instance of MinifiedModule + */ + async setAssociatedModule(associatedModule) { + const MinifiedModule = (await (import("../modules/minified_module.js"))).MasterModel; + if((associatedModule != null) && (!(associatedModule instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: associatedModule EXPECTED TYPE: MinifiedModule", null, null); + } + this.associatedModule = associatedModule; + this.keyModified.set("associated_module", 1); + + } + + /** + * The method to get the operationType + * @returns {OperationType} An instance of OperationType + */ + getOperationType() { + return this.operationType; + + } + + /** + * The method to set the value to operationType + * @param {OperationType} operationType An instance of OperationType + */ + async setOperationType(operationType) { + const OperationType = (await (import("./operation_type.js"))).MasterModel; + if((operationType != null) && (!(operationType instanceof OperationType))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: operationType EXPECTED TYPE: OperationType", null, null); + } + this.operationType = operationType; + this.keyModified.set("operation_type", 1); + + } + + /** + * The method to get the dataType + * @returns {Choice} An instance of Choice + */ + getDataType() { + return this.dataType; + + } + + /** + * The method to set the value to dataType + * @param {Choice} dataType An instance of Choice + */ + setDataType(dataType) { + if((dataType != null) && (!(dataType instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dataType EXPECTED TYPE: Choice", null, null); + } + this.dataType = dataType; + this.keyModified.set("data_type", 1); + + } + + /** + * The method to get the systemMandatory + * @returns {Boolean} A Boolean representing the systemMandatory + */ + getSystemMandatory() { + return this.systemMandatory; + + } + + /** + * The method to set the value to systemMandatory + * @param {Boolean} systemMandatory A Boolean representing the systemMandatory + */ + setSystemMandatory(systemMandatory) { + if((systemMandatory != null) && (!(Object.prototype.toString.call(systemMandatory) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: systemMandatory EXPECTED TYPE: Boolean", null, null); + } + this.systemMandatory = systemMandatory; + this.keyModified.set("system_mandatory", 1); + + } + + /** + * The method to get the webhook + * @returns {Boolean} A Boolean representing the webhook + */ + getWebhook() { + return this.webhook; + + } + + /** + * The method to set the value to webhook + * @param {Boolean} webhook A Boolean representing the webhook + */ + setWebhook(webhook) { + if((webhook != null) && (!(Object.prototype.toString.call(webhook) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: webhook EXPECTED TYPE: Boolean", null, null); + } + this.webhook = webhook; + this.keyModified.set("webhook", 1); + + } + + /** + * The method to get the sequenceNumber + * @returns {number} A number representing the sequenceNumber + */ + getSequenceNumber() { + return this.sequenceNumber; + + } + + /** + * The method to set the value to sequenceNumber + * @param {number} sequenceNumber A number representing the sequenceNumber + */ + setSequenceNumber(sequenceNumber) { + if((sequenceNumber != null) && (!(Object.prototype.toString.call(sequenceNumber) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sequenceNumber EXPECTED TYPE: number", null, null); + } + this.sequenceNumber = sequenceNumber; + this.keyModified.set("sequence_number", 1); + + } + + /** + * The method to get the defaultValue + * @returns {String} A String representing the defaultValue + */ + getDefaultValue() { + return this.defaultValue; + + } + + /** + * The method to set the value to defaultValue + * @param {String} defaultValue A String representing the defaultValue + */ + setDefaultValue(defaultValue) { + if((defaultValue != null) && (!(Object.prototype.toString.call(defaultValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: defaultValue EXPECTED TYPE: String", null, null); + } + this.defaultValue = defaultValue; + this.keyModified.set("default_value", 1); + + } + + /** + * The method to get the blueprintSupported + * @returns {Boolean} A Boolean representing the blueprintSupported + */ + getBlueprintSupported() { + return this.blueprintSupported; + + } + + /** + * The method to set the value to blueprintSupported + * @param {Boolean} blueprintSupported A Boolean representing the blueprintSupported + */ + setBlueprintSupported(blueprintSupported) { + if((blueprintSupported != null) && (!(Object.prototype.toString.call(blueprintSupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: blueprintSupported EXPECTED TYPE: Boolean", null, null); + } + this.blueprintSupported = blueprintSupported; + this.keyModified.set("blueprint_supported", 1); + + } + + /** + * The method to get the virtualField + * @returns {Boolean} A Boolean representing the virtualField + */ + getVirtualField() { + return this.virtualField; + + } + + /** + * The method to set the value to virtualField + * @param {Boolean} virtualField A Boolean representing the virtualField + */ + setVirtualField(virtualField) { + if((virtualField != null) && (!(Object.prototype.toString.call(virtualField) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: virtualField EXPECTED TYPE: Boolean", null, null); + } + this.virtualField = virtualField; + this.keyModified.set("virtual_field", 1); + + } + + /** + * The method to get the fieldReadOnly + * @returns {Boolean} A Boolean representing the fieldReadOnly + */ + getFieldReadOnly() { + return this.fieldReadOnly; + + } + + /** + * The method to set the value to fieldReadOnly + * @param {Boolean} fieldReadOnly A Boolean representing the fieldReadOnly + */ + setFieldReadOnly(fieldReadOnly) { + if((fieldReadOnly != null) && (!(Object.prototype.toString.call(fieldReadOnly) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldReadOnly EXPECTED TYPE: Boolean", null, null); + } + this.fieldReadOnly = fieldReadOnly; + this.keyModified.set("field_read_only", 1); + + } + + /** + * The method to get the readOnly + * @returns {Boolean} A Boolean representing the readOnly + */ + getReadOnly() { + return this.readOnly; + + } + + /** + * The method to set the value to readOnly + * @param {Boolean} readOnly A Boolean representing the readOnly + */ + setReadOnly(readOnly) { + if((readOnly != null) && (!(Object.prototype.toString.call(readOnly) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: readOnly EXPECTED TYPE: Boolean", null, null); + } + this.readOnly = readOnly; + this.keyModified.set("read_only", 1); + + } + + /** + * The method to get the customField + * @returns {Boolean} A Boolean representing the customField + */ + getCustomField() { + return this.customField; + + } + + /** + * The method to set the value to customField + * @param {Boolean} customField A Boolean representing the customField + */ + setCustomField(customField) { + if((customField != null) && (!(Object.prototype.toString.call(customField) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: customField EXPECTED TYPE: Boolean", null, null); + } + this.customField = customField; + this.keyModified.set("custom_field", 1); + + } + + /** + * The method to get the businesscardSupported + * @returns {Boolean} A Boolean representing the businesscardSupported + */ + getBusinesscardSupported() { + return this.businesscardSupported; + + } + + /** + * The method to set the value to businesscardSupported + * @param {Boolean} businesscardSupported A Boolean representing the businesscardSupported + */ + setBusinesscardSupported(businesscardSupported) { + if((businesscardSupported != null) && (!(Object.prototype.toString.call(businesscardSupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: businesscardSupported EXPECTED TYPE: Boolean", null, null); + } + this.businesscardSupported = businesscardSupported; + this.keyModified.set("businesscard_supported", 1); + + } + + /** + * The method to get the filterable + * @returns {Boolean} A Boolean representing the filterable + */ + getFilterable() { + return this.filterable; + + } + + /** + * The method to set the value to filterable + * @param {Boolean} filterable A Boolean representing the filterable + */ + setFilterable(filterable) { + if((filterable != null) && (!(Object.prototype.toString.call(filterable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: filterable EXPECTED TYPE: Boolean", null, null); + } + this.filterable = filterable; + this.keyModified.set("filterable", 1); + + } + + /** + * The method to get the visible + * @returns {Boolean} A Boolean representing the visible + */ + getVisible() { + return this.visible; + + } + + /** + * The method to set the value to visible + * @param {Boolean} visible A Boolean representing the visible + */ + setVisible(visible) { + if((visible != null) && (!(Object.prototype.toString.call(visible) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: visible EXPECTED TYPE: Boolean", null, null); + } + this.visible = visible; + this.keyModified.set("visible", 1); + + } + + /** + * The method to get the availableInUserLayout + * @returns {Boolean} A Boolean representing the availableInUserLayout + */ + getAvailableInUserLayout() { + return this.availableInUserLayout; + + } + + /** + * The method to set the value to availableInUserLayout + * @param {Boolean} availableInUserLayout A Boolean representing the availableInUserLayout + */ + setAvailableInUserLayout(availableInUserLayout) { + if((availableInUserLayout != null) && (!(Object.prototype.toString.call(availableInUserLayout) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: availableInUserLayout EXPECTED TYPE: Boolean", null, null); + } + this.availableInUserLayout = availableInUserLayout; + this.keyModified.set("available_in_user_layout", 1); + + } + + /** + * The method to get the displayField + * @returns {Boolean} A Boolean representing the displayField + */ + getDisplayField() { + return this.displayField; + + } + + /** + * The method to set the value to displayField + * @param {Boolean} displayField A Boolean representing the displayField + */ + setDisplayField(displayField) { + if((displayField != null) && (!(Object.prototype.toString.call(displayField) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayField EXPECTED TYPE: Boolean", null, null); + } + this.displayField = displayField; + this.keyModified.set("display_field", 1); + + } + + /** + * The method to get the pickListValuesSortedLexically + * @returns {Boolean} A Boolean representing the pickListValuesSortedLexically + */ + getPickListValuesSortedLexically() { + return this.pickListValuesSortedLexically; + + } + + /** + * The method to set the value to pickListValuesSortedLexically + * @param {Boolean} pickListValuesSortedLexically A Boolean representing the pickListValuesSortedLexically + */ + setPickListValuesSortedLexically(pickListValuesSortedLexically) { + if((pickListValuesSortedLexically != null) && (!(Object.prototype.toString.call(pickListValuesSortedLexically) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pickListValuesSortedLexically EXPECTED TYPE: Boolean", null, null); + } + this.pickListValuesSortedLexically = pickListValuesSortedLexically; + this.keyModified.set("pick_list_values_sorted_lexically", 1); + + } + + /** + * The method to get the sortable + * @returns {Boolean} A Boolean representing the sortable + */ + getSortable() { + return this.sortable; + + } + + /** + * The method to set the value to sortable + * @param {Boolean} sortable A Boolean representing the sortable + */ + setSortable(sortable) { + if((sortable != null) && (!(Object.prototype.toString.call(sortable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortable EXPECTED TYPE: Boolean", null, null); + } + this.sortable = sortable; + this.keyModified.set("sortable", 1); + + } + + /** + * The method to get the separator + * @returns {Boolean} A Boolean representing the separator + */ + getSeparator() { + return this.separator; + + } + + /** + * The method to set the value to separator + * @param {Boolean} separator A Boolean representing the separator + */ + setSeparator(separator) { + if((separator != null) && (!(Object.prototype.toString.call(separator) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: separator EXPECTED TYPE: Boolean", null, null); + } + this.separator = separator; + this.keyModified.set("separator", 1); + + } + + /** + * The method to get the searchable + * @returns {Boolean} A Boolean representing the searchable + */ + getSearchable() { + return this.searchable; + + } + + /** + * The method to set the value to searchable + * @param {Boolean} searchable A Boolean representing the searchable + */ + setSearchable(searchable) { + if((searchable != null) && (!(Object.prototype.toString.call(searchable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: searchable EXPECTED TYPE: Boolean", null, null); + } + this.searchable = searchable; + this.keyModified.set("searchable", 1); + + } + + /** + * The method to get the enableColourCode + * @returns {Boolean} A Boolean representing the enableColourCode + */ + getEnableColourCode() { + return this.enableColourCode; + + } + + /** + * The method to set the value to enableColourCode + * @param {Boolean} enableColourCode A Boolean representing the enableColourCode + */ + setEnableColourCode(enableColourCode) { + if((enableColourCode != null) && (!(Object.prototype.toString.call(enableColourCode) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: enableColourCode EXPECTED TYPE: Boolean", null, null); + } + this.enableColourCode = enableColourCode; + this.keyModified.set("enable_colour_code", 1); + + } + + /** + * The method to get the massUpdate + * @returns {Boolean} A Boolean representing the massUpdate + */ + getMassUpdate() { + return this.massUpdate; + + } + + /** + * The method to set the value to massUpdate + * @param {Boolean} massUpdate A Boolean representing the massUpdate + */ + setMassUpdate(massUpdate) { + if((massUpdate != null) && (!(Object.prototype.toString.call(massUpdate) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: massUpdate EXPECTED TYPE: Boolean", null, null); + } + this.massUpdate = massUpdate; + this.keyModified.set("mass_update", 1); + + } + + /** + * The method to get the jsonType + * @returns {String} A String representing the jsonType + */ + getJsonType() { + return this.jsonType; + + } + + /** + * The method to set the value to jsonType + * @param {String} jsonType A String representing the jsonType + */ + setJsonType(jsonType) { + if((jsonType != null) && (!(Object.prototype.toString.call(jsonType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jsonType EXPECTED TYPE: String", null, null); + } + this.jsonType = jsonType; + this.keyModified.set("json_type", 1); + + } + + /** + * The method to get the createdSource + * @returns {String} A String representing the createdSource + */ + getCreatedSource() { + return this.createdSource; + + } + + /** + * The method to set the value to createdSource + * @param {String} createdSource A String representing the createdSource + */ + setCreatedSource(createdSource) { + if((createdSource != null) && (!(Object.prototype.toString.call(createdSource) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdSource EXPECTED TYPE: String", null, null); + } + this.createdSource = createdSource; + this.keyModified.set("created_source", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the columnName + * @returns {String} A String representing the columnName + */ + getColumnName() { + return this.columnName; + + } + + /** + * The method to set the value to columnName + * @param {String} columnName A String representing the columnName + */ + setColumnName(columnName) { + if((columnName != null) && (!(Object.prototype.toString.call(columnName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: columnName EXPECTED TYPE: String", null, null); + } + this.columnName = columnName; + this.keyModified.set("column_name", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the displayType + * @returns {number} A number representing the displayType + */ + getDisplayType() { + return this.displayType; + + } + + /** + * The method to set the value to displayType + * @param {number} displayType A number representing the displayType + */ + setDisplayType(displayType) { + if((displayType != null) && (!(Object.prototype.toString.call(displayType) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayType EXPECTED TYPE: number", null, null); + } + this.displayType = displayType; + this.keyModified.set("display_type", 1); + + } + + /** + * The method to get the uiType + * @returns {number} A number representing the uiType + */ + getUiType() { + return this.uiType; + + } + + /** + * The method to set the value to uiType + * @param {number} uiType A number representing the uiType + */ + setUiType(uiType) { + if((uiType != null) && (!(Object.prototype.toString.call(uiType) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: uiType EXPECTED TYPE: number", null, null); + } + this.uiType = uiType; + this.keyModified.set("ui_type", 1); + + } + + /** + * The method to get the length + * @returns {Choice} An instance of Choice + */ + getLength() { + return this.length; + + } + + /** + * The method to set the value to length + * @param {Choice} length An instance of Choice + */ + setLength(length) { + if((length != null) && (!(length instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: length EXPECTED TYPE: Choice", null, null); + } + this.length = length; + this.keyModified.set("length", 1); + + } + + /** + * The method to get the decimalPlace + * @returns {number} A number representing the decimalPlace + */ + getDecimalPlace() { + return this.decimalPlace; + + } + + /** + * The method to set the value to decimalPlace + * @param {number} decimalPlace A number representing the decimalPlace + */ + setDecimalPlace(decimalPlace) { + if((decimalPlace != null) && (!(Object.prototype.toString.call(decimalPlace) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: decimalPlace EXPECTED TYPE: number", null, null); + } + this.decimalPlace = decimalPlace; + this.keyModified.set("decimal_place", 1); + + } + + /** + * The method to get the quickSequenceNumber + * @returns {String} A String representing the quickSequenceNumber + */ + getQuickSequenceNumber() { + return this.quickSequenceNumber; + + } + + /** + * The method to set the value to quickSequenceNumber + * @param {String} quickSequenceNumber A String representing the quickSequenceNumber + */ + setQuickSequenceNumber(quickSequenceNumber) { + if((quickSequenceNumber != null) && (!(Object.prototype.toString.call(quickSequenceNumber) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: quickSequenceNumber EXPECTED TYPE: String", null, null); + } + this.quickSequenceNumber = quickSequenceNumber; + this.keyModified.set("quick_sequence_number", 1); + + } + + /** + * The method to get the emailParser + * @returns {EmailParser} An instance of EmailParser + */ + getEmailParser() { + return this.emailParser; + + } + + /** + * The method to set the value to emailParser + * @param {EmailParser} emailParser An instance of EmailParser + */ + async setEmailParser(emailParser) { + const EmailParser = (await (import("./email_parser.js"))).MasterModel; + if((emailParser != null) && (!(emailParser instanceof EmailParser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: emailParser EXPECTED TYPE: EmailParser", null, null); + } + this.emailParser = emailParser; + this.keyModified.set("email_parser", 1); + + } + + /** + * The method to get the rollupSummary + * @returns {RollupSummary} An instance of RollupSummary + */ + getRollupSummary() { + return this.rollupSummary; + + } + + /** + * The method to set the value to rollupSummary + * @param {RollupSummary} rollupSummary An instance of RollupSummary + */ + async setRollupSummary(rollupSummary) { + const RollupSummary = (await (import("./rollup_summary.js"))).MasterModel; + if((rollupSummary != null) && (!(rollupSummary instanceof RollupSummary))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: rollupSummary EXPECTED TYPE: RollupSummary", null, null); + } + this.rollupSummary = rollupSummary; + this.keyModified.set("rollup_summary", 1); + + } + + /** + * The method to get the referFromField + * @returns {ReferFromField} An instance of ReferFromField + */ + getReferFromField() { + return this.referFromField; + + } + + /** + * The method to set the value to referFromField + * @param {ReferFromField} referFromField An instance of ReferFromField + */ + async setReferFromField(referFromField) { + const ReferFromField = (await (import("./refer_from_field.js"))).MasterModel; + if((referFromField != null) && (!(referFromField instanceof ReferFromField))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: referFromField EXPECTED TYPE: ReferFromField", null, null); + } + this.referFromField = referFromField; + this.keyModified.set("refer_from_field", 1); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the showType + * @returns {number} A number representing the showType + */ + getShowType() { + return this.showType; + + } + + /** + * The method to set the value to showType + * @param {number} showType A number representing the showType + */ + setShowType(showType) { + if((showType != null) && (!(Object.prototype.toString.call(showType) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: showType EXPECTED TYPE: number", null, null); + } + this.showType = showType; + this.keyModified.set("show_type", 1); + + } + + /** + * The method to get the category + * @returns {number} A number representing the category + */ + getCategory() { + return this.category; + + } + + /** + * The method to set the value to category + * @param {number} category A number representing the category + */ + setCategory(category) { + if((category != null) && (!(Object.prototype.toString.call(category) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: category EXPECTED TYPE: number", null, null); + } + this.category = category; + this.keyModified.set("category", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the multiModuleLookup + * @returns {MultiModuleLookup} An instance of MultiModuleLookup + */ + getMultiModuleLookup() { + return this.multiModuleLookup; + + } + + /** + * The method to set the value to multiModuleLookup + * @param {MultiModuleLookup} multiModuleLookup An instance of MultiModuleLookup + */ + async setMultiModuleLookup(multiModuleLookup) { + const MultiModuleLookup = (await (import("./multi_module_lookup.js"))).MasterModel; + if((multiModuleLookup != null) && (!(multiModuleLookup instanceof MultiModuleLookup))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: multiModuleLookup EXPECTED TYPE: MultiModuleLookup", null, null); + } + this.multiModuleLookup = multiModuleLookup; + this.keyModified.set("multi_module_lookup", 1); + + } + + /** + * The method to get the sharingProperties + * @returns {SharingProperties} An instance of SharingProperties + */ + getSharingProperties() { + return this.sharingProperties; + + } + + /** + * The method to set the value to sharingProperties + * @param {SharingProperties} sharingProperties An instance of SharingProperties + */ + async setSharingProperties(sharingProperties) { + const SharingProperties = (await (import("../modules/sharing_properties.js"))).MasterModel; + if((sharingProperties != null) && (!(sharingProperties instanceof SharingProperties))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sharingProperties EXPECTED TYPE: SharingProperties", null, null); + } + this.sharingProperties = sharingProperties; + this.keyModified.set("sharing_properties", 1); + + } + + /** + * The method to get the currency + * @returns {Currency} An instance of Currency + */ + getCurrency() { + return this.currency; + + } + + /** + * The method to set the value to currency + * @param {Currency} currency An instance of Currency + */ + async setCurrency(currency) { + const Currency = (await (import("./currency.js"))).MasterModel; + if((currency != null) && (!(currency instanceof Currency))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: currency EXPECTED TYPE: Currency", null, null); + } + this.currency = currency; + this.keyModified.set("currency", 1); + + } + + /** + * The method to get the fileUpoladOptionlist + * @returns {Array} An Array representing the fileUpoladOptionlist + */ + getFileUpoladOptionlist() { + return this.fileUpoladOptionlist; + + } + + /** + * The method to set the value to fileUpoladOptionlist + * @param {Array} fileUpoladOptionlist An Array representing the fileUpoladOptionlist + */ + setFileUpoladOptionlist(fileUpoladOptionlist) { + if((fileUpoladOptionlist != null) && (!(Object.prototype.toString.call(fileUpoladOptionlist) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileUpoladOptionlist EXPECTED TYPE: Array", null, null); + } + this.fileUpoladOptionlist = fileUpoladOptionlist; + this.keyModified.set("file_upolad_optionlist", 1); + + } + + /** + * The method to get the lookup + * @returns {Lookup} An instance of Lookup + */ + getLookup() { + return this.lookup; + + } + + /** + * The method to set the value to lookup + * @param {Lookup} lookup An instance of Lookup + */ + async setLookup(lookup) { + const Lookup = (await (import("./lookup.js"))).MasterModel; + if((lookup != null) && (!(lookup instanceof Lookup))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: lookup EXPECTED TYPE: Lookup", null, null); + } + this.lookup = lookup; + this.keyModified.set("lookup", 1); + + } + + /** + * The method to get the profiles + * @returns {Array} An Array representing the profiles + */ + getProfiles() { + return this.profiles; + + } + + /** + * The method to set the value to profiles + * @param {Array} profiles An Array representing the profiles + */ + setProfiles(profiles) { + if((profiles != null) && (!(Object.prototype.toString.call(profiles) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: profiles EXPECTED TYPE: Array", null, null); + } + this.profiles = profiles; + this.keyModified.set("profiles", 1); + + } + + /** + * The method to get the viewType + * @returns {ViewType} An instance of ViewType + */ + getViewType() { + return this.viewType; + + } + + /** + * The method to set the value to viewType + * @param {ViewType} viewType An instance of ViewType + */ + async setViewType(viewType) { + const ViewType = (await (import("./view_type.js"))).MasterModel; + if((viewType != null) && (!(viewType instanceof ViewType))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: viewType EXPECTED TYPE: ViewType", null, null); + } + this.viewType = viewType; + this.keyModified.set("view_type", 1); + + } + + /** + * The method to get the unique + * @returns {Unique} An instance of Unique + */ + getUnique() { + return this.unique; + + } + + /** + * The method to set the value to unique + * @param {Unique} unique An instance of Unique + */ + async setUnique(unique) { + const Unique = (await (import("./unique.js"))).MasterModel; + if((unique != null) && (!(unique instanceof Unique))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: unique EXPECTED TYPE: Unique", null, null); + } + this.unique = unique; + this.keyModified.set("unique", 1); + + } + + /** + * The method to get the subModule + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getSubModule() { + return this.subModule; + + } + + /** + * The method to set the value to subModule + * @param {MinifiedModule} subModule An instance of MinifiedModule + */ + async setSubModule(subModule) { + const MinifiedModule = (await (import("../modules/minified_module.js"))).MasterModel; + if((subModule != null) && (!(subModule instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subModule EXPECTED TYPE: MinifiedModule", null, null); + } + this.subModule = subModule; + this.keyModified.set("sub_module", 1); + + } + + /** + * The method to get the external + * @returns {External} An instance of External + */ + getExternal() { + return this.external; + + } + + /** + * The method to set the value to external + * @param {External} external An instance of External + */ + async setExternal(external) { + const External = (await (import("./external.js"))).MasterModel; + if((external != null) && (!(external instanceof External))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: external EXPECTED TYPE: External", null, null); + } + this.external = external; + this.keyModified.set("external", 1); + + } + + /** + * The method to get the formula + * @returns {Formula} An instance of Formula + */ + getFormula() { + return this.formula; + + } + + /** + * The method to set the value to formula + * @param {Formula} formula An instance of Formula + */ + async setFormula(formula) { + const Formula = (await (import("./formula.js"))).MasterModel; + if((formula != null) && (!(formula instanceof Formula))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: formula EXPECTED TYPE: Formula", null, null); + } + this.formula = formula; + this.keyModified.set("formula", 1); + + } + + /** + * The method to get the private + * @returns {Private} An instance of Private + */ + getPrivate() { + return this.private1; + + } + + /** + * The method to set the value to private + * @param {Private} private1 An instance of Private + */ + async setPrivate(private1) { + const Private = (await (import("./private.js"))).MasterModel; + if((private1 != null) && (!(private1 instanceof Private))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: private1 EXPECTED TYPE: Private", null, null); + } + this.private1 = private1; + this.keyModified.set("private", 1); + + } + + /** + * The method to get the convertMapping + * @returns {ConvertMapping} An instance of ConvertMapping + */ + getConvertMapping() { + return this.convertMapping; + + } + + /** + * The method to set the value to convertMapping + * @param {ConvertMapping} convertMapping An instance of ConvertMapping + */ + async setConvertMapping(convertMapping) { + const ConvertMapping = (await (import("./convert_mapping.js"))).MasterModel; + if((convertMapping != null) && (!(convertMapping instanceof ConvertMapping))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: convertMapping EXPECTED TYPE: ConvertMapping", null, null); + } + this.convertMapping = convertMapping; + this.keyModified.set("convert_mapping", 1); + + } + + /** + * The method to get the multiselectlookup + * @returns {Multiselectlookup} An instance of Multiselectlookup + */ + getMultiselectlookup() { + return this.multiselectlookup; + + } + + /** + * The method to set the value to multiselectlookup + * @param {Multiselectlookup} multiselectlookup An instance of Multiselectlookup + */ + async setMultiselectlookup(multiselectlookup) { + const Multiselectlookup = (await (import("./multiselectlookup.js"))).MasterModel; + if((multiselectlookup != null) && (!(multiselectlookup instanceof Multiselectlookup))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: multiselectlookup EXPECTED TYPE: Multiselectlookup", null, null); + } + this.multiselectlookup = multiselectlookup; + this.keyModified.set("multiselectlookup", 1); + + } + + /** + * The method to get the multiuserlookup + * @returns {Multiselectlookup} An instance of Multiselectlookup + */ + getMultiuserlookup() { + return this.multiuserlookup; + + } + + /** + * The method to set the value to multiuserlookup + * @param {Multiselectlookup} multiuserlookup An instance of Multiselectlookup + */ + async setMultiuserlookup(multiuserlookup) { + const Multiselectlookup = (await (import("./multiselectlookup.js"))).MasterModel; + if((multiuserlookup != null) && (!(multiuserlookup instanceof Multiselectlookup))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: multiuserlookup EXPECTED TYPE: Multiselectlookup", null, null); + } + this.multiuserlookup = multiuserlookup; + this.keyModified.set("multiuserlookup", 1); + + } + + /** + * The method to get the autoNumber + * @returns {AutoNumber} An instance of AutoNumber + */ + getAutoNumber() { + return this.autoNumber; + + } + + /** + * The method to set the value to autoNumber + * @param {AutoNumber} autoNumber An instance of AutoNumber + */ + async setAutoNumber(autoNumber) { + const AutoNumber = (await (import("./auto_number.js"))).MasterModel; + if((autoNumber != null) && (!(autoNumber instanceof AutoNumber))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: autoNumber EXPECTED TYPE: AutoNumber", null, null); + } + this.autoNumber = autoNumber; + this.keyModified.set("auto_number", 1); + + } + + /** + * The method to get the pickListValues + * @returns {Array} An Array representing the pickListValues + */ + getPickListValues() { + return this.pickListValues; + + } + + /** + * The method to set the value to pickListValues + * @param {Array} pickListValues An Array representing the pickListValues + */ + setPickListValues(pickListValues) { + if((pickListValues != null) && (!(Object.prototype.toString.call(pickListValues) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pickListValues EXPECTED TYPE: Array", null, null); + } + this.pickListValues = pickListValues; + this.keyModified.set("pick_list_values", 1); + + } + + /** + * The method to get the crypt + * @returns {Crypt} An instance of Crypt + */ + getCrypt() { + return this.crypt; + + } + + /** + * The method to set the value to crypt + * @param {Crypt} crypt An instance of Crypt + */ + async setCrypt(crypt) { + const Crypt = (await (import("./crypt.js"))).MasterModel; + if((crypt != null) && (!(crypt instanceof Crypt))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: crypt EXPECTED TYPE: Crypt", null, null); + } + this.crypt = crypt; + this.keyModified.set("crypt", 1); + + } + + /** + * The method to get the tooltip + * @returns {Tooltip} An instance of Tooltip + */ + getTooltip() { + return this.tooltip; + + } + + /** + * The method to set the value to tooltip + * @param {Tooltip} tooltip An instance of Tooltip + */ + async setTooltip(tooltip) { + const Tooltip = (await (import("./tooltip.js"))).MasterModel; + if((tooltip != null) && (!(tooltip instanceof Tooltip))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tooltip EXPECTED TYPE: Tooltip", null, null); + } + this.tooltip = tooltip; + this.keyModified.set("tooltip", 1); + + } + + /** + * The method to get the historyTracking + * @returns {HistoryTracking} An instance of HistoryTracking + */ + getHistoryTracking() { + return this.historyTracking; + + } + + /** + * The method to set the value to historyTracking + * @param {HistoryTracking} historyTracking An instance of HistoryTracking + */ + async setHistoryTracking(historyTracking) { + const HistoryTracking = (await (import("./history_tracking.js"))).MasterModel; + if((historyTracking != null) && (!(historyTracking instanceof HistoryTracking))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: historyTracking EXPECTED TYPE: HistoryTracking", null, null); + } + this.historyTracking = historyTracking; + this.keyModified.set("history_tracking", 1); + + } + + /** + * The method to get the associationDetails + * @returns {AssociationDetails} An instance of AssociationDetails + */ + getAssociationDetails() { + return this.associationDetails; + + } + + /** + * The method to set the value to associationDetails + * @param {AssociationDetails} associationDetails An instance of AssociationDetails + */ + async setAssociationDetails(associationDetails) { + const AssociationDetails = (await (import("./association_details.js"))).MasterModel; + if((associationDetails != null) && (!(associationDetails instanceof AssociationDetails))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: associationDetails EXPECTED TYPE: AssociationDetails", null, null); + } + this.associationDetails = associationDetails; + this.keyModified.set("association_details", 1); + + } + + /** + * The method to get the allowedModules + * @returns {Array} An Array representing the allowedModules + */ + getAllowedModules() { + return this.allowedModules; + + } + + /** + * The method to set the value to allowedModules + * @param {Array} allowedModules An Array representing the allowedModules + */ + setAllowedModules(allowedModules) { + if((allowedModules != null) && (!(Object.prototype.toString.call(allowedModules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: allowedModules EXPECTED TYPE: Array", null, null); + } + this.allowedModules = allowedModules; + this.keyModified.set("allowed_modules", 1); + + } + + /** + * The method to get the additionalColumn + * @returns {String} A String representing the additionalColumn + */ + getAdditionalColumn() { + return this.additionalColumn; + + } + + /** + * The method to set the value to additionalColumn + * @param {String} additionalColumn A String representing the additionalColumn + */ + setAdditionalColumn(additionalColumn) { + if((additionalColumn != null) && (!(Object.prototype.toString.call(additionalColumn) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: additionalColumn EXPECTED TYPE: String", null, null); + } + this.additionalColumn = additionalColumn; + this.keyModified.set("additional_column", 1); + + } + + /** + * The method to get the fieldLabel + * @returns {String} A String representing the fieldLabel + */ + getFieldLabel() { + return this.fieldLabel; + + } + + /** + * The method to set the value to fieldLabel + * @param {String} fieldLabel A String representing the fieldLabel + */ + setFieldLabel(fieldLabel) { + if((fieldLabel != null) && (!(Object.prototype.toString.call(fieldLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldLabel EXPECTED TYPE: String", null, null); + } + this.fieldLabel = fieldLabel; + this.keyModified.set("field_label", 1); + + } + + /** + * The method to get the globalPicklist + * @returns {Object} An Object representing the globalPicklist + */ + getGlobalPicklist() { + return this.globalPicklist; + + } + + /** + * The method to set the value to globalPicklist + * @param {Object} globalPicklist An Object representing the globalPicklist + */ + setGlobalPicklist(globalPicklist) { + this.globalPicklist = globalPicklist; + this.keyModified.set("global_picklist", 1); + + } + + /** + * The method to get the hipaaComplianceEnabled + * @returns {Boolean} A Boolean representing the hipaaComplianceEnabled + */ + getHipaaComplianceEnabled() { + return this.hipaaComplianceEnabled; + + } + + /** + * The method to set the value to hipaaComplianceEnabled + * @param {Boolean} hipaaComplianceEnabled A Boolean representing the hipaaComplianceEnabled + */ + setHipaaComplianceEnabled(hipaaComplianceEnabled) { + if((hipaaComplianceEnabled != null) && (!(Object.prototype.toString.call(hipaaComplianceEnabled) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: hipaaComplianceEnabled EXPECTED TYPE: Boolean", null, null); + } + this.hipaaComplianceEnabled = hipaaComplianceEnabled; + this.keyModified.set("hipaa_compliance_enabled", 1); + + } + + /** + * The method to get the hipaaCompliance + * @returns {HipaaCompliance} An instance of HipaaCompliance + */ + getHipaaCompliance() { + return this.hipaaCompliance; + + } + + /** + * The method to set the value to hipaaCompliance + * @param {HipaaCompliance} hipaaCompliance An instance of HipaaCompliance + */ + async setHipaaCompliance(hipaaCompliance) { + const HipaaCompliance = (await (import("./hipaa_compliance.js"))).MasterModel; + if((hipaaCompliance != null) && (!(hipaaCompliance instanceof HipaaCompliance))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: hipaaCompliance EXPECTED TYPE: HipaaCompliance", null, null); + } + this.hipaaCompliance = hipaaCompliance; + this.keyModified.set("hipaa_compliance", 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 { + Fields as MasterModel, + Fields as Fields +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/fields_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/fields_operations.js new file mode 100644 index 0000000..e6fe9e2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/fields_operations.js @@ -0,0 +1,84 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 FieldsOperations{ + /** + * The method to get fields + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getFields(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/fields"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to get field + * @param {BigInt} field A BigInt representing the field + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getField(field, paramInstance=null) { + if((!(Object.prototype.toString.call(field) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: field EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/fields/"); + apiPath = apiPath.concat(field.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + +} +class GetFieldsParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.Fields.GetFieldsParam"); + static DATA_TYPE = new Param("data_type", "com.zoho.crm.api.Fields.GetFieldsParam"); + static TYPE = new Param("type", "com.zoho.crm.api.Fields.GetFieldsParam"); + static INCLUDE = new Param("include", "com.zoho.crm.api.Fields.GetFieldsParam"); + static FEATURE_NAME = new Param("feature_name", "com.zoho.crm.api.Fields.GetFieldsParam"); + static COMPONENT = new Param("component", "com.zoho.crm.api.Fields.GetFieldsParam"); + static LAYOUT_ID = new Param("layout_id", "com.zoho.crm.api.Fields.GetFieldsParam"); +} + +class GetFieldParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.Fields.GetFieldParam"); + static INCLUDE = new Param("include", "com.zoho.crm.api.Fields.GetFieldParam"); +} + +export { + GetFieldsParam as GetFieldsParam, + GetFieldParam as GetFieldParam, + FieldsOperations as MasterModel, + FieldsOperations as FieldsOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/file_upolad_option.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/file_upolad_option.js new file mode 100644 index 0000000..cfdbb0c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/file_upolad_option.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class FileUpoladOption{ + + actualValue; + displayValue; + keyModified = new Map(); + /** + * The method to get the actualValue + * @returns {String} A String representing the actualValue + */ + getActualValue() { + return this.actualValue; + + } + + /** + * The method to set the value to actualValue + * @param {String} actualValue A String representing the actualValue + */ + setActualValue(actualValue) { + if((actualValue != null) && (!(Object.prototype.toString.call(actualValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: actualValue EXPECTED TYPE: String", null, null); + } + this.actualValue = actualValue; + this.keyModified.set("actual_value", 1); + + } + + /** + * The method to get the displayValue + * @returns {String} A String representing the displayValue + */ + getDisplayValue() { + return this.displayValue; + + } + + /** + * The method to set the value to displayValue + * @param {String} displayValue A String representing the displayValue + */ + setDisplayValue(displayValue) { + if((displayValue != null) && (!(Object.prototype.toString.call(displayValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayValue EXPECTED TYPE: String", null, null); + } + this.displayValue = displayValue; + this.keyModified.set("display_value", 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 { + FileUpoladOption as MasterModel, + FileUpoladOption as FileUpoladOption +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/forecast_category.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/forecast_category.js new file mode 100644 index 0000000..39d59f1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/forecast_category.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ForecastCategory{ + + id; + name; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + ForecastCategory as MasterModel, + ForecastCategory as ForecastCategory +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/formula.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/formula.js new file mode 100644 index 0000000..78653e4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/formula.js @@ -0,0 +1,90 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Formula{ + + returnType; + expression; + keyModified = new Map(); + /** + * The method to get the returnType + * @returns {Choice} An instance of Choice + */ + getReturnType() { + return this.returnType; + + } + + /** + * The method to set the value to returnType + * @param {Choice} returnType An instance of Choice + */ + setReturnType(returnType) { + if((returnType != null) && (!(returnType instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: returnType EXPECTED TYPE: Choice", null, null); + } + this.returnType = returnType; + this.keyModified.set("return_type", 1); + + } + + /** + * The method to get the expression + * @returns {Choice} An instance of Choice + */ + getExpression() { + return this.expression; + + } + + /** + * The method to set the value to expression + * @param {Choice} expression An instance of Choice + */ + setExpression(expression) { + if((expression != null) && (!(expression instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: expression EXPECTED TYPE: Choice", null, null); + } + this.expression = expression; + this.keyModified.set("expression", 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 { + Formula as MasterModel, + Formula as Formula +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/function_parameter.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/function_parameter.js new file mode 100644 index 0000000..1ba2e07 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/function_parameter.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class FunctionParameter{ + + apiName; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 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 { + FunctionParameter as MasterModel, + FunctionParameter as FunctionParameter +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/hipaa_compliance.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/hipaa_compliance.js new file mode 100644 index 0000000..7d932c5 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/hipaa_compliance.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class HipaaCompliance{ + + restrictedInExport; + restricted; + keyModified = new Map(); + /** + * The method to get the restrictedInExport + * @returns {Boolean} A Boolean representing the restrictedInExport + */ + getRestrictedInExport() { + return this.restrictedInExport; + + } + + /** + * The method to set the value to restrictedInExport + * @param {Boolean} restrictedInExport A Boolean representing the restrictedInExport + */ + setRestrictedInExport(restrictedInExport) { + if((restrictedInExport != null) && (!(Object.prototype.toString.call(restrictedInExport) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: restrictedInExport EXPECTED TYPE: Boolean", null, null); + } + this.restrictedInExport = restrictedInExport; + this.keyModified.set("restricted_in_export", 1); + + } + + /** + * The method to get the restricted + * @returns {Boolean} A Boolean representing the restricted + */ + getRestricted() { + return this.restricted; + + } + + /** + * The method to set the value to restricted + * @param {Boolean} restricted A Boolean representing the restricted + */ + setRestricted(restricted) { + if((restricted != null) && (!(Object.prototype.toString.call(restricted) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: restricted EXPECTED TYPE: Boolean", null, null); + } + this.restricted = restricted; + this.keyModified.set("restricted", 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 { + HipaaCompliance as MasterModel, + HipaaCompliance as HipaaCompliance +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/history_tracking.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/history_tracking.js new file mode 100644 index 0000000..3d003a1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/history_tracking.js @@ -0,0 +1,91 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class HistoryTracking{ + + module; + durationConfiguredField; + keyModified = new Map(); + /** + * The method to get the module + * @returns {HistoryTrackingModule} An instance of HistoryTrackingModule + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {HistoryTrackingModule} module An instance of HistoryTrackingModule + */ + async setModule(module) { + const HistoryTrackingModule = (await (import("./history_tracking_module.js"))).MasterModel; + if((module != null) && (!(module instanceof HistoryTrackingModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: HistoryTrackingModule", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the durationConfiguredField + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getDurationConfiguredField() { + return this.durationConfiguredField; + + } + + /** + * The method to set the value to durationConfiguredField + * @param {MinifiedModule} durationConfiguredField An instance of MinifiedModule + */ + async setDurationConfiguredField(durationConfiguredField) { + const MinifiedModule = (await (import("../modules/minified_module.js"))).MasterModel; + if((durationConfiguredField != null) && (!(durationConfiguredField instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: durationConfiguredField EXPECTED TYPE: MinifiedModule", null, null); + } + this.durationConfiguredField = durationConfiguredField; + this.keyModified.set("duration_configured_field", 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 { + HistoryTracking as MasterModel, + HistoryTracking as HistoryTracking +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/history_tracking_module.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/history_tracking_module.js new file mode 100644 index 0000000..edcbfdb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/history_tracking_module.js @@ -0,0 +1,182 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class HistoryTrackingModule{ + + layout; + displayLabel; + apiName; + module; + id; + moduleName; + keyModified = new Map(); + /** + * The method to get the layout + * @returns {Layouts} An instance of Layouts + */ + getLayout() { + return this.layout; + + } + + /** + * The method to set the value to layout + * @param {Layouts} layout An instance of Layouts + */ + async setLayout(layout) { + const Layouts = (await (import("../layouts/layouts.js"))).MasterModel; + if((layout != null) && (!(layout instanceof Layouts))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: layout EXPECTED TYPE: Layouts", null, null); + } + this.layout = layout; + this.keyModified.set("layout", 1); + + } + + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the module + * @returns {HistoryTrackingModule} An instance of HistoryTrackingModule + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {HistoryTrackingModule} module An instance of HistoryTrackingModule + */ + setModule(module) { + if((module != null) && (!(module instanceof HistoryTrackingModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: HistoryTrackingModule", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the moduleName + * @returns {String} A String representing the moduleName + */ + getModuleName() { + return this.moduleName; + + } + + /** + * The method to set the value to moduleName + * @param {String} moduleName A String representing the moduleName + */ + setModuleName(moduleName) { + if((moduleName != null) && (!(Object.prototype.toString.call(moduleName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleName EXPECTED TYPE: String", null, null); + } + this.moduleName = moduleName; + this.keyModified.set("module_name", 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 { + HistoryTrackingModule as MasterModel, + HistoryTrackingModule as HistoryTrackingModule +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/import_fields.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/import_fields.js new file mode 100644 index 0000000..433557d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/import_fields.js @@ -0,0 +1,42 @@ +export { Expression } from "./expression.js"; +export { APIException } from "./api_exception.js"; +export { PickListValue } from "./pick_list_value.js"; +export { Formula } from "./formula.js"; +export { HistoryTracking } from "./history_tracking.js"; +export { Lookup } from "./lookup.js"; +export { HistoryTrackingModule } from "./history_tracking_module.js"; +export { ReferFromField } from "./refer_from_field.js"; +export { Crypt } from "./crypt.js"; +export { OperationType } from "./operation_type.js"; +export { FunctionParameter } from "./function_parameter.js"; +export { Fields } from "./fields.js"; +export { Unique } from "./unique.js"; +export { QueryDetails } from "./query_details.js"; +export { ShowFields } from "./show_fields.js"; +export * as ResponseHandler from "./response_handler.js"; +export { Profile } from "./profile.js"; +export { Maps } from "./maps.js"; +export { Tooltip } from "./tooltip.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { RollupCriteria } from "./rollup_criteria.js"; +export { EmailParser } from "./email_parser.js"; +export * as ActionResponse from "./action_response.js"; +export { AutoNumber } from "./auto_number.js"; +export { MinifiedField } from "./minified_field.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { ConvertMapping } from "./convert_mapping.js"; +export { ViewType } from "./view_type.js"; +export { HipaaCompliance } from "./hipaa_compliance.js"; +export { Multiselectlookup } from "./multiselectlookup.js"; +export { FieldsOperations } from "./fields_operations.js"; +export { GetFieldsParam } from "./fields_operations.js"; +export { GetFieldParam } from "./fields_operations.js"; +export { Currency } from "./currency.js"; +export { AssociationDetails } from "./association_details.js"; +export { FileUpoladOption } from "./file_upolad_option.js"; +export { External } from "./external.js"; +export { ForecastCategory } from "./forecast_category.js"; +export { MultiModuleLookup } from "./multi_module_lookup.js"; +export { Success } from "./success.js"; +export { Private } from "./private.js"; +export { RollupSummary } from "./rollup_summary.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/lookup.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/lookup.js new file mode 100644 index 0000000..d94d90f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/lookup.js @@ -0,0 +1,206 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Lookup{ + + displayLabel; + apiName; + queryDetails; + module; + id; + revalidateFilterDuringEdit; + showFields; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the queryDetails + * @returns {QueryDetails} An instance of QueryDetails + */ + getQueryDetails() { + return this.queryDetails; + + } + + /** + * The method to set the value to queryDetails + * @param {QueryDetails} queryDetails An instance of QueryDetails + */ + async setQueryDetails(queryDetails) { + const QueryDetails = (await (import("./query_details.js"))).MasterModel; + if((queryDetails != null) && (!(queryDetails instanceof QueryDetails))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: queryDetails EXPECTED TYPE: QueryDetails", null, null); + } + this.queryDetails = queryDetails; + this.keyModified.set("query_details", 1); + + } + + /** + * The method to get the module + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {MinifiedModule} module An instance of MinifiedModule + */ + async setModule(module) { + const MinifiedModule = (await (import("../modules/minified_module.js"))).MasterModel; + if((module != null) && (!(module instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: MinifiedModule", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the revalidateFilterDuringEdit + * @returns {Boolean} A Boolean representing the revalidateFilterDuringEdit + */ + getRevalidateFilterDuringEdit() { + return this.revalidateFilterDuringEdit; + + } + + /** + * The method to set the value to revalidateFilterDuringEdit + * @param {Boolean} revalidateFilterDuringEdit A Boolean representing the revalidateFilterDuringEdit + */ + setRevalidateFilterDuringEdit(revalidateFilterDuringEdit) { + if((revalidateFilterDuringEdit != null) && (!(Object.prototype.toString.call(revalidateFilterDuringEdit) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: revalidateFilterDuringEdit EXPECTED TYPE: Boolean", null, null); + } + this.revalidateFilterDuringEdit = revalidateFilterDuringEdit; + this.keyModified.set("revalidate_filter_during_edit", 1); + + } + + /** + * The method to get the showFields + * @returns {Array} An Array representing the showFields + */ + getShowFields() { + return this.showFields; + + } + + /** + * The method to set the value to showFields + * @param {Array} showFields An Array representing the showFields + */ + setShowFields(showFields) { + if((showFields != null) && (!(Object.prototype.toString.call(showFields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: showFields EXPECTED TYPE: Array", null, null); + } + this.showFields = showFields; + this.keyModified.set("show_fields", 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 { + Lookup as MasterModel, + Lookup as Lookup +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/maps.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/maps.js new file mode 100644 index 0000000..d297dbc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/maps.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Maps{ + + apiName; + pickListValues; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the pickListValues + * @returns {Array} An Array representing the pickListValues + */ + getPickListValues() { + return this.pickListValues; + + } + + /** + * The method to set the value to pickListValues + * @param {Array} pickListValues An Array representing the pickListValues + */ + setPickListValues(pickListValues) { + if((pickListValues != null) && (!(Object.prototype.toString.call(pickListValues) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pickListValues EXPECTED TYPE: Array", null, null); + } + this.pickListValues = pickListValues; + this.keyModified.set("pick_list_values", 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 { + Maps as MasterModel, + Maps as Maps +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/minified_field.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/minified_field.js new file mode 100644 index 0000000..f18da7b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/minified_field.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MinifiedField{ + + apiName; + id; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + MinifiedField as MasterModel, + MinifiedField as MinifiedField +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/multi_module_lookup.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/multi_module_lookup.js new file mode 100644 index 0000000..65ac90c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/multi_module_lookup.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MultiModuleLookup{ + + displayLabel; + apiName; + modules; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the modules + * @returns {Array} An Array representing the modules + */ + getModules() { + return this.modules; + + } + + /** + * The method to set the value to modules + * @param {Array} modules An Array representing the modules + */ + setModules(modules) { + if((modules != null) && (!(Object.prototype.toString.call(modules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modules EXPECTED TYPE: Array", null, null); + } + this.modules = modules; + this.keyModified.set("modules", 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 { + MultiModuleLookup as MasterModel, + MultiModuleLookup as MultiModuleLookup +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/multiselectlookup.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/multiselectlookup.js new file mode 100644 index 0000000..35aa3c1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/multiselectlookup.js @@ -0,0 +1,252 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Multiselectlookup{ + + displayLabel; + linkingModule; + connectedModule; + lookupApiname; + apiName; + connectedfieldApiname; + connectedlookupApiname; + id; + recordAccess; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the linkingModule + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getLinkingModule() { + return this.linkingModule; + + } + + /** + * The method to set the value to linkingModule + * @param {MinifiedModule} linkingModule An instance of MinifiedModule + */ + async setLinkingModule(linkingModule) { + const MinifiedModule = (await (import("../modules/minified_module.js"))).MasterModel; + if((linkingModule != null) && (!(linkingModule instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: linkingModule EXPECTED TYPE: MinifiedModule", null, null); + } + this.linkingModule = linkingModule; + this.keyModified.set("linking_module", 1); + + } + + /** + * The method to get the connectedModule + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getConnectedModule() { + return this.connectedModule; + + } + + /** + * The method to set the value to connectedModule + * @param {MinifiedModule} connectedModule An instance of MinifiedModule + */ + async setConnectedModule(connectedModule) { + const MinifiedModule = (await (import("../modules/minified_module.js"))).MasterModel; + if((connectedModule != null) && (!(connectedModule instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: connectedModule EXPECTED TYPE: MinifiedModule", null, null); + } + this.connectedModule = connectedModule; + this.keyModified.set("connected_module", 1); + + } + + /** + * The method to get the lookupApiname + * @returns {String} A String representing the lookupApiname + */ + getLookupApiname() { + return this.lookupApiname; + + } + + /** + * The method to set the value to lookupApiname + * @param {String} lookupApiname A String representing the lookupApiname + */ + setLookupApiname(lookupApiname) { + if((lookupApiname != null) && (!(Object.prototype.toString.call(lookupApiname) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: lookupApiname EXPECTED TYPE: String", null, null); + } + this.lookupApiname = lookupApiname; + this.keyModified.set("lookup_apiname", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the connectedfieldApiname + * @returns {String} A String representing the connectedfieldApiname + */ + getConnectedfieldApiname() { + return this.connectedfieldApiname; + + } + + /** + * The method to set the value to connectedfieldApiname + * @param {String} connectedfieldApiname A String representing the connectedfieldApiname + */ + setConnectedfieldApiname(connectedfieldApiname) { + if((connectedfieldApiname != null) && (!(Object.prototype.toString.call(connectedfieldApiname) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: connectedfieldApiname EXPECTED TYPE: String", null, null); + } + this.connectedfieldApiname = connectedfieldApiname; + this.keyModified.set("connectedfield_apiname", 1); + + } + + /** + * The method to get the connectedlookupApiname + * @returns {String} A String representing the connectedlookupApiname + */ + getConnectedlookupApiname() { + return this.connectedlookupApiname; + + } + + /** + * The method to set the value to connectedlookupApiname + * @param {String} connectedlookupApiname A String representing the connectedlookupApiname + */ + setConnectedlookupApiname(connectedlookupApiname) { + if((connectedlookupApiname != null) && (!(Object.prototype.toString.call(connectedlookupApiname) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: connectedlookupApiname EXPECTED TYPE: String", null, null); + } + this.connectedlookupApiname = connectedlookupApiname; + this.keyModified.set("connectedlookup_apiname", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the recordAccess + * @returns {Boolean} A Boolean representing the recordAccess + */ + getRecordAccess() { + return this.recordAccess; + + } + + /** + * The method to set the value to recordAccess + * @param {Boolean} recordAccess A Boolean representing the recordAccess + */ + setRecordAccess(recordAccess) { + if((recordAccess != null) && (!(Object.prototype.toString.call(recordAccess) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordAccess EXPECTED TYPE: Boolean", null, null); + } + this.recordAccess = recordAccess; + this.keyModified.set("record_access", 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 { + Multiselectlookup as MasterModel, + Multiselectlookup as Multiselectlookup +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/operation_type.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/operation_type.js new file mode 100644 index 0000000..7c6d843 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/operation_type.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class OperationType{ + + webUpdate; + apiCreate; + webCreate; + apiUpdate; + keyModified = new Map(); + /** + * The method to get the webUpdate + * @returns {Boolean} A Boolean representing the webUpdate + */ + getWebUpdate() { + return this.webUpdate; + + } + + /** + * The method to set the value to webUpdate + * @param {Boolean} webUpdate A Boolean representing the webUpdate + */ + setWebUpdate(webUpdate) { + if((webUpdate != null) && (!(Object.prototype.toString.call(webUpdate) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: webUpdate EXPECTED TYPE: Boolean", null, null); + } + this.webUpdate = webUpdate; + this.keyModified.set("web_update", 1); + + } + + /** + * The method to get the apiCreate + * @returns {Boolean} A Boolean representing the apiCreate + */ + getAPICreate() { + return this.apiCreate; + + } + + /** + * The method to set the value to apiCreate + * @param {Boolean} apiCreate A Boolean representing the apiCreate + */ + setAPICreate(apiCreate) { + if((apiCreate != null) && (!(Object.prototype.toString.call(apiCreate) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiCreate EXPECTED TYPE: Boolean", null, null); + } + this.apiCreate = apiCreate; + this.keyModified.set("api_create", 1); + + } + + /** + * The method to get the webCreate + * @returns {Boolean} A Boolean representing the webCreate + */ + getWebCreate() { + return this.webCreate; + + } + + /** + * The method to set the value to webCreate + * @param {Boolean} webCreate A Boolean representing the webCreate + */ + setWebCreate(webCreate) { + if((webCreate != null) && (!(Object.prototype.toString.call(webCreate) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: webCreate EXPECTED TYPE: Boolean", null, null); + } + this.webCreate = webCreate; + this.keyModified.set("web_create", 1); + + } + + /** + * The method to get the apiUpdate + * @returns {Boolean} A Boolean representing the apiUpdate + */ + getAPIUpdate() { + return this.apiUpdate; + + } + + /** + * The method to set the value to apiUpdate + * @param {Boolean} apiUpdate A Boolean representing the apiUpdate + */ + setAPIUpdate(apiUpdate) { + if((apiUpdate != null) && (!(Object.prototype.toString.call(apiUpdate) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiUpdate EXPECTED TYPE: Boolean", null, null); + } + this.apiUpdate = apiUpdate; + this.keyModified.set("api_update", 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 { + OperationType as MasterModel, + OperationType as OperationType +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/pick_list_value.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/pick_list_value.js new file mode 100644 index 0000000..bc5ed52 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/pick_list_value.js @@ -0,0 +1,321 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class PickListValue{ + + displayValue; + probability; + forecastCategory; + expectedDataType; + sysRefName; + forecastType; + colourCode; + actualValue; + type; + id; + sequenceNumber; + maps; + keyModified = new Map(); + /** + * The method to get the displayValue + * @returns {String} A String representing the displayValue + */ + getDisplayValue() { + return this.displayValue; + + } + + /** + * The method to set the value to displayValue + * @param {String} displayValue A String representing the displayValue + */ + setDisplayValue(displayValue) { + if((displayValue != null) && (!(Object.prototype.toString.call(displayValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayValue EXPECTED TYPE: String", null, null); + } + this.displayValue = displayValue; + this.keyModified.set("display_value", 1); + + } + + /** + * The method to get the probability + * @returns {number} A number representing the probability + */ + getProbability() { + return this.probability; + + } + + /** + * The method to set the value to probability + * @param {number} probability A number representing the probability + */ + setProbability(probability) { + if((probability != null) && (!(Object.prototype.toString.call(probability) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: probability EXPECTED TYPE: number", null, null); + } + this.probability = probability; + this.keyModified.set("probability", 1); + + } + + /** + * The method to get the forecastCategory + * @returns {ForecastCategory} An instance of ForecastCategory + */ + getForecastCategory() { + return this.forecastCategory; + + } + + /** + * The method to set the value to forecastCategory + * @param {ForecastCategory} forecastCategory An instance of ForecastCategory + */ + async setForecastCategory(forecastCategory) { + const ForecastCategory = (await (import("./forecast_category.js"))).MasterModel; + if((forecastCategory != null) && (!(forecastCategory instanceof ForecastCategory))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: forecastCategory EXPECTED TYPE: ForecastCategory", null, null); + } + this.forecastCategory = forecastCategory; + this.keyModified.set("forecast_category", 1); + + } + + /** + * The method to get the expectedDataType + * @returns {String} A String representing the expectedDataType + */ + getExpectedDataType() { + return this.expectedDataType; + + } + + /** + * The method to set the value to expectedDataType + * @param {String} expectedDataType A String representing the expectedDataType + */ + setExpectedDataType(expectedDataType) { + if((expectedDataType != null) && (!(Object.prototype.toString.call(expectedDataType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: expectedDataType EXPECTED TYPE: String", null, null); + } + this.expectedDataType = expectedDataType; + this.keyModified.set("expected_data_type", 1); + + } + + /** + * The method to get the sysRefName + * @returns {String} A String representing the sysRefName + */ + getSysRefName() { + return this.sysRefName; + + } + + /** + * The method to set the value to sysRefName + * @param {String} sysRefName A String representing the sysRefName + */ + setSysRefName(sysRefName) { + if((sysRefName != null) && (!(Object.prototype.toString.call(sysRefName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sysRefName EXPECTED TYPE: String", null, null); + } + this.sysRefName = sysRefName; + this.keyModified.set("sys_ref_name", 1); + + } + + /** + * The method to get the forecastType + * @returns {String} A String representing the forecastType + */ + getForecastType() { + return this.forecastType; + + } + + /** + * The method to set the value to forecastType + * @param {String} forecastType A String representing the forecastType + */ + setForecastType(forecastType) { + if((forecastType != null) && (!(Object.prototype.toString.call(forecastType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: forecastType EXPECTED TYPE: String", null, null); + } + this.forecastType = forecastType; + this.keyModified.set("forecast_type", 1); + + } + + /** + * The method to get the colourCode + * @returns {String} A String representing the colourCode + */ + getColourCode() { + return this.colourCode; + + } + + /** + * The method to set the value to colourCode + * @param {String} colourCode A String representing the colourCode + */ + setColourCode(colourCode) { + if((colourCode != null) && (!(Object.prototype.toString.call(colourCode) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: colourCode EXPECTED TYPE: String", null, null); + } + this.colourCode = colourCode; + this.keyModified.set("colour_code", 1); + + } + + /** + * The method to get the actualValue + * @returns {String} A String representing the actualValue + */ + getActualValue() { + return this.actualValue; + + } + + /** + * The method to set the value to actualValue + * @param {String} actualValue A String representing the actualValue + */ + setActualValue(actualValue) { + if((actualValue != null) && (!(Object.prototype.toString.call(actualValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: actualValue EXPECTED TYPE: String", null, null); + } + this.actualValue = actualValue; + this.keyModified.set("actual_value", 1); + + } + + /** + * The method to get the type + * @returns {Choice} An instance of Choice + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {Choice} type An instance of Choice + */ + setType(type) { + if((type != null) && (!(type instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: Choice", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the sequenceNumber + * @returns {number} A number representing the sequenceNumber + */ + getSequenceNumber() { + return this.sequenceNumber; + + } + + /** + * The method to set the value to sequenceNumber + * @param {number} sequenceNumber A number representing the sequenceNumber + */ + setSequenceNumber(sequenceNumber) { + if((sequenceNumber != null) && (!(Object.prototype.toString.call(sequenceNumber) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sequenceNumber EXPECTED TYPE: number", null, null); + } + this.sequenceNumber = sequenceNumber; + this.keyModified.set("sequence_number", 1); + + } + + /** + * The method to get the maps + * @returns {Array} An Array representing the maps + */ + getMaps() { + return this.maps; + + } + + /** + * The method to set the value to maps + * @param {Array} maps An Array representing the maps + */ + setMaps(maps) { + if((maps != null) && (!(Object.prototype.toString.call(maps) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: maps EXPECTED TYPE: Array", null, null); + } + this.maps = maps; + this.keyModified.set("maps", 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 { + PickListValue as MasterModel, + PickListValue as PickListValue +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/private.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/private.js new file mode 100644 index 0000000..981715f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/private.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Private{ + + restricted; + type; + export1; + keyModified = new Map(); + /** + * The method to get the restricted + * @returns {Boolean} A Boolean representing the restricted + */ + getRestricted() { + return this.restricted; + + } + + /** + * The method to set the value to restricted + * @param {Boolean} restricted A Boolean representing the restricted + */ + setRestricted(restricted) { + if((restricted != null) && (!(Object.prototype.toString.call(restricted) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: restricted EXPECTED TYPE: Boolean", null, null); + } + this.restricted = restricted; + this.keyModified.set("restricted", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the export + * @returns {Boolean} A Boolean representing the export1 + */ + getExport() { + return this.export1; + + } + + /** + * The method to set the value to export + * @param {Boolean} export1 A Boolean representing the export1 + */ + setExport(export1) { + if((export1 != null) && (!(Object.prototype.toString.call(export1) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: export1 EXPECTED TYPE: Boolean", null, null); + } + this.export1 = export1; + this.keyModified.set("export", 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 { + Private as MasterModel, + Private as Private +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/profile.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/profile.js new file mode 100644 index 0000000..a5b1d56 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/profile.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Profile{ + + name; + id; + permissionType; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the permissionType + * @returns {String} A String representing the permissionType + */ + getPermissionType() { + return this.permissionType; + + } + + /** + * The method to set the value to permissionType + * @param {String} permissionType A String representing the permissionType + */ + setPermissionType(permissionType) { + if((permissionType != null) && (!(Object.prototype.toString.call(permissionType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: permissionType EXPECTED TYPE: String", null, null); + } + this.permissionType = permissionType; + this.keyModified.set("permission_type", 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 { + Profile as MasterModel, + Profile as Profile +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/query_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/query_details.js new file mode 100644 index 0000000..e705ab0 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/query_details.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class QueryDetails{ + + queryId; + criteria; + keyModified = new Map(); + /** + * The method to get the queryId + * @returns {BigInt} A BigInt representing the queryId + */ + getQueryId() { + return this.queryId; + + } + + /** + * The method to set the value to queryId + * @param {BigInt} queryId A BigInt representing the queryId + */ + setQueryId(queryId) { + if((queryId != null) && (!(Object.prototype.toString.call(queryId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: queryId EXPECTED TYPE: BigInt", null, null); + } + this.queryId = queryId; + this.keyModified.set("query_id", 1); + + } + + /** + * The method to get the criteria + * @returns {Map} A Map representing the criteria + */ + getCriteria() { + return this.criteria; + + } + + /** + * The method to set the value to criteria + * @param {Map} criteria A Map representing the criteria + */ + setCriteria(criteria) { + if((criteria != null) && (!(Object.prototype.toString.call(criteria) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: criteria EXPECTED TYPE: Map", null, null); + } + this.criteria = criteria; + this.keyModified.set("criteria", 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 { + QueryDetails as MasterModel, + QueryDetails as QueryDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/refer_from_field.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/refer_from_field.js new file mode 100644 index 0000000..50b0108 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/refer_from_field.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ReferFromField{ + + id; + apiName; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 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 { + ReferFromField as MasterModel, + ReferFromField as ReferFromField +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/rollup_criteria.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/rollup_criteria.js new file mode 100644 index 0000000..6165dd4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/rollup_criteria.js @@ -0,0 +1,110 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RollupCriteria{ + + comparator; + field; + value; + keyModified = new Map(); + /** + * The method to get the comparator + * @returns {String} A String representing the comparator + */ + getComparator() { + return this.comparator; + + } + + /** + * The method to set the value to comparator + * @param {String} comparator A String representing the comparator + */ + setComparator(comparator) { + if((comparator != null) && (!(Object.prototype.toString.call(comparator) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: comparator EXPECTED TYPE: String", null, null); + } + this.comparator = comparator; + this.keyModified.set("comparator", 1); + + } + + /** + * The method to get the field + * @returns {MinifiedField} An instance of MinifiedField + */ + getField() { + return this.field; + + } + + /** + * The method to set the value to field + * @param {MinifiedField} field An instance of MinifiedField + */ + async setField(field) { + const MinifiedField = (await (import("./minified_field.js"))).MasterModel; + if((field != null) && (!(field instanceof MinifiedField))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: field EXPECTED TYPE: MinifiedField", null, null); + } + this.field = field; + this.keyModified.set("field", 1); + + } + + /** + * The method to get the value + * @returns {Object} An Object representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {Object} value An Object representing the value + */ + setValue(value) { + this.value = value; + this.keyModified.set("value", 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 { + RollupCriteria as MasterModel, + RollupCriteria as RollupCriteria +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/rollup_summary.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/rollup_summary.js new file mode 100644 index 0000000..18f3895 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/rollup_summary.js @@ -0,0 +1,161 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RollupSummary{ + + returnType; + expression; + basedOnModule; + relatedList; + rollupBasedOn; + keyModified = new Map(); + /** + * The method to get the returnType + * @returns {String} A String representing the returnType + */ + getReturnType() { + return this.returnType; + + } + + /** + * The method to set the value to returnType + * @param {String} returnType A String representing the returnType + */ + setReturnType(returnType) { + if((returnType != null) && (!(Object.prototype.toString.call(returnType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: returnType EXPECTED TYPE: String", null, null); + } + this.returnType = returnType; + this.keyModified.set("return_type", 1); + + } + + /** + * The method to get the expression + * @returns {Expression} An instance of Expression + */ + getExpression() { + return this.expression; + + } + + /** + * The method to set the value to expression + * @param {Expression} expression An instance of Expression + */ + async setExpression(expression) { + const Expression = (await (import("./expression.js"))).MasterModel; + if((expression != null) && (!(expression instanceof Expression))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: expression EXPECTED TYPE: Expression", null, null); + } + this.expression = expression; + this.keyModified.set("expression", 1); + + } + + /** + * The method to get the basedOnModule + * @returns {MinifiedField} An instance of MinifiedField + */ + getBasedOnModule() { + return this.basedOnModule; + + } + + /** + * The method to set the value to basedOnModule + * @param {MinifiedField} basedOnModule An instance of MinifiedField + */ + async setBasedOnModule(basedOnModule) { + const MinifiedField = (await (import("./minified_field.js"))).MasterModel; + if((basedOnModule != null) && (!(basedOnModule instanceof MinifiedField))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: basedOnModule EXPECTED TYPE: MinifiedField", null, null); + } + this.basedOnModule = basedOnModule; + this.keyModified.set("based_on_module", 1); + + } + + /** + * The method to get the relatedList + * @returns {MinifiedField} An instance of MinifiedField + */ + getRelatedList() { + return this.relatedList; + + } + + /** + * The method to set the value to relatedList + * @param {MinifiedField} relatedList An instance of MinifiedField + */ + async setRelatedList(relatedList) { + const MinifiedField = (await (import("./minified_field.js"))).MasterModel; + if((relatedList != null) && (!(relatedList instanceof MinifiedField))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: relatedList EXPECTED TYPE: MinifiedField", null, null); + } + this.relatedList = relatedList; + this.keyModified.set("related_list", 1); + + } + + /** + * The method to get the rollupBasedOn + * @returns {String} A String representing the rollupBasedOn + */ + getRollupBasedOn() { + return this.rollupBasedOn; + + } + + /** + * The method to set the value to rollupBasedOn + * @param {String} rollupBasedOn A String representing the rollupBasedOn + */ + setRollupBasedOn(rollupBasedOn) { + if((rollupBasedOn != null) && (!(Object.prototype.toString.call(rollupBasedOn) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: rollupBasedOn EXPECTED TYPE: String", null, null); + } + this.rollupBasedOn = rollupBasedOn; + this.keyModified.set("rollup_based_on", 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 { + RollupSummary as MasterModel, + RollupSummary as RollupSummary +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/show_fields.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/show_fields.js new file mode 100644 index 0000000..941d6b2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/show_fields.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ShowFields{ + + showData; + field; + keyModified = new Map(); + /** + * The method to get the showData + * @returns {Boolean} A Boolean representing the showData + */ + getShowData() { + return this.showData; + + } + + /** + * The method to set the value to showData + * @param {Boolean} showData A Boolean representing the showData + */ + setShowData(showData) { + if((showData != null) && (!(Object.prototype.toString.call(showData) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: showData EXPECTED TYPE: Boolean", null, null); + } + this.showData = showData; + this.keyModified.set("show_data", 1); + + } + + /** + * The method to get the field + * @returns {MinifiedField} An instance of MinifiedField + */ + getField() { + return this.field; + + } + + /** + * The method to set the value to field + * @param {MinifiedField} field An instance of MinifiedField + */ + async setField(field) { + const MinifiedField = (await (import("./minified_field.js"))).MasterModel; + if((field != null) && (!(field instanceof MinifiedField))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: field EXPECTED TYPE: MinifiedField", null, null); + } + this.field = field; + this.keyModified.set("field", 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 { + ShowFields as MasterModel, + ShowFields as ShowFields +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/success.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/success.js new file mode 100644 index 0000000..653ef1d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/success.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Success{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + Success as MasterModel, + Success as Success +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/tooltip.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/tooltip.js new file mode 100644 index 0000000..098f7e2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/tooltip.js @@ -0,0 +1,90 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Tooltip{ + + name; + value; + keyModified = new Map(); + /** + * The method to get the name + * @returns {Choice} An instance of Choice + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {Choice} name An instance of Choice + */ + setName(name) { + if((name != null) && (!(name instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: Choice", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the value + * @returns {String} A String representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {String} value A String representing the value + */ + setValue(value) { + if((value != null) && (!(Object.prototype.toString.call(value) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: value EXPECTED TYPE: String", null, null); + } + this.value = value; + this.keyModified.set("value", 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 { + Tooltip as MasterModel, + Tooltip as Tooltip +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/unique.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/unique.js new file mode 100644 index 0000000..f8f318d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/unique.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Unique{ + + casesensitive; + keyModified = new Map(); + /** + * The method to get the casesensitive + * @returns {String} A String representing the casesensitive + */ + getCasesensitive() { + return this.casesensitive; + + } + + /** + * The method to set the value to casesensitive + * @param {String} casesensitive A String representing the casesensitive + */ + setCasesensitive(casesensitive) { + if((casesensitive != null) && (!(Object.prototype.toString.call(casesensitive) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: casesensitive EXPECTED TYPE: String", null, null); + } + this.casesensitive = casesensitive; + this.keyModified.set("casesensitive", 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 { + Unique as MasterModel, + Unique as Unique +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fields/view_type.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/view_type.js new file mode 100644 index 0000000..a8ea1e5 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fields/view_type.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ViewType{ + + view; + edit; + quickCreate; + create; + keyModified = new Map(); + /** + * The method to get the view + * @returns {Boolean} A Boolean representing the view + */ + getView() { + return this.view; + + } + + /** + * The method to set the value to view + * @param {Boolean} view A Boolean representing the view + */ + setView(view) { + if((view != null) && (!(Object.prototype.toString.call(view) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: view EXPECTED TYPE: Boolean", null, null); + } + this.view = view; + this.keyModified.set("view", 1); + + } + + /** + * The method to get the edit + * @returns {Boolean} A Boolean representing the edit + */ + getEdit() { + return this.edit; + + } + + /** + * The method to set the value to edit + * @param {Boolean} edit A Boolean representing the edit + */ + setEdit(edit) { + if((edit != null) && (!(Object.prototype.toString.call(edit) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: edit EXPECTED TYPE: Boolean", null, null); + } + this.edit = edit; + this.keyModified.set("edit", 1); + + } + + /** + * The method to get the quickCreate + * @returns {Boolean} A Boolean representing the quickCreate + */ + getQuickCreate() { + return this.quickCreate; + + } + + /** + * The method to set the value to quickCreate + * @param {Boolean} quickCreate A Boolean representing the quickCreate + */ + setQuickCreate(quickCreate) { + if((quickCreate != null) && (!(Object.prototype.toString.call(quickCreate) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: quickCreate EXPECTED TYPE: Boolean", null, null); + } + this.quickCreate = quickCreate; + this.keyModified.set("quick_create", 1); + + } + + /** + * The method to get the create + * @returns {Boolean} A Boolean representing the create + */ + getCreate() { + return this.create; + + } + + /** + * The method to set the value to create + * @param {Boolean} create A Boolean representing the create + */ + setCreate(create) { + if((create != null) && (!(Object.prototype.toString.call(create) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: create EXPECTED TYPE: Boolean", null, null); + } + this.create = create; + this.keyModified.set("create", 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 { + ViewType as MasterModel, + ViewType as ViewType +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/files/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/files/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/files/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/files/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/files/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/files/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/files/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/files/action_wrapper.js new file mode 100644 index 0000000..6996d19 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/files/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/files/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/files/api_exception.js new file mode 100644 index 0000000..eef1972 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/files/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/files/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/files/body_wrapper.js new file mode 100644 index 0000000..e60b3c3 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/files/body_wrapper.js @@ -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 BodyWrapper{ + + file; + keyModified = new Map(); + /** + * The method to get the file + * @returns {Array} An Array representing the file + */ + getFile() { + return this.file; + + } + + /** + * The method to set the value to file + * @param {Array} file An Array representing the file + */ + setFile(file) { + if((file != null) && (!(Object.prototype.toString.call(file) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: file EXPECTED TYPE: Array", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/files/file_body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/files/file_body_wrapper.js new file mode 100644 index 0000000..ac3a3e4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/files/file_body_wrapper.js @@ -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 +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/files/files_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/files/files_operations.js new file mode 100644 index 0000000..b12eba8 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/files/files_operations.js @@ -0,0 +1,80 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 FilesOperations{ + /** + * The method to upload files + * @param {BodyWrapper} request An instance of BodyWrapper + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async uploadFiles(request, paramInstance=null) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/files"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("multipart/form-data"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get file + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getFile(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/files"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/x-download"); + + } + +} +class UploadFilesParam{ + + static TYPE = new Param("type", "com.zoho.crm.api.Files.UploadFilesParam"); +} + +class GetFileParam{ + + static ID = new Param("id", "com.zoho.crm.api.Files.GetFileParam"); +} + +export { + FilesOperations as MasterModel, + FilesOperations as FilesOperations, + GetFileParam as GetFileParam, + UploadFilesParam as UploadFilesParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/files/import_files.js b/versions/3.0.0/lib/core/com/zoho/crm/api/files/import_files.js new file mode 100644 index 0000000..a8f6f60 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/files/import_files.js @@ -0,0 +1,11 @@ +export { BodyWrapper } from "./body_wrapper.js"; +export { APIException } from "./api_exception.js"; +export * as ActionHandler from "./action_handler.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export * as ResponseHandler from "./response_handler.js"; +export * as ActionResponse from "./action_response.js"; +export { SuccessResponse } from "./success_response.js"; +export { FilesOperations } from "./files_operations.js"; +export { UploadFilesParam } from "./files_operations.js"; +export { GetFileParam } from "./files_operations.js"; +export { FileBodyWrapper } from "./file_body_wrapper.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/files/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/files/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/files/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/files/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/files/success_response.js new file mode 100644 index 0000000..e6c4d45 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/files/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/action_wrapper.js new file mode 100644 index 0000000..28674c7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/action_wrapper.js @@ -0,0 +1,63 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + fiscalYear; + keyModified = new Map(); + /** + * The method to get the fiscalYear + * @returns {ActionResponse} An instance of ActionResponse + */ + getFiscalYear() { + return this.fiscalYear; + + } + + /** + * The method to set the value to fiscalYear + * @param {ActionResponse} fiscalYear An instance of ActionResponse + */ + setFiscalYear(fiscalYear) { + this.fiscalYear = fiscalYear; + this.keyModified.set("fiscal_year", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/api_exception.js new file mode 100644 index 0000000..8bc1a10 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/body_wrapper.js new file mode 100644 index 0000000..bde00f1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/body_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + fiscalYear; + keyModified = new Map(); + /** + * The method to get the fiscalYear + * @returns {Year} An instance of Year + */ + getFiscalYear() { + return this.fiscalYear; + + } + + /** + * The method to set the value to fiscalYear + * @param {Year} fiscalYear An instance of Year + */ + async setFiscalYear(fiscalYear) { + const Year = (await (import("./year.js"))).MasterModel; + if((fiscalYear != null) && (!(fiscalYear instanceof Year))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fiscalYear EXPECTED TYPE: Year", null, null); + } + this.fiscalYear = fiscalYear; + this.keyModified.set("fiscal_year", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/fiscal_year_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/fiscal_year_operations.js new file mode 100644 index 0000000..35c0b6b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/fiscal_year_operations.js @@ -0,0 +1,56 @@ +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 FiscalYearOperations{ + /** + * The method to get fiscal year + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getFiscalYear() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/fiscal_year"); + 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"); + + } + + /** + * The method to update fiscal year + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateFiscalYear(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/fiscal_year"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +export { + FiscalYearOperations as MasterModel, + FiscalYearOperations as FiscalYearOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/import_fiscal_year.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/import_fiscal_year.js new file mode 100644 index 0000000..2cde5e1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/import_fiscal_year.js @@ -0,0 +1,10 @@ +export { FiscalYearOperations } from "./fiscal_year_operations.js"; +export { APIException } from "./api_exception.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export * as ResponseHandler from "./response_handler.js"; +export * as ActionHandler from "./action_handler.js"; +export * as ActionResponse from "./action_response.js"; +export { Year } from "./year.js"; +export { SuccessResponse } from "./success_response.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/response_wrapper.js new file mode 100644 index 0000000..af7372f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/response_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + fiscalYear; + keyModified = new Map(); + /** + * The method to get the fiscalYear + * @returns {Year} An instance of Year + */ + getFiscalYear() { + return this.fiscalYear; + + } + + /** + * The method to set the value to fiscalYear + * @param {Year} fiscalYear An instance of Year + */ + async setFiscalYear(fiscalYear) { + const Year = (await (import("./year.js"))).MasterModel; + if((fiscalYear != null) && (!(fiscalYear instanceof Year))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fiscalYear EXPECTED TYPE: Year", null, null); + } + this.fiscalYear = fiscalYear; + this.keyModified.set("fiscal_year", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/success_response.js new file mode 100644 index 0000000..15c6677 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/year.js b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/year.js new file mode 100644 index 0000000..ff32819 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/fiscal_year/year.js @@ -0,0 +1,113 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Year{ + + startMonth; + displayBasedOn; + id; + keyModified = new Map(); + /** + * The method to get the startMonth + * @returns {Choice} An instance of Choice + */ + getStartMonth() { + return this.startMonth; + + } + + /** + * The method to set the value to startMonth + * @param {Choice} startMonth An instance of Choice + */ + setStartMonth(startMonth) { + if((startMonth != null) && (!(startMonth instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: startMonth EXPECTED TYPE: Choice", null, null); + } + this.startMonth = startMonth; + this.keyModified.set("start_month", 1); + + } + + /** + * The method to get the displayBasedOn + * @returns {Choice} An instance of Choice + */ + getDisplayBasedOn() { + return this.displayBasedOn; + + } + + /** + * The method to set the value to displayBasedOn + * @param {Choice} displayBasedOn An instance of Choice + */ + setDisplayBasedOn(displayBasedOn) { + if((displayBasedOn != null) && (!(displayBasedOn instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayBasedOn EXPECTED TYPE: Choice", null, null); + } + this.displayBasedOn = displayBasedOn; + this.keyModified.set("display_based_on", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Year as MasterModel, + Year as Year +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/address.js b/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/address.js new file mode 100644 index 0000000..cf435e7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/address.js @@ -0,0 +1,158 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Address{ + + email; + type; + id; + userName; + default1; + keyModified = new Map(); + /** + * The method to get the email + * @returns {String} A String representing the email + */ + getEmail() { + return this.email; + + } + + /** + * The method to set the value to email + * @param {String} email A String representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: String", null, null); + } + this.email = email; + this.keyModified.set("email", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the userName + * @returns {String} A String representing the userName + */ + getUserName() { + return this.userName; + + } + + /** + * The method to set the value to userName + * @param {String} userName A String representing the userName + */ + setUserName(userName) { + if((userName != null) && (!(Object.prototype.toString.call(userName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: userName EXPECTED TYPE: String", null, null); + } + this.userName = userName; + this.keyModified.set("user_name", 1); + + } + + /** + * The method to get the default + * @returns {Boolean} A Boolean representing the default1 + */ + getDefault() { + return this.default1; + + } + + /** + * The method to set the value to default + * @param {Boolean} default1 A Boolean representing the default1 + */ + setDefault(default1) { + if((default1 != null) && (!(Object.prototype.toString.call(default1) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: default1 EXPECTED TYPE: Boolean", null, null); + } + this.default1 = default1; + this.keyModified.set("default", 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 { + Address as MasterModel, + Address as Address +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/api_exception.js new file mode 100644 index 0000000..eef1972 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/from_addresses_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/from_addresses_operations.js new file mode 100644 index 0000000..a124194 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/from_addresses_operations.js @@ -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 FromAddressesOperations{ + /** + * The method to get from addresses + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getFromAddresses() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/emails/actions/from_addresses"); + 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 { + FromAddressesOperations as MasterModel, + FromAddressesOperations as FromAddressesOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/import_from_addresses.js b/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/import_from_addresses.js new file mode 100644 index 0000000..09a0a6f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/import_from_addresses.js @@ -0,0 +1,5 @@ +export { ResponseWrapper } from "./response_wrapper.js"; +export * as ResponseHandler from "./response_handler.js"; +export { FromAddressesOperations } from "./from_addresses_operations.js"; +export { APIException } from "./api_exception.js"; +export { Address } from "./address.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/response_wrapper.js new file mode 100644 index 0000000..a4607bb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/from_addresses/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + fromAddresses; + keyModified = new Map(); + /** + * The method to get the fromAddresses + * @returns {Array} An Array representing the fromAddresses + */ + getFromAddresses() { + return this.fromAddresses; + + } + + /** + * The method to set the value to fromAddresses + * @param {Array} fromAddresses An Array representing the fromAddresses + */ + setFromAddresses(fromAddresses) { + if((fromAddresses != null) && (!(Object.prototype.toString.call(fromAddresses) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fromAddresses EXPECTED TYPE: Array", null, null); + } + this.fromAddresses = fromAddresses; + this.keyModified.set("from_addresses", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/action_wrapper.js new file mode 100644 index 0000000..882fce5 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/action_wrapper.js @@ -0,0 +1,63 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + hipaaCompliance; + keyModified = new Map(); + /** + * The method to get the hipaaCompliance + * @returns {ActionHandler} An instance of ActionHandler + */ + getHipaaCompliance() { + return this.hipaaCompliance; + + } + + /** + * The method to set the value to hipaaCompliance + * @param {ActionHandler} hipaaCompliance An instance of ActionHandler + */ + setHipaaCompliance(hipaaCompliance) { + this.hipaaCompliance = hipaaCompliance; + this.keyModified.set("hipaa_compliance", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/api_exception.js new file mode 100644 index 0000000..eef1972 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/hipaa_compliance.js b/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/hipaa_compliance.js new file mode 100644 index 0000000..aa74b3f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/hipaa_compliance.js @@ -0,0 +1,181 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class HipaaCompliance{ + + enabled; + enabledForModules; + restrictToZohoApps; + restrictDataAccessThroughAPI; + restrictDataInExport; + restrictToThirdPartyApps; + keyModified = new Map(); + /** + * The method to get the enabled + * @returns {Boolean} A Boolean representing the enabled + */ + getEnabled() { + return this.enabled; + + } + + /** + * The method to set the value to enabled + * @param {Boolean} enabled A Boolean representing the enabled + */ + setEnabled(enabled) { + if((enabled != null) && (!(Object.prototype.toString.call(enabled) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: enabled EXPECTED TYPE: Boolean", null, null); + } + this.enabled = enabled; + this.keyModified.set("enabled", 1); + + } + + /** + * The method to get the enabledForModules + * @returns {Array} An Array representing the enabledForModules + */ + getEnabledForModules() { + return this.enabledForModules; + + } + + /** + * The method to set the value to enabledForModules + * @param {Array} enabledForModules An Array representing the enabledForModules + */ + setEnabledForModules(enabledForModules) { + if((enabledForModules != null) && (!(Object.prototype.toString.call(enabledForModules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: enabledForModules EXPECTED TYPE: Array", null, null); + } + this.enabledForModules = enabledForModules; + this.keyModified.set("enabled_for_modules", 1); + + } + + /** + * The method to get the restrictToZohoApps + * @returns {Boolean} A Boolean representing the restrictToZohoApps + */ + getRestrictToZohoApps() { + return this.restrictToZohoApps; + + } + + /** + * The method to set the value to restrictToZohoApps + * @param {Boolean} restrictToZohoApps A Boolean representing the restrictToZohoApps + */ + setRestrictToZohoApps(restrictToZohoApps) { + if((restrictToZohoApps != null) && (!(Object.prototype.toString.call(restrictToZohoApps) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: restrictToZohoApps EXPECTED TYPE: Boolean", null, null); + } + this.restrictToZohoApps = restrictToZohoApps; + this.keyModified.set("restrict_to_zoho_apps", 1); + + } + + /** + * The method to get the restrictDataAccessThroughapi + * @returns {Boolean} A Boolean representing the restrictDataAccessThroughAPI + */ + getRestrictDataAccessThroughAPI() { + return this.restrictDataAccessThroughAPI; + + } + + /** + * The method to set the value to restrictDataAccessThroughapi + * @param {Boolean} restrictDataAccessThroughAPI A Boolean representing the restrictDataAccessThroughAPI + */ + setRestrictDataAccessThroughAPI(restrictDataAccessThroughAPI) { + if((restrictDataAccessThroughAPI != null) && (!(Object.prototype.toString.call(restrictDataAccessThroughAPI) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: restrictDataAccessThroughAPI EXPECTED TYPE: Boolean", null, null); + } + this.restrictDataAccessThroughAPI = restrictDataAccessThroughAPI; + this.keyModified.set("restrict_data_access_through_api", 1); + + } + + /** + * The method to get the restrictDataInExport + * @returns {Boolean} A Boolean representing the restrictDataInExport + */ + getRestrictDataInExport() { + return this.restrictDataInExport; + + } + + /** + * The method to set the value to restrictDataInExport + * @param {Boolean} restrictDataInExport A Boolean representing the restrictDataInExport + */ + setRestrictDataInExport(restrictDataInExport) { + if((restrictDataInExport != null) && (!(Object.prototype.toString.call(restrictDataInExport) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: restrictDataInExport EXPECTED TYPE: Boolean", null, null); + } + this.restrictDataInExport = restrictDataInExport; + this.keyModified.set("restrict_data_in_export", 1); + + } + + /** + * The method to get the restrictToThirdPartyApps + * @returns {Array} An Array representing the restrictToThirdPartyApps + */ + getRestrictToThirdPartyApps() { + return this.restrictToThirdPartyApps; + + } + + /** + * The method to set the value to restrictToThirdPartyApps + * @param {Array} restrictToThirdPartyApps An Array representing the restrictToThirdPartyApps + */ + setRestrictToThirdPartyApps(restrictToThirdPartyApps) { + if((restrictToThirdPartyApps != null) && (!(Object.prototype.toString.call(restrictToThirdPartyApps) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: restrictToThirdPartyApps EXPECTED TYPE: Array", null, null); + } + this.restrictToThirdPartyApps = restrictToThirdPartyApps; + this.keyModified.set("restrict_to_third_party_apps", 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 { + HipaaCompliance as MasterModel, + HipaaCompliance as HipaaCompliance +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/import_hipaa_compliance.js b/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/import_hipaa_compliance.js new file mode 100644 index 0000000..e6ab6e9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/import_hipaa_compliance.js @@ -0,0 +1,7 @@ +export { APIException } from "./api_exception.js"; +export * as ActionHandler from "./action_handler.js"; +export { Modules } from "./modules.js"; +export { SuccessResponse } from "./success_response.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { HipaaCompliance } from "./hipaa_compliance.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/modules.js b/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/modules.js new file mode 100644 index 0000000..1ae3c07 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/modules.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Modules{ + + apiName; + id; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Modules as MasterModel, + Modules as Modules +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/response_wrapper.js new file mode 100644 index 0000000..1e428af --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/response_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + hipaaCompliance; + keyModified = new Map(); + /** + * The method to get the hipaaCompliance + * @returns {HipaaCompliance} An instance of HipaaCompliance + */ + getHipaaCompliance() { + return this.hipaaCompliance; + + } + + /** + * The method to set the value to hipaaCompliance + * @param {HipaaCompliance} hipaaCompliance An instance of HipaaCompliance + */ + async setHipaaCompliance(hipaaCompliance) { + const HipaaCompliance = (await (import("./hipaa_compliance.js"))).MasterModel; + if((hipaaCompliance != null) && (!(hipaaCompliance instanceof HipaaCompliance))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: hipaaCompliance EXPECTED TYPE: HipaaCompliance", null, null); + } + this.hipaaCompliance = hipaaCompliance; + this.keyModified.set("hipaa_compliance", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/success_response.js new file mode 100644 index 0000000..e8b71a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/hipaa_compliance/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/action_wrapper.js new file mode 100644 index 0000000..39510da --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + holidays; + keyModified = new Map(); + /** + * The method to get the holidays + * @returns {Array} An Array representing the holidays + */ + getHolidays() { + return this.holidays; + + } + + /** + * The method to set the value to holidays + * @param {Array} holidays An Array representing the holidays + */ + setHolidays(holidays) { + if((holidays != null) && (!(Object.prototype.toString.call(holidays) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: holidays EXPECTED TYPE: Array", null, null); + } + this.holidays = holidays; + this.keyModified.set("holidays", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/body_wrapper.js new file mode 100644 index 0000000..0833015 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/body_wrapper.js @@ -0,0 +1,7 @@ +class BodyWrapper{ + +} +export { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/business_holiday.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/business_holiday.js new file mode 100644 index 0000000..53a7019 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/business_holiday.js @@ -0,0 +1,113 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BusinessHoliday{ + + name; + date; + type; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the date + * @returns {Date} An instance of Date + */ + getDate() { + return this.date; + + } + + /** + * The method to set the value to date + * @param {Date} date An instance of Date + */ + setDate(date) { + if((date != null) && (!(date instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: date EXPECTED TYPE: Date", null, null); + } + this.date = date; + this.keyModified.set("date", 1); + + } + + /** + * The method to get the type + * @returns {Choice} An instance of Choice + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {Choice} type An instance of Choice + */ + setType(type) { + if((type != null) && (!(type instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: Choice", null, null); + } + this.type = type; + this.keyModified.set("type", 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 { + BusinessHoliday as MasterModel, + BusinessHoliday as BusinessHoliday +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/create_business_holiday.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/create_business_holiday.js new file mode 100644 index 0000000..a3e6d0d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/create_business_holiday.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class CreateBusinessHoliday{ + + holidays; + keyModified = new Map(); + /** + * The method to get the holidays + * @returns {Array} An Array representing the holidays + */ + getHolidays() { + return this.holidays; + + } + + /** + * The method to set the value to holidays + * @param {Array} holidays An Array representing the holidays + */ + setHolidays(holidays) { + if((holidays != null) && (!(Object.prototype.toString.call(holidays) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: holidays EXPECTED TYPE: Array", null, null); + } + this.holidays = holidays; + this.keyModified.set("holidays", 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 { + CreateBusinessHoliday as MasterModel, + CreateBusinessHoliday as CreateBusinessHoliday +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/create_shift_holiday.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/create_shift_holiday.js new file mode 100644 index 0000000..0c06b33 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/create_shift_holiday.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class CreateShiftHoliday{ + + holidays; + keyModified = new Map(); + /** + * The method to get the holidays + * @returns {Array} An Array representing the holidays + */ + getHolidays() { + return this.holidays; + + } + + /** + * The method to set the value to holidays + * @param {Array} holidays An Array representing the holidays + */ + setHolidays(holidays) { + if((holidays != null) && (!(Object.prototype.toString.call(holidays) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: holidays EXPECTED TYPE: Array", null, null); + } + this.holidays = holidays; + this.keyModified.set("holidays", 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 { + CreateShiftHoliday as MasterModel, + CreateShiftHoliday as CreateShiftHoliday +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/holiday.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/holiday.js new file mode 100644 index 0000000..898607f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/holiday.js @@ -0,0 +1,182 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Holiday{ + + year; + name; + date; + type; + id; + shiftHour; + keyModified = new Map(); + /** + * The method to get the year + * @returns {number} A number representing the year + */ + getYear() { + return this.year; + + } + + /** + * The method to set the value to year + * @param {number} year A number representing the year + */ + setYear(year) { + if((year != null) && (!(Object.prototype.toString.call(year) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: year EXPECTED TYPE: number", null, null); + } + this.year = year; + this.keyModified.set("year", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the date + * @returns {Date} An instance of Date + */ + getDate() { + return this.date; + + } + + /** + * The method to set the value to date + * @param {Date} date An instance of Date + */ + setDate(date) { + if((date != null) && (!(date instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: date EXPECTED TYPE: Date", null, null); + } + this.date = date; + this.keyModified.set("date", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the shiftHour + * @returns {ShiftHour} An instance of ShiftHour + */ + getShiftHour() { + return this.shiftHour; + + } + + /** + * The method to set the value to shiftHour + * @param {ShiftHour} shiftHour An instance of ShiftHour + */ + async setShiftHour(shiftHour) { + const ShiftHour = (await (import("./shift_hour.js"))).MasterModel; + if((shiftHour != null) && (!(shiftHour instanceof ShiftHour))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: shiftHour EXPECTED TYPE: ShiftHour", null, null); + } + this.shiftHour = shiftHour; + this.keyModified.set("shift_hour", 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 { + Holiday as MasterModel, + Holiday as Holiday +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/holidays.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/holidays.js new file mode 100644 index 0000000..ecec28d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/holidays.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Holidays{ + + holidays; + keyModified = new Map(); + /** + * The method to get the holidays + * @returns {Array} An Array representing the holidays + */ + getHolidays() { + return this.holidays; + + } + + /** + * The method to set the value to holidays + * @param {Array} holidays An Array representing the holidays + */ + setHolidays(holidays) { + if((holidays != null) && (!(Object.prototype.toString.call(holidays) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: holidays EXPECTED TYPE: Array", null, null); + } + this.holidays = holidays; + this.keyModified.set("holidays", 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 { + Holidays as MasterModel, + Holidays as Holidays +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/holidays_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/holidays_operations.js new file mode 100644 index 0000000..813c823 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/holidays_operations.js @@ -0,0 +1,221 @@ +import {Header} from "../../../../../../routes/header.js"; +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 HolidaysOperations{ + + xCrmOrg; + /** + * Creates an instance of HolidaysOperations with the given parameters + * @param {String} xCrmOrg A String representing the xCrmOrg + */ + constructor(xCrmOrg=null){ + if((xCrmOrg != null) && (!(Object.prototype.toString.call(xCrmOrg) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: xCrmOrg EXPECTED TYPE: String", null, null); + } + this.xCrmOrg = xCrmOrg; + + } + + /** + * The method to get holidays + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getHolidays(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/holidays"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.Holidays.GetHolidaysHeader"), this.xCrmOrg).catch(err => { throw err; }); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to create holidays + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createHolidays(request) { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/holidays"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + await handlerInstance.addHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.Holidays.CreateHolidaysHeader"), this.xCrmOrg).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update holidays + * @param {Holidays} request An instance of Holidays + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateHolidays(request) { + const Holidays = (await (import("./holidays.js"))).MasterModel; + if((request != null) && (!(request instanceof Holidays))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: Holidays", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/holidays"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + await handlerInstance.addHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.Holidays.UpdateHolidaysHeader"), this.xCrmOrg).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update holiday + * @param {BigInt} holidayId A BigInt representing the holidayId + * @param {Holidays} request An instance of Holidays + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateHoliday(holidayId, request) { + const Holidays = (await (import("./holidays.js"))).MasterModel; + if((!(Object.prototype.toString.call(holidayId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: holidayId EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof Holidays))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: Holidays", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/holidays/"); + apiPath = apiPath.concat(holidayId.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + await handlerInstance.addHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.Holidays.UpdateHolidayHeader"), this.xCrmOrg).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get holiday + * @param {BigInt} holidayId A BigInt representing the holidayId + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getHoliday(holidayId) { + if((!(Object.prototype.toString.call(holidayId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: holidayId EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/holidays/"); + apiPath = apiPath.concat(holidayId.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.Holidays.GetHolidayHeader"), this.xCrmOrg).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResonseHandler = require.resolve("./resonse_handler.js"); + return handlerInstance.apiCall(ResonseHandler, "application/json"); + + } + + /** + * The method to delete holiday + * @param {BigInt} holidayId A BigInt representing the holidayId + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteHoliday(holidayId) { + if((!(Object.prototype.toString.call(holidayId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: holidayId EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/holidays/"); + apiPath = apiPath.concat(holidayId.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + await handlerInstance.addHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.Holidays.DeleteHolidayHeader"), this.xCrmOrg).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class GetHolidaysHeader{ + +} + +class GetHolidaysParam{ + + static YEAR = new Param("year", "com.zoho.crm.api.Holidays.GetHolidaysParam"); + static TYPE = new Param("type", "com.zoho.crm.api.Holidays.GetHolidaysParam"); + static SHIFT_ID = new Param("shift_id", "com.zoho.crm.api.Holidays.GetHolidaysParam"); +} + +class CreateHolidaysHeader{ + +} + +class UpdateHolidaysHeader{ + +} + +class UpdateHolidayHeader{ + +} + +class GetHolidayHeader{ + +} + +class DeleteHolidayHeader{ + +} + +export { + HolidaysOperations as MasterModel, + HolidaysOperations as HolidaysOperations, + CreateHolidaysHeader as CreateHolidaysHeader, + GetHolidayHeader as GetHolidayHeader, + GetHolidaysHeader as GetHolidaysHeader, + UpdateHolidayHeader as UpdateHolidayHeader, + GetHolidaysParam as GetHolidaysParam, + UpdateHolidaysHeader as UpdateHolidaysHeader, + DeleteHolidayHeader as DeleteHolidayHeader +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/import_holidays.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/import_holidays.js new file mode 100644 index 0000000..b03f7cc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/import_holidays.js @@ -0,0 +1,25 @@ +export { CreateBusinessHoliday } from "./create_business_holiday.js"; +export { ShiftHour } from "./shift_hour.js"; +export { Holiday } from "./holiday.js"; +export * as ResponseHandler from "./response_handler.js"; +export * as ActionHandler from "./action_handler.js"; +export { APIException } from "./api_exception.js"; +export { CreateShiftHoliday } from "./create_shift_holiday.js"; +export * as ResonseHandler from "./resonse_handler.js"; +export { Holidays } from "./holidays.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export * as ActionResponse from "./action_response.js"; +export { HolidaysOperations } from "./holidays_operations.js"; +export { GetHolidaysHeader } from "./holidays_operations.js"; +export { GetHolidaysParam } from "./holidays_operations.js"; +export { CreateHolidaysHeader } from "./holidays_operations.js"; +export { UpdateHolidaysHeader } from "./holidays_operations.js"; +export { UpdateHolidayHeader } from "./holidays_operations.js"; +export { GetHolidayHeader } from "./holidays_operations.js"; +export { DeleteHolidayHeader } from "./holidays_operations.js"; +export { ShiftHoliday } from "./shift_holiday.js"; +export { SuccessResponse } from "./success_response.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export * as BodyWrapper from "./body_wrapper.js"; +export { Info } from "./info.js"; +export { BusinessHoliday } from "./business_holiday.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/info.js new file mode 100644 index 0000000..e495623 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/info.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + perPage; + count; + page; + moreRecords; + keyModified = new Map(); + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/resonse_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/resonse_handler.js new file mode 100644 index 0000000..56faf24 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/resonse_handler.js @@ -0,0 +1,7 @@ +class ResonseHandler{ + +} +export { + ResonseHandler as MasterModel, + ResonseHandler as ResonseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/response_wrapper.js new file mode 100644 index 0000000..3b33c0c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + holidays; + info; + keyModified = new Map(); + /** + * The method to get the holidays + * @returns {Array} An Array representing the holidays + */ + getHolidays() { + return this.holidays; + + } + + /** + * The method to set the value to holidays + * @param {Array} holidays An Array representing the holidays + */ + setHolidays(holidays) { + if((holidays != null) && (!(Object.prototype.toString.call(holidays) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: holidays EXPECTED TYPE: Array", null, null); + } + this.holidays = holidays; + this.keyModified.set("holidays", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/shift_holiday.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/shift_holiday.js new file mode 100644 index 0000000..f28d3a0 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/shift_holiday.js @@ -0,0 +1,137 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ShiftHoliday{ + + name; + date; + type; + shiftHour; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the date + * @returns {Date} An instance of Date + */ + getDate() { + return this.date; + + } + + /** + * The method to set the value to date + * @param {Date} date An instance of Date + */ + setDate(date) { + if((date != null) && (!(date instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: date EXPECTED TYPE: Date", null, null); + } + this.date = date; + this.keyModified.set("date", 1); + + } + + /** + * The method to get the type + * @returns {Choice} An instance of Choice + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {Choice} type An instance of Choice + */ + setType(type) { + if((type != null) && (!(type instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: Choice", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the shiftHour + * @returns {ShiftHour} An instance of ShiftHour + */ + getShiftHour() { + return this.shiftHour; + + } + + /** + * The method to set the value to shiftHour + * @param {ShiftHour} shiftHour An instance of ShiftHour + */ + async setShiftHour(shiftHour) { + const ShiftHour = (await (import("./shift_hour.js"))).MasterModel; + if((shiftHour != null) && (!(shiftHour instanceof ShiftHour))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: shiftHour EXPECTED TYPE: ShiftHour", null, null); + } + this.shiftHour = shiftHour; + this.keyModified.set("shift_hour", 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 { + ShiftHoliday as MasterModel, + ShiftHoliday as ShiftHoliday +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/shift_hour.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/shift_hour.js new file mode 100644 index 0000000..db15f49 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/shift_hour.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ShiftHour{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + ShiftHour as MasterModel, + ShiftHour as ShiftHour +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/success_response.js new file mode 100644 index 0000000..39525ad --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/holidays/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/api_exception.js new file mode 100644 index 0000000..db2d361 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/folder.js b/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/folder.js new file mode 100644 index 0000000..0608dbe --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/folder.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Folder{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Folder as MasterModel, + Folder as Folder +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/import_inventory_templates.js b/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/import_inventory_templates.js new file mode 100644 index 0000000..02a8a3e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/import_inventory_templates.js @@ -0,0 +1,8 @@ +export * as ResponseHandler from "./response_handler.js"; +export { InventoryTemplate } from "./inventory_template.js"; +export { InventoryTemplatesOperations } from "./inventory_templates_operations.js"; +export { GetInventoryTemplatesParam } from "./inventory_templates_operations.js"; +export { Info } from "./info.js"; +export { APIException } from "./api_exception.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { Folder } from "./folder.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/info.js new file mode 100644 index 0000000..d847543 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/info.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + perPage; + page; + count; + moreRecords; + keyModified = new Map(); + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/inventory_template.js b/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/inventory_template.js new file mode 100644 index 0000000..1e521e7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/inventory_template.js @@ -0,0 +1,370 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; +import { Template } from "../send_mail/template.js"; + +class InventoryTemplate extends Template{ + + createdTime; + modifiedTime; + lastUsageTime; + folder; + module; + createdBy; + modifiedBy; + name; + id; + editorMode; + type; + category; + favorite; + content; + keyModified = new Map(); + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the lastUsageTime + * @returns {Date} An instance of Date + */ + getLastUsageTime() { + return this.lastUsageTime; + + } + + /** + * The method to set the value to lastUsageTime + * @param {Date} lastUsageTime An instance of Date + */ + setLastUsageTime(lastUsageTime) { + if((lastUsageTime != null) && (!(lastUsageTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: lastUsageTime EXPECTED TYPE: Date", null, null); + } + this.lastUsageTime = lastUsageTime; + this.keyModified.set("last_usage_time", 1); + + } + + /** + * The method to get the folder + * @returns {Folder} An instance of Folder + */ + getFolder() { + return this.folder; + + } + + /** + * The method to set the value to folder + * @param {Folder} folder An instance of Folder + */ + async setFolder(folder) { + const Folder = (await (import("./folder.js"))).MasterModel; + if((folder != null) && (!(folder instanceof Folder))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: folder EXPECTED TYPE: Folder", null, null); + } + this.folder = folder; + this.keyModified.set("folder", 1); + + } + + /** + * The method to get the module + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {MinifiedModule} module An instance of MinifiedModule + */ + async setModule(module) { + const MinifiedModule = (await (import("../modules/minified_module.js"))).MasterModel; + if((module != null) && (!(module instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: MinifiedModule", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("modified_by", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the editorMode + * @returns {String} A String representing the editorMode + */ + getEditorMode() { + return this.editorMode; + + } + + /** + * The method to set the value to editorMode + * @param {String} editorMode A String representing the editorMode + */ + setEditorMode(editorMode) { + if((editorMode != null) && (!(Object.prototype.toString.call(editorMode) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: editorMode EXPECTED TYPE: String", null, null); + } + this.editorMode = editorMode; + this.keyModified.set("editor_mode", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the category + * @returns {String} A String representing the category + */ + getCategory() { + return this.category; + + } + + /** + * The method to set the value to category + * @param {String} category A String representing the category + */ + setCategory(category) { + if((category != null) && (!(Object.prototype.toString.call(category) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: category EXPECTED TYPE: String", null, null); + } + this.category = category; + this.keyModified.set("category", 1); + + } + + /** + * The method to get the favorite + * @returns {Boolean} A Boolean representing the favorite + */ + getFavorite() { + return this.favorite; + + } + + /** + * The method to set the value to favorite + * @param {Boolean} favorite A Boolean representing the favorite + */ + setFavorite(favorite) { + if((favorite != null) && (!(Object.prototype.toString.call(favorite) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: favorite EXPECTED TYPE: Boolean", null, null); + } + this.favorite = favorite; + this.keyModified.set("favorite", 1); + + } + + /** + * The method to get the content + * @returns {String} A String representing the content + */ + getContent() { + return this.content; + + } + + /** + * The method to set the value to content + * @param {String} content A String representing the content + */ + setContent(content) { + if((content != null) && (!(Object.prototype.toString.call(content) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: content EXPECTED TYPE: String", null, null); + } + this.content = content; + this.keyModified.set("content", 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 { + InventoryTemplate as MasterModel, + InventoryTemplate as InventoryTemplate +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/inventory_templates_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/inventory_templates_operations.js new file mode 100644 index 0000000..042d28e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/inventory_templates_operations.js @@ -0,0 +1,69 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 InventoryTemplatesOperations{ + /** + * The method to get inventory templates + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getInventoryTemplates(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/inventory_templates"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to get inventory template + * @param {BigInt} template A BigInt representing the template + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getInventoryTemplate(template) { + if((!(Object.prototype.toString.call(template) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: template EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/inventory_templates/"); + apiPath = apiPath.concat(template.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/json"); + + } + +} +class GetInventoryTemplatesParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.InventoryTemplates.GetInventoryTemplatesParam"); + static CATEGORY = new Param("category", "com.zoho.crm.api.InventoryTemplates.GetInventoryTemplatesParam"); + static SORT_BY = new Param("sort_by", "com.zoho.crm.api.InventoryTemplates.GetInventoryTemplatesParam"); + static SORT_ORDER = new Param("sort_order", "com.zoho.crm.api.InventoryTemplates.GetInventoryTemplatesParam"); +} + +export { + InventoryTemplatesOperations as MasterModel, + InventoryTemplatesOperations as InventoryTemplatesOperations, + GetInventoryTemplatesParam as GetInventoryTemplatesParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/response_wrapper.js new file mode 100644 index 0000000..617329d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/inventory_templates/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + inventoryTemplates; + info; + keyModified = new Map(); + /** + * The method to get the inventoryTemplates + * @returns {Array} An Array representing the inventoryTemplates + */ + getInventoryTemplates() { + return this.inventoryTemplates; + + } + + /** + * The method to set the value to inventoryTemplates + * @param {Array} inventoryTemplates An Array representing the inventoryTemplates + */ + setInventoryTemplates(inventoryTemplates) { + if((inventoryTemplates != null) && (!(Object.prototype.toString.call(inventoryTemplates) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: inventoryTemplates EXPECTED TYPE: Array", null, null); + } + this.inventoryTemplates = inventoryTemplates; + this.keyModified.set("inventory_templates", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/isc_signature/import_isc_signature.js b/versions/3.0.0/lib/core/com/zoho/crm/api/isc_signature/import_isc_signature.js new file mode 100644 index 0000000..3e2a0f0 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/isc_signature/import_isc_signature.js @@ -0,0 +1 @@ +export { Signature } from "./signature.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/isc_signature/signature.js b/versions/3.0.0/lib/core/com/zoho/crm/api/isc_signature/signature.js new file mode 100644 index 0000000..3d736a1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/isc_signature/signature.js @@ -0,0 +1,63 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Signature{ + + iscSignature; + keyModified = new Map(); + /** + * The method to get the iscSignature + * @returns {Object} An Object representing the iscSignature + */ + getIscSignature() { + return this.iscSignature; + + } + + /** + * The method to set the value to iscSignature + * @param {Object} iscSignature An Object representing the iscSignature + */ + setIscSignature(iscSignature) { + this.iscSignature = iscSignature; + this.keyModified.set("isc_signature", 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 { + Signature as MasterModel, + Signature as Signature +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/actions_allowed.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/actions_allowed.js new file mode 100644 index 0000000..bd5d245 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/actions_allowed.js @@ -0,0 +1,204 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionsAllowed{ + + edit; + rename; + clone; + downgrade; + delete1; + deactivate; + setLayoutPermissions; + keyModified = new Map(); + /** + * The method to get the edit + * @returns {Boolean} A Boolean representing the edit + */ + getEdit() { + return this.edit; + + } + + /** + * The method to set the value to edit + * @param {Boolean} edit A Boolean representing the edit + */ + setEdit(edit) { + if((edit != null) && (!(Object.prototype.toString.call(edit) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: edit EXPECTED TYPE: Boolean", null, null); + } + this.edit = edit; + this.keyModified.set("edit", 1); + + } + + /** + * The method to get the rename + * @returns {Boolean} A Boolean representing the rename + */ + getRename() { + return this.rename; + + } + + /** + * The method to set the value to rename + * @param {Boolean} rename A Boolean representing the rename + */ + setRename(rename) { + if((rename != null) && (!(Object.prototype.toString.call(rename) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: rename EXPECTED TYPE: Boolean", null, null); + } + this.rename = rename; + this.keyModified.set("rename", 1); + + } + + /** + * The method to get the clone + * @returns {Boolean} A Boolean representing the clone + */ + getClone() { + return this.clone; + + } + + /** + * The method to set the value to clone + * @param {Boolean} clone A Boolean representing the clone + */ + setClone(clone) { + if((clone != null) && (!(Object.prototype.toString.call(clone) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: clone EXPECTED TYPE: Boolean", null, null); + } + this.clone = clone; + this.keyModified.set("clone", 1); + + } + + /** + * The method to get the downgrade + * @returns {Boolean} A Boolean representing the downgrade + */ + getDowngrade() { + return this.downgrade; + + } + + /** + * The method to set the value to downgrade + * @param {Boolean} downgrade A Boolean representing the downgrade + */ + setDowngrade(downgrade) { + if((downgrade != null) && (!(Object.prototype.toString.call(downgrade) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: downgrade EXPECTED TYPE: Boolean", null, null); + } + this.downgrade = downgrade; + this.keyModified.set("downgrade", 1); + + } + + /** + * The method to get the delete + * @returns {Boolean} A Boolean representing the delete1 + */ + getDelete() { + return this.delete1; + + } + + /** + * The method to set the value to delete + * @param {Boolean} delete1 A Boolean representing the delete1 + */ + setDelete(delete1) { + if((delete1 != null) && (!(Object.prototype.toString.call(delete1) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: delete1 EXPECTED TYPE: Boolean", null, null); + } + this.delete1 = delete1; + this.keyModified.set("delete", 1); + + } + + /** + * The method to get the deactivate + * @returns {Boolean} A Boolean representing the deactivate + */ + getDeactivate() { + return this.deactivate; + + } + + /** + * The method to set the value to deactivate + * @param {Boolean} deactivate A Boolean representing the deactivate + */ + setDeactivate(deactivate) { + if((deactivate != null) && (!(Object.prototype.toString.call(deactivate) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deactivate EXPECTED TYPE: Boolean", null, null); + } + this.deactivate = deactivate; + this.keyModified.set("deactivate", 1); + + } + + /** + * The method to get the setLayoutPermissions + * @returns {Boolean} A Boolean representing the setLayoutPermissions + */ + getSetLayoutPermissions() { + return this.setLayoutPermissions; + + } + + /** + * The method to set the value to setLayoutPermissions + * @param {Boolean} setLayoutPermissions A Boolean representing the setLayoutPermissions + */ + setSetLayoutPermissions(setLayoutPermissions) { + if((setLayoutPermissions != null) && (!(Object.prototype.toString.call(setLayoutPermissions) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: setLayoutPermissions EXPECTED TYPE: Boolean", null, null); + } + this.setLayoutPermissions = setLayoutPermissions; + this.keyModified.set("set_layout_permissions", 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 { + ActionsAllowed as MasterModel, + ActionsAllowed as ActionsAllowed +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/api_exception.js new file mode 100644 index 0000000..db2d361 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/convert_mapping.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/convert_mapping.js new file mode 100644 index 0000000..9aa5251 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/convert_mapping.js @@ -0,0 +1,163 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ConvertMapping{ + + contacts; + deals; + accounts; + invoices; + salesorders; + keyModified = new Map(); + /** + * The method to get the contacts + * @returns {MinifiedLayout} An instance of MinifiedLayout + */ + getContacts() { + return this.contacts; + + } + + /** + * The method to set the value to contacts + * @param {MinifiedLayout} contacts An instance of MinifiedLayout + */ + async setContacts(contacts) { + const MinifiedLayout = (await (import("./minified_layout.js"))).MasterModel; + if((contacts != null) && (!(contacts instanceof MinifiedLayout))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: contacts EXPECTED TYPE: MinifiedLayout", null, null); + } + this.contacts = contacts; + this.keyModified.set("Contacts", 1); + + } + + /** + * The method to get the deals + * @returns {DealLayoutMapping} An instance of DealLayoutMapping + */ + getDeals() { + return this.deals; + + } + + /** + * The method to set the value to deals + * @param {DealLayoutMapping} deals An instance of DealLayoutMapping + */ + async setDeals(deals) { + const DealLayoutMapping = (await (import("./deal_layout_mapping.js"))).MasterModel; + if((deals != null) && (!(deals instanceof DealLayoutMapping))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deals EXPECTED TYPE: DealLayoutMapping", null, null); + } + this.deals = deals; + this.keyModified.set("Deals", 1); + + } + + /** + * The method to get the accounts + * @returns {MinifiedLayout} An instance of MinifiedLayout + */ + getAccounts() { + return this.accounts; + + } + + /** + * The method to set the value to accounts + * @param {MinifiedLayout} accounts An instance of MinifiedLayout + */ + async setAccounts(accounts) { + const MinifiedLayout = (await (import("./minified_layout.js"))).MasterModel; + if((accounts != null) && (!(accounts instanceof MinifiedLayout))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: accounts EXPECTED TYPE: MinifiedLayout", null, null); + } + this.accounts = accounts; + this.keyModified.set("Accounts", 1); + + } + + /** + * The method to get the invoices + * @returns {MinifiedLayout} An instance of MinifiedLayout + */ + getInvoices() { + return this.invoices; + + } + + /** + * The method to set the value to invoices + * @param {MinifiedLayout} invoices An instance of MinifiedLayout + */ + async setInvoices(invoices) { + const MinifiedLayout = (await (import("./minified_layout.js"))).MasterModel; + if((invoices != null) && (!(invoices instanceof MinifiedLayout))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: invoices EXPECTED TYPE: MinifiedLayout", null, null); + } + this.invoices = invoices; + this.keyModified.set("Invoices", 1); + + } + + /** + * The method to get the salesorders + * @returns {MinifiedLayout} An instance of MinifiedLayout + */ + getSalesorders() { + return this.salesorders; + + } + + /** + * The method to set the value to salesorders + * @param {MinifiedLayout} salesorders An instance of MinifiedLayout + */ + async setSalesorders(salesorders) { + const MinifiedLayout = (await (import("./minified_layout.js"))).MasterModel; + if((salesorders != null) && (!(salesorders instanceof MinifiedLayout))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: salesorders EXPECTED TYPE: MinifiedLayout", null, null); + } + this.salesorders = salesorders; + this.keyModified.set("SalesOrders", 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 { + ConvertMapping as MasterModel, + ConvertMapping as ConvertMapping +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/deal_field.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/deal_field.js new file mode 100644 index 0000000..a35e918 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/deal_field.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DealField{ + + apiName; + fieldLabel; + id; + required; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the fieldLabel + * @returns {String} A String representing the fieldLabel + */ + getFieldLabel() { + return this.fieldLabel; + + } + + /** + * The method to set the value to fieldLabel + * @param {String} fieldLabel A String representing the fieldLabel + */ + setFieldLabel(fieldLabel) { + if((fieldLabel != null) && (!(Object.prototype.toString.call(fieldLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldLabel EXPECTED TYPE: String", null, null); + } + this.fieldLabel = fieldLabel; + this.keyModified.set("field_label", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the required + * @returns {Boolean} A Boolean representing the required + */ + getRequired() { + return this.required; + + } + + /** + * The method to set the value to required + * @param {Boolean} required A Boolean representing the required + */ + setRequired(required) { + if((required != null) && (!(Object.prototype.toString.call(required) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: required EXPECTED TYPE: Boolean", null, null); + } + this.required = required; + this.keyModified.set("required", 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 { + DealField as MasterModel, + DealField as DealField +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/deal_layout_mapping.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/deal_layout_mapping.js new file mode 100644 index 0000000..1279b52 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/deal_layout_mapping.js @@ -0,0 +1,113 @@ +import {MinifiedLayout} from "./minified_layout.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DealLayoutMapping extends MinifiedLayout{ + + fields; + name; + id; + keyModified = new Map(); + /** + * The method to get the fields + * @returns {Array} An Array representing the fields + */ + getFields() { + return this.fields; + + } + + /** + * The method to set the value to fields + * @param {Array} fields An Array representing the fields + */ + setFields(fields) { + if((fields != null) && (!(Object.prototype.toString.call(fields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: Array", null, null); + } + this.fields = fields; + this.keyModified.set("fields", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + DealLayoutMapping as MasterModel, + DealLayoutMapping as DealLayoutMapping +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/default_assignment_view.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/default_assignment_view.js new file mode 100644 index 0000000..b972608 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/default_assignment_view.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DefaultAssignmentView{ + + name; + id; + type; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 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 { + DefaultAssignmentView as MasterModel, + DefaultAssignmentView as DefaultAssignmentView +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/default_view.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/default_view.js new file mode 100644 index 0000000..9bfff85 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/default_view.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DefaultView{ + + name; + id; + type; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 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 { + DefaultView as MasterModel, + DefaultView as DefaultView +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/import_layouts.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/import_layouts.js new file mode 100644 index 0000000..fe0bf11 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/import_layouts.js @@ -0,0 +1,20 @@ +export { Layouts } from "./layouts.js"; +export { ActionsAllowed } from "./actions_allowed.js"; +export { ConvertMapping } from "./convert_mapping.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { DealLayoutMapping } from "./deal_layout_mapping.js"; +export { DefaultAssignmentView } from "./default_assignment_view.js"; +export { DealField } from "./deal_field.js"; +export { APIException } from "./api_exception.js"; +export { LayoutsOperations } from "./layouts_operations.js"; +export { GetLayoutsParam } from "./layouts_operations.js"; +export { GetLayoutParam } from "./layouts_operations.js"; +export { DefaultView } from "./default_view.js"; +export { Tooltip } from "./tooltip.js"; +export { Profiles } from "./profiles.js"; +export { SectionSubformField } from "./section_subform_field.js"; +export { MinifiedLayout } from "./minified_layout.js"; +export { Sections } from "./sections.js"; +export { SectionField } from "./section_field.js"; +export { Properties } from "./properties.js"; +export * as ResponseHandler from "./response_handler.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/layouts.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/layouts.js new file mode 100644 index 0000000..07341e7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/layouts.js @@ -0,0 +1,508 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Layouts{ + + displayType; + apiName; + hasMoreProfiles; + createdTime; + modifiedTime; + visible; + source; + id; + name; + displayLabel; + status; + showBusinessCard; + generatedType; + createdFor; + convertMapping; + modifiedBy; + profiles; + createdBy; + sections; + actionsAllowed; + keyModified = new Map(); + /** + * The method to get the displayType + * @returns {number} A number representing the displayType + */ + getDisplayType() { + return this.displayType; + + } + + /** + * The method to set the value to displayType + * @param {number} displayType A number representing the displayType + */ + setDisplayType(displayType) { + if((displayType != null) && (!(Object.prototype.toString.call(displayType) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayType EXPECTED TYPE: number", null, null); + } + this.displayType = displayType; + this.keyModified.set("display_type", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the hasMoreProfiles + * @returns {Boolean} A Boolean representing the hasMoreProfiles + */ + getHasMoreProfiles() { + return this.hasMoreProfiles; + + } + + /** + * The method to set the value to hasMoreProfiles + * @param {Boolean} hasMoreProfiles A Boolean representing the hasMoreProfiles + */ + setHasMoreProfiles(hasMoreProfiles) { + if((hasMoreProfiles != null) && (!(Object.prototype.toString.call(hasMoreProfiles) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: hasMoreProfiles EXPECTED TYPE: Boolean", null, null); + } + this.hasMoreProfiles = hasMoreProfiles; + this.keyModified.set("has_more_profiles", 1); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the visible + * @returns {Boolean} A Boolean representing the visible + */ + getVisible() { + return this.visible; + + } + + /** + * The method to set the value to visible + * @param {Boolean} visible A Boolean representing the visible + */ + setVisible(visible) { + if((visible != null) && (!(Object.prototype.toString.call(visible) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: visible EXPECTED TYPE: Boolean", null, null); + } + this.visible = visible; + this.keyModified.set("visible", 1); + + } + + /** + * The method to get the source + * @returns {String} A String representing the source + */ + getSource() { + return this.source; + + } + + /** + * The method to set the value to source + * @param {String} source A String representing the source + */ + setSource(source) { + if((source != null) && (!(Object.prototype.toString.call(source) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: source EXPECTED TYPE: String", null, null); + } + this.source = source; + this.keyModified.set("source", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the status + * @returns {String} A String representing the status + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {String} status A String representing the status + */ + setStatus(status) { + if((status != null) && (!(Object.prototype.toString.call(status) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: String", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the showBusinessCard + * @returns {Boolean} A Boolean representing the showBusinessCard + */ + getShowBusinessCard() { + return this.showBusinessCard; + + } + + /** + * The method to set the value to showBusinessCard + * @param {Boolean} showBusinessCard A Boolean representing the showBusinessCard + */ + setShowBusinessCard(showBusinessCard) { + if((showBusinessCard != null) && (!(Object.prototype.toString.call(showBusinessCard) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: showBusinessCard EXPECTED TYPE: Boolean", null, null); + } + this.showBusinessCard = showBusinessCard; + this.keyModified.set("show_business_card", 1); + + } + + /** + * The method to get the generatedType + * @returns {String} A String representing the generatedType + */ + getGeneratedType() { + return this.generatedType; + + } + + /** + * The method to set the value to generatedType + * @param {String} generatedType A String representing the generatedType + */ + setGeneratedType(generatedType) { + if((generatedType != null) && (!(Object.prototype.toString.call(generatedType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: generatedType EXPECTED TYPE: String", null, null); + } + this.generatedType = generatedType; + this.keyModified.set("generated_type", 1); + + } + + /** + * The method to get the createdFor + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedFor() { + return this.createdFor; + + } + + /** + * The method to set the value to createdFor + * @param {MinifiedUser} createdFor An instance of MinifiedUser + */ + async setCreatedFor(createdFor) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdFor != null) && (!(createdFor instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdFor EXPECTED TYPE: MinifiedUser", null, null); + } + this.createdFor = createdFor; + this.keyModified.set("created_for", 1); + + } + + /** + * The method to get the convertMapping + * @returns {ConvertMapping} An instance of ConvertMapping + */ + getConvertMapping() { + return this.convertMapping; + + } + + /** + * The method to set the value to convertMapping + * @param {ConvertMapping} convertMapping An instance of ConvertMapping + */ + async setConvertMapping(convertMapping) { + const ConvertMapping = (await (import("./convert_mapping.js"))).MasterModel; + if((convertMapping != null) && (!(convertMapping instanceof ConvertMapping))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: convertMapping EXPECTED TYPE: ConvertMapping", null, null); + } + this.convertMapping = convertMapping; + this.keyModified.set("convert_mapping", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("modified_by", 1); + + } + + /** + * The method to get the profiles + * @returns {Array} An Array representing the profiles + */ + getProfiles() { + return this.profiles; + + } + + /** + * The method to set the value to profiles + * @param {Array} profiles An Array representing the profiles + */ + setProfiles(profiles) { + if((profiles != null) && (!(Object.prototype.toString.call(profiles) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: profiles EXPECTED TYPE: Array", null, null); + } + this.profiles = profiles; + this.keyModified.set("profiles", 1); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 1); + + } + + /** + * The method to get the sections + * @returns {Array} An Array representing the sections + */ + getSections() { + return this.sections; + + } + + /** + * The method to set the value to sections + * @param {Array} sections An Array representing the sections + */ + setSections(sections) { + if((sections != null) && (!(Object.prototype.toString.call(sections) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sections EXPECTED TYPE: Array", null, null); + } + this.sections = sections; + this.keyModified.set("sections", 1); + + } + + /** + * The method to get the actionsAllowed + * @returns {ActionsAllowed} An instance of ActionsAllowed + */ + getActionsAllowed() { + return this.actionsAllowed; + + } + + /** + * The method to set the value to actionsAllowed + * @param {ActionsAllowed} actionsAllowed An instance of ActionsAllowed + */ + async setActionsAllowed(actionsAllowed) { + const ActionsAllowed = (await (import("./actions_allowed.js"))).MasterModel; + if((actionsAllowed != null) && (!(actionsAllowed instanceof ActionsAllowed))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: actionsAllowed EXPECTED TYPE: ActionsAllowed", null, null); + } + this.actionsAllowed = actionsAllowed; + this.keyModified.set("actions_allowed", 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 { + Layouts as MasterModel, + Layouts as Layouts +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/layouts_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/layouts_operations.js new file mode 100644 index 0000000..5c34bc1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/layouts_operations.js @@ -0,0 +1,84 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 LayoutsOperations{ + /** + * Creates an instance of LayoutsOperations + */ + constructor(){ + + } + + /** + * The method to get layouts + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getLayouts(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/layouts"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to get layout + * @param {BigInt} id A BigInt representing the id + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getLayout(id, paramInstance=null) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/layouts/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + +} +class GetLayoutsParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.Layouts.GetLayoutsParam"); +} + +class GetLayoutParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.Layouts.GetLayoutParam"); +} + +export { + LayoutsOperations as MasterModel, + LayoutsOperations as LayoutsOperations, + GetLayoutsParam as GetLayoutsParam, + GetLayoutParam as GetLayoutParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/minified_layout.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/minified_layout.js new file mode 100644 index 0000000..5f7959e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/minified_layout.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MinifiedLayout{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + MinifiedLayout as MasterModel, + MinifiedLayout as MinifiedLayout +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/profiles.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/profiles.js new file mode 100644 index 0000000..9d172e0 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/profiles.js @@ -0,0 +1,160 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Profiles{ + + default1; + name; + id; + defaultview; + defaultassignmentview; + keyModified = new Map(); + /** + * The method to get the default + * @returns {Boolean} A Boolean representing the default1 + */ + getDefault() { + return this.default1; + + } + + /** + * The method to set the value to default + * @param {Boolean} default1 A Boolean representing the default1 + */ + setDefault(default1) { + if((default1 != null) && (!(Object.prototype.toString.call(default1) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: default1 EXPECTED TYPE: Boolean", null, null); + } + this.default1 = default1; + this.keyModified.set("default", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the defaultview + * @returns {DefaultView} An instance of DefaultView + */ + getDefaultview() { + return this.defaultview; + + } + + /** + * The method to set the value to defaultview + * @param {DefaultView} defaultview An instance of DefaultView + */ + async setDefaultview(defaultview) { + const DefaultView = (await (import("./default_view.js"))).MasterModel; + if((defaultview != null) && (!(defaultview instanceof DefaultView))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: defaultview EXPECTED TYPE: DefaultView", null, null); + } + this.defaultview = defaultview; + this.keyModified.set("_default_view", 1); + + } + + /** + * The method to get the defaultassignmentview + * @returns {DefaultAssignmentView} An instance of DefaultAssignmentView + */ + getDefaultassignmentview() { + return this.defaultassignmentview; + + } + + /** + * The method to set the value to defaultassignmentview + * @param {DefaultAssignmentView} defaultassignmentview An instance of DefaultAssignmentView + */ + async setDefaultassignmentview(defaultassignmentview) { + const DefaultAssignmentView = (await (import("./default_assignment_view.js"))).MasterModel; + if((defaultassignmentview != null) && (!(defaultassignmentview instanceof DefaultAssignmentView))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: defaultassignmentview EXPECTED TYPE: DefaultAssignmentView", null, null); + } + this.defaultassignmentview = defaultassignmentview; + this.keyModified.set("_default_assignment_view", 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 { + Profiles as MasterModel, + Profiles as Profiles +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/properties.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/properties.js new file mode 100644 index 0000000..4b14d7a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/properties.js @@ -0,0 +1,113 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Properties{ + + reorderRows; + maximumRows; + tooltip; + keyModified = new Map(); + /** + * The method to get the reorderRows + * @returns {Boolean} A Boolean representing the reorderRows + */ + getReorderRows() { + return this.reorderRows; + + } + + /** + * The method to set the value to reorderRows + * @param {Boolean} reorderRows A Boolean representing the reorderRows + */ + setReorderRows(reorderRows) { + if((reorderRows != null) && (!(Object.prototype.toString.call(reorderRows) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: reorderRows EXPECTED TYPE: Boolean", null, null); + } + this.reorderRows = reorderRows; + this.keyModified.set("reorder_rows", 1); + + } + + /** + * The method to get the maximumRows + * @returns {number} A number representing the maximumRows + */ + getMaximumRows() { + return this.maximumRows; + + } + + /** + * The method to set the value to maximumRows + * @param {number} maximumRows A number representing the maximumRows + */ + setMaximumRows(maximumRows) { + if((maximumRows != null) && (!(Object.prototype.toString.call(maximumRows) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: maximumRows EXPECTED TYPE: number", null, null); + } + this.maximumRows = maximumRows; + this.keyModified.set("maximum_rows", 1); + + } + + /** + * The method to get the tooltip + * @returns {Tooltip} An instance of Tooltip + */ + getTooltip() { + return this.tooltip; + + } + + /** + * The method to set the value to tooltip + * @param {Tooltip} tooltip An instance of Tooltip + */ + async setTooltip(tooltip) { + const Tooltip = (await (import("./tooltip.js"))).MasterModel; + if((tooltip != null) && (!(tooltip instanceof Tooltip))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tooltip EXPECTED TYPE: Tooltip", null, null); + } + this.tooltip = tooltip; + this.keyModified.set("tooltip", 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 { + Properties as MasterModel, + Properties as Properties +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/response_wrapper.js new file mode 100644 index 0000000..cbbd7dc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + layouts; + keyModified = new Map(); + /** + * The method to get the layouts + * @returns {Array} An Array representing the layouts + */ + getLayouts() { + return this.layouts; + + } + + /** + * The method to set the value to layouts + * @param {Array} layouts An Array representing the layouts + */ + setLayouts(layouts) { + if((layouts != null) && (!(Object.prototype.toString.call(layouts) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: layouts EXPECTED TYPE: Array", null, null); + } + this.layouts = layouts; + this.keyModified.set("layouts", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/section_field.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/section_field.js new file mode 100644 index 0000000..e1b0142 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/section_field.js @@ -0,0 +1,1746 @@ +import {Fields} from "../fields/fields.js"; +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SectionField extends Fields{ + + required; + validationRule; + defaultValue; + sequenceNumber; + sectionId; + blueprintSupported; + jsonType; + length; + decimalPlace; + multiModuleLookup; + sharingProperties; + currency; + fileUpoladOptionlist; + lookup; + subform; + formula; + multiselectlookup; + multiuserlookup; + autoNumber; + pickListValues; + allowedModules; + hipaaComplianceEnabled; + hipaaCompliance; + associatedModule; + operationType; + dataType; + systemMandatory; + webhook; + virtualField; + fieldReadOnly; + readOnly; + customField; + businesscardSupported; + filterable; + visible; + availableInUserLayout; + displayField; + pickListValuesSortedLexically; + sortable; + separator; + searchable; + enableColourCode; + massUpdate; + createdSource; + type; + displayLabel; + columnName; + apiName; + displayType; + uiType; + quickSequenceNumber; + emailParser; + rollupSummary; + referFromField; + createdTime; + modifiedTime; + showType; + category; + id; + profiles; + viewType; + unique; + subModule; + external; + private1; + convertMapping; + crypt; + tooltip; + historyTracking; + associationDetails; + additionalColumn; + fieldLabel; + globalPicklist; + keyModified = new Map(); + /** + * The method to get the required + * @returns {Boolean} A Boolean representing the required + */ + getRequired() { + return this.required; + + } + + /** + * The method to set the value to required + * @param {Boolean} required A Boolean representing the required + */ + setRequired(required) { + if((required != null) && (!(Object.prototype.toString.call(required) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: required EXPECTED TYPE: Boolean", null, null); + } + this.required = required; + this.keyModified.set("required", 1); + + } + + /** + * The method to get the validationRule + * @returns {Map} A Map representing the validationRule + */ + getValidationRule() { + return this.validationRule; + + } + + /** + * The method to set the value to validationRule + * @param {Map} validationRule A Map representing the validationRule + */ + setValidationRule(validationRule) { + if((validationRule != null) && (!(Object.prototype.toString.call(validationRule) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: validationRule EXPECTED TYPE: Map", null, null); + } + this.validationRule = validationRule; + this.keyModified.set("validation_rule", 1); + + } + + /** + * The method to get the defaultValue + * @returns {String} A String representing the defaultValue + */ + getDefaultValue() { + return this.defaultValue; + + } + + /** + * The method to set the value to defaultValue + * @param {String} defaultValue A String representing the defaultValue + */ + setDefaultValue(defaultValue) { + if((defaultValue != null) && (!(Object.prototype.toString.call(defaultValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: defaultValue EXPECTED TYPE: String", null, null); + } + this.defaultValue = defaultValue; + this.keyModified.set("default_value", 1); + + } + + /** + * The method to get the sequenceNumber + * @returns {number} A number representing the sequenceNumber + */ + getSequenceNumber() { + return this.sequenceNumber; + + } + + /** + * The method to set the value to sequenceNumber + * @param {number} sequenceNumber A number representing the sequenceNumber + */ + setSequenceNumber(sequenceNumber) { + if((sequenceNumber != null) && (!(Object.prototype.toString.call(sequenceNumber) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sequenceNumber EXPECTED TYPE: number", null, null); + } + this.sequenceNumber = sequenceNumber; + this.keyModified.set("sequence_number", 1); + + } + + /** + * The method to get the sectionId + * @returns {number} A number representing the sectionId + */ + getSectionId() { + return this.sectionId; + + } + + /** + * The method to set the value to sectionId + * @param {number} sectionId A number representing the sectionId + */ + setSectionId(sectionId) { + if((sectionId != null) && (!(Object.prototype.toString.call(sectionId) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sectionId EXPECTED TYPE: number", null, null); + } + this.sectionId = sectionId; + this.keyModified.set("section_id", 1); + + } + + /** + * The method to get the blueprintSupported + * @returns {Boolean} A Boolean representing the blueprintSupported + */ + getBlueprintSupported() { + return this.blueprintSupported; + + } + + /** + * The method to set the value to blueprintSupported + * @param {Boolean} blueprintSupported A Boolean representing the blueprintSupported + */ + setBlueprintSupported(blueprintSupported) { + if((blueprintSupported != null) && (!(Object.prototype.toString.call(blueprintSupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: blueprintSupported EXPECTED TYPE: Boolean", null, null); + } + this.blueprintSupported = blueprintSupported; + this.keyModified.set("blueprint_supported", 1); + + } + + /** + * The method to get the jsonType + * @returns {String} A String representing the jsonType + */ + getJsonType() { + return this.jsonType; + + } + + /** + * The method to set the value to jsonType + * @param {String} jsonType A String representing the jsonType + */ + setJsonType(jsonType) { + if((jsonType != null) && (!(Object.prototype.toString.call(jsonType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jsonType EXPECTED TYPE: String", null, null); + } + this.jsonType = jsonType; + this.keyModified.set("json_type", 1); + + } + + /** + * The method to get the length + * @returns {Choice} An instance of Choice + */ + getLength() { + return this.length; + + } + + /** + * The method to set the value to length + * @param {Choice} length An instance of Choice + */ + setLength(length) { + if((length != null) && (!(length instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: length EXPECTED TYPE: Choice", null, null); + } + this.length = length; + this.keyModified.set("length", 1); + + } + + /** + * The method to get the decimalPlace + * @returns {number} A number representing the decimalPlace + */ + getDecimalPlace() { + return this.decimalPlace; + + } + + /** + * The method to set the value to decimalPlace + * @param {number} decimalPlace A number representing the decimalPlace + */ + setDecimalPlace(decimalPlace) { + if((decimalPlace != null) && (!(Object.prototype.toString.call(decimalPlace) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: decimalPlace EXPECTED TYPE: number", null, null); + } + this.decimalPlace = decimalPlace; + this.keyModified.set("decimal_place", 1); + + } + + /** + * The method to get the multiModuleLookup + * @returns {MultiModuleLookup} An instance of MultiModuleLookup + */ + getMultiModuleLookup() { + return this.multiModuleLookup; + + } + + /** + * The method to set the value to multiModuleLookup + * @param {MultiModuleLookup} multiModuleLookup An instance of MultiModuleLookup + */ + async setMultiModuleLookup(multiModuleLookup) { + const MultiModuleLookup = (await (import("../fields/multi_module_lookup.js"))).MasterModel; + if((multiModuleLookup != null) && (!(multiModuleLookup instanceof MultiModuleLookup))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: multiModuleLookup EXPECTED TYPE: MultiModuleLookup", null, null); + } + this.multiModuleLookup = multiModuleLookup; + this.keyModified.set("multi_module_lookup", 1); + + } + + /** + * The method to get the sharingProperties + * @returns {SharingProperties} An instance of SharingProperties + */ + getSharingProperties() { + return this.sharingProperties; + + } + + /** + * The method to set the value to sharingProperties + * @param {SharingProperties} sharingProperties An instance of SharingProperties + */ + async setSharingProperties(sharingProperties) { + const SharingProperties = (await (import("../modules/sharing_properties.js"))).MasterModel; + if((sharingProperties != null) && (!(sharingProperties instanceof SharingProperties))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sharingProperties EXPECTED TYPE: SharingProperties", null, null); + } + this.sharingProperties = sharingProperties; + this.keyModified.set("sharing_properties", 1); + + } + + /** + * The method to get the currency + * @returns {Currency} An instance of Currency + */ + getCurrency() { + return this.currency; + + } + + /** + * The method to set the value to currency + * @param {Currency} currency An instance of Currency + */ + async setCurrency(currency) { + const Currency = (await (import("../fields/currency.js"))).MasterModel; + if((currency != null) && (!(currency instanceof Currency))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: currency EXPECTED TYPE: Currency", null, null); + } + this.currency = currency; + this.keyModified.set("currency", 1); + + } + + /** + * The method to get the fileUpoladOptionlist + * @returns {Array} An Array representing the fileUpoladOptionlist + */ + getFileUpoladOptionlist() { + return this.fileUpoladOptionlist; + + } + + /** + * The method to set the value to fileUpoladOptionlist + * @param {Array} fileUpoladOptionlist An Array representing the fileUpoladOptionlist + */ + setFileUpoladOptionlist(fileUpoladOptionlist) { + if((fileUpoladOptionlist != null) && (!(Object.prototype.toString.call(fileUpoladOptionlist) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileUpoladOptionlist EXPECTED TYPE: Array", null, null); + } + this.fileUpoladOptionlist = fileUpoladOptionlist; + this.keyModified.set("file_upolad_optionlist", 1); + + } + + /** + * The method to get the lookup + * @returns {Lookup} An instance of Lookup + */ + getLookup() { + return this.lookup; + + } + + /** + * The method to set the value to lookup + * @param {Lookup} lookup An instance of Lookup + */ + async setLookup(lookup) { + const Lookup = (await (import("../fields/lookup.js"))).MasterModel; + if((lookup != null) && (!(lookup instanceof Lookup))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: lookup EXPECTED TYPE: Lookup", null, null); + } + this.lookup = lookup; + this.keyModified.set("lookup", 1); + + } + + /** + * The method to get the subform + * @returns {SectionSubformField} An instance of SectionSubformField + */ + getSubform() { + return this.subform; + + } + + /** + * The method to set the value to subform + * @param {SectionSubformField} subform An instance of SectionSubformField + */ + async setSubform(subform) { + const SectionSubformField = (await (import("./section_subform_field.js"))).MasterModel; + if((subform != null) && (!(subform instanceof SectionSubformField))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subform EXPECTED TYPE: SectionSubformField", null, null); + } + this.subform = subform; + this.keyModified.set("subform", 1); + + } + + /** + * The method to get the formula + * @returns {Formula} An instance of Formula + */ + getFormula() { + return this.formula; + + } + + /** + * The method to set the value to formula + * @param {Formula} formula An instance of Formula + */ + async setFormula(formula) { + const Formula = (await (import("../fields/formula.js"))).MasterModel; + if((formula != null) && (!(formula instanceof Formula))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: formula EXPECTED TYPE: Formula", null, null); + } + this.formula = formula; + this.keyModified.set("formula", 1); + + } + + /** + * The method to get the multiselectlookup + * @returns {Multiselectlookup} An instance of Multiselectlookup + */ + getMultiselectlookup() { + return this.multiselectlookup; + + } + + /** + * The method to set the value to multiselectlookup + * @param {Multiselectlookup} multiselectlookup An instance of Multiselectlookup + */ + async setMultiselectlookup(multiselectlookup) { + const Multiselectlookup = (await (import("../fields/multiselectlookup.js"))).MasterModel; + if((multiselectlookup != null) && (!(multiselectlookup instanceof Multiselectlookup))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: multiselectlookup EXPECTED TYPE: Multiselectlookup", null, null); + } + this.multiselectlookup = multiselectlookup; + this.keyModified.set("multiselectlookup", 1); + + } + + /** + * The method to get the multiuserlookup + * @returns {Multiselectlookup} An instance of Multiselectlookup + */ + getMultiuserlookup() { + return this.multiuserlookup; + + } + + /** + * The method to set the value to multiuserlookup + * @param {Multiselectlookup} multiuserlookup An instance of Multiselectlookup + */ + async setMultiuserlookup(multiuserlookup) { + const Multiselectlookup = (await (import("../fields/multiselectlookup.js"))).MasterModel; + if((multiuserlookup != null) && (!(multiuserlookup instanceof Multiselectlookup))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: multiuserlookup EXPECTED TYPE: Multiselectlookup", null, null); + } + this.multiuserlookup = multiuserlookup; + this.keyModified.set("multiuserlookup", 1); + + } + + /** + * The method to get the autoNumber + * @returns {AutoNumber} An instance of AutoNumber + */ + getAutoNumber() { + return this.autoNumber; + + } + + /** + * The method to set the value to autoNumber + * @param {AutoNumber} autoNumber An instance of AutoNumber + */ + async setAutoNumber(autoNumber) { + const AutoNumber = (await (import("../fields/auto_number.js"))).MasterModel; + if((autoNumber != null) && (!(autoNumber instanceof AutoNumber))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: autoNumber EXPECTED TYPE: AutoNumber", null, null); + } + this.autoNumber = autoNumber; + this.keyModified.set("auto_number", 1); + + } + + /** + * The method to get the pickListValues + * @returns {Array} An Array representing the pickListValues + */ + getPickListValues() { + return this.pickListValues; + + } + + /** + * The method to set the value to pickListValues + * @param {Array} pickListValues An Array representing the pickListValues + */ + setPickListValues(pickListValues) { + if((pickListValues != null) && (!(Object.prototype.toString.call(pickListValues) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pickListValues EXPECTED TYPE: Array", null, null); + } + this.pickListValues = pickListValues; + this.keyModified.set("pick_list_values", 1); + + } + + /** + * The method to get the allowedModules + * @returns {Array} An Array representing the allowedModules + */ + getAllowedModules() { + return this.allowedModules; + + } + + /** + * The method to set the value to allowedModules + * @param {Array} allowedModules An Array representing the allowedModules + */ + setAllowedModules(allowedModules) { + if((allowedModules != null) && (!(Object.prototype.toString.call(allowedModules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: allowedModules EXPECTED TYPE: Array", null, null); + } + this.allowedModules = allowedModules; + this.keyModified.set("allowed_modules", 1); + + } + + /** + * The method to get the hipaaComplianceEnabled + * @returns {Boolean} A Boolean representing the hipaaComplianceEnabled + */ + getHipaaComplianceEnabled() { + return this.hipaaComplianceEnabled; + + } + + /** + * The method to set the value to hipaaComplianceEnabled + * @param {Boolean} hipaaComplianceEnabled A Boolean representing the hipaaComplianceEnabled + */ + setHipaaComplianceEnabled(hipaaComplianceEnabled) { + if((hipaaComplianceEnabled != null) && (!(Object.prototype.toString.call(hipaaComplianceEnabled) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: hipaaComplianceEnabled EXPECTED TYPE: Boolean", null, null); + } + this.hipaaComplianceEnabled = hipaaComplianceEnabled; + this.keyModified.set("hipaa_compliance_enabled", 1); + + } + + /** + * The method to get the hipaaCompliance + * @returns {HipaaCompliance} An instance of HipaaCompliance + */ + getHipaaCompliance() { + return this.hipaaCompliance; + + } + + /** + * The method to set the value to hipaaCompliance + * @param {HipaaCompliance} hipaaCompliance An instance of HipaaCompliance + */ + async setHipaaCompliance(hipaaCompliance) { + const HipaaCompliance = (await (import("../fields/hipaa_compliance.js"))).MasterModel; + if((hipaaCompliance != null) && (!(hipaaCompliance instanceof HipaaCompliance))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: hipaaCompliance EXPECTED TYPE: HipaaCompliance", null, null); + } + this.hipaaCompliance = hipaaCompliance; + this.keyModified.set("hipaa_compliance", 1); + + } + + /** + * The method to get the associatedModule + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getAssociatedModule() { + return this.associatedModule; + + } + + /** + * The method to set the value to associatedModule + * @param {MinifiedModule} associatedModule An instance of MinifiedModule + */ + async setAssociatedModule(associatedModule) { + const MinifiedModule = (await (import("../modules/minified_module.js"))).MasterModel; + if((associatedModule != null) && (!(associatedModule instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: associatedModule EXPECTED TYPE: MinifiedModule", null, null); + } + this.associatedModule = associatedModule; + this.keyModified.set("associated_module", 1); + + } + + /** + * The method to get the operationType + * @returns {OperationType} An instance of OperationType + */ + getOperationType() { + return this.operationType; + + } + + /** + * The method to set the value to operationType + * @param {OperationType} operationType An instance of OperationType + */ + async setOperationType(operationType) { + const OperationType = (await (import("../fields/operation_type.js"))).MasterModel; + if((operationType != null) && (!(operationType instanceof OperationType))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: operationType EXPECTED TYPE: OperationType", null, null); + } + this.operationType = operationType; + this.keyModified.set("operation_type", 1); + + } + + /** + * The method to get the dataType + * @returns {Choice} An instance of Choice + */ + getDataType() { + return this.dataType; + + } + + /** + * The method to set the value to dataType + * @param {Choice} dataType An instance of Choice + */ + setDataType(dataType) { + if((dataType != null) && (!(dataType instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dataType EXPECTED TYPE: Choice", null, null); + } + this.dataType = dataType; + this.keyModified.set("data_type", 1); + + } + + /** + * The method to get the systemMandatory + * @returns {Boolean} A Boolean representing the systemMandatory + */ + getSystemMandatory() { + return this.systemMandatory; + + } + + /** + * The method to set the value to systemMandatory + * @param {Boolean} systemMandatory A Boolean representing the systemMandatory + */ + setSystemMandatory(systemMandatory) { + if((systemMandatory != null) && (!(Object.prototype.toString.call(systemMandatory) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: systemMandatory EXPECTED TYPE: Boolean", null, null); + } + this.systemMandatory = systemMandatory; + this.keyModified.set("system_mandatory", 1); + + } + + /** + * The method to get the webhook + * @returns {Boolean} A Boolean representing the webhook + */ + getWebhook() { + return this.webhook; + + } + + /** + * The method to set the value to webhook + * @param {Boolean} webhook A Boolean representing the webhook + */ + setWebhook(webhook) { + if((webhook != null) && (!(Object.prototype.toString.call(webhook) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: webhook EXPECTED TYPE: Boolean", null, null); + } + this.webhook = webhook; + this.keyModified.set("webhook", 1); + + } + + /** + * The method to get the virtualField + * @returns {Boolean} A Boolean representing the virtualField + */ + getVirtualField() { + return this.virtualField; + + } + + /** + * The method to set the value to virtualField + * @param {Boolean} virtualField A Boolean representing the virtualField + */ + setVirtualField(virtualField) { + if((virtualField != null) && (!(Object.prototype.toString.call(virtualField) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: virtualField EXPECTED TYPE: Boolean", null, null); + } + this.virtualField = virtualField; + this.keyModified.set("virtual_field", 1); + + } + + /** + * The method to get the fieldReadOnly + * @returns {Boolean} A Boolean representing the fieldReadOnly + */ + getFieldReadOnly() { + return this.fieldReadOnly; + + } + + /** + * The method to set the value to fieldReadOnly + * @param {Boolean} fieldReadOnly A Boolean representing the fieldReadOnly + */ + setFieldReadOnly(fieldReadOnly) { + if((fieldReadOnly != null) && (!(Object.prototype.toString.call(fieldReadOnly) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldReadOnly EXPECTED TYPE: Boolean", null, null); + } + this.fieldReadOnly = fieldReadOnly; + this.keyModified.set("field_read_only", 1); + + } + + /** + * The method to get the readOnly + * @returns {Boolean} A Boolean representing the readOnly + */ + getReadOnly() { + return this.readOnly; + + } + + /** + * The method to set the value to readOnly + * @param {Boolean} readOnly A Boolean representing the readOnly + */ + setReadOnly(readOnly) { + if((readOnly != null) && (!(Object.prototype.toString.call(readOnly) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: readOnly EXPECTED TYPE: Boolean", null, null); + } + this.readOnly = readOnly; + this.keyModified.set("read_only", 1); + + } + + /** + * The method to get the customField + * @returns {Boolean} A Boolean representing the customField + */ + getCustomField() { + return this.customField; + + } + + /** + * The method to set the value to customField + * @param {Boolean} customField A Boolean representing the customField + */ + setCustomField(customField) { + if((customField != null) && (!(Object.prototype.toString.call(customField) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: customField EXPECTED TYPE: Boolean", null, null); + } + this.customField = customField; + this.keyModified.set("custom_field", 1); + + } + + /** + * The method to get the businesscardSupported + * @returns {Boolean} A Boolean representing the businesscardSupported + */ + getBusinesscardSupported() { + return this.businesscardSupported; + + } + + /** + * The method to set the value to businesscardSupported + * @param {Boolean} businesscardSupported A Boolean representing the businesscardSupported + */ + setBusinesscardSupported(businesscardSupported) { + if((businesscardSupported != null) && (!(Object.prototype.toString.call(businesscardSupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: businesscardSupported EXPECTED TYPE: Boolean", null, null); + } + this.businesscardSupported = businesscardSupported; + this.keyModified.set("businesscard_supported", 1); + + } + + /** + * The method to get the filterable + * @returns {Boolean} A Boolean representing the filterable + */ + getFilterable() { + return this.filterable; + + } + + /** + * The method to set the value to filterable + * @param {Boolean} filterable A Boolean representing the filterable + */ + setFilterable(filterable) { + if((filterable != null) && (!(Object.prototype.toString.call(filterable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: filterable EXPECTED TYPE: Boolean", null, null); + } + this.filterable = filterable; + this.keyModified.set("filterable", 1); + + } + + /** + * The method to get the visible + * @returns {Boolean} A Boolean representing the visible + */ + getVisible() { + return this.visible; + + } + + /** + * The method to set the value to visible + * @param {Boolean} visible A Boolean representing the visible + */ + setVisible(visible) { + if((visible != null) && (!(Object.prototype.toString.call(visible) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: visible EXPECTED TYPE: Boolean", null, null); + } + this.visible = visible; + this.keyModified.set("visible", 1); + + } + + /** + * The method to get the availableInUserLayout + * @returns {Boolean} A Boolean representing the availableInUserLayout + */ + getAvailableInUserLayout() { + return this.availableInUserLayout; + + } + + /** + * The method to set the value to availableInUserLayout + * @param {Boolean} availableInUserLayout A Boolean representing the availableInUserLayout + */ + setAvailableInUserLayout(availableInUserLayout) { + if((availableInUserLayout != null) && (!(Object.prototype.toString.call(availableInUserLayout) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: availableInUserLayout EXPECTED TYPE: Boolean", null, null); + } + this.availableInUserLayout = availableInUserLayout; + this.keyModified.set("available_in_user_layout", 1); + + } + + /** + * The method to get the displayField + * @returns {Boolean} A Boolean representing the displayField + */ + getDisplayField() { + return this.displayField; + + } + + /** + * The method to set the value to displayField + * @param {Boolean} displayField A Boolean representing the displayField + */ + setDisplayField(displayField) { + if((displayField != null) && (!(Object.prototype.toString.call(displayField) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayField EXPECTED TYPE: Boolean", null, null); + } + this.displayField = displayField; + this.keyModified.set("display_field", 1); + + } + + /** + * The method to get the pickListValuesSortedLexically + * @returns {Boolean} A Boolean representing the pickListValuesSortedLexically + */ + getPickListValuesSortedLexically() { + return this.pickListValuesSortedLexically; + + } + + /** + * The method to set the value to pickListValuesSortedLexically + * @param {Boolean} pickListValuesSortedLexically A Boolean representing the pickListValuesSortedLexically + */ + setPickListValuesSortedLexically(pickListValuesSortedLexically) { + if((pickListValuesSortedLexically != null) && (!(Object.prototype.toString.call(pickListValuesSortedLexically) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pickListValuesSortedLexically EXPECTED TYPE: Boolean", null, null); + } + this.pickListValuesSortedLexically = pickListValuesSortedLexically; + this.keyModified.set("pick_list_values_sorted_lexically", 1); + + } + + /** + * The method to get the sortable + * @returns {Boolean} A Boolean representing the sortable + */ + getSortable() { + return this.sortable; + + } + + /** + * The method to set the value to sortable + * @param {Boolean} sortable A Boolean representing the sortable + */ + setSortable(sortable) { + if((sortable != null) && (!(Object.prototype.toString.call(sortable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortable EXPECTED TYPE: Boolean", null, null); + } + this.sortable = sortable; + this.keyModified.set("sortable", 1); + + } + + /** + * The method to get the separator + * @returns {Boolean} A Boolean representing the separator + */ + getSeparator() { + return this.separator; + + } + + /** + * The method to set the value to separator + * @param {Boolean} separator A Boolean representing the separator + */ + setSeparator(separator) { + if((separator != null) && (!(Object.prototype.toString.call(separator) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: separator EXPECTED TYPE: Boolean", null, null); + } + this.separator = separator; + this.keyModified.set("separator", 1); + + } + + /** + * The method to get the searchable + * @returns {Boolean} A Boolean representing the searchable + */ + getSearchable() { + return this.searchable; + + } + + /** + * The method to set the value to searchable + * @param {Boolean} searchable A Boolean representing the searchable + */ + setSearchable(searchable) { + if((searchable != null) && (!(Object.prototype.toString.call(searchable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: searchable EXPECTED TYPE: Boolean", null, null); + } + this.searchable = searchable; + this.keyModified.set("searchable", 1); + + } + + /** + * The method to get the enableColourCode + * @returns {Boolean} A Boolean representing the enableColourCode + */ + getEnableColourCode() { + return this.enableColourCode; + + } + + /** + * The method to set the value to enableColourCode + * @param {Boolean} enableColourCode A Boolean representing the enableColourCode + */ + setEnableColourCode(enableColourCode) { + if((enableColourCode != null) && (!(Object.prototype.toString.call(enableColourCode) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: enableColourCode EXPECTED TYPE: Boolean", null, null); + } + this.enableColourCode = enableColourCode; + this.keyModified.set("enable_colour_code", 1); + + } + + /** + * The method to get the massUpdate + * @returns {Boolean} A Boolean representing the massUpdate + */ + getMassUpdate() { + return this.massUpdate; + + } + + /** + * The method to set the value to massUpdate + * @param {Boolean} massUpdate A Boolean representing the massUpdate + */ + setMassUpdate(massUpdate) { + if((massUpdate != null) && (!(Object.prototype.toString.call(massUpdate) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: massUpdate EXPECTED TYPE: Boolean", null, null); + } + this.massUpdate = massUpdate; + this.keyModified.set("mass_update", 1); + + } + + /** + * The method to get the createdSource + * @returns {String} A String representing the createdSource + */ + getCreatedSource() { + return this.createdSource; + + } + + /** + * The method to set the value to createdSource + * @param {String} createdSource A String representing the createdSource + */ + setCreatedSource(createdSource) { + if((createdSource != null) && (!(Object.prototype.toString.call(createdSource) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdSource EXPECTED TYPE: String", null, null); + } + this.createdSource = createdSource; + this.keyModified.set("created_source", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the columnName + * @returns {String} A String representing the columnName + */ + getColumnName() { + return this.columnName; + + } + + /** + * The method to set the value to columnName + * @param {String} columnName A String representing the columnName + */ + setColumnName(columnName) { + if((columnName != null) && (!(Object.prototype.toString.call(columnName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: columnName EXPECTED TYPE: String", null, null); + } + this.columnName = columnName; + this.keyModified.set("column_name", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the displayType + * @returns {number} A number representing the displayType + */ + getDisplayType() { + return this.displayType; + + } + + /** + * The method to set the value to displayType + * @param {number} displayType A number representing the displayType + */ + setDisplayType(displayType) { + if((displayType != null) && (!(Object.prototype.toString.call(displayType) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayType EXPECTED TYPE: number", null, null); + } + this.displayType = displayType; + this.keyModified.set("display_type", 1); + + } + + /** + * The method to get the uiType + * @returns {number} A number representing the uiType + */ + getUiType() { + return this.uiType; + + } + + /** + * The method to set the value to uiType + * @param {number} uiType A number representing the uiType + */ + setUiType(uiType) { + if((uiType != null) && (!(Object.prototype.toString.call(uiType) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: uiType EXPECTED TYPE: number", null, null); + } + this.uiType = uiType; + this.keyModified.set("ui_type", 1); + + } + + /** + * The method to get the quickSequenceNumber + * @returns {String} A String representing the quickSequenceNumber + */ + getQuickSequenceNumber() { + return this.quickSequenceNumber; + + } + + /** + * The method to set the value to quickSequenceNumber + * @param {String} quickSequenceNumber A String representing the quickSequenceNumber + */ + setQuickSequenceNumber(quickSequenceNumber) { + if((quickSequenceNumber != null) && (!(Object.prototype.toString.call(quickSequenceNumber) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: quickSequenceNumber EXPECTED TYPE: String", null, null); + } + this.quickSequenceNumber = quickSequenceNumber; + this.keyModified.set("quick_sequence_number", 1); + + } + + /** + * The method to get the emailParser + * @returns {EmailParser} An instance of EmailParser + */ + getEmailParser() { + return this.emailParser; + + } + + /** + * The method to set the value to emailParser + * @param {EmailParser} emailParser An instance of EmailParser + */ + async setEmailParser(emailParser) { + const EmailParser = (await (import("../fields/email_parser.js"))).MasterModel; + if((emailParser != null) && (!(emailParser instanceof EmailParser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: emailParser EXPECTED TYPE: EmailParser", null, null); + } + this.emailParser = emailParser; + this.keyModified.set("email_parser", 1); + + } + + /** + * The method to get the rollupSummary + * @returns {RollupSummary} An instance of RollupSummary + */ + getRollupSummary() { + return this.rollupSummary; + + } + + /** + * The method to set the value to rollupSummary + * @param {RollupSummary} rollupSummary An instance of RollupSummary + */ + async setRollupSummary(rollupSummary) { + const RollupSummary = (await (import("../fields/rollup_summary.js"))).MasterModel; + if((rollupSummary != null) && (!(rollupSummary instanceof RollupSummary))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: rollupSummary EXPECTED TYPE: RollupSummary", null, null); + } + this.rollupSummary = rollupSummary; + this.keyModified.set("rollup_summary", 1); + + } + + /** + * The method to get the referFromField + * @returns {ReferFromField} An instance of ReferFromField + */ + getReferFromField() { + return this.referFromField; + + } + + /** + * The method to set the value to referFromField + * @param {ReferFromField} referFromField An instance of ReferFromField + */ + async setReferFromField(referFromField) { + const ReferFromField = (await (import("../fields/refer_from_field.js"))).MasterModel; + if((referFromField != null) && (!(referFromField instanceof ReferFromField))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: referFromField EXPECTED TYPE: ReferFromField", null, null); + } + this.referFromField = referFromField; + this.keyModified.set("refer_from_field", 1); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the showType + * @returns {number} A number representing the showType + */ + getShowType() { + return this.showType; + + } + + /** + * The method to set the value to showType + * @param {number} showType A number representing the showType + */ + setShowType(showType) { + if((showType != null) && (!(Object.prototype.toString.call(showType) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: showType EXPECTED TYPE: number", null, null); + } + this.showType = showType; + this.keyModified.set("show_type", 1); + + } + + /** + * The method to get the category + * @returns {number} A number representing the category + */ + getCategory() { + return this.category; + + } + + /** + * The method to set the value to category + * @param {number} category A number representing the category + */ + setCategory(category) { + if((category != null) && (!(Object.prototype.toString.call(category) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: category EXPECTED TYPE: number", null, null); + } + this.category = category; + this.keyModified.set("category", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the profiles + * @returns {Array} An Array representing the profiles + */ + getProfiles() { + return this.profiles; + + } + + /** + * The method to set the value to profiles + * @param {Array} profiles An Array representing the profiles + */ + setProfiles(profiles) { + if((profiles != null) && (!(Object.prototype.toString.call(profiles) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: profiles EXPECTED TYPE: Array", null, null); + } + this.profiles = profiles; + this.keyModified.set("profiles", 1); + + } + + /** + * The method to get the viewType + * @returns {ViewType} An instance of ViewType + */ + getViewType() { + return this.viewType; + + } + + /** + * The method to set the value to viewType + * @param {ViewType} viewType An instance of ViewType + */ + async setViewType(viewType) { + const ViewType = (await (import("../fields/view_type.js"))).MasterModel; + if((viewType != null) && (!(viewType instanceof ViewType))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: viewType EXPECTED TYPE: ViewType", null, null); + } + this.viewType = viewType; + this.keyModified.set("view_type", 1); + + } + + /** + * The method to get the unique + * @returns {Unique} An instance of Unique + */ + getUnique() { + return this.unique; + + } + + /** + * The method to set the value to unique + * @param {Unique} unique An instance of Unique + */ + async setUnique(unique) { + const Unique = (await (import("../fields/unique.js"))).MasterModel; + if((unique != null) && (!(unique instanceof Unique))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: unique EXPECTED TYPE: Unique", null, null); + } + this.unique = unique; + this.keyModified.set("unique", 1); + + } + + /** + * The method to get the subModule + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getSubModule() { + return this.subModule; + + } + + /** + * The method to set the value to subModule + * @param {MinifiedModule} subModule An instance of MinifiedModule + */ + async setSubModule(subModule) { + const MinifiedModule = (await (import("../modules/minified_module.js"))).MasterModel; + if((subModule != null) && (!(subModule instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subModule EXPECTED TYPE: MinifiedModule", null, null); + } + this.subModule = subModule; + this.keyModified.set("sub_module", 1); + + } + + /** + * The method to get the external + * @returns {External} An instance of External + */ + getExternal() { + return this.external; + + } + + /** + * The method to set the value to external + * @param {External} external An instance of External + */ + async setExternal(external) { + const External = (await (import("../fields/external.js"))).MasterModel; + if((external != null) && (!(external instanceof External))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: external EXPECTED TYPE: External", null, null); + } + this.external = external; + this.keyModified.set("external", 1); + + } + + /** + * The method to get the private + * @returns {Private} An instance of Private + */ + getPrivate() { + return this.private1; + + } + + /** + * The method to set the value to private + * @param {Private} private1 An instance of Private + */ + async setPrivate(private1) { + const Private = (await (import("../fields/private.js"))).MasterModel; + if((private1 != null) && (!(private1 instanceof Private))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: private1 EXPECTED TYPE: Private", null, null); + } + this.private1 = private1; + this.keyModified.set("private", 1); + + } + + /** + * The method to get the convertMapping + * @returns {ConvertMapping} An instance of ConvertMapping + */ + getConvertMapping() { + return this.convertMapping; + + } + + /** + * The method to set the value to convertMapping + * @param {ConvertMapping} convertMapping An instance of ConvertMapping + */ + async setConvertMapping(convertMapping) { + const ConvertMapping = (await (import("../fields/convert_mapping.js"))).MasterModel; + if((convertMapping != null) && (!(convertMapping instanceof ConvertMapping))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: convertMapping EXPECTED TYPE: ConvertMapping", null, null); + } + this.convertMapping = convertMapping; + this.keyModified.set("convert_mapping", 1); + + } + + /** + * The method to get the crypt + * @returns {Crypt} An instance of Crypt + */ + getCrypt() { + return this.crypt; + + } + + /** + * The method to set the value to crypt + * @param {Crypt} crypt An instance of Crypt + */ + async setCrypt(crypt) { + const Crypt = (await (import("../fields/crypt.js"))).MasterModel; + if((crypt != null) && (!(crypt instanceof Crypt))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: crypt EXPECTED TYPE: Crypt", null, null); + } + this.crypt = crypt; + this.keyModified.set("crypt", 1); + + } + + /** + * The method to get the tooltip + * @returns {Tooltip} An instance of Tooltip + */ + getTooltip() { + return this.tooltip; + + } + + /** + * The method to set the value to tooltip + * @param {Tooltip} tooltip An instance of Tooltip + */ + async setTooltip(tooltip) { + const Tooltip = (await (import("../fields/tooltip.js"))).MasterModel; + if((tooltip != null) && (!(tooltip instanceof Tooltip))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tooltip EXPECTED TYPE: Tooltip", null, null); + } + this.tooltip = tooltip; + this.keyModified.set("tooltip", 1); + + } + + /** + * The method to get the historyTracking + * @returns {HistoryTracking} An instance of HistoryTracking + */ + getHistoryTracking() { + return this.historyTracking; + + } + + /** + * The method to set the value to historyTracking + * @param {HistoryTracking} historyTracking An instance of HistoryTracking + */ + async setHistoryTracking(historyTracking) { + const HistoryTracking = (await (import("../fields/history_tracking.js"))).MasterModel; + if((historyTracking != null) && (!(historyTracking instanceof HistoryTracking))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: historyTracking EXPECTED TYPE: HistoryTracking", null, null); + } + this.historyTracking = historyTracking; + this.keyModified.set("history_tracking", 1); + + } + + /** + * The method to get the associationDetails + * @returns {AssociationDetails} An instance of AssociationDetails + */ + getAssociationDetails() { + return this.associationDetails; + + } + + /** + * The method to set the value to associationDetails + * @param {AssociationDetails} associationDetails An instance of AssociationDetails + */ + async setAssociationDetails(associationDetails) { + const AssociationDetails = (await (import("../fields/association_details.js"))).MasterModel; + if((associationDetails != null) && (!(associationDetails instanceof AssociationDetails))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: associationDetails EXPECTED TYPE: AssociationDetails", null, null); + } + this.associationDetails = associationDetails; + this.keyModified.set("association_details", 1); + + } + + /** + * The method to get the additionalColumn + * @returns {String} A String representing the additionalColumn + */ + getAdditionalColumn() { + return this.additionalColumn; + + } + + /** + * The method to set the value to additionalColumn + * @param {String} additionalColumn A String representing the additionalColumn + */ + setAdditionalColumn(additionalColumn) { + if((additionalColumn != null) && (!(Object.prototype.toString.call(additionalColumn) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: additionalColumn EXPECTED TYPE: String", null, null); + } + this.additionalColumn = additionalColumn; + this.keyModified.set("additional_column", 1); + + } + + /** + * The method to get the fieldLabel + * @returns {String} A String representing the fieldLabel + */ + getFieldLabel() { + return this.fieldLabel; + + } + + /** + * The method to set the value to fieldLabel + * @param {String} fieldLabel A String representing the fieldLabel + */ + setFieldLabel(fieldLabel) { + if((fieldLabel != null) && (!(Object.prototype.toString.call(fieldLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldLabel EXPECTED TYPE: String", null, null); + } + this.fieldLabel = fieldLabel; + this.keyModified.set("field_label", 1); + + } + + /** + * The method to get the globalPicklist + * @returns {Object} An Object representing the globalPicklist + */ + getGlobalPicklist() { + return this.globalPicklist; + + } + + /** + * The method to set the value to globalPicklist + * @param {Object} globalPicklist An Object representing the globalPicklist + */ + setGlobalPicklist(globalPicklist) { + this.globalPicklist = globalPicklist; + this.keyModified.set("global_picklist", 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 { + SectionField as MasterModel, + SectionField as SectionField +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/section_subform_field.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/section_subform_field.js new file mode 100644 index 0000000..86dfffe --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/section_subform_field.js @@ -0,0 +1,113 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SectionSubformField{ + + module; + id; + layout; + keyModified = new Map(); + /** + * The method to get the module + * @returns {String} A String representing the module + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {String} module A String representing the module + */ + setModule(module) { + if((module != null) && (!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the layout + * @returns {MinifiedLayout} An instance of MinifiedLayout + */ + getLayout() { + return this.layout; + + } + + /** + * The method to set the value to layout + * @param {MinifiedLayout} layout An instance of MinifiedLayout + */ + async setLayout(layout) { + const MinifiedLayout = (await (import("./minified_layout.js"))).MasterModel; + if((layout != null) && (!(layout instanceof MinifiedLayout))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: layout EXPECTED TYPE: MinifiedLayout", null, null); + } + this.layout = layout; + this.keyModified.set("layout", 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 { + SectionSubformField as MasterModel, + SectionSubformField as SectionSubformField +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/sections.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/sections.js new file mode 100644 index 0000000..2209bac --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/sections.js @@ -0,0 +1,320 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Sections{ + + displayLabel; + sequenceNumber; + issubformsection; + tabTraversal; + apiName; + columnCount; + name; + generatedType; + id; + type; + fields; + properties; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the sequenceNumber + * @returns {number} A number representing the sequenceNumber + */ + getSequenceNumber() { + return this.sequenceNumber; + + } + + /** + * The method to set the value to sequenceNumber + * @param {number} sequenceNumber A number representing the sequenceNumber + */ + setSequenceNumber(sequenceNumber) { + if((sequenceNumber != null) && (!(Object.prototype.toString.call(sequenceNumber) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sequenceNumber EXPECTED TYPE: number", null, null); + } + this.sequenceNumber = sequenceNumber; + this.keyModified.set("sequence_number", 1); + + } + + /** + * The method to get the issubformsection + * @returns {Boolean} A Boolean representing the issubformsection + */ + getIssubformsection() { + return this.issubformsection; + + } + + /** + * The method to set the value to issubformsection + * @param {Boolean} issubformsection A Boolean representing the issubformsection + */ + setIssubformsection(issubformsection) { + if((issubformsection != null) && (!(Object.prototype.toString.call(issubformsection) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: issubformsection EXPECTED TYPE: Boolean", null, null); + } + this.issubformsection = issubformsection; + this.keyModified.set("isSubformSection", 1); + + } + + /** + * The method to get the tabTraversal + * @returns {number} A number representing the tabTraversal + */ + getTabTraversal() { + return this.tabTraversal; + + } + + /** + * The method to set the value to tabTraversal + * @param {number} tabTraversal A number representing the tabTraversal + */ + setTabTraversal(tabTraversal) { + if((tabTraversal != null) && (!(Object.prototype.toString.call(tabTraversal) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tabTraversal EXPECTED TYPE: number", null, null); + } + this.tabTraversal = tabTraversal; + this.keyModified.set("tab_traversal", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the columnCount + * @returns {number} A number representing the columnCount + */ + getColumnCount() { + return this.columnCount; + + } + + /** + * The method to set the value to columnCount + * @param {number} columnCount A number representing the columnCount + */ + setColumnCount(columnCount) { + if((columnCount != null) && (!(Object.prototype.toString.call(columnCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: columnCount EXPECTED TYPE: number", null, null); + } + this.columnCount = columnCount; + this.keyModified.set("column_count", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the generatedType + * @returns {String} A String representing the generatedType + */ + getGeneratedType() { + return this.generatedType; + + } + + /** + * The method to set the value to generatedType + * @param {String} generatedType A String representing the generatedType + */ + setGeneratedType(generatedType) { + if((generatedType != null) && (!(Object.prototype.toString.call(generatedType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: generatedType EXPECTED TYPE: String", null, null); + } + this.generatedType = generatedType; + this.keyModified.set("generated_type", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the fields + * @returns {Array} An Array representing the fields + */ + getFields() { + return this.fields; + + } + + /** + * The method to set the value to fields + * @param {Array} fields An Array representing the fields + */ + setFields(fields) { + if((fields != null) && (!(Object.prototype.toString.call(fields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: Array", null, null); + } + this.fields = fields; + this.keyModified.set("fields", 1); + + } + + /** + * The method to get the properties + * @returns {Properties} An instance of Properties + */ + getProperties() { + return this.properties; + + } + + /** + * The method to set the value to properties + * @param {Properties} properties An instance of Properties + */ + async setProperties(properties) { + const Properties = (await (import("./properties.js"))).MasterModel; + if((properties != null) && (!(properties instanceof Properties))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: properties EXPECTED TYPE: Properties", null, null); + } + this.properties = properties; + this.keyModified.set("properties", 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 { + Sections as MasterModel, + Sections as Sections +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/tooltip.js b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/tooltip.js new file mode 100644 index 0000000..098f7e2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/layouts/tooltip.js @@ -0,0 +1,90 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Tooltip{ + + name; + value; + keyModified = new Map(); + /** + * The method to get the name + * @returns {Choice} An instance of Choice + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {Choice} name An instance of Choice + */ + setName(name) { + if((name != null) && (!(name instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: Choice", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the value + * @returns {String} A String representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {String} value A String representing the value + */ + setValue(value) { + if((value != null) && (!(Object.prototype.toString.call(value) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: value EXPECTED TYPE: String", null, null); + } + this.value = value; + this.keyModified.set("value", 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 { + Tooltip as MasterModel, + Tooltip as Tooltip +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/action_wrapper.js new file mode 100644 index 0000000..0cc5364 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + sendMailMerge; + keyModified = new Map(); + /** + * The method to get the sendMailMerge + * @returns {Array} An Array representing the sendMailMerge + */ + getSendMailMerge() { + return this.sendMailMerge; + + } + + /** + * The method to set the value to sendMailMerge + * @param {Array} sendMailMerge An Array representing the sendMailMerge + */ + setSendMailMerge(sendMailMerge) { + if((sendMailMerge != null) && (!(Object.prototype.toString.call(sendMailMerge) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sendMailMerge EXPECTED TYPE: Array", null, null); + } + this.sendMailMerge = sendMailMerge; + this.keyModified.set("send_mail_merge", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/address.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/address.js new file mode 100644 index 0000000..4c2d033 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/address.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Address{ + + addressValueMap; + keyModified = new Map(); + /** + * The method to get the addressValueMap + * @returns {AddressValueMap} An instance of AddressValueMap + */ + getAddressValueMap() { + return this.addressValueMap; + + } + + /** + * The method to set the value to addressValueMap + * @param {AddressValueMap} addressValueMap An instance of AddressValueMap + */ + async setAddressValueMap(addressValueMap) { + const AddressValueMap = (await (import("./address_value_map.js"))).MasterModel; + if((addressValueMap != null) && (!(addressValueMap instanceof AddressValueMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: addressValueMap EXPECTED TYPE: AddressValueMap", null, null); + } + this.addressValueMap = addressValueMap; + this.keyModified.set("Address_Value_Map", 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 { + Address as MasterModel, + Address as Address +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/address_value_map.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/address_value_map.js new file mode 100644 index 0000000..586f24d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/address_value_map.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AddressValueMap{ + + value; + keyModified = new Map(); + /** + * The method to get the value + * @returns {String} A String representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {String} value A String representing the value + */ + setValue(value) { + if((value != null) && (!(Object.prototype.toString.call(value) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: value EXPECTED TYPE: String", null, null); + } + this.value = value; + this.keyModified.set("value", 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 { + AddressValueMap as MasterModel, + AddressValueMap as AddressValueMap +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/api_exception.js new file mode 100644 index 0000000..35bf8ba --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/download_mail_merge.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/download_mail_merge.js new file mode 100644 index 0000000..738f295 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/download_mail_merge.js @@ -0,0 +1,137 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DownloadMailMerge{ + + mailMergeTemplate; + outputFormat; + fileName; + password; + keyModified = new Map(); + /** + * The method to get the mailMergeTemplate + * @returns {MailMergeTemplate} An instance of MailMergeTemplate + */ + getMailMergeTemplate() { + return this.mailMergeTemplate; + + } + + /** + * The method to set the value to mailMergeTemplate + * @param {MailMergeTemplate} mailMergeTemplate An instance of MailMergeTemplate + */ + async setMailMergeTemplate(mailMergeTemplate) { + const MailMergeTemplate = (await (import("./mail_merge_template.js"))).MasterModel; + if((mailMergeTemplate != null) && (!(mailMergeTemplate instanceof MailMergeTemplate))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: mailMergeTemplate EXPECTED TYPE: MailMergeTemplate", null, null); + } + this.mailMergeTemplate = mailMergeTemplate; + this.keyModified.set("mail_merge_template", 1); + + } + + /** + * The method to get the outputFormat + * @returns {Choice} An instance of Choice + */ + getOutputFormat() { + return this.outputFormat; + + } + + /** + * The method to set the value to outputFormat + * @param {Choice} outputFormat An instance of Choice + */ + setOutputFormat(outputFormat) { + if((outputFormat != null) && (!(outputFormat instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: outputFormat EXPECTED TYPE: Choice", null, null); + } + this.outputFormat = outputFormat; + this.keyModified.set("output_format", 1); + + } + + /** + * The method to get the fileName + * @returns {String} A String representing the fileName + */ + getFileName() { + return this.fileName; + + } + + /** + * The method to set the value to fileName + * @param {String} fileName A String representing the fileName + */ + setFileName(fileName) { + if((fileName != null) && (!(Object.prototype.toString.call(fileName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileName EXPECTED TYPE: String", null, null); + } + this.fileName = fileName; + this.keyModified.set("file_name", 1); + + } + + /** + * The method to get the password + * @returns {String} A String representing the password + */ + getPassword() { + return this.password; + + } + + /** + * The method to set the value to password + * @param {String} password A String representing the password + */ + setPassword(password) { + if((password != null) && (!(Object.prototype.toString.call(password) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: password EXPECTED TYPE: String", null, null); + } + this.password = password; + this.keyModified.set("password", 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 { + DownloadMailMerge as MasterModel, + DownloadMailMerge as DownloadMailMerge +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/download_mail_merge_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/download_mail_merge_wrapper.js new file mode 100644 index 0000000..b07e16e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/download_mail_merge_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DownloadMailMergeWrapper{ + + downloadMailMerge; + keyModified = new Map(); + /** + * The method to get the downloadMailMerge + * @returns {Array} An Array representing the downloadMailMerge + */ + getDownloadMailMerge() { + return this.downloadMailMerge; + + } + + /** + * The method to set the value to downloadMailMerge + * @param {Array} downloadMailMerge An Array representing the downloadMailMerge + */ + setDownloadMailMerge(downloadMailMerge) { + if((downloadMailMerge != null) && (!(Object.prototype.toString.call(downloadMailMerge) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: downloadMailMerge EXPECTED TYPE: Array", null, null); + } + this.downloadMailMerge = downloadMailMerge; + this.keyModified.set("download_mail_merge", 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 { + DownloadMailMergeWrapper as MasterModel, + DownloadMailMergeWrapper as DownloadMailMergeWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/import_mail_merge.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/import_mail_merge.js new file mode 100644 index 0000000..034300c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/import_mail_merge.js @@ -0,0 +1,16 @@ +export { SignActionWrapper } from "./sign_action_wrapper.js"; +export * as ActionResponse from "./action_response.js"; +export { SignMailMerge } from "./sign_mail_merge.js"; +export { Address } from "./address.js"; +export { AddressValueMap } from "./address_value_map.js"; +export { Signers } from "./signers.js"; +export { APIException } from "./api_exception.js"; +export { MailMergeTemplate } from "./mail_merge_template.js"; +export { SuccessResponse } from "./success_response.js"; +export { DownloadMailMergeWrapper } from "./download_mail_merge_wrapper.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { DownloadMailMerge } from "./download_mail_merge.js"; +export { MailMerge } from "./mail_merge.js"; +export { SignMailMergeWrapper } from "./sign_mail_merge_wrapper.js"; +export * as SignActionResponse from "./sign_action_response.js"; +export { MailMergeWrapper } from "./mail_merge_wrapper.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/mail_merge.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/mail_merge.js new file mode 100644 index 0000000..151e8a1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/mail_merge.js @@ -0,0 +1,253 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MailMerge{ + + mailMergeTemplate; + fromAddress; + toAddress; + ccEmail; + bccEmail; + subject; + message; + type; + attachmentName; + keyModified = new Map(); + /** + * The method to get the mailMergeTemplate + * @returns {MailMergeTemplate} An instance of MailMergeTemplate + */ + getMailMergeTemplate() { + return this.mailMergeTemplate; + + } + + /** + * The method to set the value to mailMergeTemplate + * @param {MailMergeTemplate} mailMergeTemplate An instance of MailMergeTemplate + */ + async setMailMergeTemplate(mailMergeTemplate) { + const MailMergeTemplate = (await (import("./mail_merge_template.js"))).MasterModel; + if((mailMergeTemplate != null) && (!(mailMergeTemplate instanceof MailMergeTemplate))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: mailMergeTemplate EXPECTED TYPE: MailMergeTemplate", null, null); + } + this.mailMergeTemplate = mailMergeTemplate; + this.keyModified.set("mail_merge_template", 1); + + } + + /** + * The method to get the fromAddress + * @returns {Address} An instance of Address + */ + getFromAddress() { + return this.fromAddress; + + } + + /** + * The method to set the value to fromAddress + * @param {Address} fromAddress An instance of Address + */ + async setFromAddress(fromAddress) { + const Address = (await (import("./address.js"))).MasterModel; + if((fromAddress != null) && (!(fromAddress instanceof Address))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fromAddress EXPECTED TYPE: Address", null, null); + } + this.fromAddress = fromAddress; + this.keyModified.set("from_address", 1); + + } + + /** + * The method to get the toAddress + * @returns {Array} An Array representing the toAddress + */ + getToAddress() { + return this.toAddress; + + } + + /** + * The method to set the value to toAddress + * @param {Array} toAddress An Array representing the toAddress + */ + setToAddress(toAddress) { + if((toAddress != null) && (!(Object.prototype.toString.call(toAddress) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: toAddress EXPECTED TYPE: Array", null, null); + } + this.toAddress = toAddress; + this.keyModified.set("to_address", 1); + + } + + /** + * The method to get the ccEmail + * @returns {Array} An Array representing the ccEmail + */ + getCcEmail() { + return this.ccEmail; + + } + + /** + * The method to set the value to ccEmail + * @param {Array} ccEmail An Array representing the ccEmail + */ + setCcEmail(ccEmail) { + if((ccEmail != null) && (!(Object.prototype.toString.call(ccEmail) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ccEmail EXPECTED TYPE: Array", null, null); + } + this.ccEmail = ccEmail; + this.keyModified.set("cc_email", 1); + + } + + /** + * The method to get the bccEmail + * @returns {Array} An Array representing the bccEmail + */ + getBccEmail() { + return this.bccEmail; + + } + + /** + * The method to set the value to bccEmail + * @param {Array} bccEmail An Array representing the bccEmail + */ + setBccEmail(bccEmail) { + if((bccEmail != null) && (!(Object.prototype.toString.call(bccEmail) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: bccEmail EXPECTED TYPE: Array", null, null); + } + this.bccEmail = bccEmail; + this.keyModified.set("bcc_email", 1); + + } + + /** + * The method to get the subject + * @returns {String} A String representing the subject + */ + getSubject() { + return this.subject; + + } + + /** + * The method to set the value to subject + * @param {String} subject A String representing the subject + */ + setSubject(subject) { + if((subject != null) && (!(Object.prototype.toString.call(subject) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subject EXPECTED TYPE: String", null, null); + } + this.subject = subject; + this.keyModified.set("subject", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the type + * @returns {Choice} An instance of Choice + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {Choice} type An instance of Choice + */ + setType(type) { + if((type != null) && (!(type instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: Choice", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the attachmentName + * @returns {String} A String representing the attachmentName + */ + getAttachmentName() { + return this.attachmentName; + + } + + /** + * The method to set the value to attachmentName + * @param {String} attachmentName A String representing the attachmentName + */ + setAttachmentName(attachmentName) { + if((attachmentName != null) && (!(Object.prototype.toString.call(attachmentName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: attachmentName EXPECTED TYPE: String", null, null); + } + this.attachmentName = attachmentName; + this.keyModified.set("attachment_name", 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 { + MailMerge as MasterModel, + MailMerge as MailMerge +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/mail_merge_template.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/mail_merge_template.js new file mode 100644 index 0000000..3221553 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/mail_merge_template.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MailMergeTemplate{ + + id; + name; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + MailMergeTemplate as MasterModel, + MailMergeTemplate as MailMergeTemplate +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/mail_merge_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/mail_merge_wrapper.js new file mode 100644 index 0000000..b72eab1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/mail_merge_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MailMergeWrapper{ + + sendMailMerge; + keyModified = new Map(); + /** + * The method to get the sendMailMerge + * @returns {Array} An Array representing the sendMailMerge + */ + getSendMailMerge() { + return this.sendMailMerge; + + } + + /** + * The method to set the value to sendMailMerge + * @param {Array} sendMailMerge An Array representing the sendMailMerge + */ + setSendMailMerge(sendMailMerge) { + if((sendMailMerge != null) && (!(Object.prototype.toString.call(sendMailMerge) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sendMailMerge EXPECTED TYPE: Array", null, null); + } + this.sendMailMerge = sendMailMerge; + this.keyModified.set("send_mail_merge", 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 { + MailMergeWrapper as MasterModel, + MailMergeWrapper as MailMergeWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/sign_action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/sign_action_response.js new file mode 100644 index 0000000..8498a9c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/sign_action_response.js @@ -0,0 +1,7 @@ +class SignActionResponse{ + +} +export { + SignActionResponse as MasterModel, + SignActionResponse as SignActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/sign_action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/sign_action_wrapper.js new file mode 100644 index 0000000..84355e1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/sign_action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SignActionWrapper{ + + signMailMerge; + keyModified = new Map(); + /** + * The method to get the signMailMerge + * @returns {Array} An Array representing the signMailMerge + */ + getSignMailMerge() { + return this.signMailMerge; + + } + + /** + * The method to set the value to signMailMerge + * @param {Array} signMailMerge An Array representing the signMailMerge + */ + setSignMailMerge(signMailMerge) { + if((signMailMerge != null) && (!(Object.prototype.toString.call(signMailMerge) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: signMailMerge EXPECTED TYPE: Array", null, null); + } + this.signMailMerge = signMailMerge; + this.keyModified.set("sign_mail_merge", 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 { + SignActionWrapper as MasterModel, + SignActionWrapper as SignActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/sign_mail_merge.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/sign_mail_merge.js new file mode 100644 index 0000000..d3a23ed --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/sign_mail_merge.js @@ -0,0 +1,136 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SignMailMerge{ + + mailMergeTemplate; + signInOrder; + fileName; + signers; + keyModified = new Map(); + /** + * The method to get the mailMergeTemplate + * @returns {MailMergeTemplate} An instance of MailMergeTemplate + */ + getMailMergeTemplate() { + return this.mailMergeTemplate; + + } + + /** + * The method to set the value to mailMergeTemplate + * @param {MailMergeTemplate} mailMergeTemplate An instance of MailMergeTemplate + */ + async setMailMergeTemplate(mailMergeTemplate) { + const MailMergeTemplate = (await (import("./mail_merge_template.js"))).MasterModel; + if((mailMergeTemplate != null) && (!(mailMergeTemplate instanceof MailMergeTemplate))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: mailMergeTemplate EXPECTED TYPE: MailMergeTemplate", null, null); + } + this.mailMergeTemplate = mailMergeTemplate; + this.keyModified.set("mail_merge_template", 1); + + } + + /** + * The method to get the signInOrder + * @returns {Boolean} A Boolean representing the signInOrder + */ + getSignInOrder() { + return this.signInOrder; + + } + + /** + * The method to set the value to signInOrder + * @param {Boolean} signInOrder A Boolean representing the signInOrder + */ + setSignInOrder(signInOrder) { + if((signInOrder != null) && (!(Object.prototype.toString.call(signInOrder) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: signInOrder EXPECTED TYPE: Boolean", null, null); + } + this.signInOrder = signInOrder; + this.keyModified.set("sign_in_order", 1); + + } + + /** + * The method to get the fileName + * @returns {String} A String representing the fileName + */ + getFileName() { + return this.fileName; + + } + + /** + * The method to set the value to fileName + * @param {String} fileName A String representing the fileName + */ + setFileName(fileName) { + if((fileName != null) && (!(Object.prototype.toString.call(fileName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileName EXPECTED TYPE: String", null, null); + } + this.fileName = fileName; + this.keyModified.set("file_name", 1); + + } + + /** + * The method to get the signers + * @returns {Array} An Array representing the signers + */ + getSigners() { + return this.signers; + + } + + /** + * The method to set the value to signers + * @param {Array} signers An Array representing the signers + */ + setSigners(signers) { + if((signers != null) && (!(Object.prototype.toString.call(signers) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: signers EXPECTED TYPE: Array", null, null); + } + this.signers = signers; + this.keyModified.set("signers", 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 { + SignMailMerge as MasterModel, + SignMailMerge as SignMailMerge +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/sign_mail_merge_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/sign_mail_merge_wrapper.js new file mode 100644 index 0000000..e4e1497 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/sign_mail_merge_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SignMailMergeWrapper{ + + signMailMerge; + keyModified = new Map(); + /** + * The method to get the signMailMerge + * @returns {Array} An Array representing the signMailMerge + */ + getSignMailMerge() { + return this.signMailMerge; + + } + + /** + * The method to set the value to signMailMerge + * @param {Array} signMailMerge An Array representing the signMailMerge + */ + setSignMailMerge(signMailMerge) { + if((signMailMerge != null) && (!(Object.prototype.toString.call(signMailMerge) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: signMailMerge EXPECTED TYPE: Array", null, null); + } + this.signMailMerge = signMailMerge; + this.keyModified.set("sign_mail_merge", 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 { + SignMailMergeWrapper as MasterModel, + SignMailMergeWrapper as SignMailMergeWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/signers.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/signers.js new file mode 100644 index 0000000..404c669 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/signers.js @@ -0,0 +1,114 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Signers{ + + recipientName; + actionType; + recipient; + keyModified = new Map(); + /** + * The method to get the recipientName + * @returns {String} A String representing the recipientName + */ + getRecipientName() { + return this.recipientName; + + } + + /** + * The method to set the value to recipientName + * @param {String} recipientName A String representing the recipientName + */ + setRecipientName(recipientName) { + if((recipientName != null) && (!(Object.prototype.toString.call(recipientName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recipientName EXPECTED TYPE: String", null, null); + } + this.recipientName = recipientName; + this.keyModified.set("recipient_name", 1); + + } + + /** + * The method to get the actionType + * @returns {Choice} An instance of Choice + */ + getActionType() { + return this.actionType; + + } + + /** + * The method to set the value to actionType + * @param {Choice} actionType An instance of Choice + */ + setActionType(actionType) { + if((actionType != null) && (!(actionType instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: actionType EXPECTED TYPE: Choice", null, null); + } + this.actionType = actionType; + this.keyModified.set("action_type", 1); + + } + + /** + * The method to get the recipient + * @returns {Address} An instance of Address + */ + getRecipient() { + return this.recipient; + + } + + /** + * The method to set the value to recipient + * @param {Address} recipient An instance of Address + */ + async setRecipient(recipient) { + const Address = (await (import("./address.js"))).MasterModel; + if((recipient != null) && (!(recipient instanceof Address))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recipient EXPECTED TYPE: Address", null, null); + } + this.recipient = recipient; + this.keyModified.set("recipient", 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 { + Signers as MasterModel, + Signers as Signers +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/success_response.js new file mode 100644 index 0000000..f9a06f7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mail_merge/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + status; + message; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/action_wrapper.js new file mode 100644 index 0000000..6996d19 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/body_wrapper.js new file mode 100644 index 0000000..92037f2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/body_wrapper.js @@ -0,0 +1,114 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + cvid; + owner; + territory; + keyModified = new Map(); + /** + * The method to get the cvid + * @returns {BigInt} A BigInt representing the cvid + */ + getCvid() { + return this.cvid; + + } + + /** + * The method to set the value to cvid + * @param {BigInt} cvid A BigInt representing the cvid + */ + setCvid(cvid) { + if((cvid != null) && (!(Object.prototype.toString.call(cvid) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: cvid EXPECTED TYPE: BigInt", null, null); + } + this.cvid = cvid; + this.keyModified.set("cvid", 1); + + } + + /** + * The method to get the owner + * @returns {Owner} An instance of Owner + */ + getOwner() { + return this.owner; + + } + + /** + * The method to set the value to owner + * @param {Owner} owner An instance of Owner + */ + async setOwner(owner) { + const Owner = (await (import("./owner.js"))).MasterModel; + if((owner != null) && (!(owner instanceof Owner))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: owner EXPECTED TYPE: Owner", null, null); + } + this.owner = owner; + this.keyModified.set("owner", 1); + + } + + /** + * The method to get the territory + * @returns {Territory} An instance of Territory + */ + getTerritory() { + return this.territory; + + } + + /** + * The method to set the value to territory + * @param {Territory} territory An instance of Territory + */ + async setTerritory(territory) { + const Territory = (await (import("./territory.js"))).MasterModel; + if((territory != null) && (!(territory instanceof Territory))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territory EXPECTED TYPE: Territory", null, null); + } + this.territory = territory; + this.keyModified.set("territory", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/import_mass_change_owner.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/import_mass_change_owner.js new file mode 100644 index 0000000..eaeae26 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/import_mass_change_owner.js @@ -0,0 +1,13 @@ +export { ResponseWrapper } from "./response_wrapper.js"; +export { Status } from "./status.js"; +export { Territory } from "./territory.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export * as ActionHandler from "./action_handler.js"; +export * as ActionResponse from "./action_response.js"; +export { APIException } from "./api_exception.js"; +export { Owner } from "./owner.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { MassChangeOwnerOperations } from "./mass_change_owner_operations.js"; +export { CheckStatusParam } from "./mass_change_owner_operations.js"; +export { SuccessResponse } from "./success_response.js"; +export * as ResponseHandler from "./response_handler.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/mass_change_owner_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/mass_change_owner_operations.js new file mode 100644 index 0000000..3472280 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/mass_change_owner_operations.js @@ -0,0 +1,80 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 MassChangeOwnerOperations{ + /** + * The method to change owner + * @param {String} module A String representing the module + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async changeOwner(module, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/actions/mass_change_owner"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to check status + * @param {String} module A String representing the module + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async checkStatus(module, paramInstance=null) { + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/actions/mass_change_owner"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + +} +class CheckStatusParam{ + + static JOB_ID = new Param("job_id", "com.zoho.crm.api.MassChangeOwner.CheckStatusParam"); +} + +export { + MassChangeOwnerOperations as MasterModel, + MassChangeOwnerOperations as MassChangeOwnerOperations, + CheckStatusParam as CheckStatusParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/owner.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/owner.js new file mode 100644 index 0000000..5a950fd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/owner.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Owner{ + + id; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Owner as MasterModel, + Owner as Owner +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/response_wrapper.js new file mode 100644 index 0000000..8018183 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/status.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/status.js new file mode 100644 index 0000000..9b8177e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/status.js @@ -0,0 +1,159 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Status{ + + status; + failedCount; + notUpdatedCount; + updatedCount; + totalCount; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("Status", 1); + + } + + /** + * The method to get the failedCount + * @returns {number} A number representing the failedCount + */ + getFailedCount() { + return this.failedCount; + + } + + /** + * The method to set the value to failedCount + * @param {number} failedCount A number representing the failedCount + */ + setFailedCount(failedCount) { + if((failedCount != null) && (!(Object.prototype.toString.call(failedCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: failedCount EXPECTED TYPE: number", null, null); + } + this.failedCount = failedCount; + this.keyModified.set("Failed_Count", 1); + + } + + /** + * The method to get the notUpdatedCount + * @returns {number} A number representing the notUpdatedCount + */ + getNotUpdatedCount() { + return this.notUpdatedCount; + + } + + /** + * The method to set the value to notUpdatedCount + * @param {number} notUpdatedCount A number representing the notUpdatedCount + */ + setNotUpdatedCount(notUpdatedCount) { + if((notUpdatedCount != null) && (!(Object.prototype.toString.call(notUpdatedCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: notUpdatedCount EXPECTED TYPE: number", null, null); + } + this.notUpdatedCount = notUpdatedCount; + this.keyModified.set("Not_Updated_Count", 1); + + } + + /** + * The method to get the updatedCount + * @returns {number} A number representing the updatedCount + */ + getUpdatedCount() { + return this.updatedCount; + + } + + /** + * The method to set the value to updatedCount + * @param {number} updatedCount A number representing the updatedCount + */ + setUpdatedCount(updatedCount) { + if((updatedCount != null) && (!(Object.prototype.toString.call(updatedCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: updatedCount EXPECTED TYPE: number", null, null); + } + this.updatedCount = updatedCount; + this.keyModified.set("Updated_Count", 1); + + } + + /** + * The method to get the totalCount + * @returns {number} A number representing the totalCount + */ + getTotalCount() { + return this.totalCount; + + } + + /** + * The method to set the value to totalCount + * @param {number} totalCount A number representing the totalCount + */ + setTotalCount(totalCount) { + if((totalCount != null) && (!(Object.prototype.toString.call(totalCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: totalCount EXPECTED TYPE: number", null, null); + } + this.totalCount = totalCount; + this.keyModified.set("Total_Count", 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 { + Status as MasterModel, + Status as Status +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/success_response.js new file mode 100644 index 0000000..39525ad --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/territory.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/territory.js new file mode 100644 index 0000000..a8e93ef --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_change_owner/territory.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Territory{ + + id; + includeChild; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the includeChild + * @returns {Boolean} A Boolean representing the includeChild + */ + getIncludeChild() { + return this.includeChild; + + } + + /** + * The method to set the value to includeChild + * @param {Boolean} includeChild A Boolean representing the includeChild + */ + setIncludeChild(includeChild) { + if((includeChild != null) && (!(Object.prototype.toString.call(includeChild) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: includeChild EXPECTED TYPE: Boolean", null, null); + } + this.includeChild = includeChild; + this.keyModified.set("include_child", 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 { + Territory as MasterModel, + Territory as Territory +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/api_exception.js new file mode 100644 index 0000000..db2d361 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/assign_to.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/assign_to.js new file mode 100644 index 0000000..9b01ae0 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/assign_to.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AssignTo{ + + id; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + AssignTo as MasterModel, + AssignTo as AssignTo +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/convert.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/convert.js new file mode 100644 index 0000000..9b19531 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/convert.js @@ -0,0 +1,231 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Convert{ + + deals; + moveAttachmentsTo; + assignTo; + carryOverTags; + relatedModules; + portalUserType; + ids; + applyAssignmentThreshold; + keyModified = new Map(); + /** + * The method to get the deals + * @returns {Record} An instance of Record + */ + getDeals() { + return this.deals; + + } + + /** + * The method to set the value to deals + * @param {Record} deals An instance of Record + */ + async setDeals(deals) { + const Record = (await (import("../record/record.js"))).MasterModel; + if((deals != null) && (!(deals instanceof Record))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deals EXPECTED TYPE: Record", null, null); + } + this.deals = deals; + this.keyModified.set("Deals", 1); + + } + + /** + * The method to get the moveAttachmentsTo + * @returns {MoveAttachmentsTo} An instance of MoveAttachmentsTo + */ + getMoveAttachmentsTo() { + return this.moveAttachmentsTo; + + } + + /** + * The method to set the value to moveAttachmentsTo + * @param {MoveAttachmentsTo} moveAttachmentsTo An instance of MoveAttachmentsTo + */ + async setMoveAttachmentsTo(moveAttachmentsTo) { + const MoveAttachmentsTo = (await (import("./move_attachments_to.js"))).MasterModel; + if((moveAttachmentsTo != null) && (!(moveAttachmentsTo instanceof MoveAttachmentsTo))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moveAttachmentsTo EXPECTED TYPE: MoveAttachmentsTo", null, null); + } + this.moveAttachmentsTo = moveAttachmentsTo; + this.keyModified.set("move_attachments_to", 1); + + } + + /** + * The method to get the assignTo + * @returns {AssignTo} An instance of AssignTo + */ + getAssignTo() { + return this.assignTo; + + } + + /** + * The method to set the value to assignTo + * @param {AssignTo} assignTo An instance of AssignTo + */ + async setAssignTo(assignTo) { + const AssignTo = (await (import("./assign_to.js"))).MasterModel; + if((assignTo != null) && (!(assignTo instanceof AssignTo))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: assignTo EXPECTED TYPE: AssignTo", null, null); + } + this.assignTo = assignTo; + this.keyModified.set("assign_to", 1); + + } + + /** + * The method to get the carryOverTags + * @returns {Array} An Array representing the carryOverTags + */ + getCarryOverTags() { + return this.carryOverTags; + + } + + /** + * The method to set the value to carryOverTags + * @param {Array} carryOverTags An Array representing the carryOverTags + */ + setCarryOverTags(carryOverTags) { + if((carryOverTags != null) && (!(Object.prototype.toString.call(carryOverTags) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: carryOverTags EXPECTED TYPE: Array", null, null); + } + this.carryOverTags = carryOverTags; + this.keyModified.set("carry_over_tags", 1); + + } + + /** + * The method to get the relatedModules + * @returns {Array} An Array representing the relatedModules + */ + getRelatedModules() { + return this.relatedModules; + + } + + /** + * The method to set the value to relatedModules + * @param {Array} relatedModules An Array representing the relatedModules + */ + setRelatedModules(relatedModules) { + if((relatedModules != null) && (!(Object.prototype.toString.call(relatedModules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: relatedModules EXPECTED TYPE: Array", null, null); + } + this.relatedModules = relatedModules; + this.keyModified.set("related_modules", 1); + + } + + /** + * The method to get the portalUserType + * @returns {PortalUserType} An instance of PortalUserType + */ + getPortalUserType() { + return this.portalUserType; + + } + + /** + * The method to set the value to portalUserType + * @param {PortalUserType} portalUserType An instance of PortalUserType + */ + async setPortalUserType(portalUserType) { + const PortalUserType = (await (import("./portal_user_type.js"))).MasterModel; + if((portalUserType != null) && (!(portalUserType instanceof PortalUserType))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: portalUserType EXPECTED TYPE: PortalUserType", null, null); + } + this.portalUserType = portalUserType; + this.keyModified.set("portal_user_type", 1); + + } + + /** + * The method to get the ids + * @returns {Array} An Array representing the ids + */ + getIds() { + return this.ids; + + } + + /** + * The method to set the value to ids + * @param {Array} ids An Array representing the ids + */ + setIds(ids) { + if((ids != null) && (!(Object.prototype.toString.call(ids) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ids EXPECTED TYPE: Array", null, null); + } + this.ids = ids; + this.keyModified.set("ids", 1); + + } + + /** + * The method to get the applyAssignmentThreshold + * @returns {Boolean} A Boolean representing the applyAssignmentThreshold + */ + getApplyAssignmentThreshold() { + return this.applyAssignmentThreshold; + + } + + /** + * The method to set the value to applyAssignmentThreshold + * @param {Boolean} applyAssignmentThreshold A Boolean representing the applyAssignmentThreshold + */ + setApplyAssignmentThreshold(applyAssignmentThreshold) { + if((applyAssignmentThreshold != null) && (!(Object.prototype.toString.call(applyAssignmentThreshold) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: applyAssignmentThreshold EXPECTED TYPE: Boolean", null, null); + } + this.applyAssignmentThreshold = applyAssignmentThreshold; + this.keyModified.set("apply_assignment_threshold", 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 { + Convert as MasterModel, + Convert as Convert +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/error_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/error_details.js new file mode 100644 index 0000000..bd8bb0c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/error_details.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ErrorDetails{ + + apiName; + jsonPath; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the jsonPath + * @returns {String} A String representing the jsonPath + */ + getJsonPath() { + return this.jsonPath; + + } + + /** + * The method to set the value to jsonPath + * @param {String} jsonPath A String representing the jsonPath + */ + setJsonPath(jsonPath) { + if((jsonPath != null) && (!(Object.prototype.toString.call(jsonPath) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jsonPath EXPECTED TYPE: String", null, null); + } + this.jsonPath = jsonPath; + this.keyModified.set("json_path", 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 { + ErrorDetails as MasterModel, + ErrorDetails as ErrorDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/import_mass_convert.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/import_mass_convert.js new file mode 100644 index 0000000..432805e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/import_mass_convert.js @@ -0,0 +1,14 @@ +export { ResponseWrapper } from "./response_wrapper.js"; +export { RelatedModule } from "./related_module.js"; +export { AssignTo } from "./assign_to.js"; +export { MassConvertOperations } from "./mass_convert_operations.js"; +export { GetJobStatusParam } from "./mass_convert_operations.js"; +export { APIException } from "./api_exception.js"; +export { MoveAttachmentsTo } from "./move_attachments_to.js"; +export { SuccessResponse } from "./success_response.js"; +export * as ResponseHandler from "./response_handler.js"; +export { Status } from "./status.js"; +export * as ActionResponse from "./action_response.js"; +export { PortalUserType } from "./portal_user_type.js"; +export { ErrorDetails } from "./error_details.js"; +export { Convert } from "./convert.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/mass_convert_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/mass_convert_operations.js new file mode 100644 index 0000000..3c3f802 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/mass_convert_operations.js @@ -0,0 +1,72 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +import {APIResponse} from "../../../../../../routes/controllers/api_response.js"; +import {CommonAPIHandler} from "../../../../../../routes/middlewares/common_api_handler.js"; +import {Utility} from "../../../../../../utils/util/utility.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; +import {createRequire} from "node:module"; + +class MassConvertOperations{ + /** + * The method to mass convert + * @param {Convert} request An instance of Convert + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async massConvert(request) { + const Convert = (await (import("./convert.js"))).MasterModel; + if((request != null) && (!(request instanceof Convert))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: Convert", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Leads/actions/mass_convert"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + handlerInstance.setModuleAPIName("Deals"); + await Utility.getFields("Deals", handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionResponse = require.resolve("./action_response.js"); + return handlerInstance.apiCall(ActionResponse, "application/json"); + + } + + /** + * The method to get job status + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getJobStatus(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Leads/actions/mass_convert"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + +} +class GetJobStatusParam{ + + static JOB_ID = new Param("job_id", "com.zoho.crm.api.MassConvert.GetJobStatusParam"); +} + +export { + GetJobStatusParam as GetJobStatusParam, + MassConvertOperations as MasterModel, + MassConvertOperations as MassConvertOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/move_attachments_to.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/move_attachments_to.js new file mode 100644 index 0000000..2e14ed3 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/move_attachments_to.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MoveAttachmentsTo{ + + id; + apiName; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 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 { + MoveAttachmentsTo as MasterModel, + MoveAttachmentsTo as MoveAttachmentsTo +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/portal_user_type.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/portal_user_type.js new file mode 100644 index 0000000..6fe4573 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/portal_user_type.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class PortalUserType{ + + id; + apiName; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 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 { + PortalUserType as MasterModel, + PortalUserType as PortalUserType +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/related_module.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/related_module.js new file mode 100644 index 0000000..5a5637d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/related_module.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RelatedModule{ + + id; + apiName; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 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 { + RelatedModule as MasterModel, + RelatedModule as RelatedModule +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/response_wrapper.js new file mode 100644 index 0000000..8018183 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/status.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/status.js new file mode 100644 index 0000000..bb45a65 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/status.js @@ -0,0 +1,158 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Status{ + + status; + failedCount; + notConvertedCount; + totalCount; + convertedCount; + keyModified = new Map(); + /** + * The method to get the status + * @returns {String} A String representing the status + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {String} status A String representing the status + */ + setStatus(status) { + if((status != null) && (!(Object.prototype.toString.call(status) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: String", null, null); + } + this.status = status; + this.keyModified.set("Status", 1); + + } + + /** + * The method to get the failedCount + * @returns {number} A number representing the failedCount + */ + getFailedCount() { + return this.failedCount; + + } + + /** + * The method to set the value to failedCount + * @param {number} failedCount A number representing the failedCount + */ + setFailedCount(failedCount) { + if((failedCount != null) && (!(Object.prototype.toString.call(failedCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: failedCount EXPECTED TYPE: number", null, null); + } + this.failedCount = failedCount; + this.keyModified.set("Failed_Count", 1); + + } + + /** + * The method to get the notConvertedCount + * @returns {number} A number representing the notConvertedCount + */ + getNotConvertedCount() { + return this.notConvertedCount; + + } + + /** + * The method to set the value to notConvertedCount + * @param {number} notConvertedCount A number representing the notConvertedCount + */ + setNotConvertedCount(notConvertedCount) { + if((notConvertedCount != null) && (!(Object.prototype.toString.call(notConvertedCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: notConvertedCount EXPECTED TYPE: number", null, null); + } + this.notConvertedCount = notConvertedCount; + this.keyModified.set("Not_Converted_Count", 1); + + } + + /** + * The method to get the totalCount + * @returns {number} A number representing the totalCount + */ + getTotalCount() { + return this.totalCount; + + } + + /** + * The method to set the value to totalCount + * @param {number} totalCount A number representing the totalCount + */ + setTotalCount(totalCount) { + if((totalCount != null) && (!(Object.prototype.toString.call(totalCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: totalCount EXPECTED TYPE: number", null, null); + } + this.totalCount = totalCount; + this.keyModified.set("Total_Count", 1); + + } + + /** + * The method to get the convertedCount + * @returns {number} A number representing the convertedCount + */ + getConvertedCount() { + return this.convertedCount; + + } + + /** + * The method to set the value to convertedCount + * @param {number} convertedCount A number representing the convertedCount + */ + setConvertedCount(convertedCount) { + if((convertedCount != null) && (!(Object.prototype.toString.call(convertedCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: convertedCount EXPECTED TYPE: number", null, null); + } + this.convertedCount = convertedCount; + this.keyModified.set("Converted_Count", 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 { + Status as MasterModel, + Status as Status +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/success_response.js new file mode 100644 index 0000000..e8b71a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_convert/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/action_wrapper.js new file mode 100644 index 0000000..6996d19 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/cvid_body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/cvid_body_wrapper.js new file mode 100644 index 0000000..0d63d6d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/cvid_body_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class CvidBodyWrapper{ + + cvid; + territory; + keyModified = new Map(); + /** + * The method to get the cvid + * @returns {BigInt} A BigInt representing the cvid + */ + getCvid() { + return this.cvid; + + } + + /** + * The method to set the value to cvid + * @param {BigInt} cvid A BigInt representing the cvid + */ + setCvid(cvid) { + if((cvid != null) && (!(Object.prototype.toString.call(cvid) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: cvid EXPECTED TYPE: BigInt", null, null); + } + this.cvid = cvid; + this.keyModified.set("cvid", 1); + + } + + /** + * The method to get the territory + * @returns {Territory} An instance of Territory + */ + getTerritory() { + return this.territory; + + } + + /** + * The method to set the value to territory + * @param {Territory} territory An instance of Territory + */ + async setTerritory(territory) { + const Territory = (await (import("./territory.js"))).MasterModel; + if((territory != null) && (!(territory instanceof Territory))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territory EXPECTED TYPE: Territory", null, null); + } + this.territory = territory; + this.keyModified.set("territory", 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 { + CvidBodyWrapper as MasterModel, + CvidBodyWrapper as CvidBodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/import_mass_delete_cvid.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/import_mass_delete_cvid.js new file mode 100644 index 0000000..e085116 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/import_mass_delete_cvid.js @@ -0,0 +1,14 @@ +export { SuccessResponse } from "./success_response.js"; +export * as ActionResponse from "./action_response.js"; +export { RecordIdBodyWrapper } from "./record_id_body_wrapper.js"; +export { MassDeleteScheduled } from "./mass_delete_scheduled.js"; +export { MassDeleteCvidOperations } from "./mass_delete_cvid_operations.js"; +export { GetMassDeleteStatusParam } from "./mass_delete_cvid_operations.js"; +export * as ResponseHandler from "./response_handler.js"; +export { Territory } from "./territory.js"; +export { Status } from "./status.js"; +export { APIException } from "./api_exception.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export * as ActionHandler from "./action_handler.js"; +export { CvidBodyWrapper } from "./cvid_body_wrapper.js"; +export { ActionWrapper } from "./action_wrapper.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/mass_delete_cvid_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/mass_delete_cvid_operations.js new file mode 100644 index 0000000..d6a8194 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/mass_delete_cvid_operations.js @@ -0,0 +1,113 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 MassDeleteCvidOperations{ + + module; + /** + * Creates an instance of MassDeleteCvidOperations with the given parameters + * @param {String} module A String representing the module + */ + constructor(module){ + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + this.module = module; + + } + + /** + * The method to mass delete by cvid + * @param {CvidBodyWrapper} request An instance of CvidBodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async massDeleteByCvid(request) { + const CvidBodyWrapper = (await (import("./cvid_body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof CvidBodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: CvidBodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.module.toString()); + apiPath = apiPath.concat("/actions/mass_delete"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to mass delete by record id + * @param {RecordIdBodyWrapper} request An instance of RecordIdBodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async massDeleteByRecordId(request) { + const RecordIdBodyWrapper = (await (import("./record_id_body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof RecordIdBodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: RecordIdBodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.module.toString()); + apiPath = apiPath.concat("/actions/mass_delete"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get mass delete status + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getMassDeleteStatus(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.module.toString()); + apiPath = apiPath.concat("/actions/mass_delete"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + +} +class GetMassDeleteStatusParam{ + + static JOB_ID = new Param("job_id", "com.zoho.crm.api.MassDeleteCvid.GetMassDeleteStatusParam"); +} + +export { + GetMassDeleteStatusParam as GetMassDeleteStatusParam, + MassDeleteCvidOperations as MasterModel, + MassDeleteCvidOperations as MassDeleteCvidOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/mass_delete_scheduled.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/mass_delete_scheduled.js new file mode 100644 index 0000000..9b28f92 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/mass_delete_scheduled.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MassDeleteScheduled{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + MassDeleteScheduled as MasterModel, + MassDeleteScheduled as MassDeleteScheduled +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/record_id_body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/record_id_body_wrapper.js new file mode 100644 index 0000000..8aed084 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/record_id_body_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RecordIdBodyWrapper{ + + ids; + territory; + keyModified = new Map(); + /** + * The method to get the ids + * @returns {Array} An Array representing the ids + */ + getIds() { + return this.ids; + + } + + /** + * The method to set the value to ids + * @param {Array} ids An Array representing the ids + */ + setIds(ids) { + if((ids != null) && (!(Object.prototype.toString.call(ids) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ids EXPECTED TYPE: Array", null, null); + } + this.ids = ids; + this.keyModified.set("ids", 1); + + } + + /** + * The method to get the territory + * @returns {Territory} An instance of Territory + */ + getTerritory() { + return this.territory; + + } + + /** + * The method to set the value to territory + * @param {Territory} territory An instance of Territory + */ + async setTerritory(territory) { + const Territory = (await (import("./territory.js"))).MasterModel; + if((territory != null) && (!(territory instanceof Territory))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territory EXPECTED TYPE: Territory", null, null); + } + this.territory = territory; + this.keyModified.set("territory", 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 { + RecordIdBodyWrapper as MasterModel, + RecordIdBodyWrapper as RecordIdBodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/response_wrapper.js new file mode 100644 index 0000000..8018183 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/status.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/status.js new file mode 100644 index 0000000..6b2ddd2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/status.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Status{ + + status; + failedCount; + deletedCount; + totalCount; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("Status", 1); + + } + + /** + * The method to get the failedCount + * @returns {number} A number representing the failedCount + */ + getFailedCount() { + return this.failedCount; + + } + + /** + * The method to set the value to failedCount + * @param {number} failedCount A number representing the failedCount + */ + setFailedCount(failedCount) { + if((failedCount != null) && (!(Object.prototype.toString.call(failedCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: failedCount EXPECTED TYPE: number", null, null); + } + this.failedCount = failedCount; + this.keyModified.set("Failed_Count", 1); + + } + + /** + * The method to get the deletedCount + * @returns {number} A number representing the deletedCount + */ + getDeletedCount() { + return this.deletedCount; + + } + + /** + * The method to set the value to deletedCount + * @param {number} deletedCount A number representing the deletedCount + */ + setDeletedCount(deletedCount) { + if((deletedCount != null) && (!(Object.prototype.toString.call(deletedCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deletedCount EXPECTED TYPE: number", null, null); + } + this.deletedCount = deletedCount; + this.keyModified.set("Deleted_Count", 1); + + } + + /** + * The method to get the totalCount + * @returns {number} A number representing the totalCount + */ + getTotalCount() { + return this.totalCount; + + } + + /** + * The method to set the value to totalCount + * @param {number} totalCount A number representing the totalCount + */ + setTotalCount(totalCount) { + if((totalCount != null) && (!(Object.prototype.toString.call(totalCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: totalCount EXPECTED TYPE: number", null, null); + } + this.totalCount = totalCount; + this.keyModified.set("Total_Count", 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 { + Status as MasterModel, + Status as Status +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/success_response.js new file mode 100644 index 0000000..39525ad --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/territory.js b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/territory.js new file mode 100644 index 0000000..a8e93ef --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/mass_delete_cvid/territory.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Territory{ + + id; + includeChild; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the includeChild + * @returns {Boolean} A Boolean representing the includeChild + */ + getIncludeChild() { + return this.includeChild; + + } + + /** + * The method to set the value to includeChild + * @param {Boolean} includeChild A Boolean representing the includeChild + */ + setIncludeChild(includeChild) { + if((includeChild != null) && (!(Object.prototype.toString.call(includeChild) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: includeChild EXPECTED TYPE: Boolean", null, null); + } + this.includeChild = includeChild; + this.keyModified.set("include_child", 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 { + Territory as MasterModel, + Territory as Territory +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/action_wrapper.js new file mode 100644 index 0000000..af840e5 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + modules; + keyModified = new Map(); + /** + * The method to get the modules + * @returns {Array} An Array representing the modules + */ + getModules() { + return this.modules; + + } + + /** + * The method to set the value to modules + * @param {Array} modules An Array representing the modules + */ + setModules(modules) { + if((modules != null) && (!(Object.prototype.toString.call(modules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modules EXPECTED TYPE: Array", null, null); + } + this.modules = modules; + this.keyModified.set("modules", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/api_exception.js new file mode 100644 index 0000000..35bf8ba --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/argument.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/argument.js new file mode 100644 index 0000000..80bf12e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/argument.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Argument{ + + name; + value; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the value + * @returns {String} A String representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {String} value A String representing the value + */ + setValue(value) { + if((value != null) && (!(Object.prototype.toString.call(value) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: value EXPECTED TYPE: String", null, null); + } + this.value = value; + this.keyModified.set("value", 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 { + Argument as MasterModel, + Argument as Argument +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/body_wrapper.js new file mode 100644 index 0000000..d03f519 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + modules; + keyModified = new Map(); + /** + * The method to get the modules + * @returns {Array} An Array representing the modules + */ + getModules() { + return this.modules; + + } + + /** + * The method to set the value to modules + * @param {Array} modules An Array representing the modules + */ + setModules(modules) { + if((modules != null) && (!(Object.prototype.toString.call(modules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modules EXPECTED TYPE: Array", null, null); + } + this.modules = modules; + this.keyModified.set("modules", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/import_modules.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/import_modules.js new file mode 100644 index 0000000..a15890d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/import_modules.js @@ -0,0 +1,20 @@ +export { ActionWrapper } from "./action_wrapper.js"; +export { ModulesOperations } from "./modules_operations.js"; +export { GetModulesHeader } from "./modules_operations.js"; +export * as ActionResponse from "./action_response.js"; +export * as ResponseHandler from "./response_handler.js"; +export { SuccessResponse } from "./success_response.js"; +export { Argument } from "./argument.js"; +export { ModuleFieldLookup } from "./module_field_lookup.js"; +export * as ActionHandler from "./action_handler.js"; +export { MinifiedModule } from "./minified_module.js"; +export { LookupFieldProperties } from "./lookup_field_properties.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { SharingProperties } from "./sharing_properties.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { RelatedListProperties } from "./related_list_properties.js"; +export { Territory } from "./territory.js"; +export { APIException } from "./api_exception.js"; +export { Modules } from "./modules.js"; +export { LookupField } from "./lookup_field.js"; +export { ModuleFields } from "./module_fields.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/lookup_field.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/lookup_field.js new file mode 100644 index 0000000..a200f7c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/lookup_field.js @@ -0,0 +1,113 @@ +import {MinifiedField} from "../fields/minified_field.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class LookupField extends MinifiedField{ + + sequenceNumber; + apiName; + id; + keyModified = new Map(); + /** + * The method to get the sequenceNumber + * @returns {number} A number representing the sequenceNumber + */ + getSequenceNumber() { + return this.sequenceNumber; + + } + + /** + * The method to set the value to sequenceNumber + * @param {number} sequenceNumber A number representing the sequenceNumber + */ + setSequenceNumber(sequenceNumber) { + if((sequenceNumber != null) && (!(Object.prototype.toString.call(sequenceNumber) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sequenceNumber EXPECTED TYPE: number", null, null); + } + this.sequenceNumber = sequenceNumber; + this.keyModified.set("sequence_number", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + LookupField as MasterModel, + LookupField as LookupField +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/lookup_field_properties.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/lookup_field_properties.js new file mode 100644 index 0000000..91b8f32 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/lookup_field_properties.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class LookupFieldProperties{ + + fields; + keyModified = new Map(); + /** + * The method to get the fields + * @returns {Array} An Array representing the fields + */ + getFields() { + return this.fields; + + } + + /** + * The method to set the value to fields + * @param {Array} fields An Array representing the fields + */ + setFields(fields) { + if((fields != null) && (!(Object.prototype.toString.call(fields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: Array", null, null); + } + this.fields = fields; + this.keyModified.set("fields", 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 { + LookupFieldProperties as MasterModel, + LookupFieldProperties as LookupFieldProperties +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/minified_module.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/minified_module.js new file mode 100644 index 0000000..d353d98 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/minified_module.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MinifiedModule{ + + apiName; + id; + keyModified = new Map(); + module; + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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); + + } + + /** + * The method to get the module + * @returns {String} A String representing the module + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {String} module A String representing the module + */ + setModule(module) { + if((module != null) && (!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + +} +export { + MinifiedModule as MasterModel, + MinifiedModule as MinifiedModule +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/module_field_lookup.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/module_field_lookup.js new file mode 100644 index 0000000..f513acd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/module_field_lookup.js @@ -0,0 +1,207 @@ +import {Lookup} from "../fields/lookup.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ModuleFieldLookup extends Lookup{ + + queryDetails; + module; + displayLabel; + apiName; + id; + revalidateFilterDuringEdit; + showFields; + keyModified = new Map(); + /** + * The method to get the queryDetails + * @returns {QueryDetails} An instance of QueryDetails + */ + getQueryDetails() { + return this.queryDetails; + + } + + /** + * The method to set the value to queryDetails + * @param {QueryDetails} queryDetails An instance of QueryDetails + */ + async setQueryDetails(queryDetails) { + const QueryDetails = (await (import("../fields/query_details.js"))).MasterModel; + if((queryDetails != null) && (!(queryDetails instanceof QueryDetails))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: queryDetails EXPECTED TYPE: QueryDetails", null, null); + } + this.queryDetails = queryDetails; + this.keyModified.set("query_details", 1); + + } + + /** + * The method to get the module + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {MinifiedModule} module An instance of MinifiedModule + */ + async setModule(module) { + const MinifiedModule = (await (import("./minified_module.js"))).MasterModel; + if((module != null) && (!(module instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: MinifiedModule", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the revalidateFilterDuringEdit + * @returns {Boolean} A Boolean representing the revalidateFilterDuringEdit + */ + getRevalidateFilterDuringEdit() { + return this.revalidateFilterDuringEdit; + + } + + /** + * The method to set the value to revalidateFilterDuringEdit + * @param {Boolean} revalidateFilterDuringEdit A Boolean representing the revalidateFilterDuringEdit + */ + setRevalidateFilterDuringEdit(revalidateFilterDuringEdit) { + if((revalidateFilterDuringEdit != null) && (!(Object.prototype.toString.call(revalidateFilterDuringEdit) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: revalidateFilterDuringEdit EXPECTED TYPE: Boolean", null, null); + } + this.revalidateFilterDuringEdit = revalidateFilterDuringEdit; + this.keyModified.set("revalidate_filter_during_edit", 1); + + } + + /** + * The method to get the showFields + * @returns {Array} An Array representing the showFields + */ + getShowFields() { + return this.showFields; + + } + + /** + * The method to set the value to showFields + * @param {Array} showFields An Array representing the showFields + */ + setShowFields(showFields) { + if((showFields != null) && (!(Object.prototype.toString.call(showFields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: showFields EXPECTED TYPE: Array", null, null); + } + this.showFields = showFields; + this.keyModified.set("show_fields", 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 { + ModuleFieldLookup as MasterModel, + ModuleFieldLookup as ModuleFieldLookup +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/module_fields.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/module_fields.js new file mode 100644 index 0000000..aa096a9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/module_fields.js @@ -0,0 +1,1653 @@ +import {Fields} from "../fields/fields.js"; +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ModuleFields extends Fields{ + + blueprintSupported; + jsonType; + length; + decimalPlace; + multiModuleLookup; + sharingProperties; + currency; + fileUpoladOptionlist; + lookup; + formula; + multiselectlookup; + multiuserlookup; + autoNumber; + pickListValues; + allowedModules; + hipaaComplianceEnabled; + hipaaCompliance; + associatedModule; + operationType; + dataType; + systemMandatory; + webhook; + sequenceNumber; + defaultValue; + virtualField; + fieldReadOnly; + readOnly; + customField; + businesscardSupported; + filterable; + visible; + availableInUserLayout; + displayField; + pickListValuesSortedLexically; + sortable; + separator; + searchable; + enableColourCode; + massUpdate; + createdSource; + type; + displayLabel; + columnName; + apiName; + displayType; + uiType; + quickSequenceNumber; + emailParser; + rollupSummary; + referFromField; + createdTime; + modifiedTime; + showType; + category; + id; + profiles; + viewType; + unique; + subModule; + external; + private1; + convertMapping; + crypt; + tooltip; + historyTracking; + associationDetails; + additionalColumn; + fieldLabel; + globalPicklist; + keyModified = new Map(); + /** + * The method to get the blueprintSupported + * @returns {Boolean} A Boolean representing the blueprintSupported + */ + getBlueprintSupported() { + return this.blueprintSupported; + + } + + /** + * The method to set the value to blueprintSupported + * @param {Boolean} blueprintSupported A Boolean representing the blueprintSupported + */ + setBlueprintSupported(blueprintSupported) { + if((blueprintSupported != null) && (!(Object.prototype.toString.call(blueprintSupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: blueprintSupported EXPECTED TYPE: Boolean", null, null); + } + this.blueprintSupported = blueprintSupported; + this.keyModified.set("blueprint_supported", 1); + + } + + /** + * The method to get the jsonType + * @returns {String} A String representing the jsonType + */ + getJsonType() { + return this.jsonType; + + } + + /** + * The method to set the value to jsonType + * @param {String} jsonType A String representing the jsonType + */ + setJsonType(jsonType) { + if((jsonType != null) && (!(Object.prototype.toString.call(jsonType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jsonType EXPECTED TYPE: String", null, null); + } + this.jsonType = jsonType; + this.keyModified.set("json_type", 1); + + } + + /** + * The method to get the length + * @returns {Choice} An instance of Choice + */ + getLength() { + return this.length; + + } + + /** + * The method to set the value to length + * @param {Choice} length An instance of Choice + */ + setLength(length) { + if((length != null) && (!(length instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: length EXPECTED TYPE: Choice", null, null); + } + this.length = length; + this.keyModified.set("length", 1); + + } + + /** + * The method to get the decimalPlace + * @returns {number} A number representing the decimalPlace + */ + getDecimalPlace() { + return this.decimalPlace; + + } + + /** + * The method to set the value to decimalPlace + * @param {number} decimalPlace A number representing the decimalPlace + */ + setDecimalPlace(decimalPlace) { + if((decimalPlace != null) && (!(Object.prototype.toString.call(decimalPlace) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: decimalPlace EXPECTED TYPE: number", null, null); + } + this.decimalPlace = decimalPlace; + this.keyModified.set("decimal_place", 1); + + } + + /** + * The method to get the multiModuleLookup + * @returns {MultiModuleLookup} An instance of MultiModuleLookup + */ + getMultiModuleLookup() { + return this.multiModuleLookup; + + } + + /** + * The method to set the value to multiModuleLookup + * @param {MultiModuleLookup} multiModuleLookup An instance of MultiModuleLookup + */ + async setMultiModuleLookup(multiModuleLookup) { + const MultiModuleLookup = (await (import("../fields/multi_module_lookup.js"))).MasterModel; + if((multiModuleLookup != null) && (!(multiModuleLookup instanceof MultiModuleLookup))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: multiModuleLookup EXPECTED TYPE: MultiModuleLookup", null, null); + } + this.multiModuleLookup = multiModuleLookup; + this.keyModified.set("multi_module_lookup", 1); + + } + + /** + * The method to get the sharingProperties + * @returns {SharingProperties} An instance of SharingProperties + */ + getSharingProperties() { + return this.sharingProperties; + + } + + /** + * The method to set the value to sharingProperties + * @param {SharingProperties} sharingProperties An instance of SharingProperties + */ + async setSharingProperties(sharingProperties) { + const SharingProperties = (await (import("./sharing_properties.js"))).MasterModel; + if((sharingProperties != null) && (!(sharingProperties instanceof SharingProperties))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sharingProperties EXPECTED TYPE: SharingProperties", null, null); + } + this.sharingProperties = sharingProperties; + this.keyModified.set("sharing_properties", 1); + + } + + /** + * The method to get the currency + * @returns {Currency} An instance of Currency + */ + getCurrency() { + return this.currency; + + } + + /** + * The method to set the value to currency + * @param {Currency} currency An instance of Currency + */ + async setCurrency(currency) { + const Currency = (await (import("../fields/currency.js"))).MasterModel; + if((currency != null) && (!(currency instanceof Currency))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: currency EXPECTED TYPE: Currency", null, null); + } + this.currency = currency; + this.keyModified.set("currency", 1); + + } + + /** + * The method to get the fileUpoladOptionlist + * @returns {Array} An Array representing the fileUpoladOptionlist + */ + getFileUpoladOptionlist() { + return this.fileUpoladOptionlist; + + } + + /** + * The method to set the value to fileUpoladOptionlist + * @param {Array} fileUpoladOptionlist An Array representing the fileUpoladOptionlist + */ + setFileUpoladOptionlist(fileUpoladOptionlist) { + if((fileUpoladOptionlist != null) && (!(Object.prototype.toString.call(fileUpoladOptionlist) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileUpoladOptionlist EXPECTED TYPE: Array", null, null); + } + this.fileUpoladOptionlist = fileUpoladOptionlist; + this.keyModified.set("file_upolad_optionlist", 1); + + } + + /** + * The method to get the lookup + * @returns {ModuleFieldLookup} An instance of ModuleFieldLookup + */ + getLookup() { + return this.lookup; + + } + + /** + * The method to set the value to lookup + * @param {ModuleFieldLookup} lookup An instance of ModuleFieldLookup + */ + async setLookup(lookup) { + const ModuleFieldLookup = (await (import("./module_field_lookup.js"))).MasterModel; + if((lookup != null) && (!(lookup instanceof ModuleFieldLookup))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: lookup EXPECTED TYPE: ModuleFieldLookup", null, null); + } + this.lookup = lookup; + this.keyModified.set("lookup", 1); + + } + + /** + * The method to get the formula + * @returns {Formula} An instance of Formula + */ + getFormula() { + return this.formula; + + } + + /** + * The method to set the value to formula + * @param {Formula} formula An instance of Formula + */ + async setFormula(formula) { + const Formula = (await (import("../fields/formula.js"))).MasterModel; + if((formula != null) && (!(formula instanceof Formula))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: formula EXPECTED TYPE: Formula", null, null); + } + this.formula = formula; + this.keyModified.set("formula", 1); + + } + + /** + * The method to get the multiselectlookup + * @returns {Multiselectlookup} An instance of Multiselectlookup + */ + getMultiselectlookup() { + return this.multiselectlookup; + + } + + /** + * The method to set the value to multiselectlookup + * @param {Multiselectlookup} multiselectlookup An instance of Multiselectlookup + */ + async setMultiselectlookup(multiselectlookup) { + const Multiselectlookup = (await (import("../fields/multiselectlookup.js"))).MasterModel; + if((multiselectlookup != null) && (!(multiselectlookup instanceof Multiselectlookup))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: multiselectlookup EXPECTED TYPE: Multiselectlookup", null, null); + } + this.multiselectlookup = multiselectlookup; + this.keyModified.set("multiselectlookup", 1); + + } + + /** + * The method to get the multiuserlookup + * @returns {Multiselectlookup} An instance of Multiselectlookup + */ + getMultiuserlookup() { + return this.multiuserlookup; + + } + + /** + * The method to set the value to multiuserlookup + * @param {Multiselectlookup} multiuserlookup An instance of Multiselectlookup + */ + async setMultiuserlookup(multiuserlookup) { + const Multiselectlookup = (await (import("../fields/multiselectlookup.js"))).MasterModel; + if((multiuserlookup != null) && (!(multiuserlookup instanceof Multiselectlookup))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: multiuserlookup EXPECTED TYPE: Multiselectlookup", null, null); + } + this.multiuserlookup = multiuserlookup; + this.keyModified.set("multiuserlookup", 1); + + } + + /** + * The method to get the autoNumber + * @returns {AutoNumber} An instance of AutoNumber + */ + getAutoNumber() { + return this.autoNumber; + + } + + /** + * The method to set the value to autoNumber + * @param {AutoNumber} autoNumber An instance of AutoNumber + */ + async setAutoNumber(autoNumber) { + const AutoNumber = (await (import("../fields/auto_number.js"))).MasterModel; + if((autoNumber != null) && (!(autoNumber instanceof AutoNumber))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: autoNumber EXPECTED TYPE: AutoNumber", null, null); + } + this.autoNumber = autoNumber; + this.keyModified.set("auto_number", 1); + + } + + /** + * The method to get the pickListValues + * @returns {Array} An Array representing the pickListValues + */ + getPickListValues() { + return this.pickListValues; + + } + + /** + * The method to set the value to pickListValues + * @param {Array} pickListValues An Array representing the pickListValues + */ + setPickListValues(pickListValues) { + if((pickListValues != null) && (!(Object.prototype.toString.call(pickListValues) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pickListValues EXPECTED TYPE: Array", null, null); + } + this.pickListValues = pickListValues; + this.keyModified.set("pick_list_values", 1); + + } + + /** + * The method to get the allowedModules + * @returns {Array} An Array representing the allowedModules + */ + getAllowedModules() { + return this.allowedModules; + + } + + /** + * The method to set the value to allowedModules + * @param {Array} allowedModules An Array representing the allowedModules + */ + setAllowedModules(allowedModules) { + if((allowedModules != null) && (!(Object.prototype.toString.call(allowedModules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: allowedModules EXPECTED TYPE: Array", null, null); + } + this.allowedModules = allowedModules; + this.keyModified.set("allowed_modules", 1); + + } + + /** + * The method to get the hipaaComplianceEnabled + * @returns {Boolean} A Boolean representing the hipaaComplianceEnabled + */ + getHipaaComplianceEnabled() { + return this.hipaaComplianceEnabled; + + } + + /** + * The method to set the value to hipaaComplianceEnabled + * @param {Boolean} hipaaComplianceEnabled A Boolean representing the hipaaComplianceEnabled + */ + setHipaaComplianceEnabled(hipaaComplianceEnabled) { + if((hipaaComplianceEnabled != null) && (!(Object.prototype.toString.call(hipaaComplianceEnabled) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: hipaaComplianceEnabled EXPECTED TYPE: Boolean", null, null); + } + this.hipaaComplianceEnabled = hipaaComplianceEnabled; + this.keyModified.set("hipaa_compliance_enabled", 1); + + } + + /** + * The method to get the hipaaCompliance + * @returns {HipaaCompliance} An instance of HipaaCompliance + */ + getHipaaCompliance() { + return this.hipaaCompliance; + + } + + /** + * The method to set the value to hipaaCompliance + * @param {HipaaCompliance} hipaaCompliance An instance of HipaaCompliance + */ + async setHipaaCompliance(hipaaCompliance) { + const HipaaCompliance = (await (import("../fields/hipaa_compliance.js"))).MasterModel; + if((hipaaCompliance != null) && (!(hipaaCompliance instanceof HipaaCompliance))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: hipaaCompliance EXPECTED TYPE: HipaaCompliance", null, null); + } + this.hipaaCompliance = hipaaCompliance; + this.keyModified.set("hipaa_compliance", 1); + + } + + /** + * The method to get the associatedModule + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getAssociatedModule() { + return this.associatedModule; + + } + + /** + * The method to set the value to associatedModule + * @param {MinifiedModule} associatedModule An instance of MinifiedModule + */ + async setAssociatedModule(associatedModule) { + const MinifiedModule = (await (import("./minified_module.js"))).MasterModel; + if((associatedModule != null) && (!(associatedModule instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: associatedModule EXPECTED TYPE: MinifiedModule", null, null); + } + this.associatedModule = associatedModule; + this.keyModified.set("associated_module", 1); + + } + + /** + * The method to get the operationType + * @returns {OperationType} An instance of OperationType + */ + getOperationType() { + return this.operationType; + + } + + /** + * The method to set the value to operationType + * @param {OperationType} operationType An instance of OperationType + */ + async setOperationType(operationType) { + const OperationType = (await (import("../fields/operation_type.js"))).MasterModel; + if((operationType != null) && (!(operationType instanceof OperationType))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: operationType EXPECTED TYPE: OperationType", null, null); + } + this.operationType = operationType; + this.keyModified.set("operation_type", 1); + + } + + /** + * The method to get the dataType + * @returns {Choice} An instance of Choice + */ + getDataType() { + return this.dataType; + + } + + /** + * The method to set the value to dataType + * @param {Choice} dataType An instance of Choice + */ + setDataType(dataType) { + if((dataType != null) && (!(dataType instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dataType EXPECTED TYPE: Choice", null, null); + } + this.dataType = dataType; + this.keyModified.set("data_type", 1); + + } + + /** + * The method to get the systemMandatory + * @returns {Boolean} A Boolean representing the systemMandatory + */ + getSystemMandatory() { + return this.systemMandatory; + + } + + /** + * The method to set the value to systemMandatory + * @param {Boolean} systemMandatory A Boolean representing the systemMandatory + */ + setSystemMandatory(systemMandatory) { + if((systemMandatory != null) && (!(Object.prototype.toString.call(systemMandatory) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: systemMandatory EXPECTED TYPE: Boolean", null, null); + } + this.systemMandatory = systemMandatory; + this.keyModified.set("system_mandatory", 1); + + } + + /** + * The method to get the webhook + * @returns {Boolean} A Boolean representing the webhook + */ + getWebhook() { + return this.webhook; + + } + + /** + * The method to set the value to webhook + * @param {Boolean} webhook A Boolean representing the webhook + */ + setWebhook(webhook) { + if((webhook != null) && (!(Object.prototype.toString.call(webhook) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: webhook EXPECTED TYPE: Boolean", null, null); + } + this.webhook = webhook; + this.keyModified.set("webhook", 1); + + } + + /** + * The method to get the sequenceNumber + * @returns {number} A number representing the sequenceNumber + */ + getSequenceNumber() { + return this.sequenceNumber; + + } + + /** + * The method to set the value to sequenceNumber + * @param {number} sequenceNumber A number representing the sequenceNumber + */ + setSequenceNumber(sequenceNumber) { + if((sequenceNumber != null) && (!(Object.prototype.toString.call(sequenceNumber) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sequenceNumber EXPECTED TYPE: number", null, null); + } + this.sequenceNumber = sequenceNumber; + this.keyModified.set("sequence_number", 1); + + } + + /** + * The method to get the defaultValue + * @returns {String} A String representing the defaultValue + */ + getDefaultValue() { + return this.defaultValue; + + } + + /** + * The method to set the value to defaultValue + * @param {String} defaultValue A String representing the defaultValue + */ + setDefaultValue(defaultValue) { + if((defaultValue != null) && (!(Object.prototype.toString.call(defaultValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: defaultValue EXPECTED TYPE: String", null, null); + } + this.defaultValue = defaultValue; + this.keyModified.set("default_value", 1); + + } + + /** + * The method to get the virtualField + * @returns {Boolean} A Boolean representing the virtualField + */ + getVirtualField() { + return this.virtualField; + + } + + /** + * The method to set the value to virtualField + * @param {Boolean} virtualField A Boolean representing the virtualField + */ + setVirtualField(virtualField) { + if((virtualField != null) && (!(Object.prototype.toString.call(virtualField) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: virtualField EXPECTED TYPE: Boolean", null, null); + } + this.virtualField = virtualField; + this.keyModified.set("virtual_field", 1); + + } + + /** + * The method to get the fieldReadOnly + * @returns {Boolean} A Boolean representing the fieldReadOnly + */ + getFieldReadOnly() { + return this.fieldReadOnly; + + } + + /** + * The method to set the value to fieldReadOnly + * @param {Boolean} fieldReadOnly A Boolean representing the fieldReadOnly + */ + setFieldReadOnly(fieldReadOnly) { + if((fieldReadOnly != null) && (!(Object.prototype.toString.call(fieldReadOnly) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldReadOnly EXPECTED TYPE: Boolean", null, null); + } + this.fieldReadOnly = fieldReadOnly; + this.keyModified.set("field_read_only", 1); + + } + + /** + * The method to get the readOnly + * @returns {Boolean} A Boolean representing the readOnly + */ + getReadOnly() { + return this.readOnly; + + } + + /** + * The method to set the value to readOnly + * @param {Boolean} readOnly A Boolean representing the readOnly + */ + setReadOnly(readOnly) { + if((readOnly != null) && (!(Object.prototype.toString.call(readOnly) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: readOnly EXPECTED TYPE: Boolean", null, null); + } + this.readOnly = readOnly; + this.keyModified.set("read_only", 1); + + } + + /** + * The method to get the customField + * @returns {Boolean} A Boolean representing the customField + */ + getCustomField() { + return this.customField; + + } + + /** + * The method to set the value to customField + * @param {Boolean} customField A Boolean representing the customField + */ + setCustomField(customField) { + if((customField != null) && (!(Object.prototype.toString.call(customField) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: customField EXPECTED TYPE: Boolean", null, null); + } + this.customField = customField; + this.keyModified.set("custom_field", 1); + + } + + /** + * The method to get the businesscardSupported + * @returns {Boolean} A Boolean representing the businesscardSupported + */ + getBusinesscardSupported() { + return this.businesscardSupported; + + } + + /** + * The method to set the value to businesscardSupported + * @param {Boolean} businesscardSupported A Boolean representing the businesscardSupported + */ + setBusinesscardSupported(businesscardSupported) { + if((businesscardSupported != null) && (!(Object.prototype.toString.call(businesscardSupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: businesscardSupported EXPECTED TYPE: Boolean", null, null); + } + this.businesscardSupported = businesscardSupported; + this.keyModified.set("businesscard_supported", 1); + + } + + /** + * The method to get the filterable + * @returns {Boolean} A Boolean representing the filterable + */ + getFilterable() { + return this.filterable; + + } + + /** + * The method to set the value to filterable + * @param {Boolean} filterable A Boolean representing the filterable + */ + setFilterable(filterable) { + if((filterable != null) && (!(Object.prototype.toString.call(filterable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: filterable EXPECTED TYPE: Boolean", null, null); + } + this.filterable = filterable; + this.keyModified.set("filterable", 1); + + } + + /** + * The method to get the visible + * @returns {Boolean} A Boolean representing the visible + */ + getVisible() { + return this.visible; + + } + + /** + * The method to set the value to visible + * @param {Boolean} visible A Boolean representing the visible + */ + setVisible(visible) { + if((visible != null) && (!(Object.prototype.toString.call(visible) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: visible EXPECTED TYPE: Boolean", null, null); + } + this.visible = visible; + this.keyModified.set("visible", 1); + + } + + /** + * The method to get the availableInUserLayout + * @returns {Boolean} A Boolean representing the availableInUserLayout + */ + getAvailableInUserLayout() { + return this.availableInUserLayout; + + } + + /** + * The method to set the value to availableInUserLayout + * @param {Boolean} availableInUserLayout A Boolean representing the availableInUserLayout + */ + setAvailableInUserLayout(availableInUserLayout) { + if((availableInUserLayout != null) && (!(Object.prototype.toString.call(availableInUserLayout) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: availableInUserLayout EXPECTED TYPE: Boolean", null, null); + } + this.availableInUserLayout = availableInUserLayout; + this.keyModified.set("available_in_user_layout", 1); + + } + + /** + * The method to get the displayField + * @returns {Boolean} A Boolean representing the displayField + */ + getDisplayField() { + return this.displayField; + + } + + /** + * The method to set the value to displayField + * @param {Boolean} displayField A Boolean representing the displayField + */ + setDisplayField(displayField) { + if((displayField != null) && (!(Object.prototype.toString.call(displayField) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayField EXPECTED TYPE: Boolean", null, null); + } + this.displayField = displayField; + this.keyModified.set("display_field", 1); + + } + + /** + * The method to get the pickListValuesSortedLexically + * @returns {Boolean} A Boolean representing the pickListValuesSortedLexically + */ + getPickListValuesSortedLexically() { + return this.pickListValuesSortedLexically; + + } + + /** + * The method to set the value to pickListValuesSortedLexically + * @param {Boolean} pickListValuesSortedLexically A Boolean representing the pickListValuesSortedLexically + */ + setPickListValuesSortedLexically(pickListValuesSortedLexically) { + if((pickListValuesSortedLexically != null) && (!(Object.prototype.toString.call(pickListValuesSortedLexically) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pickListValuesSortedLexically EXPECTED TYPE: Boolean", null, null); + } + this.pickListValuesSortedLexically = pickListValuesSortedLexically; + this.keyModified.set("pick_list_values_sorted_lexically", 1); + + } + + /** + * The method to get the sortable + * @returns {Boolean} A Boolean representing the sortable + */ + getSortable() { + return this.sortable; + + } + + /** + * The method to set the value to sortable + * @param {Boolean} sortable A Boolean representing the sortable + */ + setSortable(sortable) { + if((sortable != null) && (!(Object.prototype.toString.call(sortable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortable EXPECTED TYPE: Boolean", null, null); + } + this.sortable = sortable; + this.keyModified.set("sortable", 1); + + } + + /** + * The method to get the separator + * @returns {Boolean} A Boolean representing the separator + */ + getSeparator() { + return this.separator; + + } + + /** + * The method to set the value to separator + * @param {Boolean} separator A Boolean representing the separator + */ + setSeparator(separator) { + if((separator != null) && (!(Object.prototype.toString.call(separator) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: separator EXPECTED TYPE: Boolean", null, null); + } + this.separator = separator; + this.keyModified.set("separator", 1); + + } + + /** + * The method to get the searchable + * @returns {Boolean} A Boolean representing the searchable + */ + getSearchable() { + return this.searchable; + + } + + /** + * The method to set the value to searchable + * @param {Boolean} searchable A Boolean representing the searchable + */ + setSearchable(searchable) { + if((searchable != null) && (!(Object.prototype.toString.call(searchable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: searchable EXPECTED TYPE: Boolean", null, null); + } + this.searchable = searchable; + this.keyModified.set("searchable", 1); + + } + + /** + * The method to get the enableColourCode + * @returns {Boolean} A Boolean representing the enableColourCode + */ + getEnableColourCode() { + return this.enableColourCode; + + } + + /** + * The method to set the value to enableColourCode + * @param {Boolean} enableColourCode A Boolean representing the enableColourCode + */ + setEnableColourCode(enableColourCode) { + if((enableColourCode != null) && (!(Object.prototype.toString.call(enableColourCode) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: enableColourCode EXPECTED TYPE: Boolean", null, null); + } + this.enableColourCode = enableColourCode; + this.keyModified.set("enable_colour_code", 1); + + } + + /** + * The method to get the massUpdate + * @returns {Boolean} A Boolean representing the massUpdate + */ + getMassUpdate() { + return this.massUpdate; + + } + + /** + * The method to set the value to massUpdate + * @param {Boolean} massUpdate A Boolean representing the massUpdate + */ + setMassUpdate(massUpdate) { + if((massUpdate != null) && (!(Object.prototype.toString.call(massUpdate) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: massUpdate EXPECTED TYPE: Boolean", null, null); + } + this.massUpdate = massUpdate; + this.keyModified.set("mass_update", 1); + + } + + /** + * The method to get the createdSource + * @returns {String} A String representing the createdSource + */ + getCreatedSource() { + return this.createdSource; + + } + + /** + * The method to set the value to createdSource + * @param {String} createdSource A String representing the createdSource + */ + setCreatedSource(createdSource) { + if((createdSource != null) && (!(Object.prototype.toString.call(createdSource) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdSource EXPECTED TYPE: String", null, null); + } + this.createdSource = createdSource; + this.keyModified.set("created_source", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the columnName + * @returns {String} A String representing the columnName + */ + getColumnName() { + return this.columnName; + + } + + /** + * The method to set the value to columnName + * @param {String} columnName A String representing the columnName + */ + setColumnName(columnName) { + if((columnName != null) && (!(Object.prototype.toString.call(columnName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: columnName EXPECTED TYPE: String", null, null); + } + this.columnName = columnName; + this.keyModified.set("column_name", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the displayType + * @returns {number} A number representing the displayType + */ + getDisplayType() { + return this.displayType; + + } + + /** + * The method to set the value to displayType + * @param {number} displayType A number representing the displayType + */ + setDisplayType(displayType) { + if((displayType != null) && (!(Object.prototype.toString.call(displayType) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayType EXPECTED TYPE: number", null, null); + } + this.displayType = displayType; + this.keyModified.set("display_type", 1); + + } + + /** + * The method to get the uiType + * @returns {number} A number representing the uiType + */ + getUiType() { + return this.uiType; + + } + + /** + * The method to set the value to uiType + * @param {number} uiType A number representing the uiType + */ + setUiType(uiType) { + if((uiType != null) && (!(Object.prototype.toString.call(uiType) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: uiType EXPECTED TYPE: number", null, null); + } + this.uiType = uiType; + this.keyModified.set("ui_type", 1); + + } + + /** + * The method to get the quickSequenceNumber + * @returns {String} A String representing the quickSequenceNumber + */ + getQuickSequenceNumber() { + return this.quickSequenceNumber; + + } + + /** + * The method to set the value to quickSequenceNumber + * @param {String} quickSequenceNumber A String representing the quickSequenceNumber + */ + setQuickSequenceNumber(quickSequenceNumber) { + if((quickSequenceNumber != null) && (!(Object.prototype.toString.call(quickSequenceNumber) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: quickSequenceNumber EXPECTED TYPE: String", null, null); + } + this.quickSequenceNumber = quickSequenceNumber; + this.keyModified.set("quick_sequence_number", 1); + + } + + /** + * The method to get the emailParser + * @returns {EmailParser} An instance of EmailParser + */ + getEmailParser() { + return this.emailParser; + + } + + /** + * The method to set the value to emailParser + * @param {EmailParser} emailParser An instance of EmailParser + */ + async setEmailParser(emailParser) { + const EmailParser = (await (import("../fields/email_parser.js"))).MasterModel; + if((emailParser != null) && (!(emailParser instanceof EmailParser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: emailParser EXPECTED TYPE: EmailParser", null, null); + } + this.emailParser = emailParser; + this.keyModified.set("email_parser", 1); + + } + + /** + * The method to get the rollupSummary + * @returns {RollupSummary} An instance of RollupSummary + */ + getRollupSummary() { + return this.rollupSummary; + + } + + /** + * The method to set the value to rollupSummary + * @param {RollupSummary} rollupSummary An instance of RollupSummary + */ + async setRollupSummary(rollupSummary) { + const RollupSummary = (await (import("../fields/rollup_summary.js"))).MasterModel; + if((rollupSummary != null) && (!(rollupSummary instanceof RollupSummary))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: rollupSummary EXPECTED TYPE: RollupSummary", null, null); + } + this.rollupSummary = rollupSummary; + this.keyModified.set("rollup_summary", 1); + + } + + /** + * The method to get the referFromField + * @returns {ReferFromField} An instance of ReferFromField + */ + getReferFromField() { + return this.referFromField; + + } + + /** + * The method to set the value to referFromField + * @param {ReferFromField} referFromField An instance of ReferFromField + */ + async setReferFromField(referFromField) { + const ReferFromField = (await (import("../fields/refer_from_field.js"))).MasterModel; + if((referFromField != null) && (!(referFromField instanceof ReferFromField))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: referFromField EXPECTED TYPE: ReferFromField", null, null); + } + this.referFromField = referFromField; + this.keyModified.set("refer_from_field", 1); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the showType + * @returns {number} A number representing the showType + */ + getShowType() { + return this.showType; + + } + + /** + * The method to set the value to showType + * @param {number} showType A number representing the showType + */ + setShowType(showType) { + if((showType != null) && (!(Object.prototype.toString.call(showType) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: showType EXPECTED TYPE: number", null, null); + } + this.showType = showType; + this.keyModified.set("show_type", 1); + + } + + /** + * The method to get the category + * @returns {number} A number representing the category + */ + getCategory() { + return this.category; + + } + + /** + * The method to set the value to category + * @param {number} category A number representing the category + */ + setCategory(category) { + if((category != null) && (!(Object.prototype.toString.call(category) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: category EXPECTED TYPE: number", null, null); + } + this.category = category; + this.keyModified.set("category", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the profiles + * @returns {Array} An Array representing the profiles + */ + getProfiles() { + return this.profiles; + + } + + /** + * The method to set the value to profiles + * @param {Array} profiles An Array representing the profiles + */ + setProfiles(profiles) { + if((profiles != null) && (!(Object.prototype.toString.call(profiles) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: profiles EXPECTED TYPE: Array", null, null); + } + this.profiles = profiles; + this.keyModified.set("profiles", 1); + + } + + /** + * The method to get the viewType + * @returns {ViewType} An instance of ViewType + */ + getViewType() { + return this.viewType; + + } + + /** + * The method to set the value to viewType + * @param {ViewType} viewType An instance of ViewType + */ + async setViewType(viewType) { + const ViewType = (await (import("../fields/view_type.js"))).MasterModel; + if((viewType != null) && (!(viewType instanceof ViewType))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: viewType EXPECTED TYPE: ViewType", null, null); + } + this.viewType = viewType; + this.keyModified.set("view_type", 1); + + } + + /** + * The method to get the unique + * @returns {Unique} An instance of Unique + */ + getUnique() { + return this.unique; + + } + + /** + * The method to set the value to unique + * @param {Unique} unique An instance of Unique + */ + async setUnique(unique) { + const Unique = (await (import("../fields/unique.js"))).MasterModel; + if((unique != null) && (!(unique instanceof Unique))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: unique EXPECTED TYPE: Unique", null, null); + } + this.unique = unique; + this.keyModified.set("unique", 1); + + } + + /** + * The method to get the subModule + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getSubModule() { + return this.subModule; + + } + + /** + * The method to set the value to subModule + * @param {MinifiedModule} subModule An instance of MinifiedModule + */ + async setSubModule(subModule) { + const MinifiedModule = (await (import("./minified_module.js"))).MasterModel; + if((subModule != null) && (!(subModule instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subModule EXPECTED TYPE: MinifiedModule", null, null); + } + this.subModule = subModule; + this.keyModified.set("sub_module", 1); + + } + + /** + * The method to get the external + * @returns {External} An instance of External + */ + getExternal() { + return this.external; + + } + + /** + * The method to set the value to external + * @param {External} external An instance of External + */ + async setExternal(external) { + const External = (await (import("../fields/external.js"))).MasterModel; + if((external != null) && (!(external instanceof External))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: external EXPECTED TYPE: External", null, null); + } + this.external = external; + this.keyModified.set("external", 1); + + } + + /** + * The method to get the private + * @returns {Private} An instance of Private + */ + getPrivate() { + return this.private1; + + } + + /** + * The method to set the value to private + * @param {Private} private1 An instance of Private + */ + async setPrivate(private1) { + const Private = (await (import("../fields/private.js"))).MasterModel; + if((private1 != null) && (!(private1 instanceof Private))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: private1 EXPECTED TYPE: Private", null, null); + } + this.private1 = private1; + this.keyModified.set("private", 1); + + } + + /** + * The method to get the convertMapping + * @returns {ConvertMapping} An instance of ConvertMapping + */ + getConvertMapping() { + return this.convertMapping; + + } + + /** + * The method to set the value to convertMapping + * @param {ConvertMapping} convertMapping An instance of ConvertMapping + */ + async setConvertMapping(convertMapping) { + const ConvertMapping = (await (import("../fields/convert_mapping.js"))).MasterModel; + if((convertMapping != null) && (!(convertMapping instanceof ConvertMapping))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: convertMapping EXPECTED TYPE: ConvertMapping", null, null); + } + this.convertMapping = convertMapping; + this.keyModified.set("convert_mapping", 1); + + } + + /** + * The method to get the crypt + * @returns {Crypt} An instance of Crypt + */ + getCrypt() { + return this.crypt; + + } + + /** + * The method to set the value to crypt + * @param {Crypt} crypt An instance of Crypt + */ + async setCrypt(crypt) { + const Crypt = (await (import("../fields/crypt.js"))).MasterModel; + if((crypt != null) && (!(crypt instanceof Crypt))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: crypt EXPECTED TYPE: Crypt", null, null); + } + this.crypt = crypt; + this.keyModified.set("crypt", 1); + + } + + /** + * The method to get the tooltip + * @returns {Tooltip} An instance of Tooltip + */ + getTooltip() { + return this.tooltip; + + } + + /** + * The method to set the value to tooltip + * @param {Tooltip} tooltip An instance of Tooltip + */ + async setTooltip(tooltip) { + const Tooltip = (await (import("../fields/tooltip.js"))).MasterModel; + if((tooltip != null) && (!(tooltip instanceof Tooltip))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tooltip EXPECTED TYPE: Tooltip", null, null); + } + this.tooltip = tooltip; + this.keyModified.set("tooltip", 1); + + } + + /** + * The method to get the historyTracking + * @returns {HistoryTracking} An instance of HistoryTracking + */ + getHistoryTracking() { + return this.historyTracking; + + } + + /** + * The method to set the value to historyTracking + * @param {HistoryTracking} historyTracking An instance of HistoryTracking + */ + async setHistoryTracking(historyTracking) { + const HistoryTracking = (await (import("../fields/history_tracking.js"))).MasterModel; + if((historyTracking != null) && (!(historyTracking instanceof HistoryTracking))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: historyTracking EXPECTED TYPE: HistoryTracking", null, null); + } + this.historyTracking = historyTracking; + this.keyModified.set("history_tracking", 1); + + } + + /** + * The method to get the associationDetails + * @returns {AssociationDetails} An instance of AssociationDetails + */ + getAssociationDetails() { + return this.associationDetails; + + } + + /** + * The method to set the value to associationDetails + * @param {AssociationDetails} associationDetails An instance of AssociationDetails + */ + async setAssociationDetails(associationDetails) { + const AssociationDetails = (await (import("../fields/association_details.js"))).MasterModel; + if((associationDetails != null) && (!(associationDetails instanceof AssociationDetails))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: associationDetails EXPECTED TYPE: AssociationDetails", null, null); + } + this.associationDetails = associationDetails; + this.keyModified.set("association_details", 1); + + } + + /** + * The method to get the additionalColumn + * @returns {String} A String representing the additionalColumn + */ + getAdditionalColumn() { + return this.additionalColumn; + + } + + /** + * The method to set the value to additionalColumn + * @param {String} additionalColumn A String representing the additionalColumn + */ + setAdditionalColumn(additionalColumn) { + if((additionalColumn != null) && (!(Object.prototype.toString.call(additionalColumn) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: additionalColumn EXPECTED TYPE: String", null, null); + } + this.additionalColumn = additionalColumn; + this.keyModified.set("additional_column", 1); + + } + + /** + * The method to get the fieldLabel + * @returns {String} A String representing the fieldLabel + */ + getFieldLabel() { + return this.fieldLabel; + + } + + /** + * The method to set the value to fieldLabel + * @param {String} fieldLabel A String representing the fieldLabel + */ + setFieldLabel(fieldLabel) { + if((fieldLabel != null) && (!(Object.prototype.toString.call(fieldLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldLabel EXPECTED TYPE: String", null, null); + } + this.fieldLabel = fieldLabel; + this.keyModified.set("field_label", 1); + + } + + /** + * The method to get the globalPicklist + * @returns {Object} An Object representing the globalPicklist + */ + getGlobalPicklist() { + return this.globalPicklist; + + } + + /** + * The method to set the value to globalPicklist + * @param {Object} globalPicklist An Object representing the globalPicklist + */ + setGlobalPicklist(globalPicklist) { + this.globalPicklist = globalPicklist; + this.keyModified.set("global_picklist", 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 { + ModuleFields as MasterModel, + ModuleFields as ModuleFields +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/modules.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/modules.js new file mode 100644 index 0000000..d2e865a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/modules.js @@ -0,0 +1,1430 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Modules{ + + subMenuAvailable; + globalSearchSupported; + deletable; + description; + creatable; + inventoryTemplateSupported; + modifiedTime; + pluralLabel; + presenceSubMenu; + triggersSupported; + id; + isblueprintsupported; + visibility; + visible; + convertable; + editable; + emailtemplateSupport; + emailParserSupported; + filterSupported; + showAsTab; + webLink; + sequenceNumber; + singularLabel; + viewable; + apiSupported; + apiName; + quickCreate; + generatedType; + feedsRequired; + scoringSupported; + webformSupported; + territory; + arguments1; + moduleName; + businessCardFieldLimit; + trackCurrentData; + modifiedBy; + profiles; + parentModule; + activityBadge; + fieldStates; + businessCardFields; + perPage; + properties; + onDemandProperties; + searchLayoutFields; + kanbanViewSupported; + lookupFieldProperties; + kanbanView; + relatedLists; + filterStatus; + relatedListProperties; + displayField; + layouts; + fields; + customView; + ziaView; + defaultMappingFields; + status; + arguments32; + keyModified = new Map(); + /** + * The method to get the subMenuAvailable + * @returns {Boolean} A Boolean representing the subMenuAvailable + */ + getSubMenuAvailable() { + return this.subMenuAvailable; + + } + + /** + * The method to set the value to subMenuAvailable + * @param {Boolean} subMenuAvailable A Boolean representing the subMenuAvailable + */ + setSubMenuAvailable(subMenuAvailable) { + if((subMenuAvailable != null) && (!(Object.prototype.toString.call(subMenuAvailable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subMenuAvailable EXPECTED TYPE: Boolean", null, null); + } + this.subMenuAvailable = subMenuAvailable; + this.keyModified.set("sub_menu_available", 1); + + } + + /** + * The method to get the globalSearchSupported + * @returns {Boolean} A Boolean representing the globalSearchSupported + */ + getGlobalSearchSupported() { + return this.globalSearchSupported; + + } + + /** + * The method to set the value to globalSearchSupported + * @param {Boolean} globalSearchSupported A Boolean representing the globalSearchSupported + */ + setGlobalSearchSupported(globalSearchSupported) { + if((globalSearchSupported != null) && (!(Object.prototype.toString.call(globalSearchSupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: globalSearchSupported EXPECTED TYPE: Boolean", null, null); + } + this.globalSearchSupported = globalSearchSupported; + this.keyModified.set("global_search_supported", 1); + + } + + /** + * The method to get the deletable + * @returns {Boolean} A Boolean representing the deletable + */ + getDeletable() { + return this.deletable; + + } + + /** + * The method to set the value to deletable + * @param {Boolean} deletable A Boolean representing the deletable + */ + setDeletable(deletable) { + if((deletable != null) && (!(Object.prototype.toString.call(deletable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deletable EXPECTED TYPE: Boolean", null, null); + } + this.deletable = deletable; + this.keyModified.set("deletable", 1); + + } + + /** + * The method to get the description + * @returns {String} A String representing the description + */ + getDescription() { + return this.description; + + } + + /** + * The method to set the value to description + * @param {String} description A String representing the description + */ + setDescription(description) { + if((description != null) && (!(Object.prototype.toString.call(description) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: description EXPECTED TYPE: String", null, null); + } + this.description = description; + this.keyModified.set("description", 1); + + } + + /** + * The method to get the creatable + * @returns {Boolean} A Boolean representing the creatable + */ + getCreatable() { + return this.creatable; + + } + + /** + * The method to set the value to creatable + * @param {Boolean} creatable A Boolean representing the creatable + */ + setCreatable(creatable) { + if((creatable != null) && (!(Object.prototype.toString.call(creatable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: creatable EXPECTED TYPE: Boolean", null, null); + } + this.creatable = creatable; + this.keyModified.set("creatable", 1); + + } + + /** + * The method to get the inventoryTemplateSupported + * @returns {Boolean} A Boolean representing the inventoryTemplateSupported + */ + getInventoryTemplateSupported() { + return this.inventoryTemplateSupported; + + } + + /** + * The method to set the value to inventoryTemplateSupported + * @param {Boolean} inventoryTemplateSupported A Boolean representing the inventoryTemplateSupported + */ + setInventoryTemplateSupported(inventoryTemplateSupported) { + if((inventoryTemplateSupported != null) && (!(Object.prototype.toString.call(inventoryTemplateSupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: inventoryTemplateSupported EXPECTED TYPE: Boolean", null, null); + } + this.inventoryTemplateSupported = inventoryTemplateSupported; + this.keyModified.set("inventory_template_supported", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the pluralLabel + * @returns {String} A String representing the pluralLabel + */ + getPluralLabel() { + return this.pluralLabel; + + } + + /** + * The method to set the value to pluralLabel + * @param {String} pluralLabel A String representing the pluralLabel + */ + setPluralLabel(pluralLabel) { + if((pluralLabel != null) && (!(Object.prototype.toString.call(pluralLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pluralLabel EXPECTED TYPE: String", null, null); + } + this.pluralLabel = pluralLabel; + this.keyModified.set("plural_label", 1); + + } + + /** + * The method to get the presenceSubMenu + * @returns {Boolean} A Boolean representing the presenceSubMenu + */ + getPresenceSubMenu() { + return this.presenceSubMenu; + + } + + /** + * The method to set the value to presenceSubMenu + * @param {Boolean} presenceSubMenu A Boolean representing the presenceSubMenu + */ + setPresenceSubMenu(presenceSubMenu) { + if((presenceSubMenu != null) && (!(Object.prototype.toString.call(presenceSubMenu) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: presenceSubMenu EXPECTED TYPE: Boolean", null, null); + } + this.presenceSubMenu = presenceSubMenu; + this.keyModified.set("presence_sub_menu", 1); + + } + + /** + * The method to get the triggersSupported + * @returns {Boolean} A Boolean representing the triggersSupported + */ + getTriggersSupported() { + return this.triggersSupported; + + } + + /** + * The method to set the value to triggersSupported + * @param {Boolean} triggersSupported A Boolean representing the triggersSupported + */ + setTriggersSupported(triggersSupported) { + if((triggersSupported != null) && (!(Object.prototype.toString.call(triggersSupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: triggersSupported EXPECTED TYPE: Boolean", null, null); + } + this.triggersSupported = triggersSupported; + this.keyModified.set("triggers_supported", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the isblueprintsupported + * @returns {Boolean} A Boolean representing the isblueprintsupported + */ + getIsblueprintsupported() { + return this.isblueprintsupported; + + } + + /** + * The method to set the value to isblueprintsupported + * @param {Boolean} isblueprintsupported A Boolean representing the isblueprintsupported + */ + setIsblueprintsupported(isblueprintsupported) { + if((isblueprintsupported != null) && (!(Object.prototype.toString.call(isblueprintsupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: isblueprintsupported EXPECTED TYPE: Boolean", null, null); + } + this.isblueprintsupported = isblueprintsupported; + this.keyModified.set("isBlueprintSupported", 1); + + } + + /** + * The method to get the visibility + * @returns {number} A number representing the visibility + */ + getVisibility() { + return this.visibility; + + } + + /** + * The method to set the value to visibility + * @param {number} visibility A number representing the visibility + */ + setVisibility(visibility) { + if((visibility != null) && (!(Object.prototype.toString.call(visibility) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: visibility EXPECTED TYPE: number", null, null); + } + this.visibility = visibility; + this.keyModified.set("visibility", 1); + + } + + /** + * The method to get the visible + * @returns {Boolean} A Boolean representing the visible + */ + getVisible() { + return this.visible; + + } + + /** + * The method to set the value to visible + * @param {Boolean} visible A Boolean representing the visible + */ + setVisible(visible) { + if((visible != null) && (!(Object.prototype.toString.call(visible) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: visible EXPECTED TYPE: Boolean", null, null); + } + this.visible = visible; + this.keyModified.set("visible", 1); + + } + + /** + * The method to get the convertable + * @returns {Boolean} A Boolean representing the convertable + */ + getConvertable() { + return this.convertable; + + } + + /** + * The method to set the value to convertable + * @param {Boolean} convertable A Boolean representing the convertable + */ + setConvertable(convertable) { + if((convertable != null) && (!(Object.prototype.toString.call(convertable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: convertable EXPECTED TYPE: Boolean", null, null); + } + this.convertable = convertable; + this.keyModified.set("convertable", 1); + + } + + /** + * The method to get the editable + * @returns {Boolean} A Boolean representing the editable + */ + getEditable() { + return this.editable; + + } + + /** + * The method to set the value to editable + * @param {Boolean} editable A Boolean representing the editable + */ + setEditable(editable) { + if((editable != null) && (!(Object.prototype.toString.call(editable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: editable EXPECTED TYPE: Boolean", null, null); + } + this.editable = editable; + this.keyModified.set("editable", 1); + + } + + /** + * The method to get the emailtemplateSupport + * @returns {Boolean} A Boolean representing the emailtemplateSupport + */ + getEmailtemplateSupport() { + return this.emailtemplateSupport; + + } + + /** + * The method to set the value to emailtemplateSupport + * @param {Boolean} emailtemplateSupport A Boolean representing the emailtemplateSupport + */ + setEmailtemplateSupport(emailtemplateSupport) { + if((emailtemplateSupport != null) && (!(Object.prototype.toString.call(emailtemplateSupport) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: emailtemplateSupport EXPECTED TYPE: Boolean", null, null); + } + this.emailtemplateSupport = emailtemplateSupport; + this.keyModified.set("emailTemplate_support", 1); + + } + + /** + * The method to get the emailParserSupported + * @returns {Boolean} A Boolean representing the emailParserSupported + */ + getEmailParserSupported() { + return this.emailParserSupported; + + } + + /** + * The method to set the value to emailParserSupported + * @param {Boolean} emailParserSupported A Boolean representing the emailParserSupported + */ + setEmailParserSupported(emailParserSupported) { + if((emailParserSupported != null) && (!(Object.prototype.toString.call(emailParserSupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: emailParserSupported EXPECTED TYPE: Boolean", null, null); + } + this.emailParserSupported = emailParserSupported; + this.keyModified.set("email_parser_supported", 1); + + } + + /** + * The method to get the filterSupported + * @returns {Boolean} A Boolean representing the filterSupported + */ + getFilterSupported() { + return this.filterSupported; + + } + + /** + * The method to set the value to filterSupported + * @param {Boolean} filterSupported A Boolean representing the filterSupported + */ + setFilterSupported(filterSupported) { + if((filterSupported != null) && (!(Object.prototype.toString.call(filterSupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: filterSupported EXPECTED TYPE: Boolean", null, null); + } + this.filterSupported = filterSupported; + this.keyModified.set("filter_supported", 1); + + } + + /** + * The method to get the showAsTab + * @returns {Boolean} A Boolean representing the showAsTab + */ + getShowAsTab() { + return this.showAsTab; + + } + + /** + * The method to set the value to showAsTab + * @param {Boolean} showAsTab A Boolean representing the showAsTab + */ + setShowAsTab(showAsTab) { + if((showAsTab != null) && (!(Object.prototype.toString.call(showAsTab) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: showAsTab EXPECTED TYPE: Boolean", null, null); + } + this.showAsTab = showAsTab; + this.keyModified.set("show_as_tab", 1); + + } + + /** + * The method to get the webLink + * @returns {String} A String representing the webLink + */ + getWebLink() { + return this.webLink; + + } + + /** + * The method to set the value to webLink + * @param {String} webLink A String representing the webLink + */ + setWebLink(webLink) { + if((webLink != null) && (!(Object.prototype.toString.call(webLink) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: webLink EXPECTED TYPE: String", null, null); + } + this.webLink = webLink; + this.keyModified.set("web_link", 1); + + } + + /** + * The method to get the sequenceNumber + * @returns {number} A number representing the sequenceNumber + */ + getSequenceNumber() { + return this.sequenceNumber; + + } + + /** + * The method to set the value to sequenceNumber + * @param {number} sequenceNumber A number representing the sequenceNumber + */ + setSequenceNumber(sequenceNumber) { + if((sequenceNumber != null) && (!(Object.prototype.toString.call(sequenceNumber) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sequenceNumber EXPECTED TYPE: number", null, null); + } + this.sequenceNumber = sequenceNumber; + this.keyModified.set("sequence_number", 1); + + } + + /** + * The method to get the singularLabel + * @returns {String} A String representing the singularLabel + */ + getSingularLabel() { + return this.singularLabel; + + } + + /** + * The method to set the value to singularLabel + * @param {String} singularLabel A String representing the singularLabel + */ + setSingularLabel(singularLabel) { + if((singularLabel != null) && (!(Object.prototype.toString.call(singularLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: singularLabel EXPECTED TYPE: String", null, null); + } + this.singularLabel = singularLabel; + this.keyModified.set("singular_label", 1); + + } + + /** + * The method to get the viewable + * @returns {Boolean} A Boolean representing the viewable + */ + getViewable() { + return this.viewable; + + } + + /** + * The method to set the value to viewable + * @param {Boolean} viewable A Boolean representing the viewable + */ + setViewable(viewable) { + if((viewable != null) && (!(Object.prototype.toString.call(viewable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: viewable EXPECTED TYPE: Boolean", null, null); + } + this.viewable = viewable; + this.keyModified.set("viewable", 1); + + } + + /** + * The method to get the apiSupported + * @returns {Boolean} A Boolean representing the apiSupported + */ + getAPISupported() { + return this.apiSupported; + + } + + /** + * The method to set the value to apiSupported + * @param {Boolean} apiSupported A Boolean representing the apiSupported + */ + setAPISupported(apiSupported) { + if((apiSupported != null) && (!(Object.prototype.toString.call(apiSupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiSupported EXPECTED TYPE: Boolean", null, null); + } + this.apiSupported = apiSupported; + this.keyModified.set("api_supported", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the quickCreate + * @returns {Boolean} A Boolean representing the quickCreate + */ + getQuickCreate() { + return this.quickCreate; + + } + + /** + * The method to set the value to quickCreate + * @param {Boolean} quickCreate A Boolean representing the quickCreate + */ + setQuickCreate(quickCreate) { + if((quickCreate != null) && (!(Object.prototype.toString.call(quickCreate) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: quickCreate EXPECTED TYPE: Boolean", null, null); + } + this.quickCreate = quickCreate; + this.keyModified.set("quick_create", 1); + + } + + /** + * The method to get the generatedType + * @returns {Choice} An instance of Choice + */ + getGeneratedType() { + return this.generatedType; + + } + + /** + * The method to set the value to generatedType + * @param {Choice} generatedType An instance of Choice + */ + setGeneratedType(generatedType) { + if((generatedType != null) && (!(generatedType instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: generatedType EXPECTED TYPE: Choice", null, null); + } + this.generatedType = generatedType; + this.keyModified.set("generated_type", 1); + + } + + /** + * The method to get the feedsRequired + * @returns {Boolean} A Boolean representing the feedsRequired + */ + getFeedsRequired() { + return this.feedsRequired; + + } + + /** + * The method to set the value to feedsRequired + * @param {Boolean} feedsRequired A Boolean representing the feedsRequired + */ + setFeedsRequired(feedsRequired) { + if((feedsRequired != null) && (!(Object.prototype.toString.call(feedsRequired) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: feedsRequired EXPECTED TYPE: Boolean", null, null); + } + this.feedsRequired = feedsRequired; + this.keyModified.set("feeds_required", 1); + + } + + /** + * The method to get the scoringSupported + * @returns {Boolean} A Boolean representing the scoringSupported + */ + getScoringSupported() { + return this.scoringSupported; + + } + + /** + * The method to set the value to scoringSupported + * @param {Boolean} scoringSupported A Boolean representing the scoringSupported + */ + setScoringSupported(scoringSupported) { + if((scoringSupported != null) && (!(Object.prototype.toString.call(scoringSupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: scoringSupported EXPECTED TYPE: Boolean", null, null); + } + this.scoringSupported = scoringSupported; + this.keyModified.set("scoring_supported", 1); + + } + + /** + * The method to get the webformSupported + * @returns {Boolean} A Boolean representing the webformSupported + */ + getWebformSupported() { + return this.webformSupported; + + } + + /** + * The method to set the value to webformSupported + * @param {Boolean} webformSupported A Boolean representing the webformSupported + */ + setWebformSupported(webformSupported) { + if((webformSupported != null) && (!(Object.prototype.toString.call(webformSupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: webformSupported EXPECTED TYPE: Boolean", null, null); + } + this.webformSupported = webformSupported; + this.keyModified.set("webform_supported", 1); + + } + + /** + * The method to get the territory + * @returns {Territory} An instance of Territory + */ + getTerritory() { + return this.territory; + + } + + /** + * The method to set the value to territory + * @param {Territory} territory An instance of Territory + */ + async setTerritory(territory) { + const Territory = (await (import("./territory.js"))).MasterModel; + if((territory != null) && (!(territory instanceof Territory))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territory EXPECTED TYPE: Territory", null, null); + } + this.territory = territory; + this.keyModified.set("territory", 1); + + } + + /** + * The method to get the arguments + * @returns {Array} An Array representing the arguments1 + */ + getArguments() { + return this.arguments1; + + } + + /** + * The method to set the value to arguments + * @param {Array} arguments1 An Array representing the arguments1 + */ + setArguments(arguments1) { + if((arguments1 != null) && (!(Object.prototype.toString.call(arguments1) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: arguments1 EXPECTED TYPE: Array", null, null); + } + this.arguments1 = arguments1; + this.keyModified.set("arguments", 1); + + } + + /** + * The method to get the moduleName + * @returns {String} A String representing the moduleName + */ + getModuleName() { + return this.moduleName; + + } + + /** + * The method to set the value to moduleName + * @param {String} moduleName A String representing the moduleName + */ + setModuleName(moduleName) { + if((moduleName != null) && (!(Object.prototype.toString.call(moduleName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleName EXPECTED TYPE: String", null, null); + } + this.moduleName = moduleName; + this.keyModified.set("module_name", 1); + + } + + /** + * The method to get the businessCardFieldLimit + * @returns {number} A number representing the businessCardFieldLimit + */ + getBusinessCardFieldLimit() { + return this.businessCardFieldLimit; + + } + + /** + * The method to set the value to businessCardFieldLimit + * @param {number} businessCardFieldLimit A number representing the businessCardFieldLimit + */ + setBusinessCardFieldLimit(businessCardFieldLimit) { + if((businessCardFieldLimit != null) && (!(Object.prototype.toString.call(businessCardFieldLimit) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: businessCardFieldLimit EXPECTED TYPE: number", null, null); + } + this.businessCardFieldLimit = businessCardFieldLimit; + this.keyModified.set("business_card_field_limit", 1); + + } + + /** + * The method to get the trackCurrentData + * @returns {Boolean} A Boolean representing the trackCurrentData + */ + getTrackCurrentData() { + return this.trackCurrentData; + + } + + /** + * The method to set the value to trackCurrentData + * @param {Boolean} trackCurrentData A Boolean representing the trackCurrentData + */ + setTrackCurrentData(trackCurrentData) { + if((trackCurrentData != null) && (!(Object.prototype.toString.call(trackCurrentData) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: trackCurrentData EXPECTED TYPE: Boolean", null, null); + } + this.trackCurrentData = trackCurrentData; + this.keyModified.set("track_current_data", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("modified_by", 1); + + } + + /** + * The method to get the profiles + * @returns {Array} An Array representing the profiles + */ + getProfiles() { + return this.profiles; + + } + + /** + * The method to set the value to profiles + * @param {Array} profiles An Array representing the profiles + */ + setProfiles(profiles) { + if((profiles != null) && (!(Object.prototype.toString.call(profiles) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: profiles EXPECTED TYPE: Array", null, null); + } + this.profiles = profiles; + this.keyModified.set("profiles", 1); + + } + + /** + * The method to get the parentModule + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getParentModule() { + return this.parentModule; + + } + + /** + * The method to set the value to parentModule + * @param {MinifiedModule} parentModule An instance of MinifiedModule + */ + async setParentModule(parentModule) { + const MinifiedModule = (await (import("./minified_module.js"))).MasterModel; + if((parentModule != null) && (!(parentModule instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: parentModule EXPECTED TYPE: MinifiedModule", null, null); + } + this.parentModule = parentModule; + this.keyModified.set("parent_module", 1); + + } + + /** + * The method to get the activityBadge + * @returns {Choice} An instance of Choice + */ + getActivityBadge() { + return this.activityBadge; + + } + + /** + * The method to set the value to activityBadge + * @param {Choice} activityBadge An instance of Choice + */ + setActivityBadge(activityBadge) { + if((activityBadge != null) && (!(activityBadge instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: activityBadge EXPECTED TYPE: Choice", null, null); + } + this.activityBadge = activityBadge; + this.keyModified.set("activity_badge", 1); + + } + + /** + * The method to get the fieldStates + * @returns {Array} An Array representing the fieldStates + */ + getFieldStates() { + return this.fieldStates; + + } + + /** + * The method to set the value to fieldStates + * @param {Array} fieldStates An Array representing the fieldStates + */ + setFieldStates(fieldStates) { + if((fieldStates != null) && (!(Object.prototype.toString.call(fieldStates) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldStates EXPECTED TYPE: Array", null, null); + } + this.fieldStates = fieldStates; + this.keyModified.set("$field_states", 1); + + } + + /** + * The method to get the businessCardFields + * @returns {Array} An Array representing the businessCardFields + */ + getBusinessCardFields() { + return this.businessCardFields; + + } + + /** + * The method to set the value to businessCardFields + * @param {Array} businessCardFields An Array representing the businessCardFields + */ + setBusinessCardFields(businessCardFields) { + if((businessCardFields != null) && (!(Object.prototype.toString.call(businessCardFields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: businessCardFields EXPECTED TYPE: Array", null, null); + } + this.businessCardFields = businessCardFields; + this.keyModified.set("business_card_fields", 1); + + } + + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the properties + * @returns {Array} An Array representing the properties + */ + getProperties() { + return this.properties; + + } + + /** + * The method to set the value to properties + * @param {Array} properties An Array representing the properties + */ + setProperties(properties) { + if((properties != null) && (!(Object.prototype.toString.call(properties) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: properties EXPECTED TYPE: Array", null, null); + } + this.properties = properties; + this.keyModified.set("$properties", 1); + + } + + /** + * The method to get the onDemandProperties + * @returns {Array} An Array representing the onDemandProperties + */ + getOnDemandProperties() { + return this.onDemandProperties; + + } + + /** + * The method to set the value to onDemandProperties + * @param {Array} onDemandProperties An Array representing the onDemandProperties + */ + setOnDemandProperties(onDemandProperties) { + if((onDemandProperties != null) && (!(Object.prototype.toString.call(onDemandProperties) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: onDemandProperties EXPECTED TYPE: Array", null, null); + } + this.onDemandProperties = onDemandProperties; + this.keyModified.set("$on_demand_properties", 1); + + } + + /** + * The method to get the searchLayoutFields + * @returns {Array} An Array representing the searchLayoutFields + */ + getSearchLayoutFields() { + return this.searchLayoutFields; + + } + + /** + * The method to set the value to searchLayoutFields + * @param {Array} searchLayoutFields An Array representing the searchLayoutFields + */ + setSearchLayoutFields(searchLayoutFields) { + if((searchLayoutFields != null) && (!(Object.prototype.toString.call(searchLayoutFields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: searchLayoutFields EXPECTED TYPE: Array", null, null); + } + this.searchLayoutFields = searchLayoutFields; + this.keyModified.set("search_layout_fields", 1); + + } + + /** + * The method to get the kanbanViewSupported + * @returns {Boolean} A Boolean representing the kanbanViewSupported + */ + getKanbanViewSupported() { + return this.kanbanViewSupported; + + } + + /** + * The method to set the value to kanbanViewSupported + * @param {Boolean} kanbanViewSupported A Boolean representing the kanbanViewSupported + */ + setKanbanViewSupported(kanbanViewSupported) { + if((kanbanViewSupported != null) && (!(Object.prototype.toString.call(kanbanViewSupported) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: kanbanViewSupported EXPECTED TYPE: Boolean", null, null); + } + this.kanbanViewSupported = kanbanViewSupported; + this.keyModified.set("kanban_view_supported", 1); + + } + + /** + * The method to get the lookupFieldProperties + * @returns {LookupFieldProperties} An instance of LookupFieldProperties + */ + getLookupFieldProperties() { + return this.lookupFieldProperties; + + } + + /** + * The method to set the value to lookupFieldProperties + * @param {LookupFieldProperties} lookupFieldProperties An instance of LookupFieldProperties + */ + async setLookupFieldProperties(lookupFieldProperties) { + const LookupFieldProperties = (await (import("./lookup_field_properties.js"))).MasterModel; + if((lookupFieldProperties != null) && (!(lookupFieldProperties instanceof LookupFieldProperties))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: lookupFieldProperties EXPECTED TYPE: LookupFieldProperties", null, null); + } + this.lookupFieldProperties = lookupFieldProperties; + this.keyModified.set("lookup_field_properties", 1); + + } + + /** + * The method to get the kanbanView + * @returns {Boolean} A Boolean representing the kanbanView + */ + getKanbanView() { + return this.kanbanView; + + } + + /** + * The method to set the value to kanbanView + * @param {Boolean} kanbanView A Boolean representing the kanbanView + */ + setKanbanView(kanbanView) { + if((kanbanView != null) && (!(Object.prototype.toString.call(kanbanView) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: kanbanView EXPECTED TYPE: Boolean", null, null); + } + this.kanbanView = kanbanView; + this.keyModified.set("kanban_view", 1); + + } + + /** + * The method to get the relatedLists + * @returns {Array} An Array representing the relatedLists + */ + getRelatedLists() { + return this.relatedLists; + + } + + /** + * The method to set the value to relatedLists + * @param {Array} relatedLists An Array representing the relatedLists + */ + setRelatedLists(relatedLists) { + if((relatedLists != null) && (!(Object.prototype.toString.call(relatedLists) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: relatedLists EXPECTED TYPE: Array", null, null); + } + this.relatedLists = relatedLists; + this.keyModified.set("related_lists", 1); + + } + + /** + * The method to get the filterStatus + * @returns {Boolean} A Boolean representing the filterStatus + */ + getFilterStatus() { + return this.filterStatus; + + } + + /** + * The method to set the value to filterStatus + * @param {Boolean} filterStatus A Boolean representing the filterStatus + */ + setFilterStatus(filterStatus) { + if((filterStatus != null) && (!(Object.prototype.toString.call(filterStatus) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: filterStatus EXPECTED TYPE: Boolean", null, null); + } + this.filterStatus = filterStatus; + this.keyModified.set("filter_status", 1); + + } + + /** + * The method to get the relatedListProperties + * @returns {RelatedListProperties} An instance of RelatedListProperties + */ + getRelatedListProperties() { + return this.relatedListProperties; + + } + + /** + * The method to set the value to relatedListProperties + * @param {RelatedListProperties} relatedListProperties An instance of RelatedListProperties + */ + async setRelatedListProperties(relatedListProperties) { + const RelatedListProperties = (await (import("./related_list_properties.js"))).MasterModel; + if((relatedListProperties != null) && (!(relatedListProperties instanceof RelatedListProperties))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: relatedListProperties EXPECTED TYPE: RelatedListProperties", null, null); + } + this.relatedListProperties = relatedListProperties; + this.keyModified.set("related_list_properties", 1); + + } + + /** + * The method to get the displayField + * @returns {String} A String representing the displayField + */ + getDisplayField() { + return this.displayField; + + } + + /** + * The method to set the value to displayField + * @param {String} displayField A String representing the displayField + */ + setDisplayField(displayField) { + if((displayField != null) && (!(Object.prototype.toString.call(displayField) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayField EXPECTED TYPE: String", null, null); + } + this.displayField = displayField; + this.keyModified.set("display_field", 1); + + } + + /** + * The method to get the layouts + * @returns {Array} An Array representing the layouts + */ + getLayouts() { + return this.layouts; + + } + + /** + * The method to set the value to layouts + * @param {Array} layouts An Array representing the layouts + */ + setLayouts(layouts) { + if((layouts != null) && (!(Object.prototype.toString.call(layouts) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: layouts EXPECTED TYPE: Array", null, null); + } + this.layouts = layouts; + this.keyModified.set("layouts", 1); + + } + + /** + * The method to get the fields + * @returns {Array} An Array representing the fields + */ + getFields() { + return this.fields; + + } + + /** + * The method to set the value to fields + * @param {Array} fields An Array representing the fields + */ + setFields(fields) { + if((fields != null) && (!(Object.prototype.toString.call(fields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: Array", null, null); + } + this.fields = fields; + this.keyModified.set("fields", 1); + + } + + /** + * The method to get the customView + * @returns {CustomView} An instance of CustomView + */ + getCustomView() { + return this.customView; + + } + + /** + * The method to set the value to customView + * @param {CustomView} customView An instance of CustomView + */ + async setCustomView(customView) { + const CustomView = (await (import("../custom_views/custom_view.js"))).MasterModel; + if((customView != null) && (!(customView instanceof CustomView))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: customView EXPECTED TYPE: CustomView", null, null); + } + this.customView = customView; + this.keyModified.set("custom_view", 1); + + } + + /** + * The method to get the ziaView + * @returns {Boolean} A Boolean representing the ziaView + */ + getZiaView() { + return this.ziaView; + + } + + /** + * The method to set the value to ziaView + * @param {Boolean} ziaView A Boolean representing the ziaView + */ + setZiaView(ziaView) { + if((ziaView != null) && (!(Object.prototype.toString.call(ziaView) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ziaView EXPECTED TYPE: Boolean", null, null); + } + this.ziaView = ziaView; + this.keyModified.set("zia_view", 1); + + } + + /** + * The method to get the defaultMappingFields + * @returns {Array} An Array representing the defaultMappingFields + */ + getDefaultMappingFields() { + return this.defaultMappingFields; + + } + + /** + * The method to set the value to defaultMappingFields + * @param {Array} defaultMappingFields An Array representing the defaultMappingFields + */ + setDefaultMappingFields(defaultMappingFields) { + if((defaultMappingFields != null) && (!(Object.prototype.toString.call(defaultMappingFields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: defaultMappingFields EXPECTED TYPE: Array", null, null); + } + this.defaultMappingFields = defaultMappingFields; + this.keyModified.set("default_mapping_fields", 1); + + } + + /** + * The method to get the status + * @returns {String} A String representing the status + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {String} status A String representing the status + */ + setStatus(status) { + if((status != null) && (!(Object.prototype.toString.call(status) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: String", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the arguments32 + * @returns {Array} An Array representing the arguments32 + */ + getArguments32() { + return this.arguments32; + + } + + /** + * The method to set the value to arguments32 + * @param {Array} arguments32 An Array representing the arguments32 + */ + setArguments32(arguments32) { + if((arguments32 != null) && (!(Object.prototype.toString.call(arguments32) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: arguments32 EXPECTED TYPE: Array", null, null); + } + this.arguments32 = arguments32; + this.keyModified.set("arguments", 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 { + Modules as MasterModel, + Modules as Modules +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/modules_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/modules_operations.js new file mode 100644 index 0000000..f455fc2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/modules_operations.js @@ -0,0 +1,150 @@ +import {Header} from "../../../../../../routes/header.js"; +import {HeaderMap} from "../../../../../../routes/header_map.js"; +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 ModulesOperations{ + /** + * The method to get modules + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getModules(headerInstance=null) { + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/modules"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setHeader(headerInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to get module by api name + * @param {String} apiName A String representing the apiName + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getModuleByAPIName(apiName) { + if((!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/modules/"); + apiPath = apiPath.concat(apiName.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/json"); + + } + + /** + * The method to update module by api name + * @param {String} apiName A String representing the apiName + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateModuleByAPIName(apiName, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/modules/"); + apiPath = apiPath.concat(apiName.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get module + * @param {BigInt} id A BigInt representing the id + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getModule(id) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/modules/"); + apiPath = apiPath.concat(id.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/json"); + + } + + /** + * The method to update module + * @param {BigInt} id A BigInt representing the id + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateModule(id, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/modules/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class GetModulesHeader{ + + static IF_MODIFIED_SINCE = new Header("If-Modified-Since", "com.zoho.crm.api.Modules.GetModulesHeader"); +} + +export { + ModulesOperations as MasterModel, + ModulesOperations as ModulesOperations, + GetModulesHeader as GetModulesHeader +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/related_list_properties.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/related_list_properties.js new file mode 100644 index 0000000..6b7e2ad --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/related_list_properties.js @@ -0,0 +1,113 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RelatedListProperties{ + + sortBy; + fields; + sortOrder; + keyModified = new Map(); + /** + * The method to get the sortBy + * @returns {MinifiedField} An instance of MinifiedField + */ + getSortBy() { + return this.sortBy; + + } + + /** + * The method to set the value to sortBy + * @param {MinifiedField} sortBy An instance of MinifiedField + */ + async setSortBy(sortBy) { + const MinifiedField = (await (import("../fields/minified_field.js"))).MasterModel; + if((sortBy != null) && (!(sortBy instanceof MinifiedField))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortBy EXPECTED TYPE: MinifiedField", null, null); + } + this.sortBy = sortBy; + this.keyModified.set("sort_by", 1); + + } + + /** + * The method to get the fields + * @returns {Array} An Array representing the fields + */ + getFields() { + return this.fields; + + } + + /** + * The method to set the value to fields + * @param {Array} fields An Array representing the fields + */ + setFields(fields) { + if((fields != null) && (!(Object.prototype.toString.call(fields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: Array", null, null); + } + this.fields = fields; + this.keyModified.set("fields", 1); + + } + + /** + * The method to get the sortOrder + * @returns {String} A String representing the sortOrder + */ + getSortOrder() { + return this.sortOrder; + + } + + /** + * The method to set the value to sortOrder + * @param {String} sortOrder A String representing the sortOrder + */ + setSortOrder(sortOrder) { + if((sortOrder != null) && (!(Object.prototype.toString.call(sortOrder) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortOrder EXPECTED TYPE: String", null, null); + } + this.sortOrder = sortOrder; + this.keyModified.set("sort_order", 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 { + RelatedListProperties as MasterModel, + RelatedListProperties as RelatedListProperties +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/response_wrapper.js new file mode 100644 index 0000000..3b33ce2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + modules; + keyModified = new Map(); + /** + * The method to get the modules + * @returns {Array} An Array representing the modules + */ + getModules() { + return this.modules; + + } + + /** + * The method to set the value to modules + * @param {Array} modules An Array representing the modules + */ + setModules(modules) { + if((modules != null) && (!(Object.prototype.toString.call(modules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modules EXPECTED TYPE: Array", null, null); + } + this.modules = modules; + this.keyModified.set("modules", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/sharing_properties.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/sharing_properties.js new file mode 100644 index 0000000..564b68d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/sharing_properties.js @@ -0,0 +1,113 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SharingProperties{ + + schedulerStatus; + sharePreferenceEnabled; + sharePermission; + keyModified = new Map(); + /** + * The method to get the schedulerStatus + * @returns {String} A String representing the schedulerStatus + */ + getSchedulerStatus() { + return this.schedulerStatus; + + } + + /** + * The method to set the value to schedulerStatus + * @param {String} schedulerStatus A String representing the schedulerStatus + */ + setSchedulerStatus(schedulerStatus) { + if((schedulerStatus != null) && (!(Object.prototype.toString.call(schedulerStatus) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: schedulerStatus EXPECTED TYPE: String", null, null); + } + this.schedulerStatus = schedulerStatus; + this.keyModified.set("scheduler_status", 1); + + } + + /** + * The method to get the sharePreferenceEnabled + * @returns {Boolean} A Boolean representing the sharePreferenceEnabled + */ + getSharePreferenceEnabled() { + return this.sharePreferenceEnabled; + + } + + /** + * The method to set the value to sharePreferenceEnabled + * @param {Boolean} sharePreferenceEnabled A Boolean representing the sharePreferenceEnabled + */ + setSharePreferenceEnabled(sharePreferenceEnabled) { + if((sharePreferenceEnabled != null) && (!(Object.prototype.toString.call(sharePreferenceEnabled) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sharePreferenceEnabled EXPECTED TYPE: Boolean", null, null); + } + this.sharePreferenceEnabled = sharePreferenceEnabled; + this.keyModified.set("share_preference_enabled", 1); + + } + + /** + * The method to get the sharePermission + * @returns {Choice} An instance of Choice + */ + getSharePermission() { + return this.sharePermission; + + } + + /** + * The method to set the value to sharePermission + * @param {Choice} sharePermission An instance of Choice + */ + setSharePermission(sharePermission) { + if((sharePermission != null) && (!(sharePermission instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sharePermission EXPECTED TYPE: Choice", null, null); + } + this.sharePermission = sharePermission; + this.keyModified.set("share_permission", 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 { + SharingProperties as MasterModel, + SharingProperties as SharingProperties +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/success_response.js new file mode 100644 index 0000000..6cdb15e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/modules/territory.js b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/territory.js new file mode 100644 index 0000000..2f0a65f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/modules/territory.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Territory{ + + name; + id; + subordinates; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the subordinates + * @returns {Boolean} A Boolean representing the subordinates + */ + getSubordinates() { + return this.subordinates; + + } + + /** + * The method to set the value to subordinates + * @param {Boolean} subordinates A Boolean representing the subordinates + */ + setSubordinates(subordinates) { + if((subordinates != null) && (!(Object.prototype.toString.call(subordinates) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subordinates EXPECTED TYPE: Boolean", null, null); + } + this.subordinates = subordinates; + this.keyModified.set("subordinates", 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 { + Territory as MasterModel, + Territory as Territory +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notes/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notes/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notes/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/action_wrapper.js new file mode 100644 index 0000000..6996d19 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notes/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notes/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/body_wrapper.js new file mode 100644 index 0000000..3b80d06 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notes/import_notes.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/import_notes.js new file mode 100644 index 0000000..ab6214f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/import_notes.js @@ -0,0 +1,16 @@ +export { ActionWrapper } from "./action_wrapper.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { APIException } from "./api_exception.js"; +export * as ResponseHandler from "./response_handler.js"; +export * as ActionResponse from "./action_response.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { SuccessResponse } from "./success_response.js"; +export { Note } from "./note.js"; +export { NotesOperations } from "./notes_operations.js"; +export { GetNotesParam } from "./notes_operations.js"; +export { GetNotesHeader } from "./notes_operations.js"; +export { DeleteNotesParam } from "./notes_operations.js"; +export { GetNoteParam } from "./notes_operations.js"; +export { GetNoteHeader } from "./notes_operations.js"; +export { Info } from "./info.js"; +export * as ActionHandler from "./action_handler.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notes/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/info.js new file mode 100644 index 0000000..57e3189 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/info.js @@ -0,0 +1,250 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + perPage; + nextPageToken; + count; + sortBy; + page; + previousPageToken; + pageTokenExpiry; + sortOrder; + moreRecords; + keyModified = new Map(); + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the nextPageToken + * @returns {String} A String representing the nextPageToken + */ + getNextPageToken() { + return this.nextPageToken; + + } + + /** + * The method to set the value to nextPageToken + * @param {String} nextPageToken A String representing the nextPageToken + */ + setNextPageToken(nextPageToken) { + if((nextPageToken != null) && (!(Object.prototype.toString.call(nextPageToken) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: nextPageToken EXPECTED TYPE: String", null, null); + } + this.nextPageToken = nextPageToken; + this.keyModified.set("next_page_token", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the sortBy + * @returns {String} A String representing the sortBy + */ + getSortBy() { + return this.sortBy; + + } + + /** + * The method to set the value to sortBy + * @param {String} sortBy A String representing the sortBy + */ + setSortBy(sortBy) { + if((sortBy != null) && (!(Object.prototype.toString.call(sortBy) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortBy EXPECTED TYPE: String", null, null); + } + this.sortBy = sortBy; + this.keyModified.set("sort_by", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the previousPageToken + * @returns {String} A String representing the previousPageToken + */ + getPreviousPageToken() { + return this.previousPageToken; + + } + + /** + * The method to set the value to previousPageToken + * @param {String} previousPageToken A String representing the previousPageToken + */ + setPreviousPageToken(previousPageToken) { + if((previousPageToken != null) && (!(Object.prototype.toString.call(previousPageToken) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: previousPageToken EXPECTED TYPE: String", null, null); + } + this.previousPageToken = previousPageToken; + this.keyModified.set("previous_page_token", 1); + + } + + /** + * The method to get the pageTokenExpiry + * @returns {Date} An instance of Date + */ + getPageTokenExpiry() { + return this.pageTokenExpiry; + + } + + /** + * The method to set the value to pageTokenExpiry + * @param {Date} pageTokenExpiry An instance of Date + */ + setPageTokenExpiry(pageTokenExpiry) { + if((pageTokenExpiry != null) && (!(pageTokenExpiry instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pageTokenExpiry EXPECTED TYPE: Date", null, null); + } + this.pageTokenExpiry = pageTokenExpiry; + this.keyModified.set("page_token_expiry", 1); + + } + + /** + * The method to get the sortOrder + * @returns {String} A String representing the sortOrder + */ + getSortOrder() { + return this.sortOrder; + + } + + /** + * The method to set the value to sortOrder + * @param {String} sortOrder A String representing the sortOrder + */ + setSortOrder(sortOrder) { + if((sortOrder != null) && (!(Object.prototype.toString.call(sortOrder) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortOrder EXPECTED TYPE: String", null, null); + } + this.sortOrder = sortOrder; + this.keyModified.set("sort_order", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notes/note.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/note.js new file mode 100644 index 0000000..084884c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/note.js @@ -0,0 +1,439 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Note{ + + modifiedTime; + attachments; + owner; + createdTime; + parentId; + editable; + seModule; + isSharedToClient; + sharingPermission; + modifiedBy; + size; + state; + voiceNote; + id; + createdBy; + noteTitle; + noteContent; + keyModified = new Map(); + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("Modified_Time", 1); + + } + + /** + * The method to get the attachments + * @returns {Array} An Array representing the attachments + */ + getAttachments() { + return this.attachments; + + } + + /** + * The method to set the value to attachments + * @param {Array} attachments An Array representing the attachments + */ + setAttachments(attachments) { + if((attachments != null) && (!(Object.prototype.toString.call(attachments) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: attachments EXPECTED TYPE: Array", null, null); + } + this.attachments = attachments; + this.keyModified.set("$attachments", 1); + + } + + /** + * The method to get the owner + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getOwner() { + return this.owner; + + } + + /** + * The method to set the value to owner + * @param {MinifiedUser} owner An instance of MinifiedUser + */ + async setOwner(owner) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((owner != null) && (!(owner instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: owner EXPECTED TYPE: MinifiedUser", null, null); + } + this.owner = owner; + this.keyModified.set("Owner", 1); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("Created_Time", 1); + + } + + /** + * The method to get the parentId + * @returns {Record} An instance of Record + */ + getParentId() { + return this.parentId; + + } + + /** + * The method to set the value to parentId + * @param {Record} parentId An instance of Record + */ + async setParentId(parentId) { + const Record = (await (import("../record/record.js"))).MasterModel; + if((parentId != null) && (!(parentId instanceof Record))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: parentId EXPECTED TYPE: Record", null, null); + } + this.parentId = parentId; + this.keyModified.set("Parent_Id", 1); + + } + + /** + * The method to get the editable + * @returns {Boolean} A Boolean representing the editable + */ + getEditable() { + return this.editable; + + } + + /** + * The method to set the value to editable + * @param {Boolean} editable A Boolean representing the editable + */ + setEditable(editable) { + if((editable != null) && (!(Object.prototype.toString.call(editable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: editable EXPECTED TYPE: Boolean", null, null); + } + this.editable = editable; + this.keyModified.set("$editable", 1); + + } + + /** + * The method to get the seModule + * @returns {Choice} An instance of Choice + */ + getSeModule() { + return this.seModule; + + } + + /** + * The method to set the value to seModule + * @param {Choice} seModule An instance of Choice + */ + setSeModule(seModule) { + if((seModule != null) && (!(seModule instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: seModule EXPECTED TYPE: Choice", null, null); + } + this.seModule = seModule; + this.keyModified.set("$se_module", 1); + + } + + /** + * The method to get the isSharedToClient + * @returns {Boolean} A Boolean representing the isSharedToClient + */ + getIsSharedToClient() { + return this.isSharedToClient; + + } + + /** + * The method to set the value to isSharedToClient + * @param {Boolean} isSharedToClient A Boolean representing the isSharedToClient + */ + setIsSharedToClient(isSharedToClient) { + if((isSharedToClient != null) && (!(Object.prototype.toString.call(isSharedToClient) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: isSharedToClient EXPECTED TYPE: Boolean", null, null); + } + this.isSharedToClient = isSharedToClient; + this.keyModified.set("$is_shared_to_client", 1); + + } + + /** + * The method to get the sharingPermission + * @returns {String} A String representing the sharingPermission + */ + getSharingPermission() { + return this.sharingPermission; + + } + + /** + * The method to set the value to sharingPermission + * @param {String} sharingPermission A String representing the sharingPermission + */ + setSharingPermission(sharingPermission) { + if((sharingPermission != null) && (!(Object.prototype.toString.call(sharingPermission) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sharingPermission EXPECTED TYPE: String", null, null); + } + this.sharingPermission = sharingPermission; + this.keyModified.set("$sharing_permission", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("Modified_By", 1); + + } + + /** + * The method to get the size + * @returns {String} A String representing the size + */ + getSize() { + return this.size; + + } + + /** + * The method to set the value to size + * @param {String} size A String representing the size + */ + setSize(size) { + if((size != null) && (!(Object.prototype.toString.call(size) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: size EXPECTED TYPE: String", null, null); + } + this.size = size; + this.keyModified.set("$size", 1); + + } + + /** + * The method to get the state + * @returns {String} A String representing the state + */ + getState() { + return this.state; + + } + + /** + * The method to set the value to state + * @param {String} state A String representing the state + */ + setState(state) { + if((state != null) && (!(Object.prototype.toString.call(state) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: state EXPECTED TYPE: String", null, null); + } + this.state = state; + this.keyModified.set("$state", 1); + + } + + /** + * The method to get the voiceNote + * @returns {Boolean} A Boolean representing the voiceNote + */ + getVoiceNote() { + return this.voiceNote; + + } + + /** + * The method to set the value to voiceNote + * @param {Boolean} voiceNote A Boolean representing the voiceNote + */ + setVoiceNote(voiceNote) { + if((voiceNote != null) && (!(Object.prototype.toString.call(voiceNote) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: voiceNote EXPECTED TYPE: Boolean", null, null); + } + this.voiceNote = voiceNote; + this.keyModified.set("$voice_note", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("Created_By", 1); + + } + + /** + * The method to get the noteTitle + * @returns {String} A String representing the noteTitle + */ + getNoteTitle() { + return this.noteTitle; + + } + + /** + * The method to set the value to noteTitle + * @param {String} noteTitle A String representing the noteTitle + */ + setNoteTitle(noteTitle) { + if((noteTitle != null) && (!(Object.prototype.toString.call(noteTitle) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: noteTitle EXPECTED TYPE: String", null, null); + } + this.noteTitle = noteTitle; + this.keyModified.set("Note_Title", 1); + + } + + /** + * The method to get the noteContent + * @returns {String} A String representing the noteContent + */ + getNoteContent() { + return this.noteContent; + + } + + /** + * The method to set the value to noteContent + * @param {String} noteContent A String representing the noteContent + */ + setNoteContent(noteContent) { + if((noteContent != null) && (!(Object.prototype.toString.call(noteContent) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: noteContent EXPECTED TYPE: String", null, null); + } + this.noteContent = noteContent; + this.keyModified.set("Note_Content", 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 { + Note as MasterModel, + Note as Note +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notes/notes_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/notes_operations.js new file mode 100644 index 0000000..f215e2a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/notes_operations.js @@ -0,0 +1,239 @@ +import {Header} from "../../../../../../routes/header.js"; +import {HeaderMap} from "../../../../../../routes/header_map.js"; +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 NotesOperations{ + /** + * The method to get notes + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getNotes(paramInstance=null, headerInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Notes"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + handlerInstance.setHeader(headerInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to create notes + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createNotes(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Notes"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update notes + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateNotes(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Notes"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete notes + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteNotes(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Notes"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get note + * @param {BigInt} id A BigInt representing the id + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getNote(id, paramInstance=null, headerInstance=null) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v2/Notes/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + handlerInstance.setHeader(headerInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to update note + * @param {BigInt} id A BigInt representing the id + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateNote(id, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v2/Notes/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete note + * @param {BigInt} id A BigInt representing the id + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteNote(id) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v2/Notes/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class GetNotesParam{ + + static PAGE = new Param("page", "com.zoho.crm.api.Notes.GetNotesParam"); + static PER_PAGE = new Param("per_page", "com.zoho.crm.api.Notes.GetNotesParam"); + static FIELDS = new Param("fields", "com.zoho.crm.api.Notes.GetNotesParam"); + static SORT_ORDER = new Param("sort_order", "com.zoho.crm.api.Notes.GetNotesParam"); + static SORT_BY = new Param("sort_by", "com.zoho.crm.api.Notes.GetNotesParam"); +} + +class GetNotesHeader{ + + static IF_MODIFIED_SINCE = new Header("If-Modified-Since", "com.zoho.crm.api.Notes.GetNotesHeader"); +} + +class DeleteNotesParam{ + + static IDS = new Param("ids", "com.zoho.crm.api.Notes.DeleteNotesParam"); +} + +class GetNoteParam{ + + static FIELDS = new Param("fields", "com.zoho.crm.api.Notes.GetNoteParam"); +} + +class GetNoteHeader{ + + static IF_MODIFIED_SINCE = new Header("If-Modified-Since", "com.zoho.crm.api.Notes.GetNoteHeader"); +} + +export { + GetNotesHeader as GetNotesHeader, + GetNoteParam as GetNoteParam, + GetNoteHeader as GetNoteHeader, + GetNotesParam as GetNotesParam, + NotesOperations as MasterModel, + NotesOperations as NotesOperations, + DeleteNotesParam as DeleteNotesParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notes/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notes/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/response_wrapper.js new file mode 100644 index 0000000..4b95f85 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + data; + info; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notes/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/success_response.js new file mode 100644 index 0000000..8db02f9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notes/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + status; + message; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/action_wrapper.js new file mode 100644 index 0000000..91ca778 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + watch; + keyModified = new Map(); + /** + * The method to get the watch + * @returns {Array} An Array representing the watch + */ + getWatch() { + return this.watch; + + } + + /** + * The method to set the value to watch + * @param {Array} watch An Array representing the watch + */ + setWatch(watch) { + if((watch != null) && (!(Object.prototype.toString.call(watch) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: watch EXPECTED TYPE: Array", null, null); + } + this.watch = watch; + this.keyModified.set("watch", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/api_exception.js new file mode 100644 index 0000000..db2d361 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/body_wrapper.js new file mode 100644 index 0000000..61e6a74 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + watch; + keyModified = new Map(); + /** + * The method to get the watch + * @returns {Array} An Array representing the watch + */ + getWatch() { + return this.watch; + + } + + /** + * The method to set the value to watch + * @param {Array} watch An Array representing the watch + */ + setWatch(watch) { + if((watch != null) && (!(Object.prototype.toString.call(watch) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: watch EXPECTED TYPE: Array", null, null); + } + this.watch = watch; + this.keyModified.set("watch", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/delete_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/delete_details.js new file mode 100644 index 0000000..bc506cc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/delete_details.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DeleteDetails{ + + resourceId; + resourceUri; + channelId; + keyModified = new Map(); + /** + * The method to get the resourceId + * @returns {BigInt} A BigInt representing the resourceId + */ + getResourceId() { + return this.resourceId; + + } + + /** + * The method to set the value to resourceId + * @param {BigInt} resourceId A BigInt representing the resourceId + */ + setResourceId(resourceId) { + if((resourceId != null) && (!(Object.prototype.toString.call(resourceId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: resourceId EXPECTED TYPE: BigInt", null, null); + } + this.resourceId = resourceId; + this.keyModified.set("resource_id", 1); + + } + + /** + * The method to get the resourceUri + * @returns {String} A String representing the resourceUri + */ + getResourceUri() { + return this.resourceUri; + + } + + /** + * The method to set the value to resourceUri + * @param {String} resourceUri A String representing the resourceUri + */ + setResourceUri(resourceUri) { + if((resourceUri != null) && (!(Object.prototype.toString.call(resourceUri) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: resourceUri EXPECTED TYPE: String", null, null); + } + this.resourceUri = resourceUri; + this.keyModified.set("resource_uri", 1); + + } + + /** + * The method to get the channelId + * @returns {String} A String representing the channelId + */ + getChannelId() { + return this.channelId; + + } + + /** + * The method to set the value to channelId + * @param {String} channelId A String representing the channelId + */ + setChannelId(channelId) { + if((channelId != null) && (!(Object.prototype.toString.call(channelId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: channelId EXPECTED TYPE: String", null, null); + } + this.channelId = channelId; + this.keyModified.set("channel_id", 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 { + DeleteDetails as MasterModel, + DeleteDetails as DeleteDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/event.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/event.js new file mode 100644 index 0000000..8c72dab --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/event.js @@ -0,0 +1,159 @@ +import {DeleteDetails} from "./delete_details.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Event extends DeleteDetails{ + + resourceName; + channelExpiry; + resourceId; + resourceUri; + channelId; + keyModified = new Map(); + /** + * The method to get the resourceName + * @returns {String} A String representing the resourceName + */ + getResourceName() { + return this.resourceName; + + } + + /** + * The method to set the value to resourceName + * @param {String} resourceName A String representing the resourceName + */ + setResourceName(resourceName) { + if((resourceName != null) && (!(Object.prototype.toString.call(resourceName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: resourceName EXPECTED TYPE: String", null, null); + } + this.resourceName = resourceName; + this.keyModified.set("resource_name", 1); + + } + + /** + * The method to get the channelExpiry + * @returns {Date} An instance of Date + */ + getChannelExpiry() { + return this.channelExpiry; + + } + + /** + * The method to set the value to channelExpiry + * @param {Date} channelExpiry An instance of Date + */ + setChannelExpiry(channelExpiry) { + if((channelExpiry != null) && (!(channelExpiry instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: channelExpiry EXPECTED TYPE: Date", null, null); + } + this.channelExpiry = channelExpiry; + this.keyModified.set("channel_expiry", 1); + + } + + /** + * The method to get the resourceId + * @returns {BigInt} A BigInt representing the resourceId + */ + getResourceId() { + return this.resourceId; + + } + + /** + * The method to set the value to resourceId + * @param {BigInt} resourceId A BigInt representing the resourceId + */ + setResourceId(resourceId) { + if((resourceId != null) && (!(Object.prototype.toString.call(resourceId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: resourceId EXPECTED TYPE: BigInt", null, null); + } + this.resourceId = resourceId; + this.keyModified.set("resource_id", 1); + + } + + /** + * The method to get the resourceUri + * @returns {String} A String representing the resourceUri + */ + getResourceUri() { + return this.resourceUri; + + } + + /** + * The method to set the value to resourceUri + * @param {String} resourceUri A String representing the resourceUri + */ + setResourceUri(resourceUri) { + if((resourceUri != null) && (!(Object.prototype.toString.call(resourceUri) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: resourceUri EXPECTED TYPE: String", null, null); + } + this.resourceUri = resourceUri; + this.keyModified.set("resource_uri", 1); + + } + + /** + * The method to get the channelId + * @returns {String} A String representing the channelId + */ + getChannelId() { + return this.channelId; + + } + + /** + * The method to set the value to channelId + * @param {String} channelId A String representing the channelId + */ + setChannelId(channelId) { + if((channelId != null) && (!(Object.prototype.toString.call(channelId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: channelId EXPECTED TYPE: String", null, null); + } + this.channelId = channelId; + this.keyModified.set("channel_id", 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 { + Event as MasterModel, + Event as Event +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/import_notifications.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/import_notifications.js new file mode 100644 index 0000000..40d9f35 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/import_notifications.js @@ -0,0 +1,15 @@ +export { APIException } from "./api_exception.js"; +export { SuccessResponse } from "./success_response.js"; +export { DeleteDetails } from "./delete_details.js"; +export * as ResponseHandler from "./response_handler.js"; +export { Event } from "./event.js"; +export { Notification } from "./notification.js"; +export * as ActionHandler from "./action_handler.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { Info } from "./info.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { NotificationsOperations } from "./notifications_operations.js"; +export { GetNotificationsParam } from "./notifications_operations.js"; +export { DeleteNotificationParam } from "./notifications_operations.js"; +export * as ActionResponse from "./action_response.js"; +export { ActionWrapper } from "./action_wrapper.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/info.js new file mode 100644 index 0000000..d847543 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/info.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + perPage; + page; + count; + moreRecords; + keyModified = new Map(); + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/notification.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/notification.js new file mode 100644 index 0000000..67c644e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/notification.js @@ -0,0 +1,321 @@ +import {Event} from "./event.js"; +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Notification extends Event{ + + channelId; + notifyUrl; + events; + token; + fields; + notifyOnRelatedAction; + returnAffectedFieldValues; + deleteevents; + resourceName; + channelExpiry; + resourceId; + resourceUri; + keyModified = new Map(); + /** + * The method to get the channelId + * @returns {String} A String representing the channelId + */ + getChannelId() { + return this.channelId; + + } + + /** + * The method to set the value to channelId + * @param {String} channelId A String representing the channelId + */ + setChannelId(channelId) { + if((channelId != null) && (!(Object.prototype.toString.call(channelId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: channelId EXPECTED TYPE: String", null, null); + } + this.channelId = channelId; + this.keyModified.set("channel_id", 1); + + } + + /** + * The method to get the notifyUrl + * @returns {String} A String representing the notifyUrl + */ + getNotifyUrl() { + return this.notifyUrl; + + } + + /** + * The method to set the value to notifyUrl + * @param {String} notifyUrl A String representing the notifyUrl + */ + setNotifyUrl(notifyUrl) { + if((notifyUrl != null) && (!(Object.prototype.toString.call(notifyUrl) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: notifyUrl EXPECTED TYPE: String", null, null); + } + this.notifyUrl = notifyUrl; + this.keyModified.set("notify_url", 1); + + } + + /** + * The method to get the events + * @returns {Array} An Array representing the events + */ + getEvents() { + return this.events; + + } + + /** + * The method to set the value to events + * @param {Array} events An Array representing the events + */ + setEvents(events) { + if((events != null) && (!(Object.prototype.toString.call(events) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: events EXPECTED TYPE: Array", null, null); + } + this.events = events; + this.keyModified.set("events", 1); + + } + + /** + * The method to get the token + * @returns {String} A String representing the token + */ + getToken() { + return this.token; + + } + + /** + * The method to set the value to token + * @param {String} token A String representing the token + */ + setToken(token) { + if((token != null) && (!(Object.prototype.toString.call(token) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: token EXPECTED TYPE: String", null, null); + } + this.token = token; + this.keyModified.set("token", 1); + + } + + /** + * The method to get the fields + * @returns {Map} A Map representing the fields + */ + getFields() { + return this.fields; + + } + + /** + * The method to set the value to fields + * @param {Map} fields A Map representing the fields + */ + setFields(fields) { + if((fields != null) && (!(Object.prototype.toString.call(fields) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: Map", null, null); + } + this.fields = fields; + this.keyModified.set("fields", 1); + + } + + /** + * The method to get the notifyOnRelatedAction + * @returns {Boolean} A Boolean representing the notifyOnRelatedAction + */ + getNotifyOnRelatedAction() { + return this.notifyOnRelatedAction; + + } + + /** + * The method to set the value to notifyOnRelatedAction + * @param {Boolean} notifyOnRelatedAction A Boolean representing the notifyOnRelatedAction + */ + setNotifyOnRelatedAction(notifyOnRelatedAction) { + if((notifyOnRelatedAction != null) && (!(Object.prototype.toString.call(notifyOnRelatedAction) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: notifyOnRelatedAction EXPECTED TYPE: Boolean", null, null); + } + this.notifyOnRelatedAction = notifyOnRelatedAction; + this.keyModified.set("notify_on_related_action", 1); + + } + + /** + * The method to get the returnAffectedFieldValues + * @returns {Boolean} A Boolean representing the returnAffectedFieldValues + */ + getReturnAffectedFieldValues() { + return this.returnAffectedFieldValues; + + } + + /** + * The method to set the value to returnAffectedFieldValues + * @param {Boolean} returnAffectedFieldValues A Boolean representing the returnAffectedFieldValues + */ + setReturnAffectedFieldValues(returnAffectedFieldValues) { + if((returnAffectedFieldValues != null) && (!(Object.prototype.toString.call(returnAffectedFieldValues) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: returnAffectedFieldValues EXPECTED TYPE: Boolean", null, null); + } + this.returnAffectedFieldValues = returnAffectedFieldValues; + this.keyModified.set("return_affected_field_values", 1); + + } + + /** + * The method to get the deleteevents + * @returns {Choice} An instance of Choice + */ + getDeleteevents() { + return this.deleteevents; + + } + + /** + * The method to set the value to deleteevents + * @param {Choice} deleteevents An instance of Choice + */ + setDeleteevents(deleteevents) { + if((deleteevents != null) && (!(deleteevents instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deleteevents EXPECTED TYPE: Choice", null, null); + } + this.deleteevents = deleteevents; + this.keyModified.set("_delete_events", 1); + + } + + /** + * The method to get the resourceName + * @returns {String} A String representing the resourceName + */ + getResourceName() { + return this.resourceName; + + } + + /** + * The method to set the value to resourceName + * @param {String} resourceName A String representing the resourceName + */ + setResourceName(resourceName) { + if((resourceName != null) && (!(Object.prototype.toString.call(resourceName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: resourceName EXPECTED TYPE: String", null, null); + } + this.resourceName = resourceName; + this.keyModified.set("resource_name", 1); + + } + + /** + * The method to get the channelExpiry + * @returns {Date} An instance of Date + */ + getChannelExpiry() { + return this.channelExpiry; + + } + + /** + * The method to set the value to channelExpiry + * @param {Date} channelExpiry An instance of Date + */ + setChannelExpiry(channelExpiry) { + if((channelExpiry != null) && (!(channelExpiry instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: channelExpiry EXPECTED TYPE: Date", null, null); + } + this.channelExpiry = channelExpiry; + this.keyModified.set("channel_expiry", 1); + + } + + /** + * The method to get the resourceId + * @returns {BigInt} A BigInt representing the resourceId + */ + getResourceId() { + return this.resourceId; + + } + + /** + * The method to set the value to resourceId + * @param {BigInt} resourceId A BigInt representing the resourceId + */ + setResourceId(resourceId) { + if((resourceId != null) && (!(Object.prototype.toString.call(resourceId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: resourceId EXPECTED TYPE: BigInt", null, null); + } + this.resourceId = resourceId; + this.keyModified.set("resource_id", 1); + + } + + /** + * The method to get the resourceUri + * @returns {String} A String representing the resourceUri + */ + getResourceUri() { + return this.resourceUri; + + } + + /** + * The method to set the value to resourceUri + * @param {String} resourceUri A String representing the resourceUri + */ + setResourceUri(resourceUri) { + if((resourceUri != null) && (!(Object.prototype.toString.call(resourceUri) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: resourceUri EXPECTED TYPE: String", null, null); + } + this.resourceUri = resourceUri; + this.keyModified.set("resource_uri", 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 { + Notification as MasterModel, + Notification as Notification +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/notifications_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/notifications_operations.js new file mode 100644 index 0000000..3a107cb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/notifications_operations.js @@ -0,0 +1,178 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 NotificationsOperations{ + /** + * The method to get notifications + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getNotifications(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/actions/watch"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to enable notifications + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async enableNotifications(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/actions/watch"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update notifications + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateNotifications(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/actions/watch"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update notification + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateNotification(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/actions/watch"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PATCH); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to disable notification + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async disableNotification(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/actions/watch"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PATCH); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete notification + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteNotification(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/actions/watch"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class GetNotificationsParam{ + + static PAGE = new Param("page", "com.zoho.crm.api.Notifications.GetNotificationsParam"); + static PER_PAGE = new Param("per_page", "com.zoho.crm.api.Notifications.GetNotificationsParam"); + static CHANNEL_ID = new Param("channel_id", "com.zoho.crm.api.Notifications.GetNotificationsParam"); + static MODULE = new Param("module", "com.zoho.crm.api.Notifications.GetNotificationsParam"); +} + +class DeleteNotificationParam{ + + static CHANNEL_IDS = new Param("channel_ids", "com.zoho.crm.api.Notifications.DeleteNotificationParam"); +} + +export { + GetNotificationsParam as GetNotificationsParam, + NotificationsOperations as MasterModel, + NotificationsOperations as NotificationsOperations, + DeleteNotificationParam as DeleteNotificationParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/response_wrapper.js new file mode 100644 index 0000000..a24525c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + watch; + info; + keyModified = new Map(); + /** + * The method to get the watch + * @returns {Array} An Array representing the watch + */ + getWatch() { + return this.watch; + + } + + /** + * The method to set the value to watch + * @param {Array} watch An Array representing the watch + */ + setWatch(watch) { + if((watch != null) && (!(Object.prototype.toString.call(watch) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: watch EXPECTED TYPE: Array", null, null); + } + this.watch = watch; + this.keyModified.set("watch", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/success_response.js new file mode 100644 index 0000000..39525ad --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/notifications/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/org/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/org/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/org/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/org/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/org/api_exception.js new file mode 100644 index 0000000..35bf8ba --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/org/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/org/checkin_preferences.js b/versions/3.0.0/lib/core/com/zoho/crm/api/org/checkin_preferences.js new file mode 100644 index 0000000..03c69da --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/org/checkin_preferences.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class CheckinPreferences{ + + restrictedEventTypes; + keyModified = new Map(); + /** + * The method to get the restrictedEventTypes + * @returns {String} A String representing the restrictedEventTypes + */ + getRestrictedEventTypes() { + return this.restrictedEventTypes; + + } + + /** + * The method to set the value to restrictedEventTypes + * @param {String} restrictedEventTypes A String representing the restrictedEventTypes + */ + setRestrictedEventTypes(restrictedEventTypes) { + if((restrictedEventTypes != null) && (!(Object.prototype.toString.call(restrictedEventTypes) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: restrictedEventTypes EXPECTED TYPE: String", null, null); + } + this.restrictedEventTypes = restrictedEventTypes; + this.keyModified.set("restricted_event_types", 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 { + CheckinPreferences as MasterModel, + CheckinPreferences as CheckinPreferences +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/org/feature.js b/versions/3.0.0/lib/core/com/zoho/crm/api/org/feature.js new file mode 100644 index 0000000..38c8361 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/org/feature.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Feature{ + + name; + resources; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the resources + * @returns {Array} An Array representing the resources + */ + getResources() { + return this.resources; + + } + + /** + * The method to set the value to resources + * @param {Array} resources An Array representing the resources + */ + setResources(resources) { + if((resources != null) && (!(Object.prototype.toString.call(resources) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: resources EXPECTED TYPE: Array", null, null); + } + this.resources = resources; + this.keyModified.set("resources", 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 { + Feature as MasterModel, + Feature as Feature +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/org/file_body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/org/file_body_wrapper.js new file mode 100644 index 0000000..ac3a3e4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/org/file_body_wrapper.js @@ -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 +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/org/hierarchy_preferences.js b/versions/3.0.0/lib/core/com/zoho/crm/api/org/hierarchy_preferences.js new file mode 100644 index 0000000..732c22f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/org/hierarchy_preferences.js @@ -0,0 +1,90 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class HierarchyPreferences{ + + type; + strictlyReporting; + keyModified = new Map(); + /** + * The method to get the type + * @returns {Choice} An instance of Choice + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {Choice} type An instance of Choice + */ + setType(type) { + if((type != null) && (!(type instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: Choice", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the strictlyReporting + * @returns {Boolean} A Boolean representing the strictlyReporting + */ + getStrictlyReporting() { + return this.strictlyReporting; + + } + + /** + * The method to set the value to strictlyReporting + * @param {Boolean} strictlyReporting A Boolean representing the strictlyReporting + */ + setStrictlyReporting(strictlyReporting) { + if((strictlyReporting != null) && (!(Object.prototype.toString.call(strictlyReporting) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: strictlyReporting EXPECTED TYPE: Boolean", null, null); + } + this.strictlyReporting = strictlyReporting; + this.keyModified.set("strictly_reporting", 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 { + HierarchyPreferences as MasterModel, + HierarchyPreferences as HierarchyPreferences +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/org/import_org.js b/versions/3.0.0/lib/core/com/zoho/crm/api/org/import_org.js new file mode 100644 index 0000000..27805cb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/org/import_org.js @@ -0,0 +1,13 @@ +export { ResponseWrapper } from "./response_wrapper.js"; +export { HierarchyPreferences } from "./hierarchy_preferences.js"; +export { OrgOperations } from "./org_operations.js"; +export * as ActionHandler from "./action_handler.js"; +export { FileBodyWrapper } from "./file_body_wrapper.js"; +export { Resource } from "./resource.js"; +export { SuccessResponse } from "./success_response.js"; +export { LicenseDetails } from "./license_details.js"; +export { Org } from "./org.js"; +export { Feature } from "./feature.js"; +export { APIException } from "./api_exception.js"; +export { CheckinPreferences } from "./checkin_preferences.js"; +export * as ResponseHandler from "./response_handler.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/org/license_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/org/license_details.js new file mode 100644 index 0000000..b7aba2e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/org/license_details.js @@ -0,0 +1,204 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class LicenseDetails{ + + paidExpiry; + usersLicensePurchased; + trialType; + trialExpiry; + paid; + paidType; + trialAction; + keyModified = new Map(); + /** + * The method to get the paidExpiry + * @returns {Date} An instance of Date + */ + getPaidExpiry() { + return this.paidExpiry; + + } + + /** + * The method to set the value to paidExpiry + * @param {Date} paidExpiry An instance of Date + */ + setPaidExpiry(paidExpiry) { + if((paidExpiry != null) && (!(paidExpiry instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paidExpiry EXPECTED TYPE: Date", null, null); + } + this.paidExpiry = paidExpiry; + this.keyModified.set("paid_expiry", 1); + + } + + /** + * The method to get the usersLicensePurchased + * @returns {number} A number representing the usersLicensePurchased + */ + getUsersLicensePurchased() { + return this.usersLicensePurchased; + + } + + /** + * The method to set the value to usersLicensePurchased + * @param {number} usersLicensePurchased A number representing the usersLicensePurchased + */ + setUsersLicensePurchased(usersLicensePurchased) { + if((usersLicensePurchased != null) && (!(Object.prototype.toString.call(usersLicensePurchased) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: usersLicensePurchased EXPECTED TYPE: number", null, null); + } + this.usersLicensePurchased = usersLicensePurchased; + this.keyModified.set("users_license_purchased", 1); + + } + + /** + * The method to get the trialType + * @returns {String} A String representing the trialType + */ + getTrialType() { + return this.trialType; + + } + + /** + * The method to set the value to trialType + * @param {String} trialType A String representing the trialType + */ + setTrialType(trialType) { + if((trialType != null) && (!(Object.prototype.toString.call(trialType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: trialType EXPECTED TYPE: String", null, null); + } + this.trialType = trialType; + this.keyModified.set("trial_type", 1); + + } + + /** + * The method to get the trialExpiry + * @returns {String} A String representing the trialExpiry + */ + getTrialExpiry() { + return this.trialExpiry; + + } + + /** + * The method to set the value to trialExpiry + * @param {String} trialExpiry A String representing the trialExpiry + */ + setTrialExpiry(trialExpiry) { + if((trialExpiry != null) && (!(Object.prototype.toString.call(trialExpiry) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: trialExpiry EXPECTED TYPE: String", null, null); + } + this.trialExpiry = trialExpiry; + this.keyModified.set("trial_expiry", 1); + + } + + /** + * The method to get the paid + * @returns {Boolean} A Boolean representing the paid + */ + getPaid() { + return this.paid; + + } + + /** + * The method to set the value to paid + * @param {Boolean} paid A Boolean representing the paid + */ + setPaid(paid) { + if((paid != null) && (!(Object.prototype.toString.call(paid) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paid EXPECTED TYPE: Boolean", null, null); + } + this.paid = paid; + this.keyModified.set("paid", 1); + + } + + /** + * The method to get the paidType + * @returns {String} A String representing the paidType + */ + getPaidType() { + return this.paidType; + + } + + /** + * The method to set the value to paidType + * @param {String} paidType A String representing the paidType + */ + setPaidType(paidType) { + if((paidType != null) && (!(Object.prototype.toString.call(paidType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paidType EXPECTED TYPE: String", null, null); + } + this.paidType = paidType; + this.keyModified.set("paid_type", 1); + + } + + /** + * The method to get the trialAction + * @returns {String} A String representing the trialAction + */ + getTrialAction() { + return this.trialAction; + + } + + /** + * The method to set the value to trialAction + * @param {String} trialAction A String representing the trialAction + */ + setTrialAction(trialAction) { + if((trialAction != null) && (!(Object.prototype.toString.call(trialAction) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: trialAction EXPECTED TYPE: String", null, null); + } + this.trialAction = trialAction; + this.keyModified.set("trial_action", 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 { + LicenseDetails as MasterModel, + LicenseDetails as LicenseDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/org/org.js b/versions/3.0.0/lib/core/com/zoho/crm/api/org/org.js new file mode 100644 index 0000000..396e235 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/org/org.js @@ -0,0 +1,986 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Org{ + + country; + photoId; + city; + description; + mcStatus; + gappsEnabled; + translationEnabled; + street; + domainName; + alias; + currency; + id; + state; + fax; + zip; + employeeCount; + website; + currencySymbol; + mobile; + currencyLocale; + primaryZuid; + ziaPortalId; + timeZone; + zgid; + countryCode; + deletableOrgAccount; + licenseDetails; + hierarchyPreferences; + phone; + companyName; + privacySettings; + primaryEmail; + isoCode; + hipaaComplianceEnabled; + liteUsersEnabled; + maxPerPage; + ezgid; + callIcon; + oauthPresence; + ziaZgid; + checkinPreferences; + keyModified = new Map(); + /** + * The method to get the country + * @returns {String} A String representing the country + */ + getCountry() { + return this.country; + + } + + /** + * The method to set the value to country + * @param {String} country A String representing the country + */ + setCountry(country) { + if((country != null) && (!(Object.prototype.toString.call(country) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: country EXPECTED TYPE: String", null, null); + } + this.country = country; + this.keyModified.set("country", 1); + + } + + /** + * The method to get the photoId + * @returns {String} A String representing the photoId + */ + getPhotoId() { + return this.photoId; + + } + + /** + * The method to set the value to photoId + * @param {String} photoId A String representing the photoId + */ + setPhotoId(photoId) { + if((photoId != null) && (!(Object.prototype.toString.call(photoId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: photoId EXPECTED TYPE: String", null, null); + } + this.photoId = photoId; + this.keyModified.set("photo_id", 1); + + } + + /** + * The method to get the city + * @returns {String} A String representing the city + */ + getCity() { + return this.city; + + } + + /** + * The method to set the value to city + * @param {String} city A String representing the city + */ + setCity(city) { + if((city != null) && (!(Object.prototype.toString.call(city) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: city EXPECTED TYPE: String", null, null); + } + this.city = city; + this.keyModified.set("city", 1); + + } + + /** + * The method to get the description + * @returns {String} A String representing the description + */ + getDescription() { + return this.description; + + } + + /** + * The method to set the value to description + * @param {String} description A String representing the description + */ + setDescription(description) { + if((description != null) && (!(Object.prototype.toString.call(description) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: description EXPECTED TYPE: String", null, null); + } + this.description = description; + this.keyModified.set("description", 1); + + } + + /** + * The method to get the mcStatus + * @returns {Boolean} A Boolean representing the mcStatus + */ + getMcStatus() { + return this.mcStatus; + + } + + /** + * The method to set the value to mcStatus + * @param {Boolean} mcStatus A Boolean representing the mcStatus + */ + setMcStatus(mcStatus) { + if((mcStatus != null) && (!(Object.prototype.toString.call(mcStatus) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: mcStatus EXPECTED TYPE: Boolean", null, null); + } + this.mcStatus = mcStatus; + this.keyModified.set("mc_status", 1); + + } + + /** + * The method to get the gappsEnabled + * @returns {Boolean} A Boolean representing the gappsEnabled + */ + getGappsEnabled() { + return this.gappsEnabled; + + } + + /** + * The method to set the value to gappsEnabled + * @param {Boolean} gappsEnabled A Boolean representing the gappsEnabled + */ + setGappsEnabled(gappsEnabled) { + if((gappsEnabled != null) && (!(Object.prototype.toString.call(gappsEnabled) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: gappsEnabled EXPECTED TYPE: Boolean", null, null); + } + this.gappsEnabled = gappsEnabled; + this.keyModified.set("gapps_enabled", 1); + + } + + /** + * The method to get the translationEnabled + * @returns {Boolean} A Boolean representing the translationEnabled + */ + getTranslationEnabled() { + return this.translationEnabled; + + } + + /** + * The method to set the value to translationEnabled + * @param {Boolean} translationEnabled A Boolean representing the translationEnabled + */ + setTranslationEnabled(translationEnabled) { + if((translationEnabled != null) && (!(Object.prototype.toString.call(translationEnabled) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: translationEnabled EXPECTED TYPE: Boolean", null, null); + } + this.translationEnabled = translationEnabled; + this.keyModified.set("translation_enabled", 1); + + } + + /** + * The method to get the street + * @returns {String} A String representing the street + */ + getStreet() { + return this.street; + + } + + /** + * The method to set the value to street + * @param {String} street A String representing the street + */ + setStreet(street) { + if((street != null) && (!(Object.prototype.toString.call(street) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: street EXPECTED TYPE: String", null, null); + } + this.street = street; + this.keyModified.set("street", 1); + + } + + /** + * The method to get the domainName + * @returns {String} A String representing the domainName + */ + getDomainName() { + return this.domainName; + + } + + /** + * The method to set the value to domainName + * @param {String} domainName A String representing the domainName + */ + setDomainName(domainName) { + if((domainName != null) && (!(Object.prototype.toString.call(domainName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: domainName EXPECTED TYPE: String", null, null); + } + this.domainName = domainName; + this.keyModified.set("domain_name", 1); + + } + + /** + * The method to get the alias + * @returns {String} A String representing the alias + */ + getAlias() { + return this.alias; + + } + + /** + * The method to set the value to alias + * @param {String} alias A String representing the alias + */ + setAlias(alias) { + if((alias != null) && (!(Object.prototype.toString.call(alias) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: alias EXPECTED TYPE: String", null, null); + } + this.alias = alias; + this.keyModified.set("alias", 1); + + } + + /** + * The method to get the currency + * @returns {String} A String representing the currency + */ + getCurrency() { + return this.currency; + + } + + /** + * The method to set the value to currency + * @param {String} currency A String representing the currency + */ + setCurrency(currency) { + if((currency != null) && (!(Object.prototype.toString.call(currency) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: currency EXPECTED TYPE: String", null, null); + } + this.currency = currency; + this.keyModified.set("currency", 1); + + } + + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the state + * @returns {String} A String representing the state + */ + getState() { + return this.state; + + } + + /** + * The method to set the value to state + * @param {String} state A String representing the state + */ + setState(state) { + if((state != null) && (!(Object.prototype.toString.call(state) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: state EXPECTED TYPE: String", null, null); + } + this.state = state; + this.keyModified.set("state", 1); + + } + + /** + * The method to get the fax + * @returns {String} A String representing the fax + */ + getFax() { + return this.fax; + + } + + /** + * The method to set the value to fax + * @param {String} fax A String representing the fax + */ + setFax(fax) { + if((fax != null) && (!(Object.prototype.toString.call(fax) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fax EXPECTED TYPE: String", null, null); + } + this.fax = fax; + this.keyModified.set("fax", 1); + + } + + /** + * The method to get the zip + * @returns {String} A String representing the zip + */ + getZip() { + return this.zip; + + } + + /** + * The method to set the value to zip + * @param {String} zip A String representing the zip + */ + setZip(zip) { + if((zip != null) && (!(Object.prototype.toString.call(zip) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: zip EXPECTED TYPE: String", null, null); + } + this.zip = zip; + this.keyModified.set("zip", 1); + + } + + /** + * The method to get the employeeCount + * @returns {String} A String representing the employeeCount + */ + getEmployeeCount() { + return this.employeeCount; + + } + + /** + * The method to set the value to employeeCount + * @param {String} employeeCount A String representing the employeeCount + */ + setEmployeeCount(employeeCount) { + if((employeeCount != null) && (!(Object.prototype.toString.call(employeeCount) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: employeeCount EXPECTED TYPE: String", null, null); + } + this.employeeCount = employeeCount; + this.keyModified.set("employee_count", 1); + + } + + /** + * The method to get the website + * @returns {String} A String representing the website + */ + getWebsite() { + return this.website; + + } + + /** + * The method to set the value to website + * @param {String} website A String representing the website + */ + setWebsite(website) { + if((website != null) && (!(Object.prototype.toString.call(website) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: website EXPECTED TYPE: String", null, null); + } + this.website = website; + this.keyModified.set("website", 1); + + } + + /** + * The method to get the currencySymbol + * @returns {String} A String representing the currencySymbol + */ + getCurrencySymbol() { + return this.currencySymbol; + + } + + /** + * The method to set the value to currencySymbol + * @param {String} currencySymbol A String representing the currencySymbol + */ + setCurrencySymbol(currencySymbol) { + if((currencySymbol != null) && (!(Object.prototype.toString.call(currencySymbol) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: currencySymbol EXPECTED TYPE: String", null, null); + } + this.currencySymbol = currencySymbol; + this.keyModified.set("currency_symbol", 1); + + } + + /** + * The method to get the mobile + * @returns {String} A String representing the mobile + */ + getMobile() { + return this.mobile; + + } + + /** + * The method to set the value to mobile + * @param {String} mobile A String representing the mobile + */ + setMobile(mobile) { + if((mobile != null) && (!(Object.prototype.toString.call(mobile) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: mobile EXPECTED TYPE: String", null, null); + } + this.mobile = mobile; + this.keyModified.set("mobile", 1); + + } + + /** + * The method to get the currencyLocale + * @returns {String} A String representing the currencyLocale + */ + getCurrencyLocale() { + return this.currencyLocale; + + } + + /** + * The method to set the value to currencyLocale + * @param {String} currencyLocale A String representing the currencyLocale + */ + setCurrencyLocale(currencyLocale) { + if((currencyLocale != null) && (!(Object.prototype.toString.call(currencyLocale) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: currencyLocale EXPECTED TYPE: String", null, null); + } + this.currencyLocale = currencyLocale; + this.keyModified.set("currency_locale", 1); + + } + + /** + * The method to get the primaryZuid + * @returns {String} A String representing the primaryZuid + */ + getPrimaryZuid() { + return this.primaryZuid; + + } + + /** + * The method to set the value to primaryZuid + * @param {String} primaryZuid A String representing the primaryZuid + */ + setPrimaryZuid(primaryZuid) { + if((primaryZuid != null) && (!(Object.prototype.toString.call(primaryZuid) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: primaryZuid EXPECTED TYPE: String", null, null); + } + this.primaryZuid = primaryZuid; + this.keyModified.set("primary_zuid", 1); + + } + + /** + * The method to get the ziaPortalId + * @returns {String} A String representing the ziaPortalId + */ + getZiaPortalId() { + return this.ziaPortalId; + + } + + /** + * The method to set the value to ziaPortalId + * @param {String} ziaPortalId A String representing the ziaPortalId + */ + setZiaPortalId(ziaPortalId) { + if((ziaPortalId != null) && (!(Object.prototype.toString.call(ziaPortalId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ziaPortalId EXPECTED TYPE: String", null, null); + } + this.ziaPortalId = ziaPortalId; + this.keyModified.set("zia_portal_id", 1); + + } + + /** + * The method to get the timeZone + * @returns {TimeZone} An instance of TimeZone + */ + getTimeZone() { + return this.timeZone; + + } + + /** + * The method to set the value to timeZone + * @param {TimeZone} timeZone An instance of TimeZone + */ + async setTimeZone(timeZone) { + this.timeZone = timeZone; + this.keyModified.set("time_zone", 1); + + } + + /** + * The method to get the zgid + * @returns {String} A String representing the zgid + */ + getZgid() { + return this.zgid; + + } + + /** + * The method to set the value to zgid + * @param {String} zgid A String representing the zgid + */ + setZgid(zgid) { + if((zgid != null) && (!(Object.prototype.toString.call(zgid) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: zgid EXPECTED TYPE: String", null, null); + } + this.zgid = zgid; + this.keyModified.set("zgid", 1); + + } + + /** + * The method to get the countryCode + * @returns {String} A String representing the countryCode + */ + getCountryCode() { + return this.countryCode; + + } + + /** + * The method to set the value to countryCode + * @param {String} countryCode A String representing the countryCode + */ + setCountryCode(countryCode) { + if((countryCode != null) && (!(Object.prototype.toString.call(countryCode) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: countryCode EXPECTED TYPE: String", null, null); + } + this.countryCode = countryCode; + this.keyModified.set("country_code", 1); + + } + + /** + * The method to get the deletableOrgAccount + * @returns {Boolean} A Boolean representing the deletableOrgAccount + */ + getDeletableOrgAccount() { + return this.deletableOrgAccount; + + } + + /** + * The method to set the value to deletableOrgAccount + * @param {Boolean} deletableOrgAccount A Boolean representing the deletableOrgAccount + */ + setDeletableOrgAccount(deletableOrgAccount) { + if((deletableOrgAccount != null) && (!(Object.prototype.toString.call(deletableOrgAccount) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deletableOrgAccount EXPECTED TYPE: Boolean", null, null); + } + this.deletableOrgAccount = deletableOrgAccount; + this.keyModified.set("deletable_org_account", 1); + + } + + /** + * The method to get the licenseDetails + * @returns {LicenseDetails} An instance of LicenseDetails + */ + getLicenseDetails() { + return this.licenseDetails; + + } + + /** + * The method to set the value to licenseDetails + * @param {LicenseDetails} licenseDetails An instance of LicenseDetails + */ + async setLicenseDetails(licenseDetails) { + const LicenseDetails = (await (import("./license_details.js"))).MasterModel; + if((licenseDetails != null) && (!(licenseDetails instanceof LicenseDetails))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: licenseDetails EXPECTED TYPE: LicenseDetails", null, null); + } + this.licenseDetails = licenseDetails; + this.keyModified.set("license_details", 1); + + } + + /** + * The method to get the hierarchyPreferences + * @returns {HierarchyPreferences} An instance of HierarchyPreferences + */ + getHierarchyPreferences() { + return this.hierarchyPreferences; + + } + + /** + * The method to set the value to hierarchyPreferences + * @param {HierarchyPreferences} hierarchyPreferences An instance of HierarchyPreferences + */ + async setHierarchyPreferences(hierarchyPreferences) { + const HierarchyPreferences = (await (import("./hierarchy_preferences.js"))).MasterModel; + if((hierarchyPreferences != null) && (!(hierarchyPreferences instanceof HierarchyPreferences))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: hierarchyPreferences EXPECTED TYPE: HierarchyPreferences", null, null); + } + this.hierarchyPreferences = hierarchyPreferences; + this.keyModified.set("hierarchy_preferences", 1); + + } + + /** + * The method to get the phone + * @returns {String} A String representing the phone + */ + getPhone() { + return this.phone; + + } + + /** + * The method to set the value to phone + * @param {String} phone A String representing the phone + */ + setPhone(phone) { + if((phone != null) && (!(Object.prototype.toString.call(phone) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: phone EXPECTED TYPE: String", null, null); + } + this.phone = phone; + this.keyModified.set("phone", 1); + + } + + /** + * The method to get the companyName + * @returns {String} A String representing the companyName + */ + getCompanyName() { + return this.companyName; + + } + + /** + * The method to set the value to companyName + * @param {String} companyName A String representing the companyName + */ + setCompanyName(companyName) { + if((companyName != null) && (!(Object.prototype.toString.call(companyName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: companyName EXPECTED TYPE: String", null, null); + } + this.companyName = companyName; + this.keyModified.set("company_name", 1); + + } + + /** + * The method to get the privacySettings + * @returns {Boolean} A Boolean representing the privacySettings + */ + getPrivacySettings() { + return this.privacySettings; + + } + + /** + * The method to set the value to privacySettings + * @param {Boolean} privacySettings A Boolean representing the privacySettings + */ + setPrivacySettings(privacySettings) { + if((privacySettings != null) && (!(Object.prototype.toString.call(privacySettings) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: privacySettings EXPECTED TYPE: Boolean", null, null); + } + this.privacySettings = privacySettings; + this.keyModified.set("privacy_settings", 1); + + } + + /** + * The method to get the primaryEmail + * @returns {String} A String representing the primaryEmail + */ + getPrimaryEmail() { + return this.primaryEmail; + + } + + /** + * The method to set the value to primaryEmail + * @param {String} primaryEmail A String representing the primaryEmail + */ + setPrimaryEmail(primaryEmail) { + if((primaryEmail != null) && (!(Object.prototype.toString.call(primaryEmail) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: primaryEmail EXPECTED TYPE: String", null, null); + } + this.primaryEmail = primaryEmail; + this.keyModified.set("primary_email", 1); + + } + + /** + * The method to get the isoCode + * @returns {String} A String representing the isoCode + */ + getIsoCode() { + return this.isoCode; + + } + + /** + * The method to set the value to isoCode + * @param {String} isoCode A String representing the isoCode + */ + setIsoCode(isoCode) { + if((isoCode != null) && (!(Object.prototype.toString.call(isoCode) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: isoCode EXPECTED TYPE: String", null, null); + } + this.isoCode = isoCode; + this.keyModified.set("iso_code", 1); + + } + + /** + * The method to get the hipaaComplianceEnabled + * @returns {Boolean} A Boolean representing the hipaaComplianceEnabled + */ + getHipaaComplianceEnabled() { + return this.hipaaComplianceEnabled; + + } + + /** + * The method to set the value to hipaaComplianceEnabled + * @param {Boolean} hipaaComplianceEnabled A Boolean representing the hipaaComplianceEnabled + */ + setHipaaComplianceEnabled(hipaaComplianceEnabled) { + if((hipaaComplianceEnabled != null) && (!(Object.prototype.toString.call(hipaaComplianceEnabled) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: hipaaComplianceEnabled EXPECTED TYPE: Boolean", null, null); + } + this.hipaaComplianceEnabled = hipaaComplianceEnabled; + this.keyModified.set("hipaa_compliance_enabled", 1); + + } + + /** + * The method to get the liteUsersEnabled + * @returns {Boolean} A Boolean representing the liteUsersEnabled + */ + getLiteUsersEnabled() { + return this.liteUsersEnabled; + + } + + /** + * The method to set the value to liteUsersEnabled + * @param {Boolean} liteUsersEnabled A Boolean representing the liteUsersEnabled + */ + setLiteUsersEnabled(liteUsersEnabled) { + if((liteUsersEnabled != null) && (!(Object.prototype.toString.call(liteUsersEnabled) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: liteUsersEnabled EXPECTED TYPE: Boolean", null, null); + } + this.liteUsersEnabled = liteUsersEnabled; + this.keyModified.set("lite_users_enabled", 1); + + } + + /** + * The method to get the maxPerPage + * @returns {number} A number representing the maxPerPage + */ + getMaxPerPage() { + return this.maxPerPage; + + } + + /** + * The method to set the value to maxPerPage + * @param {number} maxPerPage A number representing the maxPerPage + */ + setMaxPerPage(maxPerPage) { + if((maxPerPage != null) && (!(Object.prototype.toString.call(maxPerPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: maxPerPage EXPECTED TYPE: number", null, null); + } + this.maxPerPage = maxPerPage; + this.keyModified.set("max_per_page", 1); + + } + + /** + * The method to get the ezgid + * @returns {String} A String representing the ezgid + */ + getEzgid() { + return this.ezgid; + + } + + /** + * The method to set the value to ezgid + * @param {String} ezgid A String representing the ezgid + */ + setEzgid(ezgid) { + if((ezgid != null) && (!(Object.prototype.toString.call(ezgid) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ezgid EXPECTED TYPE: String", null, null); + } + this.ezgid = ezgid; + this.keyModified.set("ezgid", 1); + + } + + /** + * The method to get the callIcon + * @returns {String} A String representing the callIcon + */ + getCallIcon() { + return this.callIcon; + + } + + /** + * The method to set the value to callIcon + * @param {String} callIcon A String representing the callIcon + */ + setCallIcon(callIcon) { + if((callIcon != null) && (!(Object.prototype.toString.call(callIcon) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: callIcon EXPECTED TYPE: String", null, null); + } + this.callIcon = callIcon; + this.keyModified.set("call_icon", 1); + + } + + /** + * The method to get the oauthPresence + * @returns {Boolean} A Boolean representing the oauthPresence + */ + getOauthPresence() { + return this.oauthPresence; + + } + + /** + * The method to set the value to oauthPresence + * @param {Boolean} oauthPresence A Boolean representing the oauthPresence + */ + setOauthPresence(oauthPresence) { + if((oauthPresence != null) && (!(Object.prototype.toString.call(oauthPresence) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: oauthPresence EXPECTED TYPE: Boolean", null, null); + } + this.oauthPresence = oauthPresence; + this.keyModified.set("oauth_presence", 1); + + } + + /** + * The method to get the ziaZgid + * @returns {number} A number representing the ziaZgid + */ + getZiaZgid() { + return this.ziaZgid; + + } + + /** + * The method to set the value to ziaZgid + * @param {number} ziaZgid A number representing the ziaZgid + */ + setZiaZgid(ziaZgid) { + if((ziaZgid != null) && (!(Object.prototype.toString.call(ziaZgid) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ziaZgid EXPECTED TYPE: number", null, null); + } + this.ziaZgid = ziaZgid; + this.keyModified.set("zia_zgid", 1); + + } + + /** + * The method to get the checkinPreferences + * @returns {CheckinPreferences} An instance of CheckinPreferences + */ + getCheckinPreferences() { + return this.checkinPreferences; + + } + + /** + * The method to set the value to checkinPreferences + * @param {CheckinPreferences} checkinPreferences An instance of CheckinPreferences + */ + async setCheckinPreferences(checkinPreferences) { + const CheckinPreferences = (await (import("./checkin_preferences.js"))).MasterModel; + if((checkinPreferences != null) && (!(checkinPreferences instanceof CheckinPreferences))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: checkinPreferences EXPECTED TYPE: CheckinPreferences", null, null); + } + this.checkinPreferences = checkinPreferences; + this.keyModified.set("checkin_preferences", 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 { + Org as MasterModel, + Org as Org +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/org/org_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/org/org_operations.js new file mode 100644 index 0000000..e666e09 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/org/org_operations.js @@ -0,0 +1,56 @@ +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 OrgOperations{ + /** + * The method to get organization + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getOrganization() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/org"); + 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"); + + } + + /** + * The method to upload organization photo + * @param {FileBodyWrapper} request An instance of FileBodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async uploadOrganizationPhoto(request) { + const FileBodyWrapper = (await (import("./file_body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof FileBodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: FileBodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/org/photo"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("multipart/form-data"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +export { + OrgOperations as MasterModel, + OrgOperations as OrgOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/org/resource.js b/versions/3.0.0/lib/core/com/zoho/crm/api/org/resource.js new file mode 100644 index 0000000..9a08222 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/org/resource.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Resource{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Resource as MasterModel, + Resource as Resource +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/org/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/org/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/org/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/org/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/org/response_wrapper.js new file mode 100644 index 0000000..aea7928 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/org/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + org; + keyModified = new Map(); + /** + * The method to get the org + * @returns {Array} An Array representing the org + */ + getOrg() { + return this.org; + + } + + /** + * The method to set the value to org + * @param {Array} org An Array representing the org + */ + setOrg(org) { + if((org != null) && (!(Object.prototype.toString.call(org) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: org EXPECTED TYPE: Array", null, null); + } + this.org = org; + this.keyModified.set("org", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/org/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/org/success_response.js new file mode 100644 index 0000000..e6c4d45 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/org/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/action_wrapper.js new file mode 100644 index 0000000..f674f9e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + pipeline; + keyModified = new Map(); + /** + * The method to get the pipeline + * @returns {Array} An Array representing the pipeline + */ + getPipeline() { + return this.pipeline; + + } + + /** + * The method to set the value to pipeline + * @param {Array} pipeline An Array representing the pipeline + */ + setPipeline(pipeline) { + if((pipeline != null) && (!(Object.prototype.toString.call(pipeline) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pipeline EXPECTED TYPE: Array", null, null); + } + this.pipeline = pipeline; + this.keyModified.set("pipeline", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/api_exception.js new file mode 100644 index 0000000..db2d361 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/body_wrapper.js new file mode 100644 index 0000000..09fbbe5 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + pipeline; + keyModified = new Map(); + /** + * The method to get the pipeline + * @returns {Array} An Array representing the pipeline + */ + getPipeline() { + return this.pipeline; + + } + + /** + * The method to set the value to pipeline + * @param {Array} pipeline An Array representing the pipeline + */ + setPipeline(pipeline) { + if((pipeline != null) && (!(Object.prototype.toString.call(pipeline) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pipeline EXPECTED TYPE: Array", null, null); + } + this.pipeline = pipeline; + this.keyModified.set("pipeline", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/d_pipeline.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/d_pipeline.js new file mode 100644 index 0000000..22b89a3 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/d_pipeline.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DPipeline{ + + delete1; + keyModified = new Map(); + /** + * The method to get the delete + * @returns {Delete} An instance of Delete + */ + getDelete() { + return this.delete1; + + } + + /** + * The method to set the value to delete + * @param {Delete} delete1 An instance of Delete + */ + async setDelete(delete1) { + const Delete = (await (import("./delete.js"))).MasterModel; + if((delete1 != null) && (!(delete1 instanceof Delete))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: delete1 EXPECTED TYPE: Delete", null, null); + } + this.delete1 = delete1; + this.keyModified.set("_delete", 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 { + DPipeline as MasterModel, + DPipeline as DPipeline +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/d_pipeline_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/d_pipeline_wrapper.js new file mode 100644 index 0000000..bfa6e8e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/d_pipeline_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DPipelineWrapper{ + + pipeline; + keyModified = new Map(); + /** + * The method to get the pipeline + * @returns {Array} An Array representing the pipeline + */ + getPipeline() { + return this.pipeline; + + } + + /** + * The method to set the value to pipeline + * @param {Array} pipeline An Array representing the pipeline + */ + setPipeline(pipeline) { + if((pipeline != null) && (!(Object.prototype.toString.call(pipeline) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pipeline EXPECTED TYPE: Array", null, null); + } + this.pipeline = pipeline; + this.keyModified.set("pipeline", 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 { + DPipelineWrapper as MasterModel, + DPipelineWrapper as DPipelineWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/delete.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/delete.js new file mode 100644 index 0000000..11ab809 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/delete.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Delete{ + + permanent; + keyModified = new Map(); + /** + * The method to get the permanent + * @returns {Boolean} A Boolean representing the permanent + */ + getPermanent() { + return this.permanent; + + } + + /** + * The method to set the value to permanent + * @param {Boolean} permanent A Boolean representing the permanent + */ + setPermanent(permanent) { + if((permanent != null) && (!(Object.prototype.toString.call(permanent) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: permanent EXPECTED TYPE: Boolean", null, null); + } + this.permanent = permanent; + this.keyModified.set("permanent", 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 { + Delete as MasterModel, + Delete as Delete +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/forecast_category.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/forecast_category.js new file mode 100644 index 0000000..da684a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/forecast_category.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ForecastCategory{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + ForecastCategory as MasterModel, + ForecastCategory as ForecastCategory +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/import_pipeline.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/import_pipeline.js new file mode 100644 index 0000000..4cb20e5 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/import_pipeline.js @@ -0,0 +1,30 @@ +export { TPipeline } from "./t_pipeline.js"; +export * as TransferPipelineActionResponse from "./transfer_pipeline_action_response.js"; +export { RegexDetails } from "./regex_details.js"; +export { TransferPipelineWrapper } from "./transfer_pipeline_wrapper.js"; +export { DPipelineWrapper } from "./d_pipeline_wrapper.js"; +export * as ResponseHandler from "./response_handler.js"; +export * as ActionHandler from "./action_handler.js"; +export { PipelineOperations } from "./pipeline_operations.js"; +export { GetPipelinesParam } from "./pipeline_operations.js"; +export { CreatePipelineParam } from "./pipeline_operations.js"; +export { UpdatePipelinesParam } from "./pipeline_operations.js"; +export { GetpipelineParam } from "./pipeline_operations.js"; +export { UpdatePipelineParam } from "./pipeline_operations.js"; +export { TransferPipelinesParam } from "./pipeline_operations.js"; +export { DPipeline } from "./d_pipeline.js"; +export { MandatoryDetails } from "./mandatory_details.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { APIException } from "./api_exception.js"; +export { TransferPipelineSuccessResponse } from "./transfer_pipeline_success_response.js"; +export { Maps } from "./maps.js"; +export { TransferPipeline } from "./transfer_pipeline.js"; +export { ForecastCategory } from "./forecast_category.js"; +export { Stages } from "./stages.js"; +export { Delete } from "./delete.js"; +export * as ActionResponse from "./action_response.js"; +export { TransferPipelineActionWrapper } from "./transfer_pipeline_action_wrapper.js"; +export * as TransferPipelineActionHandler from "./transfer_pipeline_action_handler.js"; +export { Pipeline } from "./pipeline.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { SuccessResponse } from "./success_response.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/mandatory_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/mandatory_details.js new file mode 100644 index 0000000..aed5745 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/mandatory_details.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MandatoryDetails{ + + apiName; + jsonPath; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the jsonPath + * @returns {String} A String representing the jsonPath + */ + getJsonPath() { + return this.jsonPath; + + } + + /** + * The method to set the value to jsonPath + * @param {String} jsonPath A String representing the jsonPath + */ + setJsonPath(jsonPath) { + if((jsonPath != null) && (!(Object.prototype.toString.call(jsonPath) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jsonPath EXPECTED TYPE: String", null, null); + } + this.jsonPath = jsonPath; + this.keyModified.set("json_path", 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 { + MandatoryDetails as MasterModel, + MandatoryDetails as MandatoryDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/maps.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/maps.js new file mode 100644 index 0000000..4ceac94 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/maps.js @@ -0,0 +1,228 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Maps{ + + displayValue; + sequenceNumber; + forecastCategory; + delete1; + actualValue; + id; + colourCode; + forecastType; + keyModified = new Map(); + /** + * The method to get the displayValue + * @returns {String} A String representing the displayValue + */ + getDisplayValue() { + return this.displayValue; + + } + + /** + * The method to set the value to displayValue + * @param {String} displayValue A String representing the displayValue + */ + setDisplayValue(displayValue) { + if((displayValue != null) && (!(Object.prototype.toString.call(displayValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayValue EXPECTED TYPE: String", null, null); + } + this.displayValue = displayValue; + this.keyModified.set("display_value", 1); + + } + + /** + * The method to get the sequenceNumber + * @returns {number} A number representing the sequenceNumber + */ + getSequenceNumber() { + return this.sequenceNumber; + + } + + /** + * The method to set the value to sequenceNumber + * @param {number} sequenceNumber A number representing the sequenceNumber + */ + setSequenceNumber(sequenceNumber) { + if((sequenceNumber != null) && (!(Object.prototype.toString.call(sequenceNumber) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sequenceNumber EXPECTED TYPE: number", null, null); + } + this.sequenceNumber = sequenceNumber; + this.keyModified.set("sequence_number", 1); + + } + + /** + * The method to get the forecastCategory + * @returns {ForecastCategory} An instance of ForecastCategory + */ + getForecastCategory() { + return this.forecastCategory; + + } + + /** + * The method to set the value to forecastCategory + * @param {ForecastCategory} forecastCategory An instance of ForecastCategory + */ + async setForecastCategory(forecastCategory) { + const ForecastCategory = (await (import("./forecast_category.js"))).MasterModel; + if((forecastCategory != null) && (!(forecastCategory instanceof ForecastCategory))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: forecastCategory EXPECTED TYPE: ForecastCategory", null, null); + } + this.forecastCategory = forecastCategory; + this.keyModified.set("forecast_category", 1); + + } + + /** + * The method to get the delete + * @returns {Boolean} A Boolean representing the delete1 + */ + getDelete() { + return this.delete1; + + } + + /** + * The method to set the value to delete + * @param {Boolean} delete1 A Boolean representing the delete1 + */ + setDelete(delete1) { + if((delete1 != null) && (!(Object.prototype.toString.call(delete1) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: delete1 EXPECTED TYPE: Boolean", null, null); + } + this.delete1 = delete1; + this.keyModified.set("_delete", 1); + + } + + /** + * The method to get the actualValue + * @returns {String} A String representing the actualValue + */ + getActualValue() { + return this.actualValue; + + } + + /** + * The method to set the value to actualValue + * @param {String} actualValue A String representing the actualValue + */ + setActualValue(actualValue) { + if((actualValue != null) && (!(Object.prototype.toString.call(actualValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: actualValue EXPECTED TYPE: String", null, null); + } + this.actualValue = actualValue; + this.keyModified.set("actual_value", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the colourCode + * @returns {String} A String representing the colourCode + */ + getColourCode() { + return this.colourCode; + + } + + /** + * The method to set the value to colourCode + * @param {String} colourCode A String representing the colourCode + */ + setColourCode(colourCode) { + if((colourCode != null) && (!(Object.prototype.toString.call(colourCode) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: colourCode EXPECTED TYPE: String", null, null); + } + this.colourCode = colourCode; + this.keyModified.set("colour_code", 1); + + } + + /** + * The method to get the forecastType + * @returns {String} A String representing the forecastType + */ + getForecastType() { + return this.forecastType; + + } + + /** + * The method to set the value to forecastType + * @param {String} forecastType A String representing the forecastType + */ + setForecastType(forecastType) { + if((forecastType != null) && (!(Object.prototype.toString.call(forecastType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: forecastType EXPECTED TYPE: String", null, null); + } + this.forecastType = forecastType; + this.keyModified.set("forecast_type", 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 { + Maps as MasterModel, + Maps as Maps +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/pipeline.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/pipeline.js new file mode 100644 index 0000000..5cccff9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/pipeline.js @@ -0,0 +1,204 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Pipeline{ + + displayValue; + default1; + maps; + actualValue; + id; + childAvailable; + parent; + keyModified = new Map(); + /** + * The method to get the displayValue + * @returns {String} A String representing the displayValue + */ + getDisplayValue() { + return this.displayValue; + + } + + /** + * The method to set the value to displayValue + * @param {String} displayValue A String representing the displayValue + */ + setDisplayValue(displayValue) { + if((displayValue != null) && (!(Object.prototype.toString.call(displayValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayValue EXPECTED TYPE: String", null, null); + } + this.displayValue = displayValue; + this.keyModified.set("display_value", 1); + + } + + /** + * The method to get the default + * @returns {Boolean} A Boolean representing the default1 + */ + getDefault() { + return this.default1; + + } + + /** + * The method to set the value to default + * @param {Boolean} default1 A Boolean representing the default1 + */ + setDefault(default1) { + if((default1 != null) && (!(Object.prototype.toString.call(default1) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: default1 EXPECTED TYPE: Boolean", null, null); + } + this.default1 = default1; + this.keyModified.set("default", 1); + + } + + /** + * The method to get the maps + * @returns {Array} An Array representing the maps + */ + getMaps() { + return this.maps; + + } + + /** + * The method to set the value to maps + * @param {Array} maps An Array representing the maps + */ + setMaps(maps) { + if((maps != null) && (!(Object.prototype.toString.call(maps) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: maps EXPECTED TYPE: Array", null, null); + } + this.maps = maps; + this.keyModified.set("maps", 1); + + } + + /** + * The method to get the actualValue + * @returns {String} A String representing the actualValue + */ + getActualValue() { + return this.actualValue; + + } + + /** + * The method to set the value to actualValue + * @param {String} actualValue A String representing the actualValue + */ + setActualValue(actualValue) { + if((actualValue != null) && (!(Object.prototype.toString.call(actualValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: actualValue EXPECTED TYPE: String", null, null); + } + this.actualValue = actualValue; + this.keyModified.set("actual_value", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the childAvailable + * @returns {Boolean} A Boolean representing the childAvailable + */ + getChildAvailable() { + return this.childAvailable; + + } + + /** + * The method to set the value to childAvailable + * @param {Boolean} childAvailable A Boolean representing the childAvailable + */ + setChildAvailable(childAvailable) { + if((childAvailable != null) && (!(Object.prototype.toString.call(childAvailable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: childAvailable EXPECTED TYPE: Boolean", null, null); + } + this.childAvailable = childAvailable; + this.keyModified.set("child_available", 1); + + } + + /** + * The method to get the parent + * @returns {Pipeline} An instance of Pipeline + */ + getParent() { + return this.parent; + + } + + /** + * The method to set the value to parent + * @param {Pipeline} parent An instance of Pipeline + */ + setParent(parent) { + if((parent != null) && (!(parent instanceof Pipeline))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: parent EXPECTED TYPE: Pipeline", null, null); + } + this.parent = parent; + this.keyModified.set("parent", 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 { + Pipeline as MasterModel, + Pipeline as Pipeline +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/pipeline_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/pipeline_operations.js new file mode 100644 index 0000000..d66f1fd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/pipeline_operations.js @@ -0,0 +1,211 @@ +import {Param} from "../../../../../../routes/param.js"; +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 PipelineOperations{ + + layoutId; + /** + * Creates an instance of PipelineOperations with the given parameters + * @param {BigInt} layoutId A BigInt representing the layoutId + */ + constructor(layoutId=null){ + if((layoutId != null) && (!(Object.prototype.toString.call(layoutId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: layoutId EXPECTED TYPE: BigInt", null, null); + } + this.layoutId = layoutId; + + } + + /** + * The method to get pipelines + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getPipelines() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/pipeline"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addParam(new Param("layout_id", "com.zoho.crm.api.Pipeline.GetPipelinesParam"), this.layoutId).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to create pipeline + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createPipeline(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/pipeline"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + await handlerInstance.addParam(new Param("layout_id", "com.zoho.crm.api.Pipeline.CreatePipelineParam"), this.layoutId).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update pipelines + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updatePipelines(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/pipeline"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + await handlerInstance.addParam(new Param("layout_id", "com.zoho.crm.api.Pipeline.UpdatePipelinesParam"), this.layoutId).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get pipeline + * @param {BigInt} id A BigInt representing the id + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getPipeline(id) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/pipeline/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addParam(new Param("layout_id", "com.zoho.crm.api.Pipeline.GetpipelineParam"), this.layoutId).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to update pipeline + * @param {BigInt} id A BigInt representing the id + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updatePipeline(id, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/pipeline/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PATCH); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + await handlerInstance.addParam(new Param("layout_id", "com.zoho.crm.api.Pipeline.UpdatePipelineParam"), this.layoutId).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to transfer pipelines + * @param {TransferPipelineWrapper} request An instance of TransferPipelineWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async transferPipelines(request) { + const TransferPipelineWrapper = (await (import("./transfer_pipeline_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof TransferPipelineWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: TransferPipelineWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/pipeline/actions/transfer"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + await handlerInstance.addParam(new Param("layout_id", "com.zoho.crm.api.Pipeline.TransferPipelinesParam"), this.layoutId).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let TransferPipelineActionHandler = require.resolve("./transfer_pipeline_action_handler.js"); + return handlerInstance.apiCall(TransferPipelineActionHandler, "application/json"); + + } + +} +class GetPipelinesParam{ + +} + +class CreatePipelineParam{ + +} + +class UpdatePipelinesParam{ + +} + +class GetpipelineParam{ + +} + +class UpdatePipelineParam{ + +} + +class TransferPipelinesParam{ + +} + +export { + TransferPipelinesParam as TransferPipelinesParam, + GetpipelineParam as GetpipelineParam, + GetPipelinesParam as GetPipelinesParam, + PipelineOperations as MasterModel, + PipelineOperations as PipelineOperations, + UpdatePipelinesParam as UpdatePipelinesParam, + UpdatePipelineParam as UpdatePipelineParam, + CreatePipelineParam as CreatePipelineParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/regex_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/regex_details.js new file mode 100644 index 0000000..44754dd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/regex_details.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RegexDetails{ + + apiName; + jsonPath; + regex; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the jsonPath + * @returns {String} A String representing the jsonPath + */ + getJsonPath() { + return this.jsonPath; + + } + + /** + * The method to set the value to jsonPath + * @param {String} jsonPath A String representing the jsonPath + */ + setJsonPath(jsonPath) { + if((jsonPath != null) && (!(Object.prototype.toString.call(jsonPath) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jsonPath EXPECTED TYPE: String", null, null); + } + this.jsonPath = jsonPath; + this.keyModified.set("json_path", 1); + + } + + /** + * The method to get the regex + * @returns {String} A String representing the regex + */ + getRegex() { + return this.regex; + + } + + /** + * The method to set the value to regex + * @param {String} regex A String representing the regex + */ + setRegex(regex) { + if((regex != null) && (!(Object.prototype.toString.call(regex) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: regex EXPECTED TYPE: String", null, null); + } + this.regex = regex; + this.keyModified.set("regex", 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 { + RegexDetails as MasterModel, + RegexDetails as RegexDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/stages.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/stages.js new file mode 100644 index 0000000..e62437b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/stages.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Stages{ + + from; + to; + keyModified = new Map(); + /** + * The method to get the from + * @returns {BigInt} A BigInt representing the from + */ + getFrom() { + return this.from; + + } + + /** + * The method to set the value to from + * @param {BigInt} from A BigInt representing the from + */ + setFrom(from) { + if((from != null) && (!(Object.prototype.toString.call(from) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: from EXPECTED TYPE: BigInt", null, null); + } + this.from = from; + this.keyModified.set("from", 1); + + } + + /** + * The method to get the to + * @returns {BigInt} A BigInt representing the to + */ + getTo() { + return this.to; + + } + + /** + * The method to set the value to to + * @param {BigInt} to A BigInt representing the to + */ + setTo(to) { + if((to != null) && (!(Object.prototype.toString.call(to) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: to EXPECTED TYPE: BigInt", null, null); + } + this.to = to; + this.keyModified.set("to", 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 { + Stages as MasterModel, + Stages as Stages +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/success_response.js new file mode 100644 index 0000000..e8b71a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/t_pipeline.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/t_pipeline.js new file mode 100644 index 0000000..a70d70e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/t_pipeline.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class TPipeline{ + + from; + to; + keyModified = new Map(); + /** + * The method to get the from + * @returns {BigInt} A BigInt representing the from + */ + getFrom() { + return this.from; + + } + + /** + * The method to set the value to from + * @param {BigInt} from A BigInt representing the from + */ + setFrom(from) { + if((from != null) && (!(Object.prototype.toString.call(from) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: from EXPECTED TYPE: BigInt", null, null); + } + this.from = from; + this.keyModified.set("from", 1); + + } + + /** + * The method to get the to + * @returns {BigInt} A BigInt representing the to + */ + getTo() { + return this.to; + + } + + /** + * The method to set the value to to + * @param {BigInt} to A BigInt representing the to + */ + setTo(to) { + if((to != null) && (!(Object.prototype.toString.call(to) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: to EXPECTED TYPE: BigInt", null, null); + } + this.to = to; + this.keyModified.set("to", 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 { + TPipeline as MasterModel, + TPipeline as TPipeline +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline.js new file mode 100644 index 0000000..fa08cce --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class TransferPipeline{ + + pipeline; + stages; + keyModified = new Map(); + /** + * The method to get the pipeline + * @returns {TPipeline} An instance of TPipeline + */ + getPipeline() { + return this.pipeline; + + } + + /** + * The method to set the value to pipeline + * @param {TPipeline} pipeline An instance of TPipeline + */ + async setPipeline(pipeline) { + const TPipeline = (await (import("./t_pipeline.js"))).MasterModel; + if((pipeline != null) && (!(pipeline instanceof TPipeline))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pipeline EXPECTED TYPE: TPipeline", null, null); + } + this.pipeline = pipeline; + this.keyModified.set("pipeline", 1); + + } + + /** + * The method to get the stages + * @returns {Array} An Array representing the stages + */ + getStages() { + return this.stages; + + } + + /** + * The method to set the value to stages + * @param {Array} stages An Array representing the stages + */ + setStages(stages) { + if((stages != null) && (!(Object.prototype.toString.call(stages) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: stages EXPECTED TYPE: Array", null, null); + } + this.stages = stages; + this.keyModified.set("stages", 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 { + TransferPipeline as MasterModel, + TransferPipeline as TransferPipeline +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_action_handler.js new file mode 100644 index 0000000..f27696a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_action_handler.js @@ -0,0 +1,7 @@ +class TransferPipelineActionHandler{ + +} +export { + TransferPipelineActionHandler as MasterModel, + TransferPipelineActionHandler as TransferPipelineActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_action_response.js new file mode 100644 index 0000000..3d15f0b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_action_response.js @@ -0,0 +1,7 @@ +class TransferPipelineActionResponse{ + +} +export { + TransferPipelineActionResponse as MasterModel, + TransferPipelineActionResponse as TransferPipelineActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_action_wrapper.js new file mode 100644 index 0000000..f4b4e15 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class TransferPipelineActionWrapper{ + + transferPipeline; + keyModified = new Map(); + /** + * The method to get the transferPipeline + * @returns {Array} An Array representing the transferPipeline + */ + getTransferPipeline() { + return this.transferPipeline; + + } + + /** + * The method to set the value to transferPipeline + * @param {Array} transferPipeline An Array representing the transferPipeline + */ + setTransferPipeline(transferPipeline) { + if((transferPipeline != null) && (!(Object.prototype.toString.call(transferPipeline) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: transferPipeline EXPECTED TYPE: Array", null, null); + } + this.transferPipeline = transferPipeline; + this.keyModified.set("transfer_pipeline", 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 { + TransferPipelineActionWrapper as MasterModel, + TransferPipelineActionWrapper as TransferPipelineActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_success_response.js new file mode 100644 index 0000000..c219ea6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class TransferPipelineSuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + TransferPipelineSuccessResponse as MasterModel, + TransferPipelineSuccessResponse as TransferPipelineSuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_wrapper.js new file mode 100644 index 0000000..c542941 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/pipeline/transfer_pipeline_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class TransferPipelineWrapper{ + + transferPipeline; + keyModified = new Map(); + /** + * The method to get the transferPipeline + * @returns {Array} An Array representing the transferPipeline + */ + getTransferPipeline() { + return this.transferPipeline; + + } + + /** + * The method to set the value to transferPipeline + * @param {Array} transferPipeline An Array representing the transferPipeline + */ + setTransferPipeline(transferPipeline) { + if((transferPipeline != null) && (!(Object.prototype.toString.call(transferPipeline) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: transferPipeline EXPECTED TYPE: Array", null, null); + } + this.transferPipeline = transferPipeline; + this.keyModified.set("transfer_pipeline", 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 { + TransferPipelineWrapper as MasterModel, + TransferPipelineWrapper as TransferPipelineWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/action_wrapper.js new file mode 100644 index 0000000..89cce59 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + portalInvite; + keyModified = new Map(); + /** + * The method to get the portalInvite + * @returns {Array} An Array representing the portalInvite + */ + getPortalInvite() { + return this.portalInvite; + + } + + /** + * The method to set the value to portalInvite + * @param {Array} portalInvite An Array representing the portalInvite + */ + setPortalInvite(portalInvite) { + if((portalInvite != null) && (!(Object.prototype.toString.call(portalInvite) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: portalInvite EXPECTED TYPE: Array", null, null); + } + this.portalInvite = portalInvite; + this.keyModified.set("portal_invite", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/api_exception.js new file mode 100644 index 0000000..35bf8ba --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/body_wrapper.js new file mode 100644 index 0000000..0e83804 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + portalInvite; + keyModified = new Map(); + /** + * The method to get the portalInvite + * @returns {Array} An Array representing the portalInvite + */ + getPortalInvite() { + return this.portalInvite; + + } + + /** + * The method to set the value to portalInvite + * @param {Array} portalInvite An Array representing the portalInvite + */ + setPortalInvite(portalInvite) { + if((portalInvite != null) && (!(Object.prototype.toString.call(portalInvite) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: portalInvite EXPECTED TYPE: Array", null, null); + } + this.portalInvite = portalInvite; + this.keyModified.set("portal_invite", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/data.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/data.js new file mode 100644 index 0000000..5d2e308 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/data.js @@ -0,0 +1,7 @@ +class Data{ + +} +export { + Data as MasterModel, + Data as Data +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/import_portal_invite.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/import_portal_invite.js new file mode 100644 index 0000000..6d1a303 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/import_portal_invite.js @@ -0,0 +1,13 @@ +export { SuccessResponse } from "./success_response.js"; +export * as ActionHandler from "./action_handler.js"; +export { JobResponse } from "./job_response.js"; +export * as ActionResponse from "./action_response.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { PortalInviteOperations } from "./portal_invite_operations.js"; +export { InviteUsersParam } from "./portal_invite_operations.js"; +export * as Data from "./data.js"; +export { APIException } from "./api_exception.js"; +export { Portal } from "./portal.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { PortalInvite } from "./portal_invite.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/job_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/job_response.js new file mode 100644 index 0000000..a20e6b1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/job_response.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class JobResponse{ + + data; + jobId; + status; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 1); + + } + + /** + * The method to get the jobId + * @returns {BigInt} A BigInt representing the jobId + */ + getJobId() { + return this.jobId; + + } + + /** + * The method to set the value to jobId + * @param {BigInt} jobId A BigInt representing the jobId + */ + setJobId(jobId) { + if((jobId != null) && (!(Object.prototype.toString.call(jobId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jobId EXPECTED TYPE: BigInt", null, null); + } + this.jobId = jobId; + this.keyModified.set("job_id", 1); + + } + + /** + * The method to get the status + * @returns {String} A String representing the status + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {String} status A String representing the status + */ + setStatus(status) { + if((status != null) && (!(Object.prototype.toString.call(status) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: String", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + JobResponse as MasterModel, + JobResponse as JobResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/portal.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/portal.js new file mode 100644 index 0000000..9277d78 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/portal.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Portal{ + + id; + userTypeId; + type; + language; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the userTypeId + * @returns {BigInt} A BigInt representing the userTypeId + */ + getUserTypeId() { + return this.userTypeId; + + } + + /** + * The method to set the value to userTypeId + * @param {BigInt} userTypeId A BigInt representing the userTypeId + */ + setUserTypeId(userTypeId) { + if((userTypeId != null) && (!(Object.prototype.toString.call(userTypeId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: userTypeId EXPECTED TYPE: BigInt", null, null); + } + this.userTypeId = userTypeId; + this.keyModified.set("user_type_id", 1); + + } + + /** + * The method to get the type + * @returns {Choice} An instance of Choice + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {Choice} type An instance of Choice + */ + setType(type) { + if((type != null) && (!(type instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: Choice", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the language + * @returns {Choice} An instance of Choice + */ + getLanguage() { + return this.language; + + } + + /** + * The method to set the value to language + * @param {Choice} language An instance of Choice + */ + setLanguage(language) { + if((language != null) && (!(language instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: language EXPECTED TYPE: Choice", null, null); + } + this.language = language; + this.keyModified.set("language", 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 { + Portal as MasterModel, + Portal as Portal +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/portal_invite.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/portal_invite.js new file mode 100644 index 0000000..823d49f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/portal_invite.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class PortalInvite{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + PortalInvite as MasterModel, + PortalInvite as PortalInvite +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/portal_invite_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/portal_invite_operations.js new file mode 100644 index 0000000..663e41a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/portal_invite_operations.js @@ -0,0 +1,67 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 PortalInviteOperations{ + + module; + /** + * Creates an instance of PortalInviteOperations with the given parameters + * @param {String} module A String representing the module + */ + constructor(module){ + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + this.module = module; + + } + + /** + * The method to invite users + * @param {BigInt} record A BigInt representing the record + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async inviteUsers(record, paramInstance=null) { + if((!(Object.prototype.toString.call(record) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: record EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.module.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(record.toString()); + apiPath = apiPath.concat("/actions/portal_invite"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class InviteUsersParam{ + + static USER_TYPE_ID = new Param("user_type_id", "com.zoho.crm.api.PortalInvite.InviteUsersParam"); + static TYPE = new Param("type", "com.zoho.crm.api.PortalInvite.InviteUsersParam"); + static LANGUAGE = new Param("language", "com.zoho.crm.api.PortalInvite.InviteUsersParam"); +} + +export { + PortalInviteOperations as MasterModel, + PortalInviteOperations as PortalInviteOperations, + InviteUsersParam as InviteUsersParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/response_wrapper.js new file mode 100644 index 0000000..be9790b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + portalInvite; + keyModified = new Map(); + /** + * The method to get the portalInvite + * @returns {Array} An Array representing the portalInvite + */ + getPortalInvite() { + return this.portalInvite; + + } + + /** + * The method to set the value to portalInvite + * @param {Array} portalInvite An Array representing the portalInvite + */ + setPortalInvite(portalInvite) { + if((portalInvite != null) && (!(Object.prototype.toString.call(portalInvite) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: portalInvite EXPECTED TYPE: Array", null, null); + } + this.portalInvite = portalInvite; + this.keyModified.set("portal_invite", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/success_response.js new file mode 100644 index 0000000..e8b71a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_invite/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/api_exception.js new file mode 100644 index 0000000..35d7ece --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + details; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/fields.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/fields.js new file mode 100644 index 0000000..b0fbf6f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/fields.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Fields{ + + readOnly; + apiName; + id; + keyModified = new Map(); + /** + * The method to get the readOnly + * @returns {Boolean} A Boolean representing the readOnly + */ + getReadOnly() { + return this.readOnly; + + } + + /** + * The method to set the value to readOnly + * @param {Boolean} readOnly A Boolean representing the readOnly + */ + setReadOnly(readOnly) { + if((readOnly != null) && (!(Object.prototype.toString.call(readOnly) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: readOnly EXPECTED TYPE: Boolean", null, null); + } + this.readOnly = readOnly; + this.keyModified.set("read_only", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Fields as MasterModel, + Fields as Fields +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/filters.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/filters.js new file mode 100644 index 0000000..789beb6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/filters.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Filters{ + + displayLabel; + apiName; + id; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Filters as MasterModel, + Filters as Filters +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/import_portal_user_type.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/import_portal_user_type.js new file mode 100644 index 0000000..e882086 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/import_portal_user_type.js @@ -0,0 +1,14 @@ +export { Modules } from "./modules.js"; +export { Owner } from "./owner.js"; +export { PersonalityModule } from "./personality_module.js"; +export { PortalUserTypeOperations } from "./portal_user_type_operations.js"; +export { GetUserTypesParam } from "./portal_user_type_operations.js"; +export * as ResponseHandler from "./response_handler.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { Permissions } from "./permissions.js"; +export { APIException } from "./api_exception.js"; +export { UserType } from "./user_type.js"; +export { Views } from "./views.js"; +export { Filters } from "./filters.js"; +export { Layouts } from "./layouts.js"; +export { Fields } from "./fields.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/layouts.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/layouts.js new file mode 100644 index 0000000..5f74db2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/layouts.js @@ -0,0 +1,136 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Layouts{ + + displayLabel; + name; + id; + defaultview; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the defaultview + * @returns {Views} An instance of Views + */ + getDefaultview() { + return this.defaultview; + + } + + /** + * The method to set the value to defaultview + * @param {Views} defaultview An instance of Views + */ + async setDefaultview(defaultview) { + const Views = (await (import("./views.js"))).MasterModel; + if((defaultview != null) && (!(defaultview instanceof Views))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: defaultview EXPECTED TYPE: Views", null, null); + } + this.defaultview = defaultview; + this.keyModified.set("_default_view", 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 { + Layouts as MasterModel, + Layouts as Layouts +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/modules.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/modules.js new file mode 100644 index 0000000..5cb4cca --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/modules.js @@ -0,0 +1,253 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Modules{ + + id; + pluralLabel; + sharedType; + apiName; + filters; + fields; + layouts; + views; + permissions; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the pluralLabel + * @returns {String} A String representing the pluralLabel + */ + getPluralLabel() { + return this.pluralLabel; + + } + + /** + * The method to set the value to pluralLabel + * @param {String} pluralLabel A String representing the pluralLabel + */ + setPluralLabel(pluralLabel) { + if((pluralLabel != null) && (!(Object.prototype.toString.call(pluralLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pluralLabel EXPECTED TYPE: String", null, null); + } + this.pluralLabel = pluralLabel; + this.keyModified.set("plural_label", 1); + + } + + /** + * The method to get the sharedType + * @returns {Choice} An instance of Choice + */ + getSharedType() { + return this.sharedType; + + } + + /** + * The method to set the value to sharedType + * @param {Choice} sharedType An instance of Choice + */ + setSharedType(sharedType) { + if((sharedType != null) && (!(sharedType instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sharedType EXPECTED TYPE: Choice", null, null); + } + this.sharedType = sharedType; + this.keyModified.set("shared_type", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the filters + * @returns {Array} An Array representing the filters + */ + getFilters() { + return this.filters; + + } + + /** + * The method to set the value to filters + * @param {Array} filters An Array representing the filters + */ + setFilters(filters) { + if((filters != null) && (!(Object.prototype.toString.call(filters) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: filters EXPECTED TYPE: Array", null, null); + } + this.filters = filters; + this.keyModified.set("filters", 1); + + } + + /** + * The method to get the fields + * @returns {Array} An Array representing the fields + */ + getFields() { + return this.fields; + + } + + /** + * The method to set the value to fields + * @param {Array} fields An Array representing the fields + */ + setFields(fields) { + if((fields != null) && (!(Object.prototype.toString.call(fields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: Array", null, null); + } + this.fields = fields; + this.keyModified.set("fields", 1); + + } + + /** + * The method to get the layouts + * @returns {Array} An Array representing the layouts + */ + getLayouts() { + return this.layouts; + + } + + /** + * The method to set the value to layouts + * @param {Array} layouts An Array representing the layouts + */ + setLayouts(layouts) { + if((layouts != null) && (!(Object.prototype.toString.call(layouts) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: layouts EXPECTED TYPE: Array", null, null); + } + this.layouts = layouts; + this.keyModified.set("layouts", 1); + + } + + /** + * The method to get the views + * @returns {Views} An instance of Views + */ + getViews() { + return this.views; + + } + + /** + * The method to set the value to views + * @param {Views} views An instance of Views + */ + async setViews(views) { + const Views = (await (import("./views.js"))).MasterModel; + if((views != null) && (!(views instanceof Views))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: views EXPECTED TYPE: Views", null, null); + } + this.views = views; + this.keyModified.set("views", 1); + + } + + /** + * The method to get the permissions + * @returns {Permissions} An instance of Permissions + */ + getPermissions() { + return this.permissions; + + } + + /** + * The method to set the value to permissions + * @param {Permissions} permissions An instance of Permissions + */ + async setPermissions(permissions) { + const Permissions = (await (import("./permissions.js"))).MasterModel; + if((permissions != null) && (!(permissions instanceof Permissions))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: permissions EXPECTED TYPE: Permissions", null, null); + } + this.permissions = permissions; + this.keyModified.set("permissions", 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 { + Modules as MasterModel, + Modules as Modules +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/owner.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/owner.js new file mode 100644 index 0000000..b1c21d9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/owner.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Owner{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Owner as MasterModel, + Owner as Owner +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/permissions.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/permissions.js new file mode 100644 index 0000000..e3570df --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/permissions.js @@ -0,0 +1,205 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Permissions{ + + view; + edit; + editSharedRecords; + create; + delete1; + deleteAttachment; + createAttachment; + keyModified = new Map(); + /** + * The method to get the view + * @returns {Choice} An instance of Choice + */ + getView() { + return this.view; + + } + + /** + * The method to set the value to view + * @param {Choice} view An instance of Choice + */ + setView(view) { + if((view != null) && (!(view instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: view EXPECTED TYPE: Choice", null, null); + } + this.view = view; + this.keyModified.set("view", 1); + + } + + /** + * The method to get the edit + * @returns {Boolean} A Boolean representing the edit + */ + getEdit() { + return this.edit; + + } + + /** + * The method to set the value to edit + * @param {Boolean} edit A Boolean representing the edit + */ + setEdit(edit) { + if((edit != null) && (!(Object.prototype.toString.call(edit) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: edit EXPECTED TYPE: Boolean", null, null); + } + this.edit = edit; + this.keyModified.set("edit", 1); + + } + + /** + * The method to get the editSharedRecords + * @returns {Boolean} A Boolean representing the editSharedRecords + */ + getEditSharedRecords() { + return this.editSharedRecords; + + } + + /** + * The method to set the value to editSharedRecords + * @param {Boolean} editSharedRecords A Boolean representing the editSharedRecords + */ + setEditSharedRecords(editSharedRecords) { + if((editSharedRecords != null) && (!(Object.prototype.toString.call(editSharedRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: editSharedRecords EXPECTED TYPE: Boolean", null, null); + } + this.editSharedRecords = editSharedRecords; + this.keyModified.set("edit_shared_records", 1); + + } + + /** + * The method to get the create + * @returns {Boolean} A Boolean representing the create + */ + getCreate() { + return this.create; + + } + + /** + * The method to set the value to create + * @param {Boolean} create A Boolean representing the create + */ + setCreate(create) { + if((create != null) && (!(Object.prototype.toString.call(create) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: create EXPECTED TYPE: Boolean", null, null); + } + this.create = create; + this.keyModified.set("create", 1); + + } + + /** + * The method to get the delete + * @returns {Boolean} A Boolean representing the delete1 + */ + getDelete() { + return this.delete1; + + } + + /** + * The method to set the value to delete + * @param {Boolean} delete1 A Boolean representing the delete1 + */ + setDelete(delete1) { + if((delete1 != null) && (!(Object.prototype.toString.call(delete1) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: delete1 EXPECTED TYPE: Boolean", null, null); + } + this.delete1 = delete1; + this.keyModified.set("delete", 1); + + } + + /** + * The method to get the deleteAttachment + * @returns {Boolean} A Boolean representing the deleteAttachment + */ + getDeleteAttachment() { + return this.deleteAttachment; + + } + + /** + * The method to set the value to deleteAttachment + * @param {Boolean} deleteAttachment A Boolean representing the deleteAttachment + */ + setDeleteAttachment(deleteAttachment) { + if((deleteAttachment != null) && (!(Object.prototype.toString.call(deleteAttachment) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deleteAttachment EXPECTED TYPE: Boolean", null, null); + } + this.deleteAttachment = deleteAttachment; + this.keyModified.set("delete_attachment", 1); + + } + + /** + * The method to get the createAttachment + * @returns {Boolean} A Boolean representing the createAttachment + */ + getCreateAttachment() { + return this.createAttachment; + + } + + /** + * The method to set the value to createAttachment + * @param {Boolean} createAttachment A Boolean representing the createAttachment + */ + setCreateAttachment(createAttachment) { + if((createAttachment != null) && (!(Object.prototype.toString.call(createAttachment) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createAttachment EXPECTED TYPE: Boolean", null, null); + } + this.createAttachment = createAttachment; + this.keyModified.set("create_attachment", 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 { + Permissions as MasterModel, + Permissions as Permissions +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/personality_module.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/personality_module.js new file mode 100644 index 0000000..a820b5f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/personality_module.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class PersonalityModule{ + + apiName; + id; + pluralLabel; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the pluralLabel + * @returns {String} A String representing the pluralLabel + */ + getPluralLabel() { + return this.pluralLabel; + + } + + /** + * The method to set the value to pluralLabel + * @param {String} pluralLabel A String representing the pluralLabel + */ + setPluralLabel(pluralLabel) { + if((pluralLabel != null) && (!(Object.prototype.toString.call(pluralLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pluralLabel EXPECTED TYPE: String", null, null); + } + this.pluralLabel = pluralLabel; + this.keyModified.set("plural_label", 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 { + PersonalityModule as MasterModel, + PersonalityModule as PersonalityModule +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/portal_user_type_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/portal_user_type_operations.js new file mode 100644 index 0000000..8607086 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/portal_user_type_operations.js @@ -0,0 +1,84 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 PortalUserTypeOperations{ + + portal; + /** + * Creates an instance of PortalUserTypeOperations with the given parameters + * @param {String} portal A String representing the portal + */ + constructor(portal){ + if((!(Object.prototype.toString.call(portal) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: portal EXPECTED TYPE: String", null, null); + } + this.portal = portal; + + } + + /** + * The method to get user types + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getUserTypes(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/portals/"); + apiPath = apiPath.concat(this.portal.toString()); + apiPath = apiPath.concat("/user_type"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to get user type + * @param {String} userTypeId A String representing the userTypeId + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getUserType(userTypeId) { + if((!(Object.prototype.toString.call(userTypeId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: userTypeId EXPECTED TYPE: String", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/portals/"); + apiPath = apiPath.concat(this.portal.toString()); + apiPath = apiPath.concat("/user_type/"); + apiPath = apiPath.concat(userTypeId.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/json"); + + } + +} +class GetUserTypesParam{ + + static INCLUDE = new Param("include", "com.zoho.crm.api.PortalUserType.GetUserTypesParam"); +} + +export { + GetUserTypesParam as GetUserTypesParam, + PortalUserTypeOperations as MasterModel, + PortalUserTypeOperations as PortalUserTypeOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/response_wrapper.js new file mode 100644 index 0000000..6fe3980 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + userType; + keyModified = new Map(); + /** + * The method to get the userType + * @returns {Array} An Array representing the userType + */ + getUserType() { + return this.userType; + + } + + /** + * The method to set the value to userType + * @param {Array} userType An Array representing the userType + */ + setUserType(userType) { + if((userType != null) && (!(Object.prototype.toString.call(userType) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: userType EXPECTED TYPE: Array", null, null); + } + this.userType = userType; + this.keyModified.set("user_type", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/user_type.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/user_type.js new file mode 100644 index 0000000..0d32895 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/user_type.js @@ -0,0 +1,299 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class UserType{ + + personalityModule; + createdTime; + modifiedTime; + modifiedBy; + createdBy; + name; + active; + default1; + noOfUsers; + id; + modules; + keyModified = new Map(); + /** + * The method to get the personalityModule + * @returns {PersonalityModule} An instance of PersonalityModule + */ + getPersonalityModule() { + return this.personalityModule; + + } + + /** + * The method to set the value to personalityModule + * @param {PersonalityModule} personalityModule An instance of PersonalityModule + */ + async setPersonalityModule(personalityModule) { + const PersonalityModule = (await (import("./personality_module.js"))).MasterModel; + if((personalityModule != null) && (!(personalityModule instanceof PersonalityModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: personalityModule EXPECTED TYPE: PersonalityModule", null, null); + } + this.personalityModule = personalityModule; + this.keyModified.set("personality_module", 1); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {Owner} An instance of Owner + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {Owner} modifiedBy An instance of Owner + */ + async setModifiedBy(modifiedBy) { + const Owner = (await (import("./owner.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof Owner))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: Owner", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("modified_by", 1); + + } + + /** + * The method to get the createdBy + * @returns {Owner} An instance of Owner + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {Owner} createdBy An instance of Owner + */ + async setCreatedBy(createdBy) { + const Owner = (await (import("./owner.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof Owner))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: Owner", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the active + * @returns {Boolean} A Boolean representing the active + */ + getActive() { + return this.active; + + } + + /** + * The method to set the value to active + * @param {Boolean} active A Boolean representing the active + */ + setActive(active) { + if((active != null) && (!(Object.prototype.toString.call(active) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: active EXPECTED TYPE: Boolean", null, null); + } + this.active = active; + this.keyModified.set("active", 1); + + } + + /** + * The method to get the default + * @returns {Boolean} A Boolean representing the default1 + */ + getDefault() { + return this.default1; + + } + + /** + * The method to set the value to default + * @param {Boolean} default1 A Boolean representing the default1 + */ + setDefault(default1) { + if((default1 != null) && (!(Object.prototype.toString.call(default1) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: default1 EXPECTED TYPE: Boolean", null, null); + } + this.default1 = default1; + this.keyModified.set("default", 1); + + } + + /** + * The method to get the noOfUsers + * @returns {number} A number representing the noOfUsers + */ + getNoOfUsers() { + return this.noOfUsers; + + } + + /** + * The method to set the value to noOfUsers + * @param {number} noOfUsers A number representing the noOfUsers + */ + setNoOfUsers(noOfUsers) { + if((noOfUsers != null) && (!(Object.prototype.toString.call(noOfUsers) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: noOfUsers EXPECTED TYPE: number", null, null); + } + this.noOfUsers = noOfUsers; + this.keyModified.set("no_of_users", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the modules + * @returns {Array} An Array representing the modules + */ + getModules() { + return this.modules; + + } + + /** + * The method to set the value to modules + * @param {Array} modules An Array representing the modules + */ + setModules(modules) { + if((modules != null) && (!(Object.prototype.toString.call(modules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modules EXPECTED TYPE: Array", null, null); + } + this.modules = modules; + this.keyModified.set("modules", 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 { + UserType as MasterModel, + UserType as UserType +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/views.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/views.js new file mode 100644 index 0000000..b9ec9eb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portal_user_type/views.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Views{ + + displayLabel; + name; + id; + type; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 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 { + Views as MasterModel, + Views as Views +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/action_wrapper.js new file mode 100644 index 0000000..e391d18 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + portals; + keyModified = new Map(); + /** + * The method to get the portals + * @returns {Array} An Array representing the portals + */ + getPortals() { + return this.portals; + + } + + /** + * The method to set the value to portals + * @param {Array} portals An Array representing the portals + */ + setPortals(portals) { + if((portals != null) && (!(Object.prototype.toString.call(portals) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: portals EXPECTED TYPE: Array", null, null); + } + this.portals = portals; + this.keyModified.set("portals", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/api_exception.js new file mode 100644 index 0000000..35d7ece --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + details; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/body_wrapper.js new file mode 100644 index 0000000..57c9d88 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + portals; + keyModified = new Map(); + /** + * The method to get the portals + * @returns {Array} An Array representing the portals + */ + getPortals() { + return this.portals; + + } + + /** + * The method to set the value to portals + * @param {Array} portals An Array representing the portals + */ + setPortals(portals) { + if((portals != null) && (!(Object.prototype.toString.call(portals) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: portals EXPECTED TYPE: Array", null, null); + } + this.portals = portals; + this.keyModified.set("portals", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals/import_portals.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/import_portals.js new file mode 100644 index 0000000..8924ace --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/import_portals.js @@ -0,0 +1,11 @@ +export * as ActionResponse from "./action_response.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { Portals } from "./portals.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export * as ActionHandler from "./action_handler.js"; +export { Owner } from "./owner.js"; +export { APIException } from "./api_exception.js"; +export { PortalsOperations } from "./portals_operations.js"; +export { SuccessResponse } from "./success_response.js"; +export * as ResponseHandler from "./response_handler.js"; +export { ActionWrapper } from "./action_wrapper.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals/owner.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/owner.js new file mode 100644 index 0000000..b1c21d9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/owner.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Owner{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Owner as MasterModel, + Owner as Owner +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals/portals.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/portals.js new file mode 100644 index 0000000..2884493 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/portals.js @@ -0,0 +1,206 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Portals{ + + createdTime; + modifiedTime; + modifiedBy; + createdBy; + zaid; + name; + active; + keyModified = new Map(); + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {Owner} An instance of Owner + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {Owner} modifiedBy An instance of Owner + */ + async setModifiedBy(modifiedBy) { + const Owner = (await (import("./owner.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof Owner))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: Owner", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("modified_by", 1); + + } + + /** + * The method to get the createdBy + * @returns {Owner} An instance of Owner + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {Owner} createdBy An instance of Owner + */ + async setCreatedBy(createdBy) { + const Owner = (await (import("./owner.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof Owner))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: Owner", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 1); + + } + + /** + * The method to get the zaid + * @returns {String} A String representing the zaid + */ + getZaid() { + return this.zaid; + + } + + /** + * The method to set the value to zaid + * @param {String} zaid A String representing the zaid + */ + setZaid(zaid) { + if((zaid != null) && (!(Object.prototype.toString.call(zaid) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: zaid EXPECTED TYPE: String", null, null); + } + this.zaid = zaid; + this.keyModified.set("zaid", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the active + * @returns {Boolean} A Boolean representing the active + */ + getActive() { + return this.active; + + } + + /** + * The method to set the value to active + * @param {Boolean} active A Boolean representing the active + */ + setActive(active) { + if((active != null) && (!(Object.prototype.toString.call(active) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: active EXPECTED TYPE: Boolean", null, null); + } + this.active = active; + this.keyModified.set("active", 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 { + Portals as MasterModel, + Portals as Portals +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals/portals_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/portals_operations.js new file mode 100644 index 0000000..17aa96b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/portals_operations.js @@ -0,0 +1,110 @@ +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 PortalsOperations{ + /** + * The method to get portals + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getPortals() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/portals"); + 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"); + + } + + /** + * The method to create portal + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createPortal(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/portals"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get portal + * @param {String} portalName A String representing the portalName + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getPortal(portalName) { + if((!(Object.prototype.toString.call(portalName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: portalName EXPECTED TYPE: String", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/portals/"); + apiPath = apiPath.concat(portalName.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/json"); + + } + + /** + * The method to update portal + * @param {String} portalName A String representing the portalName + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updatePortal(portalName, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(portalName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: portalName EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/portals/"); + apiPath = apiPath.concat(portalName.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +export { + PortalsOperations as MasterModel, + PortalsOperations as PortalsOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/response_wrapper.js new file mode 100644 index 0000000..3894f59 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + portals; + keyModified = new Map(); + /** + * The method to get the portals + * @returns {Array} An Array representing the portals + */ + getPortals() { + return this.portals; + + } + + /** + * The method to set the value to portals + * @param {Array} portals An Array representing the portals + */ + setPortals(portals) { + if((portals != null) && (!(Object.prototype.toString.call(portals) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: portals EXPECTED TYPE: Array", null, null); + } + this.portals = portals; + this.keyModified.set("portals", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/success_response.js new file mode 100644 index 0000000..cb9a3af --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + details; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/filters.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/filters.js new file mode 100644 index 0000000..789beb6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/filters.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Filters{ + + displayLabel; + apiName; + id; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Filters as MasterModel, + Filters as Filters +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/import_portals_meta.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/import_portals_meta.js new file mode 100644 index 0000000..266065f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/import_portals_meta.js @@ -0,0 +1,6 @@ +export { Layouts } from "./layouts.js"; +export { RelatedLists } from "./related_lists.js"; +export { Filters } from "./filters.js"; +export { Views } from "./views.js"; +export { Modules } from "./modules.js"; +export { Wrapper } from "./wrapper.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/layouts.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/layouts.js new file mode 100644 index 0000000..a696782 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/layouts.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Layouts{ + + displayLabel; + name; + id; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Layouts as MasterModel, + Layouts as Layouts +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/modules.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/modules.js new file mode 100644 index 0000000..cc1f31d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/modules.js @@ -0,0 +1,204 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Modules{ + + pluralLabel; + sharedType; + apiName; + id; + filters; + layouts; + views; + keyModified = new Map(); + /** + * The method to get the pluralLabel + * @returns {String} A String representing the pluralLabel + */ + getPluralLabel() { + return this.pluralLabel; + + } + + /** + * The method to set the value to pluralLabel + * @param {String} pluralLabel A String representing the pluralLabel + */ + setPluralLabel(pluralLabel) { + if((pluralLabel != null) && (!(Object.prototype.toString.call(pluralLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pluralLabel EXPECTED TYPE: String", null, null); + } + this.pluralLabel = pluralLabel; + this.keyModified.set("plural_label", 1); + + } + + /** + * The method to get the sharedType + * @returns {String} A String representing the sharedType + */ + getSharedType() { + return this.sharedType; + + } + + /** + * The method to set the value to sharedType + * @param {String} sharedType A String representing the sharedType + */ + setSharedType(sharedType) { + if((sharedType != null) && (!(Object.prototype.toString.call(sharedType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sharedType EXPECTED TYPE: String", null, null); + } + this.sharedType = sharedType; + this.keyModified.set("shared_type", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the filters + * @returns {Array} An Array representing the filters + */ + getFilters() { + return this.filters; + + } + + /** + * The method to set the value to filters + * @param {Array} filters An Array representing the filters + */ + setFilters(filters) { + if((filters != null) && (!(Object.prototype.toString.call(filters) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: filters EXPECTED TYPE: Array", null, null); + } + this.filters = filters; + this.keyModified.set("filters", 1); + + } + + /** + * The method to get the layouts + * @returns {Array} An Array representing the layouts + */ + getLayouts() { + return this.layouts; + + } + + /** + * The method to set the value to layouts + * @param {Array} layouts An Array representing the layouts + */ + setLayouts(layouts) { + if((layouts != null) && (!(Object.prototype.toString.call(layouts) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: layouts EXPECTED TYPE: Array", null, null); + } + this.layouts = layouts; + this.keyModified.set("layouts", 1); + + } + + /** + * The method to get the views + * @returns {Array} An Array representing the views + */ + getViews() { + return this.views; + + } + + /** + * The method to set the value to views + * @param {Array} views An Array representing the views + */ + setViews(views) { + if((views != null) && (!(Object.prototype.toString.call(views) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: views EXPECTED TYPE: Array", null, null); + } + this.views = views; + this.keyModified.set("views", 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 { + Modules as MasterModel, + Modules as Modules +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/related_lists.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/related_lists.js new file mode 100644 index 0000000..11e5101 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/related_lists.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RelatedLists{ + + module; + keyModified = new Map(); + /** + * The method to get the module + * @returns {Modules} An instance of Modules + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {Modules} module An instance of Modules + */ + async setModule(module) { + const Modules = (await (import("./modules.js"))).MasterModel; + if((module != null) && (!(module instanceof Modules))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: Modules", null, null); + } + this.module = module; + this.keyModified.set("module", 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 { + RelatedLists as MasterModel, + RelatedLists as RelatedLists +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/views.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/views.js new file mode 100644 index 0000000..b9ec9eb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/views.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Views{ + + displayLabel; + name; + id; + type; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 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 { + Views as MasterModel, + Views as Views +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/wrapper.js new file mode 100644 index 0000000..5e40a78 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/portals_meta/wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Wrapper{ + + relatedLists; + keyModified = new Map(); + /** + * The method to get the relatedLists + * @returns {Array} An Array representing the relatedLists + */ + getRelatedLists() { + return this.relatedLists; + + } + + /** + * The method to set the value to relatedLists + * @param {Array} relatedLists An Array representing the relatedLists + */ + setRelatedLists(relatedLists) { + if((relatedLists != null) && (!(Object.prototype.toString.call(relatedLists) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: relatedLists EXPECTED TYPE: Array", null, null); + } + this.relatedLists = relatedLists; + this.keyModified.set("related_lists", 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 { + Wrapper as MasterModel, + Wrapper as Wrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_configurable_apps/apps.js b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_configurable_apps/apps.js new file mode 100644 index 0000000..5787237 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_configurable_apps/apps.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Apps{ + + name; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + Apps as MasterModel, + Apps as Apps +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_configurable_apps/import_privacy_configurable_apps.js b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_configurable_apps/import_privacy_configurable_apps.js new file mode 100644 index 0000000..836c6e1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_configurable_apps/import_privacy_configurable_apps.js @@ -0,0 +1,2 @@ +export { Wrapper } from "./wrapper.js"; +export { Apps } from "./apps.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_configurable_apps/wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_configurable_apps/wrapper.js new file mode 100644 index 0000000..1461c03 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_configurable_apps/wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Wrapper{ + + privacyConfigurableApps; + keyModified = new Map(); + /** + * The method to get the privacyConfigurableApps + * @returns {Array} An Array representing the privacyConfigurableApps + */ + getPrivacyConfigurableApps() { + return this.privacyConfigurableApps; + + } + + /** + * The method to set the value to privacyConfigurableApps + * @param {Array} privacyConfigurableApps An Array representing the privacyConfigurableApps + */ + setPrivacyConfigurableApps(privacyConfigurableApps) { + if((privacyConfigurableApps != null) && (!(Object.prototype.toString.call(privacyConfigurableApps) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: privacyConfigurableApps EXPECTED TYPE: Array", null, null); + } + this.privacyConfigurableApps = privacyConfigurableApps; + this.keyModified.set("privacy_configurable_apps", 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 { + Wrapper as MasterModel, + Wrapper as Wrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/config.js b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/config.js new file mode 100644 index 0000000..29c8294 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/config.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Config{ + + tpt; + section; + zohoInteg; + keyModified = new Map(); + /** + * The method to get the tpt + * @returns {Array} An Array representing the tpt + */ + getTpt() { + return this.tpt; + + } + + /** + * The method to set the value to tpt + * @param {Array} tpt An Array representing the tpt + */ + setTpt(tpt) { + if((tpt != null) && (!(Object.prototype.toString.call(tpt) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tpt EXPECTED TYPE: Array", null, null); + } + this.tpt = tpt; + this.keyModified.set("tpt", 1); + + } + + /** + * The method to get the section + * @returns {Array} An Array representing the section + */ + getSection() { + return this.section; + + } + + /** + * The method to set the value to section + * @param {Array} section An Array representing the section + */ + setSection(section) { + if((section != null) && (!(Object.prototype.toString.call(section) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: section EXPECTED TYPE: Array", null, null); + } + this.section = section; + this.keyModified.set("section", 1); + + } + + /** + * The method to get the zohoInteg + * @returns {Array} An Array representing the zohoInteg + */ + getZohoInteg() { + return this.zohoInteg; + + } + + /** + * The method to set the value to zohoInteg + * @param {Array} zohoInteg An Array representing the zohoInteg + */ + setZohoInteg(zohoInteg) { + if((zohoInteg != null) && (!(Object.prototype.toString.call(zohoInteg) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: zohoInteg EXPECTED TYPE: Array", null, null); + } + this.zohoInteg = zohoInteg; + this.keyModified.set("zoho_integ", 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 { + Config as MasterModel, + Config as Config +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/import_privacy_preference.js b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/import_privacy_preference.js new file mode 100644 index 0000000..232c0ec --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/import_privacy_preference.js @@ -0,0 +1,7 @@ +export { Wrapper } from "./wrapper.js"; +export { Preference } from "./preference.js"; +export { Config } from "./config.js"; +export { Tpt } from "./tpt.js"; +export { PrivacyPreference } from "./privacy_preference.js"; +export { Section } from "./section.js"; +export { Option } from "./option.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/option.js b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/option.js new file mode 100644 index 0000000..60e138a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/option.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Option{ + + name; + tooltip; + type; + suboptions; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the tooltip + * @returns {String} A String representing the tooltip + */ + getTooltip() { + return this.tooltip; + + } + + /** + * The method to set the value to tooltip + * @param {String} tooltip A String representing the tooltip + */ + setTooltip(tooltip) { + if((tooltip != null) && (!(Object.prototype.toString.call(tooltip) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tooltip EXPECTED TYPE: String", null, null); + } + this.tooltip = tooltip; + this.keyModified.set("tooltip", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the suboptions + * @returns {Array} An Array representing the suboptions + */ + getSuboptions() { + return this.suboptions; + + } + + /** + * The method to set the value to suboptions + * @param {Array} suboptions An Array representing the suboptions + */ + setSuboptions(suboptions) { + if((suboptions != null) && (!(Object.prototype.toString.call(suboptions) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: suboptions EXPECTED TYPE: Array", null, null); + } + this.suboptions = suboptions; + this.keyModified.set("suboptions", 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 { + Option as MasterModel, + Option as Option +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/preference.js b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/preference.js new file mode 100644 index 0000000..64e262f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/preference.js @@ -0,0 +1,549 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Preference{ + + consentModules; + restrictTptFields; + excludeAPIZoho; + awaitingPeriod; + consentMailSend; + excludeExportFields; + limitActions; + excludeExport; + restrictZohoInteg; + excludeAPIZohoFields; + durationTiming; + dataProcessingDuration; + restrictTptServices; + excludeAPITptFields; + restrictZohoIntegServices; + privacySettingStatus; + doubleOptIn; + restrictZohoIntegFields; + excludeAPITpt; + blockList; + restrictTpt; + actionsWhileAwaiting; + keyModified = new Map(); + /** + * The method to get the consentModules + * @returns {String} A String representing the consentModules + */ + getConsentModules() { + return this.consentModules; + + } + + /** + * The method to set the value to consentModules + * @param {String} consentModules A String representing the consentModules + */ + setConsentModules(consentModules) { + if((consentModules != null) && (!(Object.prototype.toString.call(consentModules) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: consentModules EXPECTED TYPE: String", null, null); + } + this.consentModules = consentModules; + this.keyModified.set("consent_modules", 1); + + } + + /** + * The method to get the restrictTptFields + * @returns {String} A String representing the restrictTptFields + */ + getRestrictTptFields() { + return this.restrictTptFields; + + } + + /** + * The method to set the value to restrictTptFields + * @param {String} restrictTptFields A String representing the restrictTptFields + */ + setRestrictTptFields(restrictTptFields) { + if((restrictTptFields != null) && (!(Object.prototype.toString.call(restrictTptFields) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: restrictTptFields EXPECTED TYPE: String", null, null); + } + this.restrictTptFields = restrictTptFields; + this.keyModified.set("restrict_tpt_fields", 1); + + } + + /** + * The method to get the excludeapiZoho + * @returns {String} A String representing the excludeAPIZoho + */ + getExcludeAPIZoho() { + return this.excludeAPIZoho; + + } + + /** + * The method to set the value to excludeapiZoho + * @param {String} excludeAPIZoho A String representing the excludeAPIZoho + */ + setExcludeAPIZoho(excludeAPIZoho) { + if((excludeAPIZoho != null) && (!(Object.prototype.toString.call(excludeAPIZoho) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: excludeAPIZoho EXPECTED TYPE: String", null, null); + } + this.excludeAPIZoho = excludeAPIZoho; + this.keyModified.set("exclude_api_zoho", 1); + + } + + /** + * The method to get the awaitingPeriod + * @returns {String} A String representing the awaitingPeriod + */ + getAwaitingPeriod() { + return this.awaitingPeriod; + + } + + /** + * The method to set the value to awaitingPeriod + * @param {String} awaitingPeriod A String representing the awaitingPeriod + */ + setAwaitingPeriod(awaitingPeriod) { + if((awaitingPeriod != null) && (!(Object.prototype.toString.call(awaitingPeriod) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: awaitingPeriod EXPECTED TYPE: String", null, null); + } + this.awaitingPeriod = awaitingPeriod; + this.keyModified.set("awaiting_period", 1); + + } + + /** + * The method to get the consentMailSend + * @returns {String} A String representing the consentMailSend + */ + getConsentMailSend() { + return this.consentMailSend; + + } + + /** + * The method to set the value to consentMailSend + * @param {String} consentMailSend A String representing the consentMailSend + */ + setConsentMailSend(consentMailSend) { + if((consentMailSend != null) && (!(Object.prototype.toString.call(consentMailSend) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: consentMailSend EXPECTED TYPE: String", null, null); + } + this.consentMailSend = consentMailSend; + this.keyModified.set("consent_mail_send", 1); + + } + + /** + * The method to get the excludeExportFields + * @returns {String} A String representing the excludeExportFields + */ + getExcludeExportFields() { + return this.excludeExportFields; + + } + + /** + * The method to set the value to excludeExportFields + * @param {String} excludeExportFields A String representing the excludeExportFields + */ + setExcludeExportFields(excludeExportFields) { + if((excludeExportFields != null) && (!(Object.prototype.toString.call(excludeExportFields) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: excludeExportFields EXPECTED TYPE: String", null, null); + } + this.excludeExportFields = excludeExportFields; + this.keyModified.set("exclude_export_fields", 1); + + } + + /** + * The method to get the limitActions + * @returns {String} A String representing the limitActions + */ + getLimitActions() { + return this.limitActions; + + } + + /** + * The method to set the value to limitActions + * @param {String} limitActions A String representing the limitActions + */ + setLimitActions(limitActions) { + if((limitActions != null) && (!(Object.prototype.toString.call(limitActions) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: limitActions EXPECTED TYPE: String", null, null); + } + this.limitActions = limitActions; + this.keyModified.set("limit_actions", 1); + + } + + /** + * The method to get the excludeExport + * @returns {String} A String representing the excludeExport + */ + getExcludeExport() { + return this.excludeExport; + + } + + /** + * The method to set the value to excludeExport + * @param {String} excludeExport A String representing the excludeExport + */ + setExcludeExport(excludeExport) { + if((excludeExport != null) && (!(Object.prototype.toString.call(excludeExport) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: excludeExport EXPECTED TYPE: String", null, null); + } + this.excludeExport = excludeExport; + this.keyModified.set("exclude_export", 1); + + } + + /** + * The method to get the restrictZohoInteg + * @returns {String} A String representing the restrictZohoInteg + */ + getRestrictZohoInteg() { + return this.restrictZohoInteg; + + } + + /** + * The method to set the value to restrictZohoInteg + * @param {String} restrictZohoInteg A String representing the restrictZohoInteg + */ + setRestrictZohoInteg(restrictZohoInteg) { + if((restrictZohoInteg != null) && (!(Object.prototype.toString.call(restrictZohoInteg) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: restrictZohoInteg EXPECTED TYPE: String", null, null); + } + this.restrictZohoInteg = restrictZohoInteg; + this.keyModified.set("restrict_zoho_integ", 1); + + } + + /** + * The method to get the excludeapiZohoFields + * @returns {String} A String representing the excludeAPIZohoFields + */ + getExcludeAPIZohoFields() { + return this.excludeAPIZohoFields; + + } + + /** + * The method to set the value to excludeapiZohoFields + * @param {String} excludeAPIZohoFields A String representing the excludeAPIZohoFields + */ + setExcludeAPIZohoFields(excludeAPIZohoFields) { + if((excludeAPIZohoFields != null) && (!(Object.prototype.toString.call(excludeAPIZohoFields) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: excludeAPIZohoFields EXPECTED TYPE: String", null, null); + } + this.excludeAPIZohoFields = excludeAPIZohoFields; + this.keyModified.set("exclude_api_zoho_fields", 1); + + } + + /** + * The method to get the durationTiming + * @returns {String} A String representing the durationTiming + */ + getDurationTiming() { + return this.durationTiming; + + } + + /** + * The method to set the value to durationTiming + * @param {String} durationTiming A String representing the durationTiming + */ + setDurationTiming(durationTiming) { + if((durationTiming != null) && (!(Object.prototype.toString.call(durationTiming) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: durationTiming EXPECTED TYPE: String", null, null); + } + this.durationTiming = durationTiming; + this.keyModified.set("duration_timing", 1); + + } + + /** + * The method to get the dataProcessingDuration + * @returns {String} A String representing the dataProcessingDuration + */ + getDataProcessingDuration() { + return this.dataProcessingDuration; + + } + + /** + * The method to set the value to dataProcessingDuration + * @param {String} dataProcessingDuration A String representing the dataProcessingDuration + */ + setDataProcessingDuration(dataProcessingDuration) { + if((dataProcessingDuration != null) && (!(Object.prototype.toString.call(dataProcessingDuration) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dataProcessingDuration EXPECTED TYPE: String", null, null); + } + this.dataProcessingDuration = dataProcessingDuration; + this.keyModified.set("data_processing_duration", 1); + + } + + /** + * The method to get the restrictTptServices + * @returns {String} A String representing the restrictTptServices + */ + getRestrictTptServices() { + return this.restrictTptServices; + + } + + /** + * The method to set the value to restrictTptServices + * @param {String} restrictTptServices A String representing the restrictTptServices + */ + setRestrictTptServices(restrictTptServices) { + if((restrictTptServices != null) && (!(Object.prototype.toString.call(restrictTptServices) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: restrictTptServices EXPECTED TYPE: String", null, null); + } + this.restrictTptServices = restrictTptServices; + this.keyModified.set("restrict_tpt_services", 1); + + } + + /** + * The method to get the excludeapiTptFields + * @returns {String} A String representing the excludeAPITptFields + */ + getExcludeAPITptFields() { + return this.excludeAPITptFields; + + } + + /** + * The method to set the value to excludeapiTptFields + * @param {String} excludeAPITptFields A String representing the excludeAPITptFields + */ + setExcludeAPITptFields(excludeAPITptFields) { + if((excludeAPITptFields != null) && (!(Object.prototype.toString.call(excludeAPITptFields) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: excludeAPITptFields EXPECTED TYPE: String", null, null); + } + this.excludeAPITptFields = excludeAPITptFields; + this.keyModified.set("exclude_api_tpt_fields", 1); + + } + + /** + * The method to get the restrictZohoIntegServices + * @returns {String} A String representing the restrictZohoIntegServices + */ + getRestrictZohoIntegServices() { + return this.restrictZohoIntegServices; + + } + + /** + * The method to set the value to restrictZohoIntegServices + * @param {String} restrictZohoIntegServices A String representing the restrictZohoIntegServices + */ + setRestrictZohoIntegServices(restrictZohoIntegServices) { + if((restrictZohoIntegServices != null) && (!(Object.prototype.toString.call(restrictZohoIntegServices) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: restrictZohoIntegServices EXPECTED TYPE: String", null, null); + } + this.restrictZohoIntegServices = restrictZohoIntegServices; + this.keyModified.set("restrict_zoho_integ_services", 1); + + } + + /** + * The method to get the privacySettingStatus + * @returns {String} A String representing the privacySettingStatus + */ + getPrivacySettingStatus() { + return this.privacySettingStatus; + + } + + /** + * The method to set the value to privacySettingStatus + * @param {String} privacySettingStatus A String representing the privacySettingStatus + */ + setPrivacySettingStatus(privacySettingStatus) { + if((privacySettingStatus != null) && (!(Object.prototype.toString.call(privacySettingStatus) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: privacySettingStatus EXPECTED TYPE: String", null, null); + } + this.privacySettingStatus = privacySettingStatus; + this.keyModified.set("privacy_setting_status", 1); + + } + + /** + * The method to get the doubleOptIn + * @returns {String} A String representing the doubleOptIn + */ + getDoubleOptIn() { + return this.doubleOptIn; + + } + + /** + * The method to set the value to doubleOptIn + * @param {String} doubleOptIn A String representing the doubleOptIn + */ + setDoubleOptIn(doubleOptIn) { + if((doubleOptIn != null) && (!(Object.prototype.toString.call(doubleOptIn) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: doubleOptIn EXPECTED TYPE: String", null, null); + } + this.doubleOptIn = doubleOptIn; + this.keyModified.set("double_opt_in", 1); + + } + + /** + * The method to get the restrictZohoIntegFields + * @returns {String} A String representing the restrictZohoIntegFields + */ + getRestrictZohoIntegFields() { + return this.restrictZohoIntegFields; + + } + + /** + * The method to set the value to restrictZohoIntegFields + * @param {String} restrictZohoIntegFields A String representing the restrictZohoIntegFields + */ + setRestrictZohoIntegFields(restrictZohoIntegFields) { + if((restrictZohoIntegFields != null) && (!(Object.prototype.toString.call(restrictZohoIntegFields) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: restrictZohoIntegFields EXPECTED TYPE: String", null, null); + } + this.restrictZohoIntegFields = restrictZohoIntegFields; + this.keyModified.set("restrict_zoho_integ_fields", 1); + + } + + /** + * The method to get the excludeapiTpt + * @returns {String} A String representing the excludeAPITpt + */ + getExcludeAPITpt() { + return this.excludeAPITpt; + + } + + /** + * The method to set the value to excludeapiTpt + * @param {String} excludeAPITpt A String representing the excludeAPITpt + */ + setExcludeAPITpt(excludeAPITpt) { + if((excludeAPITpt != null) && (!(Object.prototype.toString.call(excludeAPITpt) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: excludeAPITpt EXPECTED TYPE: String", null, null); + } + this.excludeAPITpt = excludeAPITpt; + this.keyModified.set("exclude_api_tpt", 1); + + } + + /** + * The method to get the blockList + * @returns {String} A String representing the blockList + */ + getBlockList() { + return this.blockList; + + } + + /** + * The method to set the value to blockList + * @param {String} blockList A String representing the blockList + */ + setBlockList(blockList) { + if((blockList != null) && (!(Object.prototype.toString.call(blockList) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: blockList EXPECTED TYPE: String", null, null); + } + this.blockList = blockList; + this.keyModified.set("block_list", 1); + + } + + /** + * The method to get the restrictTpt + * @returns {String} A String representing the restrictTpt + */ + getRestrictTpt() { + return this.restrictTpt; + + } + + /** + * The method to set the value to restrictTpt + * @param {String} restrictTpt A String representing the restrictTpt + */ + setRestrictTpt(restrictTpt) { + if((restrictTpt != null) && (!(Object.prototype.toString.call(restrictTpt) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: restrictTpt EXPECTED TYPE: String", null, null); + } + this.restrictTpt = restrictTpt; + this.keyModified.set("restrict_tpt", 1); + + } + + /** + * The method to get the actionsWhileAwaiting + * @returns {String} A String representing the actionsWhileAwaiting + */ + getActionsWhileAwaiting() { + return this.actionsWhileAwaiting; + + } + + /** + * The method to set the value to actionsWhileAwaiting + * @param {String} actionsWhileAwaiting A String representing the actionsWhileAwaiting + */ + setActionsWhileAwaiting(actionsWhileAwaiting) { + if((actionsWhileAwaiting != null) && (!(Object.prototype.toString.call(actionsWhileAwaiting) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: actionsWhileAwaiting EXPECTED TYPE: String", null, null); + } + this.actionsWhileAwaiting = actionsWhileAwaiting; + this.keyModified.set("actions_while_awaiting", 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 { + Preference as MasterModel, + Preference as Preference +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/privacy_preference.js b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/privacy_preference.js new file mode 100644 index 0000000..28fd586 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/privacy_preference.js @@ -0,0 +1,91 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class PrivacyPreference{ + + preference; + config; + keyModified = new Map(); + /** + * The method to get the preference + * @returns {Preference} An instance of Preference + */ + getPreference() { + return this.preference; + + } + + /** + * The method to set the value to preference + * @param {Preference} preference An instance of Preference + */ + async setPreference(preference) { + const Preference = (await (import("./preference.js"))).MasterModel; + if((preference != null) && (!(preference instanceof Preference))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: preference EXPECTED TYPE: Preference", null, null); + } + this.preference = preference; + this.keyModified.set("preference", 1); + + } + + /** + * The method to get the config + * @returns {Config} An instance of Config + */ + getConfig() { + return this.config; + + } + + /** + * The method to set the value to config + * @param {Config} config An instance of Config + */ + async setConfig(config) { + const Config = (await (import("./config.js"))).MasterModel; + if((config != null) && (!(config instanceof Config))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: config EXPECTED TYPE: Config", null, null); + } + this.config = config; + this.keyModified.set("config", 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 { + PrivacyPreference as MasterModel, + PrivacyPreference as PrivacyPreference +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/section.js b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/section.js new file mode 100644 index 0000000..4f49c38 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/section.js @@ -0,0 +1,158 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Section{ + + name; + tooltip; + showType; + title; + options; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the tooltip + * @returns {String} A String representing the tooltip + */ + getTooltip() { + return this.tooltip; + + } + + /** + * The method to set the value to tooltip + * @param {String} tooltip A String representing the tooltip + */ + setTooltip(tooltip) { + if((tooltip != null) && (!(Object.prototype.toString.call(tooltip) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tooltip EXPECTED TYPE: String", null, null); + } + this.tooltip = tooltip; + this.keyModified.set("tooltip", 1); + + } + + /** + * The method to get the showType + * @returns {String} A String representing the showType + */ + getShowType() { + return this.showType; + + } + + /** + * The method to set the value to showType + * @param {String} showType A String representing the showType + */ + setShowType(showType) { + if((showType != null) && (!(Object.prototype.toString.call(showType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: showType EXPECTED TYPE: String", null, null); + } + this.showType = showType; + this.keyModified.set("show_type", 1); + + } + + /** + * The method to get the title + * @returns {String} A String representing the title + */ + getTitle() { + return this.title; + + } + + /** + * The method to set the value to title + * @param {String} title A String representing the title + */ + setTitle(title) { + if((title != null) && (!(Object.prototype.toString.call(title) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: title EXPECTED TYPE: String", null, null); + } + this.title = title; + this.keyModified.set("title", 1); + + } + + /** + * The method to get the options + * @returns {Array} An Array representing the options + */ + getOptions() { + return this.options; + + } + + /** + * The method to set the value to options + * @param {Array} options An Array representing the options + */ + setOptions(options) { + if((options != null) && (!(Object.prototype.toString.call(options) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: options EXPECTED TYPE: Array", null, null); + } + this.options = options; + this.keyModified.set("options", 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 { + Section as MasterModel, + Section as Section +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/tpt.js b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/tpt.js new file mode 100644 index 0000000..4470881 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/tpt.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Tpt{ + + isenabled; + name; + issupported; + keyModified = new Map(); + /** + * The method to get the isenabled + * @returns {String} A String representing the isenabled + */ + getIsenabled() { + return this.isenabled; + + } + + /** + * The method to set the value to isenabled + * @param {String} isenabled A String representing the isenabled + */ + setIsenabled(isenabled) { + if((isenabled != null) && (!(Object.prototype.toString.call(isenabled) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: isenabled EXPECTED TYPE: String", null, null); + } + this.isenabled = isenabled; + this.keyModified.set("isEnabled", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the issupported + * @returns {String} A String representing the issupported + */ + getIssupported() { + return this.issupported; + + } + + /** + * The method to set the value to issupported + * @param {String} issupported A String representing the issupported + */ + setIssupported(issupported) { + if((issupported != null) && (!(Object.prototype.toString.call(issupported) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: issupported EXPECTED TYPE: String", null, null); + } + this.issupported = issupported; + this.keyModified.set("isSupported", 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 { + Tpt as MasterModel, + Tpt as Tpt +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/wrapper.js new file mode 100644 index 0000000..5ffe583 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/privacy_preference/wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Wrapper{ + + privacypreference; + keyModified = new Map(); + /** + * The method to get the privacypreference + * @returns {Array} An Array representing the privacypreference + */ + getPrivacypreference() { + return this.privacypreference; + + } + + /** + * The method to set the value to privacypreference + * @param {Array} privacypreference An Array representing the privacypreference + */ + setPrivacypreference(privacypreference) { + if((privacypreference != null) && (!(Object.prototype.toString.call(privacypreference) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: privacypreference EXPECTED TYPE: Array", null, null); + } + this.privacypreference = privacypreference; + this.keyModified.set("privacyPreference", 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 { + Wrapper as MasterModel, + Wrapper as Wrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/action_wrapper.js new file mode 100644 index 0000000..6f20f0a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + profiles; + keyModified = new Map(); + /** + * The method to get the profiles + * @returns {Array} An Array representing the profiles + */ + getProfiles() { + return this.profiles; + + } + + /** + * The method to set the value to profiles + * @param {Array} profiles An Array representing the profiles + */ + setProfiles(profiles) { + if((profiles != null) && (!(Object.prototype.toString.call(profiles) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: profiles EXPECTED TYPE: Array", null, null); + } + this.profiles = profiles; + this.keyModified.set("profiles", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/category.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/category.js new file mode 100644 index 0000000..677facd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/category.js @@ -0,0 +1,7 @@ +class Category{ + +} +export { + Category as MasterModel, + Category as Category +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/category_module.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/category_module.js new file mode 100644 index 0000000..34197f3 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/category_module.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class CategoryModule{ + + displayLabel; + permissionsDetails; + name; + module; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the permissionsDetails + * @returns {Array} An Array representing the permissionsDetails + */ + getPermissionsDetails() { + return this.permissionsDetails; + + } + + /** + * The method to set the value to permissionsDetails + * @param {Array} permissionsDetails An Array representing the permissionsDetails + */ + setPermissionsDetails(permissionsDetails) { + if((permissionsDetails != null) && (!(Object.prototype.toString.call(permissionsDetails) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: permissionsDetails EXPECTED TYPE: Array", null, null); + } + this.permissionsDetails = permissionsDetails; + this.keyModified.set("permissions_details", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the module + * @returns {String} A String representing the module + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {String} module A String representing the module + */ + setModule(module) { + if((module != null) && (!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + this.module = module; + this.keyModified.set("module", 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 { + CategoryModule as MasterModel, + CategoryModule as CategoryModule +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/category_others.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/category_others.js new file mode 100644 index 0000000..a7dac5c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/category_others.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class CategoryOthers{ + + displayLabel; + permissionsDetails; + name; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the permissionsDetails + * @returns {Array} An Array representing the permissionsDetails + */ + getPermissionsDetails() { + return this.permissionsDetails; + + } + + /** + * The method to set the value to permissionsDetails + * @param {Array} permissionsDetails An Array representing the permissionsDetails + */ + setPermissionsDetails(permissionsDetails) { + if((permissionsDetails != null) && (!(Object.prototype.toString.call(permissionsDetails) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: permissionsDetails EXPECTED TYPE: Array", null, null); + } + this.permissionsDetails = permissionsDetails; + this.keyModified.set("permissions_details", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + CategoryOthers as MasterModel, + CategoryOthers as CategoryOthers +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/default_view.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/default_view.js new file mode 100644 index 0000000..9bfff85 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/default_view.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DefaultView{ + + name; + id; + type; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 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 { + DefaultView as MasterModel, + DefaultView as DefaultView +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/import_profiles.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/import_profiles.js new file mode 100644 index 0000000..87130df --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/import_profiles.js @@ -0,0 +1,19 @@ +export { DefaultView } from "./default_view.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { Section } from "./section.js"; +export { CategoryModule } from "./category_module.js"; +export * as ResponseHandler from "./response_handler.js"; +export * as ActionHandler from "./action_handler.js"; +export { PermissionDetail } from "./permission_detail.js"; +export { SuccessResponse } from "./success_response.js"; +export { Info } from "./info.js"; +export { MinifiedProfile } from "./minified_profile.js"; +export * as ActionResponse from "./action_response.js"; +export { CategoryOthers } from "./category_others.js"; +export { ProfileWrapper } from "./profile_wrapper.js"; +export { APIException } from "./api_exception.js"; +export * as Category from "./category.js"; +export { ProfilesOperations } from "./profiles_operations.js"; +export { GetProfilesParam } from "./profiles_operations.js"; +export { DeleteProfileParam } from "./profiles_operations.js"; +export { Profile } from "./profile.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/info.js new file mode 100644 index 0000000..1b2720c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/info.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + licenseLimit; + keyModified = new Map(); + /** + * The method to get the licenseLimit + * @returns {number} A number representing the licenseLimit + */ + getLicenseLimit() { + return this.licenseLimit; + + } + + /** + * The method to set the value to licenseLimit + * @param {number} licenseLimit A number representing the licenseLimit + */ + setLicenseLimit(licenseLimit) { + if((licenseLimit != null) && (!(Object.prototype.toString.call(licenseLimit) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: licenseLimit EXPECTED TYPE: number", null, null); + } + this.licenseLimit = licenseLimit; + this.keyModified.set("license_limit", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/minified_profile.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/minified_profile.js new file mode 100644 index 0000000..76407a6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/minified_profile.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MinifiedProfile{ + + id; + name; + delete1; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the delete + * @returns {Boolean} A Boolean representing the delete1 + */ + getDelete() { + return this.delete1; + + } + + /** + * The method to set the value to delete + * @param {Boolean} delete1 A Boolean representing the delete1 + */ + setDelete(delete1) { + if((delete1 != null) && (!(Object.prototype.toString.call(delete1) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: delete1 EXPECTED TYPE: Boolean", null, null); + } + this.delete1 = delete1; + this.keyModified.set("_delete", 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 { + MinifiedProfile as MasterModel, + MinifiedProfile as MinifiedProfile +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/permission_detail.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/permission_detail.js new file mode 100644 index 0000000..da76a29 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/permission_detail.js @@ -0,0 +1,205 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class PermissionDetail{ + + id; + enabled; + name; + displayLabel; + customizable; + parentPermissions; + module; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the enabled + * @returns {Choice} An instance of Choice + */ + getEnabled() { + return this.enabled; + + } + + /** + * The method to set the value to enabled + * @param {Choice} enabled An instance of Choice + */ + setEnabled(enabled) { + if((enabled != null) && (!(enabled instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: enabled EXPECTED TYPE: Choice", null, null); + } + this.enabled = enabled; + this.keyModified.set("enabled", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the customizable + * @returns {Boolean} A Boolean representing the customizable + */ + getCustomizable() { + return this.customizable; + + } + + /** + * The method to set the value to customizable + * @param {Boolean} customizable A Boolean representing the customizable + */ + setCustomizable(customizable) { + if((customizable != null) && (!(Object.prototype.toString.call(customizable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: customizable EXPECTED TYPE: Boolean", null, null); + } + this.customizable = customizable; + this.keyModified.set("customizable", 1); + + } + + /** + * The method to get the parentPermissions + * @returns {Array} An Array representing the parentPermissions + */ + getParentPermissions() { + return this.parentPermissions; + + } + + /** + * The method to set the value to parentPermissions + * @param {Array} parentPermissions An Array representing the parentPermissions + */ + setParentPermissions(parentPermissions) { + if((parentPermissions != null) && (!(Object.prototype.toString.call(parentPermissions) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: parentPermissions EXPECTED TYPE: Array", null, null); + } + this.parentPermissions = parentPermissions; + this.keyModified.set("parent_permissions", 1); + + } + + /** + * The method to get the module + * @returns {String} A String representing the module + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {String} module A String representing the module + */ + setModule(module) { + if((module != null) && (!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + this.module = module; + this.keyModified.set("module", 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 { + PermissionDetail as MasterModel, + PermissionDetail as PermissionDetail +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/profile.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/profile.js new file mode 100644 index 0000000..339cbc8 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/profile.js @@ -0,0 +1,415 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Profile{ + + defaultview; + name; + description; + id; + default1; + delete1; + permissionType; + custom; + displayLabel; + type; + permissionsDetails; + sections; + createdTime; + modifiedTime; + modifiedBy; + createdBy; + keyModified = new Map(); + /** + * The method to get the defaultview + * @returns {DefaultView} An instance of DefaultView + */ + getDefaultview() { + return this.defaultview; + + } + + /** + * The method to set the value to defaultview + * @param {DefaultView} defaultview An instance of DefaultView + */ + async setDefaultview(defaultview) { + const DefaultView = (await (import("./default_view.js"))).MasterModel; + if((defaultview != null) && (!(defaultview instanceof DefaultView))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: defaultview EXPECTED TYPE: DefaultView", null, null); + } + this.defaultview = defaultview; + this.keyModified.set("_default_view", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the description + * @returns {String} A String representing the description + */ + getDescription() { + return this.description; + + } + + /** + * The method to set the value to description + * @param {String} description A String representing the description + */ + setDescription(description) { + if((description != null) && (!(Object.prototype.toString.call(description) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: description EXPECTED TYPE: String", null, null); + } + this.description = description; + this.keyModified.set("description", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the default + * @returns {Boolean} A Boolean representing the default1 + */ + getDefault() { + return this.default1; + + } + + /** + * The method to set the value to default + * @param {Boolean} default1 A Boolean representing the default1 + */ + setDefault(default1) { + if((default1 != null) && (!(Object.prototype.toString.call(default1) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: default1 EXPECTED TYPE: Boolean", null, null); + } + this.default1 = default1; + this.keyModified.set("default", 1); + + } + + /** + * The method to get the delete + * @returns {Boolean} A Boolean representing the delete1 + */ + getDelete() { + return this.delete1; + + } + + /** + * The method to set the value to delete + * @param {Boolean} delete1 A Boolean representing the delete1 + */ + setDelete(delete1) { + if((delete1 != null) && (!(Object.prototype.toString.call(delete1) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: delete1 EXPECTED TYPE: Boolean", null, null); + } + this.delete1 = delete1; + this.keyModified.set("_delete", 1); + + } + + /** + * The method to get the permissionType + * @returns {String} A String representing the permissionType + */ + getPermissionType() { + return this.permissionType; + + } + + /** + * The method to set the value to permissionType + * @param {String} permissionType A String representing the permissionType + */ + setPermissionType(permissionType) { + if((permissionType != null) && (!(Object.prototype.toString.call(permissionType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: permissionType EXPECTED TYPE: String", null, null); + } + this.permissionType = permissionType; + this.keyModified.set("permission_type", 1); + + } + + /** + * The method to get the custom + * @returns {Boolean} A Boolean representing the custom + */ + getCustom() { + return this.custom; + + } + + /** + * The method to set the value to custom + * @param {Boolean} custom A Boolean representing the custom + */ + setCustom(custom) { + if((custom != null) && (!(Object.prototype.toString.call(custom) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: custom EXPECTED TYPE: Boolean", null, null); + } + this.custom = custom; + this.keyModified.set("custom", 1); + + } + + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the type + * @returns {Choice} An instance of Choice + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {Choice} type An instance of Choice + */ + setType(type) { + if((type != null) && (!(type instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: Choice", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the permissionsDetails + * @returns {Array} An Array representing the permissionsDetails + */ + getPermissionsDetails() { + return this.permissionsDetails; + + } + + /** + * The method to set the value to permissionsDetails + * @param {Array} permissionsDetails An Array representing the permissionsDetails + */ + setPermissionsDetails(permissionsDetails) { + if((permissionsDetails != null) && (!(Object.prototype.toString.call(permissionsDetails) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: permissionsDetails EXPECTED TYPE: Array", null, null); + } + this.permissionsDetails = permissionsDetails; + this.keyModified.set("permissions_details", 1); + + } + + /** + * The method to get the sections + * @returns {Array} An Array representing the sections + */ + getSections() { + return this.sections; + + } + + /** + * The method to set the value to sections + * @param {Array} sections An Array representing the sections + */ + setSections(sections) { + if((sections != null) && (!(Object.prototype.toString.call(sections) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sections EXPECTED TYPE: Array", null, null); + } + this.sections = sections; + this.keyModified.set("sections", 1); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("modified_by", 1); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 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 { + Profile as MasterModel, + Profile as Profile +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/profile_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/profile_wrapper.js new file mode 100644 index 0000000..d302e94 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/profile_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ProfileWrapper{ + + profiles; + info; + keyModified = new Map(); + /** + * The method to get the profiles + * @returns {Array} An Array representing the profiles + */ + getProfiles() { + return this.profiles; + + } + + /** + * The method to set the value to profiles + * @param {Array} profiles An Array representing the profiles + */ + setProfiles(profiles) { + if((profiles != null) && (!(Object.prototype.toString.call(profiles) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: profiles EXPECTED TYPE: Array", null, null); + } + this.profiles = profiles; + this.keyModified.set("profiles", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ProfileWrapper as MasterModel, + ProfileWrapper as ProfileWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/profiles_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/profiles_operations.js new file mode 100644 index 0000000..679ced9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/profiles_operations.js @@ -0,0 +1,162 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 ProfilesOperations{ + /** + * The method to get profiles + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getProfiles(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/profiles"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to clone profiles + * @param {BigInt} id A BigInt representing the id + * @param {ProfileWrapper} request An instance of ProfileWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async cloneProfiles(id, request) { + const ProfileWrapper = (await (import("./profile_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof ProfileWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: ProfileWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/profiles/"); + apiPath = apiPath.concat(id.toString()); + apiPath = apiPath.concat("/actions/clone"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update profile + * @param {BigInt} id A BigInt representing the id + * @param {ProfileWrapper} request An instance of ProfileWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateProfile(id, request) { + const ProfileWrapper = (await (import("./profile_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof ProfileWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: ProfileWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/profiles/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get profile + * @param {BigInt} id A BigInt representing the id + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getProfile(id) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/profiles/"); + apiPath = apiPath.concat(id.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/json"); + + } + + /** + * The method to delete profile + * @param {BigInt} id A BigInt representing the id + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteProfile(id, paramInstance=null) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/profiles/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class GetProfilesParam{ + + static INCLUDE_LITE_PROFILE = new Param("include_lite_profile", "com.zoho.crm.api.Profiles.GetProfilesParam"); +} + +class DeleteProfileParam{ + + static TRANSFER_TO = new Param("transfer_to", "com.zoho.crm.api.Profiles.DeleteProfileParam"); +} + +export { + GetProfilesParam as GetProfilesParam, + DeleteProfileParam as DeleteProfileParam, + ProfilesOperations as MasterModel, + ProfilesOperations as ProfilesOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/section.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/section.js new file mode 100644 index 0000000..6dbedcb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/section.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Section{ + + name; + categories; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the categories + * @returns {Array} An Array representing the categories + */ + getCategories() { + return this.categories; + + } + + /** + * The method to set the value to categories + * @param {Array} categories An Array representing the categories + */ + setCategories(categories) { + if((categories != null) && (!(Object.prototype.toString.call(categories) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: categories EXPECTED TYPE: Array", null, null); + } + this.categories = categories; + this.keyModified.set("categories", 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 { + Section as MasterModel, + Section as Section +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/success_response.js new file mode 100644 index 0000000..e8b71a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/profiles/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/query/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/query/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/query/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/query/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/query/body_wrapper.js new file mode 100644 index 0000000..1ec3f07 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/query/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + selectQuery; + keyModified = new Map(); + /** + * The method to get the selectQuery + * @returns {String} A String representing the selectQuery + */ + getSelectQuery() { + return this.selectQuery; + + } + + /** + * The method to set the value to selectQuery + * @param {String} selectQuery A String representing the selectQuery + */ + setSelectQuery(selectQuery) { + if((selectQuery != null) && (!(Object.prototype.toString.call(selectQuery) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: selectQuery EXPECTED TYPE: String", null, null); + } + this.selectQuery = selectQuery; + this.keyModified.set("select_query", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/query/import_query.js b/versions/3.0.0/lib/core/com/zoho/crm/api/query/import_query.js new file mode 100644 index 0000000..e05f5d0 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/query/import_query.js @@ -0,0 +1,5 @@ +export * as ResponseHandler from "./response_handler.js"; +export { QueryOperations } from "./query_operations.js"; +export { APIException } from "./api_exception.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { BodyWrapper } from "./body_wrapper.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/query/query_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/query/query_operations.js new file mode 100644 index 0000000..37c2d49 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/query/query_operations.js @@ -0,0 +1,38 @@ +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 QueryOperations{ + /** + * The method to get records + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getRecords(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/coql"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + +} +export { + QueryOperations as MasterModel, + QueryOperations as QueryOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/query/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/query/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/query/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/query/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/query/response_wrapper.js new file mode 100644 index 0000000..1f43a93 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/query/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + data; + info; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("../record/info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/action_wrapper.js new file mode 100644 index 0000000..6996d19 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/body_wrapper.js new file mode 100644 index 0000000..af4e4c0 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/body_wrapper.js @@ -0,0 +1,181 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + data; + trigger; + process; + duplicateCheckFields; + wfTrigger; + larId; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 1); + + } + + /** + * The method to get the trigger + * @returns {Array} An Array representing the trigger + */ + getTrigger() { + return this.trigger; + + } + + /** + * The method to set the value to trigger + * @param {Array} trigger An Array representing the trigger + */ + setTrigger(trigger) { + if((trigger != null) && (!(Object.prototype.toString.call(trigger) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: trigger EXPECTED TYPE: Array", null, null); + } + this.trigger = trigger; + this.keyModified.set("trigger", 1); + + } + + /** + * The method to get the process + * @returns {Array} An Array representing the process + */ + getProcess() { + return this.process; + + } + + /** + * The method to set the value to process + * @param {Array} process An Array representing the process + */ + setProcess(process) { + if((process != null) && (!(Object.prototype.toString.call(process) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: process EXPECTED TYPE: Array", null, null); + } + this.process = process; + this.keyModified.set("process", 1); + + } + + /** + * The method to get the duplicateCheckFields + * @returns {Array} An Array representing the duplicateCheckFields + */ + getDuplicateCheckFields() { + return this.duplicateCheckFields; + + } + + /** + * The method to set the value to duplicateCheckFields + * @param {Array} duplicateCheckFields An Array representing the duplicateCheckFields + */ + setDuplicateCheckFields(duplicateCheckFields) { + if((duplicateCheckFields != null) && (!(Object.prototype.toString.call(duplicateCheckFields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: duplicateCheckFields EXPECTED TYPE: Array", null, null); + } + this.duplicateCheckFields = duplicateCheckFields; + this.keyModified.set("duplicate_check_fields", 1); + + } + + /** + * The method to get the wfTrigger + * @returns {String} A String representing the wfTrigger + */ + getWfTrigger() { + return this.wfTrigger; + + } + + /** + * The method to set the value to wfTrigger + * @param {String} wfTrigger A String representing the wfTrigger + */ + setWfTrigger(wfTrigger) { + if((wfTrigger != null) && (!(Object.prototype.toString.call(wfTrigger) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: wfTrigger EXPECTED TYPE: String", null, null); + } + this.wfTrigger = wfTrigger; + this.keyModified.set("wf_trigger", 1); + + } + + /** + * The method to get the larId + * @returns {String} A String representing the larId + */ + getLarId() { + return this.larId; + + } + + /** + * The method to set the value to larId + * @param {String} larId A String representing the larId + */ + setLarId(larId) { + if((larId != null) && (!(Object.prototype.toString.call(larId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: larId EXPECTED TYPE: String", null, null); + } + this.larId = larId; + this.keyModified.set("lar_id", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/carry_over_tags.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/carry_over_tags.js new file mode 100644 index 0000000..ed1a35b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/carry_over_tags.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class CarryOverTags{ + + contacts; + accounts; + deals; + keyModified = new Map(); + /** + * The method to get the contacts + * @returns {Array} An Array representing the contacts + */ + getContacts() { + return this.contacts; + + } + + /** + * The method to set the value to contacts + * @param {Array} contacts An Array representing the contacts + */ + setContacts(contacts) { + if((contacts != null) && (!(Object.prototype.toString.call(contacts) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: contacts EXPECTED TYPE: Array", null, null); + } + this.contacts = contacts; + this.keyModified.set("Contacts", 1); + + } + + /** + * The method to get the accounts + * @returns {Array} An Array representing the accounts + */ + getAccounts() { + return this.accounts; + + } + + /** + * The method to set the value to accounts + * @param {Array} accounts An Array representing the accounts + */ + setAccounts(accounts) { + if((accounts != null) && (!(Object.prototype.toString.call(accounts) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: accounts EXPECTED TYPE: Array", null, null); + } + this.accounts = accounts; + this.keyModified.set("Accounts", 1); + + } + + /** + * The method to get the deals + * @returns {Array} An Array representing the deals + */ + getDeals() { + return this.deals; + + } + + /** + * The method to set the value to deals + * @param {Array} deals An Array representing the deals + */ + setDeals(deals) { + if((deals != null) && (!(Object.prototype.toString.call(deals) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deals EXPECTED TYPE: Array", null, null); + } + this.deals = deals; + this.keyModified.set("Deals", 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 { + CarryOverTags as MasterModel, + CarryOverTags as CarryOverTags +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/comment.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/comment.js new file mode 100644 index 0000000..85cc878 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/comment.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Comment{ + + commentedBy; + commentedTime; + commentContent; + id; + keyModified = new Map(); + /** + * The method to get the commentedBy + * @returns {String} A String representing the commentedBy + */ + getCommentedBy() { + return this.commentedBy; + + } + + /** + * The method to set the value to commentedBy + * @param {String} commentedBy A String representing the commentedBy + */ + setCommentedBy(commentedBy) { + if((commentedBy != null) && (!(Object.prototype.toString.call(commentedBy) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: commentedBy EXPECTED TYPE: String", null, null); + } + this.commentedBy = commentedBy; + this.keyModified.set("commented_by", 1); + + } + + /** + * The method to get the commentedTime + * @returns {Date} An instance of Date + */ + getCommentedTime() { + return this.commentedTime; + + } + + /** + * The method to set the value to commentedTime + * @param {Date} commentedTime An instance of Date + */ + setCommentedTime(commentedTime) { + if((commentedTime != null) && (!(commentedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: commentedTime EXPECTED TYPE: Date", null, null); + } + this.commentedTime = commentedTime; + this.keyModified.set("commented_time", 1); + + } + + /** + * The method to get the commentContent + * @returns {String} A String representing the commentContent + */ + getCommentContent() { + return this.commentContent; + + } + + /** + * The method to set the value to commentContent + * @param {String} commentContent A String representing the commentContent + */ + setCommentContent(commentContent) { + if((commentContent != null) && (!(Object.prototype.toString.call(commentContent) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: commentContent EXPECTED TYPE: String", null, null); + } + this.commentContent = commentContent; + this.keyModified.set("comment_content", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Comment as MasterModel, + Comment as Comment +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/consent.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/consent.js new file mode 100644 index 0000000..0843796 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/consent.js @@ -0,0 +1,371 @@ +import {Record} from "./record.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Consent extends Record{ + + /** + * The method to get the owner + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getOwner() { + return this.getKeyValue("Owner"); + + } + + /** + * The method to set the value to owner + * @param {MinifiedUser} owner An instance of MinifiedUser + */ + async setOwner(owner) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((owner != null) && (!(owner instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: owner EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Owner", owner); + + } + + /** + * The method to get the contactThroughEmail + * @returns {Boolean} A Boolean representing the contactThroughEmail + */ + getContactThroughEmail() { + return this.getKeyValue("Contact_Through_Email"); + + } + + /** + * The method to set the value to contactThroughEmail + * @param {Boolean} contactThroughEmail A Boolean representing the contactThroughEmail + */ + setContactThroughEmail(contactThroughEmail) { + if((contactThroughEmail != null) && (!(Object.prototype.toString.call(contactThroughEmail) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: contactThroughEmail EXPECTED TYPE: Boolean", null, null); + } + this.addKeyValue("Contact_Through_Email", contactThroughEmail); + + } + + /** + * The method to get the contactThroughSocial + * @returns {Boolean} A Boolean representing the contactThroughSocial + */ + getContactThroughSocial() { + return this.getKeyValue("Contact_Through_Social"); + + } + + /** + * The method to set the value to contactThroughSocial + * @param {Boolean} contactThroughSocial A Boolean representing the contactThroughSocial + */ + setContactThroughSocial(contactThroughSocial) { + if((contactThroughSocial != null) && (!(Object.prototype.toString.call(contactThroughSocial) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: contactThroughSocial EXPECTED TYPE: Boolean", null, null); + } + this.addKeyValue("Contact_Through_Social", contactThroughSocial); + + } + + /** + * The method to get the contactThroughSurvey + * @returns {Boolean} A Boolean representing the contactThroughSurvey + */ + getContactThroughSurvey() { + return this.getKeyValue("Contact_Through_Survey"); + + } + + /** + * The method to set the value to contactThroughSurvey + * @param {Boolean} contactThroughSurvey A Boolean representing the contactThroughSurvey + */ + setContactThroughSurvey(contactThroughSurvey) { + if((contactThroughSurvey != null) && (!(Object.prototype.toString.call(contactThroughSurvey) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: contactThroughSurvey EXPECTED TYPE: Boolean", null, null); + } + this.addKeyValue("Contact_Through_Survey", contactThroughSurvey); + + } + + /** + * The method to get the contactThroughPhone + * @returns {Boolean} A Boolean representing the contactThroughPhone + */ + getContactThroughPhone() { + return this.getKeyValue("Contact_Through_Phone"); + + } + + /** + * The method to set the value to contactThroughPhone + * @param {Boolean} contactThroughPhone A Boolean representing the contactThroughPhone + */ + setContactThroughPhone(contactThroughPhone) { + if((contactThroughPhone != null) && (!(Object.prototype.toString.call(contactThroughPhone) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: contactThroughPhone EXPECTED TYPE: Boolean", null, null); + } + this.addKeyValue("Contact_Through_Phone", contactThroughPhone); + + } + + /** + * The method to get the mailSentTime + * @returns {Date} An instance of Date + */ + getMailSentTime() { + return this.getKeyValue("Mail_Sent_Time"); + + } + + /** + * The method to set the value to mailSentTime + * @param {Date} mailSentTime An instance of Date + */ + setMailSentTime(mailSentTime) { + if((mailSentTime != null) && (!(mailSentTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: mailSentTime EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Mail_Sent_Time", mailSentTime); + + } + + /** + * The method to get the consentDate + * @returns {Date} An instance of Date + */ + getConsentDate() { + return this.getKeyValue("Consent_Date"); + + } + + /** + * The method to set the value to consentDate + * @param {Date} consentDate An instance of Date + */ + setConsentDate(consentDate) { + if((consentDate != null) && (!(consentDate instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: consentDate EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Consent_Date", consentDate); + + } + + /** + * The method to get the consentRemarks + * @returns {String} A String representing the consentRemarks + */ + getConsentRemarks() { + return this.getKeyValue("Consent_Remarks"); + + } + + /** + * The method to set the value to consentRemarks + * @param {String} consentRemarks A String representing the consentRemarks + */ + setConsentRemarks(consentRemarks) { + if((consentRemarks != null) && (!(Object.prototype.toString.call(consentRemarks) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: consentRemarks EXPECTED TYPE: String", null, null); + } + this.addKeyValue("Consent_Remarks", consentRemarks); + + } + + /** + * The method to get the consentThrough + * @returns {String} A String representing the consentThrough + */ + getConsentThrough() { + return this.getKeyValue("Consent_Through"); + + } + + /** + * The method to set the value to consentThrough + * @param {String} consentThrough A String representing the consentThrough + */ + setConsentThrough(consentThrough) { + if((consentThrough != null) && (!(Object.prototype.toString.call(consentThrough) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: consentThrough EXPECTED TYPE: String", null, null); + } + this.addKeyValue("Consent_Through", consentThrough); + + } + + /** + * The method to get the dataProcessingBasis + * @returns {String} A String representing the dataProcessingBasis + */ + getDataProcessingBasis() { + return this.getKeyValue("Data_Processing_Basis"); + + } + + /** + * The method to set the value to dataProcessingBasis + * @param {String} dataProcessingBasis A String representing the dataProcessingBasis + */ + setDataProcessingBasis(dataProcessingBasis) { + if((dataProcessingBasis != null) && (!(Object.prototype.toString.call(dataProcessingBasis) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dataProcessingBasis EXPECTED TYPE: String", null, null); + } + this.addKeyValue("Data_Processing_Basis", dataProcessingBasis); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.getKeyValue("id"); + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.addKeyValue("id", id); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.getKeyValue("Created_By"); + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Created_By", createdBy); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.getKeyValue("Created_Time"); + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Created_Time", createdTime); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.getKeyValue("Modified_By"); + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Modified_By", modifiedBy); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.getKeyValue("Modified_Time"); + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Modified_Time", modifiedTime); + + } + + /** + * The method to get the tag + * @returns {Array} An Array representing the tag + */ + getTag() { + return this.getKeyValue("Tag"); + + } + + /** + * The method to set the value to tag + * @param {Array} tag An Array representing the tag + */ + setTag(tag) { + if((tag != null) && (!(Object.prototype.toString.call(tag) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tag EXPECTED TYPE: Array", null, null); + } + this.addKeyValue("Tag", tag); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.getKeyValue("name"); + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.addKeyValue("name", name); + + } + +} +export { + Consent as MasterModel, + Consent as Consent +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/conversion_option.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/conversion_option.js new file mode 100644 index 0000000..8236c78 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/conversion_option.js @@ -0,0 +1,183 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ConversionOption{ + + modulePreference; + contacts; + deals; + accounts; + modulesWithMultipleLayouts; + preferenceFieldMatchedValue; + keyModified = new Map(); + /** + * The method to get the modulePreference + * @returns {Modules} An instance of Modules + */ + getModulePreference() { + return this.modulePreference; + + } + + /** + * The method to set the value to modulePreference + * @param {Modules} modulePreference An instance of Modules + */ + async setModulePreference(modulePreference) { + const Modules = (await (import("../modules/modules.js"))).MasterModel; + if((modulePreference != null) && (!(modulePreference instanceof Modules))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modulePreference EXPECTED TYPE: Modules", null, null); + } + this.modulePreference = modulePreference; + this.keyModified.set("module_preference", 1); + + } + + /** + * The method to get the contacts + * @returns {Array} An Array representing the contacts + */ + getContacts() { + return this.contacts; + + } + + /** + * The method to set the value to contacts + * @param {Array} contacts An Array representing the contacts + */ + setContacts(contacts) { + if((contacts != null) && (!(Object.prototype.toString.call(contacts) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: contacts EXPECTED TYPE: Array", null, null); + } + this.contacts = contacts; + this.keyModified.set("Contacts", 1); + + } + + /** + * The method to get the deals + * @returns {Array} An Array representing the deals + */ + getDeals() { + return this.deals; + + } + + /** + * The method to set the value to deals + * @param {Array} deals An Array representing the deals + */ + setDeals(deals) { + if((deals != null) && (!(Object.prototype.toString.call(deals) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deals EXPECTED TYPE: Array", null, null); + } + this.deals = deals; + this.keyModified.set("Deals", 1); + + } + + /** + * The method to get the accounts + * @returns {Array} An Array representing the accounts + */ + getAccounts() { + return this.accounts; + + } + + /** + * The method to set the value to accounts + * @param {Array} accounts An Array representing the accounts + */ + setAccounts(accounts) { + if((accounts != null) && (!(Object.prototype.toString.call(accounts) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: accounts EXPECTED TYPE: Array", null, null); + } + this.accounts = accounts; + this.keyModified.set("Accounts", 1); + + } + + /** + * The method to get the modulesWithMultipleLayouts + * @returns {Array} An Array representing the modulesWithMultipleLayouts + */ + getModulesWithMultipleLayouts() { + return this.modulesWithMultipleLayouts; + + } + + /** + * The method to set the value to modulesWithMultipleLayouts + * @param {Array} modulesWithMultipleLayouts An Array representing the modulesWithMultipleLayouts + */ + setModulesWithMultipleLayouts(modulesWithMultipleLayouts) { + if((modulesWithMultipleLayouts != null) && (!(Object.prototype.toString.call(modulesWithMultipleLayouts) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modulesWithMultipleLayouts EXPECTED TYPE: Array", null, null); + } + this.modulesWithMultipleLayouts = modulesWithMultipleLayouts; + this.keyModified.set("modules_with_multiple_layouts", 1); + + } + + /** + * The method to get the preferenceFieldMatchedValue + * @returns {PreferenceFieldMatchedValue} An instance of PreferenceFieldMatchedValue + */ + getPreferenceFieldMatchedValue() { + return this.preferenceFieldMatchedValue; + + } + + /** + * The method to set the value to preferenceFieldMatchedValue + * @param {PreferenceFieldMatchedValue} preferenceFieldMatchedValue An instance of PreferenceFieldMatchedValue + */ + async setPreferenceFieldMatchedValue(preferenceFieldMatchedValue) { + const PreferenceFieldMatchedValue = (await (import("./preference_field_matched_value.js"))).MasterModel; + if((preferenceFieldMatchedValue != null) && (!(preferenceFieldMatchedValue instanceof PreferenceFieldMatchedValue))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: preferenceFieldMatchedValue EXPECTED TYPE: PreferenceFieldMatchedValue", null, null); + } + this.preferenceFieldMatchedValue = preferenceFieldMatchedValue; + this.keyModified.set("preference_field_matched_value", 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 { + ConversionOption as MasterModel, + ConversionOption as ConversionOption +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/conversion_options_response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/conversion_options_response_wrapper.js new file mode 100644 index 0000000..dd28761 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/conversion_options_response_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ConversionOptionsResponseWrapper{ + + conversionoptions; + keyModified = new Map(); + /** + * The method to get the conversionoptions + * @returns {ConversionOption} An instance of ConversionOption + */ + getConversionoptions() { + return this.conversionoptions; + + } + + /** + * The method to set the value to conversionoptions + * @param {ConversionOption} conversionoptions An instance of ConversionOption + */ + async setConversionoptions(conversionoptions) { + const ConversionOption = (await (import("./conversion_option.js"))).MasterModel; + if((conversionoptions != null) && (!(conversionoptions instanceof ConversionOption))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: conversionoptions EXPECTED TYPE: ConversionOption", null, null); + } + this.conversionoptions = conversionoptions; + this.keyModified.set("__conversion_options", 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 { + ConversionOptionsResponseWrapper as MasterModel, + ConversionOptionsResponseWrapper as ConversionOptionsResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/convert_body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/convert_body_wrapper.js new file mode 100644 index 0000000..3a627c9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/convert_body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ConvertBodyWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + ConvertBodyWrapper as MasterModel, + ConvertBodyWrapper as ConvertBodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/count_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/count_handler.js new file mode 100644 index 0000000..542e21f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/count_handler.js @@ -0,0 +1,7 @@ +class CountHandler{ + +} +export { + CountHandler as MasterModel, + CountHandler as CountHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/count_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/count_wrapper.js new file mode 100644 index 0000000..13c8d51 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/count_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class CountWrapper{ + + count; + keyModified = new Map(); + /** + * The method to get the count + * @returns {BigInt} A BigInt representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {BigInt} count A BigInt representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: BigInt", null, null); + } + this.count = count; + this.keyModified.set("count", 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 { + CountWrapper as MasterModel, + CountWrapper as CountWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/criteria.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/criteria.js new file mode 100644 index 0000000..f646d3f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/criteria.js @@ -0,0 +1,156 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Criteria{ + + comparator; + field; + value; + groupOperator; + group; + keyModified = new Map(); + /** + * The method to get the comparator + * @returns {Choice} An instance of Choice + */ + getComparator() { + return this.comparator; + + } + + /** + * The method to set the value to comparator + * @param {Choice} comparator An instance of Choice + */ + setComparator(comparator) { + if((comparator != null) && (!(comparator instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: comparator EXPECTED TYPE: Choice", null, null); + } + this.comparator = comparator; + this.keyModified.set("comparator", 1); + + } + + /** + * The method to get the field + * @returns {String} A String representing the field + */ + getField() { + return this.field; + + } + + /** + * The method to set the value to field + * @param {String} field A String representing the field + */ + setField(field) { + if((field != null) && (!(Object.prototype.toString.call(field) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: field EXPECTED TYPE: String", null, null); + } + this.field = field; + this.keyModified.set("field", 1); + + } + + /** + * The method to get the value + * @returns {Object} An Object representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {Object} value An Object representing the value + */ + setValue(value) { + this.value = value; + this.keyModified.set("value", 1); + + } + + /** + * The method to get the groupOperator + * @returns {Choice} An instance of Choice + */ + getGroupOperator() { + return this.groupOperator; + + } + + /** + * The method to set the value to groupOperator + * @param {Choice} groupOperator An instance of Choice + */ + setGroupOperator(groupOperator) { + if((groupOperator != null) && (!(groupOperator instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: groupOperator EXPECTED TYPE: Choice", null, null); + } + this.groupOperator = groupOperator; + this.keyModified.set("group_operator", 1); + + } + + /** + * The method to get the group + * @returns {Array} An Array representing the group + */ + getGroup() { + return this.group; + + } + + /** + * The method to set the value to group + * @param {Array} group An Array representing the group + */ + setGroup(group) { + if((group != null) && (!(Object.prototype.toString.call(group) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: group EXPECTED TYPE: Array", null, null); + } + this.group = group; + this.keyModified.set("group", 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 { + Criteria as MasterModel, + Criteria as Criteria +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/deleted_record.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/deleted_record.js new file mode 100644 index 0000000..4dd1bef --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/deleted_record.js @@ -0,0 +1,183 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DeletedRecord{ + + deletedBy; + id; + displayName; + type; + createdBy; + deletedTime; + keyModified = new Map(); + /** + * The method to get the deletedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getDeletedBy() { + return this.deletedBy; + + } + + /** + * The method to set the value to deletedBy + * @param {MinifiedUser} deletedBy An instance of MinifiedUser + */ + async setDeletedBy(deletedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((deletedBy != null) && (!(deletedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deletedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.deletedBy = deletedBy; + this.keyModified.set("deleted_by", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the displayName + * @returns {String} A String representing the displayName + */ + getDisplayName() { + return this.displayName; + + } + + /** + * The method to set the value to displayName + * @param {String} displayName A String representing the displayName + */ + setDisplayName(displayName) { + if((displayName != null) && (!(Object.prototype.toString.call(displayName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayName EXPECTED TYPE: String", null, null); + } + this.displayName = displayName; + this.keyModified.set("display_name", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 1); + + } + + /** + * The method to get the deletedTime + * @returns {Date} An instance of Date + */ + getDeletedTime() { + return this.deletedTime; + + } + + /** + * The method to set the value to deletedTime + * @param {Date} deletedTime An instance of Date + */ + setDeletedTime(deletedTime) { + if((deletedTime != null) && (!(deletedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deletedTime EXPECTED TYPE: Date", null, null); + } + this.deletedTime = deletedTime; + this.keyModified.set("deleted_time", 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 { + DeletedRecord as MasterModel, + DeletedRecord as DeletedRecord +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/deleted_records_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/deleted_records_handler.js new file mode 100644 index 0000000..003539d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/deleted_records_handler.js @@ -0,0 +1,7 @@ +class DeletedRecordsHandler{ + +} +export { + DeletedRecordsHandler as MasterModel, + DeletedRecordsHandler as DeletedRecordsHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/deleted_records_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/deleted_records_wrapper.js new file mode 100644 index 0000000..2cc6067 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/deleted_records_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DeletedRecordsWrapper{ + + data; + info; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + DeletedRecordsWrapper as MasterModel, + DeletedRecordsWrapper as DeletedRecordsWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/download_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/download_handler.js new file mode 100644 index 0000000..20692b4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/download_handler.js @@ -0,0 +1,7 @@ +class DownloadHandler{ + +} +export { + DownloadHandler as MasterModel, + DownloadHandler as DownloadHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/field.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/field.js new file mode 100644 index 0000000..11707a7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/field.js @@ -0,0 +1,688 @@ + +class Field{ + + apiName; + /** + * Creates an instance of Field with the given parameters + * @param {String} apiName A String representing the apiName + */ + constructor(apiName){ + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + static Products = class { + static PRODUCT_CATEGORY = new Field("Product_Category"); + static QTY_IN_DEMAND = new Field("Qty_in_Demand"); + static OWNER = new Field("Owner"); + static DESCRIPTION = new Field("Description"); + static VENDOR_NAME = new Field("Vendor_Name"); + static SALES_START_DATE = new Field("Sales_Start_Date"); + static TAX = new Field("Tax"); + static PRODUCT_ACTIVE = new Field("Product_Active"); + static RECORD_IMAGE = new Field("Record_Image"); + static MODIFIED_BY = new Field("Modified_By"); + static PRODUCT_CODE = new Field("Product_Code"); + static MANUFACTURER = new Field("Manufacturer"); + static ID = new Field("id"); + static SUPPORT_EXPIRY_DATE = new Field("Support_Expiry_Date"); + static MODIFIED_TIME = new Field("Modified_Time"); + static CREATED_TIME = new Field("Created_Time"); + static COMMISSION_RATE = new Field("Commission_Rate"); + static PRODUCT_NAME = new Field("Product_Name"); + static HANDLER = new Field("Handler"); + static SUPPORT_START_DATE = new Field("Support_Start_Date"); + static USAGE_UNIT = new Field("Usage_Unit"); + static QTY_ORDERED = new Field("Qty_Ordered"); + static QTY_IN_STOCK = new Field("Qty_in_Stock"); + static CREATED_BY = new Field("Created_By"); + static TAG = new Field("Tag"); + static SALES_END_DATE = new Field("Sales_End_Date"); + static UNIT_PRICE = new Field("Unit_Price"); + static TAXABLE = new Field("Taxable"); + static REORDER_LEVEL = new Field("Reorder_Level"); + } + + static Consents = class { + static CONTACT_THROUGH_EMAIL = new Field("Contact_Through_Email"); + static OWNER = new Field("Owner"); + static MODIFIED_TIME = new Field("Modified_Time"); + static EMAIL = new Field("Email"); + static CREATED_TIME = new Field("Created_Time"); + static CONSENT_THROUGH = new Field("Consent_Through"); + static CONTACT_THROUGH_SURVEY = new Field("Contact_Through_Survey"); + static DATA_PROCESSING_BASIS = new Field("Data_Processing_Basis"); + static CONTACT_THROUGH_PHONE = new Field("Contact_Through_Phone"); + static LAWFUL_REASON = new Field("Lawful_Reason"); + static MAIL_SENT_TIME = new Field("Mail_Sent_Time"); + static MODIFIED_BY = new Field("Modified_By"); + static CONSENT_DATE = new Field("Consent_Date"); + static ID = new Field("id"); + static CREATED_BY = new Field("Created_By"); + static CONSENT_REMARKS = new Field("Consent_Remarks"); + } + + static Tasks = class { + static STATUS = new Field("Status"); + static OWNER = new Field("Owner"); + static MODIFIED_TIME = new Field("Modified_Time"); + static DESCRIPTION = new Field("Description"); + static DUE_DATE = new Field("Due_Date"); + static PRIORITY = new Field("Priority"); + static CREATED_TIME = new Field("Created_Time"); + static CLOSED_TIME = new Field("Closed_Time"); + static SUBJECT = new Field("Subject"); + static SEND_NOTIFICATION_EMAIL = new Field("Send_Notification_Email"); + static MODIFIED_BY = new Field("Modified_By"); + static RECURRING_ACTIVITY = new Field("Recurring_Activity"); + static WHAT_ID = new Field("What_Id"); + static LOCKED__S = new Field("Locked__s"); + static CREATED_BY = new Field("Created_By"); + static TAG = new Field("Tag"); + static ID = new Field("id"); + static REMIND_AT = new Field("Remind_At"); + static WHO_ID = new Field("Who_Id"); + } + + static Data_Subject_Requests = class { + static REQUEST_TYPE = new Field("Request_Type"); + static IS_CLOSED = new Field("Is_Closed"); + static PARENT_ID = new Field("Parent_Id"); + static REQUEST_SOURCE = new Field("Request_Source"); + static ID = new Field("id"); + static CLOSED_BY = new Field("Closed_By"); + static REQUESTED_BY = new Field("Requested_By"); + static REQUESTED_DATE = new Field("Requested_Date"); + static CLOSED_DATE = new Field("Closed_Date"); + } + + static Vendors = class { + static OWNER = new Field("Owner"); + static MODIFIED_TIME = new Field("Modified_Time"); + static EMAIL = new Field("Email"); + static CATEGORY = new Field("Category"); + static DESCRIPTION = new Field("Description"); + static VENDOR_NAME = new Field("Vendor_Name"); + static CREATED_TIME = new Field("Created_Time"); + static WEBSITE = new Field("Website"); + static CITY = new Field("City"); + static RECORD_IMAGE = new Field("Record_Image"); + static MODIFIED_BY = new Field("Modified_By"); + static PHONE = new Field("Phone"); + static STATE = new Field("State"); + static GL_ACCOUNT = new Field("GL_Account"); + static LOCKED__S = new Field("Locked__s"); + static STREET = new Field("Street"); + static COUNTRY = new Field("Country"); + static ZIP_CODE = new Field("Zip_Code"); + static CREATED_BY = new Field("Created_By"); + static TAG = new Field("Tag"); + static ID = new Field("id"); + } + + static Data_Enrichment_Stats__s = class { + static USAGE_BULK_COUNT__S = new Field("Usage_Bulk_Count__s"); + static USAGE_DATE__S = new Field("Usage_Date__s"); + static FEATURE_NAME__S = new Field("Feature_Name__s"); + static MODULE__S = new Field("Module__s"); + static ADD_ON_LIMIT__S = new Field("Add_On_Limit__s"); + static MONTHLY_LIMIT__S = new Field("Monthly_Limit__s"); + static USAGE_COUNT__S = new Field("Usage_Count__s"); + } + + static Calls = class { + static CALL_DURATION = new Field("Call_Duration"); + static OWNER = new Field("Owner"); + static DESCRIPTION = new Field("Description"); + static CALLER_ID = new Field("Caller_ID"); + static CTI_ENTRY = new Field("CTI_Entry"); + static CALL_AGENDA = new Field("Call_Agenda"); + static MODIFIED_BY = new Field("Modified_By"); + static CALL_PURPOSE = new Field("Call_Purpose"); + static ID = new Field("id"); + static WHO_ID = new Field("Who_Id"); + static OUTGOING_CALL_STATUS = new Field("Outgoing_Call_Status"); + static MODIFIED_TIME = new Field("Modified_Time"); + static REMINDER = new Field("Reminder"); + static VOICE_RECORDING__S = new Field("Voice_Recording__s"); + static CREATED_TIME = new Field("Created_Time"); + static CALL_START_TIME = new Field("Call_Start_Time"); + static SUBJECT = new Field("Subject"); + static CALL_TYPE = new Field("Call_Type"); + static SCHEDULED_IN_CRM = new Field("Scheduled_In_CRM"); + static CALL_RESULT = new Field("Call_Result"); + static WHAT_ID = new Field("What_Id"); + static CALL_DURATION_IN_SECONDS = new Field("Call_Duration_in_seconds"); + static CREATED_BY = new Field("Created_By"); + static TAG = new Field("Tag"); + static DIALLED_NUMBER = new Field("Dialled_Number"); + } + + static Leads = class { + static OWNER = new Field("Owner"); + static COMPANY = new Field("Company"); + static EMAIL = new Field("Email"); + static LAST_ACTIVITY_TIME = new Field("Last_Activity_Time"); + static INDUSTRY = new Field("Industry"); + static UNSUBSCRIBED_MODE = new Field("Unsubscribed_Mode"); + static EXCHANGE_RATE = new Field("Exchange_Rate"); + static CURRENCY = new Field("Currency"); + static STREET = new Field("Street"); + static DATA_PROCESSING_BASIS_DETAILS = new Field("Data_Processing_Basis_Details"); + static ZIP_CODE = new Field("Zip_Code"); + static ID = new Field("id"); + static DATA_SOURCE = new Field("Data_Source"); + static ENRICH_STATUS__S = new Field("Enrich_Status__s"); + static CREATED_TIME = new Field("Created_Time"); + static CHANGE_LOG_TIME__S = new Field("Change_Log_Time__s"); + static CITY = new Field("City"); + static NO_OF_EMPLOYEES = new Field("No_of_Employees"); + static DATA_PROCESSING_BASIS = new Field("Data_Processing_Basis"); + static CONVERTED__S = new Field("Converted__s"); + static CONVERTED_DATE_TIME = new Field("Converted_Date_Time"); + static CONVERTED_ACCOUNT = new Field("Converted_Account"); + static STATE = new Field("State"); + static COUNTRY = new Field("Country"); + static CREATED_BY = new Field("Created_By"); + static ANNUAL_REVENUE = new Field("Annual_Revenue"); + static SECONDARY_EMAIL = new Field("Secondary_Email"); + static DESCRIPTION = new Field("Description"); + static RATING = new Field("Rating"); + static WEBSITE = new Field("Website"); + static TWITTER = new Field("Twitter"); + static SALUTATION = new Field("Salutation"); + static FIRST_NAME = new Field("First_Name"); + static FULL_NAME = new Field("Full_Name"); + static LEAD_STATUS = new Field("Lead_Status"); + static RECORD_IMAGE = new Field("Record_Image"); + static MODIFIED_BY = new Field("Modified_By"); + static CONVERTED_DEAL = new Field("Converted_Deal"); + static LEAD_CONVERSION_TIME = new Field("Lead_Conversion_Time"); + static SKYPE_ID = new Field("Skype_ID"); + static PHONE = new Field("Phone"); + static EMAIL_OPT_OUT = new Field("Email_Opt_Out"); + static DESIGNATION = new Field("Designation"); + static MODIFIED_TIME = new Field("Modified_Time"); + static UNSUBSCRIBED_TIME = new Field("Unsubscribed_Time"); + static CONVERTED_CONTACT = new Field("Converted_Contact"); + static MOBILE = new Field("Mobile"); + static TERRITORIES = new Field("Territories"); + static LAST_NAME = new Field("Last_Name"); + static LAYOUT = new Field("Layout"); + static LOCKED__S = new Field("Locked__s"); + static LEAD_SOURCE = new Field("Lead_Source"); + static TAG = new Field("Tag"); + static FAX = new Field("Fax"); + static LAST_ENRICHED_TIME__S = new Field("Last_Enriched_Time__s"); + } + + static Deals = class { + static OWNER = new Field("Owner"); + static DESCRIPTION = new Field("Description"); + static CAMPAIGN_SOURCE = new Field("Campaign_Source"); + static CLOSING_DATE = new Field("Closing_Date"); + static REASON_FOR_LOSS__S = new Field("Reason_For_Loss__s"); + static LAST_ACTIVITY_TIME = new Field("Last_Activity_Time"); + static MODIFIED_BY = new Field("Modified_By"); + static LEAD_CONVERSION_TIME = new Field("Lead_Conversion_Time"); + static DEAL_NAME = new Field("Deal_Name"); + static EXCHANGE_RATE = new Field("Exchange_Rate"); + static EXPECTED_REVENUE = new Field("Expected_Revenue"); + static CURRENCY = new Field("Currency"); + static OVERALL_SALES_DURATION = new Field("Overall_Sales_Duration"); + static STAGE = new Field("Stage"); + static ACCOUNT_NAME = new Field("Account_Name"); + static ID = new Field("id"); + static MODIFIED_TIME = new Field("Modified_Time"); + static TERRITORY = new Field("Territory"); + static CREATED_TIME = new Field("Created_Time"); + static AMOUNT = new Field("Amount"); + static PROBABILITY = new Field("Probability"); + static NEXT_STEP = new Field("Next_Step"); + static CHANGE_LOG_TIME__S = new Field("Change_Log_Time__s"); + static PIPELINE = new Field("Pipeline"); + static CONTACT_NAME = new Field("Contact_Name"); + static SALES_CYCLE_DURATION = new Field("Sales_Cycle_Duration"); + static TYPE = new Field("Type"); + static LOCKED__S = new Field("Locked__s"); + static LEAD_SOURCE = new Field("Lead_Source"); + static CREATED_BY = new Field("Created_By"); + static TAG = new Field("Tag"); + } + + static Quotes = class { + static OWNER = new Field("Owner"); + static DESCRIPTION = new Field("Description"); + static DISCOUNT = new Field("Discount"); + static SHIPPING_STATE = new Field("Shipping_State"); + static TAX = new Field("Tax"); + static MODIFIED_BY = new Field("Modified_By"); + static DEAL_NAME = new Field("Deal_Name"); + static EXCHANGE_RATE = new Field("Exchange_Rate"); + static VALID_TILL = new Field("Valid_Till"); + static CURRENCY = new Field("Currency"); + static BILLING_COUNTRY = new Field("Billing_Country"); + static TEAM = new Field("Team"); + static ACCOUNT_NAME = new Field("Account_Name"); + static CARRIER = new Field("Carrier"); + static ID = new Field("id"); + static QUOTED_ITEMS = new Field("Quoted_Items"); + static QUOTE_STAGE = new Field("Quote_Stage"); + static GRAND_TOTAL = new Field("Grand_Total"); + static MODIFIED_TIME = new Field("Modified_Time"); + static BILLING_STREET = new Field("Billing_Street"); + static ADJUSTMENT = new Field("Adjustment"); + static CREATED_TIME = new Field("Created_Time"); + static TERMS_AND_CONDITIONS = new Field("Terms_and_Conditions"); + static SUB_TOTAL = new Field("Sub_Total"); + static BILLING_CODE = new Field("Billing_Code"); + static SUBJECT = new Field("Subject"); + static CONTACT_NAME = new Field("Contact_Name"); + static SHIPPING_CITY = new Field("Shipping_City"); + static SHIPPING_COUNTRY = new Field("Shipping_Country"); + static SHIPPING_CODE = new Field("Shipping_Code"); + static BILLING_CITY = new Field("Billing_City"); + static QUOTE_NUMBER = new Field("Quote_Number"); + static LOCKED__S = new Field("Locked__s"); + static BILLING_STATE = new Field("Billing_State"); + static CREATED_BY = new Field("Created_By"); + static TAG = new Field("Tag"); + static SHIPPING_STREET = new Field("Shipping_Street"); + } + + static Invoices = class { + static OWNER = new Field("Owner"); + static DESCRIPTION = new Field("Description"); + static DISCOUNT = new Field("Discount"); + static SHIPPING_STATE = new Field("Shipping_State"); + static TAX = new Field("Tax"); + static INVOICE_DATE = new Field("Invoice_Date"); + static MODIFIED_BY = new Field("Modified_By"); + static INVOICED_ITEMS = new Field("Invoiced_Items"); + static EXCHANGE_RATE = new Field("Exchange_Rate"); + static CURRENCY = new Field("Currency"); + static BILLING_COUNTRY = new Field("Billing_Country"); + static ACCOUNT_NAME = new Field("Account_Name"); + static ID = new Field("id"); + static SALES_ORDER = new Field("Sales_Order"); + static STATUS = new Field("Status"); + static SALES_COMMISSION = new Field("Sales_Commission"); + static GRAND_TOTAL = new Field("Grand_Total"); + static MODIFIED_TIME = new Field("Modified_Time"); + static DUE_DATE = new Field("Due_Date"); + static BILLING_STREET = new Field("Billing_Street"); + static ADJUSTMENT = new Field("Adjustment"); + static CREATED_TIME = new Field("Created_Time"); + static TERMS_AND_CONDITIONS = new Field("Terms_and_Conditions"); + static SUB_TOTAL = new Field("Sub_Total"); + static INVOICE_NUMBER = new Field("Invoice_Number"); + static BILLING_CODE = new Field("Billing_Code"); + static SUBJECT = new Field("Subject"); + static EXCISE_DUTY = new Field("Excise_Duty"); + static CONTACT_NAME = new Field("Contact_Name"); + static SHIPPING_CITY = new Field("Shipping_City"); + static SHIPPING_COUNTRY = new Field("Shipping_Country"); + static SHIPPING_CODE = new Field("Shipping_Code"); + static BILLING_CITY = new Field("Billing_City"); + static LOCKED__S = new Field("Locked__s"); + static PURCHASE_ORDER = new Field("Purchase_Order"); + static BILLING_STATE = new Field("Billing_State"); + static CREATED_BY = new Field("Created_By"); + static TAG = new Field("Tag"); + static SHIPPING_STREET = new Field("Shipping_Street"); + } + + static Campaigns = class { + static STATUS = new Field("Status"); + static OWNER = new Field("Owner"); + static MODIFIED_TIME = new Field("Modified_Time"); + static DESCRIPTION = new Field("Description"); + static CAMPAIGN_NAME = new Field("Campaign_Name"); + static CREATED_TIME = new Field("Created_Time"); + static END_DATE = new Field("End_Date"); + static TYPE = new Field("Type"); + static MODIFIED_BY = new Field("Modified_By"); + static NUM_SENT = new Field("Num_sent"); + static EXCHANGE_RATE = new Field("Exchange_Rate"); + static EXPECTED_REVENUE = new Field("Expected_Revenue"); + static CURRENCY = new Field("Currency"); + static ACTUAL_COST = new Field("Actual_Cost"); + static EXPECTED_RESPONSE = new Field("Expected_Response"); + static CREATED_BY = new Field("Created_By"); + static PARENT_CAMPAIGN = new Field("Parent_Campaign"); + static TAG = new Field("Tag"); + static ID = new Field("id"); + static START_DATE = new Field("Start_Date"); + static BUDGETED_COST = new Field("Budgeted_Cost"); + } + + static Attachments = class { + static OWNER = new Field("Owner"); + static MODIFIED_BY = new Field("Modified_By"); + static MODIFIED_TIME = new Field("Modified_Time"); + static FILE_NAME = new Field("File_Name"); + static CREATED_TIME = new Field("Created_Time"); + static SIZE = new Field("Size"); + static PARENT_ID = new Field("Parent_Id"); + static ID = new Field("id"); + static CREATED_BY = new Field("Created_By"); + } + + static Price_Books = class { + static OWNER = new Field("Owner"); + static MODIFIED_TIME = new Field("Modified_Time"); + static PRICING_DETAILS = new Field("Pricing_Details"); + static DESCRIPTION = new Field("Description"); + static CREATED_TIME = new Field("Created_Time"); + static ACTIVE = new Field("Active"); + static MODIFIED_BY = new Field("Modified_By"); + static PRICING_MODEL = new Field("Pricing_Model"); + static LOCKED__S = new Field("Locked__s"); + static PRICE_BOOK_NAME = new Field("Price_Book_Name"); + static CREATED_BY = new Field("Created_By"); + static TAG = new Field("Tag"); + static ID = new Field("id"); + } + + static Sales_Orders = class { + static OWNER = new Field("Owner"); + static DESCRIPTION = new Field("Description"); + static DISCOUNT = new Field("Discount"); + static CUSTOMER_NO = new Field("Customer_No"); + static SHIPPING_STATE = new Field("Shipping_State"); + static TAX = new Field("Tax"); + static MODIFIED_BY = new Field("Modified_By"); + static DEAL_NAME = new Field("Deal_Name"); + static EXCHANGE_RATE = new Field("Exchange_Rate"); + static CURRENCY = new Field("Currency"); + static BILLING_COUNTRY = new Field("Billing_Country"); + static ACCOUNT_NAME = new Field("Account_Name"); + static CARRIER = new Field("Carrier"); + static ID = new Field("id"); + static ORDERED_ITEMS = new Field("Ordered_Items"); + static QUOTE_NAME = new Field("Quote_Name"); + static STATUS = new Field("Status"); + static SALES_COMMISSION = new Field("Sales_Commission"); + static MODIFIED_TIME = new Field("Modified_Time"); + static DUE_DATE = new Field("Due_Date"); + static BILLING_STREET = new Field("Billing_Street"); + static ADJUSTMENT = new Field("Adjustment"); + static CREATED_TIME = new Field("Created_Time"); + static TERMS_AND_CONDITIONS = new Field("Terms_and_Conditions"); + static SUB_TOTAL = new Field("Sub_Total"); + static BILLING_CODE = new Field("Billing_Code"); + static SUBJECT = new Field("Subject"); + static CONTACT_NAME = new Field("Contact_Name"); + static EXCISE_DUTY = new Field("Excise_Duty"); + static SHIPPING_CITY = new Field("Shipping_City"); + static SHIPPING_COUNTRY = new Field("Shipping_Country"); + static SHIPPING_CODE = new Field("Shipping_Code"); + static BILLING_CITY = new Field("Billing_City"); + static SO_NUMBER = new Field("SO_Number"); + static LOCKED__S = new Field("Locked__s"); + static PURCHASE_ORDER = new Field("Purchase_Order"); + static BILLING_STATE = new Field("Billing_State"); + static CREATED_BY = new Field("Created_By"); + static TAG = new Field("Tag"); + static PENDING = new Field("Pending"); + static SHIPPING_STREET = new Field("Shipping_Street"); + } + + static Contacts = class { + static OWNER = new Field("Owner"); + static EMAIL = new Field("Email"); + static OTHER_PHONE = new Field("Other_Phone"); + static MAILING_STATE = new Field("Mailing_State"); + static OTHER_STATE = new Field("Other_State"); + static OTHER_COUNTRY = new Field("Other_Country"); + static LAST_ACTIVITY_TIME = new Field("Last_Activity_Time"); + static DEPARTMENT = new Field("Department"); + static UNSUBSCRIBED_MODE = new Field("Unsubscribed_Mode"); + static ASSISTANT = new Field("Assistant"); + static MAILING_COUNTRY = new Field("Mailing_Country"); + static DATA_PROCESSING_BASIS_DETAILS = new Field("Data_Processing_Basis_Details"); + static ID = new Field("id"); + static DATA_SOURCE = new Field("Data_Source"); + static REPORTING_TO = new Field("Reporting_To"); + static ENRICH_STATUS__S = new Field("Enrich_Status__s"); + static OTHER_CITY = new Field("Other_City"); + static CREATED_TIME = new Field("Created_Time"); + static CHANGE_LOG_TIME__S = new Field("Change_Log_Time__s"); + static DATA_PROCESSING_BASIS = new Field("Data_Processing_Basis"); + static HOME_PHONE = new Field("Home_Phone"); + static CREATED_BY = new Field("Created_By"); + static SECONDARY_EMAIL = new Field("Secondary_Email"); + static DESCRIPTION = new Field("Description"); + static VENDOR_NAME = new Field("Vendor_Name"); + static MAILING_ZIP = new Field("Mailing_Zip"); + static REPORTS_TO = new Field("Reports_To"); + static TWITTER = new Field("Twitter"); + static OTHER_ZIP = new Field("Other_Zip"); + static MAILING_STREET = new Field("Mailing_Street"); + static SALUTATION = new Field("Salutation"); + static FIRST_NAME = new Field("First_Name"); + static FULL_NAME = new Field("Full_Name"); + static ASST_PHONE = new Field("Asst_Phone"); + static RECORD_IMAGE = new Field("Record_Image"); + static MODIFIED_BY = new Field("Modified_By"); + static SKYPE_ID = new Field("Skype_ID"); + static PHONE = new Field("Phone"); + static ACCOUNT_NAME = new Field("Account_Name"); + static EMAIL_OPT_OUT = new Field("Email_Opt_Out"); + static MODIFIED_TIME = new Field("Modified_Time"); + static DATE_OF_BIRTH = new Field("Date_of_Birth"); + static MAILING_CITY = new Field("Mailing_City"); + static UNSUBSCRIBED_TIME = new Field("Unsubscribed_Time"); + static TITLE = new Field("Title"); + static OTHER_STREET = new Field("Other_Street"); + static MOBILE = new Field("Mobile"); + static TERRITORIES = new Field("Territories"); + static LAST_NAME = new Field("Last_Name"); + static LOCKED__S = new Field("Locked__s"); + static LEAD_SOURCE = new Field("Lead_Source"); + static TAG = new Field("Tag"); + static FAX = new Field("Fax"); + static LAST_ENRICHED_TIME__S = new Field("Last_Enriched_Time__s"); + } + + static Solutions = class { + static STATUS = new Field("Status"); + static OWNER = new Field("Owner"); + static MODIFIED_TIME = new Field("Modified_Time"); + static CREATED_TIME = new Field("Created_Time"); + static COMMENTS = new Field("Comments"); + static NO_OF_COMMENTS = new Field("No_of_comments"); + static PRODUCT_NAME = new Field("Product_Name"); + static ADD_COMMENT = new Field("Add_Comment"); + static SOLUTION_NUMBER = new Field("Solution_Number"); + static ANSWER = new Field("Answer"); + static MODIFIED_BY = new Field("Modified_By"); + static SOLUTION_TITLE = new Field("Solution_Title"); + static LOCKED__S = new Field("Locked__s"); + static PUBLISHED = new Field("Published"); + static QUESTION = new Field("Question"); + static CREATED_BY = new Field("Created_By"); + static TAG = new Field("Tag"); + static ID = new Field("id"); + } + + static Events = class { + static ALL_DAY = new Field("All_day"); + static OWNER = new Field("Owner"); + static CHECK_IN_STATE = new Field("Check_In_State"); + static CHECK_IN_ADDRESS = new Field("Check_In_Address"); + static DESCRIPTION = new Field("Description"); + static REMIND_PARTICIPANTS = new Field("Remind_Participants"); + static START_DATETIME = new Field("Start_DateTime"); + static LATITUDE = new Field("Latitude"); + static PARTICIPANTS = new Field("Participants"); + static EVENT_TITLE = new Field("Event_Title"); + static END_DATETIME = new Field("End_DateTime"); + static CHECK_IN_BY = new Field("Check_In_By"); + static MODIFIED_BY = new Field("Modified_By"); + static CHECK_IN_CITY = new Field("Check_In_City"); + static ID = new Field("id"); + static CHECK_IN_COMMENT = new Field("Check_In_Comment"); + static REMIND_AT = new Field("Remind_At"); + static WHO_ID = new Field("Who_Id"); + static CHECK_IN_STATUS = new Field("Check_In_Status"); + static CHECK_IN_COUNTRY = new Field("Check_In_Country"); + static MODIFIED_TIME = new Field("Modified_Time"); + static VENUE = new Field("Venue"); + static ZIP_CODE = new Field("ZIP_Code"); + static CREATED_TIME = new Field("Created_Time"); + static LONGITUDE = new Field("Longitude"); + static CHECK_IN_TIME = new Field("Check_In_Time"); + static RECURRING_ACTIVITY = new Field("Recurring_Activity"); + static WHAT_ID = new Field("What_Id"); + static CHECK_IN_SUB_LOCALITY = new Field("Check_In_Sub_Locality"); + static CREATED_BY = new Field("Created_By"); + static TAG = new Field("Tag"); + } + + static Purchase_Orders = class { + static OWNER = new Field("Owner"); + static DESCRIPTION = new Field("Description"); + static DISCOUNT = new Field("Discount"); + static VENDOR_NAME = new Field("Vendor_Name"); + static SHIPPING_STATE = new Field("Shipping_State"); + static TAX = new Field("Tax"); + static PO_DATE = new Field("PO_Date"); + static MODIFIED_BY = new Field("Modified_By"); + static EXCHANGE_RATE = new Field("Exchange_Rate"); + static CURRENCY = new Field("Currency"); + static BILLING_COUNTRY = new Field("Billing_Country"); + static PURCHASE_ITEMS = new Field("Purchase_Items"); + static CARRIER = new Field("Carrier"); + static ID = new Field("id"); + static STATUS = new Field("Status"); + static SALES_COMMISSION = new Field("Sales_Commission"); + static GRAND_TOTAL = new Field("Grand_Total"); + static MODIFIED_TIME = new Field("Modified_Time"); + static PO_NUMBER = new Field("PO_Number"); + static DUE_DATE = new Field("Due_Date"); + static BILLING_STREET = new Field("Billing_Street"); + static ADJUSTMENT = new Field("Adjustment"); + static CREATED_TIME = new Field("Created_Time"); + static TERMS_AND_CONDITIONS = new Field("Terms_and_Conditions"); + static SUB_TOTAL = new Field("Sub_Total"); + static BILLING_CODE = new Field("Billing_Code"); + static SUBJECT = new Field("Subject"); + static TRACKING_NUMBER = new Field("Tracking_Number"); + static CONTACT_NAME = new Field("Contact_Name"); + static EXCISE_DUTY = new Field("Excise_Duty"); + static SHIPPING_CITY = new Field("Shipping_City"); + static SHIPPING_COUNTRY = new Field("Shipping_Country"); + static SHIPPING_CODE = new Field("Shipping_Code"); + static BILLING_CITY = new Field("Billing_City"); + static REQUISITION_NO = new Field("Requisition_No"); + static LOCKED__S = new Field("Locked__s"); + static BILLING_STATE = new Field("Billing_State"); + static CREATED_BY = new Field("Created_By"); + static TAG = new Field("Tag"); + static SHIPPING_STREET = new Field("Shipping_Street"); + } + + static Accounts = class { + static OWNER = new Field("Owner"); + static OWNERSHIP = new Field("Ownership"); + static DESCRIPTION = new Field("Description"); + static ACCOUNT_TYPE = new Field("Account_Type"); + static RATING = new Field("Rating"); + static SIC_CODE = new Field("SIC_Code"); + static SHIPPING_STATE = new Field("Shipping_State"); + static WEBSITE = new Field("Website"); + static EMPLOYEES = new Field("Employees"); + static LAST_ACTIVITY_TIME = new Field("Last_Activity_Time"); + static INDUSTRY = new Field("Industry"); + static RECORD_IMAGE = new Field("Record_Image"); + static MODIFIED_BY = new Field("Modified_By"); + static ACCOUNT_SITE = new Field("Account_Site"); + static EXCHANGE_RATE = new Field("Exchange_Rate"); + static PHONE = new Field("Phone"); + static CURRENCY = new Field("Currency"); + static BILLING_COUNTRY = new Field("Billing_Country"); + static ACCOUNT_NAME = new Field("Account_Name"); + static ID = new Field("id"); + static ACCOUNT_NUMBER = new Field("Account_Number"); + static TICKER_SYMBOL = new Field("Ticker_Symbol"); + static MODIFIED_TIME = new Field("Modified_Time"); + static ENRICH_STATUS__S = new Field("Enrich_Status__s"); + static BILLING_STREET = new Field("Billing_Street"); + static CREATED_TIME = new Field("Created_Time"); + static CHANGE_LOG_TIME__S = new Field("Change_Log_Time__s"); + static BILLING_CODE = new Field("Billing_Code"); + static TERRITORIES = new Field("Territories"); + static PARENT_ACCOUNT = new Field("Parent_Account"); + static SHIPPING_CITY = new Field("Shipping_City"); + static SHIPPING_COUNTRY = new Field("Shipping_Country"); + static SHIPPING_CODE = new Field("Shipping_Code"); + static BILLING_CITY = new Field("Billing_City"); + static LOCKED__S = new Field("Locked__s"); + static BILLING_STATE = new Field("Billing_State"); + static TAG = new Field("Tag"); + static CREATED_BY = new Field("Created_By"); + static FAX = new Field("Fax"); + static ANNUAL_REVENUE = new Field("Annual_Revenue"); + static LAST_ENRICHED_TIME__S = new Field("Last_Enriched_Time__s"); + static SHIPPING_STREET = new Field("Shipping_Street"); + } + + static Cases = class { + static OWNER = new Field("Owner"); + static EMAIL = new Field("Email"); + static DESCRIPTION = new Field("Description"); + static INTERNAL_COMMENTS = new Field("Internal_Comments"); + static NO_OF_COMMENTS = new Field("No_of_comments"); + static REPORTED_BY = new Field("Reported_By"); + static CASE_NUMBER = new Field("Case_Number"); + static MODIFIED_BY = new Field("Modified_By"); + static DEAL_NAME = new Field("Deal_Name"); + static PHONE = new Field("Phone"); + static ACCOUNT_NAME = new Field("Account_Name"); + static ID = new Field("id"); + static SOLUTION = new Field("Solution"); + static STATUS = new Field("Status"); + static MODIFIED_TIME = new Field("Modified_Time"); + static PRIORITY = new Field("Priority"); + static CREATED_TIME = new Field("Created_Time"); + static COMMENTS = new Field("Comments"); + static PRODUCT_NAME = new Field("Product_Name"); + static ADD_COMMENT = new Field("Add_Comment"); + static CASE_ORIGIN = new Field("Case_Origin"); + static CASE_REASON = new Field("Case_Reason"); + static SUBJECT = new Field("Subject"); + static TYPE = new Field("Type"); + static LOCKED__S = new Field("Locked__s"); + static TAG = new Field("Tag"); + static CREATED_BY = new Field("Created_By"); + static RELATED_TO = new Field("Related_To"); + } + + static Notes = class { + static OWNER = new Field("Owner"); + static MODIFIED_BY = new Field("Modified_By"); + static MODIFIED_TIME = new Field("Modified_Time"); + static CREATED_TIME = new Field("Created_Time"); + static PARENT_ID = new Field("Parent_Id"); + static CREATED_BY = new Field("Created_By"); + static ID = new Field("id"); + static NOTE_TITLE = new Field("Note_Title"); + static NOTE_CONTENT = new Field("Note_Content"); + } } +export { + Field as MasterModel, + Field as Field +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/file_body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/file_body_wrapper.js new file mode 100644 index 0000000..ac3a3e4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/file_body_wrapper.js @@ -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 +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/file_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/file_details.js new file mode 100644 index 0000000..ebb3563 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/file_details.js @@ -0,0 +1,158 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class FileDetails{ + + fileNameS; + sizeS; + id; + fileIdS; + delete1; + keyModified = new Map(); + /** + * The method to get the fileNameS + * @returns {String} A String representing the fileNameS + */ + getFileNameS() { + return this.fileNameS; + + } + + /** + * The method to set the value to fileNameS + * @param {String} fileNameS A String representing the fileNameS + */ + setFileNameS(fileNameS) { + if((fileNameS != null) && (!(Object.prototype.toString.call(fileNameS) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileNameS EXPECTED TYPE: String", null, null); + } + this.fileNameS = fileNameS; + this.keyModified.set("File_Name__s", 1); + + } + + /** + * The method to get the sizeS + * @returns {String} A String representing the sizeS + */ + getSizeS() { + return this.sizeS; + + } + + /** + * The method to set the value to sizeS + * @param {String} sizeS A String representing the sizeS + */ + setSizeS(sizeS) { + if((sizeS != null) && (!(Object.prototype.toString.call(sizeS) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sizeS EXPECTED TYPE: String", null, null); + } + this.sizeS = sizeS; + this.keyModified.set("Size__s", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the fileIdS + * @returns {String} A String representing the fileIdS + */ + getFileIdS() { + return this.fileIdS; + + } + + /** + * The method to set the value to fileIdS + * @param {String} fileIdS A String representing the fileIdS + */ + setFileIdS(fileIdS) { + if((fileIdS != null) && (!(Object.prototype.toString.call(fileIdS) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileIdS EXPECTED TYPE: String", null, null); + } + this.fileIdS = fileIdS; + this.keyModified.set("File_Id__s", 1); + + } + + /** + * The method to get the delete + * @returns {String} A String representing the delete1 + */ + getDelete() { + return this.delete1; + + } + + /** + * The method to set the value to delete + * @param {String} delete1 A String representing the delete1 + */ + setDelete(delete1) { + if((delete1 != null) && (!(Object.prototype.toString.call(delete1) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: delete1 EXPECTED TYPE: String", null, null); + } + this.delete1 = delete1; + this.keyModified.set("_delete", 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 { + FileDetails as MasterModel, + FileDetails as FileDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/file_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/file_handler.js new file mode 100644 index 0000000..74f438a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/file_handler.js @@ -0,0 +1,7 @@ +class FileHandler{ + +} +export { + FileHandler as MasterModel, + FileHandler as FileHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/image_upload.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/image_upload.js new file mode 100644 index 0000000..e2d6f8d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/image_upload.js @@ -0,0 +1,250 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ImageUpload{ + + previewIdS; + fileNameS; + descriptionS; + sizeS; + id; + sequenceNumberS; + stateS; + fileIdS; + delete1; + keyModified = new Map(); + /** + * The method to get the previewIdS + * @returns {String} A String representing the previewIdS + */ + getPreviewIdS() { + return this.previewIdS; + + } + + /** + * The method to set the value to previewIdS + * @param {String} previewIdS A String representing the previewIdS + */ + setPreviewIdS(previewIdS) { + if((previewIdS != null) && (!(Object.prototype.toString.call(previewIdS) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: previewIdS EXPECTED TYPE: String", null, null); + } + this.previewIdS = previewIdS; + this.keyModified.set("Preview_Id__s", 1); + + } + + /** + * The method to get the fileNameS + * @returns {String} A String representing the fileNameS + */ + getFileNameS() { + return this.fileNameS; + + } + + /** + * The method to set the value to fileNameS + * @param {String} fileNameS A String representing the fileNameS + */ + setFileNameS(fileNameS) { + if((fileNameS != null) && (!(Object.prototype.toString.call(fileNameS) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileNameS EXPECTED TYPE: String", null, null); + } + this.fileNameS = fileNameS; + this.keyModified.set("File_Name__s", 1); + + } + + /** + * The method to get the descriptionS + * @returns {String} A String representing the descriptionS + */ + getDescriptionS() { + return this.descriptionS; + + } + + /** + * The method to set the value to descriptionS + * @param {String} descriptionS A String representing the descriptionS + */ + setDescriptionS(descriptionS) { + if((descriptionS != null) && (!(Object.prototype.toString.call(descriptionS) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: descriptionS EXPECTED TYPE: String", null, null); + } + this.descriptionS = descriptionS; + this.keyModified.set("Description__s", 1); + + } + + /** + * The method to get the sizeS + * @returns {String} A String representing the sizeS + */ + getSizeS() { + return this.sizeS; + + } + + /** + * The method to set the value to sizeS + * @param {String} sizeS A String representing the sizeS + */ + setSizeS(sizeS) { + if((sizeS != null) && (!(Object.prototype.toString.call(sizeS) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sizeS EXPECTED TYPE: String", null, null); + } + this.sizeS = sizeS; + this.keyModified.set("Size__s", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the sequenceNumberS + * @returns {BigInt} A BigInt representing the sequenceNumberS + */ + getSequenceNumberS() { + return this.sequenceNumberS; + + } + + /** + * The method to set the value to sequenceNumberS + * @param {BigInt} sequenceNumberS A BigInt representing the sequenceNumberS + */ + setSequenceNumberS(sequenceNumberS) { + if((sequenceNumberS != null) && (!(Object.prototype.toString.call(sequenceNumberS) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sequenceNumberS EXPECTED TYPE: BigInt", null, null); + } + this.sequenceNumberS = sequenceNumberS; + this.keyModified.set("Sequence_Number__s", 1); + + } + + /** + * The method to get the stateS + * @returns {String} A String representing the stateS + */ + getStateS() { + return this.stateS; + + } + + /** + * The method to set the value to stateS + * @param {String} stateS A String representing the stateS + */ + setStateS(stateS) { + if((stateS != null) && (!(Object.prototype.toString.call(stateS) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: stateS EXPECTED TYPE: String", null, null); + } + this.stateS = stateS; + this.keyModified.set("State__s", 1); + + } + + /** + * The method to get the fileIdS + * @returns {String} A String representing the fileIdS + */ + getFileIdS() { + return this.fileIdS; + + } + + /** + * The method to set the value to fileIdS + * @param {String} fileIdS A String representing the fileIdS + */ + setFileIdS(fileIdS) { + if((fileIdS != null) && (!(Object.prototype.toString.call(fileIdS) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fileIdS EXPECTED TYPE: String", null, null); + } + this.fileIdS = fileIdS; + this.keyModified.set("File_Id__s", 1); + + } + + /** + * The method to get the delete + * @returns {String} A String representing the delete1 + */ + getDelete() { + return this.delete1; + + } + + /** + * The method to set the value to delete + * @param {String} delete1 A String representing the delete1 + */ + setDelete(delete1) { + if((delete1 != null) && (!(Object.prototype.toString.call(delete1) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: delete1 EXPECTED TYPE: String", null, null); + } + this.delete1 = delete1; + this.keyModified.set("_delete", 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 { + ImageUpload as MasterModel, + ImageUpload as ImageUpload +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/import_record.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/import_record.js new file mode 100644 index 0000000..3fbc5a9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/import_record.js @@ -0,0 +1,107 @@ +export { ConversionOptionsResponseWrapper } from "./conversion_options_response_wrapper.js"; +export { FileDetails } from "./file_details.js"; +export { MultiSelectLookup } from "./multi_select_lookup.js"; +export { PriceBook } from "./price_book.js"; +export { Tax } from "./tax.js"; +export { DeletedRecord } from "./deleted_record.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { RecurringActivity } from "./recurring_activity.js"; +export * as DownloadHandler from "./download_handler.js"; +export { MassUpdateTerritory } from "./mass_update_territory.js"; +export { MassUpdateResponseWrapper } from "./mass_update_response_wrapper.js"; +export { Consent } from "./consent.js"; +export { Widget } from "./widget.js"; +export * as MassUpdateResponseHandler from "./mass_update_response_handler.js"; +export * as ActionResponse from "./action_response.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { Reminder } from "./reminder.js"; +export { CountWrapper } from "./count_wrapper.js"; +export { PreferenceFieldMatchedValue } from "./preference_field_matched_value.js"; +export { RecordOperations } from "./record_operations.js"; +export { GetRecordParam } from "./record_operations.js"; +export { GetRecordHeader } from "./record_operations.js"; +export { UpdateRecordHeader } from "./record_operations.js"; +export { DeleteRecordParam } from "./record_operations.js"; +export { DeleteRecordHeader } from "./record_operations.js"; +export { GetRecordsParam } from "./record_operations.js"; +export { GetRecordsHeader } from "./record_operations.js"; +export { CreateRecordsHeader } from "./record_operations.js"; +export { UpdateRecordsHeader } from "./record_operations.js"; +export { DeleteRecordsParam } from "./record_operations.js"; +export { DeleteRecordsHeader } from "./record_operations.js"; +export { UpsertRecordsHeader } from "./record_operations.js"; +export { GetDeletedRecordsParam } from "./record_operations.js"; +export { GetDeletedRecordsHeader } from "./record_operations.js"; +export { SearchRecordsParam } from "./record_operations.js"; +export { SearchRecordsHeader } from "./record_operations.js"; +export { UploadPhotoParam } from "./record_operations.js"; +export { GetMassUpdateStatusParam } from "./record_operations.js"; +export { RecordCountParam } from "./record_operations.js"; +export { GetRecordUsingExternalIDParam } from "./record_operations.js"; +export { GetRecordUsingExternalIDHeader } from "./record_operations.js"; +export { UpdateRecordUsingExternalIDHeader } from "./record_operations.js"; +export { DeleteRecordUsingExternalIDParam } from "./record_operations.js"; +export { DeleteRecordUsingExternalIDHeader } from "./record_operations.js"; +export { Options } from "./options.js"; +export * as UsersTimeFormat from "./options.js"; +export * as UsersDateFormat from "./options.js"; +export * as UsersDecimalSeparator from "./options.js"; +export * as UsersNumberSeparator from "./options.js"; +export * as UsersNameFormatS from "./options.js"; +export { CarryOverTags } from "./carry_over_tags.js"; +export * as CountHandler from "./count_handler.js"; +export { APIException } from "./api_exception.js"; +export { LineTax } from "./line_tax.js"; +export { Territory } from "./territory.js"; +export { ConversionOption } from "./conversion_option.js"; +export { LeadConverter } from "./lead_converter.js"; +export { Criteria } from "./criteria.js"; +export * as ActionHandler from "./action_handler.js"; +export * as FileHandler from "./file_handler.js"; +export { FileBodyWrapper } from "./file_body_wrapper.js"; +export { ConvertBodyWrapper } from "./convert_body_wrapper.js"; +export { Participants } from "./participants.js"; +export { MassUpdate } from "./mass_update.js"; +export { Info } from "./info.js"; +export { Record } from "./record.js"; +export { RemindAt } from "./remind_at.js"; +export { MassUpdateSuccessResponse } from "./mass_update_success_response.js"; +export { Comment } from "./comment.js"; +export * as MassUpdateActionResponse from "./mass_update_action_response.js"; +export * as MassUpdateResponse from "./mass_update_response.js"; +export { DeletedRecordsWrapper } from "./deleted_records_wrapper.js"; +export { Field } from "./field.js"; +export * as Products from "./field.js"; +export * as Consents from "./field.js"; +export * as Tasks from "./field.js"; +export * as Data_Subject_Requests from "./field.js"; +export * as Vendors from "./field.js"; +export * as Data_Enrichment_Stats__s from "./field.js"; +export * as Calls from "./field.js"; +export * as Leads from "./field.js"; +export * as Deals from "./field.js"; +export * as Quotes from "./field.js"; +export * as Invoices from "./field.js"; +export * as Campaigns from "./field.js"; +export * as Attachments from "./field.js"; +export * as Price_Books from "./field.js"; +export * as Sales_Orders from "./field.js"; +export * as Contacts from "./field.js"; +export * as Solutions from "./field.js"; +export * as Events from "./field.js"; +export * as Purchase_Orders from "./field.js"; +export * as Accounts from "./field.js"; +export * as Cases from "./field.js"; +export * as Notes from "./field.js"; +export { SuccessResponse } from "./success_response.js"; +export { LineItemProduct } from "./line_item_product.js"; +export * as DeletedRecordsHandler from "./deleted_records_handler.js"; +export * as ResponseHandler from "./response_handler.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { MassUpdateBodyWrapper } from "./mass_update_body_wrapper.js"; +export { MassUpdateActionWrapper } from "./mass_update_action_wrapper.js"; +export { MultiSelectPicklist } from "./multi_select_picklist.js"; +export * as MassUpdateActionHandler from "./mass_update_action_handler.js"; +export { Wizard } from "./wizard.js"; +export { PricingDetails } from "./pricing_details.js"; +export { ImageUpload } from "./image_upload.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/info.js new file mode 100644 index 0000000..c691c63 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/info.js @@ -0,0 +1,296 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + call; + perPage; + nextPageToken; + count; + page; + previousPageToken; + pageTokenExpiry; + email; + moreRecords; + sortBy; + sortOrder; + keyModified = new Map(); + /** + * The method to get the call + * @returns {Boolean} A Boolean representing the call + */ + getCall() { + return this.call; + + } + + /** + * The method to set the value to call + * @param {Boolean} call A Boolean representing the call + */ + setCall(call) { + if((call != null) && (!(Object.prototype.toString.call(call) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: call EXPECTED TYPE: Boolean", null, null); + } + this.call = call; + this.keyModified.set("call", 1); + + } + + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the nextPageToken + * @returns {String} A String representing the nextPageToken + */ + getNextPageToken() { + return this.nextPageToken; + + } + + /** + * The method to set the value to nextPageToken + * @param {String} nextPageToken A String representing the nextPageToken + */ + setNextPageToken(nextPageToken) { + if((nextPageToken != null) && (!(Object.prototype.toString.call(nextPageToken) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: nextPageToken EXPECTED TYPE: String", null, null); + } + this.nextPageToken = nextPageToken; + this.keyModified.set("next_page_token", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the previousPageToken + * @returns {String} A String representing the previousPageToken + */ + getPreviousPageToken() { + return this.previousPageToken; + + } + + /** + * The method to set the value to previousPageToken + * @param {String} previousPageToken A String representing the previousPageToken + */ + setPreviousPageToken(previousPageToken) { + if((previousPageToken != null) && (!(Object.prototype.toString.call(previousPageToken) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: previousPageToken EXPECTED TYPE: String", null, null); + } + this.previousPageToken = previousPageToken; + this.keyModified.set("previous_page_token", 1); + + } + + /** + * The method to get the pageTokenExpiry + * @returns {Date} An instance of Date + */ + getPageTokenExpiry() { + return this.pageTokenExpiry; + + } + + /** + * The method to set the value to pageTokenExpiry + * @param {Date} pageTokenExpiry An instance of Date + */ + setPageTokenExpiry(pageTokenExpiry) { + if((pageTokenExpiry != null) && (!(pageTokenExpiry instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pageTokenExpiry EXPECTED TYPE: Date", null, null); + } + this.pageTokenExpiry = pageTokenExpiry; + this.keyModified.set("page_token_expiry", 1); + + } + + /** + * The method to get the email + * @returns {Boolean} A Boolean representing the email + */ + getEmail() { + return this.email; + + } + + /** + * The method to set the value to email + * @param {Boolean} email A Boolean representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: Boolean", null, null); + } + this.email = email; + this.keyModified.set("email", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 1); + + } + + /** + * The method to get the sortBy + * @returns {String} A String representing the sortBy + */ + getSortBy() { + return this.sortBy; + + } + + /** + * The method to set the value to sortBy + * @param {String} sortBy A String representing the sortBy + */ + setSortBy(sortBy) { + if((sortBy != null) && (!(Object.prototype.toString.call(sortBy) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortBy EXPECTED TYPE: String", null, null); + } + this.sortBy = sortBy; + this.keyModified.set("sort_by", 1); + + } + + /** + * The method to get the sortOrder + * @returns {String} A String representing the sortOrder + */ + getSortOrder() { + return this.sortOrder; + + } + + /** + * The method to set the value to sortOrder + * @param {String} sortOrder A String representing the sortOrder + */ + setSortOrder(sortOrder) { + if((sortOrder != null) && (!(Object.prototype.toString.call(sortOrder) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortOrder EXPECTED TYPE: String", null, null); + } + this.sortOrder = sortOrder; + this.keyModified.set("sort_order", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/lead_converter.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/lead_converter.js new file mode 100644 index 0000000..15689d1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/lead_converter.js @@ -0,0 +1,232 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class LeadConverter{ + + overwrite; + notifyLeadOwner; + notifyNewEntityOwner; + accounts; + contacts; + assignTo; + deals; + carryOverTags; + keyModified = new Map(); + /** + * The method to get the overwrite + * @returns {Boolean} A Boolean representing the overwrite + */ + getOverwrite() { + return this.overwrite; + + } + + /** + * The method to set the value to overwrite + * @param {Boolean} overwrite A Boolean representing the overwrite + */ + setOverwrite(overwrite) { + if((overwrite != null) && (!(Object.prototype.toString.call(overwrite) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: overwrite EXPECTED TYPE: Boolean", null, null); + } + this.overwrite = overwrite; + this.keyModified.set("overwrite", 1); + + } + + /** + * The method to get the notifyLeadOwner + * @returns {Boolean} A Boolean representing the notifyLeadOwner + */ + getNotifyLeadOwner() { + return this.notifyLeadOwner; + + } + + /** + * The method to set the value to notifyLeadOwner + * @param {Boolean} notifyLeadOwner A Boolean representing the notifyLeadOwner + */ + setNotifyLeadOwner(notifyLeadOwner) { + if((notifyLeadOwner != null) && (!(Object.prototype.toString.call(notifyLeadOwner) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: notifyLeadOwner EXPECTED TYPE: Boolean", null, null); + } + this.notifyLeadOwner = notifyLeadOwner; + this.keyModified.set("notify_lead_owner", 1); + + } + + /** + * The method to get the notifyNewEntityOwner + * @returns {Boolean} A Boolean representing the notifyNewEntityOwner + */ + getNotifyNewEntityOwner() { + return this.notifyNewEntityOwner; + + } + + /** + * The method to set the value to notifyNewEntityOwner + * @param {Boolean} notifyNewEntityOwner A Boolean representing the notifyNewEntityOwner + */ + setNotifyNewEntityOwner(notifyNewEntityOwner) { + if((notifyNewEntityOwner != null) && (!(Object.prototype.toString.call(notifyNewEntityOwner) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: notifyNewEntityOwner EXPECTED TYPE: Boolean", null, null); + } + this.notifyNewEntityOwner = notifyNewEntityOwner; + this.keyModified.set("notify_new_entity_owner", 1); + + } + + /** + * The method to get the accounts + * @returns {Record} An instance of Record + */ + getAccounts() { + return this.accounts; + + } + + /** + * The method to set the value to accounts + * @param {Record} accounts An instance of Record + */ + async setAccounts(accounts) { + const Record = (await (import("./record.js"))).MasterModel; + if((accounts != null) && (!(accounts instanceof Record))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: accounts EXPECTED TYPE: Record", null, null); + } + this.accounts = accounts; + this.keyModified.set("Accounts", 1); + + } + + /** + * The method to get the contacts + * @returns {Record} An instance of Record + */ + getContacts() { + return this.contacts; + + } + + /** + * The method to set the value to contacts + * @param {Record} contacts An instance of Record + */ + async setContacts(contacts) { + const Record = (await (import("./record.js"))).MasterModel; + if((contacts != null) && (!(contacts instanceof Record))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: contacts EXPECTED TYPE: Record", null, null); + } + this.contacts = contacts; + this.keyModified.set("Contacts", 1); + + } + + /** + * The method to get the assignTo + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getAssignTo() { + return this.assignTo; + + } + + /** + * The method to set the value to assignTo + * @param {MinifiedUser} assignTo An instance of MinifiedUser + */ + async setAssignTo(assignTo) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((assignTo != null) && (!(assignTo instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: assignTo EXPECTED TYPE: MinifiedUser", null, null); + } + this.assignTo = assignTo; + this.keyModified.set("assign_to", 1); + + } + + /** + * The method to get the deals + * @returns {Record} An instance of Record + */ + getDeals() { + return this.deals; + + } + + /** + * The method to set the value to deals + * @param {Record} deals An instance of Record + */ + async setDeals(deals) { + const Record = (await (import("./record.js"))).MasterModel; + if((deals != null) && (!(deals instanceof Record))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deals EXPECTED TYPE: Record", null, null); + } + this.deals = deals; + this.keyModified.set("Deals", 1); + + } + + /** + * The method to get the carryOverTags + * @returns {CarryOverTags} An instance of CarryOverTags + */ + getCarryOverTags() { + return this.carryOverTags; + + } + + /** + * The method to set the value to carryOverTags + * @param {CarryOverTags} carryOverTags An instance of CarryOverTags + */ + async setCarryOverTags(carryOverTags) { + const CarryOverTags = (await (import("./carry_over_tags.js"))).MasterModel; + if((carryOverTags != null) && (!(carryOverTags instanceof CarryOverTags))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: carryOverTags EXPECTED TYPE: CarryOverTags", null, null); + } + this.carryOverTags = carryOverTags; + this.keyModified.set("carry_over_tags", 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 { + LeadConverter as MasterModel, + LeadConverter as LeadConverter +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/line_item_product.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/line_item_product.js new file mode 100644 index 0000000..440e928 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/line_item_product.js @@ -0,0 +1,202 @@ +import {Record} from "./record.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class LineItemProduct extends Record{ + + /** + * The method to get the productCode + * @returns {String} A String representing the productCode + */ + getProductCode() { + return this.getKeyValue("Product_Code"); + + } + + /** + * The method to set the value to productCode + * @param {String} productCode A String representing the productCode + */ + setProductCode(productCode) { + if((productCode != null) && (!(Object.prototype.toString.call(productCode) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: productCode EXPECTED TYPE: String", null, null); + } + this.addKeyValue("Product_Code", productCode); + + } + + /** + * The method to get the currency + * @returns {String} A String representing the currency + */ + getCurrency() { + return this.getKeyValue("Currency"); + + } + + /** + * The method to set the value to currency + * @param {String} currency A String representing the currency + */ + setCurrency(currency) { + if((currency != null) && (!(Object.prototype.toString.call(currency) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: currency EXPECTED TYPE: String", null, null); + } + this.addKeyValue("Currency", currency); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.getKeyValue("name"); + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.addKeyValue("name", name); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.getKeyValue("id"); + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.addKeyValue("id", id); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.getKeyValue("Created_By"); + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Created_By", createdBy); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.getKeyValue("Created_Time"); + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Created_Time", createdTime); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.getKeyValue("Modified_By"); + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Modified_By", modifiedBy); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.getKeyValue("Modified_Time"); + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Modified_Time", modifiedTime); + + } + + /** + * The method to get the tag + * @returns {Array} An Array representing the tag + */ + getTag() { + return this.getKeyValue("Tag"); + + } + + /** + * The method to set the value to tag + * @param {Array} tag An Array representing the tag + */ + setTag(tag) { + if((tag != null) && (!(Object.prototype.toString.call(tag) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tag EXPECTED TYPE: Array", null, null); + } + this.addKeyValue("Tag", tag); + + } + +} +export { + LineItemProduct as MasterModel, + LineItemProduct as LineItemProduct +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/line_tax.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/line_tax.js new file mode 100644 index 0000000..78e3763 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/line_tax.js @@ -0,0 +1,158 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class LineTax{ + + percentage; + name; + id; + value; + displayName; + keyModified = new Map(); + /** + * The method to get the percentage + * @returns {Float} A Float representing the percentage + */ + getPercentage() { + return this.percentage; + + } + + /** + * The method to set the value to percentage + * @param {Float} percentage A Float representing the percentage + */ + setPercentage(percentage) { + if((percentage != null) && (!(Object.prototype.toString.call(percentage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: percentage EXPECTED TYPE: Float", null, null); + } + this.percentage = percentage; + this.keyModified.set("percentage", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the value + * @returns {Float} A Float representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {Float} value A Float representing the value + */ + setValue(value) { + if((value != null) && (!(Object.prototype.toString.call(value) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: value EXPECTED TYPE: Float", null, null); + } + this.value = value; + this.keyModified.set("value", 1); + + } + + /** + * The method to get the displayName + * @returns {String} A String representing the displayName + */ + getDisplayName() { + return this.displayName; + + } + + /** + * The method to set the value to displayName + * @param {String} displayName A String representing the displayName + */ + setDisplayName(displayName) { + if((displayName != null) && (!(Object.prototype.toString.call(displayName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayName EXPECTED TYPE: String", null, null); + } + this.displayName = displayName; + this.keyModified.set("display_name", 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 { + LineTax as MasterModel, + LineTax as LineTax +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update.js new file mode 100644 index 0000000..d348576 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update.js @@ -0,0 +1,159 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MassUpdate{ + + status; + failedCount; + updatedCount; + notUpdatedCount; + totalCount; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("Status", 1); + + } + + /** + * The method to get the failedCount + * @returns {number} A number representing the failedCount + */ + getFailedCount() { + return this.failedCount; + + } + + /** + * The method to set the value to failedCount + * @param {number} failedCount A number representing the failedCount + */ + setFailedCount(failedCount) { + if((failedCount != null) && (!(Object.prototype.toString.call(failedCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: failedCount EXPECTED TYPE: number", null, null); + } + this.failedCount = failedCount; + this.keyModified.set("Failed_Count", 1); + + } + + /** + * The method to get the updatedCount + * @returns {number} A number representing the updatedCount + */ + getUpdatedCount() { + return this.updatedCount; + + } + + /** + * The method to set the value to updatedCount + * @param {number} updatedCount A number representing the updatedCount + */ + setUpdatedCount(updatedCount) { + if((updatedCount != null) && (!(Object.prototype.toString.call(updatedCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: updatedCount EXPECTED TYPE: number", null, null); + } + this.updatedCount = updatedCount; + this.keyModified.set("Updated_Count", 1); + + } + + /** + * The method to get the notUpdatedCount + * @returns {number} A number representing the notUpdatedCount + */ + getNotUpdatedCount() { + return this.notUpdatedCount; + + } + + /** + * The method to set the value to notUpdatedCount + * @param {number} notUpdatedCount A number representing the notUpdatedCount + */ + setNotUpdatedCount(notUpdatedCount) { + if((notUpdatedCount != null) && (!(Object.prototype.toString.call(notUpdatedCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: notUpdatedCount EXPECTED TYPE: number", null, null); + } + this.notUpdatedCount = notUpdatedCount; + this.keyModified.set("Not_Updated_Count", 1); + + } + + /** + * The method to get the totalCount + * @returns {number} A number representing the totalCount + */ + getTotalCount() { + return this.totalCount; + + } + + /** + * The method to set the value to totalCount + * @param {number} totalCount A number representing the totalCount + */ + setTotalCount(totalCount) { + if((totalCount != null) && (!(Object.prototype.toString.call(totalCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: totalCount EXPECTED TYPE: number", null, null); + } + this.totalCount = totalCount; + this.keyModified.set("Total_Count", 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 { + MassUpdate as MasterModel, + MassUpdate as MassUpdate +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_action_handler.js new file mode 100644 index 0000000..0124ed4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_action_handler.js @@ -0,0 +1,7 @@ +class MassUpdateActionHandler{ + +} +export { + MassUpdateActionHandler as MasterModel, + MassUpdateActionHandler as MassUpdateActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_action_response.js new file mode 100644 index 0000000..058d08d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_action_response.js @@ -0,0 +1,7 @@ +class MassUpdateActionResponse{ + +} +export { + MassUpdateActionResponse as MasterModel, + MassUpdateActionResponse as MassUpdateActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_action_wrapper.js new file mode 100644 index 0000000..09ae0f9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MassUpdateActionWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + MassUpdateActionWrapper as MasterModel, + MassUpdateActionWrapper as MassUpdateActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_body_wrapper.js new file mode 100644 index 0000000..bee6e4f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_body_wrapper.js @@ -0,0 +1,182 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MassUpdateBodyWrapper{ + + data; + cvid; + ids; + territory; + overWrite; + criteria; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 1); + + } + + /** + * The method to get the cvid + * @returns {String} A String representing the cvid + */ + getCvid() { + return this.cvid; + + } + + /** + * The method to set the value to cvid + * @param {String} cvid A String representing the cvid + */ + setCvid(cvid) { + if((cvid != null) && (!(Object.prototype.toString.call(cvid) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: cvid EXPECTED TYPE: String", null, null); + } + this.cvid = cvid; + this.keyModified.set("cvid", 1); + + } + + /** + * The method to get the ids + * @returns {Array} An Array representing the ids + */ + getIds() { + return this.ids; + + } + + /** + * The method to set the value to ids + * @param {Array} ids An Array representing the ids + */ + setIds(ids) { + if((ids != null) && (!(Object.prototype.toString.call(ids) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ids EXPECTED TYPE: Array", null, null); + } + this.ids = ids; + this.keyModified.set("ids", 1); + + } + + /** + * The method to get the territory + * @returns {MassUpdateTerritory} An instance of MassUpdateTerritory + */ + getTerritory() { + return this.territory; + + } + + /** + * The method to set the value to territory + * @param {MassUpdateTerritory} territory An instance of MassUpdateTerritory + */ + async setTerritory(territory) { + const MassUpdateTerritory = (await (import("./mass_update_territory.js"))).MasterModel; + if((territory != null) && (!(territory instanceof MassUpdateTerritory))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territory EXPECTED TYPE: MassUpdateTerritory", null, null); + } + this.territory = territory; + this.keyModified.set("territory", 1); + + } + + /** + * The method to get the overWrite + * @returns {Boolean} A Boolean representing the overWrite + */ + getOverWrite() { + return this.overWrite; + + } + + /** + * The method to set the value to overWrite + * @param {Boolean} overWrite A Boolean representing the overWrite + */ + setOverWrite(overWrite) { + if((overWrite != null) && (!(Object.prototype.toString.call(overWrite) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: overWrite EXPECTED TYPE: Boolean", null, null); + } + this.overWrite = overWrite; + this.keyModified.set("over_write", 1); + + } + + /** + * The method to get the criteria + * @returns {Array} An Array representing the criteria + */ + getCriteria() { + return this.criteria; + + } + + /** + * The method to set the value to criteria + * @param {Array} criteria An Array representing the criteria + */ + setCriteria(criteria) { + if((criteria != null) && (!(Object.prototype.toString.call(criteria) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: criteria EXPECTED TYPE: Array", null, null); + } + this.criteria = criteria; + this.keyModified.set("criteria", 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 { + MassUpdateBodyWrapper as MasterModel, + MassUpdateBodyWrapper as MassUpdateBodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_response.js new file mode 100644 index 0000000..550b8d6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_response.js @@ -0,0 +1,7 @@ +class MassUpdateResponse{ + +} +export { + MassUpdateResponse as MasterModel, + MassUpdateResponse as MassUpdateResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_response_handler.js new file mode 100644 index 0000000..b43cc96 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_response_handler.js @@ -0,0 +1,7 @@ +class MassUpdateResponseHandler{ + +} +export { + MassUpdateResponseHandler as MasterModel, + MassUpdateResponseHandler as MassUpdateResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_response_wrapper.js new file mode 100644 index 0000000..e7482df --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MassUpdateResponseWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + MassUpdateResponseWrapper as MasterModel, + MassUpdateResponseWrapper as MassUpdateResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_success_response.js new file mode 100644 index 0000000..f0f5657 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MassUpdateSuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + MassUpdateSuccessResponse as MasterModel, + MassUpdateSuccessResponse as MassUpdateSuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_territory.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_territory.js new file mode 100644 index 0000000..2a37e18 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/mass_update_territory.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MassUpdateTerritory{ + + id; + includeChild; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the includeChild + * @returns {Boolean} A Boolean representing the includeChild + */ + getIncludeChild() { + return this.includeChild; + + } + + /** + * The method to set the value to includeChild + * @param {Boolean} includeChild A Boolean representing the includeChild + */ + setIncludeChild(includeChild) { + if((includeChild != null) && (!(Object.prototype.toString.call(includeChild) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: includeChild EXPECTED TYPE: Boolean", null, null); + } + this.includeChild = includeChild; + this.keyModified.set("include_child", 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 { + MassUpdateTerritory as MasterModel, + MassUpdateTerritory as MassUpdateTerritory +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/multi_select_lookup.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/multi_select_lookup.js new file mode 100644 index 0000000..55d9f11 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/multi_select_lookup.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MultiSelectLookup{ + + id; + fieldname; + hasMore; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the fieldname + * @returns {Map} A Map representing the fieldname + */ + getFieldname() { + return this.fieldname; + + } + + /** + * The method to set the value to fieldname + * @param {Map} fieldname A Map representing the fieldname + */ + setFieldname(fieldname) { + if((fieldname != null) && (!(Object.prototype.toString.call(fieldname) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldname EXPECTED TYPE: Map", null, null); + } + this.fieldname = fieldname; + this.keyModified.set("fieldName", 1); + + } + + /** + * The method to get the hasMore + * @returns {Map} A Map representing the hasMore + */ + getHasMore() { + return this.hasMore; + + } + + /** + * The method to set the value to hasMore + * @param {Map} hasMore A Map representing the hasMore + */ + setHasMore(hasMore) { + if((hasMore != null) && (!(Object.prototype.toString.call(hasMore) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: hasMore EXPECTED TYPE: Map", null, null); + } + this.hasMore = hasMore; + this.keyModified.set("$has_more", 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 { + MultiSelectLookup as MasterModel, + MultiSelectLookup as MultiSelectLookup +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/multi_select_picklist.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/multi_select_picklist.js new file mode 100644 index 0000000..bd33bd9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/multi_select_picklist.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MultiSelectPicklist{ + + id; + fieldname; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the fieldname + * @returns {Map} A Map representing the fieldname + */ + getFieldname() { + return this.fieldname; + + } + + /** + * The method to set the value to fieldname + * @param {Map} fieldname A Map representing the fieldname + */ + setFieldname(fieldname) { + if((fieldname != null) && (!(Object.prototype.toString.call(fieldname) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldname EXPECTED TYPE: Map", null, null); + } + this.fieldname = fieldname; + this.keyModified.set("fieldName", 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 { + MultiSelectPicklist as MasterModel, + MultiSelectPicklist as MultiSelectPicklist +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/options.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/options.js new file mode 100644 index 0000000..0ec4fd9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/options.js @@ -0,0 +1,36 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Options{ + +} +class UsersTimeFormat{ + +} + +class UsersDateFormat{ + +} + +class UsersDecimalSeparator{ + +} + +class UsersNumberSeparator{ + +} + +class UsersNameFormatS{ + +} + +export { + Options as MasterModel, + Options as Options, + UsersDecimalSeparator as UsersDecimalSeparator, + UsersNameFormatS as UsersNameFormatS, + UsersDateFormat as UsersDateFormat, + UsersTimeFormat as UsersTimeFormat, + UsersNumberSeparator as UsersNumberSeparator +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/participants.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/participants.js new file mode 100644 index 0000000..6d39b7b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/participants.js @@ -0,0 +1,265 @@ +import {Record} from "./record.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Participants extends Record{ + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.getKeyValue("name"); + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.addKeyValue("name", name); + + } + + /** + * The method to get the email + * @returns {String} A String representing the email + */ + getEmail() { + return this.getKeyValue("Email"); + + } + + /** + * The method to set the value to email + * @param {String} email A String representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: String", null, null); + } + this.addKeyValue("Email", email); + + } + + /** + * The method to get the invited + * @returns {Boolean} A Boolean representing the invited + */ + getInvited() { + return this.getKeyValue("invited"); + + } + + /** + * The method to set the value to invited + * @param {Boolean} invited A Boolean representing the invited + */ + setInvited(invited) { + if((invited != null) && (!(Object.prototype.toString.call(invited) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: invited EXPECTED TYPE: Boolean", null, null); + } + this.addKeyValue("invited", invited); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.getKeyValue("type"); + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.addKeyValue("type", type); + + } + + /** + * The method to get the participant + * @returns {String} A String representing the participant + */ + getParticipant() { + return this.getKeyValue("participant"); + + } + + /** + * The method to set the value to participant + * @param {String} participant A String representing the participant + */ + setParticipant(participant) { + if((participant != null) && (!(Object.prototype.toString.call(participant) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: participant EXPECTED TYPE: String", null, null); + } + this.addKeyValue("participant", participant); + + } + + /** + * The method to get the status + * @returns {String} A String representing the status + */ + getStatus() { + return this.getKeyValue("status"); + + } + + /** + * The method to set the value to status + * @param {String} status A String representing the status + */ + setStatus(status) { + if((status != null) && (!(Object.prototype.toString.call(status) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: String", null, null); + } + this.addKeyValue("status", status); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.getKeyValue("id"); + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.addKeyValue("id", id); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.getKeyValue("Created_By"); + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Created_By", createdBy); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.getKeyValue("Created_Time"); + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Created_Time", createdTime); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.getKeyValue("Modified_By"); + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Modified_By", modifiedBy); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.getKeyValue("Modified_Time"); + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Modified_Time", modifiedTime); + + } + + /** + * The method to get the tag + * @returns {Array} An Array representing the tag + */ + getTag() { + return this.getKeyValue("Tag"); + + } + + /** + * The method to set the value to tag + * @param {Array} tag An Array representing the tag + */ + setTag(tag) { + if((tag != null) && (!(Object.prototype.toString.call(tag) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tag EXPECTED TYPE: Array", null, null); + } + this.addKeyValue("Tag", tag); + + } + +} +export { + Participants as MasterModel, + Participants as Participants +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/preference_field_matched_value.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/preference_field_matched_value.js new file mode 100644 index 0000000..fa88793 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/preference_field_matched_value.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class PreferenceFieldMatchedValue{ + + contacts; + deals; + accounts; + keyModified = new Map(); + /** + * The method to get the contacts + * @returns {Array} An Array representing the contacts + */ + getContacts() { + return this.contacts; + + } + + /** + * The method to set the value to contacts + * @param {Array} contacts An Array representing the contacts + */ + setContacts(contacts) { + if((contacts != null) && (!(Object.prototype.toString.call(contacts) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: contacts EXPECTED TYPE: Array", null, null); + } + this.contacts = contacts; + this.keyModified.set("Contacts", 1); + + } + + /** + * The method to get the deals + * @returns {Array} An Array representing the deals + */ + getDeals() { + return this.deals; + + } + + /** + * The method to set the value to deals + * @param {Array} deals An Array representing the deals + */ + setDeals(deals) { + if((deals != null) && (!(Object.prototype.toString.call(deals) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deals EXPECTED TYPE: Array", null, null); + } + this.deals = deals; + this.keyModified.set("Deals", 1); + + } + + /** + * The method to get the accounts + * @returns {Array} An Array representing the accounts + */ + getAccounts() { + return this.accounts; + + } + + /** + * The method to set the value to accounts + * @param {Array} accounts An Array representing the accounts + */ + setAccounts(accounts) { + if((accounts != null) && (!(Object.prototype.toString.call(accounts) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: accounts EXPECTED TYPE: Array", null, null); + } + this.accounts = accounts; + this.keyModified.set("Accounts", 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 { + PreferenceFieldMatchedValue as MasterModel, + PreferenceFieldMatchedValue as PreferenceFieldMatchedValue +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/price_book.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/price_book.js new file mode 100644 index 0000000..917b8d7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/price_book.js @@ -0,0 +1,160 @@ +import {Record} from "./record.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class PriceBook extends Record{ + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.getKeyValue("name"); + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.addKeyValue("name", name); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.getKeyValue("id"); + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.addKeyValue("id", id); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.getKeyValue("Created_By"); + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Created_By", createdBy); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.getKeyValue("Created_Time"); + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Created_Time", createdTime); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.getKeyValue("Modified_By"); + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Modified_By", modifiedBy); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.getKeyValue("Modified_Time"); + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Modified_Time", modifiedTime); + + } + + /** + * The method to get the tag + * @returns {Array} An Array representing the tag + */ + getTag() { + return this.getKeyValue("Tag"); + + } + + /** + * The method to set the value to tag + * @param {Array} tag An Array representing the tag + */ + setTag(tag) { + if((tag != null) && (!(Object.prototype.toString.call(tag) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tag EXPECTED TYPE: Array", null, null); + } + this.addKeyValue("Tag", tag); + + } + +} +export { + PriceBook as MasterModel, + PriceBook as PriceBook +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/pricing_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/pricing_details.js new file mode 100644 index 0000000..e61e6af --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/pricing_details.js @@ -0,0 +1,223 @@ +import {Record} from "./record.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class PricingDetails extends Record{ + + /** + * The method to get the toRange + * @returns {Float} A Float representing the toRange + */ + getToRange() { + return this.getKeyValue("to_range"); + + } + + /** + * The method to set the value to toRange + * @param {Float} toRange A Float representing the toRange + */ + setToRange(toRange) { + if((toRange != null) && (!(Object.prototype.toString.call(toRange) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: toRange EXPECTED TYPE: Float", null, null); + } + this.addKeyValue("to_range", toRange); + + } + + /** + * The method to get the discount + * @returns {Float} A Float representing the discount + */ + getDiscount() { + return this.getKeyValue("discount"); + + } + + /** + * The method to set the value to discount + * @param {Float} discount A Float representing the discount + */ + setDiscount(discount) { + if((discount != null) && (!(Object.prototype.toString.call(discount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: discount EXPECTED TYPE: Float", null, null); + } + this.addKeyValue("discount", discount); + + } + + /** + * The method to get the fromRange + * @returns {Float} A Float representing the fromRange + */ + getFromRange() { + return this.getKeyValue("from_range"); + + } + + /** + * The method to set the value to fromRange + * @param {Float} fromRange A Float representing the fromRange + */ + setFromRange(fromRange) { + if((fromRange != null) && (!(Object.prototype.toString.call(fromRange) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fromRange EXPECTED TYPE: Float", null, null); + } + this.addKeyValue("from_range", fromRange); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.getKeyValue("id"); + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.addKeyValue("id", id); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.getKeyValue("Created_By"); + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Created_By", createdBy); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.getKeyValue("Created_Time"); + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Created_Time", createdTime); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.getKeyValue("Modified_By"); + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Modified_By", modifiedBy); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.getKeyValue("Modified_Time"); + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Modified_Time", modifiedTime); + + } + + /** + * The method to get the tag + * @returns {Array} An Array representing the tag + */ + getTag() { + return this.getKeyValue("Tag"); + + } + + /** + * The method to set the value to tag + * @param {Array} tag An Array representing the tag + */ + setTag(tag) { + if((tag != null) && (!(Object.prototype.toString.call(tag) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tag EXPECTED TYPE: Array", null, null); + } + this.addKeyValue("Tag", tag); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.getKeyValue("name"); + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.addKeyValue("name", name); + + } + +} +export { + PricingDetails as MasterModel, + PricingDetails as PricingDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/record.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/record.js new file mode 100644 index 0000000..dea30e8 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/record.js @@ -0,0 +1,246 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Record{ + + keyValues = new Map(); + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.getKeyValue("id"); + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.addKeyValue("id", id); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.getKeyValue("Created_By"); + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Created_By", createdBy); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.getKeyValue("Created_Time"); + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Created_Time", createdTime); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.getKeyValue("Modified_By"); + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Modified_By", modifiedBy); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.getKeyValue("Modified_Time"); + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Modified_Time", modifiedTime); + + } + + /** + * The method to get the tag + * @returns {Array} An Array representing the tag + */ + getTag() { + return this.getKeyValue("Tag"); + + } + + /** + * The method to set the value to tag + * @param {Array} tag An Array representing the tag + */ + setTag(tag) { + if((tag != null) && (!(Object.prototype.toString.call(tag) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tag EXPECTED TYPE: Array", null, null); + } + this.addKeyValue("Tag", tag); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.getKeyValue("name"); + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.addKeyValue("name", name); + + } + + /** + * The method to add field value + * @param {Field} field An instance of Field + * @param {*} value An object + */ + async addFieldValue(field, value) { + const Field = (await (import("./field.js"))).MasterModel; + if((field != null) && (!(field instanceof Field))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: field EXPECTED TYPE: Field", null, null); + } + this.addKeyValue(field.getAPIName(), value); + + } + + /** + * The method to add key value + * @param {String} apiName A String representing the apiName + * @param {Object} value An Object representing the value + */ + addKeyValue(apiName, value) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.keyValues.set(apiName, value); + this.keyModified.set(apiName, 1); + + } + + /** + * The method to get key value + * @param {String} apiName A String representing the apiName + * @returns {Object} An Object representing the keyValue + */ + getKeyValue(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + if(this.keyValues.has(apiName)) { + return this.keyValues.get(apiName); + } + return null; + + } + + /** + * The method to get key values + * @returns {Map} A Map representing the keyValues + */ + getKeyValues() { + return this.keyValues; + + } + + /** + * 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 { + Record as MasterModel, + Record as Record +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/record_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/record_operations.js new file mode 100644 index 0000000..da95a16 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/record_operations.js @@ -0,0 +1,1119 @@ +import {Header} from "../../../../../../routes/header.js"; +import {HeaderMap} from "../../../../../../routes/header_map.js"; +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +import {APIResponse} from "../../../../../../routes/controllers/api_response.js"; +import {CommonAPIHandler} from "../../../../../../routes/middlewares/common_api_handler.js"; +import {Utility} from "../../../../../../utils/util/utility.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; +import {createRequire} from "node:module"; + +class RecordOperations{ + /** + * The method to get record + * @param {BigInt} id A BigInt representing the id + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getRecord(id, moduleAPIName, paramInstance=null, headerInstance=null) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + handlerInstance.setHeader(headerInstance); + handlerInstance.setModuleAPIName(moduleAPIName); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to update record + * @param {BigInt} id A BigInt representing the id + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {BodyWrapper} request An instance of BodyWrapper + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateRecord(id, moduleAPIName, request, headerInstance=null) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setHeader(headerInstance); + handlerInstance.setModuleAPIName(moduleAPIName); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete record + * @param {BigInt} id A BigInt representing the id + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteRecord(id, moduleAPIName, paramInstance=null, headerInstance=null) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setParam(paramInstance); + handlerInstance.setHeader(headerInstance); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get records + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getRecords(moduleAPIName, paramInstance=null, headerInstance=null) { + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + handlerInstance.setHeader(headerInstance); + handlerInstance.setModuleAPIName(moduleAPIName); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to create records + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {BodyWrapper} request An instance of BodyWrapper + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createRecords(moduleAPIName, request, headerInstance=null) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setHeader(headerInstance); + handlerInstance.setModuleAPIName(moduleAPIName); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update records + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {BodyWrapper} request An instance of BodyWrapper + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateRecords(moduleAPIName, request, headerInstance=null) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setHeader(headerInstance); + handlerInstance.setModuleAPIName(moduleAPIName); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete records + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteRecords(moduleAPIName, paramInstance=null, headerInstance=null) { + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setParam(paramInstance); + handlerInstance.setHeader(headerInstance); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to upsert records + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {BodyWrapper} request An instance of BodyWrapper + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async upsertRecords(moduleAPIName, request, headerInstance=null) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/upsert"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setHeader(headerInstance); + handlerInstance.setModuleAPIName(moduleAPIName); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get deleted records + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getDeletedRecords(moduleAPIName, paramInstance=null, headerInstance=null) { + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/deleted"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + handlerInstance.setHeader(headerInstance); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let DeletedRecordsHandler = require.resolve("./deleted_records_handler.js"); + return handlerInstance.apiCall(DeletedRecordsHandler, "application/json"); + + } + + /** + * The method to search records + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async searchRecords(moduleAPIName, paramInstance=null, headerInstance=null) { + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/search"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + handlerInstance.setHeader(headerInstance); + handlerInstance.setModuleAPIName(moduleAPIName); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to convert lead + * @param {BigInt} id A BigInt representing the id + * @param {ConvertBodyWrapper} request An instance of ConvertBodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async convertLead(id, request) { + const ConvertBodyWrapper = (await (import("./convert_body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof ConvertBodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: ConvertBodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Leads/"); + apiPath = apiPath.concat(id.toString()); + apiPath = apiPath.concat("/actions/convert"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + await Utility.getFields("Deals", handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get photo + * @param {BigInt} id A BigInt representing the id + * @param {String} moduleAPIName A String representing the moduleAPIName + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getPhoto(id, moduleAPIName) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(id.toString()); + apiPath = apiPath.concat("/photo"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let DownloadHandler = require.resolve("./download_handler.js"); + return handlerInstance.apiCall(DownloadHandler, "application/x-download"); + + } + + /** + * The method to upload photo + * @param {BigInt} id A BigInt representing the id + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {FileBodyWrapper} request An instance of FileBodyWrapper + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async uploadPhoto(id, moduleAPIName, request, paramInstance=null) { + const FileBodyWrapper = (await (import("./file_body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof FileBodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: FileBodyWrapper", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(id.toString()); + apiPath = apiPath.concat("/photo"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("multipart/form-data"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + handlerInstance.setParam(paramInstance); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + await Utility.verifyPhotoSupport(moduleAPIName).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let FileHandler = require.resolve("./file_handler.js"); + return handlerInstance.apiCall(FileHandler, "application/json"); + + } + + /** + * The method to delete photo + * @param {BigInt} id A BigInt representing the id + * @param {String} moduleAPIName A String representing the moduleAPIName + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deletePhoto(id, moduleAPIName) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(id.toString()); + apiPath = apiPath.concat("/photo"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let FileHandler = require.resolve("./file_handler.js"); + return handlerInstance.apiCall(FileHandler, "application/json"); + + } + + /** + * The method to mass update records + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {MassUpdateBodyWrapper} request An instance of MassUpdateBodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async massUpdateRecords(moduleAPIName, request) { + const MassUpdateBodyWrapper = (await (import("./mass_update_body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof MassUpdateBodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: MassUpdateBodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/actions/mass_update"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + handlerInstance.setModuleAPIName(moduleAPIName); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let MassUpdateActionHandler = require.resolve("./mass_update_action_handler.js"); + return handlerInstance.apiCall(MassUpdateActionHandler, "application/json"); + + } + + /** + * The method to get mass update status + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getMassUpdateStatus(moduleAPIName, paramInstance=null) { + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/actions/mass_update"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let MassUpdateResponseHandler = require.resolve("./mass_update_response_handler.js"); + return handlerInstance.apiCall(MassUpdateResponseHandler, "application/json"); + + } + + /** + * The method to assign territories to multiple records + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async assignTerritoriesToMultipleRecords(moduleAPIName, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/actions/assign_territories"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + handlerInstance.setModuleAPIName(moduleAPIName); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to assign territory to record + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {BigInt} id A BigInt representing the id + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async assignTerritoryToRecord(moduleAPIName, id, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(id.toString()); + apiPath = apiPath.concat("/actions/assign_territories"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setModuleAPIName(moduleAPIName); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to remove territories from multiple records + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async removeTerritoriesFromMultipleRecords(moduleAPIName, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/actions/remove_territories"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + handlerInstance.setModuleAPIName(moduleAPIName); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to remove territories from record + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {BigInt} id A BigInt representing the id + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async removeTerritoriesFromRecord(moduleAPIName, id, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(id.toString()); + apiPath = apiPath.concat("/actions/remove_territories"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setModuleAPIName(moduleAPIName); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to record count + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async recordCount(moduleAPIName, paramInstance=null) { + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/actions/count"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let CountHandler = require.resolve("./count_handler.js"); + return handlerInstance.apiCall(CountHandler, "application/json"); + + } + + /** + * The method to get record using external id + * @param {String} externalFieldValue A String representing the externalFieldValue + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getRecordUsingExternalId(externalFieldValue, moduleAPIName, paramInstance=null, headerInstance=null) { + if((!(Object.prototype.toString.call(externalFieldValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: externalFieldValue EXPECTED TYPE: String", null, null); + } + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(externalFieldValue.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + handlerInstance.setHeader(headerInstance); + handlerInstance.setModuleAPIName(moduleAPIName); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to update record using external id + * @param {String} externalFieldValue A String representing the externalFieldValue + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {BodyWrapper} request An instance of BodyWrapper + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateRecordUsingExternalId(externalFieldValue, moduleAPIName, request, headerInstance=null) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(externalFieldValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: externalFieldValue EXPECTED TYPE: String", null, null); + } + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(externalFieldValue.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setHeader(headerInstance); + handlerInstance.setModuleAPIName(moduleAPIName); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete record using external id + * @param {String} externalFieldValue A String representing the externalFieldValue + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteRecordUsingExternalId(externalFieldValue, moduleAPIName, paramInstance=null, headerInstance=null) { + if((!(Object.prototype.toString.call(externalFieldValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: externalFieldValue EXPECTED TYPE: String", null, null); + } + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(externalFieldValue.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setParam(paramInstance); + handlerInstance.setHeader(headerInstance); + await Utility.getFields(moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to lead conversion options + * @param {BigInt} id A BigInt representing the id + * @param {String} moduleAPIName A String representing the moduleAPIName + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async leadConversionOptions(id, moduleAPIName) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(id.toString()); + apiPath = apiPath.concat("/__conversion_options"); + 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"); + + } + +} +class GetRecordParam{ + + static APPROVED = new Param("approved", "com.zoho.crm.api.Record.GetRecordParam"); + static CONVERTED = new Param("converted", "com.zoho.crm.api.Record.GetRecordParam"); + static CVID = new Param("cvid", "com.zoho.crm.api.Record.GetRecordParam"); + static UID = new Param("uid", "com.zoho.crm.api.Record.GetRecordParam"); + static FIELDS = new Param("fields", "com.zoho.crm.api.Record.GetRecordParam"); + static STARTDATETIME = new Param("startDateTime", "com.zoho.crm.api.Record.GetRecordParam"); + static ENDDATETIME = new Param("endDateTime", "com.zoho.crm.api.Record.GetRecordParam"); + static TERRITORY_ID = new Param("territory_id", "com.zoho.crm.api.Record.GetRecordParam"); + static INCLUDE_CHILD = new Param("include_child", "com.zoho.crm.api.Record.GetRecordParam"); + static ON_DEMAND_PROPERTIES = new Param("on_demand_properties", "com.zoho.crm.api.Record.GetRecordParam"); +} + +class GetRecordHeader{ + + static IF_MODIFIED_SINCE = new Header("If-Modified-Since", "com.zoho.crm.api.Record.GetRecordHeader"); + static X_EXTERNAL = new Header("X-EXTERNAL", "com.zoho.crm.api.Record.GetRecordHeader"); +} + +class UpdateRecordHeader{ + + static X_EXTERNAL = new Header("X-EXTERNAL", "com.zoho.crm.api.Record.UpdateRecordHeader"); +} + +class DeleteRecordParam{ + + static WF_TRIGGER = new Param("wf_trigger", "com.zoho.crm.api.Record.DeleteRecordParam"); +} + +class DeleteRecordHeader{ + + static X_EXTERNAL = new Header("X-EXTERNAL", "com.zoho.crm.api.Record.DeleteRecordHeader"); +} + +class GetRecordsParam{ + + static APPROVED = new Param("approved", "com.zoho.crm.api.Record.GetRecordsParam"); + static CONVERTED = new Param("converted", "com.zoho.crm.api.Record.GetRecordsParam"); + static CVID = new Param("cvid", "com.zoho.crm.api.Record.GetRecordsParam"); + static IDS = new Param("ids", "com.zoho.crm.api.Record.GetRecordsParam"); + static UID = new Param("uid", "com.zoho.crm.api.Record.GetRecordsParam"); + static FIELDS = new Param("fields", "com.zoho.crm.api.Record.GetRecordsParam"); + static SORT_BY = new Param("sort_by", "com.zoho.crm.api.Record.GetRecordsParam"); + static SORT_ORDER = new Param("sort_order", "com.zoho.crm.api.Record.GetRecordsParam"); + static PAGE = new Param("page", "com.zoho.crm.api.Record.GetRecordsParam"); + static PER_PAGE = new Param("per_page", "com.zoho.crm.api.Record.GetRecordsParam"); + static STARTDATETIME = new Param("startDateTime", "com.zoho.crm.api.Record.GetRecordsParam"); + static ENDDATETIME = new Param("endDateTime", "com.zoho.crm.api.Record.GetRecordsParam"); + static TERRITORY_ID = new Param("territory_id", "com.zoho.crm.api.Record.GetRecordsParam"); + static INCLUDE_CHILD = new Param("include_child", "com.zoho.crm.api.Record.GetRecordsParam"); + static PAGE_TOKEN = new Param("page_token", "com.zoho.crm.api.Record.GetRecordsParam"); +} + +class GetRecordsHeader{ + + static IF_MODIFIED_SINCE = new Header("If-Modified-Since", "com.zoho.crm.api.Record.GetRecordsHeader"); + static X_EXTERNAL = new Header("X-EXTERNAL", "com.zoho.crm.api.Record.GetRecordsHeader"); +} + +class CreateRecordsHeader{ + + static X_EXTERNAL = new Header("X-EXTERNAL", "com.zoho.crm.api.Record.CreateRecordsHeader"); +} + +class UpdateRecordsHeader{ + + static X_EXTERNAL = new Header("X-EXTERNAL", "com.zoho.crm.api.Record.UpdateRecordsHeader"); +} + +class DeleteRecordsParam{ + + static IDS = new Param("ids", "com.zoho.crm.api.Record.DeleteRecordsParam"); + static WF_TRIGGER = new Param("wf_trigger", "com.zoho.crm.api.Record.DeleteRecordsParam"); +} + +class DeleteRecordsHeader{ + + static X_EXTERNAL = new Header("X-EXTERNAL", "com.zoho.crm.api.Record.DeleteRecordsHeader"); +} + +class UpsertRecordsHeader{ + + static X_EXTERNAL = new Header("X-EXTERNAL", "com.zoho.crm.api.Record.UpsertRecordsHeader"); +} + +class GetDeletedRecordsParam{ + + static TYPE = new Param("type", "com.zoho.crm.api.Record.GetDeletedRecordsParam"); + static PAGE = new Param("page", "com.zoho.crm.api.Record.GetDeletedRecordsParam"); + static PER_PAGE = new Param("per_page", "com.zoho.crm.api.Record.GetDeletedRecordsParam"); +} + +class GetDeletedRecordsHeader{ + + static IF_MODIFIED_SINCE = new Header("If-Modified-Since", "com.zoho.crm.api.Record.GetDeletedRecordsHeader"); +} + +class SearchRecordsParam{ + + static CRITERIA = new Param("criteria", "com.zoho.crm.api.Record.SearchRecordsParam"); + static EMAIL = new Param("email", "com.zoho.crm.api.Record.SearchRecordsParam"); + static PHONE = new Param("phone", "com.zoho.crm.api.Record.SearchRecordsParam"); + static WORD = new Param("word", "com.zoho.crm.api.Record.SearchRecordsParam"); + static CONVERTED = new Param("converted", "com.zoho.crm.api.Record.SearchRecordsParam"); + static APPROVED = new Param("approved", "com.zoho.crm.api.Record.SearchRecordsParam"); + static PAGE = new Param("page", "com.zoho.crm.api.Record.SearchRecordsParam"); + static PER_PAGE = new Param("per_page", "com.zoho.crm.api.Record.SearchRecordsParam"); + static FIELDS = new Param("fields", "com.zoho.crm.api.Record.SearchRecordsParam"); + static CVID = new Param("cvid", "com.zoho.crm.api.Record.SearchRecordsParam"); +} + +class SearchRecordsHeader{ + + static X_EXTERNAL = new Header("X-EXTERNAL", "com.zoho.crm.api.Record.SearchRecordsHeader"); +} + +class UploadPhotoParam{ + + static RESTRICT_TRIGGERS = new Param("restrict_triggers", "com.zoho.crm.api.Record.UploadPhotoParam"); +} + +class GetMassUpdateStatusParam{ + + static JOB_ID = new Param("job_id", "com.zoho.crm.api.Record.GetMassUpdateStatusParam"); +} + +class RecordCountParam{ + + static CRITERIA = new Param("criteria", "com.zoho.crm.api.Record.RecordCountParam"); + static EMAIL = new Param("email", "com.zoho.crm.api.Record.RecordCountParam"); + static PHONE = new Param("phone", "com.zoho.crm.api.Record.RecordCountParam"); + static WORD = new Param("word", "com.zoho.crm.api.Record.RecordCountParam"); +} + +class GetRecordUsingExternalIDParam{ + + static APPROVED = new Param("approved", "com.zoho.crm.api.Record.GetRecordUsingExternalIDParam"); + static CONVERTED = new Param("converted", "com.zoho.crm.api.Record.GetRecordUsingExternalIDParam"); + static CVID = new Param("cvid", "com.zoho.crm.api.Record.GetRecordUsingExternalIDParam"); + static UID = new Param("uid", "com.zoho.crm.api.Record.GetRecordUsingExternalIDParam"); + static FIELDS = new Param("fields", "com.zoho.crm.api.Record.GetRecordUsingExternalIDParam"); + static STARTDATETIME = new Param("startDateTime", "com.zoho.crm.api.Record.GetRecordUsingExternalIDParam"); + static ENDDATETIME = new Param("endDateTime", "com.zoho.crm.api.Record.GetRecordUsingExternalIDParam"); + static TERRITORY_ID = new Param("territory_id", "com.zoho.crm.api.Record.GetRecordUsingExternalIDParam"); + static INCLUDE_CHILD = new Param("include_child", "com.zoho.crm.api.Record.GetRecordUsingExternalIDParam"); +} + +class GetRecordUsingExternalIDHeader{ + + static IF_MODIFIED_SINCE = new Header("If-Modified-Since", "com.zoho.crm.api.Record.GetRecordUsingExternalIDHeader"); + static X_EXTERNAL = new Header("X-EXTERNAL", "com.zoho.crm.api.Record.GetRecordUsingExternalIDHeader"); +} + +class UpdateRecordUsingExternalIDHeader{ + + static X_EXTERNAL = new Header("X-EXTERNAL", "com.zoho.crm.api.Record.UpdateRecordUsingExternalIDHeader"); +} + +class DeleteRecordUsingExternalIDParam{ + + static WF_TRIGGER = new Param("wf_trigger", "com.zoho.crm.api.Record.DeleteRecordUsingExternalIDParam"); +} + +class DeleteRecordUsingExternalIDHeader{ + + static X_EXTERNAL = new Header("X-EXTERNAL", "com.zoho.crm.api.Record.DeleteRecordUsingExternalIDHeader"); +} + +export { + DeleteRecordUsingExternalIDParam as DeleteRecordUsingExternalIDParam, + GetRecordsHeader as GetRecordsHeader, + GetRecordUsingExternalIDParam as GetRecordUsingExternalIDParam, + UpdateRecordUsingExternalIDHeader as UpdateRecordUsingExternalIDHeader, + GetMassUpdateStatusParam as GetMassUpdateStatusParam, + UpdateRecordHeader as UpdateRecordHeader, + UploadPhotoParam as UploadPhotoParam, + SearchRecordsParam as SearchRecordsParam, + SearchRecordsHeader as SearchRecordsHeader, + DeleteRecordsParam as DeleteRecordsParam, + DeleteRecordsHeader as DeleteRecordsHeader, + RecordOperations as MasterModel, + RecordOperations as RecordOperations, + RecordCountParam as RecordCountParam, + GetDeletedRecordsHeader as GetDeletedRecordsHeader, + DeleteRecordUsingExternalIDHeader as DeleteRecordUsingExternalIDHeader, + GetRecordUsingExternalIDHeader as GetRecordUsingExternalIDHeader, + GetRecordParam as GetRecordParam, + CreateRecordsHeader as CreateRecordsHeader, + UpsertRecordsHeader as UpsertRecordsHeader, + GetRecordHeader as GetRecordHeader, + GetDeletedRecordsParam as GetDeletedRecordsParam, + GetRecordsParam as GetRecordsParam, + DeleteRecordParam as DeleteRecordParam, + UpdateRecordsHeader as UpdateRecordsHeader, + DeleteRecordHeader as DeleteRecordHeader +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/recurring_activity.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/recurring_activity.js new file mode 100644 index 0000000..3217565 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/recurring_activity.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RecurringActivity{ + + rrule; + exdate; + keyModified = new Map(); + /** + * The method to get the rrule + * @returns {String} A String representing the rrule + */ + getRrule() { + return this.rrule; + + } + + /** + * The method to set the value to rrule + * @param {String} rrule A String representing the rrule + */ + setRrule(rrule) { + if((rrule != null) && (!(Object.prototype.toString.call(rrule) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: rrule EXPECTED TYPE: String", null, null); + } + this.rrule = rrule; + this.keyModified.set("RRULE", 1); + + } + + /** + * The method to get the exdate + * @returns {String} A String representing the exdate + */ + getExdate() { + return this.exdate; + + } + + /** + * The method to set the value to exdate + * @param {String} exdate A String representing the exdate + */ + setExdate(exdate) { + if((exdate != null) && (!(Object.prototype.toString.call(exdate) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: exdate EXPECTED TYPE: String", null, null); + } + this.exdate = exdate; + this.keyModified.set("EXDATE", 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 { + RecurringActivity as MasterModel, + RecurringActivity as RecurringActivity +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/remind_at.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/remind_at.js new file mode 100644 index 0000000..43b787f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/remind_at.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RemindAt{ + + alarm; + keyModified = new Map(); + /** + * The method to get the alarm + * @returns {String} A String representing the alarm + */ + getAlarm() { + return this.alarm; + + } + + /** + * The method to set the value to alarm + * @param {String} alarm A String representing the alarm + */ + setAlarm(alarm) { + if((alarm != null) && (!(Object.prototype.toString.call(alarm) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: alarm EXPECTED TYPE: String", null, null); + } + this.alarm = alarm; + this.keyModified.set("ALARM", 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 { + RemindAt as MasterModel, + RemindAt as RemindAt +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/reminder.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/reminder.js new file mode 100644 index 0000000..f38f39d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/reminder.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Reminder{ + + period; + unit; + time; + keyModified = new Map(); + /** + * The method to get the period + * @returns {String} A String representing the period + */ + getPeriod() { + return this.period; + + } + + /** + * The method to set the value to period + * @param {String} period A String representing the period + */ + setPeriod(period) { + if((period != null) && (!(Object.prototype.toString.call(period) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: period EXPECTED TYPE: String", null, null); + } + this.period = period; + this.keyModified.set("period", 1); + + } + + /** + * The method to get the unit + * @returns {number} A number representing the unit + */ + getUnit() { + return this.unit; + + } + + /** + * The method to set the value to unit + * @param {number} unit A number representing the unit + */ + setUnit(unit) { + if((unit != null) && (!(Object.prototype.toString.call(unit) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: unit EXPECTED TYPE: number", null, null); + } + this.unit = unit; + this.keyModified.set("unit", 1); + + } + + /** + * The method to get the time + * @returns {String} A String representing the time + */ + getTime() { + return this.time; + + } + + /** + * The method to set the value to time + * @param {String} time A String representing the time + */ + setTime(time) { + if((time != null) && (!(Object.prototype.toString.call(time) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: time EXPECTED TYPE: String", null, null); + } + this.time = time; + this.keyModified.set("time", 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 { + Reminder as MasterModel, + Reminder as Reminder +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/response_wrapper.js new file mode 100644 index 0000000..4b95f85 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + data; + info; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/success_response.js new file mode 100644 index 0000000..a2256de --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/success_response.js @@ -0,0 +1,182 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + duplicateField; + action; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the duplicateField + * @returns {String} A String representing the duplicateField + */ + getDuplicateField() { + return this.duplicateField; + + } + + /** + * The method to set the value to duplicateField + * @param {String} duplicateField A String representing the duplicateField + */ + setDuplicateField(duplicateField) { + if((duplicateField != null) && (!(Object.prototype.toString.call(duplicateField) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: duplicateField EXPECTED TYPE: String", null, null); + } + this.duplicateField = duplicateField; + this.keyModified.set("duplicate_field", 1); + + } + + /** + * The method to get the action + * @returns {Choice} An instance of Choice + */ + getAction() { + return this.action; + + } + + /** + * The method to set the value to action + * @param {Choice} action An instance of Choice + */ + setAction(action) { + if((action != null) && (!(action instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: action EXPECTED TYPE: Choice", null, null); + } + this.action = action; + this.keyModified.set("action", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/tax.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/tax.js new file mode 100644 index 0000000..7bbd312 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/tax.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Tax{ + + id; + value; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the value + * @returns {String} A String representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {String} value A String representing the value + */ + setValue(value) { + if((value != null) && (!(Object.prototype.toString.call(value) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: value EXPECTED TYPE: String", null, null); + } + this.value = value; + this.keyModified.set("value", 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 { + Tax as MasterModel, + Tax as Tax +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/territory.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/territory.js new file mode 100644 index 0000000..6fcf2d5 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/territory.js @@ -0,0 +1,159 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Territory{ + + assigned; + name; + id; + assignedTime; + assignedBy; + keyModified = new Map(); + /** + * The method to get the assigned + * @returns {String} A String representing the assigned + */ + getAssigned() { + return this.assigned; + + } + + /** + * The method to set the value to assigned + * @param {String} assigned A String representing the assigned + */ + setAssigned(assigned) { + if((assigned != null) && (!(Object.prototype.toString.call(assigned) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: assigned EXPECTED TYPE: String", null, null); + } + this.assigned = assigned; + this.keyModified.set("$assigned", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("Name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the assignedTime + * @returns {Date} An instance of Date + */ + getAssignedTime() { + return this.assignedTime; + + } + + /** + * The method to set the value to assignedTime + * @param {Date} assignedTime An instance of Date + */ + setAssignedTime(assignedTime) { + if((assignedTime != null) && (!(assignedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: assignedTime EXPECTED TYPE: Date", null, null); + } + this.assignedTime = assignedTime; + this.keyModified.set("$assigned_time", 1); + + } + + /** + * The method to get the assignedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getAssignedBy() { + return this.assignedBy; + + } + + /** + * The method to set the value to assignedBy + * @param {MinifiedUser} assignedBy An instance of MinifiedUser + */ + async setAssignedBy(assignedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((assignedBy != null) && (!(assignedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: assignedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.assignedBy = assignedBy; + this.keyModified.set("$assigned_by", 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 { + Territory as MasterModel, + Territory as Territory +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/widget.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/widget.js new file mode 100644 index 0000000..fb385f9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/widget.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Widget{ + + id; + name; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + Widget as MasterModel, + Widget as Widget +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/record/wizard.js b/versions/3.0.0/lib/core/com/zoho/crm/api/record/wizard.js new file mode 100644 index 0000000..8e66bc9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/record/wizard.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Wizard{ + + id; + name; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + Wizard as MasterModel, + Wizard as Wizard +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/api_exception.js new file mode 100644 index 0000000..35bf8ba --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/field.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/field.js new file mode 100644 index 0000000..fb4ef4e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/field.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Field{ + + apiName; + id; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Field as MasterModel, + Field as Field +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/import_related_lists.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/import_related_lists.js new file mode 100644 index 0000000..178d5dd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/import_related_lists.js @@ -0,0 +1,9 @@ +export { ModuleMap } from "./module_map.js"; +export { RelatedListsOperations } from "./related_lists_operations.js"; +export { GetRelatedListsParam } from "./related_lists_operations.js"; +export { GetRelatedListParam } from "./related_lists_operations.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export * as ResponseHandler from "./response_handler.js"; +export { APIException } from "./api_exception.js"; +export { RelatedList } from "./related_list.js"; +export { Field } from "./field.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/module_map.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/module_map.js new file mode 100644 index 0000000..a7d7a5b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/module_map.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ModuleMap{ + + apiName; + id; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + ModuleMap as MasterModel, + ModuleMap as ModuleMap +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/related_list.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/related_list.js new file mode 100644 index 0000000..51faff2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/related_list.js @@ -0,0 +1,459 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RelatedList{ + + id; + sequenceNumber; + displayLabel; + apiName; + module; + name; + action; + href; + type; + connectedmodule; + linkingmodule; + visible; + customizeSort; + customizeFields; + customizeDisplayLabel; + sortBy; + sortOrder; + fields; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the sequenceNumber + * @returns {String} A String representing the sequenceNumber + */ + getSequenceNumber() { + return this.sequenceNumber; + + } + + /** + * The method to set the value to sequenceNumber + * @param {String} sequenceNumber A String representing the sequenceNumber + */ + setSequenceNumber(sequenceNumber) { + if((sequenceNumber != null) && (!(Object.prototype.toString.call(sequenceNumber) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sequenceNumber EXPECTED TYPE: String", null, null); + } + this.sequenceNumber = sequenceNumber; + this.keyModified.set("sequence_number", 1); + + } + + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the module + * @returns {ModuleMap} An instance of ModuleMap + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {ModuleMap} module An instance of ModuleMap + */ + async setModule(module) { + const ModuleMap = (await (import("./module_map.js"))).MasterModel; + if((module != null) && (!(module instanceof ModuleMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: ModuleMap", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the action + * @returns {String} A String representing the action + */ + getAction() { + return this.action; + + } + + /** + * The method to set the value to action + * @param {String} action A String representing the action + */ + setAction(action) { + if((action != null) && (!(Object.prototype.toString.call(action) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: action EXPECTED TYPE: String", null, null); + } + this.action = action; + this.keyModified.set("action", 1); + + } + + /** + * The method to get the href + * @returns {String} A String representing the href + */ + getHref() { + return this.href; + + } + + /** + * The method to set the value to href + * @param {String} href A String representing the href + */ + setHref(href) { + if((href != null) && (!(Object.prototype.toString.call(href) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: href EXPECTED TYPE: String", null, null); + } + this.href = href; + this.keyModified.set("href", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the connectedmodule + * @returns {String} A String representing the connectedmodule + */ + getConnectedmodule() { + return this.connectedmodule; + + } + + /** + * The method to set the value to connectedmodule + * @param {String} connectedmodule A String representing the connectedmodule + */ + setConnectedmodule(connectedmodule) { + if((connectedmodule != null) && (!(Object.prototype.toString.call(connectedmodule) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: connectedmodule EXPECTED TYPE: String", null, null); + } + this.connectedmodule = connectedmodule; + this.keyModified.set("connectedmodule", 1); + + } + + /** + * The method to get the linkingmodule + * @returns {String} A String representing the linkingmodule + */ + getLinkingmodule() { + return this.linkingmodule; + + } + + /** + * The method to set the value to linkingmodule + * @param {String} linkingmodule A String representing the linkingmodule + */ + setLinkingmodule(linkingmodule) { + if((linkingmodule != null) && (!(Object.prototype.toString.call(linkingmodule) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: linkingmodule EXPECTED TYPE: String", null, null); + } + this.linkingmodule = linkingmodule; + this.keyModified.set("linkingmodule", 1); + + } + + /** + * The method to get the visible + * @returns {Boolean} A Boolean representing the visible + */ + getVisible() { + return this.visible; + + } + + /** + * The method to set the value to visible + * @param {Boolean} visible A Boolean representing the visible + */ + setVisible(visible) { + if((visible != null) && (!(Object.prototype.toString.call(visible) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: visible EXPECTED TYPE: Boolean", null, null); + } + this.visible = visible; + this.keyModified.set("visible", 1); + + } + + /** + * The method to get the customizeSort + * @returns {Boolean} A Boolean representing the customizeSort + */ + getCustomizeSort() { + return this.customizeSort; + + } + + /** + * The method to set the value to customizeSort + * @param {Boolean} customizeSort A Boolean representing the customizeSort + */ + setCustomizeSort(customizeSort) { + if((customizeSort != null) && (!(Object.prototype.toString.call(customizeSort) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: customizeSort EXPECTED TYPE: Boolean", null, null); + } + this.customizeSort = customizeSort; + this.keyModified.set("customize_sort", 1); + + } + + /** + * The method to get the customizeFields + * @returns {Boolean} A Boolean representing the customizeFields + */ + getCustomizeFields() { + return this.customizeFields; + + } + + /** + * The method to set the value to customizeFields + * @param {Boolean} customizeFields A Boolean representing the customizeFields + */ + setCustomizeFields(customizeFields) { + if((customizeFields != null) && (!(Object.prototype.toString.call(customizeFields) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: customizeFields EXPECTED TYPE: Boolean", null, null); + } + this.customizeFields = customizeFields; + this.keyModified.set("customize_fields", 1); + + } + + /** + * The method to get the customizeDisplayLabel + * @returns {Boolean} A Boolean representing the customizeDisplayLabel + */ + getCustomizeDisplayLabel() { + return this.customizeDisplayLabel; + + } + + /** + * The method to set the value to customizeDisplayLabel + * @param {Boolean} customizeDisplayLabel A Boolean representing the customizeDisplayLabel + */ + setCustomizeDisplayLabel(customizeDisplayLabel) { + if((customizeDisplayLabel != null) && (!(Object.prototype.toString.call(customizeDisplayLabel) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: customizeDisplayLabel EXPECTED TYPE: Boolean", null, null); + } + this.customizeDisplayLabel = customizeDisplayLabel; + this.keyModified.set("customize_display_label", 1); + + } + + /** + * The method to get the sortBy + * @returns {Field} An instance of Field + */ + getSortBy() { + return this.sortBy; + + } + + /** + * The method to set the value to sortBy + * @param {Field} sortBy An instance of Field + */ + async setSortBy(sortBy) { + const Field = (await (import("./field.js"))).MasterModel; + if((sortBy != null) && (!(sortBy instanceof Field))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortBy EXPECTED TYPE: Field", null, null); + } + this.sortBy = sortBy; + this.keyModified.set("sort_by", 1); + + } + + /** + * The method to get the sortOrder + * @returns {String} A String representing the sortOrder + */ + getSortOrder() { + return this.sortOrder; + + } + + /** + * The method to set the value to sortOrder + * @param {String} sortOrder A String representing the sortOrder + */ + setSortOrder(sortOrder) { + if((sortOrder != null) && (!(Object.prototype.toString.call(sortOrder) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortOrder EXPECTED TYPE: String", null, null); + } + this.sortOrder = sortOrder; + this.keyModified.set("sort_order", 1); + + } + + /** + * The method to get the fields + * @returns {Array} An Array representing the fields + */ + getFields() { + return this.fields; + + } + + /** + * The method to set the value to fields + * @param {Array} fields An Array representing the fields + */ + setFields(fields) { + if((fields != null) && (!(Object.prototype.toString.call(fields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: Array", null, null); + } + this.fields = fields; + this.keyModified.set("fields", 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 { + RelatedList as MasterModel, + RelatedList as RelatedList +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/related_lists_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/related_lists_operations.js new file mode 100644 index 0000000..03583bd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/related_lists_operations.js @@ -0,0 +1,93 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 RelatedListsOperations{ + + layoutId; + /** + * Creates an instance of RelatedListsOperations with the given parameters + * @param {BigInt} layoutId A BigInt representing the layoutId + */ + constructor(layoutId=null){ + if((layoutId != null) && (!(Object.prototype.toString.call(layoutId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: layoutId EXPECTED TYPE: BigInt", null, null); + } + this.layoutId = layoutId; + + } + + /** + * The method to get related lists + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getRelatedLists(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/related_lists"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addParam(new Param("layout_id", "com.zoho.crm.api.RelatedLists.GetRelatedListsParam"), this.layoutId).catch(err => { throw err; }); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to get related list + * @param {BigInt} id A BigInt representing the id + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getRelatedList(id, paramInstance=null) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/related_lists/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addParam(new Param("layout_id", "com.zoho.crm.api.RelatedLists.GetRelatedListParam"), this.layoutId).catch(err => { throw err; }); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + +} +class GetRelatedListsParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.RelatedLists.GetRelatedListsParam"); +} + +class GetRelatedListParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.RelatedLists.GetRelatedListParam"); +} + +export { + GetRelatedListsParam as GetRelatedListsParam, + RelatedListsOperations as MasterModel, + RelatedListsOperations as RelatedListsOperations, + GetRelatedListParam as GetRelatedListParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/response_wrapper.js new file mode 100644 index 0000000..3fe2743 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_lists/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + relatedLists; + keyModified = new Map(); + /** + * The method to get the relatedLists + * @returns {Array} An Array representing the relatedLists + */ + getRelatedLists() { + return this.relatedLists; + + } + + /** + * The method to set the value to relatedLists + * @param {Array} relatedLists An Array representing the relatedLists + */ + setRelatedLists(relatedLists) { + if((relatedLists != null) && (!(Object.prototype.toString.call(relatedLists) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: relatedLists EXPECTED TYPE: Array", null, null); + } + this.relatedLists = relatedLists; + this.keyModified.set("related_lists", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/action_wrapper.js new file mode 100644 index 0000000..6996d19 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/body_wrapper.js new file mode 100644 index 0000000..3b80d06 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/file_body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/file_body_wrapper.js new file mode 100644 index 0000000..ac3a3e4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/file_body_wrapper.js @@ -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 +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/import_related_records.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/import_related_records.js new file mode 100644 index 0000000..f0bd944 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/import_related_records.js @@ -0,0 +1,28 @@ +export { RelatedRecordsOperations } from "./related_records_operations.js"; +export { GetRelatedRecordsHeader } from "./related_records_operations.js"; +export { GetRelatedRecordsParam } from "./related_records_operations.js"; +export { UpdateRelatedRecordsHeader } from "./related_records_operations.js"; +export { DelinkRecordsHeader } from "./related_records_operations.js"; +export { DelinkRecordsParam } from "./related_records_operations.js"; +export { GetRelatedRecordsUsingExternalIDHeader } from "./related_records_operations.js"; +export { GetRelatedRecordsUsingExternalIDParam } from "./related_records_operations.js"; +export { UpdateRelatedRecordsUsingExternalIDHeader } from "./related_records_operations.js"; +export { DeleteRelatedRecordsUsingExternalIDHeader } from "./related_records_operations.js"; +export { DeleteRelatedRecordsUsingExternalIDParam } from "./related_records_operations.js"; +export { GetRelatedRecordHeader } from "./related_records_operations.js"; +export { GetRelatedRecordParam } from "./related_records_operations.js"; +export { UpdateRelatedRecordHeader } from "./related_records_operations.js"; +export { DelinkRecordHeader } from "./related_records_operations.js"; +export { GetRelatedRecordUsingExternalIDHeader } from "./related_records_operations.js"; +export { GetRelatedRecordUsingExternalIDParam } from "./related_records_operations.js"; +export { UpdateRelatedRecordUsingExternalIDHeader } from "./related_records_operations.js"; +export { DeleteRelatedRecordUsingExternalIDHeader } from "./related_records_operations.js"; +export * as ActionHandler from "./action_handler.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export * as ActionResponse from "./action_response.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export * as ResponseHandler from "./response_handler.js"; +export { FileBodyWrapper } from "./file_body_wrapper.js"; +export { APIException } from "./api_exception.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { SuccessResponse } from "./success_response.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/related_records_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/related_records_operations.js new file mode 100644 index 0000000..f4f64c3 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/related_records_operations.js @@ -0,0 +1,609 @@ +import {Header} from "../../../../../../routes/header.js"; +import {HeaderMap} from "../../../../../../routes/header_map.js"; +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +import {APIResponse} from "../../../../../../routes/controllers/api_response.js"; +import {CommonAPIHandler} from "../../../../../../routes/middlewares/common_api_handler.js"; +import {Utility} from "../../../../../../utils/util/utility.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; +import {createRequire} from "node:module"; + +class RelatedRecordsOperations{ + + moduleAPIName; + relatedListAPIName; + xExternal; + /** + * Creates an instance of RelatedRecordsOperations with the given parameters + * @param {String} relatedListAPIName A String representing the relatedListAPIName + * @param {String} moduleAPIName A String representing the moduleAPIName + * @param {String} xExternal A String representing the xExternal + */ + constructor(relatedListAPIName, moduleAPIName, xExternal=null){ + if((!(Object.prototype.toString.call(relatedListAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: relatedListAPIName EXPECTED TYPE: String", null, null); + } + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + if((xExternal != null) && (!(Object.prototype.toString.call(xExternal) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: xExternal EXPECTED TYPE: String", null, null); + } + this.relatedListAPIName = relatedListAPIName; + this.moduleAPIName = moduleAPIName; + this.xExternal = xExternal; + + } + + /** + * The method to get related records + * @param {BigInt} recordId A BigInt representing the recordId + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getRelatedRecords(recordId, paramInstance=null, headerInstance=null) { + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.relatedListAPIName.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addHeader(new Header("X-EXTERNAL", "com.zoho.crm.api.RelatedRecords.GetRelatedRecordsHeader"), this.xExternal).catch(err => { throw err; }); + handlerInstance.setParam(paramInstance); + handlerInstance.setHeader(headerInstance); + await Utility.getRelatedLists(this.relatedListAPIName, this.moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to update related records + * @param {BigInt} recordId A BigInt representing the recordId + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateRelatedRecords(recordId, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.relatedListAPIName.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + await handlerInstance.addHeader(new Header("X-EXTERNAL", "com.zoho.crm.api.RelatedRecords.UpdateRelatedRecordsHeader"), this.xExternal).catch(err => { throw err; }); + await Utility.getRelatedLists(this.relatedListAPIName, this.moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delink records + * @param {BigInt} recordId A BigInt representing the recordId + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async delinkRecords(recordId, paramInstance=null) { + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.relatedListAPIName.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + await handlerInstance.addHeader(new Header("X-EXTERNAL", "com.zoho.crm.api.RelatedRecords.DelinkRecordsHeader"), this.xExternal).catch(err => { throw err; }); + handlerInstance.setParam(paramInstance); + await Utility.getFields(this.moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get related records using external id + * @param {String} externalValue A String representing the externalValue + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getRelatedRecordsUsingExternalId(externalValue, paramInstance=null, headerInstance=null) { + if((!(Object.prototype.toString.call(externalValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: externalValue EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(externalValue.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.relatedListAPIName.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addHeader(new Header("X-EXTERNAL", "com.zoho.crm.api.RelatedRecords.GetRelatedRecordsUsingExternalIDHeader"), this.xExternal).catch(err => { throw err; }); + handlerInstance.setParam(paramInstance); + handlerInstance.setHeader(headerInstance); + await Utility.getRelatedLists(this.relatedListAPIName, this.moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to update related records using external id + * @param {String} externalValue A String representing the externalValue + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateRelatedRecordsUsingExternalId(externalValue, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(externalValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: externalValue EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(externalValue.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.relatedListAPIName.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + await handlerInstance.addHeader(new Header("X-EXTERNAL", "com.zoho.crm.api.RelatedRecords.UpdateRelatedRecordsUsingExternalIDHeader"), this.xExternal).catch(err => { throw err; }); + await Utility.getRelatedLists(this.relatedListAPIName, this.moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete related records using external id + * @param {String} externalValue A String representing the externalValue + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteRelatedRecordsUsingExternalId(externalValue, paramInstance=null) { + if((!(Object.prototype.toString.call(externalValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: externalValue EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(externalValue.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.relatedListAPIName.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + await handlerInstance.addHeader(new Header("X-EXTERNAL", "com.zoho.crm.api.RelatedRecords.DeleteRelatedRecordsUsingExternalIDHeader"), this.xExternal).catch(err => { throw err; }); + handlerInstance.setParam(paramInstance); + await Utility.getRelatedLists(this.relatedListAPIName, this.moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get related record + * @param {BigInt} relatedRecordId A BigInt representing the relatedRecordId + * @param {BigInt} recordId A BigInt representing the recordId + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getRelatedRecord(relatedRecordId, recordId, paramInstance=null, headerInstance=null) { + if((!(Object.prototype.toString.call(relatedRecordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: relatedRecordId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.relatedListAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(relatedRecordId.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addHeader(new Header("X-EXTERNAL", "com.zoho.crm.api.RelatedRecords.GetRelatedRecordHeader"), this.xExternal).catch(err => { throw err; }); + handlerInstance.setParam(paramInstance); + handlerInstance.setHeader(headerInstance); + await Utility.getRelatedLists(this.relatedListAPIName, this.moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to update related record + * @param {BigInt} relatedRecordId A BigInt representing the relatedRecordId + * @param {BigInt} recordId A BigInt representing the recordId + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateRelatedRecord(relatedRecordId, recordId, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(relatedRecordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: relatedRecordId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.relatedListAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(relatedRecordId.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + await handlerInstance.addHeader(new Header("X-EXTERNAL", "com.zoho.crm.api.RelatedRecords.UpdateRelatedRecordHeader"), this.xExternal).catch(err => { throw err; }); + await Utility.getRelatedLists(this.relatedListAPIName, this.moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delink record + * @param {BigInt} relatedRecordId A BigInt representing the relatedRecordId + * @param {BigInt} recordId A BigInt representing the recordId + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async delinkRecord(relatedRecordId, recordId) { + if((!(Object.prototype.toString.call(relatedRecordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: relatedRecordId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.relatedListAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(relatedRecordId.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + await handlerInstance.addHeader(new Header("X-EXTERNAL", "com.zoho.crm.api.RelatedRecords.DelinkRecordHeader"), this.xExternal).catch(err => { throw err; }); + await Utility.getFields(this.moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get related record using external id + * @param {String} externalFieldValue A String representing the externalFieldValue + * @param {String} externalValue A String representing the externalValue + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getRelatedRecordUsingExternalId(externalFieldValue, externalValue, paramInstance=null, headerInstance=null) { + if((!(Object.prototype.toString.call(externalFieldValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: externalFieldValue EXPECTED TYPE: String", null, null); + } + if((!(Object.prototype.toString.call(externalValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: externalValue EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(externalValue.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.relatedListAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(externalFieldValue.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addHeader(new Header("X-EXTERNAL", "com.zoho.crm.api.RelatedRecords.GetRelatedRecordUsingExternalIDHeader"), this.xExternal).catch(err => { throw err; }); + handlerInstance.setParam(paramInstance); + handlerInstance.setHeader(headerInstance); + await Utility.getRelatedLists(this.relatedListAPIName, this.moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to update related record using external id + * @param {String} externalFieldValue A String representing the externalFieldValue + * @param {String} externalValue A String representing the externalValue + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateRelatedRecordUsingExternalId(externalFieldValue, externalValue, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(externalFieldValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: externalFieldValue EXPECTED TYPE: String", null, null); + } + if((!(Object.prototype.toString.call(externalValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: externalValue EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(externalValue.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.relatedListAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(externalFieldValue.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + await handlerInstance.addHeader(new Header("X-EXTERNAL", "com.zoho.crm.api.RelatedRecords.UpdateRelatedRecordUsingExternalIDHeader"), this.xExternal).catch(err => { throw err; }); + await Utility.getRelatedLists(this.relatedListAPIName, this.moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete related record using external id + * @param {String} externalFieldValue A String representing the externalFieldValue + * @param {String} externalValue A String representing the externalValue + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteRelatedRecordUsingExternalId(externalFieldValue, externalValue) { + if((!(Object.prototype.toString.call(externalFieldValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: externalFieldValue EXPECTED TYPE: String", null, null); + } + if((!(Object.prototype.toString.call(externalValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: externalValue EXPECTED TYPE: String", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(externalValue.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.relatedListAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(externalFieldValue.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + await handlerInstance.addHeader(new Header("X-EXTERNAL", "com.zoho.crm.api.RelatedRecords.DeleteRelatedRecordUsingExternalIDHeader"), this.xExternal).catch(err => { throw err; }); + await Utility.getRelatedLists(this.relatedListAPIName, this.moduleAPIName, handlerInstance).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class GetRelatedRecordsHeader{ + + static IF_MODIFIED_SINCE = new Header("If-Modified-Since", "com.zoho.crm.api.RelatedRecords.GetRelatedRecordsHeader"); +} + +class GetRelatedRecordsParam{ + + static PAGE = new Param("page", "com.zoho.crm.api.RelatedRecords.GetRelatedRecordsParam"); + static PER_PAGE = new Param("per_page", "com.zoho.crm.api.RelatedRecords.GetRelatedRecordsParam"); + static FIELDS = new Param("fields", "com.zoho.crm.api.RelatedRecords.GetRelatedRecordsParam"); +} + +class UpdateRelatedRecordsHeader{ + +} + +class DelinkRecordsHeader{ + +} + +class DelinkRecordsParam{ + + static IDS = new Param("ids", "com.zoho.crm.api.RelatedRecords.DelinkRecordsParam"); +} + +class GetRelatedRecordsUsingExternalIDHeader{ + + static IF_MODIFIED_SINCE = new Header("If-Modified-Since", "com.zoho.crm.api.RelatedRecords.GetRelatedRecordsUsingExternalIDHeader"); +} + +class GetRelatedRecordsUsingExternalIDParam{ + + static PAGE = new Param("page", "com.zoho.crm.api.RelatedRecords.GetRelatedRecordsUsingExternalIDParam"); + static PER_PAGE = new Param("per_page", "com.zoho.crm.api.RelatedRecords.GetRelatedRecordsUsingExternalIDParam"); + static FIELDS = new Param("fields", "com.zoho.crm.api.RelatedRecords.GetRelatedRecordsUsingExternalIDParam"); +} + +class UpdateRelatedRecordsUsingExternalIDHeader{ + +} + +class DeleteRelatedRecordsUsingExternalIDHeader{ + +} + +class DeleteRelatedRecordsUsingExternalIDParam{ + + static IDS = new Param("ids", "com.zoho.crm.api.RelatedRecords.DeleteRelatedRecordsUsingExternalIDParam"); +} + +class GetRelatedRecordHeader{ + + static IF_MODIFIED_SINCE = new Header("If-Modified-Since", "com.zoho.crm.api.RelatedRecords.GetRelatedRecordHeader"); +} + +class GetRelatedRecordParam{ + + static FIELDS = new Param("fields", "com.zoho.crm.api.RelatedRecords.GetRelatedRecordParam"); +} + +class UpdateRelatedRecordHeader{ + +} + +class DelinkRecordHeader{ + +} + +class GetRelatedRecordUsingExternalIDHeader{ + + static IF_MODIFIED_SINCE = new Header("If-Modified-Since", "com.zoho.crm.api.RelatedRecords.GetRelatedRecordUsingExternalIDHeader"); +} + +class GetRelatedRecordUsingExternalIDParam{ + + static FIELDS = new Param("fields", "com.zoho.crm.api.RelatedRecords.GetRelatedRecordUsingExternalIDParam"); +} + +class UpdateRelatedRecordUsingExternalIDHeader{ + +} + +class DeleteRelatedRecordUsingExternalIDHeader{ + +} + +export { + GetRelatedRecordHeader as GetRelatedRecordHeader, + DelinkRecordsHeader as DelinkRecordsHeader, + RelatedRecordsOperations as MasterModel, + RelatedRecordsOperations as RelatedRecordsOperations, + DeleteRelatedRecordUsingExternalIDHeader as DeleteRelatedRecordUsingExternalIDHeader, + GetRelatedRecordParam as GetRelatedRecordParam, + GetRelatedRecordsParam as GetRelatedRecordsParam, + UpdateRelatedRecordUsingExternalIDHeader as UpdateRelatedRecordUsingExternalIDHeader, + GetRelatedRecordsUsingExternalIDParam as GetRelatedRecordsUsingExternalIDParam, + DeleteRelatedRecordsUsingExternalIDHeader as DeleteRelatedRecordsUsingExternalIDHeader, + GetRelatedRecordUsingExternalIDHeader as GetRelatedRecordUsingExternalIDHeader, + UpdateRelatedRecordsUsingExternalIDHeader as UpdateRelatedRecordsUsingExternalIDHeader, + GetRelatedRecordUsingExternalIDParam as GetRelatedRecordUsingExternalIDParam, + GetRelatedRecordsUsingExternalIDHeader as GetRelatedRecordsUsingExternalIDHeader, + DeleteRelatedRecordsUsingExternalIDParam as DeleteRelatedRecordsUsingExternalIDParam, + DelinkRecordHeader as DelinkRecordHeader, + UpdateRelatedRecordHeader as UpdateRelatedRecordHeader, + GetRelatedRecordsHeader as GetRelatedRecordsHeader, + UpdateRelatedRecordsHeader as UpdateRelatedRecordsHeader, + DelinkRecordsParam as DelinkRecordsParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/response_wrapper.js new file mode 100644 index 0000000..1f43a93 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + data; + info; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("../record/info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/success_response.js new file mode 100644 index 0000000..a5f6165 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/related_records/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/action_wrapper.js new file mode 100644 index 0000000..6996d19 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/appointment_name.js b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/appointment_name.js new file mode 100644 index 0000000..395c606 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/appointment_name.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AppointmentName{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + AppointmentName as MasterModel, + AppointmentName as AppointmentName +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/approval.js b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/approval.js new file mode 100644 index 0000000..7e7c841 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/approval.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Approval{ + + delegate; + approve; + reject; + resubmit; + keyModified = new Map(); + /** + * The method to get the delegate + * @returns {Boolean} A Boolean representing the delegate + */ + getDelegate() { + return this.delegate; + + } + + /** + * The method to set the value to delegate + * @param {Boolean} delegate A Boolean representing the delegate + */ + setDelegate(delegate) { + if((delegate != null) && (!(Object.prototype.toString.call(delegate) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: delegate EXPECTED TYPE: Boolean", null, null); + } + this.delegate = delegate; + this.keyModified.set("delegate", 1); + + } + + /** + * The method to get the approve + * @returns {Boolean} A Boolean representing the approve + */ + getApprove() { + return this.approve; + + } + + /** + * The method to set the value to approve + * @param {Boolean} approve A Boolean representing the approve + */ + setApprove(approve) { + if((approve != null) && (!(Object.prototype.toString.call(approve) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: approve EXPECTED TYPE: Boolean", null, null); + } + this.approve = approve; + this.keyModified.set("approve", 1); + + } + + /** + * The method to get the reject + * @returns {Boolean} A Boolean representing the reject + */ + getReject() { + return this.reject; + + } + + /** + * The method to set the value to reject + * @param {Boolean} reject A Boolean representing the reject + */ + setReject(reject) { + if((reject != null) && (!(Object.prototype.toString.call(reject) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: reject EXPECTED TYPE: Boolean", null, null); + } + this.reject = reject; + this.keyModified.set("reject", 1); + + } + + /** + * The method to get the resubmit + * @returns {Boolean} A Boolean representing the resubmit + */ + getResubmit() { + return this.resubmit; + + } + + /** + * The method to set the value to resubmit + * @param {Boolean} resubmit A Boolean representing the resubmit + */ + setResubmit(resubmit) { + if((resubmit != null) && (!(Object.prototype.toString.call(resubmit) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: resubmit EXPECTED TYPE: Boolean", null, null); + } + this.resubmit = resubmit; + this.keyModified.set("resubmit", 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 { + Approval as MasterModel, + Approval as Approval +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/body_wrapper.js new file mode 100644 index 0000000..3b80d06 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/import_reschedule_history.js b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/import_reschedule_history.js new file mode 100644 index 0000000..849bf5f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/import_reschedule_history.js @@ -0,0 +1,16 @@ +export * as ResponseHandler from "./response_handler.js"; +export { APIException } from "./api_exception.js"; +export { AppointmentName } from "./appointment_name.js"; +export { Info } from "./info.js"; +export { RescheduleHistory } from "./reschedule_history.js"; +export { Approval } from "./approval.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { User } from "./user.js"; +export { RescheduleHistoryOperations } from "./reschedule_history_operations.js"; +export { GetAppointmentsRescheduledHistoryParam } from "./reschedule_history_operations.js"; +export { GetAppointmentRescheduledHistoryParam } from "./reschedule_history_operations.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { SuccessResponse } from "./success_response.js"; +export * as ActionResponse from "./action_response.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export * as ActionHandler from "./action_handler.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/info.js new file mode 100644 index 0000000..da09c6a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/info.js @@ -0,0 +1,204 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + perPage; + nextPageToken; + count; + page; + previousPageToken; + pageTokenExpiry; + moreRecords; + keyModified = new Map(); + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the nextPageToken + * @returns {String} A String representing the nextPageToken + */ + getNextPageToken() { + return this.nextPageToken; + + } + + /** + * The method to set the value to nextPageToken + * @param {String} nextPageToken A String representing the nextPageToken + */ + setNextPageToken(nextPageToken) { + if((nextPageToken != null) && (!(Object.prototype.toString.call(nextPageToken) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: nextPageToken EXPECTED TYPE: String", null, null); + } + this.nextPageToken = nextPageToken; + this.keyModified.set("next_page_token", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the previousPageToken + * @returns {String} A String representing the previousPageToken + */ + getPreviousPageToken() { + return this.previousPageToken; + + } + + /** + * The method to set the value to previousPageToken + * @param {String} previousPageToken A String representing the previousPageToken + */ + setPreviousPageToken(previousPageToken) { + if((previousPageToken != null) && (!(Object.prototype.toString.call(previousPageToken) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: previousPageToken EXPECTED TYPE: String", null, null); + } + this.previousPageToken = previousPageToken; + this.keyModified.set("previous_page_token", 1); + + } + + /** + * The method to get the pageTokenExpiry + * @returns {Date} An instance of Date + */ + getPageTokenExpiry() { + return this.pageTokenExpiry; + + } + + /** + * The method to set the value to pageTokenExpiry + * @param {Date} pageTokenExpiry An instance of Date + */ + setPageTokenExpiry(pageTokenExpiry) { + if((pageTokenExpiry != null) && (!(pageTokenExpiry instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pageTokenExpiry EXPECTED TYPE: Date", null, null); + } + this.pageTokenExpiry = pageTokenExpiry; + this.keyModified.set("page_token_expiry", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/reschedule_history.js b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/reschedule_history.js new file mode 100644 index 0000000..e2f1c97 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/reschedule_history.js @@ -0,0 +1,669 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RescheduleHistory{ + + currencySymbol; + rescheduledTo; + reviewProcess; + rescheduleReason; + sharingPermission; + name; + modifiedBy; + review; + rescheduledBy; + state; + canvasId; + processFlow; + id; + rescheduledTime; + ziaVisions; + approved; + modifiedTime; + approval; + createdTime; + rescheduledFrom; + appointmentName; + editable; + orchestration; + inMerge; + createdBy; + approvalState; + rescheduleNote; + keyModified = new Map(); + /** + * The method to get the currencySymbol + * @returns {String} A String representing the currencySymbol + */ + getCurrencySymbol() { + return this.currencySymbol; + + } + + /** + * The method to set the value to currencySymbol + * @param {String} currencySymbol A String representing the currencySymbol + */ + setCurrencySymbol(currencySymbol) { + if((currencySymbol != null) && (!(Object.prototype.toString.call(currencySymbol) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: currencySymbol EXPECTED TYPE: String", null, null); + } + this.currencySymbol = currencySymbol; + this.keyModified.set("$currency_symbol", 1); + + } + + /** + * The method to get the rescheduledTo + * @returns {Date} An instance of Date + */ + getRescheduledTo() { + return this.rescheduledTo; + + } + + /** + * The method to set the value to rescheduledTo + * @param {Date} rescheduledTo An instance of Date + */ + setRescheduledTo(rescheduledTo) { + if((rescheduledTo != null) && (!(rescheduledTo instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: rescheduledTo EXPECTED TYPE: Date", null, null); + } + this.rescheduledTo = rescheduledTo; + this.keyModified.set("Rescheduled_To", 1); + + } + + /** + * The method to get the reviewProcess + * @returns {Boolean} A Boolean representing the reviewProcess + */ + getReviewProcess() { + return this.reviewProcess; + + } + + /** + * The method to set the value to reviewProcess + * @param {Boolean} reviewProcess A Boolean representing the reviewProcess + */ + setReviewProcess(reviewProcess) { + if((reviewProcess != null) && (!(Object.prototype.toString.call(reviewProcess) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: reviewProcess EXPECTED TYPE: Boolean", null, null); + } + this.reviewProcess = reviewProcess; + this.keyModified.set("$review_process", 1); + + } + + /** + * The method to get the rescheduleReason + * @returns {String} A String representing the rescheduleReason + */ + getRescheduleReason() { + return this.rescheduleReason; + + } + + /** + * The method to set the value to rescheduleReason + * @param {String} rescheduleReason A String representing the rescheduleReason + */ + setRescheduleReason(rescheduleReason) { + if((rescheduleReason != null) && (!(Object.prototype.toString.call(rescheduleReason) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: rescheduleReason EXPECTED TYPE: String", null, null); + } + this.rescheduleReason = rescheduleReason; + this.keyModified.set("Reschedule_Reason", 1); + + } + + /** + * The method to get the sharingPermission + * @returns {String} A String representing the sharingPermission + */ + getSharingPermission() { + return this.sharingPermission; + + } + + /** + * The method to set the value to sharingPermission + * @param {String} sharingPermission A String representing the sharingPermission + */ + setSharingPermission(sharingPermission) { + if((sharingPermission != null) && (!(Object.prototype.toString.call(sharingPermission) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sharingPermission EXPECTED TYPE: String", null, null); + } + this.sharingPermission = sharingPermission; + this.keyModified.set("$sharing_permission", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("Name", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {User} An instance of User + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {User} modifiedBy An instance of User + */ + async setModifiedBy(modifiedBy) { + const User = (await (import("./user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof User))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: User", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("Modified_By", 1); + + } + + /** + * The method to get the review + * @returns {Boolean} A Boolean representing the review + */ + getReview() { + return this.review; + + } + + /** + * The method to set the value to review + * @param {Boolean} review A Boolean representing the review + */ + setReview(review) { + if((review != null) && (!(Object.prototype.toString.call(review) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: review EXPECTED TYPE: Boolean", null, null); + } + this.review = review; + this.keyModified.set("$review", 1); + + } + + /** + * The method to get the rescheduledBy + * @returns {User} An instance of User + */ + getRescheduledBy() { + return this.rescheduledBy; + + } + + /** + * The method to set the value to rescheduledBy + * @param {User} rescheduledBy An instance of User + */ + async setRescheduledBy(rescheduledBy) { + const User = (await (import("./user.js"))).MasterModel; + if((rescheduledBy != null) && (!(rescheduledBy instanceof User))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: rescheduledBy EXPECTED TYPE: User", null, null); + } + this.rescheduledBy = rescheduledBy; + this.keyModified.set("Rescheduled_By", 1); + + } + + /** + * The method to get the state + * @returns {String} A String representing the state + */ + getState() { + return this.state; + + } + + /** + * The method to set the value to state + * @param {String} state A String representing the state + */ + setState(state) { + if((state != null) && (!(Object.prototype.toString.call(state) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: state EXPECTED TYPE: String", null, null); + } + this.state = state; + this.keyModified.set("$state", 1); + + } + + /** + * The method to get the canvasId + * @returns {String} A String representing the canvasId + */ + getCanvasId() { + return this.canvasId; + + } + + /** + * The method to set the value to canvasId + * @param {String} canvasId A String representing the canvasId + */ + setCanvasId(canvasId) { + if((canvasId != null) && (!(Object.prototype.toString.call(canvasId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: canvasId EXPECTED TYPE: String", null, null); + } + this.canvasId = canvasId; + this.keyModified.set("$canvas_id", 1); + + } + + /** + * The method to get the processFlow + * @returns {Boolean} A Boolean representing the processFlow + */ + getProcessFlow() { + return this.processFlow; + + } + + /** + * The method to set the value to processFlow + * @param {Boolean} processFlow A Boolean representing the processFlow + */ + setProcessFlow(processFlow) { + if((processFlow != null) && (!(Object.prototype.toString.call(processFlow) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: processFlow EXPECTED TYPE: Boolean", null, null); + } + this.processFlow = processFlow; + this.keyModified.set("$process_flow", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the rescheduledTime + * @returns {Date} An instance of Date + */ + getRescheduledTime() { + return this.rescheduledTime; + + } + + /** + * The method to set the value to rescheduledTime + * @param {Date} rescheduledTime An instance of Date + */ + setRescheduledTime(rescheduledTime) { + if((rescheduledTime != null) && (!(rescheduledTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: rescheduledTime EXPECTED TYPE: Date", null, null); + } + this.rescheduledTime = rescheduledTime; + this.keyModified.set("Rescheduled_Time", 1); + + } + + /** + * The method to get the ziaVisions + * @returns {Boolean} A Boolean representing the ziaVisions + */ + getZiaVisions() { + return this.ziaVisions; + + } + + /** + * The method to set the value to ziaVisions + * @param {Boolean} ziaVisions A Boolean representing the ziaVisions + */ + setZiaVisions(ziaVisions) { + if((ziaVisions != null) && (!(Object.prototype.toString.call(ziaVisions) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ziaVisions EXPECTED TYPE: Boolean", null, null); + } + this.ziaVisions = ziaVisions; + this.keyModified.set("$zia_visions", 1); + + } + + /** + * The method to get the approved + * @returns {Boolean} A Boolean representing the approved + */ + getApproved() { + return this.approved; + + } + + /** + * The method to set the value to approved + * @param {Boolean} approved A Boolean representing the approved + */ + setApproved(approved) { + if((approved != null) && (!(Object.prototype.toString.call(approved) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: approved EXPECTED TYPE: Boolean", null, null); + } + this.approved = approved; + this.keyModified.set("$approved", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("Modified_Time", 1); + + } + + /** + * The method to get the approval + * @returns {Approval} An instance of Approval + */ + getApproval() { + return this.approval; + + } + + /** + * The method to set the value to approval + * @param {Approval} approval An instance of Approval + */ + async setApproval(approval) { + const Approval = (await (import("./approval.js"))).MasterModel; + if((approval != null) && (!(approval instanceof Approval))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: approval EXPECTED TYPE: Approval", null, null); + } + this.approval = approval; + this.keyModified.set("$approval", 1); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("Created_Time", 1); + + } + + /** + * The method to get the rescheduledFrom + * @returns {Date} An instance of Date + */ + getRescheduledFrom() { + return this.rescheduledFrom; + + } + + /** + * The method to set the value to rescheduledFrom + * @param {Date} rescheduledFrom An instance of Date + */ + setRescheduledFrom(rescheduledFrom) { + if((rescheduledFrom != null) && (!(rescheduledFrom instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: rescheduledFrom EXPECTED TYPE: Date", null, null); + } + this.rescheduledFrom = rescheduledFrom; + this.keyModified.set("Rescheduled_From", 1); + + } + + /** + * The method to get the appointmentName + * @returns {AppointmentName} An instance of AppointmentName + */ + getAppointmentName() { + return this.appointmentName; + + } + + /** + * The method to set the value to appointmentName + * @param {AppointmentName} appointmentName An instance of AppointmentName + */ + async setAppointmentName(appointmentName) { + const AppointmentName = (await (import("./appointment_name.js"))).MasterModel; + if((appointmentName != null) && (!(appointmentName instanceof AppointmentName))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: appointmentName EXPECTED TYPE: AppointmentName", null, null); + } + this.appointmentName = appointmentName; + this.keyModified.set("Appointment_Name", 1); + + } + + /** + * The method to get the editable + * @returns {Boolean} A Boolean representing the editable + */ + getEditable() { + return this.editable; + + } + + /** + * The method to set the value to editable + * @param {Boolean} editable A Boolean representing the editable + */ + setEditable(editable) { + if((editable != null) && (!(Object.prototype.toString.call(editable) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: editable EXPECTED TYPE: Boolean", null, null); + } + this.editable = editable; + this.keyModified.set("$editable", 1); + + } + + /** + * The method to get the orchestration + * @returns {Boolean} A Boolean representing the orchestration + */ + getOrchestration() { + return this.orchestration; + + } + + /** + * The method to set the value to orchestration + * @param {Boolean} orchestration A Boolean representing the orchestration + */ + setOrchestration(orchestration) { + if((orchestration != null) && (!(Object.prototype.toString.call(orchestration) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: orchestration EXPECTED TYPE: Boolean", null, null); + } + this.orchestration = orchestration; + this.keyModified.set("$orchestration", 1); + + } + + /** + * The method to get the inMerge + * @returns {Boolean} A Boolean representing the inMerge + */ + getInMerge() { + return this.inMerge; + + } + + /** + * The method to set the value to inMerge + * @param {Boolean} inMerge A Boolean representing the inMerge + */ + setInMerge(inMerge) { + if((inMerge != null) && (!(Object.prototype.toString.call(inMerge) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: inMerge EXPECTED TYPE: Boolean", null, null); + } + this.inMerge = inMerge; + this.keyModified.set("$in_merge", 1); + + } + + /** + * The method to get the createdBy + * @returns {User} An instance of User + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {User} createdBy An instance of User + */ + async setCreatedBy(createdBy) { + const User = (await (import("./user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof User))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: User", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("Created_By", 1); + + } + + /** + * The method to get the approvalState + * @returns {String} A String representing the approvalState + */ + getApprovalState() { + return this.approvalState; + + } + + /** + * The method to set the value to approvalState + * @param {String} approvalState A String representing the approvalState + */ + setApprovalState(approvalState) { + if((approvalState != null) && (!(Object.prototype.toString.call(approvalState) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: approvalState EXPECTED TYPE: String", null, null); + } + this.approvalState = approvalState; + this.keyModified.set("$approval_state", 1); + + } + + /** + * The method to get the rescheduleNote + * @returns {String} A String representing the rescheduleNote + */ + getRescheduleNote() { + return this.rescheduleNote; + + } + + /** + * The method to set the value to rescheduleNote + * @param {String} rescheduleNote A String representing the rescheduleNote + */ + setRescheduleNote(rescheduleNote) { + if((rescheduleNote != null) && (!(Object.prototype.toString.call(rescheduleNote) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: rescheduleNote EXPECTED TYPE: String", null, null); + } + this.rescheduleNote = rescheduleNote; + this.keyModified.set("Reschedule_Note", 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 { + RescheduleHistory as MasterModel, + RescheduleHistory as RescheduleHistory +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/reschedule_history_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/reschedule_history_operations.js new file mode 100644 index 0000000..a3fde25 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/reschedule_history_operations.js @@ -0,0 +1,186 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 RescheduleHistoryOperations{ + /** + * The method to add appointments rescheduled history + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async addAppointmentsRescheduledHistory(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Appointments_Rescheduled_History__s"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update appointments rescheduled history + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateAppointmentsRescheduledHistory(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Appointments_Rescheduled_History__s"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get appointments rescheduled history + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getAppointmentsRescheduledHistory(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Appointments_Rescheduled_History__s"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to update appointment rescheduled history + * @param {BigInt} id A BigInt representing the id + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateAppointmentRescheduledHistory(id, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Appointments_Rescheduled_History__s/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get appointment rescheduled history + * @param {BigInt} id A BigInt representing the id + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getAppointmentRescheduledHistory(id, paramInstance=null) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Appointments_Rescheduled_History__s/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to delete appointments rescheduled history + * @param {BigInt} id A BigInt representing the id + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteAppointmentsRescheduledHistory(id) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/Appointments_Rescheduled_History__s/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class GetAppointmentsRescheduledHistoryParam{ + + static FIELDS = new Param("fields", "com.zoho.crm.api.RescheduleHistory.GetAppointmentsRescheduledHistoryParam"); + static PAGE = new Param("page", "com.zoho.crm.api.RescheduleHistory.GetAppointmentsRescheduledHistoryParam"); + static PER_PAGE = new Param("per_page", "com.zoho.crm.api.RescheduleHistory.GetAppointmentsRescheduledHistoryParam"); + static SORT_ORDER = new Param("sort_order", "com.zoho.crm.api.RescheduleHistory.GetAppointmentsRescheduledHistoryParam"); + static SORT_BY = new Param("sort_by", "com.zoho.crm.api.RescheduleHistory.GetAppointmentsRescheduledHistoryParam"); +} + +class GetAppointmentRescheduledHistoryParam{ + + static FIELDS = new Param("fields", "com.zoho.crm.api.RescheduleHistory.GetAppointmentRescheduledHistoryParam"); +} + +export { + RescheduleHistoryOperations as MasterModel, + RescheduleHistoryOperations as RescheduleHistoryOperations, + GetAppointmentsRescheduledHistoryParam as GetAppointmentsRescheduledHistoryParam, + GetAppointmentRescheduledHistoryParam as GetAppointmentRescheduledHistoryParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/response_wrapper.js new file mode 100644 index 0000000..230c981 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/response_wrapper.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + data; + info; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 1); + + } + + /** + * The method to get the info + * @returns {Array} An Array representing the info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Array} info An Array representing the info + */ + setInfo(info) { + if((info != null) && (!(Object.prototype.toString.call(info) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Array", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/success_response.js new file mode 100644 index 0000000..a5f6165 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/user.js b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/user.js new file mode 100644 index 0000000..578603e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/reschedule_history/user.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class User{ + + name; + id; + email; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the email + * @returns {String} A String representing the email + */ + getEmail() { + return this.email; + + } + + /** + * The method to set the value to email + * @param {String} email A String representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: String", null, null); + } + this.email = email; + this.keyModified.set("email", 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 { + User as MasterModel, + User as User +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/roles/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/roles/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/roles/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/action_wrapper.js new file mode 100644 index 0000000..e6fdd7f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + roles; + keyModified = new Map(); + /** + * The method to get the roles + * @returns {Array} An Array representing the roles + */ + getRoles() { + return this.roles; + + } + + /** + * The method to set the value to roles + * @param {Array} roles An Array representing the roles + */ + setRoles(roles) { + if((roles != null) && (!(Object.prototype.toString.call(roles) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: roles EXPECTED TYPE: Array", null, null); + } + this.roles = roles; + this.keyModified.set("roles", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/roles/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/api_exception.js new file mode 100644 index 0000000..db2d361 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/roles/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/body_wrapper.js new file mode 100644 index 0000000..635e45b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + roles; + keyModified = new Map(); + /** + * The method to get the roles + * @returns {Array} An Array representing the roles + */ + getRoles() { + return this.roles; + + } + + /** + * The method to set the value to roles + * @param {Array} roles An Array representing the roles + */ + setRoles(roles) { + if((roles != null) && (!(Object.prototype.toString.call(roles) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: roles EXPECTED TYPE: Array", null, null); + } + this.roles = roles; + this.keyModified.set("roles", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/roles/import_roles.js b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/import_roles.js new file mode 100644 index 0000000..2752fe6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/import_roles.js @@ -0,0 +1,12 @@ +export { RolesOperations } from "./roles_operations.js"; +export { DeleteRoleParam } from "./roles_operations.js"; +export { APIException } from "./api_exception.js"; +export * as ActionResponse from "./action_response.js"; +export * as ResponseHandler from "./response_handler.js"; +export { Role } from "./role.js"; +export * as ActionHandler from "./action_handler.js"; +export { ReportingTo } from "./reporting_to.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { SuccessResponse } from "./success_response.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/roles/reporting_to.js b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/reporting_to.js new file mode 100644 index 0000000..6854bd3 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/reporting_to.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ReportingTo{ + + id; + name; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + ReportingTo as MasterModel, + ReportingTo as ReportingTo +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/roles/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/roles/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/response_wrapper.js new file mode 100644 index 0000000..b4e7635 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + roles; + keyModified = new Map(); + /** + * The method to get the roles + * @returns {Array} An Array representing the roles + */ + getRoles() { + return this.roles; + + } + + /** + * The method to set the value to roles + * @param {Array} roles An Array representing the roles + */ + setRoles(roles) { + if((roles != null) && (!(Object.prototype.toString.call(roles) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: roles EXPECTED TYPE: Array", null, null); + } + this.roles = roles; + this.keyModified.set("roles", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/roles/role.js b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/role.js new file mode 100644 index 0000000..a56ae7c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/role.js @@ -0,0 +1,323 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Role{ + + displayLabel; + forecastManager; + reportingTo; + shareWithPeers; + description; + id; + name; + createdByS; + modifiedByS; + modifiedTimeS; + createdTimeS; + adminUser; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the forecastManager + * @returns {ReportingTo} An instance of ReportingTo + */ + getForecastManager() { + return this.forecastManager; + + } + + /** + * The method to set the value to forecastManager + * @param {ReportingTo} forecastManager An instance of ReportingTo + */ + async setForecastManager(forecastManager) { + const ReportingTo = (await (import("./reporting_to.js"))).MasterModel; + if((forecastManager != null) && (!(forecastManager instanceof ReportingTo))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: forecastManager EXPECTED TYPE: ReportingTo", null, null); + } + this.forecastManager = forecastManager; + this.keyModified.set("forecast_manager", 1); + + } + + /** + * The method to get the reportingTo + * @returns {ReportingTo} An instance of ReportingTo + */ + getReportingTo() { + return this.reportingTo; + + } + + /** + * The method to set the value to reportingTo + * @param {ReportingTo} reportingTo An instance of ReportingTo + */ + async setReportingTo(reportingTo) { + const ReportingTo = (await (import("./reporting_to.js"))).MasterModel; + if((reportingTo != null) && (!(reportingTo instanceof ReportingTo))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: reportingTo EXPECTED TYPE: ReportingTo", null, null); + } + this.reportingTo = reportingTo; + this.keyModified.set("reporting_to", 1); + + } + + /** + * The method to get the shareWithPeers + * @returns {Boolean} A Boolean representing the shareWithPeers + */ + getShareWithPeers() { + return this.shareWithPeers; + + } + + /** + * The method to set the value to shareWithPeers + * @param {Boolean} shareWithPeers A Boolean representing the shareWithPeers + */ + setShareWithPeers(shareWithPeers) { + if((shareWithPeers != null) && (!(Object.prototype.toString.call(shareWithPeers) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: shareWithPeers EXPECTED TYPE: Boolean", null, null); + } + this.shareWithPeers = shareWithPeers; + this.keyModified.set("share_with_peers", 1); + + } + + /** + * The method to get the description + * @returns {String} A String representing the description + */ + getDescription() { + return this.description; + + } + + /** + * The method to set the value to description + * @param {String} description A String representing the description + */ + setDescription(description) { + if((description != null) && (!(Object.prototype.toString.call(description) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: description EXPECTED TYPE: String", null, null); + } + this.description = description; + this.keyModified.set("description", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the createdByS + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedByS() { + return this.createdByS; + + } + + /** + * The method to set the value to createdByS + * @param {MinifiedUser} createdByS An instance of MinifiedUser + */ + async setCreatedByS(createdByS) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdByS != null) && (!(createdByS instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdByS EXPECTED TYPE: MinifiedUser", null, null); + } + this.createdByS = createdByS; + this.keyModified.set("created_by__s", 1); + + } + + /** + * The method to get the modifiedByS + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedByS() { + return this.modifiedByS; + + } + + /** + * The method to set the value to modifiedByS + * @param {MinifiedUser} modifiedByS An instance of MinifiedUser + */ + async setModifiedByS(modifiedByS) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedByS != null) && (!(modifiedByS instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedByS EXPECTED TYPE: MinifiedUser", null, null); + } + this.modifiedByS = modifiedByS; + this.keyModified.set("modified_by__s", 1); + + } + + /** + * The method to get the modifiedTimeS + * @returns {Date} An instance of Date + */ + getModifiedTimeS() { + return this.modifiedTimeS; + + } + + /** + * The method to set the value to modifiedTimeS + * @param {Date} modifiedTimeS An instance of Date + */ + setModifiedTimeS(modifiedTimeS) { + if((modifiedTimeS != null) && (!(modifiedTimeS instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTimeS EXPECTED TYPE: Date", null, null); + } + this.modifiedTimeS = modifiedTimeS; + this.keyModified.set("modified_time__s", 1); + + } + + /** + * The method to get the createdTimeS + * @returns {Date} An instance of Date + */ + getCreatedTimeS() { + return this.createdTimeS; + + } + + /** + * The method to set the value to createdTimeS + * @param {Date} createdTimeS An instance of Date + */ + setCreatedTimeS(createdTimeS) { + if((createdTimeS != null) && (!(createdTimeS instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTimeS EXPECTED TYPE: Date", null, null); + } + this.createdTimeS = createdTimeS; + this.keyModified.set("created_time__s", 1); + + } + + /** + * The method to get the adminUser + * @returns {Boolean} A Boolean representing the adminUser + */ + getAdminUser() { + return this.adminUser; + + } + + /** + * The method to set the value to adminUser + * @param {Boolean} adminUser A Boolean representing the adminUser + */ + setAdminUser(adminUser) { + if((adminUser != null) && (!(Object.prototype.toString.call(adminUser) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: adminUser EXPECTED TYPE: Boolean", null, null); + } + this.adminUser = adminUser; + this.keyModified.set("admin_user", 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 { + Role as MasterModel, + Role as Role +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/roles/roles_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/roles_operations.js new file mode 100644 index 0000000..3a3a8f6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/roles_operations.js @@ -0,0 +1,172 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 RolesOperations{ + /** + * The method to get roles + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getRoles() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/roles"); + 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"); + + } + + /** + * The method to create roles + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createRoles(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/roles"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update roles + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateRoles(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/roles"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get role + * @param {BigInt} roleId A BigInt representing the roleId + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getRole(roleId) { + if((!(Object.prototype.toString.call(roleId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: roleId EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/roles/"); + apiPath = apiPath.concat(roleId.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/json"); + + } + + /** + * The method to update role + * @param {BigInt} roleId A BigInt representing the roleId + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateRole(roleId, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(roleId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: roleId EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/roles/"); + apiPath = apiPath.concat(roleId.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to deleterole + * @param {BigInt} roleId A BigInt representing the roleId + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleterole(roleId, paramInstance=null) { + if((!(Object.prototype.toString.call(roleId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: roleId EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/roles/"); + apiPath = apiPath.concat(roleId.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class DeleteRoleParam{ + + static TRANSFER_TO_ID = new Param("transfer_to_id", "com.zoho.crm.api.Roles.DeleteRoleParam"); +} + +export { + DeleteRoleParam as DeleteRoleParam, + RolesOperations as MasterModel, + RolesOperations as RolesOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/roles/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/success_response.js new file mode 100644 index 0000000..e8b71a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/roles/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/action_wrapper.js new file mode 100644 index 0000000..d76598e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + scoringRules; + keyModified = new Map(); + /** + * The method to get the scoringRules + * @returns {Array} An Array representing the scoringRules + */ + getScoringRules() { + return this.scoringRules; + + } + + /** + * The method to set the value to scoringRules + * @param {Array} scoringRules An Array representing the scoringRules + */ + setScoringRules(scoringRules) { + if((scoringRules != null) && (!(Object.prototype.toString.call(scoringRules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: scoringRules EXPECTED TYPE: Array", null, null); + } + this.scoringRules = scoringRules; + this.keyModified.set("scoring_rules", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/body_wrapper.js new file mode 100644 index 0000000..0fa7641 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + scoringRules; + keyModified = new Map(); + /** + * The method to get the scoringRules + * @returns {Array} An Array representing the scoringRules + */ + getScoringRules() { + return this.scoringRules; + + } + + /** + * The method to set the value to scoringRules + * @param {Array} scoringRules An Array representing the scoringRules + */ + setScoringRules(scoringRules) { + if((scoringRules != null) && (!(Object.prototype.toString.call(scoringRules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: scoringRules EXPECTED TYPE: Array", null, null); + } + this.scoringRules = scoringRules; + this.keyModified.set("scoring_rules", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/criteria.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/criteria.js new file mode 100644 index 0000000..22816f1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/criteria.js @@ -0,0 +1,156 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Criteria{ + + comparator; + field; + value; + groupOperator; + group; + keyModified = new Map(); + /** + * The method to get the comparator + * @returns {String} A String representing the comparator + */ + getComparator() { + return this.comparator; + + } + + /** + * The method to set the value to comparator + * @param {String} comparator A String representing the comparator + */ + setComparator(comparator) { + if((comparator != null) && (!(Object.prototype.toString.call(comparator) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: comparator EXPECTED TYPE: String", null, null); + } + this.comparator = comparator; + this.keyModified.set("comparator", 1); + + } + + /** + * The method to get the field + * @returns {Field} An instance of Field + */ + getField() { + return this.field; + + } + + /** + * The method to set the value to field + * @param {Field} field An instance of Field + */ + async setField(field) { + const Field = (await (import("./field.js"))).MasterModel; + if((field != null) && (!(field instanceof Field))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: field EXPECTED TYPE: Field", null, null); + } + this.field = field; + this.keyModified.set("field", 1); + + } + + /** + * The method to get the value + * @returns {Object} An Object representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {Object} value An Object representing the value + */ + setValue(value) { + this.value = value; + this.keyModified.set("value", 1); + + } + + /** + * The method to get the groupOperator + * @returns {String} A String representing the groupOperator + */ + getGroupOperator() { + return this.groupOperator; + + } + + /** + * The method to set the value to groupOperator + * @param {String} groupOperator A String representing the groupOperator + */ + setGroupOperator(groupOperator) { + if((groupOperator != null) && (!(Object.prototype.toString.call(groupOperator) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: groupOperator EXPECTED TYPE: String", null, null); + } + this.groupOperator = groupOperator; + this.keyModified.set("group_operator", 1); + + } + + /** + * The method to get the group + * @returns {Array} An Array representing the group + */ + getGroup() { + return this.group; + + } + + /** + * The method to set the value to group + * @param {Array} group An Array representing the group + */ + setGroup(group) { + if((group != null) && (!(Object.prototype.toString.call(group) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: group EXPECTED TYPE: Array", null, null); + } + this.group = group; + this.keyModified.set("group", 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 { + Criteria as MasterModel, + Criteria as Criteria +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/field.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/field.js new file mode 100644 index 0000000..fb4ef4e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/field.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Field{ + + apiName; + id; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Field as MasterModel, + Field as Field +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/field_rule.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/field_rule.js new file mode 100644 index 0000000..ad3f5f0 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/field_rule.js @@ -0,0 +1,113 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class FieldRule{ + + score; + criteria; + id; + keyModified = new Map(); + /** + * The method to get the score + * @returns {number} A number representing the score + */ + getScore() { + return this.score; + + } + + /** + * The method to set the value to score + * @param {number} score A number representing the score + */ + setScore(score) { + if((score != null) && (!(Object.prototype.toString.call(score) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: score EXPECTED TYPE: number", null, null); + } + this.score = score; + this.keyModified.set("score", 1); + + } + + /** + * The method to get the criteria + * @returns {Criteria} An instance of Criteria + */ + getCriteria() { + return this.criteria; + + } + + /** + * The method to set the value to criteria + * @param {Criteria} criteria An instance of Criteria + */ + async setCriteria(criteria) { + const Criteria = (await (import("./criteria.js"))).MasterModel; + if((criteria != null) && (!(criteria instanceof Criteria))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: criteria EXPECTED TYPE: Criteria", null, null); + } + this.criteria = criteria; + this.keyModified.set("criteria", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + FieldRule as MasterModel, + FieldRule as FieldRule +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/import_scoring_rules.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/import_scoring_rules.js new file mode 100644 index 0000000..2a435bb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/import_scoring_rules.js @@ -0,0 +1,22 @@ +export { ActionWrapper } from "./action_wrapper.js"; +export { Criteria } from "./criteria.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { Layout } from "./layout.js"; +export * as ActionResponse from "./action_response.js"; +export { ScoringRule } from "./scoring_rule.js"; +export { SuccessResponse } from "./success_response.js"; +export * as ActionHandler from "./action_handler.js"; +export * as ResponseHandler from "./response_handler.js"; +export { LayoutRequestWrapper } from "./layout_request_wrapper.js"; +export { Field } from "./field.js"; +export { Signal } from "./signal.js"; +export { APIException } from "./api_exception.js"; +export { RoleRequestWrapper } from "./role_request_wrapper.js"; +export { Info } from "./info.js"; +export { SignalRule } from "./signal_rule.js"; +export { FieldRule } from "./field_rule.js"; +export { ScoringRulesOperations } from "./scoring_rules_operations.js"; +export { GetScoringRulesParam } from "./scoring_rules_operations.js"; +export { DeleteScoringRulesParam } from "./scoring_rules_operations.js"; +export { GetScoringRuleParam } from "./scoring_rules_operations.js"; +export { ResponseWrapper } from "./response_wrapper.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/info.js new file mode 100644 index 0000000..6a93b06 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/info.js @@ -0,0 +1,250 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + call; + perPage; + nextPageToken; + count; + page; + previousPageToken; + pageTokenExpiry; + email; + moreRecords; + keyModified = new Map(); + /** + * The method to get the call + * @returns {Boolean} A Boolean representing the call + */ + getCall() { + return this.call; + + } + + /** + * The method to set the value to call + * @param {Boolean} call A Boolean representing the call + */ + setCall(call) { + if((call != null) && (!(Object.prototype.toString.call(call) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: call EXPECTED TYPE: Boolean", null, null); + } + this.call = call; + this.keyModified.set("call", 1); + + } + + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the nextPageToken + * @returns {String} A String representing the nextPageToken + */ + getNextPageToken() { + return this.nextPageToken; + + } + + /** + * The method to set the value to nextPageToken + * @param {String} nextPageToken A String representing the nextPageToken + */ + setNextPageToken(nextPageToken) { + if((nextPageToken != null) && (!(Object.prototype.toString.call(nextPageToken) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: nextPageToken EXPECTED TYPE: String", null, null); + } + this.nextPageToken = nextPageToken; + this.keyModified.set("next_page_token", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the previousPageToken + * @returns {String} A String representing the previousPageToken + */ + getPreviousPageToken() { + return this.previousPageToken; + + } + + /** + * The method to set the value to previousPageToken + * @param {String} previousPageToken A String representing the previousPageToken + */ + setPreviousPageToken(previousPageToken) { + if((previousPageToken != null) && (!(Object.prototype.toString.call(previousPageToken) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: previousPageToken EXPECTED TYPE: String", null, null); + } + this.previousPageToken = previousPageToken; + this.keyModified.set("previous_page_token", 1); + + } + + /** + * The method to get the pageTokenExpiry + * @returns {Date} An instance of Date + */ + getPageTokenExpiry() { + return this.pageTokenExpiry; + + } + + /** + * The method to set the value to pageTokenExpiry + * @param {Date} pageTokenExpiry An instance of Date + */ + setPageTokenExpiry(pageTokenExpiry) { + if((pageTokenExpiry != null) && (!(pageTokenExpiry instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pageTokenExpiry EXPECTED TYPE: Date", null, null); + } + this.pageTokenExpiry = pageTokenExpiry; + this.keyModified.set("page_token_expiry", 1); + + } + + /** + * The method to get the email + * @returns {Boolean} A Boolean representing the email + */ + getEmail() { + return this.email; + + } + + /** + * The method to set the value to email + * @param {Boolean} email A Boolean representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: Boolean", null, null); + } + this.email = email; + this.keyModified.set("email", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/layout.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/layout.js new file mode 100644 index 0000000..3a834a9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/layout.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Layout{ + + id; + apiName; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 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 { + Layout as MasterModel, + Layout as Layout +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/layout_request_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/layout_request_wrapper.js new file mode 100644 index 0000000..8f69124 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/layout_request_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class LayoutRequestWrapper{ + + layout; + keyModified = new Map(); + /** + * The method to get the layout + * @returns {Layout} An instance of Layout + */ + getLayout() { + return this.layout; + + } + + /** + * The method to set the value to layout + * @param {Layout} layout An instance of Layout + */ + async setLayout(layout) { + const Layout = (await (import("./layout.js"))).MasterModel; + if((layout != null) && (!(layout instanceof Layout))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: layout EXPECTED TYPE: Layout", null, null); + } + this.layout = layout; + this.keyModified.set("layout", 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 { + LayoutRequestWrapper as MasterModel, + LayoutRequestWrapper as LayoutRequestWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/response_wrapper.js new file mode 100644 index 0000000..4431a1d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + scoringRules; + info; + keyModified = new Map(); + /** + * The method to get the scoringRules + * @returns {Array} An Array representing the scoringRules + */ + getScoringRules() { + return this.scoringRules; + + } + + /** + * The method to set the value to scoringRules + * @param {Array} scoringRules An Array representing the scoringRules + */ + setScoringRules(scoringRules) { + if((scoringRules != null) && (!(Object.prototype.toString.call(scoringRules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: scoringRules EXPECTED TYPE: Array", null, null); + } + this.scoringRules = scoringRules; + this.keyModified.set("scoring_rules", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/role_request_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/role_request_wrapper.js new file mode 100644 index 0000000..b47856a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/role_request_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RoleRequestWrapper{ + + scoringRules; + keyModified = new Map(); + /** + * The method to get the scoringRules + * @returns {Array} An Array representing the scoringRules + */ + getScoringRules() { + return this.scoringRules; + + } + + /** + * The method to set the value to scoringRules + * @param {Array} scoringRules An Array representing the scoringRules + */ + setScoringRules(scoringRules) { + if((scoringRules != null) && (!(Object.prototype.toString.call(scoringRules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: scoringRules EXPECTED TYPE: Array", null, null); + } + this.scoringRules = scoringRules; + this.keyModified.set("scoring_rules", 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 { + RoleRequestWrapper as MasterModel, + RoleRequestWrapper as RoleRequestWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/scoring_rule.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/scoring_rule.js new file mode 100644 index 0000000..ad7e963 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/scoring_rule.js @@ -0,0 +1,323 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ScoringRule{ + + name; + description; + id; + layout; + createdTime; + modifiedTime; + module; + modifiedBy; + active; + createdBy; + fieldRules; + signalRules; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the description + * @returns {String} A String representing the description + */ + getDescription() { + return this.description; + + } + + /** + * The method to set the value to description + * @param {String} description A String representing the description + */ + setDescription(description) { + if((description != null) && (!(Object.prototype.toString.call(description) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: description EXPECTED TYPE: String", null, null); + } + this.description = description; + this.keyModified.set("description", 1); + + } + + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the layout + * @returns {Layout} An instance of Layout + */ + getLayout() { + return this.layout; + + } + + /** + * The method to set the value to layout + * @param {Layout} layout An instance of Layout + */ + async setLayout(layout) { + const Layout = (await (import("./layout.js"))).MasterModel; + if((layout != null) && (!(layout instanceof Layout))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: layout EXPECTED TYPE: Layout", null, null); + } + this.layout = layout; + this.keyModified.set("layout", 1); + + } + + /** + * The method to get the createdTime + * @returns {String} A String representing the createdTime + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {String} createdTime A String representing the createdTime + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(Object.prototype.toString.call(createdTime) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: String", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {String} A String representing the modifiedTime + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {String} modifiedTime A String representing the modifiedTime + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(Object.prototype.toString.call(modifiedTime) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: String", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the module + * @returns {Modules} An instance of Modules + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {Modules} module An instance of Modules + */ + async setModule(module) { + const Modules = (await (import("../modules/modules.js"))).MasterModel; + if((module != null) && (!(module instanceof Modules))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: Modules", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("modified_by", 1); + + } + + /** + * The method to get the active + * @returns {Boolean} A Boolean representing the active + */ + getActive() { + return this.active; + + } + + /** + * The method to set the value to active + * @param {Boolean} active A Boolean representing the active + */ + setActive(active) { + if((active != null) && (!(Object.prototype.toString.call(active) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: active EXPECTED TYPE: Boolean", null, null); + } + this.active = active; + this.keyModified.set("active", 1); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 1); + + } + + /** + * The method to get the fieldRules + * @returns {Array} An Array representing the fieldRules + */ + getFieldRules() { + return this.fieldRules; + + } + + /** + * The method to set the value to fieldRules + * @param {Array} fieldRules An Array representing the fieldRules + */ + setFieldRules(fieldRules) { + if((fieldRules != null) && (!(Object.prototype.toString.call(fieldRules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldRules EXPECTED TYPE: Array", null, null); + } + this.fieldRules = fieldRules; + this.keyModified.set("field_rules", 1); + + } + + /** + * The method to get the signalRules + * @returns {Array} An Array representing the signalRules + */ + getSignalRules() { + return this.signalRules; + + } + + /** + * The method to set the value to signalRules + * @param {Array} signalRules An Array representing the signalRules + */ + setSignalRules(signalRules) { + if((signalRules != null) && (!(Object.prototype.toString.call(signalRules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: signalRules EXPECTED TYPE: Array", null, null); + } + this.signalRules = signalRules; + this.keyModified.set("signal_rules", 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 { + ScoringRule as MasterModel, + ScoringRule as ScoringRule +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/scoring_rules_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/scoring_rules_operations.js new file mode 100644 index 0000000..0591d5e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/scoring_rules_operations.js @@ -0,0 +1,356 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 ScoringRulesOperations{ + /** + * The method to create scoring rules + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createScoringRules(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/automation/scoring_rules"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get scoring rules + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getScoringRules(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/automation/scoring_rules"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to update scoring rules + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateScoringRules(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/automation/scoring_rules"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete scoring rules + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteScoringRules(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/automation/scoring_rules"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update scoring rule + * @param {BigInt} id A BigInt representing the id + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateScoringRule(id, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/automation/scoring_rules/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get scoring rule + * @param {String} module A String representing the module + * @param {BigInt} id A BigInt representing the id + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getScoringRule(module, id, paramInstance=null) { + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/automation/scoring_rules/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to delete scoring rule + * @param {BigInt} id A BigInt representing the id + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteScoringRule(id) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/automation/scoring_rules/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to activate scoring rule + * @param {BigInt} id A BigInt representing the id + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async activateScoringRule(id) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/automation/scoring_rules/"); + apiPath = apiPath.concat(id.toString()); + apiPath = apiPath.concat("/actions/activate"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to deactivate scoring rule + * @param {BigInt} id A BigInt representing the id + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deactivateScoringRule(id) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/automation/scoring_rules/"); + apiPath = apiPath.concat(id.toString()); + apiPath = apiPath.concat("/actions/activate"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to clone scoring rule + * @param {BigInt} id A BigInt representing the id + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async cloneScoringRule(id) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/automation/scoring_rules/"); + apiPath = apiPath.concat(id.toString()); + apiPath = apiPath.concat("/actions/clone"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to scoring rule execution using layout id + * @param {String} module A String representing the module + * @param {LayoutRequestWrapper} request An instance of LayoutRequestWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async scoringRuleExecutionUsingLayoutId(module, request) { + const LayoutRequestWrapper = (await (import("./layout_request_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof LayoutRequestWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: LayoutRequestWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/actions/run_scoring_rules"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to scoring rule execution using rule ids + * @param {String} module A String representing the module + * @param {RoleRequestWrapper} request An instance of RoleRequestWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async scoringRuleExecutionUsingRuleIds(module, request) { + const RoleRequestWrapper = (await (import("./role_request_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof RoleRequestWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: RoleRequestWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/actions/run_scoring_rules"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class GetScoringRulesParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.ScoringRules.GetScoringRulesParam"); + static LAYOUT_ID = new Param("layout_id", "com.zoho.crm.api.ScoringRules.GetScoringRulesParam"); + static ACTIVE = new Param("active", "com.zoho.crm.api.ScoringRules.GetScoringRulesParam"); + static NAME = new Param("name", "com.zoho.crm.api.ScoringRules.GetScoringRulesParam"); + static PAGE = new Param("page", "com.zoho.crm.api.ScoringRules.GetScoringRulesParam"); + static PER_PAGE = new Param("per_page", "com.zoho.crm.api.ScoringRules.GetScoringRulesParam"); +} + +class DeleteScoringRulesParam{ + + static IDS = new Param("ids", "com.zoho.crm.api.ScoringRules.DeleteScoringRulesParam"); +} + +class GetScoringRuleParam{ + + static LAYOUT_ID = new Param("layout_id", "com.zoho.crm.api.ScoringRules.GetScoringRuleParam"); + static ACTIVE = new Param("active", "com.zoho.crm.api.ScoringRules.GetScoringRuleParam"); + static NAME = new Param("name", "com.zoho.crm.api.ScoringRules.GetScoringRuleParam"); +} + +export { + ScoringRulesOperations as MasterModel, + ScoringRulesOperations as ScoringRulesOperations, + DeleteScoringRulesParam as DeleteScoringRulesParam, + GetScoringRuleParam as GetScoringRuleParam, + GetScoringRulesParam as GetScoringRulesParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/signal.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/signal.js new file mode 100644 index 0000000..a0a4212 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/signal.js @@ -0,0 +1,90 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Signal{ + + namespace; + id; + keyModified = new Map(); + /** + * The method to get the namespace + * @returns {Choice} An instance of Choice + */ + getNamespace() { + return this.namespace; + + } + + /** + * The method to set the value to namespace + * @param {Choice} namespace An instance of Choice + */ + setNamespace(namespace) { + if((namespace != null) && (!(namespace instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: namespace EXPECTED TYPE: Choice", null, null); + } + this.namespace = namespace; + this.keyModified.set("namespace", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Signal as MasterModel, + Signal as Signal +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/signal_rule.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/signal_rule.js new file mode 100644 index 0000000..bbd712e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/signal_rule.js @@ -0,0 +1,113 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SignalRule{ + + score; + signal; + id; + keyModified = new Map(); + /** + * The method to get the score + * @returns {number} A number representing the score + */ + getScore() { + return this.score; + + } + + /** + * The method to set the value to score + * @param {number} score A number representing the score + */ + setScore(score) { + if((score != null) && (!(Object.prototype.toString.call(score) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: score EXPECTED TYPE: number", null, null); + } + this.score = score; + this.keyModified.set("score", 1); + + } + + /** + * The method to get the signal + * @returns {Signal} An instance of Signal + */ + getSignal() { + return this.signal; + + } + + /** + * The method to set the value to signal + * @param {Signal} signal An instance of Signal + */ + async setSignal(signal) { + const Signal = (await (import("./signal.js"))).MasterModel; + if((signal != null) && (!(signal instanceof Signal))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: signal EXPECTED TYPE: Signal", null, null); + } + this.signal = signal; + this.keyModified.set("signal", 1); + + } + + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + SignalRule as MasterModel, + SignalRule as SignalRule +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/success_response.js new file mode 100644 index 0000000..39525ad --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/scoring_rules/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/action_wrapper.js new file mode 100644 index 0000000..6996d19 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/api_exception.js new file mode 100644 index 0000000..35d7ece --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + details; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/attachment.js b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/attachment.js new file mode 100644 index 0000000..9d60bc3 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/attachment.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Attachment{ + + id; + keyModified = new Map(); + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Attachment as MasterModel, + Attachment as Attachment +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/body_wrapper.js new file mode 100644 index 0000000..3b80d06 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + data; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/data.js b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/data.js new file mode 100644 index 0000000..73c8bc1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/data.js @@ -0,0 +1,413 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Data{ + + from; + to; + cc; + bcc; + replyTo; + orgEmail; + scheduledTime; + mailFormat; + consentEmail; + content; + subject; + inReplyTo; + template; + inventoryDetails; + dataSubjectRequest; + attachments; + keyModified = new Map(); + /** + * The method to get the from + * @returns {From} An instance of From + */ + getFrom() { + return this.from; + + } + + /** + * The method to set the value to from + * @param {From} from An instance of From + */ + async setFrom(from) { + const From = (await (import("./from.js"))).MasterModel; + if((from != null) && (!(from instanceof From))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: from EXPECTED TYPE: From", null, null); + } + this.from = from; + this.keyModified.set("from", 1); + + } + + /** + * The method to get the to + * @returns {Array} An Array representing the to + */ + getTo() { + return this.to; + + } + + /** + * The method to set the value to to + * @param {Array} to An Array representing the to + */ + setTo(to) { + if((to != null) && (!(Object.prototype.toString.call(to) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: to EXPECTED TYPE: Array", null, null); + } + this.to = to; + this.keyModified.set("to", 1); + + } + + /** + * The method to get the cc + * @returns {Array} An Array representing the cc + */ + getCc() { + return this.cc; + + } + + /** + * The method to set the value to cc + * @param {Array} cc An Array representing the cc + */ + setCc(cc) { + if((cc != null) && (!(Object.prototype.toString.call(cc) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: cc EXPECTED TYPE: Array", null, null); + } + this.cc = cc; + this.keyModified.set("cc", 1); + + } + + /** + * The method to get the bcc + * @returns {Array} An Array representing the bcc + */ + getBcc() { + return this.bcc; + + } + + /** + * The method to set the value to bcc + * @param {Array} bcc An Array representing the bcc + */ + setBcc(bcc) { + if((bcc != null) && (!(Object.prototype.toString.call(bcc) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: bcc EXPECTED TYPE: Array", null, null); + } + this.bcc = bcc; + this.keyModified.set("bcc", 1); + + } + + /** + * The method to get the replyTo + * @returns {To} An instance of To + */ + getReplyTo() { + return this.replyTo; + + } + + /** + * The method to set the value to replyTo + * @param {To} replyTo An instance of To + */ + async setReplyTo(replyTo) { + const To = (await (import("./to.js"))).MasterModel; + if((replyTo != null) && (!(replyTo instanceof To))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: replyTo EXPECTED TYPE: To", null, null); + } + this.replyTo = replyTo; + this.keyModified.set("reply_to", 1); + + } + + /** + * The method to get the orgEmail + * @returns {Boolean} A Boolean representing the orgEmail + */ + getOrgEmail() { + return this.orgEmail; + + } + + /** + * The method to set the value to orgEmail + * @param {Boolean} orgEmail A Boolean representing the orgEmail + */ + setOrgEmail(orgEmail) { + if((orgEmail != null) && (!(Object.prototype.toString.call(orgEmail) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: orgEmail EXPECTED TYPE: Boolean", null, null); + } + this.orgEmail = orgEmail; + this.keyModified.set("org_email", 1); + + } + + /** + * The method to get the scheduledTime + * @returns {Date} An instance of Date + */ + getScheduledTime() { + return this.scheduledTime; + + } + + /** + * The method to set the value to scheduledTime + * @param {Date} scheduledTime An instance of Date + */ + setScheduledTime(scheduledTime) { + if((scheduledTime != null) && (!(scheduledTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: scheduledTime EXPECTED TYPE: Date", null, null); + } + this.scheduledTime = scheduledTime; + this.keyModified.set("scheduled_time", 1); + + } + + /** + * The method to get the mailFormat + * @returns {Choice} An instance of Choice + */ + getMailFormat() { + return this.mailFormat; + + } + + /** + * The method to set the value to mailFormat + * @param {Choice} mailFormat An instance of Choice + */ + setMailFormat(mailFormat) { + if((mailFormat != null) && (!(mailFormat instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: mailFormat EXPECTED TYPE: Choice", null, null); + } + this.mailFormat = mailFormat; + this.keyModified.set("mail_format", 1); + + } + + /** + * The method to get the consentEmail + * @returns {Boolean} A Boolean representing the consentEmail + */ + getConsentEmail() { + return this.consentEmail; + + } + + /** + * The method to set the value to consentEmail + * @param {Boolean} consentEmail A Boolean representing the consentEmail + */ + setConsentEmail(consentEmail) { + if((consentEmail != null) && (!(Object.prototype.toString.call(consentEmail) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: consentEmail EXPECTED TYPE: Boolean", null, null); + } + this.consentEmail = consentEmail; + this.keyModified.set("consent_email", 1); + + } + + /** + * The method to get the content + * @returns {String} A String representing the content + */ + getContent() { + return this.content; + + } + + /** + * The method to set the value to content + * @param {String} content A String representing the content + */ + setContent(content) { + if((content != null) && (!(Object.prototype.toString.call(content) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: content EXPECTED TYPE: String", null, null); + } + this.content = content; + this.keyModified.set("content", 1); + + } + + /** + * The method to get the subject + * @returns {String} A String representing the subject + */ + getSubject() { + return this.subject; + + } + + /** + * The method to set the value to subject + * @param {String} subject A String representing the subject + */ + setSubject(subject) { + if((subject != null) && (!(Object.prototype.toString.call(subject) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subject EXPECTED TYPE: String", null, null); + } + this.subject = subject; + this.keyModified.set("subject", 1); + + } + + /** + * The method to get the inReplyTo + * @returns {String} A String representing the inReplyTo + */ + getInReplyTo() { + return this.inReplyTo; + + } + + /** + * The method to set the value to inReplyTo + * @param {String} inReplyTo A String representing the inReplyTo + */ + setInReplyTo(inReplyTo) { + if((inReplyTo != null) && (!(Object.prototype.toString.call(inReplyTo) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: inReplyTo EXPECTED TYPE: String", null, null); + } + this.inReplyTo = inReplyTo; + this.keyModified.set("in_reply_to", 1); + + } + + /** + * The method to get the template + * @returns {Template} An instance of Template + */ + getTemplate() { + return this.template; + + } + + /** + * The method to set the value to template + * @param {Template} template An instance of Template + */ + setTemplate(template) { + this.template = template; + this.keyModified.set("template", 1); + + } + + /** + * The method to get the inventoryDetails + * @returns {InventoryDetails} An instance of InventoryDetails + */ + getInventoryDetails() { + return this.inventoryDetails; + + } + + /** + * The method to set the value to inventoryDetails + * @param {InventoryDetails} inventoryDetails An instance of InventoryDetails + */ + async setInventoryDetails(inventoryDetails) { + const InventoryDetails = (await (import("./inventory_details.js"))).MasterModel; + if((inventoryDetails != null) && (!(inventoryDetails instanceof InventoryDetails))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: inventoryDetails EXPECTED TYPE: InventoryDetails", null, null); + } + this.inventoryDetails = inventoryDetails; + this.keyModified.set("inventory_details", 1); + + } + + /** + * The method to get the dataSubjectRequest + * @returns {DataSubjectRequest} An instance of DataSubjectRequest + */ + getDataSubjectRequest() { + return this.dataSubjectRequest; + + } + + /** + * The method to set the value to dataSubjectRequest + * @param {DataSubjectRequest} dataSubjectRequest An instance of DataSubjectRequest + */ + async setDataSubjectRequest(dataSubjectRequest) { + const DataSubjectRequest = (await (import("./data_subject_request.js"))).MasterModel; + if((dataSubjectRequest != null) && (!(dataSubjectRequest instanceof DataSubjectRequest))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dataSubjectRequest EXPECTED TYPE: DataSubjectRequest", null, null); + } + this.dataSubjectRequest = dataSubjectRequest; + this.keyModified.set("data_subject_request", 1); + + } + + /** + * The method to get the attachments + * @returns {Array} An Array representing the attachments + */ + getAttachments() { + return this.attachments; + + } + + /** + * The method to set the value to attachments + * @param {Array} attachments An Array representing the attachments + */ + setAttachments(attachments) { + if((attachments != null) && (!(Object.prototype.toString.call(attachments) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: attachments EXPECTED TYPE: Array", null, null); + } + this.attachments = attachments; + this.keyModified.set("attachments", 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 { + Data as MasterModel, + Data as Data +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/data_subject_request.js b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/data_subject_request.js new file mode 100644 index 0000000..0900368 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/data_subject_request.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DataSubjectRequest{ + + id; + type; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 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 { + DataSubjectRequest as MasterModel, + DataSubjectRequest as DataSubjectRequest +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/from.js b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/from.js new file mode 100644 index 0000000..3688ed6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/from.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class From{ + + userName; + email; + keyModified = new Map(); + /** + * The method to get the userName + * @returns {String} A String representing the userName + */ + getUserName() { + return this.userName; + + } + + /** + * The method to set the value to userName + * @param {String} userName A String representing the userName + */ + setUserName(userName) { + if((userName != null) && (!(Object.prototype.toString.call(userName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: userName EXPECTED TYPE: String", null, null); + } + this.userName = userName; + this.keyModified.set("user_name", 1); + + } + + /** + * The method to get the email + * @returns {String} A String representing the email + */ + getEmail() { + return this.email; + + } + + /** + * The method to set the value to email + * @param {String} email A String representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: String", null, null); + } + this.email = email; + this.keyModified.set("email", 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 { + From as MasterModel, + From as From +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/import_send_mail.js b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/import_send_mail.js new file mode 100644 index 0000000..d40c3c4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/import_send_mail.js @@ -0,0 +1,16 @@ +export * as ActionResponse from "./action_response.js"; +export { From } from "./from.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export * as ActionHandler from "./action_handler.js"; +export { DataSubjectRequest } from "./data_subject_request.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { SuccessResponse } from "./success_response.js"; +export { InventoryTemplate } from "./inventory_template.js"; +export { InventoryDetails } from "./inventory_details.js"; +export { Attachment } from "./attachment.js"; +export { SendMailOperations } from "./send_mail_operations.js"; +export { Data } from "./data.js"; +export { InvalidDetails } from "./invalid_details.js"; +export { To } from "./to.js"; +export { APIException } from "./api_exception.js"; +export * as Template from "./template.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/invalid_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/invalid_details.js new file mode 100644 index 0000000..b4d56a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/invalid_details.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class InvalidDetails{ + + apiName; + jsonPath; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the jsonPath + * @returns {String} A String representing the jsonPath + */ + getJsonPath() { + return this.jsonPath; + + } + + /** + * The method to set the value to jsonPath + * @param {String} jsonPath A String representing the jsonPath + */ + setJsonPath(jsonPath) { + if((jsonPath != null) && (!(Object.prototype.toString.call(jsonPath) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jsonPath EXPECTED TYPE: String", null, null); + } + this.jsonPath = jsonPath; + this.keyModified.set("json_path", 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 { + InvalidDetails as MasterModel, + InvalidDetails as InvalidDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/inventory_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/inventory_details.js new file mode 100644 index 0000000..4f4b88a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/inventory_details.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class InventoryDetails{ + + inventoryTemplate; + keyModified = new Map(); + /** + * The method to get the inventoryTemplate + * @returns {InventoryTemplate} An instance of InventoryTemplate + */ + getInventoryTemplate() { + return this.inventoryTemplate; + + } + + /** + * The method to set the value to inventoryTemplate + * @param {InventoryTemplate} inventoryTemplate An instance of InventoryTemplate + */ + async setInventoryTemplate(inventoryTemplate) { + const InventoryTemplate = (await (import("./inventory_template.js"))).MasterModel; + if((inventoryTemplate != null) && (!(inventoryTemplate instanceof InventoryTemplate))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: inventoryTemplate EXPECTED TYPE: InventoryTemplate", null, null); + } + this.inventoryTemplate = inventoryTemplate; + this.keyModified.set("inventory_template", 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 { + InventoryDetails as MasterModel, + InventoryDetails as InventoryDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/inventory_template.js b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/inventory_template.js new file mode 100644 index 0000000..90b8553 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/inventory_template.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class InventoryTemplate{ + + id; + name; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + InventoryTemplate as MasterModel, + InventoryTemplate as InventoryTemplate +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/send_mail_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/send_mail_operations.js new file mode 100644 index 0000000..325682f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/send_mail_operations.js @@ -0,0 +1,62 @@ +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 SendMailOperations{ + + modulename; + id; + /** + * Creates an instance of SendMailOperations with the given parameters + * @param {BigInt} id A BigInt representing the id + * @param {String} modulename A String representing the modulename + */ + constructor(id, modulename){ + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(modulename) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modulename EXPECTED TYPE: String", null, null); + } + this.id = id; + this.modulename = modulename; + + } + + /** + * The method to send mail + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async sendMail(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.modulename.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.id.toString()); + apiPath = apiPath.concat("/actions/send_mail"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +export { + SendMailOperations as MasterModel, + SendMailOperations as SendMailOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/success_response.js new file mode 100644 index 0000000..e8b71a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/template.js b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/template.js new file mode 100644 index 0000000..2ab8707 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/template.js @@ -0,0 +1,7 @@ +class Template{ + +} +export { + Template as MasterModel, + Template as Template +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/to.js b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/to.js new file mode 100644 index 0000000..a969960 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/send_mail/to.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class To{ + + userName; + email; + keyModified = new Map(); + /** + * The method to get the userName + * @returns {String} A String representing the userName + */ + getUserName() { + return this.userName; + + } + + /** + * The method to set the value to userName + * @param {String} userName A String representing the userName + */ + setUserName(userName) { + if((userName != null) && (!(Object.prototype.toString.call(userName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: userName EXPECTED TYPE: String", null, null); + } + this.userName = userName; + this.keyModified.set("user_name", 1); + + } + + /** + * The method to get the email + * @returns {String} A String representing the email + */ + getEmail() { + return this.email; + + } + + /** + * The method to set the value to email + * @param {String} email A String representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: String", null, null); + } + this.email = email; + this.keyModified.set("email", 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 { + To as MasterModel, + To as To +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/action_wrapper.js new file mode 100644 index 0000000..95af153 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/action_wrapper.js @@ -0,0 +1,63 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + servicePreferences; + keyModified = new Map(); + /** + * The method to get the servicePreferences + * @returns {ActionResponse} An instance of ActionResponse + */ + getServicePreferences() { + return this.servicePreferences; + + } + + /** + * The method to set the value to servicePreferences + * @param {ActionResponse} servicePreferences An instance of ActionResponse + */ + setServicePreferences(servicePreferences) { + this.servicePreferences = servicePreferences; + this.keyModified.set("service_preferences", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/api_exception.js new file mode 100644 index 0000000..35bf8ba --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/body_wrapper.js new file mode 100644 index 0000000..b499bfd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/body_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + servicePreferences; + keyModified = new Map(); + /** + * The method to get the servicePreferences + * @returns {ServicePreference} An instance of ServicePreference + */ + getServicePreferences() { + return this.servicePreferences; + + } + + /** + * The method to set the value to servicePreferences + * @param {ServicePreference} servicePreferences An instance of ServicePreference + */ + async setServicePreferences(servicePreferences) { + const ServicePreference = (await (import("./service_preference.js"))).MasterModel; + if((servicePreferences != null) && (!(servicePreferences instanceof ServicePreference))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: servicePreferences EXPECTED TYPE: ServicePreference", null, null); + } + this.servicePreferences = servicePreferences; + this.keyModified.set("service_preferences", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/import_service_preference.js b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/import_service_preference.js new file mode 100644 index 0000000..f6d81e9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/import_service_preference.js @@ -0,0 +1,10 @@ +export { BodyWrapper } from "./body_wrapper.js"; +export * as ActionHandler from "./action_handler.js"; +export { APIException } from "./api_exception.js"; +export * as ActionResponse from "./action_response.js"; +export { ServicePreferenceOperations } from "./service_preference_operations.js"; +export { SuccessResponse } from "./success_response.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export * as ResponseHandler from "./response_handler.js"; +export { ServicePreference } from "./service_preference.js"; +export { ResponseWrapper } from "./response_wrapper.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/response_wrapper.js new file mode 100644 index 0000000..3d6e24a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/response_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + servicePreferences; + keyModified = new Map(); + /** + * The method to get the servicePreferences + * @returns {ServicePreference} An instance of ServicePreference + */ + getServicePreferences() { + return this.servicePreferences; + + } + + /** + * The method to set the value to servicePreferences + * @param {ServicePreference} servicePreferences An instance of ServicePreference + */ + async setServicePreferences(servicePreferences) { + const ServicePreference = (await (import("./service_preference.js"))).MasterModel; + if((servicePreferences != null) && (!(servicePreferences instanceof ServicePreference))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: servicePreferences EXPECTED TYPE: ServicePreference", null, null); + } + this.servicePreferences = servicePreferences; + this.keyModified.set("service_preferences", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/service_preference.js b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/service_preference.js new file mode 100644 index 0000000..ac3ed34 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/service_preference.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ServicePreference{ + + jobSheetEnabled; + keyModified = new Map(); + /** + * The method to get the jobSheetEnabled + * @returns {Boolean} A Boolean representing the jobSheetEnabled + */ + getJobSheetEnabled() { + return this.jobSheetEnabled; + + } + + /** + * The method to set the value to jobSheetEnabled + * @param {Boolean} jobSheetEnabled A Boolean representing the jobSheetEnabled + */ + setJobSheetEnabled(jobSheetEnabled) { + if((jobSheetEnabled != null) && (!(Object.prototype.toString.call(jobSheetEnabled) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jobSheetEnabled EXPECTED TYPE: Boolean", null, null); + } + this.jobSheetEnabled = jobSheetEnabled; + this.keyModified.set("job_sheet_enabled", 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 { + ServicePreference as MasterModel, + ServicePreference as ServicePreference +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/service_preference_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/service_preference_operations.js new file mode 100644 index 0000000..bc8eec5 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/service_preference_operations.js @@ -0,0 +1,56 @@ +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 ServicePreferenceOperations{ + /** + * The method to get service preference + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getServicePreference() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/service_preferences"); + 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"); + + } + + /** + * The method to update service preference + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateServicePreference(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/service_preferences"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +export { + ServicePreferenceOperations as MasterModel, + ServicePreferenceOperations as ServicePreferenceOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/success_response.js new file mode 100644 index 0000000..39525ad --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/service_preference/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/action_wrapper.js new file mode 100644 index 0000000..0f8b779 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + share; + keyModified = new Map(); + /** + * The method to get the share + * @returns {Array} An Array representing the share + */ + getShare() { + return this.share; + + } + + /** + * The method to set the value to share + * @param {Array} share An Array representing the share + */ + setShare(share) { + if((share != null) && (!(Object.prototype.toString.call(share) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: share EXPECTED TYPE: Array", null, null); + } + this.share = share; + this.keyModified.set("share", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/body_wrapper.js new file mode 100644 index 0000000..5d6b457 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/body_wrapper.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + share; + notifyOnCompletion; + notify; + keyModified = new Map(); + /** + * The method to get the share + * @returns {Array} An Array representing the share + */ + getShare() { + return this.share; + + } + + /** + * The method to set the value to share + * @param {Array} share An Array representing the share + */ + setShare(share) { + if((share != null) && (!(Object.prototype.toString.call(share) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: share EXPECTED TYPE: Array", null, null); + } + this.share = share; + this.keyModified.set("share", 1); + + } + + /** + * The method to get the notifyOnCompletion + * @returns {Boolean} A Boolean representing the notifyOnCompletion + */ + getNotifyOnCompletion() { + return this.notifyOnCompletion; + + } + + /** + * The method to set the value to notifyOnCompletion + * @param {Boolean} notifyOnCompletion A Boolean representing the notifyOnCompletion + */ + setNotifyOnCompletion(notifyOnCompletion) { + if((notifyOnCompletion != null) && (!(Object.prototype.toString.call(notifyOnCompletion) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: notifyOnCompletion EXPECTED TYPE: Boolean", null, null); + } + this.notifyOnCompletion = notifyOnCompletion; + this.keyModified.set("notify_on_completion", 1); + + } + + /** + * The method to get the notify + * @returns {Boolean} A Boolean representing the notify + */ + getNotify() { + return this.notify; + + } + + /** + * The method to set the value to notify + * @param {Boolean} notify A Boolean representing the notify + */ + setNotify(notify) { + if((notify != null) && (!(Object.prototype.toString.call(notify) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: notify EXPECTED TYPE: Boolean", null, null); + } + this.notify = notify; + this.keyModified.set("notify", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/delete_action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/delete_action_handler.js new file mode 100644 index 0000000..2f594e1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/delete_action_handler.js @@ -0,0 +1,7 @@ +class DeleteActionHandler{ + +} +export { + DeleteActionHandler as MasterModel, + DeleteActionHandler as DeleteActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/delete_action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/delete_action_response.js new file mode 100644 index 0000000..6e30259 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/delete_action_response.js @@ -0,0 +1,7 @@ +class DeleteActionResponse{ + +} +export { + DeleteActionResponse as MasterModel, + DeleteActionResponse as DeleteActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/delete_action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/delete_action_wrapper.js new file mode 100644 index 0000000..3b591bb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/delete_action_wrapper.js @@ -0,0 +1,63 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DeleteActionWrapper{ + + share; + keyModified = new Map(); + /** + * The method to get the share + * @returns {DeleteActionResponse} An instance of DeleteActionResponse + */ + getShare() { + return this.share; + + } + + /** + * The method to set the value to share + * @param {DeleteActionResponse} share An instance of DeleteActionResponse + */ + setShare(share) { + this.share = share; + this.keyModified.set("share", 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 { + DeleteActionWrapper as MasterModel, + DeleteActionWrapper as DeleteActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/dependee.js b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/dependee.js new file mode 100644 index 0000000..d6c5850 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/dependee.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Dependee{ + + jsonPath; + apiName; + keyModified = new Map(); + /** + * The method to get the jsonPath + * @returns {String} A String representing the jsonPath + */ + getJsonPath() { + return this.jsonPath; + + } + + /** + * The method to set the value to jsonPath + * @param {String} jsonPath A String representing the jsonPath + */ + setJsonPath(jsonPath) { + if((jsonPath != null) && (!(Object.prototype.toString.call(jsonPath) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jsonPath EXPECTED TYPE: String", null, null); + } + this.jsonPath = jsonPath; + this.keyModified.set("json_path", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 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 { + Dependee as MasterModel, + Dependee as Dependee +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/import_share_records.js b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/import_share_records.js new file mode 100644 index 0000000..5318c7c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/import_share_records.js @@ -0,0 +1,17 @@ +export { ResponseWrapper } from "./response_wrapper.js"; +export { SharedThrough } from "./shared_through.js"; +export * as ActionResponse from "./action_response.js"; +export * as DeleteActionResponse from "./delete_action_response.js"; +export { DeleteActionWrapper } from "./delete_action_wrapper.js"; +export { ShareRecordsOperations } from "./share_records_operations.js"; +export { GetSharedRecordDetailsParam } from "./share_records_operations.js"; +export { ShareRecord } from "./share_record.js"; +export { SuccessResponse } from "./success_response.js"; +export * as DeleteActionHandler from "./delete_action_handler.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export * as ResponseHandler from "./response_handler.js"; +export { APIException } from "./api_exception.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { Module } from "./module.js"; +export * as ActionHandler from "./action_handler.js"; +export { Dependee } from "./dependee.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/module.js b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/module.js new file mode 100644 index 0000000..7c9a519 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/module.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Module{ + + name; + apiName; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Module as MasterModel, + Module as Module +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/response_wrapper.js new file mode 100644 index 0000000..1903200 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/response_wrapper.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + share; + shareableUser; + keyModified = new Map(); + /** + * The method to get the share + * @returns {Array} An Array representing the share + */ + getShare() { + return this.share; + + } + + /** + * The method to set the value to share + * @param {Array} share An Array representing the share + */ + setShare(share) { + if((share != null) && (!(Object.prototype.toString.call(share) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: share EXPECTED TYPE: Array", null, null); + } + this.share = share; + this.keyModified.set("share", 1); + + } + + /** + * The method to get the shareableUser + * @returns {Array} An Array representing the shareableUser + */ + getShareableUser() { + return this.shareableUser; + + } + + /** + * The method to set the value to shareableUser + * @param {Array} shareableUser An Array representing the shareableUser + */ + setShareableUser(shareableUser) { + if((shareableUser != null) && (!(Object.prototype.toString.call(shareableUser) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: shareableUser EXPECTED TYPE: Array", null, null); + } + this.shareableUser = shareableUser; + this.keyModified.set("shareable_user", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/share_record.js b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/share_record.js new file mode 100644 index 0000000..b1d9526 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/share_record.js @@ -0,0 +1,232 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ShareRecord{ + + sharedWith; + shareRelatedRecords; + sharedThrough; + sharedTime; + permission; + type; + sharedBy; + user; + keyModified = new Map(); + /** + * The method to get the sharedWith + * @returns {Users} An instance of Users + */ + getSharedWith() { + return this.sharedWith; + + } + + /** + * The method to set the value to sharedWith + * @param {Users} sharedWith An instance of Users + */ + async setSharedWith(sharedWith) { + const Users = (await (import("../users/users.js"))).MasterModel; + if((sharedWith != null) && (!(sharedWith instanceof Users))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sharedWith EXPECTED TYPE: Users", null, null); + } + this.sharedWith = sharedWith; + this.keyModified.set("shared_with", 1); + + } + + /** + * The method to get the shareRelatedRecords + * @returns {Boolean} A Boolean representing the shareRelatedRecords + */ + getShareRelatedRecords() { + return this.shareRelatedRecords; + + } + + /** + * The method to set the value to shareRelatedRecords + * @param {Boolean} shareRelatedRecords A Boolean representing the shareRelatedRecords + */ + setShareRelatedRecords(shareRelatedRecords) { + if((shareRelatedRecords != null) && (!(Object.prototype.toString.call(shareRelatedRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: shareRelatedRecords EXPECTED TYPE: Boolean", null, null); + } + this.shareRelatedRecords = shareRelatedRecords; + this.keyModified.set("share_related_records", 1); + + } + + /** + * The method to get the sharedThrough + * @returns {SharedThrough} An instance of SharedThrough + */ + getSharedThrough() { + return this.sharedThrough; + + } + + /** + * The method to set the value to sharedThrough + * @param {SharedThrough} sharedThrough An instance of SharedThrough + */ + async setSharedThrough(sharedThrough) { + const SharedThrough = (await (import("./shared_through.js"))).MasterModel; + if((sharedThrough != null) && (!(sharedThrough instanceof SharedThrough))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sharedThrough EXPECTED TYPE: SharedThrough", null, null); + } + this.sharedThrough = sharedThrough; + this.keyModified.set("shared_through", 1); + + } + + /** + * The method to get the sharedTime + * @returns {Date} An instance of Date + */ + getSharedTime() { + return this.sharedTime; + + } + + /** + * The method to set the value to sharedTime + * @param {Date} sharedTime An instance of Date + */ + setSharedTime(sharedTime) { + if((sharedTime != null) && (!(sharedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sharedTime EXPECTED TYPE: Date", null, null); + } + this.sharedTime = sharedTime; + this.keyModified.set("shared_time", 1); + + } + + /** + * The method to get the permission + * @returns {Choice} An instance of Choice + */ + getPermission() { + return this.permission; + + } + + /** + * The method to set the value to permission + * @param {Choice} permission An instance of Choice + */ + setPermission(permission) { + if((permission != null) && (!(permission instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: permission EXPECTED TYPE: Choice", null, null); + } + this.permission = permission; + this.keyModified.set("permission", 1); + + } + + /** + * The method to get the type + * @returns {Choice} An instance of Choice + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {Choice} type An instance of Choice + */ + setType(type) { + if((type != null) && (!(type instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: Choice", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the sharedBy + * @returns {Users} An instance of Users + */ + getSharedBy() { + return this.sharedBy; + + } + + /** + * The method to set the value to sharedBy + * @param {Users} sharedBy An instance of Users + */ + async setSharedBy(sharedBy) { + const Users = (await (import("../users/users.js"))).MasterModel; + if((sharedBy != null) && (!(sharedBy instanceof Users))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sharedBy EXPECTED TYPE: Users", null, null); + } + this.sharedBy = sharedBy; + this.keyModified.set("shared_by", 1); + + } + + /** + * The method to get the user + * @returns {Users} An instance of Users + */ + getUser() { + return this.user; + + } + + /** + * The method to set the value to user + * @param {Users} user An instance of Users + */ + async setUser(user) { + const Users = (await (import("../users/users.js"))).MasterModel; + if((user != null) && (!(user instanceof Users))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: user EXPECTED TYPE: Users", null, null); + } + this.user = user; + this.keyModified.set("user", 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 { + ShareRecord as MasterModel, + ShareRecord as ShareRecord +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/share_records_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/share_records_operations.js new file mode 100644 index 0000000..0a13f95 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/share_records_operations.js @@ -0,0 +1,150 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 ShareRecordsOperations{ + + moduleAPIName; + recordId; + /** + * Creates an instance of ShareRecordsOperations with the given parameters + * @param {BigInt} recordId A BigInt representing the recordId + * @param {String} moduleAPIName A String representing the moduleAPIName + */ + constructor(recordId, moduleAPIName){ + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(moduleAPIName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moduleAPIName EXPECTED TYPE: String", null, null); + } + this.recordId = recordId; + this.moduleAPIName = moduleAPIName; + + } + + /** + * The method to get shared record details + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getSharedRecordDetails(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.recordId.toString()); + apiPath = apiPath.concat("/actions/share"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to share record + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async shareRecord(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.recordId.toString()); + apiPath = apiPath.concat("/actions/share"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update share permissions + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateSharePermissions(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.recordId.toString()); + apiPath = apiPath.concat("/actions/share"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to revoke shared record + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async revokeSharedRecord() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(this.moduleAPIName.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(this.recordId.toString()); + apiPath = apiPath.concat("/actions/share"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + const require = createRequire(import.meta.url); + let DeleteActionHandler = require.resolve("./delete_action_handler.js"); + return handlerInstance.apiCall(DeleteActionHandler, "application/json"); + + } + +} +class GetSharedRecordDetailsParam{ + + static SHAREDTO = new Param("sharedTo", "com.zoho.crm.api.ShareRecords.GetSharedRecordDetailsParam"); + static VIEW = new Param("view", "com.zoho.crm.api.ShareRecords.GetSharedRecordDetailsParam"); +} + +export { + GetSharedRecordDetailsParam as GetSharedRecordDetailsParam, + ShareRecordsOperations as MasterModel, + ShareRecordsOperations as ShareRecordsOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/shared_through.js b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/shared_through.js new file mode 100644 index 0000000..ada95a7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/shared_through.js @@ -0,0 +1,136 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SharedThrough{ + + module; + id; + entityName; + name; + keyModified = new Map(); + /** + * The method to get the module + * @returns {Module} An instance of Module + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {Module} module An instance of Module + */ + async setModule(module) { + const Module = (await (import("./module.js"))).MasterModel; + if((module != null) && (!(module instanceof Module))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: Module", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the entityName + * @returns {String} A String representing the entityName + */ + getEntityName() { + return this.entityName; + + } + + /** + * The method to set the value to entityName + * @param {String} entityName A String representing the entityName + */ + setEntityName(entityName) { + if((entityName != null) && (!(Object.prototype.toString.call(entityName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: entityName EXPECTED TYPE: String", null, null); + } + this.entityName = entityName; + this.keyModified.set("entity_name", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + SharedThrough as MasterModel, + SharedThrough as SharedThrough +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/success_response.js new file mode 100644 index 0000000..39525ad --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/share_records/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/action_wrapper.js new file mode 100644 index 0000000..8a41d1d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + shiftHours; + keyModified = new Map(); + /** + * The method to get the shiftHours + * @returns {Array} An Array representing the shiftHours + */ + getShiftHours() { + return this.shiftHours; + + } + + /** + * The method to set the value to shiftHours + * @param {Array} shiftHours An Array representing the shiftHours + */ + setShiftHours(shiftHours) { + if((shiftHours != null) && (!(Object.prototype.toString.call(shiftHours) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: shiftHours EXPECTED TYPE: Array", null, null); + } + this.shiftHours = shiftHours; + this.keyModified.set("shift_hours", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/api_exception.js new file mode 100644 index 0000000..35d7ece --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + details; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/body_wrapper.js new file mode 100644 index 0000000..b46ebb7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + shiftHours; + keyModified = new Map(); + /** + * The method to get the shiftHours + * @returns {Array} An Array representing the shiftHours + */ + getShiftHours() { + return this.shiftHours; + + } + + /** + * The method to set the value to shiftHours + * @param {Array} shiftHours An Array representing the shiftHours + */ + setShiftHours(shiftHours) { + if((shiftHours != null) && (!(Object.prototype.toString.call(shiftHours) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: shiftHours EXPECTED TYPE: Array", null, null); + } + this.shiftHours = shiftHours; + this.keyModified.set("shift_hours", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/break_custom_timing.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/break_custom_timing.js new file mode 100644 index 0000000..84f787e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/break_custom_timing.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BreakCustomTiming{ + + days; + breakTiming; + keyModified = new Map(); + /** + * The method to get the days + * @returns {String} A String representing the days + */ + getDays() { + return this.days; + + } + + /** + * The method to set the value to days + * @param {String} days A String representing the days + */ + setDays(days) { + if((days != null) && (!(Object.prototype.toString.call(days) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: days EXPECTED TYPE: String", null, null); + } + this.days = days; + this.keyModified.set("days", 1); + + } + + /** + * The method to get the breakTiming + * @returns {Array} An Array representing the breakTiming + */ + getBreakTiming() { + return this.breakTiming; + + } + + /** + * The method to set the value to breakTiming + * @param {Array} breakTiming An Array representing the breakTiming + */ + setBreakTiming(breakTiming) { + if((breakTiming != null) && (!(Object.prototype.toString.call(breakTiming) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: breakTiming EXPECTED TYPE: Array", null, null); + } + this.breakTiming = breakTiming; + this.keyModified.set("break_timing", 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 { + BreakCustomTiming as MasterModel, + BreakCustomTiming as BreakCustomTiming +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/break_hours.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/break_hours.js new file mode 100644 index 0000000..897dd2d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/break_hours.js @@ -0,0 +1,158 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BreakHours{ + + breakDays; + sameAsEveryday; + dailyTiming; + customTiming; + id; + keyModified = new Map(); + /** + * The method to get the breakDays + * @returns {Array} An Array representing the breakDays + */ + getBreakDays() { + return this.breakDays; + + } + + /** + * The method to set the value to breakDays + * @param {Array} breakDays An Array representing the breakDays + */ + setBreakDays(breakDays) { + if((breakDays != null) && (!(Object.prototype.toString.call(breakDays) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: breakDays EXPECTED TYPE: Array", null, null); + } + this.breakDays = breakDays; + this.keyModified.set("break_days", 1); + + } + + /** + * The method to get the sameAsEveryday + * @returns {Boolean} A Boolean representing the sameAsEveryday + */ + getSameAsEveryday() { + return this.sameAsEveryday; + + } + + /** + * The method to set the value to sameAsEveryday + * @param {Boolean} sameAsEveryday A Boolean representing the sameAsEveryday + */ + setSameAsEveryday(sameAsEveryday) { + if((sameAsEveryday != null) && (!(Object.prototype.toString.call(sameAsEveryday) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sameAsEveryday EXPECTED TYPE: Boolean", null, null); + } + this.sameAsEveryday = sameAsEveryday; + this.keyModified.set("same_as_everyday", 1); + + } + + /** + * The method to get the dailyTiming + * @returns {Array} An Array representing the dailyTiming + */ + getDailyTiming() { + return this.dailyTiming; + + } + + /** + * The method to set the value to dailyTiming + * @param {Array} dailyTiming An Array representing the dailyTiming + */ + setDailyTiming(dailyTiming) { + if((dailyTiming != null) && (!(Object.prototype.toString.call(dailyTiming) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dailyTiming EXPECTED TYPE: Array", null, null); + } + this.dailyTiming = dailyTiming; + this.keyModified.set("daily_timing", 1); + + } + + /** + * The method to get the customTiming + * @returns {Array} An Array representing the customTiming + */ + getCustomTiming() { + return this.customTiming; + + } + + /** + * The method to set the value to customTiming + * @param {Array} customTiming An Array representing the customTiming + */ + setCustomTiming(customTiming) { + if((customTiming != null) && (!(Object.prototype.toString.call(customTiming) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: customTiming EXPECTED TYPE: Array", null, null); + } + this.customTiming = customTiming; + this.keyModified.set("custom_timing", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + BreakHours as MasterModel, + BreakHours as BreakHours +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/holidays.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/holidays.js new file mode 100644 index 0000000..213f53f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/holidays.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Holidays{ + + date; + year; + name; + id; + keyModified = new Map(); + /** + * The method to get the date + * @returns {Date} An instance of Date + */ + getDate() { + return this.date; + + } + + /** + * The method to set the value to date + * @param {Date} date An instance of Date + */ + setDate(date) { + if((date != null) && (!(date instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: date EXPECTED TYPE: Date", null, null); + } + this.date = date; + this.keyModified.set("date", 1); + + } + + /** + * The method to get the year + * @returns {number} A number representing the year + */ + getYear() { + return this.year; + + } + + /** + * The method to set the value to year + * @param {number} year A number representing the year + */ + setYear(year) { + if((year != null) && (!(Object.prototype.toString.call(year) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: year EXPECTED TYPE: number", null, null); + } + this.year = year; + this.keyModified.set("year", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Holidays as MasterModel, + Holidays as Holidays +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/import_shift_hours.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/import_shift_hours.js new file mode 100644 index 0000000..9757305 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/import_shift_hours.js @@ -0,0 +1,24 @@ +export { BodyWrapper } from "./body_wrapper.js"; +export { BreakCustomTiming } from "./break_custom_timing.js"; +export { BreakHours } from "./break_hours.js"; +export { APIException } from "./api_exception.js"; +export { SuccessResponse } from "./success_response.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { Role } from "./role.js"; +export { Holidays } from "./holidays.js"; +export * as ResponseHandler from "./response_handler.js"; +export { Users } from "./users.js"; +export { ShiftHours } from "./shift_hours.js"; +export { ShiftCount } from "./shift_count.js"; +export * as ActionResponse from "./action_response.js"; +export { ShiftCustomTiming } from "./shift_custom_timing.js"; +export * as ActionHandler from "./action_handler.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { ShiftHoursOperations } from "./shift_hours_operations.js"; +export { GetShiftHoursHeader } from "./shift_hours_operations.js"; +export { CreateShiftsHoursHeader } from "./shift_hours_operations.js"; +export { UpdateShiftHoursHeader } from "./shift_hours_operations.js"; +export { GetShiftHourHeader } from "./shift_hours_operations.js"; +export { UpdateShiftHourHeader } from "./shift_hours_operations.js"; +export { DeleteShiftHourHeader } from "./shift_hours_operations.js"; +export { MandatoryDetails } from "./mandatory_details.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/mandatory_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/mandatory_details.js new file mode 100644 index 0000000..aed5745 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/mandatory_details.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MandatoryDetails{ + + apiName; + jsonPath; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the jsonPath + * @returns {String} A String representing the jsonPath + */ + getJsonPath() { + return this.jsonPath; + + } + + /** + * The method to set the value to jsonPath + * @param {String} jsonPath A String representing the jsonPath + */ + setJsonPath(jsonPath) { + if((jsonPath != null) && (!(Object.prototype.toString.call(jsonPath) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jsonPath EXPECTED TYPE: String", null, null); + } + this.jsonPath = jsonPath; + this.keyModified.set("json_path", 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 { + MandatoryDetails as MasterModel, + MandatoryDetails as MandatoryDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/response_wrapper.js new file mode 100644 index 0000000..93b6576 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + shiftHours; + shiftCount; + keyModified = new Map(); + /** + * The method to get the shiftHours + * @returns {Array} An Array representing the shiftHours + */ + getShiftHours() { + return this.shiftHours; + + } + + /** + * The method to set the value to shiftHours + * @param {Array} shiftHours An Array representing the shiftHours + */ + setShiftHours(shiftHours) { + if((shiftHours != null) && (!(Object.prototype.toString.call(shiftHours) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: shiftHours EXPECTED TYPE: Array", null, null); + } + this.shiftHours = shiftHours; + this.keyModified.set("shift_hours", 1); + + } + + /** + * The method to get the shiftCount + * @returns {ShiftCount} An instance of ShiftCount + */ + getShiftCount() { + return this.shiftCount; + + } + + /** + * The method to set the value to shiftCount + * @param {ShiftCount} shiftCount An instance of ShiftCount + */ + async setShiftCount(shiftCount) { + const ShiftCount = (await (import("./shift_count.js"))).MasterModel; + if((shiftCount != null) && (!(shiftCount instanceof ShiftCount))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: shiftCount EXPECTED TYPE: ShiftCount", null, null); + } + this.shiftCount = shiftCount; + this.keyModified.set("shift_count", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/role.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/role.js new file mode 100644 index 0000000..e4645d1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/role.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Role{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Role as MasterModel, + Role as Role +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/shift_count.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/shift_count.js new file mode 100644 index 0000000..bb7640e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/shift_count.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ShiftCount{ + + totalShiftWithUser; + totalShift; + keyModified = new Map(); + /** + * The method to get the totalShiftWithUser + * @returns {number} A number representing the totalShiftWithUser + */ + getTotalShiftWithUser() { + return this.totalShiftWithUser; + + } + + /** + * The method to set the value to totalShiftWithUser + * @param {number} totalShiftWithUser A number representing the totalShiftWithUser + */ + setTotalShiftWithUser(totalShiftWithUser) { + if((totalShiftWithUser != null) && (!(Object.prototype.toString.call(totalShiftWithUser) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: totalShiftWithUser EXPECTED TYPE: number", null, null); + } + this.totalShiftWithUser = totalShiftWithUser; + this.keyModified.set("total_shift_with_user", 1); + + } + + /** + * The method to get the totalShift + * @returns {number} A number representing the totalShift + */ + getTotalShift() { + return this.totalShift; + + } + + /** + * The method to set the value to totalShift + * @param {number} totalShift A number representing the totalShift + */ + setTotalShift(totalShift) { + if((totalShift != null) && (!(Object.prototype.toString.call(totalShift) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: totalShift EXPECTED TYPE: number", null, null); + } + this.totalShift = totalShift; + this.keyModified.set("total_shift", 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 { + ShiftCount as MasterModel, + ShiftCount as ShiftCount +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/shift_custom_timing.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/shift_custom_timing.js new file mode 100644 index 0000000..3f2e04b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/shift_custom_timing.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ShiftCustomTiming{ + + days; + shiftTiming; + keyModified = new Map(); + /** + * The method to get the days + * @returns {String} A String representing the days + */ + getDays() { + return this.days; + + } + + /** + * The method to set the value to days + * @param {String} days A String representing the days + */ + setDays(days) { + if((days != null) && (!(Object.prototype.toString.call(days) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: days EXPECTED TYPE: String", null, null); + } + this.days = days; + this.keyModified.set("days", 1); + + } + + /** + * The method to get the shiftTiming + * @returns {Array} An Array representing the shiftTiming + */ + getShiftTiming() { + return this.shiftTiming; + + } + + /** + * The method to set the value to shiftTiming + * @param {Array} shiftTiming An Array representing the shiftTiming + */ + setShiftTiming(shiftTiming) { + if((shiftTiming != null) && (!(Object.prototype.toString.call(shiftTiming) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: shiftTiming EXPECTED TYPE: Array", null, null); + } + this.shiftTiming = shiftTiming; + this.keyModified.set("shift_timing", 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 { + ShiftCustomTiming as MasterModel, + ShiftCustomTiming as ShiftCustomTiming +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/shift_hours.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/shift_hours.js new file mode 100644 index 0000000..8722130 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/shift_hours.js @@ -0,0 +1,293 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ShiftHours{ + + sameAsEveryday; + shiftDays; + dailyTiming; + customTiming; + id; + breakHours; + users; + holidays; + usersCount; + timezone; + name; + keyModified = new Map(); + /** + * The method to get the sameAsEveryday + * @returns {Boolean} A Boolean representing the sameAsEveryday + */ + getSameAsEveryday() { + return this.sameAsEveryday; + + } + + /** + * The method to set the value to sameAsEveryday + * @param {Boolean} sameAsEveryday A Boolean representing the sameAsEveryday + */ + setSameAsEveryday(sameAsEveryday) { + if((sameAsEveryday != null) && (!(Object.prototype.toString.call(sameAsEveryday) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sameAsEveryday EXPECTED TYPE: Boolean", null, null); + } + this.sameAsEveryday = sameAsEveryday; + this.keyModified.set("same_as_everyday", 1); + + } + + /** + * The method to get the shiftDays + * @returns {Array} An Array representing the shiftDays + */ + getShiftDays() { + return this.shiftDays; + + } + + /** + * The method to set the value to shiftDays + * @param {Array} shiftDays An Array representing the shiftDays + */ + setShiftDays(shiftDays) { + if((shiftDays != null) && (!(Object.prototype.toString.call(shiftDays) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: shiftDays EXPECTED TYPE: Array", null, null); + } + this.shiftDays = shiftDays; + this.keyModified.set("shift_days", 1); + + } + + /** + * The method to get the dailyTiming + * @returns {Array} An Array representing the dailyTiming + */ + getDailyTiming() { + return this.dailyTiming; + + } + + /** + * The method to set the value to dailyTiming + * @param {Array} dailyTiming An Array representing the dailyTiming + */ + setDailyTiming(dailyTiming) { + if((dailyTiming != null) && (!(Object.prototype.toString.call(dailyTiming) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dailyTiming EXPECTED TYPE: Array", null, null); + } + this.dailyTiming = dailyTiming; + this.keyModified.set("daily_timing", 1); + + } + + /** + * The method to get the customTiming + * @returns {Array} An Array representing the customTiming + */ + getCustomTiming() { + return this.customTiming; + + } + + /** + * The method to set the value to customTiming + * @param {Array} customTiming An Array representing the customTiming + */ + setCustomTiming(customTiming) { + if((customTiming != null) && (!(Object.prototype.toString.call(customTiming) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: customTiming EXPECTED TYPE: Array", null, null); + } + this.customTiming = customTiming; + this.keyModified.set("custom_timing", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the breakHours + * @returns {Array} An Array representing the breakHours + */ + getBreakHours() { + return this.breakHours; + + } + + /** + * The method to set the value to breakHours + * @param {Array} breakHours An Array representing the breakHours + */ + setBreakHours(breakHours) { + if((breakHours != null) && (!(Object.prototype.toString.call(breakHours) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: breakHours EXPECTED TYPE: Array", null, null); + } + this.breakHours = breakHours; + this.keyModified.set("break_hours", 1); + + } + + /** + * The method to get the users + * @returns {Array} An Array representing the users + */ + getUsers() { + return this.users; + + } + + /** + * The method to set the value to users + * @param {Array} users An Array representing the users + */ + setUsers(users) { + if((users != null) && (!(Object.prototype.toString.call(users) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: users EXPECTED TYPE: Array", null, null); + } + this.users = users; + this.keyModified.set("users", 1); + + } + + /** + * The method to get the holidays + * @returns {Array} An Array representing the holidays + */ + getHolidays() { + return this.holidays; + + } + + /** + * The method to set the value to holidays + * @param {Array} holidays An Array representing the holidays + */ + setHolidays(holidays) { + if((holidays != null) && (!(Object.prototype.toString.call(holidays) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: holidays EXPECTED TYPE: Array", null, null); + } + this.holidays = holidays; + this.keyModified.set("holidays", 1); + + } + + /** + * The method to get the usersCount + * @returns {number} A number representing the usersCount + */ + getUsersCount() { + return this.usersCount; + + } + + /** + * The method to set the value to usersCount + * @param {number} usersCount A number representing the usersCount + */ + setUsersCount(usersCount) { + if((usersCount != null) && (!(Object.prototype.toString.call(usersCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: usersCount EXPECTED TYPE: number", null, null); + } + this.usersCount = usersCount; + this.keyModified.set("users_count", 1); + + } + + /** + * The method to get the timezone + * @returns {TimeZone} An instance of TimeZone + */ + getTimezone() { + return this.timezone; + + } + + /** + * The method to set the value to timezone + * @param {TimeZone} timezone An instance of TimeZone + */ + async setTimezone(timezone) { + this.timezone = timezone; + this.keyModified.set("timezone", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + ShiftHours as MasterModel, + ShiftHours as ShiftHours +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/shift_hours_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/shift_hours_operations.js new file mode 100644 index 0000000..672c169 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/shift_hours_operations.js @@ -0,0 +1,210 @@ +import {Header} from "../../../../../../routes/header.js"; +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 ShiftHoursOperations{ + + xCrmOrg; + /** + * Creates an instance of ShiftHoursOperations with the given parameters + * @param {String} xCrmOrg A String representing the xCrmOrg + */ + constructor(xCrmOrg=null){ + if((xCrmOrg != null) && (!(Object.prototype.toString.call(xCrmOrg) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: xCrmOrg EXPECTED TYPE: String", null, null); + } + this.xCrmOrg = xCrmOrg; + + } + + /** + * The method to get shift hours + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getShiftHours() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/business_hours/shift_hours"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.ShiftHours.GetShiftHoursHeader"), this.xCrmOrg).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to create shifts hours + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createShiftsHours(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/business_hours/shift_hours"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + await handlerInstance.addHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.ShiftHours.CreateShiftsHoursHeader"), this.xCrmOrg).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update shift hours + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateShiftHours(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/business_hours/shift_hours"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + await handlerInstance.addHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.ShiftHours.UpdateShiftHoursHeader"), this.xCrmOrg).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get shift hour + * @param {BigInt} shiftId A BigInt representing the shiftId + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getShiftHour(shiftId) { + if((!(Object.prototype.toString.call(shiftId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: shiftId EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/business_hours/shift_hours/"); + apiPath = apiPath.concat(shiftId.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + await handlerInstance.addHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.ShiftHours.GetShiftHourHeader"), this.xCrmOrg).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to update shift hour + * @param {BigInt} shiftId A BigInt representing the shiftId + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateShiftHour(shiftId, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(shiftId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: shiftId EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/business_hours/shift_hours/"); + apiPath = apiPath.concat(shiftId.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + await handlerInstance.addHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.ShiftHours.UpdateShiftHourHeader"), this.xCrmOrg).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete shift hour + * @param {BigInt} shiftId A BigInt representing the shiftId + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteShiftHour(shiftId) { + if((!(Object.prototype.toString.call(shiftId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: shiftId EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/business_hours/shift_hours/"); + apiPath = apiPath.concat(shiftId.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + await handlerInstance.addHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.ShiftHours.DeleteShiftHourHeader"), this.xCrmOrg).catch(err => { throw err; }); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class GetShiftHoursHeader{ + +} + +class CreateShiftsHoursHeader{ + +} + +class UpdateShiftHoursHeader{ + +} + +class GetShiftHourHeader{ + +} + +class UpdateShiftHourHeader{ + +} + +class DeleteShiftHourHeader{ + +} + +export { + ShiftHoursOperations as MasterModel, + ShiftHoursOperations as ShiftHoursOperations, + UpdateShiftHourHeader as UpdateShiftHourHeader, + DeleteShiftHourHeader as DeleteShiftHourHeader, + GetShiftHourHeader as GetShiftHourHeader, + UpdateShiftHoursHeader as UpdateShiftHoursHeader, + GetShiftHoursHeader as GetShiftHoursHeader, + CreateShiftsHoursHeader as CreateShiftsHoursHeader +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/success_response.js new file mode 100644 index 0000000..cb9a3af --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + details; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/users.js b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/users.js new file mode 100644 index 0000000..a510b94 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/shift_hours/users.js @@ -0,0 +1,182 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Users{ + + role; + name; + id; + email; + zuid; + effectiveFrom; + keyModified = new Map(); + /** + * The method to get the role + * @returns {Role} An instance of Role + */ + getRole() { + return this.role; + + } + + /** + * The method to set the value to role + * @param {Role} role An instance of Role + */ + async setRole(role) { + const Role = (await (import("./role.js"))).MasterModel; + if((role != null) && (!(role instanceof Role))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: role EXPECTED TYPE: Role", null, null); + } + this.role = role; + this.keyModified.set("role", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the email + * @returns {String} A String representing the email + */ + getEmail() { + return this.email; + + } + + /** + * The method to set the value to email + * @param {String} email A String representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: String", null, null); + } + this.email = email; + this.keyModified.set("email", 1); + + } + + /** + * The method to get the zuid + * @returns {String} A String representing the zuid + */ + getZuid() { + return this.zuid; + + } + + /** + * The method to set the value to zuid + * @param {String} zuid A String representing the zuid + */ + setZuid(zuid) { + if((zuid != null) && (!(Object.prototype.toString.call(zuid) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: zuid EXPECTED TYPE: String", null, null); + } + this.zuid = zuid; + this.keyModified.set("zuid", 1); + + } + + /** + * The method to get the effectiveFrom + * @returns {Date} An instance of Date + */ + getEffectiveFrom() { + return this.effectiveFrom; + + } + + /** + * The method to set the value to effectiveFrom + * @param {Date} effectiveFrom An instance of Date + */ + setEffectiveFrom(effectiveFrom) { + if((effectiveFrom != null) && (!(effectiveFrom instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: effectiveFrom EXPECTED TYPE: Date", null, null); + } + this.effectiveFrom = effectiveFrom; + this.keyModified.set("effective_from", 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 { + Users as MasterModel, + Users as Users +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/action_wrapper.js new file mode 100644 index 0000000..7080c2a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + tags; + keyModified = new Map(); + /** + * The method to get the tags + * @returns {Array} An Array representing the tags + */ + getTags() { + return this.tags; + + } + + /** + * The method to set the value to tags + * @param {Array} tags An Array representing the tags + */ + setTags(tags) { + if((tags != null) && (!(Object.prototype.toString.call(tags) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tags EXPECTED TYPE: Array", null, null); + } + this.tags = tags; + this.keyModified.set("tags", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/associated_places.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/associated_places.js new file mode 100644 index 0000000..cfec9af --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/associated_places.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AssociatedPlaces{ + + type; + resources; + keyModified = new Map(); + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the resources + * @returns {Array} An Array representing the resources + */ + getResources() { + return this.resources; + + } + + /** + * The method to set the value to resources + * @param {Array} resources An Array representing the resources + */ + setResources(resources) { + if((resources != null) && (!(Object.prototype.toString.call(resources) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: resources EXPECTED TYPE: Array", null, null); + } + this.resources = resources; + this.keyModified.set("resources", 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 { + AssociatedPlaces as MasterModel, + AssociatedPlaces as AssociatedPlaces +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/body_wrapper.js new file mode 100644 index 0000000..d90f68b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + tags; + keyModified = new Map(); + /** + * The method to get the tags + * @returns {Array} An Array representing the tags + */ + getTags() { + return this.tags; + + } + + /** + * The method to set the value to tags + * @param {Array} tags An Array representing the tags + */ + setTags(tags) { + if((tags != null) && (!(Object.prototype.toString.call(tags) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tags EXPECTED TYPE: Array", null, null); + } + this.tags = tags; + this.keyModified.set("tags", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/conflict_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/conflict_wrapper.js new file mode 100644 index 0000000..19fcc9e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/conflict_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ConflictWrapper{ + + conflictId; + keyModified = new Map(); + /** + * The method to get the conflictId + * @returns {String} A String representing the conflictId + */ + getConflictId() { + return this.conflictId; + + } + + /** + * The method to set the value to conflictId + * @param {String} conflictId A String representing the conflictId + */ + setConflictId(conflictId) { + if((conflictId != null) && (!(Object.prototype.toString.call(conflictId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: conflictId EXPECTED TYPE: String", null, null); + } + this.conflictId = conflictId; + this.keyModified.set("conflict_id", 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 { + ConflictWrapper as MasterModel, + ConflictWrapper as ConflictWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/count_response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/count_response_wrapper.js new file mode 100644 index 0000000..337f04a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/count_response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class CountResponseWrapper{ + + count; + keyModified = new Map(); + /** + * The method to get the count + * @returns {String} A String representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {String} count A String representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: String", null, null); + } + this.count = count; + this.keyModified.set("count", 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 { + CountResponseWrapper as MasterModel, + CountResponseWrapper as CountResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/error_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/error_details.js new file mode 100644 index 0000000..bd8bb0c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/error_details.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ErrorDetails{ + + apiName; + jsonPath; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the jsonPath + * @returns {String} A String representing the jsonPath + */ + getJsonPath() { + return this.jsonPath; + + } + + /** + * The method to set the value to jsonPath + * @param {String} jsonPath A String representing the jsonPath + */ + setJsonPath(jsonPath) { + if((jsonPath != null) && (!(Object.prototype.toString.call(jsonPath) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jsonPath EXPECTED TYPE: String", null, null); + } + this.jsonPath = jsonPath; + this.keyModified.set("json_path", 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 { + ErrorDetails as MasterModel, + ErrorDetails as ErrorDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/existing_tag.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/existing_tag.js new file mode 100644 index 0000000..9623508 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/existing_tag.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ExistingTag{ + + id; + name; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + ExistingTag as MasterModel, + ExistingTag as ExistingTag +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/existing_tag_request_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/existing_tag_request_wrapper.js new file mode 100644 index 0000000..8737662 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/existing_tag_request_wrapper.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ExistingTagRequestWrapper{ + + tags; + ids; + keyModified = new Map(); + /** + * The method to get the tags + * @returns {Array} An Array representing the tags + */ + getTags() { + return this.tags; + + } + + /** + * The method to set the value to tags + * @param {Array} tags An Array representing the tags + */ + setTags(tags) { + if((tags != null) && (!(Object.prototype.toString.call(tags) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tags EXPECTED TYPE: Array", null, null); + } + this.tags = tags; + this.keyModified.set("tags", 1); + + } + + /** + * The method to get the ids + * @returns {Array} An Array representing the ids + */ + getIds() { + return this.ids; + + } + + /** + * The method to set the value to ids + * @param {Array} ids An Array representing the ids + */ + setIds(ids) { + if((ids != null) && (!(Object.prototype.toString.call(ids) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ids EXPECTED TYPE: Array", null, null); + } + this.ids = ids; + this.keyModified.set("ids", 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 { + ExistingTagRequestWrapper as MasterModel, + ExistingTagRequestWrapper as ExistingTagRequestWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/import_tags.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/import_tags.js new file mode 100644 index 0000000..56e2102 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/import_tags.js @@ -0,0 +1,32 @@ +export { TagsOperations } from "./tags_operations.js"; +export { GetTagsParam } from "./tags_operations.js"; +export { CreateTagsParam } from "./tags_operations.js"; +export { UpdateTagsParam } from "./tags_operations.js"; +export { UpdateTagParam } from "./tags_operations.js"; +export { AddTagsParam } from "./tags_operations.js"; +export { AddTagsToMultipleRecordsParam } from "./tags_operations.js"; +export { RemoveTagsFromMultipleRecordsParam } from "./tags_operations.js"; +export { GetRecordCountForTagParam } from "./tags_operations.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export * as RecordActionHandler from "./record_action_handler.js"; +export { APIException } from "./api_exception.js"; +export * as ActionResponse from "./action_response.js"; +export * as RecordActionResponse from "./record_action_response.js"; +export { ConflictWrapper } from "./conflict_wrapper.js"; +export { RecordSuccessResponse } from "./record_success_response.js"; +export { NewTagRequestWrapper } from "./new_tag_request_wrapper.js"; +export { Info } from "./info.js"; +export { ExistingTagRequestWrapper } from "./existing_tag_request_wrapper.js"; +export { CountResponseWrapper } from "./count_response_wrapper.js"; +export { SuccessResponse } from "./success_response.js"; +export { AssociatedPlaces } from "./associated_places.js"; +export { ErrorDetails } from "./error_details.js"; +export { Tag } from "./tag.js"; +export * as ResponseHandler from "./response_handler.js"; +export * as ActionHandler from "./action_handler.js"; +export { RecordActionWrapper } from "./record_action_wrapper.js"; +export { ExistingTag } from "./existing_tag.js"; +export { MergeWrapper } from "./merge_wrapper.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { RecordDetailTag } from "./record_detail_tag.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/info.js new file mode 100644 index 0000000..97b1025 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/info.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + count; + allowedCount; + keyModified = new Map(); + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the allowedCount + * @returns {number} A number representing the allowedCount + */ + getAllowedCount() { + return this.allowedCount; + + } + + /** + * The method to set the value to allowedCount + * @param {number} allowedCount A number representing the allowedCount + */ + setAllowedCount(allowedCount) { + if((allowedCount != null) && (!(Object.prototype.toString.call(allowedCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: allowedCount EXPECTED TYPE: number", null, null); + } + this.allowedCount = allowedCount; + this.keyModified.set("allowed_count", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/merge_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/merge_wrapper.js new file mode 100644 index 0000000..ef36b5c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/merge_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MergeWrapper{ + + tags; + keyModified = new Map(); + /** + * The method to get the tags + * @returns {Array} An Array representing the tags + */ + getTags() { + return this.tags; + + } + + /** + * The method to set the value to tags + * @param {Array} tags An Array representing the tags + */ + setTags(tags) { + if((tags != null) && (!(Object.prototype.toString.call(tags) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tags EXPECTED TYPE: Array", null, null); + } + this.tags = tags; + this.keyModified.set("tags", 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 { + MergeWrapper as MasterModel, + MergeWrapper as MergeWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/new_tag_request_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/new_tag_request_wrapper.js new file mode 100644 index 0000000..d32ded7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/new_tag_request_wrapper.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class NewTagRequestWrapper{ + + tags; + overWrite; + ids; + keyModified = new Map(); + /** + * The method to get the tags + * @returns {Array} An Array representing the tags + */ + getTags() { + return this.tags; + + } + + /** + * The method to set the value to tags + * @param {Array} tags An Array representing the tags + */ + setTags(tags) { + if((tags != null) && (!(Object.prototype.toString.call(tags) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tags EXPECTED TYPE: Array", null, null); + } + this.tags = tags; + this.keyModified.set("tags", 1); + + } + + /** + * The method to get the overWrite + * @returns {Boolean} A Boolean representing the overWrite + */ + getOverWrite() { + return this.overWrite; + + } + + /** + * The method to set the value to overWrite + * @param {Boolean} overWrite A Boolean representing the overWrite + */ + setOverWrite(overWrite) { + if((overWrite != null) && (!(Object.prototype.toString.call(overWrite) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: overWrite EXPECTED TYPE: Boolean", null, null); + } + this.overWrite = overWrite; + this.keyModified.set("over_write", 1); + + } + + /** + * The method to get the ids + * @returns {Array} An Array representing the ids + */ + getIds() { + return this.ids; + + } + + /** + * The method to set the value to ids + * @param {Array} ids An Array representing the ids + */ + setIds(ids) { + if((ids != null) && (!(Object.prototype.toString.call(ids) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ids EXPECTED TYPE: Array", null, null); + } + this.ids = ids; + this.keyModified.set("ids", 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 { + NewTagRequestWrapper as MasterModel, + NewTagRequestWrapper as NewTagRequestWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_action_handler.js new file mode 100644 index 0000000..8c73983 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_action_handler.js @@ -0,0 +1,7 @@ +class RecordActionHandler{ + +} +export { + RecordActionHandler as MasterModel, + RecordActionHandler as RecordActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_action_response.js new file mode 100644 index 0000000..a33bf2e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_action_response.js @@ -0,0 +1,7 @@ +class RecordActionResponse{ + +} +export { + RecordActionResponse as MasterModel, + RecordActionResponse as RecordActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_action_wrapper.js new file mode 100644 index 0000000..fbc737f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_action_wrapper.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RecordActionWrapper{ + + data; + wfScheduler; + successCount; + lockedCount; + keyModified = new Map(); + /** + * The method to get the data + * @returns {Array} An Array representing the data + */ + getData() { + return this.data; + + } + + /** + * The method to set the value to data + * @param {Array} data An Array representing the data + */ + setData(data) { + if((data != null) && (!(Object.prototype.toString.call(data) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: data EXPECTED TYPE: Array", null, null); + } + this.data = data; + this.keyModified.set("data", 1); + + } + + /** + * The method to get the wfScheduler + * @returns {Boolean} A Boolean representing the wfScheduler + */ + getWfScheduler() { + return this.wfScheduler; + + } + + /** + * The method to set the value to wfScheduler + * @param {Boolean} wfScheduler A Boolean representing the wfScheduler + */ + setWfScheduler(wfScheduler) { + if((wfScheduler != null) && (!(Object.prototype.toString.call(wfScheduler) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: wfScheduler EXPECTED TYPE: Boolean", null, null); + } + this.wfScheduler = wfScheduler; + this.keyModified.set("wf_scheduler", 1); + + } + + /** + * The method to get the successCount + * @returns {String} A String representing the successCount + */ + getSuccessCount() { + return this.successCount; + + } + + /** + * The method to set the value to successCount + * @param {String} successCount A String representing the successCount + */ + setSuccessCount(successCount) { + if((successCount != null) && (!(Object.prototype.toString.call(successCount) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: successCount EXPECTED TYPE: String", null, null); + } + this.successCount = successCount; + this.keyModified.set("success_count", 1); + + } + + /** + * The method to get the lockedCount + * @returns {Boolean} A Boolean representing the lockedCount + */ + getLockedCount() { + return this.lockedCount; + + } + + /** + * The method to set the value to lockedCount + * @param {Boolean} lockedCount A Boolean representing the lockedCount + */ + setLockedCount(lockedCount) { + if((lockedCount != null) && (!(Object.prototype.toString.call(lockedCount) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: lockedCount EXPECTED TYPE: Boolean", null, null); + } + this.lockedCount = lockedCount; + this.keyModified.set("locked_count", 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 { + RecordActionWrapper as MasterModel, + RecordActionWrapper as RecordActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_detail_tag.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_detail_tag.js new file mode 100644 index 0000000..d06ea3f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_detail_tag.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RecordDetailTag{ + + id; + name; + colorCode; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the colorCode + * @returns {String} A String representing the colorCode + */ + getColorCode() { + return this.colorCode; + + } + + /** + * The method to set the value to colorCode + * @param {String} colorCode A String representing the colorCode + */ + setColorCode(colorCode) { + if((colorCode != null) && (!(Object.prototype.toString.call(colorCode) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: colorCode EXPECTED TYPE: String", null, null); + } + this.colorCode = colorCode; + this.keyModified.set("color_code", 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 { + RecordDetailTag as MasterModel, + RecordDetailTag as RecordDetailTag +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_success_response.js new file mode 100644 index 0000000..1ed04c8 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/record_success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RecordSuccessResponse{ + + code; + status; + message; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + RecordSuccessResponse as MasterModel, + RecordSuccessResponse as RecordSuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/response_wrapper.js new file mode 100644 index 0000000..e165f76 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + tags; + info; + keyModified = new Map(); + /** + * The method to get the tags + * @returns {Array} An Array representing the tags + */ + getTags() { + return this.tags; + + } + + /** + * The method to set the value to tags + * @param {Array} tags An Array representing the tags + */ + setTags(tags) { + if((tags != null) && (!(Object.prototype.toString.call(tags) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tags EXPECTED TYPE: Array", null, null); + } + this.tags = tags; + this.keyModified.set("tags", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/success_response.js new file mode 100644 index 0000000..8db02f9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + status; + message; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/tag.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/tag.js new file mode 100644 index 0000000..53947ac --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/tag.js @@ -0,0 +1,207 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Tag{ + + createdTime; + modifiedTime; + name; + modifiedBy; + id; + colorCode; + createdBy; + keyModified = new Map(); + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("modified_by", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the colorCode + * @returns {Choice} An instance of Choice + */ + getColorCode() { + return this.colorCode; + + } + + /** + * The method to set the value to colorCode + * @param {Choice} colorCode An instance of Choice + */ + setColorCode(colorCode) { + if((colorCode != null) && (!(colorCode instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: colorCode EXPECTED TYPE: Choice", null, null); + } + this.colorCode = colorCode; + this.keyModified.set("color_code", 1); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 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 { + Tag as MasterModel, + Tag as Tag +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/tags/tags_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/tags_operations.js new file mode 100644 index 0000000..b1209d7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/tags/tags_operations.js @@ -0,0 +1,422 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 TagsOperations{ + /** + * The method to get tags + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getTags(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/tags"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to create tags + * @param {BodyWrapper} request An instance of BodyWrapper + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createTags(request, paramInstance=null) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/tags"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update tags + * @param {BodyWrapper} request An instance of BodyWrapper + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateTags(request, paramInstance=null) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/tags"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update tag + * @param {String} id A String representing the id + * @param {BodyWrapper} request An instance of BodyWrapper + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateTag(id, request, paramInstance=null) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/tags/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete tag + * @param {BigInt} id A BigInt representing the id + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteTag(id) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/tags/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to merge tags + * @param {BigInt} id A BigInt representing the id + * @param {MergeWrapper} request An instance of MergeWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async mergeTags(id, request) { + const MergeWrapper = (await (import("./merge_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof MergeWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: MergeWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/tags/"); + apiPath = apiPath.concat(id.toString()); + apiPath = apiPath.concat("/actions/merge"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to add tags + * @param {BigInt} recordId A BigInt representing the recordId + * @param {String} module A String representing the module + * @param {NewTagRequestWrapper} request An instance of NewTagRequestWrapper + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async addTags(recordId, module, request, paramInstance=null) { + const NewTagRequestWrapper = (await (import("./new_tag_request_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof NewTagRequestWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: NewTagRequestWrapper", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/actions/add_tags"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let RecordActionHandler = require.resolve("./record_action_handler.js"); + return handlerInstance.apiCall(RecordActionHandler, "application/json"); + + } + + /** + * The method to remove tags + * @param {BigInt} recordId A BigInt representing the recordId + * @param {String} module A String representing the module + * @param {ExistingTagRequestWrapper} request An instance of ExistingTagRequestWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async removeTags(recordId, module, request) { + const ExistingTagRequestWrapper = (await (import("./existing_tag_request_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(recordId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof ExistingTagRequestWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: ExistingTagRequestWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/actions/remove_tags"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let RecordActionHandler = require.resolve("./record_action_handler.js"); + return handlerInstance.apiCall(RecordActionHandler, "application/json"); + + } + + /** + * The method to add tags to multiple records + * @param {String} module A String representing the module + * @param {NewTagRequestWrapper} request An instance of NewTagRequestWrapper + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async addTagsToMultipleRecords(module, request, paramInstance=null) { + const NewTagRequestWrapper = (await (import("./new_tag_request_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof NewTagRequestWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: NewTagRequestWrapper", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/actions/add_tags"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let RecordActionHandler = require.resolve("./record_action_handler.js"); + return handlerInstance.apiCall(RecordActionHandler, "application/json"); + + } + + /** + * The method to remove tags from multiple records + * @param {String} module A String representing the module + * @param {ExistingTagRequestWrapper} request An instance of ExistingTagRequestWrapper + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async removeTagsFromMultipleRecords(module, request, paramInstance=null) { + const ExistingTagRequestWrapper = (await (import("./existing_tag_request_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof ExistingTagRequestWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: ExistingTagRequestWrapper", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/actions/remove_tags"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let RecordActionHandler = require.resolve("./record_action_handler.js"); + return handlerInstance.apiCall(RecordActionHandler, "application/json"); + + } + + /** + * The method to get record count for tag + * @param {BigInt} id A BigInt representing the id + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getRecordCountForTag(id, paramInstance=null) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/tags/"); + apiPath = apiPath.concat(id.toString()); + apiPath = apiPath.concat("/actions/records_count"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + +} +class GetTagsParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.Tags.GetTagsParam"); + static MY_TAGS = new Param("my_tags", "com.zoho.crm.api.Tags.GetTagsParam"); +} + +class CreateTagsParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.Tags.CreateTagsParam"); +} + +class UpdateTagsParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.Tags.UpdateTagsParam"); +} + +class UpdateTagParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.Tags.UpdateTagParam"); +} + +class AddTagsParam{ + + static OVER_WRITE = new Param("over_write", "com.zoho.crm.api.Tags.AddTagsParam"); +} + +class AddTagsToMultipleRecordsParam{ + + static OVER_WRITE = new Param("over_write", "com.zoho.crm.api.Tags.AddTagsToMultipleRecordsParam"); +} + +class RemoveTagsFromMultipleRecordsParam{ + + static IDS = new Param("ids", "com.zoho.crm.api.Tags.RemoveTagsFromMultipleRecordsParam"); +} + +class GetRecordCountForTagParam{ + + static MODULE = new Param("module", "com.zoho.crm.api.Tags.GetRecordCountForTagParam"); +} + +export { + RemoveTagsFromMultipleRecordsParam as RemoveTagsFromMultipleRecordsParam, + AddTagsToMultipleRecordsParam as AddTagsToMultipleRecordsParam, + TagsOperations as MasterModel, + TagsOperations as TagsOperations, + AddTagsParam as AddTagsParam, + GetRecordCountForTagParam as GetRecordCountForTagParam, + UpdateTagsParam as UpdateTagsParam, + UpdateTagParam as UpdateTagParam, + GetTagsParam as GetTagsParam, + CreateTagsParam as CreateTagsParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/action_wrapper.js new file mode 100644 index 0000000..0f56c07 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/action_wrapper.js @@ -0,0 +1,63 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + orgTaxes; + keyModified = new Map(); + /** + * The method to get the orgTaxes + * @returns {ActionResponse} An instance of ActionResponse + */ + getOrgTaxes() { + return this.orgTaxes; + + } + + /** + * The method to set the value to orgTaxes + * @param {ActionResponse} orgTaxes An instance of ActionResponse + */ + setOrgTaxes(orgTaxes) { + this.orgTaxes = orgTaxes; + this.keyModified.set("org_taxes", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/body_wrapper.js new file mode 100644 index 0000000..8f14baf --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/body_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + orgTaxes; + keyModified = new Map(); + /** + * The method to get the orgTaxes + * @returns {OrgTax} An instance of OrgTax + */ + getOrgTaxes() { + return this.orgTaxes; + + } + + /** + * The method to set the value to orgTaxes + * @param {OrgTax} orgTaxes An instance of OrgTax + */ + async setOrgTaxes(orgTaxes) { + const OrgTax = (await (import("./org_tax.js"))).MasterModel; + if((orgTaxes != null) && (!(orgTaxes instanceof OrgTax))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: orgTaxes EXPECTED TYPE: OrgTax", null, null); + } + this.orgTaxes = orgTaxes; + this.keyModified.set("org_taxes", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/expected_field.js b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/expected_field.js new file mode 100644 index 0000000..a8d148f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/expected_field.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ExpectedField{ + + apiName; + jsonPath; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the jsonPath + * @returns {String} A String representing the jsonPath + */ + getJsonPath() { + return this.jsonPath; + + } + + /** + * The method to set the value to jsonPath + * @param {String} jsonPath A String representing the jsonPath + */ + setJsonPath(jsonPath) { + if((jsonPath != null) && (!(Object.prototype.toString.call(jsonPath) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jsonPath EXPECTED TYPE: String", null, null); + } + this.jsonPath = jsonPath; + this.keyModified.set("json_path", 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 { + ExpectedField as MasterModel, + ExpectedField as ExpectedField +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/import_taxes.js b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/import_taxes.js new file mode 100644 index 0000000..d3ba317 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/import_taxes.js @@ -0,0 +1,13 @@ +export { ActionWrapper } from "./action_wrapper.js"; +export { OrgTax } from "./org_tax.js"; +export { SuccessResponse } from "./success_response.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { Tax } from "./tax.js"; +export * as ActionResponse from "./action_response.js"; +export { TaxesOperations } from "./taxes_operations.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export * as ActionHandler from "./action_handler.js"; +export { APIException } from "./api_exception.js"; +export { ExpectedField } from "./expected_field.js"; +export { Preference } from "./preference.js"; +export * as ResponseHandler from "./response_handler.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/org_tax.js b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/org_tax.js new file mode 100644 index 0000000..c9dbfdb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/org_tax.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class OrgTax{ + + taxes; + preference; + keyModified = new Map(); + /** + * The method to get the taxes + * @returns {Array} An Array representing the taxes + */ + getTaxes() { + return this.taxes; + + } + + /** + * The method to set the value to taxes + * @param {Array} taxes An Array representing the taxes + */ + setTaxes(taxes) { + if((taxes != null) && (!(Object.prototype.toString.call(taxes) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: taxes EXPECTED TYPE: Array", null, null); + } + this.taxes = taxes; + this.keyModified.set("taxes", 1); + + } + + /** + * The method to get the preference + * @returns {Preference} An instance of Preference + */ + getPreference() { + return this.preference; + + } + + /** + * The method to set the value to preference + * @param {Preference} preference An instance of Preference + */ + async setPreference(preference) { + const Preference = (await (import("./preference.js"))).MasterModel; + if((preference != null) && (!(preference instanceof Preference))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: preference EXPECTED TYPE: Preference", null, null); + } + this.preference = preference; + this.keyModified.set("preference", 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 { + OrgTax as MasterModel, + OrgTax as OrgTax +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/preference.js b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/preference.js new file mode 100644 index 0000000..11a5f16 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/preference.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Preference{ + + autoPopulateTax; + modifyTaxRates; + keyModified = new Map(); + /** + * The method to get the autoPopulateTax + * @returns {Boolean} A Boolean representing the autoPopulateTax + */ + getAutoPopulateTax() { + return this.autoPopulateTax; + + } + + /** + * The method to set the value to autoPopulateTax + * @param {Boolean} autoPopulateTax A Boolean representing the autoPopulateTax + */ + setAutoPopulateTax(autoPopulateTax) { + if((autoPopulateTax != null) && (!(Object.prototype.toString.call(autoPopulateTax) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: autoPopulateTax EXPECTED TYPE: Boolean", null, null); + } + this.autoPopulateTax = autoPopulateTax; + this.keyModified.set("auto_populate_tax", 1); + + } + + /** + * The method to get the modifyTaxRates + * @returns {Boolean} A Boolean representing the modifyTaxRates + */ + getModifyTaxRates() { + return this.modifyTaxRates; + + } + + /** + * The method to set the value to modifyTaxRates + * @param {Boolean} modifyTaxRates A Boolean representing the modifyTaxRates + */ + setModifyTaxRates(modifyTaxRates) { + if((modifyTaxRates != null) && (!(Object.prototype.toString.call(modifyTaxRates) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifyTaxRates EXPECTED TYPE: Boolean", null, null); + } + this.modifyTaxRates = modifyTaxRates; + this.keyModified.set("modify_tax_rates", 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 { + Preference as MasterModel, + Preference as Preference +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/response_wrapper.js new file mode 100644 index 0000000..d8ad2ff --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/response_wrapper.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + orgTaxes; + keyModified = new Map(); + /** + * The method to get the orgTaxes + * @returns {OrgTax} An instance of OrgTax + */ + getOrgTaxes() { + return this.orgTaxes; + + } + + /** + * The method to set the value to orgTaxes + * @param {OrgTax} orgTaxes An instance of OrgTax + */ + async setOrgTaxes(orgTaxes) { + const OrgTax = (await (import("./org_tax.js"))).MasterModel; + if((orgTaxes != null) && (!(orgTaxes instanceof OrgTax))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: orgTaxes EXPECTED TYPE: OrgTax", null, null); + } + this.orgTaxes = orgTaxes; + this.keyModified.set("org_taxes", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/success_response.js new file mode 100644 index 0000000..39525ad --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/tax.js b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/tax.js new file mode 100644 index 0000000..02565c6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/tax.js @@ -0,0 +1,181 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Tax{ + + displayLabel; + sequenceNumber; + name; + id; + value; + delete1; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the sequenceNumber + * @returns {number} A number representing the sequenceNumber + */ + getSequenceNumber() { + return this.sequenceNumber; + + } + + /** + * The method to set the value to sequenceNumber + * @param {number} sequenceNumber A number representing the sequenceNumber + */ + setSequenceNumber(sequenceNumber) { + if((sequenceNumber != null) && (!(Object.prototype.toString.call(sequenceNumber) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sequenceNumber EXPECTED TYPE: number", null, null); + } + this.sequenceNumber = sequenceNumber; + this.keyModified.set("sequence_number", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the value + * @returns {Float} A Float representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {Float} value A Float representing the value + */ + setValue(value) { + if((value != null) && (!(Object.prototype.toString.call(value) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: value EXPECTED TYPE: Float", null, null); + } + this.value = value; + this.keyModified.set("value", 1); + + } + + /** + * The method to get the delete + * @returns {Boolean} A Boolean representing the delete1 + */ + getDelete() { + return this.delete1; + + } + + /** + * The method to set the value to delete + * @param {Boolean} delete1 A Boolean representing the delete1 + */ + setDelete(delete1) { + if((delete1 != null) && (!(Object.prototype.toString.call(delete1) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: delete1 EXPECTED TYPE: Boolean", null, null); + } + this.delete1 = delete1; + this.keyModified.set("_delete", 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 { + Tax as MasterModel, + Tax as Tax +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/taxes_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/taxes_operations.js new file mode 100644 index 0000000..7118e74 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/taxes/taxes_operations.js @@ -0,0 +1,79 @@ +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 TaxesOperations{ + /** + * The method to get taxes + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getTaxes() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/org/taxes"); + 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"); + + } + + /** + * The method to update taxes + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateTaxes(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/org/taxes"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get tax + * @param {BigInt} id A BigInt representing the id + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getTax(id) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/org/taxes/"); + apiPath = apiPath.concat(id.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/json"); + + } + +} +export { + TaxesOperations as MasterModel, + TaxesOperations as TaxesOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/templates/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/templates/api_exception.js new file mode 100644 index 0000000..35d7ece --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/templates/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + details; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/templates/folder.js b/versions/3.0.0/lib/core/com/zoho/crm/api/templates/folder.js new file mode 100644 index 0000000..0608dbe --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/templates/folder.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Folder{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Folder as MasterModel, + Folder as Folder +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/templates/import_templates.js b/versions/3.0.0/lib/core/com/zoho/crm/api/templates/import_templates.js new file mode 100644 index 0000000..7b5d2d1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/templates/import_templates.js @@ -0,0 +1,4 @@ +export { Templates } from "./templates.js"; +export { Wrapper } from "./wrapper.js"; +export { Folder } from "./folder.js"; +export { APIException } from "./api_exception.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/templates/templates.js b/versions/3.0.0/lib/core/com/zoho/crm/api/templates/templates.js new file mode 100644 index 0000000..894e4bc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/templates/templates.js @@ -0,0 +1,275 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Templates{ + + folder; + modifiedBy; + module; + modifiedTime; + subject; + name; + consentLinked; + favourite; + attachmentPresent; + id; + keyModified = new Map(); + /** + * The method to get the folder + * @returns {Folder} An instance of Folder + */ + getFolder() { + return this.folder; + + } + + /** + * The method to set the value to folder + * @param {Folder} folder An instance of Folder + */ + async setFolder(folder) { + const Folder = (await (import("./folder.js"))).MasterModel; + if((folder != null) && (!(folder instanceof Folder))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: folder EXPECTED TYPE: Folder", null, null); + } + this.folder = folder; + this.keyModified.set("folder", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {Folder} An instance of Folder + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {Folder} modifiedBy An instance of Folder + */ + async setModifiedBy(modifiedBy) { + const Folder = (await (import("./folder.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof Folder))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: Folder", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("modified_by", 1); + + } + + /** + * The method to get the module + * @returns {String} A String representing the module + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {String} module A String representing the module + */ + setModule(module) { + if((module != null) && (!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the subject + * @returns {String} A String representing the subject + */ + getSubject() { + return this.subject; + + } + + /** + * The method to set the value to subject + * @param {String} subject A String representing the subject + */ + setSubject(subject) { + if((subject != null) && (!(Object.prototype.toString.call(subject) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subject EXPECTED TYPE: String", null, null); + } + this.subject = subject; + this.keyModified.set("subject", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the consentLinked + * @returns {Boolean} A Boolean representing the consentLinked + */ + getConsentLinked() { + return this.consentLinked; + + } + + /** + * The method to set the value to consentLinked + * @param {Boolean} consentLinked A Boolean representing the consentLinked + */ + setConsentLinked(consentLinked) { + if((consentLinked != null) && (!(Object.prototype.toString.call(consentLinked) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: consentLinked EXPECTED TYPE: Boolean", null, null); + } + this.consentLinked = consentLinked; + this.keyModified.set("consent_linked", 1); + + } + + /** + * The method to get the favourite + * @returns {Boolean} A Boolean representing the favourite + */ + getFavourite() { + return this.favourite; + + } + + /** + * The method to set the value to favourite + * @param {Boolean} favourite A Boolean representing the favourite + */ + setFavourite(favourite) { + if((favourite != null) && (!(Object.prototype.toString.call(favourite) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: favourite EXPECTED TYPE: Boolean", null, null); + } + this.favourite = favourite; + this.keyModified.set("favourite", 1); + + } + + /** + * The method to get the attachmentPresent + * @returns {Boolean} A Boolean representing the attachmentPresent + */ + getAttachmentPresent() { + return this.attachmentPresent; + + } + + /** + * The method to set the value to attachmentPresent + * @param {Boolean} attachmentPresent A Boolean representing the attachmentPresent + */ + setAttachmentPresent(attachmentPresent) { + if((attachmentPresent != null) && (!(Object.prototype.toString.call(attachmentPresent) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: attachmentPresent EXPECTED TYPE: Boolean", null, null); + } + this.attachmentPresent = attachmentPresent; + this.keyModified.set("attachment_present", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Templates as MasterModel, + Templates as Templates +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/templates/wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/templates/wrapper.js new file mode 100644 index 0000000..a6a309d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/templates/wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Wrapper{ + + templates; + keyModified = new Map(); + /** + * The method to get the templates + * @returns {Array} An Array representing the templates + */ + getTemplates() { + return this.templates; + + } + + /** + * The method to set the value to templates + * @param {Array} templates An Array representing the templates + */ + setTemplates(templates) { + if((templates != null) && (!(Object.prototype.toString.call(templates) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: templates EXPECTED TYPE: Array", null, null); + } + this.templates = templates; + this.keyModified.set("templates", 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 { + Wrapper as MasterModel, + Wrapper as Wrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/action_wrapper.js new file mode 100644 index 0000000..5a2a473 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + territories; + keyModified = new Map(); + /** + * The method to get the territories + * @returns {Array} An Array representing the territories + */ + getTerritories() { + return this.territories; + + } + + /** + * The method to set the value to territories + * @param {Array} territories An Array representing the territories + */ + setTerritories(territories) { + if((territories != null) && (!(Object.prototype.toString.call(territories) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territories EXPECTED TYPE: Array", null, null); + } + this.territories = territories; + this.keyModified.set("territories", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/api_exception.js new file mode 100644 index 0000000..35d7ece --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + details; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/associated_users_count.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/associated_users_count.js new file mode 100644 index 0000000..c6f02b6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/associated_users_count.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AssociatedUsersCount{ + + count; + territory; + keyModified = new Map(); + /** + * The method to get the count + * @returns {String} A String representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {String} count A String representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: String", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the territory + * @returns {MinifiedTerritory} An instance of MinifiedTerritory + */ + getTerritory() { + return this.territory; + + } + + /** + * The method to set the value to territory + * @param {MinifiedTerritory} territory An instance of MinifiedTerritory + */ + async setTerritory(territory) { + const MinifiedTerritory = (await (import("./minified_territory.js"))).MasterModel; + if((territory != null) && (!(territory instanceof MinifiedTerritory))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territory EXPECTED TYPE: MinifiedTerritory", null, null); + } + this.territory = territory; + this.keyModified.set("territory", 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 { + AssociatedUsersCount as MasterModel, + AssociatedUsersCount as AssociatedUsersCount +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/associated_users_count_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/associated_users_count_wrapper.js new file mode 100644 index 0000000..fa90cae --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/associated_users_count_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AssociatedUsersCountWrapper{ + + associatedUsersCount; + info; + keyModified = new Map(); + /** + * The method to get the associatedUsersCount + * @returns {Array} An Array representing the associatedUsersCount + */ + getAssociatedUsersCount() { + return this.associatedUsersCount; + + } + + /** + * The method to set the value to associatedUsersCount + * @param {Array} associatedUsersCount An Array representing the associatedUsersCount + */ + setAssociatedUsersCount(associatedUsersCount) { + if((associatedUsersCount != null) && (!(Object.prototype.toString.call(associatedUsersCount) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: associatedUsersCount EXPECTED TYPE: Array", null, null); + } + this.associatedUsersCount = associatedUsersCount; + this.keyModified.set("associated_users_count", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + AssociatedUsersCountWrapper as MasterModel, + AssociatedUsersCountWrapper as AssociatedUsersCountWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/body_wrapper.js new file mode 100644 index 0000000..87cade0 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + territories; + keyModified = new Map(); + /** + * The method to get the territories + * @returns {Array} An Array representing the territories + */ + getTerritories() { + return this.territories; + + } + + /** + * The method to set the value to territories + * @param {Array} territories An Array representing the territories + */ + setTerritories(territories) { + if((territories != null) && (!(Object.prototype.toString.call(territories) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territories EXPECTED TYPE: Array", null, null); + } + this.territories = territories; + this.keyModified.set("territories", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/criteria.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/criteria.js new file mode 100644 index 0000000..22816f1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/criteria.js @@ -0,0 +1,156 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Criteria{ + + comparator; + field; + value; + groupOperator; + group; + keyModified = new Map(); + /** + * The method to get the comparator + * @returns {String} A String representing the comparator + */ + getComparator() { + return this.comparator; + + } + + /** + * The method to set the value to comparator + * @param {String} comparator A String representing the comparator + */ + setComparator(comparator) { + if((comparator != null) && (!(Object.prototype.toString.call(comparator) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: comparator EXPECTED TYPE: String", null, null); + } + this.comparator = comparator; + this.keyModified.set("comparator", 1); + + } + + /** + * The method to get the field + * @returns {Field} An instance of Field + */ + getField() { + return this.field; + + } + + /** + * The method to set the value to field + * @param {Field} field An instance of Field + */ + async setField(field) { + const Field = (await (import("./field.js"))).MasterModel; + if((field != null) && (!(field instanceof Field))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: field EXPECTED TYPE: Field", null, null); + } + this.field = field; + this.keyModified.set("field", 1); + + } + + /** + * The method to get the value + * @returns {Object} An Object representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {Object} value An Object representing the value + */ + setValue(value) { + this.value = value; + this.keyModified.set("value", 1); + + } + + /** + * The method to get the groupOperator + * @returns {String} A String representing the groupOperator + */ + getGroupOperator() { + return this.groupOperator; + + } + + /** + * The method to set the value to groupOperator + * @param {String} groupOperator A String representing the groupOperator + */ + setGroupOperator(groupOperator) { + if((groupOperator != null) && (!(Object.prototype.toString.call(groupOperator) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: groupOperator EXPECTED TYPE: String", null, null); + } + this.groupOperator = groupOperator; + this.keyModified.set("group_operator", 1); + + } + + /** + * The method to get the group + * @returns {Array} An Array representing the group + */ + getGroup() { + return this.group; + + } + + /** + * The method to set the value to group + * @param {Array} group An Array representing the group + */ + setGroup(group) { + if((group != null) && (!(Object.prototype.toString.call(group) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: group EXPECTED TYPE: Array", null, null); + } + this.group = group; + this.keyModified.set("group", 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 { + Criteria as MasterModel, + Criteria as Criteria +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/deleted_associated_territories.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/deleted_associated_territories.js new file mode 100644 index 0000000..feba893 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/deleted_associated_territories.js @@ -0,0 +1,136 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DeletedAssociatedTerritories{ + + name; + id; + deletedTime; + deletedBy; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the deletedTime + * @returns {Date} An instance of Date + */ + getDeletedTime() { + return this.deletedTime; + + } + + /** + * The method to set the value to deletedTime + * @param {Date} deletedTime An instance of Date + */ + setDeletedTime(deletedTime) { + if((deletedTime != null) && (!(deletedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deletedTime EXPECTED TYPE: Date", null, null); + } + this.deletedTime = deletedTime; + this.keyModified.set("deleted_time", 1); + + } + + /** + * The method to get the deletedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getDeletedBy() { + return this.deletedBy; + + } + + /** + * The method to set the value to deletedBy + * @param {MinifiedUser} deletedBy An instance of MinifiedUser + */ + async setDeletedBy(deletedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((deletedBy != null) && (!(deletedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deletedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.deletedBy = deletedBy; + this.keyModified.set("deleted_by", 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 { + DeletedAssociatedTerritories as MasterModel, + DeletedAssociatedTerritories as DeletedAssociatedTerritories +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/deleted_associated_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/deleted_associated_wrapper.js new file mode 100644 index 0000000..25aa784 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/deleted_associated_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class DeletedAssociatedWrapper{ + + territories; + info; + keyModified = new Map(); + /** + * The method to get the territories + * @returns {Array} An Array representing the territories + */ + getTerritories() { + return this.territories; + + } + + /** + * The method to set the value to territories + * @param {Array} territories An Array representing the territories + */ + setTerritories(territories) { + if((territories != null) && (!(Object.prototype.toString.call(territories) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territories EXPECTED TYPE: Array", null, null); + } + this.territories = territories; + this.keyModified.set("territories", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + DeletedAssociatedWrapper as MasterModel, + DeletedAssociatedWrapper as DeletedAssociatedWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/field.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/field.js new file mode 100644 index 0000000..fb4ef4e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/field.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Field{ + + apiName; + id; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Field as MasterModel, + Field as Field +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/import_territories.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/import_territories.js new file mode 100644 index 0000000..de18a71 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/import_territories.js @@ -0,0 +1,26 @@ +export { APIException } from "./api_exception.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export * as ActionHandler from "./action_handler.js"; +export { TransferBodyWrapper } from "./transfer_body_wrapper.js"; +export { DeletedAssociatedTerritories } from "./deleted_associated_territories.js"; +export { Info } from "./info.js"; +export { TransferTerritory } from "./transfer_territory.js"; +export { AssociatedUsersCount } from "./associated_users_count.js"; +export { TerritoriesOperations } from "./territories_operations.js"; +export { GetTerritoriesParam } from "./territories_operations.js"; +export { DeleteTerritoriesParam } from "./territories_operations.js"; +export { DeleteTerritoryParam } from "./territories_operations.js"; +export { GetChildTerritoryParam } from "./territories_operations.js"; +export { SuccessResponse } from "./success_response.js"; +export * as ResponseHandler from "./response_handler.js"; +export { ReportingTo } from "./reporting_to.js"; +export * as ActionResponse from "./action_response.js"; +export { MinifiedTerritory } from "./minified_territory.js"; +export { DeletedAssociatedWrapper } from "./deleted_associated_wrapper.js"; +export { AssociatedUsersCountWrapper } from "./associated_users_count_wrapper.js"; +export { Criteria } from "./criteria.js"; +export { Manager } from "./manager.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { Field } from "./field.js"; +export { Territories } from "./territories.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/info.js new file mode 100644 index 0000000..e495623 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/info.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + perPage; + count; + page; + moreRecords; + keyModified = new Map(); + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/manager.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/manager.js new file mode 100644 index 0000000..f0ac1db --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/manager.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Manager{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Manager as MasterModel, + Manager as Manager +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/minified_territory.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/minified_territory.js new file mode 100644 index 0000000..5b5807d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/minified_territory.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MinifiedTerritory{ + + name; + id; + subordinates; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the subordinates + * @returns {Boolean} A Boolean representing the subordinates + */ + getSubordinates() { + return this.subordinates; + + } + + /** + * The method to set the value to subordinates + * @param {Boolean} subordinates A Boolean representing the subordinates + */ + setSubordinates(subordinates) { + if((subordinates != null) && (!(Object.prototype.toString.call(subordinates) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subordinates EXPECTED TYPE: Boolean", null, null); + } + this.subordinates = subordinates; + this.keyModified.set("subordinates", 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 { + MinifiedTerritory as MasterModel, + MinifiedTerritory as MinifiedTerritory +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/reporting_to.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/reporting_to.js new file mode 100644 index 0000000..15919d6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/reporting_to.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ReportingTo{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + ReportingTo as MasterModel, + ReportingTo as ReportingTo +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/response_wrapper.js new file mode 100644 index 0000000..34a849c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + territories; + info; + keyModified = new Map(); + /** + * The method to get the territories + * @returns {Array} An Array representing the territories + */ + getTerritories() { + return this.territories; + + } + + /** + * The method to set the value to territories + * @param {Array} territories An Array representing the territories + */ + setTerritories(territories) { + if((territories != null) && (!(Object.prototype.toString.call(territories) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territories EXPECTED TYPE: Array", null, null); + } + this.territories = territories; + this.keyModified.set("territories", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/success_response.js new file mode 100644 index 0000000..e8b71a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/territories.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/territories.js new file mode 100644 index 0000000..db0fb2c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/territories.js @@ -0,0 +1,350 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Territories{ + + createdTime; + modifiedTime; + manager; + reportingTo; + permissionType; + modifiedBy; + description; + id; + createdBy; + accountRuleCriteria; + dealRuleCriteria; + leadRuleCriteria; + name; + keyModified = new Map(); + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the manager + * @returns {Manager} An instance of Manager + */ + getManager() { + return this.manager; + + } + + /** + * The method to set the value to manager + * @param {Manager} manager An instance of Manager + */ + async setManager(manager) { + const Manager = (await (import("./manager.js"))).MasterModel; + if((manager != null) && (!(manager instanceof Manager))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: manager EXPECTED TYPE: Manager", null, null); + } + this.manager = manager; + this.keyModified.set("manager", 1); + + } + + /** + * The method to get the reportingTo + * @returns {ReportingTo} An instance of ReportingTo + */ + getReportingTo() { + return this.reportingTo; + + } + + /** + * The method to set the value to reportingTo + * @param {ReportingTo} reportingTo An instance of ReportingTo + */ + async setReportingTo(reportingTo) { + const ReportingTo = (await (import("./reporting_to.js"))).MasterModel; + if((reportingTo != null) && (!(reportingTo instanceof ReportingTo))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: reportingTo EXPECTED TYPE: ReportingTo", null, null); + } + this.reportingTo = reportingTo; + this.keyModified.set("reporting_to", 1); + + } + + /** + * The method to get the permissionType + * @returns {Choice} An instance of Choice + */ + getPermissionType() { + return this.permissionType; + + } + + /** + * The method to set the value to permissionType + * @param {Choice} permissionType An instance of Choice + */ + setPermissionType(permissionType) { + if((permissionType != null) && (!(permissionType instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: permissionType EXPECTED TYPE: Choice", null, null); + } + this.permissionType = permissionType; + this.keyModified.set("permission_type", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("modified_by", 1); + + } + + /** + * The method to get the description + * @returns {String} A String representing the description + */ + getDescription() { + return this.description; + + } + + /** + * The method to set the value to description + * @param {String} description A String representing the description + */ + setDescription(description) { + if((description != null) && (!(Object.prototype.toString.call(description) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: description EXPECTED TYPE: String", null, null); + } + this.description = description; + this.keyModified.set("description", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 1); + + } + + /** + * The method to get the accountRuleCriteria + * @returns {Criteria} An instance of Criteria + */ + getAccountRuleCriteria() { + return this.accountRuleCriteria; + + } + + /** + * The method to set the value to accountRuleCriteria + * @param {Criteria} accountRuleCriteria An instance of Criteria + */ + async setAccountRuleCriteria(accountRuleCriteria) { + const Criteria = (await (import("./criteria.js"))).MasterModel; + if((accountRuleCriteria != null) && (!(accountRuleCriteria instanceof Criteria))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: accountRuleCriteria EXPECTED TYPE: Criteria", null, null); + } + this.accountRuleCriteria = accountRuleCriteria; + this.keyModified.set("account_rule_criteria", 1); + + } + + /** + * The method to get the dealRuleCriteria + * @returns {Criteria} An instance of Criteria + */ + getDealRuleCriteria() { + return this.dealRuleCriteria; + + } + + /** + * The method to set the value to dealRuleCriteria + * @param {Criteria} dealRuleCriteria An instance of Criteria + */ + async setDealRuleCriteria(dealRuleCriteria) { + const Criteria = (await (import("./criteria.js"))).MasterModel; + if((dealRuleCriteria != null) && (!(dealRuleCriteria instanceof Criteria))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dealRuleCriteria EXPECTED TYPE: Criteria", null, null); + } + this.dealRuleCriteria = dealRuleCriteria; + this.keyModified.set("deal_rule_criteria", 1); + + } + + /** + * The method to get the leadRuleCriteria + * @returns {Criteria} An instance of Criteria + */ + getLeadRuleCriteria() { + return this.leadRuleCriteria; + + } + + /** + * The method to set the value to leadRuleCriteria + * @param {Criteria} leadRuleCriteria An instance of Criteria + */ + async setLeadRuleCriteria(leadRuleCriteria) { + const Criteria = (await (import("./criteria.js"))).MasterModel; + if((leadRuleCriteria != null) && (!(leadRuleCriteria instanceof Criteria))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: leadRuleCriteria EXPECTED TYPE: Criteria", null, null); + } + this.leadRuleCriteria = leadRuleCriteria; + this.keyModified.set("lead_rule_criteria", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + Territories as MasterModel, + Territories as Territories +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/territories_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/territories_operations.js new file mode 100644 index 0000000..7b47178 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/territories_operations.js @@ -0,0 +1,321 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 TerritoriesOperations{ + /** + * The method to get territories + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getTerritories(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/territories"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to create territories + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createTerritories(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/territories"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update territories + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateTerritories(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/territories"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete territories + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteTerritories(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/territories"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get territory + * @param {BigInt} id A BigInt representing the id + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getTerritory(id) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/territories/"); + apiPath = apiPath.concat(id.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/json"); + + } + + /** + * The method to update territory + * @param {BigInt} id A BigInt representing the id + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateTerritory(id, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/territories/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete territory + * @param {BigInt} id A BigInt representing the id + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteTerritory(id, paramInstance=null) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/territories/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get child territory + * @param {BigInt} id A BigInt representing the id + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getChildTerritory(id, paramInstance=null) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/territories/"); + apiPath = apiPath.concat(id.toString()); + apiPath = apiPath.concat("/__child_territories"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to get associated user count + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getAssociatedUserCount() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/territories/actions/associated_users_count"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to transfer and delete territory + * @param {BigInt} id A BigInt representing the id + * @param {TransferBodyWrapper} request An instance of TransferBodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async transferAndDeleteTerritory(id, request) { + const TransferBodyWrapper = (await (import("./transfer_body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof TransferBodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: TransferBodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/territories/"); + apiPath = apiPath.concat(id.toString()); + apiPath = apiPath.concat("/actions/transfer_and_delete"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to transfer and delete territories + * @param {TransferBodyWrapper} request An instance of TransferBodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async transferAndDeleteTerritories(request) { + const TransferBodyWrapper = (await (import("./transfer_body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof TransferBodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: TransferBodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/territories/actions/transfer_and_delete"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class GetTerritoriesParam{ + + static FILTERS = new Param("filters", "com.zoho.crm.api.Territories.GetTerritoriesParam"); +} + +class DeleteTerritoriesParam{ + + static IDS = new Param("ids", "com.zoho.crm.api.Territories.DeleteTerritoriesParam"); + static DELETE_PREVIOUS_FORECASTS = new Param("delete_previous_forecasts", "com.zoho.crm.api.Territories.DeleteTerritoriesParam"); +} + +class DeleteTerritoryParam{ + + static DELETE_PREVIOUS_FORECASTS = new Param("delete_previous_forecasts", "com.zoho.crm.api.Territories.DeleteTerritoryParam"); +} + +class GetChildTerritoryParam{ + + static FILTERS = new Param("filters", "com.zoho.crm.api.Territories.GetChildTerritoryParam"); +} + +export { + TerritoriesOperations as MasterModel, + TerritoriesOperations as TerritoriesOperations, + DeleteTerritoriesParam as DeleteTerritoriesParam, + GetChildTerritoryParam as GetChildTerritoryParam, + DeleteTerritoryParam as DeleteTerritoryParam, + GetTerritoriesParam as GetTerritoriesParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/transfer_body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/transfer_body_wrapper.js new file mode 100644 index 0000000..25c44fa --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/transfer_body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class TransferBodyWrapper{ + + territories; + keyModified = new Map(); + /** + * The method to get the territories + * @returns {Array} An Array representing the territories + */ + getTerritories() { + return this.territories; + + } + + /** + * The method to set the value to territories + * @param {Array} territories An Array representing the territories + */ + setTerritories(territories) { + if((territories != null) && (!(Object.prototype.toString.call(territories) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territories EXPECTED TYPE: Array", null, null); + } + this.territories = territories; + this.keyModified.set("territories", 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 { + TransferBodyWrapper as MasterModel, + TransferBodyWrapper as TransferBodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territories/transfer_territory.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/transfer_territory.js new file mode 100644 index 0000000..29ecc7c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territories/transfer_territory.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class TransferTerritory{ + + id; + transferToId; + deletePreviousForecasts; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the transferToId + * @returns {BigInt} A BigInt representing the transferToId + */ + getTransferToId() { + return this.transferToId; + + } + + /** + * The method to set the value to transferToId + * @param {BigInt} transferToId A BigInt representing the transferToId + */ + setTransferToId(transferToId) { + if((transferToId != null) && (!(Object.prototype.toString.call(transferToId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: transferToId EXPECTED TYPE: BigInt", null, null); + } + this.transferToId = transferToId; + this.keyModified.set("transfer_to_id", 1); + + } + + /** + * The method to get the deletePreviousForecasts + * @returns {Boolean} A Boolean representing the deletePreviousForecasts + */ + getDeletePreviousForecasts() { + return this.deletePreviousForecasts; + + } + + /** + * The method to set the value to deletePreviousForecasts + * @param {Boolean} deletePreviousForecasts A Boolean representing the deletePreviousForecasts + */ + setDeletePreviousForecasts(deletePreviousForecasts) { + if((deletePreviousForecasts != null) && (!(Object.prototype.toString.call(deletePreviousForecasts) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deletePreviousForecasts EXPECTED TYPE: Boolean", null, null); + } + this.deletePreviousForecasts = deletePreviousForecasts; + this.keyModified.set("delete_previous_forecasts", 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 { + TransferTerritory as MasterModel, + TransferTerritory as TransferTerritory +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/action_wrapper.js new file mode 100644 index 0000000..2b894c9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + users; + keyModified = new Map(); + /** + * The method to get the users + * @returns {Array} An Array representing the users + */ + getUsers() { + return this.users; + + } + + /** + * The method to set the value to users + * @param {Array} users An Array representing the users + */ + setUsers(users) { + if((users != null) && (!(Object.prototype.toString.call(users) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: users EXPECTED TYPE: Array", null, null); + } + this.users = users; + this.keyModified.set("users", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/api_exception.js new file mode 100644 index 0000000..eef1972 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/body_wrapper.js new file mode 100644 index 0000000..c843bdc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + users; + keyModified = new Map(); + /** + * The method to get the users + * @returns {Array} An Array representing the users + */ + getUsers() { + return this.users; + + } + + /** + * The method to set the value to users + * @param {Array} users An Array representing the users + */ + setUsers(users) { + if((users != null) && (!(Object.prototype.toString.call(users) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: users EXPECTED TYPE: Array", null, null); + } + this.users = users; + this.keyModified.set("users", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/import_territory_users.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/import_territory_users.js new file mode 100644 index 0000000..1c8910c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/import_territory_users.js @@ -0,0 +1,11 @@ +export { APIException } from "./api_exception.js"; +export { Info } from "./info.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { TerritoryUsersOperations } from "./territory_users_operations.js"; +export { DeassociateTerritoryUsersParam } from "./territory_users_operations.js"; +export * as ActionHandler from "./action_handler.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export * as ResponseHandler from "./response_handler.js"; +export * as ActionResponse from "./action_response.js"; +export { SuccessResponse } from "./success_response.js"; +export { ActionWrapper } from "./action_wrapper.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/info.js new file mode 100644 index 0000000..e495623 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/info.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + perPage; + count; + page; + moreRecords; + keyModified = new Map(); + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/response_wrapper.js new file mode 100644 index 0000000..a9538dd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + users; + info; + keyModified = new Map(); + /** + * The method to get the users + * @returns {Array} An Array representing the users + */ + getUsers() { + return this.users; + + } + + /** + * The method to set the value to users + * @param {Array} users An Array representing the users + */ + setUsers(users) { + if((users != null) && (!(Object.prototype.toString.call(users) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: users EXPECTED TYPE: Array", null, null); + } + this.users = users; + this.keyModified.set("users", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/success_response.js new file mode 100644 index 0000000..6cdb15e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/territory_users_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/territory_users_operations.js new file mode 100644 index 0000000..1a32554 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/territory_users/territory_users_operations.js @@ -0,0 +1,192 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 TerritoryUsersOperations{ + /** + * The method to get territory users + * @param {BigInt} territory A BigInt representing the territory + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getTerritoryUsers(territory) { + if((!(Object.prototype.toString.call(territory) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territory EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/territories/"); + apiPath = apiPath.concat(territory.toString()); + apiPath = apiPath.concat("/users"); + 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"); + + } + + /** + * The method to update territory users + * @param {BigInt} territory A BigInt representing the territory + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateTerritoryUsers(territory, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(territory) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territory EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/territories/"); + apiPath = apiPath.concat(territory.toString()); + apiPath = apiPath.concat("/users"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to deassociate territory users + * @param {BigInt} territory A BigInt representing the territory + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deassociateTerritoryUsers(territory, paramInstance=null) { + if((!(Object.prototype.toString.call(territory) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territory EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/territories/"); + apiPath = apiPath.concat(territory.toString()); + apiPath = apiPath.concat("/users"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get territory user + * @param {BigInt} user A BigInt representing the user + * @param {BigInt} territory A BigInt representing the territory + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getTerritoryUser(user, territory) { + if((!(Object.prototype.toString.call(user) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: user EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(territory) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territory EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/territories/"); + apiPath = apiPath.concat(territory.toString()); + apiPath = apiPath.concat("/users/"); + apiPath = apiPath.concat(user.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/json"); + + } + + /** + * The method to update territory user + * @param {BigInt} user A BigInt representing the user + * @param {BigInt} territory A BigInt representing the territory + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateTerritoryUser(user, territory) { + if((!(Object.prototype.toString.call(user) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: user EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(territory) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territory EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/territories/"); + apiPath = apiPath.concat(territory.toString()); + apiPath = apiPath.concat("/users/"); + apiPath = apiPath.concat(user.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to deassociate territory user + * @param {BigInt} user A BigInt representing the user + * @param {BigInt} territory A BigInt representing the territory + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deassociateTerritoryUser(user, territory) { + if((!(Object.prototype.toString.call(user) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: user EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(territory) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territory EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/territories/"); + apiPath = apiPath.concat(territory.toString()); + apiPath = apiPath.concat("/users/"); + apiPath = apiPath.concat(user.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class DeassociateTerritoryUsersParam{ + + static IDS = new Param("ids", "com.zoho.crm.api.TerritoryUsers.DeassociateTerritoryUsersParam"); +} + +export { + TerritoryUsersOperations as MasterModel, + TerritoryUsersOperations as TerritoryUsersOperations, + DeassociateTerritoryUsersParam as DeassociateTerritoryUsersParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/automation_detail.js b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/automation_detail.js new file mode 100644 index 0000000..23c0cc7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/automation_detail.js @@ -0,0 +1,114 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AutomationDetail{ + + type; + rule; + pathfinder; + keyModified = new Map(); + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the rule + * @returns {NameIdStructure} An instance of NameIdStructure + */ + getRule() { + return this.rule; + + } + + /** + * The method to set the value to rule + * @param {NameIdStructure} rule An instance of NameIdStructure + */ + async setRule(rule) { + const NameIdStructure = (await (import("./name_id_structure.js"))).MasterModel; + if((rule != null) && (!(rule instanceof NameIdStructure))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: rule EXPECTED TYPE: NameIdStructure", null, null); + } + this.rule = rule; + this.keyModified.set("rule", 1); + + } + + /** + * The method to get the pathfinder + * @returns {PathFinder} An instance of PathFinder + */ + getPathfinder() { + return this.pathfinder; + + } + + /** + * The method to set the value to pathfinder + * @param {PathFinder} pathfinder An instance of PathFinder + */ + async setPathfinder(pathfinder) { + const PathFinder = (await (import("./path_finder.js"))).MasterModel; + if((pathfinder != null) && (!(pathfinder instanceof PathFinder))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pathfinder EXPECTED TYPE: PathFinder", null, null); + } + this.pathfinder = pathfinder; + this.keyModified.set("pathfinder", 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 { + AutomationDetail as MasterModel, + AutomationDetail as AutomationDetail +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/field_history.js b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/field_history.js new file mode 100644 index 0000000..baaf476 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/field_history.js @@ -0,0 +1,205 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class FieldHistory{ + + dataType; + enableColourCode; + pickListValues; + fieldLabel; + apiName; + id; + value; + keyModified = new Map(); + /** + * The method to get the dataType + * @returns {String} A String representing the dataType + */ + getDataType() { + return this.dataType; + + } + + /** + * The method to set the value to dataType + * @param {String} dataType A String representing the dataType + */ + setDataType(dataType) { + if((dataType != null) && (!(Object.prototype.toString.call(dataType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dataType EXPECTED TYPE: String", null, null); + } + this.dataType = dataType; + this.keyModified.set("data_type", 1); + + } + + /** + * The method to get the enableColourCode + * @returns {Boolean} A Boolean representing the enableColourCode + */ + getEnableColourCode() { + return this.enableColourCode; + + } + + /** + * The method to set the value to enableColourCode + * @param {Boolean} enableColourCode A Boolean representing the enableColourCode + */ + setEnableColourCode(enableColourCode) { + if((enableColourCode != null) && (!(Object.prototype.toString.call(enableColourCode) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: enableColourCode EXPECTED TYPE: Boolean", null, null); + } + this.enableColourCode = enableColourCode; + this.keyModified.set("enable_colour_code", 1); + + } + + /** + * The method to get the pickListValues + * @returns {Array} An Array representing the pickListValues + */ + getPickListValues() { + return this.pickListValues; + + } + + /** + * The method to set the value to pickListValues + * @param {Array} pickListValues An Array representing the pickListValues + */ + setPickListValues(pickListValues) { + if((pickListValues != null) && (!(Object.prototype.toString.call(pickListValues) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: pickListValues EXPECTED TYPE: Array", null, null); + } + this.pickListValues = pickListValues; + this.keyModified.set("pick_list_values", 1); + + } + + /** + * The method to get the fieldLabel + * @returns {String} A String representing the fieldLabel + */ + getFieldLabel() { + return this.fieldLabel; + + } + + /** + * The method to set the value to fieldLabel + * @param {String} fieldLabel A String representing the fieldLabel + */ + setFieldLabel(fieldLabel) { + if((fieldLabel != null) && (!(Object.prototype.toString.call(fieldLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldLabel EXPECTED TYPE: String", null, null); + } + this.fieldLabel = fieldLabel; + this.keyModified.set("field_label", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the value + * @returns {FieldHistoryValue} An instance of FieldHistoryValue + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {FieldHistoryValue} value An instance of FieldHistoryValue + */ + async setValue(value) { + const FieldHistoryValue = (await (import("./field_history_value.js"))).MasterModel; + if((value != null) && (!(value instanceof FieldHistoryValue))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: value EXPECTED TYPE: FieldHistoryValue", null, null); + } + this.value = value; + this.keyModified.set("_value", 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 { + FieldHistory as MasterModel, + FieldHistory as FieldHistory +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/field_history_value.js b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/field_history_value.js new file mode 100644 index 0000000..fb77196 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/field_history_value.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class FieldHistoryValue{ + + new1; + old; + keyModified = new Map(); + /** + * The method to get the new + * @returns {String} A String representing the new1 + */ + getNew() { + return this.new1; + + } + + /** + * The method to set the value to new + * @param {String} new1 A String representing the new1 + */ + setNew(new1) { + if((new1 != null) && (!(Object.prototype.toString.call(new1) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: new1 EXPECTED TYPE: String", null, null); + } + this.new1 = new1; + this.keyModified.set("new", 1); + + } + + /** + * The method to get the old + * @returns {String} A String representing the old + */ + getOld() { + return this.old; + + } + + /** + * The method to set the value to old + * @param {String} old A String representing the old + */ + setOld(old) { + if((old != null) && (!(Object.prototype.toString.call(old) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: old EXPECTED TYPE: String", null, null); + } + this.old = old; + this.keyModified.set("old", 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 { + FieldHistoryValue as MasterModel, + FieldHistoryValue as FieldHistoryValue +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/import_timelines.js b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/import_timelines.js new file mode 100644 index 0000000..37f22d8 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/import_timelines.js @@ -0,0 +1,17 @@ +export { NameIdStructure } from "./name_id_structure.js"; +export { FieldHistoryValue } from "./field_history_value.js"; +export { PicklistDetail } from "./picklist_detail.js"; +export { AutomationDetail } from "./automation_detail.js"; +export { PathFinder } from "./path_finder.js"; +export { Record } from "./record.js"; +export { Info } from "./info.js"; +export { State } from "./state.js"; +export { Timeline } from "./timeline.js"; +export { Module } from "./module.js"; +export { RelatedRecord } from "./related_record.js"; +export { FieldHistory } from "./field_history.js"; +export * as ResponseHandler from "./response_handler.js"; +export { APIException } from "./api_exception.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { TimelinesOperations } from "./timelines_operations.js"; +export { GetTimelinesParam } from "./timelines_operations.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/info.js new file mode 100644 index 0000000..f95dc93 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/info.js @@ -0,0 +1,181 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + perPage; + page; + count; + moreRecords; + nextPageToken; + previousPageToken; + keyModified = new Map(); + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 1); + + } + + /** + * The method to get the nextPageToken + * @returns {String} A String representing the nextPageToken + */ + getNextPageToken() { + return this.nextPageToken; + + } + + /** + * The method to set the value to nextPageToken + * @param {String} nextPageToken A String representing the nextPageToken + */ + setNextPageToken(nextPageToken) { + if((nextPageToken != null) && (!(Object.prototype.toString.call(nextPageToken) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: nextPageToken EXPECTED TYPE: String", null, null); + } + this.nextPageToken = nextPageToken; + this.keyModified.set("next_page_token", 1); + + } + + /** + * The method to get the previousPageToken + * @returns {String} A String representing the previousPageToken + */ + getPreviousPageToken() { + return this.previousPageToken; + + } + + /** + * The method to set the value to previousPageToken + * @param {String} previousPageToken A String representing the previousPageToken + */ + setPreviousPageToken(previousPageToken) { + if((previousPageToken != null) && (!(Object.prototype.toString.call(previousPageToken) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: previousPageToken EXPECTED TYPE: String", null, null); + } + this.previousPageToken = previousPageToken; + this.keyModified.set("previous_page_token", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/module.js b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/module.js new file mode 100644 index 0000000..986d9b3 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/module.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Module{ + + apiName; + id; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Module as MasterModel, + Module as Module +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/name_id_structure.js b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/name_id_structure.js new file mode 100644 index 0000000..54cd081 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/name_id_structure.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class NameIdStructure{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + NameIdStructure as MasterModel, + NameIdStructure as NameIdStructure +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/path_finder.js b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/path_finder.js new file mode 100644 index 0000000..de8bd7d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/path_finder.js @@ -0,0 +1,113 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class PathFinder{ + + processEntry; + processExit; + state; + keyModified = new Map(); + /** + * The method to get the processEntry + * @returns {Boolean} A Boolean representing the processEntry + */ + getProcessEntry() { + return this.processEntry; + + } + + /** + * The method to set the value to processEntry + * @param {Boolean} processEntry A Boolean representing the processEntry + */ + setProcessEntry(processEntry) { + if((processEntry != null) && (!(Object.prototype.toString.call(processEntry) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: processEntry EXPECTED TYPE: Boolean", null, null); + } + this.processEntry = processEntry; + this.keyModified.set("process_entry", 1); + + } + + /** + * The method to get the processExit + * @returns {Boolean} A Boolean representing the processExit + */ + getProcessExit() { + return this.processExit; + + } + + /** + * The method to set the value to processExit + * @param {Boolean} processExit A Boolean representing the processExit + */ + setProcessExit(processExit) { + if((processExit != null) && (!(Object.prototype.toString.call(processExit) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: processExit EXPECTED TYPE: Boolean", null, null); + } + this.processExit = processExit; + this.keyModified.set("process_exit", 1); + + } + + /** + * The method to get the state + * @returns {State} An instance of State + */ + getState() { + return this.state; + + } + + /** + * The method to set the value to state + * @param {State} state An instance of State + */ + async setState(state) { + const State = (await (import("./state.js"))).MasterModel; + if((state != null) && (!(state instanceof State))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: state EXPECTED TYPE: State", null, null); + } + this.state = state; + this.keyModified.set("state", 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 { + PathFinder as MasterModel, + PathFinder as PathFinder +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/picklist_detail.js b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/picklist_detail.js new file mode 100644 index 0000000..d1db6e3 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/picklist_detail.js @@ -0,0 +1,181 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class PicklistDetail{ + + displayValue; + sequenceNumber; + colourCode; + actualValue; + id; + type; + keyModified = new Map(); + /** + * The method to get the displayValue + * @returns {String} A String representing the displayValue + */ + getDisplayValue() { + return this.displayValue; + + } + + /** + * The method to set the value to displayValue + * @param {String} displayValue A String representing the displayValue + */ + setDisplayValue(displayValue) { + if((displayValue != null) && (!(Object.prototype.toString.call(displayValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayValue EXPECTED TYPE: String", null, null); + } + this.displayValue = displayValue; + this.keyModified.set("display_value", 1); + + } + + /** + * The method to get the sequenceNumber + * @returns {number} A number representing the sequenceNumber + */ + getSequenceNumber() { + return this.sequenceNumber; + + } + + /** + * The method to set the value to sequenceNumber + * @param {number} sequenceNumber A number representing the sequenceNumber + */ + setSequenceNumber(sequenceNumber) { + if((sequenceNumber != null) && (!(Object.prototype.toString.call(sequenceNumber) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sequenceNumber EXPECTED TYPE: number", null, null); + } + this.sequenceNumber = sequenceNumber; + this.keyModified.set("sequence_number", 1); + + } + + /** + * The method to get the colourCode + * @returns {String} A String representing the colourCode + */ + getColourCode() { + return this.colourCode; + + } + + /** + * The method to set the value to colourCode + * @param {String} colourCode A String representing the colourCode + */ + setColourCode(colourCode) { + if((colourCode != null) && (!(Object.prototype.toString.call(colourCode) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: colourCode EXPECTED TYPE: String", null, null); + } + this.colourCode = colourCode; + this.keyModified.set("colour_code", 1); + + } + + /** + * The method to get the actualValue + * @returns {String} A String representing the actualValue + */ + getActualValue() { + return this.actualValue; + + } + + /** + * The method to set the value to actualValue + * @param {String} actualValue A String representing the actualValue + */ + setActualValue(actualValue) { + if((actualValue != null) && (!(Object.prototype.toString.call(actualValue) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: actualValue EXPECTED TYPE: String", null, null); + } + this.actualValue = actualValue; + this.keyModified.set("actual_value", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 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 { + PicklistDetail as MasterModel, + PicklistDetail as PicklistDetail +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/record.js b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/record.js new file mode 100644 index 0000000..94a694e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/record.js @@ -0,0 +1,113 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Record{ + + name; + id; + module; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the module + * @returns {Module} An instance of Module + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {Module} module An instance of Module + */ + async setModule(module) { + const Module = (await (import("./module.js"))).MasterModel; + if((module != null) && (!(module instanceof Module))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: Module", null, null); + } + this.module = module; + this.keyModified.set("module", 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 { + Record as MasterModel, + Record as Record +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/related_record.js b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/related_record.js new file mode 100644 index 0000000..2eb58fa --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/related_record.js @@ -0,0 +1,113 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class RelatedRecord{ + + name; + id; + module; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the module + * @returns {NameIdStructure} An instance of NameIdStructure + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {NameIdStructure} module An instance of NameIdStructure + */ + async setModule(module) { + const NameIdStructure = (await (import("./name_id_structure.js"))).MasterModel; + if((module != null) && (!(module instanceof NameIdStructure))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: NameIdStructure", null, null); + } + this.module = module; + this.keyModified.set("module", 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 { + RelatedRecord as MasterModel, + RelatedRecord as RelatedRecord +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/response_wrapper.js new file mode 100644 index 0000000..0a9c898 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + timeline; + info; + keyModified = new Map(); + /** + * The method to get the timeline + * @returns {Array} An Array representing the timeline + */ + getTimeline() { + return this.timeline; + + } + + /** + * The method to set the value to timeline + * @param {Array} timeline An Array representing the timeline + */ + setTimeline(timeline) { + if((timeline != null) && (!(Object.prototype.toString.call(timeline) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: timeline EXPECTED TYPE: Array", null, null); + } + this.timeline = timeline; + this.keyModified.set("__timeline", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/state.js b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/state.js new file mode 100644 index 0000000..8a9baad --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/state.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class State{ + + triggerType; + name; + isLastState; + id; + keyModified = new Map(); + /** + * The method to get the triggerType + * @returns {String} A String representing the triggerType + */ + getTriggerType() { + return this.triggerType; + + } + + /** + * The method to set the value to triggerType + * @param {String} triggerType A String representing the triggerType + */ + setTriggerType(triggerType) { + if((triggerType != null) && (!(Object.prototype.toString.call(triggerType) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: triggerType EXPECTED TYPE: String", null, null); + } + this.triggerType = triggerType; + this.keyModified.set("trigger_type", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the isLastState + * @returns {Boolean} A Boolean representing the isLastState + */ + getIsLastState() { + return this.isLastState; + + } + + /** + * The method to set the value to isLastState + * @param {Boolean} isLastState A Boolean representing the isLastState + */ + setIsLastState(isLastState) { + if((isLastState != null) && (!(Object.prototype.toString.call(isLastState) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: isLastState EXPECTED TYPE: Boolean", null, null); + } + this.isLastState = isLastState; + this.keyModified.set("is_last_state", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + State as MasterModel, + State as State +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/timeline.js b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/timeline.js new file mode 100644 index 0000000..018c7f7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/timeline.js @@ -0,0 +1,300 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Timeline{ + + auditedTime; + action; + id; + source; + extension; + type; + doneBy; + relatedRecord; + automationDetails; + record; + fieldHistory; + keyModified = new Map(); + /** + * The method to get the auditedTime + * @returns {Date} An instance of Date + */ + getAuditedTime() { + return this.auditedTime; + + } + + /** + * The method to set the value to auditedTime + * @param {Date} auditedTime An instance of Date + */ + setAuditedTime(auditedTime) { + if((auditedTime != null) && (!(auditedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: auditedTime EXPECTED TYPE: Date", null, null); + } + this.auditedTime = auditedTime; + this.keyModified.set("audited_time", 1); + + } + + /** + * The method to get the action + * @returns {String} A String representing the action + */ + getAction() { + return this.action; + + } + + /** + * The method to set the value to action + * @param {String} action A String representing the action + */ + setAction(action) { + if((action != null) && (!(Object.prototype.toString.call(action) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: action EXPECTED TYPE: String", null, null); + } + this.action = action; + this.keyModified.set("action", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the source + * @returns {String} A String representing the source + */ + getSource() { + return this.source; + + } + + /** + * The method to set the value to source + * @param {String} source A String representing the source + */ + setSource(source) { + if((source != null) && (!(Object.prototype.toString.call(source) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: source EXPECTED TYPE: String", null, null); + } + this.source = source; + this.keyModified.set("source", 1); + + } + + /** + * The method to get the extension + * @returns {String} A String representing the extension + */ + getExtension() { + return this.extension; + + } + + /** + * The method to set the value to extension + * @param {String} extension A String representing the extension + */ + setExtension(extension) { + if((extension != null) && (!(Object.prototype.toString.call(extension) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: extension EXPECTED TYPE: String", null, null); + } + this.extension = extension; + this.keyModified.set("extension", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the doneBy + * @returns {NameIdStructure} An instance of NameIdStructure + */ + getDoneBy() { + return this.doneBy; + + } + + /** + * The method to set the value to doneBy + * @param {NameIdStructure} doneBy An instance of NameIdStructure + */ + async setDoneBy(doneBy) { + const NameIdStructure = (await (import("./name_id_structure.js"))).MasterModel; + if((doneBy != null) && (!(doneBy instanceof NameIdStructure))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: doneBy EXPECTED TYPE: NameIdStructure", null, null); + } + this.doneBy = doneBy; + this.keyModified.set("done_by", 1); + + } + + /** + * The method to get the relatedRecord + * @returns {RelatedRecord} An instance of RelatedRecord + */ + getRelatedRecord() { + return this.relatedRecord; + + } + + /** + * The method to set the value to relatedRecord + * @param {RelatedRecord} relatedRecord An instance of RelatedRecord + */ + async setRelatedRecord(relatedRecord) { + const RelatedRecord = (await (import("./related_record.js"))).MasterModel; + if((relatedRecord != null) && (!(relatedRecord instanceof RelatedRecord))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: relatedRecord EXPECTED TYPE: RelatedRecord", null, null); + } + this.relatedRecord = relatedRecord; + this.keyModified.set("related_record", 1); + + } + + /** + * The method to get the automationDetails + * @returns {AutomationDetail} An instance of AutomationDetail + */ + getAutomationDetails() { + return this.automationDetails; + + } + + /** + * The method to set the value to automationDetails + * @param {AutomationDetail} automationDetails An instance of AutomationDetail + */ + async setAutomationDetails(automationDetails) { + const AutomationDetail = (await (import("./automation_detail.js"))).MasterModel; + if((automationDetails != null) && (!(automationDetails instanceof AutomationDetail))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: automationDetails EXPECTED TYPE: AutomationDetail", null, null); + } + this.automationDetails = automationDetails; + this.keyModified.set("automation_details", 1); + + } + + /** + * The method to get the record + * @returns {Record} An instance of Record + */ + getRecord() { + return this.record; + + } + + /** + * The method to set the value to record + * @param {Record} record An instance of Record + */ + async setRecord(record) { + const Record = (await (import("./record.js"))).MasterModel; + if((record != null) && (!(record instanceof Record))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: record EXPECTED TYPE: Record", null, null); + } + this.record = record; + this.keyModified.set("record", 1); + + } + + /** + * The method to get the fieldHistory + * @returns {Array} An Array representing the fieldHistory + */ + getFieldHistory() { + return this.fieldHistory; + + } + + /** + * The method to set the value to fieldHistory + * @param {Array} fieldHistory An Array representing the fieldHistory + */ + setFieldHistory(fieldHistory) { + if((fieldHistory != null) && (!(Object.prototype.toString.call(fieldHistory) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fieldHistory EXPECTED TYPE: Array", null, null); + } + this.fieldHistory = fieldHistory; + this.keyModified.set("field_history", 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 { + Timeline as MasterModel, + Timeline as Timeline +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/timelines_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/timelines_operations.js new file mode 100644 index 0000000..2b8d5a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/timelines/timelines_operations.js @@ -0,0 +1,63 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 TimelinesOperations{ + /** + * The method to get timelines + * @param {String} module A String representing the module + * @param {String} recordId A String representing the recordId + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getTimelines(module, recordId, paramInstance=null) { + if((!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + if((!(Object.prototype.toString.call(recordId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: recordId EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/"); + apiPath = apiPath.concat(module.toString()); + apiPath = apiPath.concat("/"); + apiPath = apiPath.concat(recordId.toString()); + apiPath = apiPath.concat("/__timeline"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + +} +class GetTimelinesParam{ + + static INCLUDE_INNER_DETAILS = new Param("include_inner_details", "com.zoho.crm.api.Timelines.GetTimelinesParam"); + static SORT_BY = new Param("sort_by", "com.zoho.crm.api.Timelines.GetTimelinesParam"); + static SORT_ORDER = new Param("sort_order", "com.zoho.crm.api.Timelines.GetTimelinesParam"); + static INCLUDE_TIMELINE_TYPE = new Param("include_timeline_type", "com.zoho.crm.api.Timelines.GetTimelinesParam"); + static INCLUDE = new Param("include", "com.zoho.crm.api.Timelines.GetTimelinesParam"); + static FILTERS = new Param("filters", "com.zoho.crm.api.Timelines.GetTimelinesParam"); + static PER_PAGE = new Param("per_page", "com.zoho.crm.api.Timelines.GetTimelinesParam"); + static PAGE = new Param("page", "com.zoho.crm.api.Timelines.GetTimelinesParam"); + static PAGE_TOKEN = new Param("page_token", "com.zoho.crm.api.Timelines.GetTimelinesParam"); +} + +export { + TimelinesOperations as MasterModel, + TimelinesOperations as TimelinesOperations, + GetTimelinesParam as GetTimelinesParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/action_wrapper.js new file mode 100644 index 0000000..09113ac --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + userGroups; + keyModified = new Map(); + /** + * The method to get the userGroups + * @returns {Array} An Array representing the userGroups + */ + getUserGroups() { + return this.userGroups; + + } + + /** + * The method to set the value to userGroups + * @param {Array} userGroups An Array representing the userGroups + */ + setUserGroups(userGroups) { + if((userGroups != null) && (!(Object.prototype.toString.call(userGroups) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: userGroups EXPECTED TYPE: Array", null, null); + } + this.userGroups = userGroups; + this.keyModified.set("user_groups", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/api_exception.js new file mode 100644 index 0000000..db2d361 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/associated_user.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/associated_user.js new file mode 100644 index 0000000..1d55241 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/associated_user.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AssociatedUser{ + + userGroup; + count; + keyModified = new Map(); + /** + * The method to get the userGroup + * @returns {UserGroup} An instance of UserGroup + */ + getUserGroup() { + return this.userGroup; + + } + + /** + * The method to set the value to userGroup + * @param {UserGroup} userGroup An instance of UserGroup + */ + async setUserGroup(userGroup) { + const UserGroup = (await (import("./user_group.js"))).MasterModel; + if((userGroup != null) && (!(userGroup instanceof UserGroup))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: userGroup EXPECTED TYPE: UserGroup", null, null); + } + this.userGroup = userGroup; + this.keyModified.set("user_group", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 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 { + AssociatedUser as MasterModel, + AssociatedUser as AssociatedUser +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/associated_user_count.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/associated_user_count.js new file mode 100644 index 0000000..e046c48 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/associated_user_count.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AssociatedUserCount{ + + associatedUsersCount; + info; + keyModified = new Map(); + /** + * The method to get the associatedUsersCount + * @returns {Array} An Array representing the associatedUsersCount + */ + getAssociatedUsersCount() { + return this.associatedUsersCount; + + } + + /** + * The method to set the value to associatedUsersCount + * @param {Array} associatedUsersCount An Array representing the associatedUsersCount + */ + setAssociatedUsersCount(associatedUsersCount) { + if((associatedUsersCount != null) && (!(Object.prototype.toString.call(associatedUsersCount) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: associatedUsersCount EXPECTED TYPE: Array", null, null); + } + this.associatedUsersCount = associatedUsersCount; + this.keyModified.set("associated_users_count", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + AssociatedUserCount as MasterModel, + AssociatedUserCount as AssociatedUserCount +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/association_module.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/association_module.js new file mode 100644 index 0000000..afaa7a5 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/association_module.js @@ -0,0 +1,67 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AssociationModule{ + + module; + keyModified = new Map(); + /** + * The method to get the module + * @returns {MinifiedModule} An instance of MinifiedModule + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {MinifiedModule} module An instance of MinifiedModule + */ + async setModule(module) { + const MinifiedModule = (await (import("../modules/minified_module.js"))).MasterModel; + if((module != null) && (!(module instanceof MinifiedModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: MinifiedModule", null, null); + } + this.module = module; + this.keyModified.set("module", 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 { + AssociationModule as MasterModel, + AssociationModule as AssociationModule +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/association_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/association_response.js new file mode 100644 index 0000000..a09e365 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/association_response.js @@ -0,0 +1,114 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AssociationResponse{ + + type; + resource; + detail; + keyModified = new Map(); + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the resource + * @returns {Resource} An instance of Resource + */ + getResource() { + return this.resource; + + } + + /** + * The method to set the value to resource + * @param {Resource} resource An instance of Resource + */ + async setResource(resource) { + const Resource = (await (import("./resource.js"))).MasterModel; + if((resource != null) && (!(resource instanceof Resource))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: resource EXPECTED TYPE: Resource", null, null); + } + this.resource = resource; + this.keyModified.set("resource", 1); + + } + + /** + * The method to get the detail + * @returns {AssociationModule} An instance of AssociationModule + */ + getDetail() { + return this.detail; + + } + + /** + * The method to set the value to detail + * @param {AssociationModule} detail An instance of AssociationModule + */ + async setDetail(detail) { + const AssociationModule = (await (import("./association_module.js"))).MasterModel; + if((detail != null) && (!(detail instanceof AssociationModule))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: detail EXPECTED TYPE: AssociationModule", null, null); + } + this.detail = detail; + this.keyModified.set("detail", 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 { + AssociationResponse as MasterModel, + AssociationResponse as AssociationResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/association_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/association_wrapper.js new file mode 100644 index 0000000..21a03c2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/association_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AssociationWrapper{ + + associations; + keyModified = new Map(); + /** + * The method to get the associations + * @returns {Array} An Array representing the associations + */ + getAssociations() { + return this.associations; + + } + + /** + * The method to set the value to associations + * @param {Array} associations An Array representing the associations + */ + setAssociations(associations) { + if((associations != null) && (!(Object.prototype.toString.call(associations) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: associations EXPECTED TYPE: Array", null, null); + } + this.associations = associations; + this.keyModified.set("associations", 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 { + AssociationWrapper as MasterModel, + AssociationWrapper as AssociationWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/body_wrapper.js new file mode 100644 index 0000000..7b92807 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + userGroups; + keyModified = new Map(); + /** + * The method to get the userGroups + * @returns {Array} An Array representing the userGroups + */ + getUserGroups() { + return this.userGroups; + + } + + /** + * The method to set the value to userGroups + * @param {Array} userGroups An Array representing the userGroups + */ + setUserGroups(userGroups) { + if((userGroups != null) && (!(Object.prototype.toString.call(userGroups) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: userGroups EXPECTED TYPE: Array", null, null); + } + this.userGroups = userGroups; + this.keyModified.set("user_groups", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/groups.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/groups.js new file mode 100644 index 0000000..48c1ac1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/groups.js @@ -0,0 +1,229 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Groups{ + + createdBy; + modifiedBy; + modifiedTime; + createdTime; + description; + id; + name; + sources; + keyModified = new Map(); + /** + * The method to get the createdBy + * @returns {Owner} An instance of Owner + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {Owner} createdBy An instance of Owner + */ + async setCreatedBy(createdBy) { + const Owner = (await (import("./owner.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof Owner))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: Owner", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {Owner} An instance of Owner + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {Owner} modifiedBy An instance of Owner + */ + async setModifiedBy(modifiedBy) { + const Owner = (await (import("./owner.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof Owner))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: Owner", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("modified_by", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the description + * @returns {String} A String representing the description + */ + getDescription() { + return this.description; + + } + + /** + * The method to set the value to description + * @param {String} description A String representing the description + */ + setDescription(description) { + if((description != null) && (!(Object.prototype.toString.call(description) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: description EXPECTED TYPE: String", null, null); + } + this.description = description; + this.keyModified.set("description", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the sources + * @returns {Array} An Array representing the sources + */ + getSources() { + return this.sources; + + } + + /** + * The method to set the value to sources + * @param {Array} sources An Array representing the sources + */ + setSources(sources) { + if((sources != null) && (!(Object.prototype.toString.call(sources) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sources EXPECTED TYPE: Array", null, null); + } + this.sources = sources; + this.keyModified.set("sources", 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 { + Groups as MasterModel, + Groups as Groups +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/import_user_groups.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/import_user_groups.js new file mode 100644 index 0000000..012fccc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/import_user_groups.js @@ -0,0 +1,29 @@ +export { Jobs } from "./jobs.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { SourcesCount } from "./sources_count.js"; +export { AssociationModule } from "./association_module.js"; +export { UserGroup } from "./user_group.js"; +export { Source } from "./source.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export * as ActionResponse from "./action_response.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { AssociatedUser } from "./associated_user.js"; +export { AssociatedUserCount } from "./associated_user_count.js"; +export { AssociationWrapper } from "./association_wrapper.js"; +export { Info } from "./info.js"; +export { APIException } from "./api_exception.js"; +export { SourcesWrapper } from "./sources_wrapper.js"; +export { Users } from "./users.js"; +export { Resource } from "./resource.js"; +export { UserGroupsOperations } from "./user_groups_operations.js"; +export { GetGroupsParam } from "./user_groups_operations.js"; +export { GetSourcesParam } from "./user_groups_operations.js"; +export { SourcesCountWrapper } from "./sources_count_wrapper.js"; +export { AssociationResponse } from "./association_response.js"; +export * as ResponseHandler from "./response_handler.js"; +export { SuccessResponse } from "./success_response.js"; +export { Owner } from "./owner.js"; +export * as ActionHandler from "./action_handler.js"; +export { Groups } from "./groups.js"; +export { JobsWrapper } from "./jobs_wrapper.js"; +export { Sources } from "./sources.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/info.js new file mode 100644 index 0000000..e495623 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/info.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + perPage; + count; + page; + moreRecords; + keyModified = new Map(); + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/jobs.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/jobs.js new file mode 100644 index 0000000..ae06480 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/jobs.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Jobs{ + + status; + keyModified = new Map(); + /** + * The method to get the status + * @returns {String} A String representing the status + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {String} status A String representing the status + */ + setStatus(status) { + if((status != null) && (!(Object.prototype.toString.call(status) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: String", null, null); + } + this.status = status; + this.keyModified.set("Status", 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 { + Jobs as MasterModel, + Jobs as Jobs +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/jobs_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/jobs_wrapper.js new file mode 100644 index 0000000..e7d0451 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/jobs_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class JobsWrapper{ + + deletionJobs; + keyModified = new Map(); + /** + * The method to get the deletionJobs + * @returns {Array} An Array representing the deletionJobs + */ + getDeletionJobs() { + return this.deletionJobs; + + } + + /** + * The method to set the value to deletionJobs + * @param {Array} deletionJobs An Array representing the deletionJobs + */ + setDeletionJobs(deletionJobs) { + if((deletionJobs != null) && (!(Object.prototype.toString.call(deletionJobs) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deletionJobs EXPECTED TYPE: Array", null, null); + } + this.deletionJobs = deletionJobs; + this.keyModified.set("deletion_jobs", 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 { + JobsWrapper as MasterModel, + JobsWrapper as JobsWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/owner.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/owner.js new file mode 100644 index 0000000..b1c21d9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/owner.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Owner{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Owner as MasterModel, + Owner as Owner +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/resource.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/resource.js new file mode 100644 index 0000000..a6a8989 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/resource.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Resource{ + + id; + name; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + Resource as MasterModel, + Resource as Resource +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/response_wrapper.js new file mode 100644 index 0000000..2114153 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + userGroups; + info; + keyModified = new Map(); + /** + * The method to get the userGroups + * @returns {Array} An Array representing the userGroups + */ + getUserGroups() { + return this.userGroups; + + } + + /** + * The method to set the value to userGroups + * @param {Array} userGroups An Array representing the userGroups + */ + setUserGroups(userGroups) { + if((userGroups != null) && (!(Object.prototype.toString.call(userGroups) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: userGroups EXPECTED TYPE: Array", null, null); + } + this.userGroups = userGroups; + this.keyModified.set("user_groups", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/source.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/source.js new file mode 100644 index 0000000..c31c545 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/source.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Source{ + + id; + name; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + Source as MasterModel, + Source as Source +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/sources.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/sources.js new file mode 100644 index 0000000..78d191c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/sources.js @@ -0,0 +1,137 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Sources{ + + type; + source; + subordinates; + subTerritories; + keyModified = new Map(); + /** + * The method to get the type + * @returns {Choice} An instance of Choice + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {Choice} type An instance of Choice + */ + setType(type) { + if((type != null) && (!(type instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: Choice", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the source + * @returns {Source} An instance of Source + */ + getSource() { + return this.source; + + } + + /** + * The method to set the value to source + * @param {Source} source An instance of Source + */ + async setSource(source) { + const Source = (await (import("./source.js"))).MasterModel; + if((source != null) && (!(source instanceof Source))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: source EXPECTED TYPE: Source", null, null); + } + this.source = source; + this.keyModified.set("source", 1); + + } + + /** + * The method to get the subordinates + * @returns {Boolean} A Boolean representing the subordinates + */ + getSubordinates() { + return this.subordinates; + + } + + /** + * The method to set the value to subordinates + * @param {Boolean} subordinates A Boolean representing the subordinates + */ + setSubordinates(subordinates) { + if((subordinates != null) && (!(Object.prototype.toString.call(subordinates) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subordinates EXPECTED TYPE: Boolean", null, null); + } + this.subordinates = subordinates; + this.keyModified.set("subordinates", 1); + + } + + /** + * The method to get the subTerritories + * @returns {Boolean} A Boolean representing the subTerritories + */ + getSubTerritories() { + return this.subTerritories; + + } + + /** + * The method to set the value to subTerritories + * @param {Boolean} subTerritories A Boolean representing the subTerritories + */ + setSubTerritories(subTerritories) { + if((subTerritories != null) && (!(Object.prototype.toString.call(subTerritories) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: subTerritories EXPECTED TYPE: Boolean", null, null); + } + this.subTerritories = subTerritories; + this.keyModified.set("sub_territories", 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 { + Sources as MasterModel, + Sources as Sources +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/sources_count.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/sources_count.js new file mode 100644 index 0000000..a1eaa57 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/sources_count.js @@ -0,0 +1,136 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SourcesCount{ + + territories; + roles; + groups; + users; + keyModified = new Map(); + /** + * The method to get the territories + * @returns {number} A number representing the territories + */ + getTerritories() { + return this.territories; + + } + + /** + * The method to set the value to territories + * @param {number} territories A number representing the territories + */ + setTerritories(territories) { + if((territories != null) && (!(Object.prototype.toString.call(territories) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territories EXPECTED TYPE: number", null, null); + } + this.territories = territories; + this.keyModified.set("territories", 1); + + } + + /** + * The method to get the roles + * @returns {number} A number representing the roles + */ + getRoles() { + return this.roles; + + } + + /** + * The method to set the value to roles + * @param {number} roles A number representing the roles + */ + setRoles(roles) { + if((roles != null) && (!(Object.prototype.toString.call(roles) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: roles EXPECTED TYPE: number", null, null); + } + this.roles = roles; + this.keyModified.set("roles", 1); + + } + + /** + * The method to get the groups + * @returns {number} A number representing the groups + */ + getGroups() { + return this.groups; + + } + + /** + * The method to set the value to groups + * @param {number} groups A number representing the groups + */ + setGroups(groups) { + if((groups != null) && (!(Object.prototype.toString.call(groups) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: groups EXPECTED TYPE: number", null, null); + } + this.groups = groups; + this.keyModified.set("groups", 1); + + } + + /** + * The method to get the users + * @returns {Users} An instance of Users + */ + getUsers() { + return this.users; + + } + + /** + * The method to set the value to users + * @param {Users} users An instance of Users + */ + async setUsers(users) { + const Users = (await (import("./users.js"))).MasterModel; + if((users != null) && (!(users instanceof Users))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: users EXPECTED TYPE: Users", null, null); + } + this.users = users; + this.keyModified.set("users", 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 { + SourcesCount as MasterModel, + SourcesCount as SourcesCount +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/sources_count_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/sources_count_wrapper.js new file mode 100644 index 0000000..52be74d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/sources_count_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SourcesCountWrapper{ + + sourcesCount; + keyModified = new Map(); + /** + * The method to get the sourcesCount + * @returns {Array} An Array representing the sourcesCount + */ + getSourcesCount() { + return this.sourcesCount; + + } + + /** + * The method to set the value to sourcesCount + * @param {Array} sourcesCount An Array representing the sourcesCount + */ + setSourcesCount(sourcesCount) { + if((sourcesCount != null) && (!(Object.prototype.toString.call(sourcesCount) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sourcesCount EXPECTED TYPE: Array", null, null); + } + this.sourcesCount = sourcesCount; + this.keyModified.set("sources_count", 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 { + SourcesCountWrapper as MasterModel, + SourcesCountWrapper as SourcesCountWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/sources_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/sources_wrapper.js new file mode 100644 index 0000000..f5bf13f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/sources_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SourcesWrapper{ + + sources; + info; + keyModified = new Map(); + /** + * The method to get the sources + * @returns {Array} An Array representing the sources + */ + getSources() { + return this.sources; + + } + + /** + * The method to set the value to sources + * @param {Array} sources An Array representing the sources + */ + setSources(sources) { + if((sources != null) && (!(Object.prototype.toString.call(sources) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sources EXPECTED TYPE: Array", null, null); + } + this.sources = sources; + this.keyModified.set("sources", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + SourcesWrapper as MasterModel, + SourcesWrapper as SourcesWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/success_response.js new file mode 100644 index 0000000..e8b71a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/user_group.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/user_group.js new file mode 100644 index 0000000..64dcb76 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/user_group.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class UserGroup{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + UserGroup as MasterModel, + UserGroup as UserGroup +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/user_groups_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/user_groups_operations.js new file mode 100644 index 0000000..fdd750e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/user_groups_operations.js @@ -0,0 +1,279 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 UserGroupsOperations{ + /** + * The method to get groups + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getGroups(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/user_groups"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to create groups + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createGroups(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/user_groups"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update groups + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateGroups(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/user_groups"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get group + * @param {BigInt} group A BigInt representing the group + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getGroup(group) { + if((!(Object.prototype.toString.call(group) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: group EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/user_groups/"); + apiPath = apiPath.concat(group.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/json"); + + } + + /** + * The method to update group + * @param {BigInt} group A BigInt representing the group + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateGroup(group, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(group) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: group EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/user_groups/"); + apiPath = apiPath.concat(group.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete group + * @param {BigInt} group A BigInt representing the group + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteGroup(group) { + if((!(Object.prototype.toString.call(group) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: group EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/user_groups/"); + apiPath = apiPath.concat(group.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get sources + * @param {BigInt} group A BigInt representing the group + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getSources(group, paramInstance=null) { + if((!(Object.prototype.toString.call(group) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: group EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/user_groups/"); + apiPath = apiPath.concat(group.toString()); + apiPath = apiPath.concat("/sources"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to get sources count + * @param {BigInt} group A BigInt representing the group + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getSourcesCount(group) { + if((!(Object.prototype.toString.call(group) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: group EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/user_groups/"); + apiPath = apiPath.concat(group.toString()); + apiPath = apiPath.concat("/actions/sources_count"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to get associations + * @param {BigInt} group A BigInt representing the group + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getAssociations(group) { + if((!(Object.prototype.toString.call(group) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: group EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/user_groups/"); + apiPath = apiPath.concat(group.toString()); + apiPath = apiPath.concat("/actions/associations"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to get associated users count + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getAssociatedUsersCount() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/user_groups/actions/associated_users_count"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + +} +class GetGroupsParam{ + + static INCLUDE = new Param("include", "com.zoho.crm.api.UserGroups.GetGroupsParam"); + static NAME = new Param("name", "com.zoho.crm.api.UserGroups.GetGroupsParam"); + static PAGE = new Param("page", "com.zoho.crm.api.UserGroups.GetGroupsParam"); + static PER_PAGE = new Param("per_page", "com.zoho.crm.api.UserGroups.GetGroupsParam"); +} + +class GetSourcesParam{ + + static TYPE = new Param("type", "com.zoho.crm.api.UserGroups.GetSourcesParam"); + static USER_TYPE = new Param("user_type", "com.zoho.crm.api.UserGroups.GetSourcesParam"); + static PAGE = new Param("page", "com.zoho.crm.api.UserGroups.GetSourcesParam"); + static PER_PAGE = new Param("per_page", "com.zoho.crm.api.UserGroups.GetSourcesParam"); +} + +export { + GetGroupsParam as GetGroupsParam, + GetSourcesParam as GetSourcesParam, + UserGroupsOperations as MasterModel, + UserGroupsOperations as UserGroupsOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/users.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/users.js new file mode 100644 index 0000000..b2e0667 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_groups/users.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Users{ + + inactive; + deleted; + active; + keyModified = new Map(); + /** + * The method to get the inactive + * @returns {number} A number representing the inactive + */ + getInactive() { + return this.inactive; + + } + + /** + * The method to set the value to inactive + * @param {number} inactive A number representing the inactive + */ + setInactive(inactive) { + if((inactive != null) && (!(Object.prototype.toString.call(inactive) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: inactive EXPECTED TYPE: number", null, null); + } + this.inactive = inactive; + this.keyModified.set("inactive", 1); + + } + + /** + * The method to get the deleted + * @returns {number} A number representing the deleted + */ + getDeleted() { + return this.deleted; + + } + + /** + * The method to set the value to deleted + * @param {number} deleted A number representing the deleted + */ + setDeleted(deleted) { + if((deleted != null) && (!(Object.prototype.toString.call(deleted) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: deleted EXPECTED TYPE: number", null, null); + } + this.deleted = deleted; + this.keyModified.set("deleted", 1); + + } + + /** + * The method to get the active + * @returns {number} A number representing the active + */ + getActive() { + return this.active; + + } + + /** + * The method to set the value to active + * @param {number} active A number representing the active + */ + setActive(active) { + if((active != null) && (!(Object.prototype.toString.call(active) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: active EXPECTED TYPE: number", null, null); + } + this.active = active; + this.keyModified.set("active", 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 { + Users as MasterModel, + Users as Users +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/api_exception.js new file mode 100644 index 0000000..db2d361 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/import_user_type_users.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/import_user_type_users.js new file mode 100644 index 0000000..b7d5efd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/import_user_type_users.js @@ -0,0 +1,7 @@ +export { Info } from "./info.js"; +export * as ResponseHandler from "./response_handler.js"; +export { Users } from "./users.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { APIException } from "./api_exception.js"; +export { UserTypeUsersOperations } from "./user_type_users_operations.js"; +export { GetUsersofUserTypeParam } from "./user_type_users_operations.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/info.js new file mode 100644 index 0000000..2a46b59 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/info.js @@ -0,0 +1,158 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + perPage; + totalCount; + count; + page; + moreRecords; + keyModified = new Map(); + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the totalCount + * @returns {number} A number representing the totalCount + */ + getTotalCount() { + return this.totalCount; + + } + + /** + * The method to set the value to totalCount + * @param {number} totalCount A number representing the totalCount + */ + setTotalCount(totalCount) { + if((totalCount != null) && (!(Object.prototype.toString.call(totalCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: totalCount EXPECTED TYPE: number", null, null); + } + this.totalCount = totalCount; + this.keyModified.set("total_count", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/response_wrapper.js new file mode 100644 index 0000000..a9538dd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + users; + info; + keyModified = new Map(); + /** + * The method to get the users + * @returns {Array} An Array representing the users + */ + getUsers() { + return this.users; + + } + + /** + * The method to set the value to users + * @param {Array} users An Array representing the users + */ + setUsers(users) { + if((users != null) && (!(Object.prototype.toString.call(users) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: users EXPECTED TYPE: Array", null, null); + } + this.users = users; + this.keyModified.set("users", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/user_type_users_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/user_type_users_operations.js new file mode 100644 index 0000000..8275768 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/user_type_users_operations.js @@ -0,0 +1,56 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 UserTypeUsersOperations{ + /** + * The method to get users of user type + * @param {BigInt} userTypeId A BigInt representing the userTypeId + * @param {String} portalName A String representing the portalName + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getUsersOfUserType(userTypeId, portalName, paramInstance=null) { + if((!(Object.prototype.toString.call(userTypeId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: userTypeId EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(portalName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: portalName EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/portals/"); + apiPath = apiPath.concat(portalName.toString()); + apiPath = apiPath.concat("/user_type/"); + apiPath = apiPath.concat(userTypeId.toString()); + apiPath = apiPath.concat("/users"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + +} +class GetUsersofUserTypeParam{ + + static FILTERS = new Param("filters", "com.zoho.crm.api.UserTypeUsers.GetUsersofUserTypeParam"); + static TYPE = new Param("type", "com.zoho.crm.api.UserTypeUsers.GetUsersofUserTypeParam"); +} + +export { + GetUsersofUserTypeParam as GetUsersofUserTypeParam, + UserTypeUsersOperations as MasterModel, + UserTypeUsersOperations as UserTypeUsersOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/users.js b/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/users.js new file mode 100644 index 0000000..7cc6d73 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/user_type_users/users.js @@ -0,0 +1,227 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Users{ + + personalityId; + confirm; + statusReasonS; + invitedTime; + module; + name; + active; + email; + keyModified = new Map(); + /** + * The method to get the personalityId + * @returns {BigInt} A BigInt representing the personalityId + */ + getPersonalityId() { + return this.personalityId; + + } + + /** + * The method to set the value to personalityId + * @param {BigInt} personalityId A BigInt representing the personalityId + */ + setPersonalityId(personalityId) { + if((personalityId != null) && (!(Object.prototype.toString.call(personalityId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: personalityId EXPECTED TYPE: BigInt", null, null); + } + this.personalityId = personalityId; + this.keyModified.set("personality_id", 1); + + } + + /** + * The method to get the confirm + * @returns {Boolean} A Boolean representing the confirm + */ + getConfirm() { + return this.confirm; + + } + + /** + * The method to set the value to confirm + * @param {Boolean} confirm A Boolean representing the confirm + */ + setConfirm(confirm) { + if((confirm != null) && (!(Object.prototype.toString.call(confirm) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: confirm EXPECTED TYPE: Boolean", null, null); + } + this.confirm = confirm; + this.keyModified.set("confirm", 1); + + } + + /** + * The method to get the statusReasonS + * @returns {String} A String representing the statusReasonS + */ + getStatusReasonS() { + return this.statusReasonS; + + } + + /** + * The method to set the value to statusReasonS + * @param {String} statusReasonS A String representing the statusReasonS + */ + setStatusReasonS(statusReasonS) { + if((statusReasonS != null) && (!(Object.prototype.toString.call(statusReasonS) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: statusReasonS EXPECTED TYPE: String", null, null); + } + this.statusReasonS = statusReasonS; + this.keyModified.set("status_reason__s", 1); + + } + + /** + * The method to get the invitedTime + * @returns {Date} An instance of Date + */ + getInvitedTime() { + return this.invitedTime; + + } + + /** + * The method to set the value to invitedTime + * @param {Date} invitedTime An instance of Date + */ + setInvitedTime(invitedTime) { + if((invitedTime != null) && (!(invitedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: invitedTime EXPECTED TYPE: Date", null, null); + } + this.invitedTime = invitedTime; + this.keyModified.set("invited_time", 1); + + } + + /** + * The method to get the module + * @returns {String} A String representing the module + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {String} module A String representing the module + */ + setModule(module) { + if((module != null) && (!(Object.prototype.toString.call(module) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: String", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the active + * @returns {Boolean} A Boolean representing the active + */ + getActive() { + return this.active; + + } + + /** + * The method to set the value to active + * @param {Boolean} active A Boolean representing the active + */ + setActive(active) { + if((active != null) && (!(Object.prototype.toString.call(active) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: active EXPECTED TYPE: Boolean", null, null); + } + this.active = active; + this.keyModified.set("active", 1); + + } + + /** + * The method to get the email + * @returns {String} A String representing the email + */ + getEmail() { + return this.email; + + } + + /** + * The method to set the value to email + * @param {String} email A String representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: String", null, null); + } + this.email = email; + this.keyModified.set("email", 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 { + Users as MasterModel, + Users as Users +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/action_wrapper.js new file mode 100644 index 0000000..2b894c9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + users; + keyModified = new Map(); + /** + * The method to get the users + * @returns {Array} An Array representing the users + */ + getUsers() { + return this.users; + + } + + /** + * The method to set the value to users + * @param {Array} users An Array representing the users + */ + setUsers(users) { + if((users != null) && (!(Object.prototype.toString.call(users) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: users EXPECTED TYPE: Array", null, null); + } + this.users = users; + this.keyModified.set("users", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/api_exception.js new file mode 100644 index 0000000..eef1972 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/associated_group.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/associated_group.js new file mode 100644 index 0000000..76c8fe7 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/associated_group.js @@ -0,0 +1,206 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AssociatedGroup{ + + id; + name; + description; + createdTime; + modifiedTime; + createdBy; + modifiedBy; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the description + * @returns {String} A String representing the description + */ + getDescription() { + return this.description; + + } + + /** + * The method to set the value to description + * @param {String} description A String representing the description + */ + setDescription(description) { + if((description != null) && (!(Object.prototype.toString.call(description) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: description EXPECTED TYPE: String", null, null); + } + this.description = description; + this.keyModified.set("description", 1); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("./minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("./minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("modified_by", 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 { + AssociatedGroup as MasterModel, + AssociatedGroup as AssociatedGroup +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/associated_groups_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/associated_groups_wrapper.js new file mode 100644 index 0000000..3d94139 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/associated_groups_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class AssociatedGroupsWrapper{ + + userGroups; + info; + keyModified = new Map(); + /** + * The method to get the userGroups + * @returns {Array} An Array representing the userGroups + */ + getUserGroups() { + return this.userGroups; + + } + + /** + * The method to set the value to userGroups + * @param {Array} userGroups An Array representing the userGroups + */ + setUserGroups(userGroups) { + if((userGroups != null) && (!(Object.prototype.toString.call(userGroups) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: userGroups EXPECTED TYPE: Array", null, null); + } + this.userGroups = userGroups; + this.keyModified.set("user_groups", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + AssociatedGroupsWrapper as MasterModel, + AssociatedGroupsWrapper as AssociatedGroupsWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/body_wrapper.js new file mode 100644 index 0000000..c843bdc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + users; + keyModified = new Map(); + /** + * The method to get the users + * @returns {Array} An Array representing the users + */ + getUsers() { + return this.users; + + } + + /** + * The method to set the value to users + * @param {Array} users An Array representing the users + */ + setUsers(users) { + if((users != null) && (!(Object.prototype.toString.call(users) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: users EXPECTED TYPE: Array", null, null); + } + this.users = users; + this.keyModified.set("users", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/customize_info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/customize_info.js new file mode 100644 index 0000000..2e57dca --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/customize_info.js @@ -0,0 +1,169 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class CustomizeInfo{ + + notesDesc; + showRightPanel; + bcView; + unpinRecentItem; + showHome; + showDetailView; + keyModified = new Map(); + /** + * The method to get the notesDesc + * @returns {Object} An Object representing the notesDesc + */ + getNotesDesc() { + return this.notesDesc; + + } + + /** + * The method to set the value to notesDesc + * @param {Object} notesDesc An Object representing the notesDesc + */ + setNotesDesc(notesDesc) { + this.notesDesc = notesDesc; + this.keyModified.set("notes_desc", 1); + + } + + /** + * The method to get the showRightPanel + * @returns {Object} An Object representing the showRightPanel + */ + getShowRightPanel() { + return this.showRightPanel; + + } + + /** + * The method to set the value to showRightPanel + * @param {Object} showRightPanel An Object representing the showRightPanel + */ + setShowRightPanel(showRightPanel) { + this.showRightPanel = showRightPanel; + this.keyModified.set("show_right_panel", 1); + + } + + /** + * The method to get the bcView + * @returns {Object} An Object representing the bcView + */ + getBcView() { + return this.bcView; + + } + + /** + * The method to set the value to bcView + * @param {Object} bcView An Object representing the bcView + */ + setBcView(bcView) { + this.bcView = bcView; + this.keyModified.set("bc_view", 1); + + } + + /** + * The method to get the unpinRecentItem + * @returns {Object} An Object representing the unpinRecentItem + */ + getUnpinRecentItem() { + return this.unpinRecentItem; + + } + + /** + * The method to set the value to unpinRecentItem + * @param {Object} unpinRecentItem An Object representing the unpinRecentItem + */ + setUnpinRecentItem(unpinRecentItem) { + this.unpinRecentItem = unpinRecentItem; + this.keyModified.set("unpin_recent_item", 1); + + } + + /** + * The method to get the showHome + * @returns {Boolean} A Boolean representing the showHome + */ + getShowHome() { + return this.showHome; + + } + + /** + * The method to set the value to showHome + * @param {Boolean} showHome A Boolean representing the showHome + */ + setShowHome(showHome) { + if((showHome != null) && (!(Object.prototype.toString.call(showHome) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: showHome EXPECTED TYPE: Boolean", null, null); + } + this.showHome = showHome; + this.keyModified.set("show_home", 1); + + } + + /** + * The method to get the showDetailView + * @returns {Boolean} A Boolean representing the showDetailView + */ + getShowDetailView() { + return this.showDetailView; + + } + + /** + * The method to set the value to showDetailView + * @param {Boolean} showDetailView A Boolean representing the showDetailView + */ + setShowDetailView(showDetailView) { + if((showDetailView != null) && (!(Object.prototype.toString.call(showDetailView) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: showDetailView EXPECTED TYPE: Boolean", null, null); + } + this.showDetailView = showDetailView; + this.keyModified.set("show_detail_view", 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 { + CustomizeInfo as MasterModel, + CustomizeInfo as CustomizeInfo +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/error_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/error_details.js new file mode 100644 index 0000000..bd8bb0c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/error_details.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ErrorDetails{ + + apiName; + jsonPath; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the jsonPath + * @returns {String} A String representing the jsonPath + */ + getJsonPath() { + return this.jsonPath; + + } + + /** + * The method to set the value to jsonPath + * @param {String} jsonPath A String representing the jsonPath + */ + setJsonPath(jsonPath) { + if((jsonPath != null) && (!(Object.prototype.toString.call(jsonPath) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jsonPath EXPECTED TYPE: String", null, null); + } + this.jsonPath = jsonPath; + this.keyModified.set("json_path", 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 { + ErrorDetails as MasterModel, + ErrorDetails as ErrorDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/import_users.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/import_users.js new file mode 100644 index 0000000..4543611 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/import_users.js @@ -0,0 +1,25 @@ +export { AssociatedGroupsWrapper } from "./associated_groups_wrapper.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { CustomizeInfo } from "./customize_info.js"; +export { UsersOperations } from "./users_operations.js"; +export { GetUsersParam } from "./users_operations.js"; +export { GetUsersHeader } from "./users_operations.js"; +export { GetUserHeader } from "./users_operations.js"; +export { APIException } from "./api_exception.js"; +export * as ActionHandler from "./action_handler.js"; +export { Role } from "./role.js"; +export { Profile } from "./profile.js"; +export { Theme } from "./theme.js"; +export { Tab } from "./tab.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { Owner } from "./owner.js"; +export { Info } from "./info.js"; +export { AssociatedGroup } from "./associated_group.js"; +export { ErrorDetails } from "./error_details.js"; +export { MinifiedUser } from "./minified_user.js"; +export { SuccessResponse } from "./success_response.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export * as ActionResponse from "./action_response.js"; +export { Users } from "./users.js"; +export * as ResponseHandler from "./response_handler.js"; +export { Shift } from "./shift.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/info.js new file mode 100644 index 0000000..e495623 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/info.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + perPage; + count; + page; + moreRecords; + keyModified = new Map(); + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/minified_user.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/minified_user.js new file mode 100644 index 0000000..4dcc6ef --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/minified_user.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MinifiedUser{ + + name; + id; + email; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the email + * @returns {String} A String representing the email + */ + getEmail() { + return this.email; + + } + + /** + * The method to set the value to email + * @param {String} email A String representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: String", null, null); + } + this.email = email; + this.keyModified.set("email", 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 { + MinifiedUser as MasterModel, + MinifiedUser as MinifiedUser +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/owner.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/owner.js new file mode 100644 index 0000000..4819a74 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/owner.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Owner{ + + name; + id; + lastName; + firstName; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the lastName + * @returns {String} A String representing the lastName + */ + getLastName() { + return this.lastName; + + } + + /** + * The method to set the value to lastName + * @param {String} lastName A String representing the lastName + */ + setLastName(lastName) { + if((lastName != null) && (!(Object.prototype.toString.call(lastName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: lastName EXPECTED TYPE: String", null, null); + } + this.lastName = lastName; + this.keyModified.set("last_name", 1); + + } + + /** + * The method to get the firstName + * @returns {String} A String representing the firstName + */ + getFirstName() { + return this.firstName; + + } + + /** + * The method to set the value to firstName + * @param {String} firstName A String representing the firstName + */ + setFirstName(firstName) { + if((firstName != null) && (!(Object.prototype.toString.call(firstName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: firstName EXPECTED TYPE: String", null, null); + } + this.firstName = firstName; + this.keyModified.set("first_name", 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 { + Owner as MasterModel, + Owner as Owner +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/profile.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/profile.js new file mode 100644 index 0000000..047b024 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/profile.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Profile{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Profile as MasterModel, + Profile as Profile +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/response_wrapper.js new file mode 100644 index 0000000..a9538dd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + users; + info; + keyModified = new Map(); + /** + * The method to get the users + * @returns {Array} An Array representing the users + */ + getUsers() { + return this.users; + + } + + /** + * The method to set the value to users + * @param {Array} users An Array representing the users + */ + setUsers(users) { + if((users != null) && (!(Object.prototype.toString.call(users) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: users EXPECTED TYPE: Array", null, null); + } + this.users = users; + this.keyModified.set("users", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/role.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/role.js new file mode 100644 index 0000000..e4645d1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/role.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Role{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Role as MasterModel, + Role as Role +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/shift.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/shift.js new file mode 100644 index 0000000..047e3b4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/shift.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Shift{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Shift as MasterModel, + Shift as Shift +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/success_response.js new file mode 100644 index 0000000..6cdb15e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/tab.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/tab.js new file mode 100644 index 0000000..c1331e2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/tab.js @@ -0,0 +1,90 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Tab{ + + fontColor; + background; + keyModified = new Map(); + /** + * The method to get the fontColor + * @returns {Choice} An instance of Choice + */ + getFontColor() { + return this.fontColor; + + } + + /** + * The method to set the value to fontColor + * @param {Choice} fontColor An instance of Choice + */ + setFontColor(fontColor) { + if((fontColor != null) && (!(fontColor instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fontColor EXPECTED TYPE: Choice", null, null); + } + this.fontColor = fontColor; + this.keyModified.set("font_color", 1); + + } + + /** + * The method to get the background + * @returns {Choice} An instance of Choice + */ + getBackground() { + return this.background; + + } + + /** + * The method to set the value to background + * @param {Choice} background An instance of Choice + */ + setBackground(background) { + if((background != null) && (!(background instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: background EXPECTED TYPE: Choice", null, null); + } + this.background = background; + this.keyModified.set("background", 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 { + Tab as MasterModel, + Tab as Tab +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/theme.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/theme.js new file mode 100644 index 0000000..da949e6 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/theme.js @@ -0,0 +1,184 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Theme{ + + normalTab; + selectedTab; + newBackground; + background; + screen; + type; + keyModified = new Map(); + /** + * The method to get the normalTab + * @returns {Tab} An instance of Tab + */ + getNormalTab() { + return this.normalTab; + + } + + /** + * The method to set the value to normalTab + * @param {Tab} normalTab An instance of Tab + */ + async setNormalTab(normalTab) { + const Tab = (await (import("./tab.js"))).MasterModel; + if((normalTab != null) && (!(normalTab instanceof Tab))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: normalTab EXPECTED TYPE: Tab", null, null); + } + this.normalTab = normalTab; + this.keyModified.set("normal_tab", 1); + + } + + /** + * The method to get the selectedTab + * @returns {Tab} An instance of Tab + */ + getSelectedTab() { + return this.selectedTab; + + } + + /** + * The method to set the value to selectedTab + * @param {Tab} selectedTab An instance of Tab + */ + async setSelectedTab(selectedTab) { + const Tab = (await (import("./tab.js"))).MasterModel; + if((selectedTab != null) && (!(selectedTab instanceof Tab))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: selectedTab EXPECTED TYPE: Tab", null, null); + } + this.selectedTab = selectedTab; + this.keyModified.set("selected_tab", 1); + + } + + /** + * The method to get the newBackground + * @returns {String} A String representing the newBackground + */ + getNewBackground() { + return this.newBackground; + + } + + /** + * The method to set the value to newBackground + * @param {String} newBackground A String representing the newBackground + */ + setNewBackground(newBackground) { + if((newBackground != null) && (!(Object.prototype.toString.call(newBackground) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: newBackground EXPECTED TYPE: String", null, null); + } + this.newBackground = newBackground; + this.keyModified.set("new_background", 1); + + } + + /** + * The method to get the background + * @returns {Choice} An instance of Choice + */ + getBackground() { + return this.background; + + } + + /** + * The method to set the value to background + * @param {Choice} background An instance of Choice + */ + setBackground(background) { + if((background != null) && (!(background instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: background EXPECTED TYPE: Choice", null, null); + } + this.background = background; + this.keyModified.set("background", 1); + + } + + /** + * The method to get the screen + * @returns {Choice} An instance of Choice + */ + getScreen() { + return this.screen; + + } + + /** + * The method to set the value to screen + * @param {Choice} screen An instance of Choice + */ + setScreen(screen) { + if((screen != null) && (!(screen instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: screen EXPECTED TYPE: Choice", null, null); + } + this.screen = screen; + this.keyModified.set("screen", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 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 { + Theme as MasterModel, + Theme as Theme +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/users.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/users.js new file mode 100644 index 0000000..33eed10 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/users.js @@ -0,0 +1,1339 @@ +import {Record} from "../record/record.js"; +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Users extends Record{ + + /** + * The method to get the country + * @returns {String} A String representing the country + */ + getCountry() { + return this.getKeyValue("country"); + + } + + /** + * The method to set the value to country + * @param {String} country A String representing the country + */ + setCountry(country) { + if((country != null) && (!(Object.prototype.toString.call(country) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: country EXPECTED TYPE: String", null, null); + } + this.addKeyValue("country", country); + + } + + /** + * The method to get the language + * @returns {String} A String representing the language + */ + getLanguage() { + return this.getKeyValue("language"); + + } + + /** + * The method to set the value to language + * @param {String} language A String representing the language + */ + setLanguage(language) { + if((language != null) && (!(Object.prototype.toString.call(language) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: language EXPECTED TYPE: String", null, null); + } + this.addKeyValue("language", language); + + } + + /** + * The method to get the microsoft + * @returns {Boolean} A Boolean representing the microsoft + */ + getMicrosoft() { + return this.getKeyValue("microsoft"); + + } + + /** + * The method to set the value to microsoft + * @param {Boolean} microsoft A Boolean representing the microsoft + */ + setMicrosoft(microsoft) { + if((microsoft != null) && (!(Object.prototype.toString.call(microsoft) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: microsoft EXPECTED TYPE: Boolean", null, null); + } + this.addKeyValue("microsoft", microsoft); + + } + + /** + * The method to get the shiftEffectiveFrom + * @returns {Object} An Object representing the shiftEffectiveFrom + */ + getShiftEffectiveFrom() { + return this.getKeyValue("$shift_effective_from"); + + } + + /** + * The method to set the value to shiftEffectiveFrom + * @param {Object} shiftEffectiveFrom An Object representing the shiftEffectiveFrom + */ + setShiftEffectiveFrom(shiftEffectiveFrom) { + this.addKeyValue("$shift_effective_from", shiftEffectiveFrom); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.getKeyValue("id"); + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.addKeyValue("id", id); + + } + + /** + * The method to get the state + * @returns {String} A String representing the state + */ + getState() { + return this.getKeyValue("state"); + + } + + /** + * The method to set the value to state + * @param {String} state A String representing the state + */ + setState(state) { + if((state != null) && (!(Object.prototype.toString.call(state) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: state EXPECTED TYPE: String", null, null); + } + this.addKeyValue("state", state); + + } + + /** + * The method to get the fax + * @returns {String} A String representing the fax + */ + getFax() { + return this.getKeyValue("fax"); + + } + + /** + * The method to set the value to fax + * @param {String} fax A String representing the fax + */ + setFax(fax) { + if((fax != null) && (!(Object.prototype.toString.call(fax) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fax EXPECTED TYPE: String", null, null); + } + this.addKeyValue("fax", fax); + + } + + /** + * The method to get the countryLocale + * @returns {String} A String representing the countryLocale + */ + getCountryLocale() { + return this.getKeyValue("country_locale"); + + } + + /** + * The method to set the value to countryLocale + * @param {String} countryLocale A String representing the countryLocale + */ + setCountryLocale(countryLocale) { + if((countryLocale != null) && (!(Object.prototype.toString.call(countryLocale) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: countryLocale EXPECTED TYPE: String", null, null); + } + this.addKeyValue("country_locale", countryLocale); + + } + + /** + * The method to get the zip + * @returns {String} A String representing the zip + */ + getZip() { + return this.getKeyValue("zip"); + + } + + /** + * The method to set the value to zip + * @param {String} zip A String representing the zip + */ + setZip(zip) { + if((zip != null) && (!(Object.prototype.toString.call(zip) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: zip EXPECTED TYPE: String", null, null); + } + this.addKeyValue("zip", zip); + + } + + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.getKeyValue("created_time"); + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("created_time", createdTime); + + } + + /** + * The method to get the timeFormat + * @returns {Choice} An instance of Choice + */ + getTimeFormat() { + return this.getKeyValue("time_format"); + + } + + /** + * The method to set the value to timeFormat + * @param {Choice} timeFormat An instance of Choice + */ + setTimeFormat(timeFormat) { + if((timeFormat != null) && (!(timeFormat instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: timeFormat EXPECTED TYPE: Choice", null, null); + } + this.addKeyValue("time_format", timeFormat); + + } + + /** + * The method to get the offset + * @returns {number} A number representing the offset + */ + getOffset() { + return this.getKeyValue("offset"); + + } + + /** + * The method to set the value to offset + * @param {number} offset A number representing the offset + */ + setOffset(offset) { + if((offset != null) && (!(Object.prototype.toString.call(offset) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: offset EXPECTED TYPE: number", null, null); + } + this.addKeyValue("offset", offset); + + } + + /** + * The method to get the imapStatus + * @returns {Boolean} A Boolean representing the imapStatus + */ + getImapStatus() { + return this.getKeyValue("imap_status"); + + } + + /** + * The method to set the value to imapStatus + * @param {Boolean} imapStatus A Boolean representing the imapStatus + */ + setImapStatus(imapStatus) { + if((imapStatus != null) && (!(Object.prototype.toString.call(imapStatus) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: imapStatus EXPECTED TYPE: Boolean", null, null); + } + this.addKeyValue("imap_status", imapStatus); + + } + + /** + * The method to get the imageLink + * @returns {String} A String representing the imageLink + */ + getImageLink() { + return this.getKeyValue("image_link"); + + } + + /** + * The method to set the value to imageLink + * @param {String} imageLink A String representing the imageLink + */ + setImageLink(imageLink) { + if((imageLink != null) && (!(Object.prototype.toString.call(imageLink) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: imageLink EXPECTED TYPE: String", null, null); + } + this.addKeyValue("image_link", imageLink); + + } + + /** + * The method to get the ezuid + * @returns {String} A String representing the ezuid + */ + getEzuid() { + return this.getKeyValue("ezuid"); + + } + + /** + * The method to set the value to ezuid + * @param {String} ezuid A String representing the ezuid + */ + setEzuid(ezuid) { + if((ezuid != null) && (!(Object.prototype.toString.call(ezuid) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ezuid EXPECTED TYPE: String", null, null); + } + this.addKeyValue("ezuid", ezuid); + + } + + /** + * The method to get the profile + * @returns {Profile} An instance of Profile + */ + getProfile() { + return this.getKeyValue("profile"); + + } + + /** + * The method to set the value to profile + * @param {Profile} profile An instance of Profile + */ + async setProfile(profile) { + const Profile = (await (import("./profile.js"))).MasterModel; + if((profile != null) && (!(profile instanceof Profile))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: profile EXPECTED TYPE: Profile", null, null); + } + this.addKeyValue("profile", profile); + + } + + /** + * The method to get the role + * @returns {Role} An instance of Role + */ + getRole() { + return this.getKeyValue("role"); + + } + + /** + * The method to set the value to role + * @param {Role} role An instance of Role + */ + async setRole(role) { + const Role = (await (import("./role.js"))).MasterModel; + if((role != null) && (!(role instanceof Role))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: role EXPECTED TYPE: Role", null, null); + } + this.addKeyValue("role", role); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.getKeyValue("created_by"); + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("./minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("created_by", createdBy); + + } + + /** + * The method to get the fullName + * @returns {String} A String representing the fullName + */ + getFullName() { + return this.getKeyValue("full_name"); + + } + + /** + * The method to set the value to fullName + * @param {String} fullName A String representing the fullName + */ + setFullName(fullName) { + if((fullName != null) && (!(Object.prototype.toString.call(fullName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fullName EXPECTED TYPE: String", null, null); + } + this.addKeyValue("full_name", fullName); + + } + + /** + * The method to get the zuid + * @returns {String} A String representing the zuid + */ + getZuid() { + return this.getKeyValue("zuid"); + + } + + /** + * The method to set the value to zuid + * @param {String} zuid A String representing the zuid + */ + setZuid(zuid) { + if((zuid != null) && (!(Object.prototype.toString.call(zuid) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: zuid EXPECTED TYPE: String", null, null); + } + this.addKeyValue("zuid", zuid); + + } + + /** + * The method to get the phone + * @returns {String} A String representing the phone + */ + getPhone() { + return this.getKeyValue("phone"); + + } + + /** + * The method to set the value to phone + * @param {String} phone A String representing the phone + */ + setPhone(phone) { + if((phone != null) && (!(Object.prototype.toString.call(phone) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: phone EXPECTED TYPE: String", null, null); + } + this.addKeyValue("phone", phone); + + } + + /** + * The method to get the dob + * @returns {Date} An instance of Date + */ + getDob() { + return this.getKeyValue("dob"); + + } + + /** + * The method to set the value to dob + * @param {Date} dob An instance of Date + */ + setDob(dob) { + if((dob != null) && (!(dob instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dob EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("dob", dob); + + } + + /** + * The method to get the status + * @returns {String} A String representing the status + */ + getStatus() { + return this.getKeyValue("status"); + + } + + /** + * The method to set the value to status + * @param {String} status A String representing the status + */ + setStatus(status) { + if((status != null) && (!(Object.prototype.toString.call(status) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: String", null, null); + } + this.addKeyValue("status", status); + + } + + /** + * The method to get the customizeInfo + * @returns {CustomizeInfo} An instance of CustomizeInfo + */ + getCustomizeInfo() { + return this.getKeyValue("customize_info"); + + } + + /** + * The method to set the value to customizeInfo + * @param {CustomizeInfo} customizeInfo An instance of CustomizeInfo + */ + async setCustomizeInfo(customizeInfo) { + const CustomizeInfo = (await (import("./customize_info.js"))).MasterModel; + if((customizeInfo != null) && (!(customizeInfo instanceof CustomizeInfo))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: customizeInfo EXPECTED TYPE: CustomizeInfo", null, null); + } + this.addKeyValue("customize_info", customizeInfo); + + } + + /** + * The method to get the city + * @returns {String} A String representing the city + */ + getCity() { + return this.getKeyValue("city"); + + } + + /** + * The method to set the value to city + * @param {String} city A String representing the city + */ + setCity(city) { + if((city != null) && (!(Object.prototype.toString.call(city) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: city EXPECTED TYPE: String", null, null); + } + this.addKeyValue("city", city); + + } + + /** + * The method to get the signature + * @returns {String} A String representing the signature + */ + getSignature() { + return this.getKeyValue("signature"); + + } + + /** + * The method to set the value to signature + * @param {String} signature A String representing the signature + */ + setSignature(signature) { + if((signature != null) && (!(Object.prototype.toString.call(signature) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: signature EXPECTED TYPE: String", null, null); + } + this.addKeyValue("signature", signature); + + } + + /** + * The method to get the sortOrderPreferenceS + * @returns {String} A String representing the sortOrderPreferenceS + */ + getSortOrderPreferenceS() { + return this.getKeyValue("sort_order_preference__s"); + + } + + /** + * The method to set the value to sortOrderPreferenceS + * @param {String} sortOrderPreferenceS A String representing the sortOrderPreferenceS + */ + setSortOrderPreferenceS(sortOrderPreferenceS) { + if((sortOrderPreferenceS != null) && (!(Object.prototype.toString.call(sortOrderPreferenceS) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortOrderPreferenceS EXPECTED TYPE: String", null, null); + } + this.addKeyValue("sort_order_preference__s", sortOrderPreferenceS); + + } + + /** + * The method to get the category + * @returns {String} A String representing the category + */ + getCategory() { + return this.getKeyValue("category"); + + } + + /** + * The method to set the value to category + * @param {String} category A String representing the category + */ + setCategory(category) { + if((category != null) && (!(Object.prototype.toString.call(category) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: category EXPECTED TYPE: String", null, null); + } + this.addKeyValue("category", category); + + } + + /** + * The method to get the dateFormat + * @returns {Choice} An instance of Choice + */ + getDateFormat() { + return this.getKeyValue("date_format"); + + } + + /** + * The method to set the value to dateFormat + * @param {Choice} dateFormat An instance of Choice + */ + setDateFormat(dateFormat) { + if((dateFormat != null) && (!(dateFormat instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: dateFormat EXPECTED TYPE: Choice", null, null); + } + this.addKeyValue("date_format", dateFormat); + + } + + /** + * The method to get the confirm + * @returns {Boolean} A Boolean representing the confirm + */ + getConfirm() { + return this.getKeyValue("confirm"); + + } + + /** + * The method to set the value to confirm + * @param {Boolean} confirm A Boolean representing the confirm + */ + setConfirm(confirm) { + if((confirm != null) && (!(Object.prototype.toString.call(confirm) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: confirm EXPECTED TYPE: Boolean", null, null); + } + this.addKeyValue("confirm", confirm); + + } + + /** + * The method to get the decimalSeparator + * @returns {Choice} An instance of Choice + */ + getDecimalSeparator() { + return this.getKeyValue("decimal_separator"); + + } + + /** + * The method to set the value to decimalSeparator + * @param {Choice} decimalSeparator An instance of Choice + */ + setDecimalSeparator(decimalSeparator) { + if((decimalSeparator != null) && (!(decimalSeparator instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: decimalSeparator EXPECTED TYPE: Choice", null, null); + } + this.addKeyValue("decimal_separator", decimalSeparator); + + } + + /** + * The method to get the numberSeparator + * @returns {Choice} An instance of Choice + */ + getNumberSeparator() { + return this.getKeyValue("number_separator"); + + } + + /** + * The method to set the value to numberSeparator + * @param {Choice} numberSeparator An instance of Choice + */ + setNumberSeparator(numberSeparator) { + if((numberSeparator != null) && (!(numberSeparator instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: numberSeparator EXPECTED TYPE: Choice", null, null); + } + this.addKeyValue("number_separator", numberSeparator); + + } + + /** + * The method to get the timeZone + * @returns {TimeZone} An instance of TimeZone + */ + getTimeZone() { + return this.getKeyValue("time_zone"); + + } + + /** + * The method to set the value to timeZone + * @param {TimeZone} timeZone An instance of TimeZone + */ + async setTimeZone(timeZone) { + this.addKeyValue("time_zone", timeZone); + + } + + /** + * The method to get the lastName + * @returns {String} A String representing the lastName + */ + getLastName() { + return this.getKeyValue("last_name"); + + } + + /** + * The method to set the value to lastName + * @param {String} lastName A String representing the lastName + */ + setLastName(lastName) { + if((lastName != null) && (!(Object.prototype.toString.call(lastName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: lastName EXPECTED TYPE: String", null, null); + } + this.addKeyValue("last_name", lastName); + + } + + /** + * The method to get the mobile + * @returns {String} A String representing the mobile + */ + getMobile() { + return this.getKeyValue("mobile"); + + } + + /** + * The method to set the value to mobile + * @param {String} mobile A String representing the mobile + */ + setMobile(mobile) { + if((mobile != null) && (!(Object.prototype.toString.call(mobile) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: mobile EXPECTED TYPE: String", null, null); + } + this.addKeyValue("mobile", mobile); + + } + + /** + * The method to get the currentShift + * @returns {Shift} An instance of Shift + */ + getCurrentShift() { + return this.getKeyValue("$current_shift"); + + } + + /** + * The method to set the value to currentShift + * @param {Shift} currentShift An instance of Shift + */ + async setCurrentShift(currentShift) { + const Shift = (await (import("./shift.js"))).MasterModel; + if((currentShift != null) && (!(currentShift instanceof Shift))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: currentShift EXPECTED TYPE: Shift", null, null); + } + this.addKeyValue("$current_shift", currentShift); + + } + + /** + * The method to get the reportingTo + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getReportingTo() { + return this.getKeyValue("Reporting_To"); + + } + + /** + * The method to set the value to reportingTo + * @param {MinifiedUser} reportingTo An instance of MinifiedUser + */ + async setReportingTo(reportingTo) { + const MinifiedUser = (await (import("./minified_user.js"))).MasterModel; + if((reportingTo != null) && (!(reportingTo instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: reportingTo EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Reporting_To", reportingTo); + + } + + /** + * The method to get the currency + * @returns {String} A String representing the currency + */ + getCurrency() { + return this.getKeyValue("Currency"); + + } + + /** + * The method to set the value to currency + * @param {String} currency A String representing the currency + */ + setCurrency(currency) { + if((currency != null) && (!(Object.prototype.toString.call(currency) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: currency EXPECTED TYPE: String", null, null); + } + this.addKeyValue("Currency", currency); + + } + + /** + * The method to get the nextShift + * @returns {Shift} An instance of Shift + */ + getNextShift() { + return this.getKeyValue("$next_shift"); + + } + + /** + * The method to set the value to nextShift + * @param {Shift} nextShift An instance of Shift + */ + async setNextShift(nextShift) { + const Shift = (await (import("./shift.js"))).MasterModel; + if((nextShift != null) && (!(nextShift instanceof Shift))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: nextShift EXPECTED TYPE: Shift", null, null); + } + this.addKeyValue("$next_shift", nextShift); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.getKeyValue("Modified_Time"); + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Modified_Time", modifiedTime); + + } + + /** + * The method to get the website + * @returns {String} A String representing the website + */ + getWebsite() { + return this.getKeyValue("website"); + + } + + /** + * The method to set the value to website + * @param {String} website A String representing the website + */ + setWebsite(website) { + if((website != null) && (!(Object.prototype.toString.call(website) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: website EXPECTED TYPE: String", null, null); + } + this.addKeyValue("website", website); + + } + + /** + * The method to get the statusReasonS + * @returns {String} A String representing the statusReasonS + */ + getStatusReasonS() { + return this.getKeyValue("status_reason__s"); + + } + + /** + * The method to set the value to statusReasonS + * @param {String} statusReasonS A String representing the statusReasonS + */ + setStatusReasonS(statusReasonS) { + if((statusReasonS != null) && (!(Object.prototype.toString.call(statusReasonS) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: statusReasonS EXPECTED TYPE: String", null, null); + } + this.addKeyValue("status_reason__s", statusReasonS); + + } + + /** + * The method to get the email + * @returns {String} A String representing the email + */ + getEmail() { + return this.getKeyValue("email"); + + } + + /** + * The method to set the value to email + * @param {String} email A String representing the email + */ + setEmail(email) { + if((email != null) && (!(Object.prototype.toString.call(email) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: email EXPECTED TYPE: String", null, null); + } + this.addKeyValue("email", email); + + } + + /** + * The method to get the firstName + * @returns {String} A String representing the firstName + */ + getFirstName() { + return this.getKeyValue("first_name"); + + } + + /** + * The method to set the value to firstName + * @param {String} firstName A String representing the firstName + */ + setFirstName(firstName) { + if((firstName != null) && (!(Object.prototype.toString.call(firstName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: firstName EXPECTED TYPE: String", null, null); + } + this.addKeyValue("first_name", firstName); + + } + + /** + * The method to get the sandboxdeveloper + * @returns {Boolean} A Boolean representing the sandboxdeveloper + */ + getSandboxdeveloper() { + return this.getKeyValue("sandboxDeveloper"); + + } + + /** + * The method to set the value to sandboxdeveloper + * @param {Boolean} sandboxdeveloper A Boolean representing the sandboxdeveloper + */ + setSandboxdeveloper(sandboxdeveloper) { + if((sandboxdeveloper != null) && (!(Object.prototype.toString.call(sandboxdeveloper) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sandboxdeveloper EXPECTED TYPE: Boolean", null, null); + } + this.addKeyValue("sandboxDeveloper", sandboxdeveloper); + + } + + /** + * The method to get the alias + * @returns {String} A String representing the alias + */ + getAlias() { + return this.getKeyValue("alias"); + + } + + /** + * The method to set the value to alias + * @param {String} alias A String representing the alias + */ + setAlias(alias) { + if((alias != null) && (!(Object.prototype.toString.call(alias) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: alias EXPECTED TYPE: String", null, null); + } + this.addKeyValue("alias", alias); + + } + + /** + * The method to get the street + * @returns {String} A String representing the street + */ + getStreet() { + return this.getKeyValue("street"); + + } + + /** + * The method to set the value to street + * @param {String} street A String representing the street + */ + setStreet(street) { + if((street != null) && (!(Object.prototype.toString.call(street) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: street EXPECTED TYPE: String", null, null); + } + this.addKeyValue("street", street); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.getKeyValue("Modified_By"); + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("./minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Modified_By", modifiedBy); + + } + + /** + * The method to get the isonline + * @returns {Boolean} A Boolean representing the isonline + */ + getIsonline() { + return this.getKeyValue("Isonline"); + + } + + /** + * The method to set the value to isonline + * @param {Boolean} isonline A Boolean representing the isonline + */ + setIsonline(isonline) { + if((isonline != null) && (!(Object.prototype.toString.call(isonline) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: isonline EXPECTED TYPE: Boolean", null, null); + } + this.addKeyValue("Isonline", isonline); + + } + + /** + * The method to get the locale + * @returns {String} A String representing the locale + */ + getLocale() { + return this.getKeyValue("locale"); + + } + + /** + * The method to set the value to locale + * @param {String} locale A String representing the locale + */ + setLocale(locale) { + if((locale != null) && (!(Object.prototype.toString.call(locale) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: locale EXPECTED TYPE: String", null, null); + } + this.addKeyValue("locale", locale); + + } + + /** + * The method to get the nameFormatS + * @returns {Choice} An instance of Choice + */ + getNameFormatS() { + return this.getKeyValue("name_format__s"); + + } + + /** + * The method to set the value to nameFormatS + * @param {Choice} nameFormatS An instance of Choice + */ + setNameFormatS(nameFormatS) { + if((nameFormatS != null) && (!(nameFormatS instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: nameFormatS EXPECTED TYPE: Choice", null, null); + } + this.addKeyValue("name_format__s", nameFormatS); + + } + + /** + * The method to get the personalAccount + * @returns {Boolean} A Boolean representing the personalAccount + */ + getPersonalAccount() { + return this.getKeyValue("personal_account"); + + } + + /** + * The method to set the value to personalAccount + * @param {Boolean} personalAccount A Boolean representing the personalAccount + */ + setPersonalAccount(personalAccount) { + if((personalAccount != null) && (!(Object.prototype.toString.call(personalAccount) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: personalAccount EXPECTED TYPE: Boolean", null, null); + } + this.addKeyValue("personal_account", personalAccount); + + } + + /** + * The method to get the defaultTabGroup + * @returns {String} A String representing the defaultTabGroup + */ + getDefaultTabGroup() { + return this.getKeyValue("default_tab_group"); + + } + + /** + * The method to set the value to defaultTabGroup + * @param {String} defaultTabGroup A String representing the defaultTabGroup + */ + setDefaultTabGroup(defaultTabGroup) { + if((defaultTabGroup != null) && (!(Object.prototype.toString.call(defaultTabGroup) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: defaultTabGroup EXPECTED TYPE: String", null, null); + } + this.addKeyValue("default_tab_group", defaultTabGroup); + + } + + /** + * The method to get the theme + * @returns {Theme} An instance of Theme + */ + getTheme() { + return this.getKeyValue("theme"); + + } + + /** + * The method to set the value to theme + * @param {Theme} theme An instance of Theme + */ + async setTheme(theme) { + const Theme = (await (import("./theme.js"))).MasterModel; + if((theme != null) && (!(theme instanceof Theme))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: theme EXPECTED TYPE: Theme", null, null); + } + this.addKeyValue("theme", theme); + + } + + /** + * The method to get the ntcNotificationType + * @returns {Array} An Array representing the ntcNotificationType + */ + getNtcNotificationType() { + return this.getKeyValue("ntc_notification_type"); + + } + + /** + * The method to set the value to ntcNotificationType + * @param {Array} ntcNotificationType An Array representing the ntcNotificationType + */ + setNtcNotificationType(ntcNotificationType) { + if((ntcNotificationType != null) && (!(Object.prototype.toString.call(ntcNotificationType) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ntcNotificationType EXPECTED TYPE: Array", null, null); + } + this.addKeyValue("ntc_notification_type", ntcNotificationType); + + } + + /** + * The method to get the ntcEnabled + * @returns {Boolean} A Boolean representing the ntcEnabled + */ + getNtcEnabled() { + return this.getKeyValue("ntc_enabled"); + + } + + /** + * The method to set the value to ntcEnabled + * @param {Boolean} ntcEnabled A Boolean representing the ntcEnabled + */ + setNtcEnabled(ntcEnabled) { + if((ntcEnabled != null) && (!(Object.prototype.toString.call(ntcEnabled) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: ntcEnabled EXPECTED TYPE: Boolean", null, null); + } + this.addKeyValue("ntc_enabled", ntcEnabled); + + } + + /** + * The method to get the rtlEnabled + * @returns {Boolean} A Boolean representing the rtlEnabled + */ + getRtlEnabled() { + return this.getKeyValue("rtl_enabled"); + + } + + /** + * The method to set the value to rtlEnabled + * @param {Boolean} rtlEnabled A Boolean representing the rtlEnabled + */ + setRtlEnabled(rtlEnabled) { + if((rtlEnabled != null) && (!(Object.prototype.toString.call(rtlEnabled) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: rtlEnabled EXPECTED TYPE: Boolean", null, null); + } + this.addKeyValue("rtl_enabled", rtlEnabled); + + } + + /** + * The method to get the telephonyEnabled + * @returns {Boolean} A Boolean representing the telephonyEnabled + */ + getTelephonyEnabled() { + return this.getKeyValue("telephony_enabled"); + + } + + /** + * The method to set the value to telephonyEnabled + * @param {Boolean} telephonyEnabled A Boolean representing the telephonyEnabled + */ + setTelephonyEnabled(telephonyEnabled) { + if((telephonyEnabled != null) && (!(Object.prototype.toString.call(telephonyEnabled) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: telephonyEnabled EXPECTED TYPE: Boolean", null, null); + } + this.addKeyValue("telephony_enabled", telephonyEnabled); + + } + + /** + * The method to get the sortOrderPreference + * @returns {String} A String representing the sortOrderPreference + */ + getSortOrderPreference() { + return this.getKeyValue("sort_order_preference"); + + } + + /** + * The method to set the value to sortOrderPreference + * @param {String} sortOrderPreference A String representing the sortOrderPreference + */ + setSortOrderPreference(sortOrderPreference) { + if((sortOrderPreference != null) && (!(Object.prototype.toString.call(sortOrderPreference) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sortOrderPreference EXPECTED TYPE: String", null, null); + } + this.addKeyValue("sort_order_preference", sortOrderPreference); + + } + + /** + * The method to get the createdBy17 + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy17() { + return this.getKeyValue("Created_By"); + + } + + /** + * The method to set the value to createdBy17 + * @param {MinifiedUser} createdBy17 An instance of MinifiedUser + */ + async setCreatedBy17(createdBy17) { + const MinifiedUser = (await (import("./minified_user.js"))).MasterModel; + if((createdBy17 != null) && (!(createdBy17 instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy17 EXPECTED TYPE: MinifiedUser", null, null); + } + this.addKeyValue("Created_By", createdBy17); + + } + + /** + * The method to get the createdTime9 + * @returns {Date} An instance of Date + */ + getCreatedTime9() { + return this.getKeyValue("Created_Time"); + + } + + /** + * The method to set the value to createdTime9 + * @param {Date} createdTime9 An instance of Date + */ + setCreatedTime9(createdTime9) { + if((createdTime9 != null) && (!(createdTime9 instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime9 EXPECTED TYPE: Date", null, null); + } + this.addKeyValue("Created_Time", createdTime9); + + } + + /** + * The method to get the tag + * @returns {Array} An Array representing the tag + */ + getTag() { + return this.getKeyValue("Tag"); + + } + + /** + * The method to set the value to tag + * @param {Array} tag An Array representing the tag + */ + setTag(tag) { + if((tag != null) && (!(Object.prototype.toString.call(tag) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tag EXPECTED TYPE: Array", null, null); + } + this.addKeyValue("Tag", tag); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.getKeyValue("name"); + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.addKeyValue("name", name); + + } + +} +export { + Users as MasterModel, + Users as Users +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users/users_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users/users_operations.js new file mode 100644 index 0000000..932354d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users/users_operations.js @@ -0,0 +1,223 @@ +import {Header} from "../../../../../../routes/header.js"; +import {HeaderMap} from "../../../../../../routes/header_map.js"; +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 UsersOperations{ + /** + * The method to get users + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getUsers(paramInstance=null, headerInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/users"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + handlerInstance.setHeader(headerInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to create users + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createUsers(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/users"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update users + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateUsers(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/users"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get user + * @param {BigInt} user A BigInt representing the user + * @param {HeaderMap} headerInstance An instance of HeaderMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getUser(user, headerInstance=null) { + if((!(Object.prototype.toString.call(user) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: user EXPECTED TYPE: BigInt", null, null); + } + if((headerInstance != null) && (!(headerInstance instanceof HeaderMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: headerInstance EXPECTED TYPE: HeaderMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/users/"); + apiPath = apiPath.concat(user.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setHeader(headerInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to update user + * @param {BigInt} user A BigInt representing the user + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateUser(user, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(user) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: user EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/users/"); + apiPath = apiPath.concat(user.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete user + * @param {BigInt} user A BigInt representing the user + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteUser(user) { + if((!(Object.prototype.toString.call(user) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: user EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/users/"); + apiPath = apiPath.concat(user.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get associated groups + * @param {BigInt} user A BigInt representing the user + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getAssociatedGroups(user) { + if((!(Object.prototype.toString.call(user) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: user EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/users/"); + apiPath = apiPath.concat(user.toString()); + apiPath = apiPath.concat("/actions/associated_groups"); + 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"); + + } + +} +class GetUsersParam{ + + static TYPE = new Param("type", "com.zoho.crm.api.Users.GetUsersParam"); + static PAGE = new Param("page", "com.zoho.crm.api.Users.GetUsersParam"); + static PER_PAGE = new Param("per_page", "com.zoho.crm.api.Users.GetUsersParam"); + static IDS = new Param("ids", "com.zoho.crm.api.Users.GetUsersParam"); +} + +class GetUsersHeader{ + + static IF_MODIFIED_SINCE = new Header("If-Modified-Since", "com.zoho.crm.api.Users.GetUsersHeader"); +} + +class GetUserHeader{ + + static IF_MODIFIED_SINCE = new Header("If-Modified-Since", "com.zoho.crm.api.Users.GetUserHeader"); +} + +export { + UsersOperations as MasterModel, + UsersOperations as UsersOperations, + GetUsersHeader as GetUsersHeader, + GetUsersParam as GetUsersParam, + GetUserHeader as GetUserHeader +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/action_wrapper.js new file mode 100644 index 0000000..5a2a473 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + territories; + keyModified = new Map(); + /** + * The method to get the territories + * @returns {Array} An Array representing the territories + */ + getTerritories() { + return this.territories; + + } + + /** + * The method to set the value to territories + * @param {Array} territories An Array representing the territories + */ + setTerritories(territories) { + if((territories != null) && (!(Object.prototype.toString.call(territories) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territories EXPECTED TYPE: Array", null, null); + } + this.territories = territories; + this.keyModified.set("territories", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/api_exception.js new file mode 100644 index 0000000..35d7ece --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + message; + details; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/body_wrapper.js new file mode 100644 index 0000000..87cade0 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + territories; + keyModified = new Map(); + /** + * The method to get the territories + * @returns {Array} An Array representing the territories + */ + getTerritories() { + return this.territories; + + } + + /** + * The method to set the value to territories + * @param {Array} territories An Array representing the territories + */ + setTerritories(territories) { + if((territories != null) && (!(Object.prototype.toString.call(territories) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territories EXPECTED TYPE: Array", null, null); + } + this.territories = territories; + this.keyModified.set("territories", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/bulk_validation.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/bulk_validation.js new file mode 100644 index 0000000..1ba519c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/bulk_validation.js @@ -0,0 +1,158 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BulkValidation{ + + alert; + assignment; + criteria; + name; + id; + keyModified = new Map(); + /** + * The method to get the alert + * @returns {Boolean} A Boolean representing the alert + */ + getAlert() { + return this.alert; + + } + + /** + * The method to set the value to alert + * @param {Boolean} alert A Boolean representing the alert + */ + setAlert(alert) { + if((alert != null) && (!(Object.prototype.toString.call(alert) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: alert EXPECTED TYPE: Boolean", null, null); + } + this.alert = alert; + this.keyModified.set("alert", 1); + + } + + /** + * The method to get the assignment + * @returns {Boolean} A Boolean representing the assignment + */ + getAssignment() { + return this.assignment; + + } + + /** + * The method to set the value to assignment + * @param {Boolean} assignment A Boolean representing the assignment + */ + setAssignment(assignment) { + if((assignment != null) && (!(Object.prototype.toString.call(assignment) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: assignment EXPECTED TYPE: Boolean", null, null); + } + this.assignment = assignment; + this.keyModified.set("assignment", 1); + + } + + /** + * The method to get the criteria + * @returns {Boolean} A Boolean representing the criteria + */ + getCriteria() { + return this.criteria; + + } + + /** + * The method to set the value to criteria + * @param {Boolean} criteria A Boolean representing the criteria + */ + setCriteria(criteria) { + if((criteria != null) && (!(Object.prototype.toString.call(criteria) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: criteria EXPECTED TYPE: Boolean", null, null); + } + this.criteria = criteria; + this.keyModified.set("criteria", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + BulkValidation as MasterModel, + BulkValidation as BulkValidation +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/import_users_territories.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/import_users_territories.js new file mode 100644 index 0000000..92dc0f9 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/import_users_territories.js @@ -0,0 +1,23 @@ +export * as ResponseHandler from "./response_handler.js"; +export * as ActionHandler from "./action_handler.js"; +export { TransferToUser } from "./transfer_to_user.js"; +export * as TransferActionResponse from "./transfer_action_response.js"; +export { UsersTerritoriesOperations } from "./users_territories_operations.js"; +export { Territory } from "./territory.js"; +export * as ValidationHandler from "./validation_handler.js"; +export { Info } from "./info.js"; +export * as TransferActionHandler from "./transfer_action_handler.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { Manager } from "./manager.js"; +export { Validation } from "./validation.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { APIException } from "./api_exception.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { TransferActionWrapper } from "./transfer_action_wrapper.js"; +export { BulkValidation } from "./bulk_validation.js"; +export { TransferAndDelink } from "./transfer_and_delink.js"; +export { TransferWrapper } from "./transfer_wrapper.js"; +export * as ValidationGroup from "./validation_group.js"; +export { ValidationWrapper } from "./validation_wrapper.js"; +export { SuccessResponse } from "./success_response.js"; +export * as ActionResponse from "./action_response.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/info.js new file mode 100644 index 0000000..9c5b3ef --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/info.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + count; + page; + perPage; + moreRecords; + keyModified = new Map(); + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/manager.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/manager.js new file mode 100644 index 0000000..7d99c25 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/manager.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Manager{ + + name; + id; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("Name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Manager as MasterModel, + Manager as Manager +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/response_wrapper.js new file mode 100644 index 0000000..34a849c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + territories; + info; + keyModified = new Map(); + /** + * The method to get the territories + * @returns {Array} An Array representing the territories + */ + getTerritories() { + return this.territories; + + } + + /** + * The method to set the value to territories + * @param {Array} territories An Array representing the territories + */ + setTerritories(territories) { + if((territories != null) && (!(Object.prototype.toString.call(territories) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territories EXPECTED TYPE: Array", null, null); + } + this.territories = territories; + this.keyModified.set("territories", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/success_response.js new file mode 100644 index 0000000..cb9a3af --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + details; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/territory.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/territory.js new file mode 100644 index 0000000..966a5d0 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/territory.js @@ -0,0 +1,137 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Territory{ + + id; + manager; + reportingTo; + name; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the manager + * @returns {Manager} An instance of Manager + */ + getManager() { + return this.manager; + + } + + /** + * The method to set the value to manager + * @param {Manager} manager An instance of Manager + */ + async setManager(manager) { + const Manager = (await (import("./manager.js"))).MasterModel; + if((manager != null) && (!(manager instanceof Manager))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: manager EXPECTED TYPE: Manager", null, null); + } + this.manager = manager; + this.keyModified.set("Manager", 1); + + } + + /** + * The method to get the reportingTo + * @returns {Manager} An instance of Manager + */ + getReportingTo() { + return this.reportingTo; + + } + + /** + * The method to set the value to reportingTo + * @param {Manager} reportingTo An instance of Manager + */ + async setReportingTo(reportingTo) { + const Manager = (await (import("./manager.js"))).MasterModel; + if((reportingTo != null) && (!(reportingTo instanceof Manager))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: reportingTo EXPECTED TYPE: Manager", null, null); + } + this.reportingTo = reportingTo; + this.keyModified.set("Reporting_To", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("Name", 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 { + Territory as MasterModel, + Territory as Territory +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_action_handler.js new file mode 100644 index 0000000..00df40e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_action_handler.js @@ -0,0 +1,7 @@ +class TransferActionHandler{ + +} +export { + TransferActionHandler as MasterModel, + TransferActionHandler as TransferActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_action_response.js new file mode 100644 index 0000000..f67428f --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_action_response.js @@ -0,0 +1,7 @@ +class TransferActionResponse{ + +} +export { + TransferActionResponse as MasterModel, + TransferActionResponse as TransferActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_action_wrapper.js new file mode 100644 index 0000000..cf8a571 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class TransferActionWrapper{ + + transferAndDelink; + keyModified = new Map(); + /** + * The method to get the transferAndDelink + * @returns {Array} An Array representing the transferAndDelink + */ + getTransferAndDelink() { + return this.transferAndDelink; + + } + + /** + * The method to set the value to transferAndDelink + * @param {Array} transferAndDelink An Array representing the transferAndDelink + */ + setTransferAndDelink(transferAndDelink) { + if((transferAndDelink != null) && (!(Object.prototype.toString.call(transferAndDelink) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: transferAndDelink EXPECTED TYPE: Array", null, null); + } + this.transferAndDelink = transferAndDelink; + this.keyModified.set("transfer_and_delink", 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 { + TransferActionWrapper as MasterModel, + TransferActionWrapper as TransferActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_and_delink.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_and_delink.js new file mode 100644 index 0000000..af76e61 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_and_delink.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class TransferAndDelink{ + + id; + transferToUser; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the transferToUser + * @returns {TransferToUser} An instance of TransferToUser + */ + getTransferToUser() { + return this.transferToUser; + + } + + /** + * The method to set the value to transferToUser + * @param {TransferToUser} transferToUser An instance of TransferToUser + */ + async setTransferToUser(transferToUser) { + const TransferToUser = (await (import("./transfer_to_user.js"))).MasterModel; + if((transferToUser != null) && (!(transferToUser instanceof TransferToUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: transferToUser EXPECTED TYPE: TransferToUser", null, null); + } + this.transferToUser = transferToUser; + this.keyModified.set("transfer_to_user", 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 { + TransferAndDelink as MasterModel, + TransferAndDelink as TransferAndDelink +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_to_user.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_to_user.js new file mode 100644 index 0000000..915896e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_to_user.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class TransferToUser{ + + id; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + TransferToUser as MasterModel, + TransferToUser as TransferToUser +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_wrapper.js new file mode 100644 index 0000000..17424cf --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/transfer_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class TransferWrapper{ + + transferAndDelink; + keyModified = new Map(); + /** + * The method to get the transferAndDelink + * @returns {Array} An Array representing the transferAndDelink + */ + getTransferAndDelink() { + return this.transferAndDelink; + + } + + /** + * The method to set the value to transferAndDelink + * @param {Array} transferAndDelink An Array representing the transferAndDelink + */ + setTransferAndDelink(transferAndDelink) { + if((transferAndDelink != null) && (!(Object.prototype.toString.call(transferAndDelink) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: transferAndDelink EXPECTED TYPE: Array", null, null); + } + this.transferAndDelink = transferAndDelink; + this.keyModified.set("transfer_and_delink", 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 { + TransferWrapper as MasterModel, + TransferWrapper as TransferWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/users_territories_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/users_territories_operations.js new file mode 100644 index 0000000..81900ca --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/users_territories_operations.js @@ -0,0 +1,219 @@ +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 UsersTerritoriesOperations{ + /** + * The method to get territories of user + * @param {BigInt} user A BigInt representing the user + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getTerritoriesOfUser(user) { + if((!(Object.prototype.toString.call(user) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: user EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/users/"); + apiPath = apiPath.concat(user.toString()); + apiPath = apiPath.concat("/territories"); + 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"); + + } + + /** + * The method to associate territories to user + * @param {BigInt} user A BigInt representing the user + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async associateTerritoriesToUser(user, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(user) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: user EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/users/"); + apiPath = apiPath.concat(user.toString()); + apiPath = apiPath.concat("/territories"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get territory of user + * @param {BigInt} territory A BigInt representing the territory + * @param {BigInt} user A BigInt representing the user + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getTerritoryOfUser(territory, user) { + if((!(Object.prototype.toString.call(territory) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territory EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(user) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: user EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/users/"); + apiPath = apiPath.concat(user.toString()); + apiPath = apiPath.concat("/territories/"); + apiPath = apiPath.concat(territory.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/json"); + + } + + /** + * The method to validate before transfer for all territories + * @param {BigInt} user A BigInt representing the user + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async validateBeforeTransferForAllTerritories(user) { + if((!(Object.prototype.toString.call(user) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: user EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/users/"); + apiPath = apiPath.concat(user.toString()); + apiPath = apiPath.concat("/territories/actions/validate_before_transfer"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + const require = createRequire(import.meta.url); + let ValidationHandler = require.resolve("./validation_handler.js"); + return handlerInstance.apiCall(ValidationHandler, "application/json"); + + } + + /** + * The method to validate before transfer + * @param {BigInt} territory A BigInt representing the territory + * @param {BigInt} user A BigInt representing the user + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async validateBeforeTransfer(territory, user) { + if((!(Object.prototype.toString.call(territory) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territory EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(user) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: user EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/users/"); + apiPath = apiPath.concat(user.toString()); + apiPath = apiPath.concat("/territories/"); + apiPath = apiPath.concat(territory.toString()); + apiPath = apiPath.concat("/actions/validate_before_transfer"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + const require = createRequire(import.meta.url); + let ValidationHandler = require.resolve("./validation_handler.js"); + return handlerInstance.apiCall(ValidationHandler, "application/json"); + + } + + /** + * The method to delink and transfer from all territories + * @param {BigInt} user A BigInt representing the user + * @param {TransferWrapper} request An instance of TransferWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async delinkAndTransferFromAllTerritories(user, request) { + const TransferWrapper = (await (import("./transfer_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(user) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: user EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof TransferWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: TransferWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/users/"); + apiPath = apiPath.concat(user.toString()); + apiPath = apiPath.concat("/territories/actions/transfer_and_delink"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let TransferActionHandler = require.resolve("./transfer_action_handler.js"); + return handlerInstance.apiCall(TransferActionHandler, "application/json"); + + } + + /** + * The method to delink and transfer from specific territory + * @param {BigInt} territory A BigInt representing the territory + * @param {BigInt} user A BigInt representing the user + * @param {TransferWrapper} request An instance of TransferWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async delinkAndTransferFromSpecificTerritory(territory, user, request) { + const TransferWrapper = (await (import("./transfer_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(territory) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: territory EXPECTED TYPE: BigInt", null, null); + } + if((!(Object.prototype.toString.call(user) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: user EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof TransferWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: TransferWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/users/"); + apiPath = apiPath.concat(user.toString()); + apiPath = apiPath.concat("/territories/"); + apiPath = apiPath.concat(territory.toString()); + apiPath = apiPath.concat("/actions/transfer_and_delink"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let TransferActionHandler = require.resolve("./transfer_action_handler.js"); + return handlerInstance.apiCall(TransferActionHandler, "application/json"); + + } + +} +export { + UsersTerritoriesOperations as MasterModel, + UsersTerritoriesOperations as UsersTerritoriesOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/validation.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/validation.js new file mode 100644 index 0000000..e1e494d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/validation.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Validation{ + + id; + name; + records; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("Name", 1); + + } + + /** + * The method to get the records + * @returns {Boolean} A Boolean representing the records + */ + getRecords() { + return this.records; + + } + + /** + * The method to set the value to records + * @param {Boolean} records A Boolean representing the records + */ + setRecords(records) { + if((records != null) && (!(Object.prototype.toString.call(records) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: records EXPECTED TYPE: Boolean", null, null); + } + this.records = records; + this.keyModified.set("records", 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 { + Validation as MasterModel, + Validation as Validation +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/validation_group.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/validation_group.js new file mode 100644 index 0000000..923fb33 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/validation_group.js @@ -0,0 +1,7 @@ +class ValidationGroup{ + +} +export { + ValidationGroup as MasterModel, + ValidationGroup as ValidationGroup +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/validation_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/validation_handler.js new file mode 100644 index 0000000..1cef1f3 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/validation_handler.js @@ -0,0 +1,7 @@ +class ValidationHandler{ + +} +export { + ValidationHandler as MasterModel, + ValidationHandler as ValidationHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/validation_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/validation_wrapper.js new file mode 100644 index 0000000..a7602a1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_territories/validation_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ValidationWrapper{ + + validateBeforeTransfer; + keyModified = new Map(); + /** + * The method to get the validateBeforeTransfer + * @returns {Array} An Array representing the validateBeforeTransfer + */ + getValidateBeforeTransfer() { + return this.validateBeforeTransfer; + + } + + /** + * The method to set the value to validateBeforeTransfer + * @param {Array} validateBeforeTransfer An Array representing the validateBeforeTransfer + */ + setValidateBeforeTransfer(validateBeforeTransfer) { + if((validateBeforeTransfer != null) && (!(Object.prototype.toString.call(validateBeforeTransfer) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: validateBeforeTransfer EXPECTED TYPE: Array", null, null); + } + this.validateBeforeTransfer = validateBeforeTransfer; + this.keyModified.set("validate_before_transfer", 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 { + ValidationWrapper as MasterModel, + ValidationWrapper as ValidationWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/action_wrapper.js new file mode 100644 index 0000000..5285da5 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + transferAndDelete; + keyModified = new Map(); + /** + * The method to get the transferAndDelete + * @returns {Array} An Array representing the transferAndDelete + */ + getTransferAndDelete() { + return this.transferAndDelete; + + } + + /** + * The method to set the value to transferAndDelete + * @param {Array} transferAndDelete An Array representing the transferAndDelete + */ + setTransferAndDelete(transferAndDelete) { + if((transferAndDelete != null) && (!(Object.prototype.toString.call(transferAndDelete) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: transferAndDelete EXPECTED TYPE: Array", null, null); + } + this.transferAndDelete = transferAndDelete; + this.keyModified.set("transfer_and_delete", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/body_wrapper.js new file mode 100644 index 0000000..34a8f3e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + transferAndDelete; + keyModified = new Map(); + /** + * The method to get the transferAndDelete + * @returns {Array} An Array representing the transferAndDelete + */ + getTransferAndDelete() { + return this.transferAndDelete; + + } + + /** + * The method to set the value to transferAndDelete + * @param {Array} transferAndDelete An Array representing the transferAndDelete + */ + setTransferAndDelete(transferAndDelete) { + if((transferAndDelete != null) && (!(Object.prototype.toString.call(transferAndDelete) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: transferAndDelete EXPECTED TYPE: Array", null, null); + } + this.transferAndDelete = transferAndDelete; + this.keyModified.set("transfer_and_delete", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/import_users_transfer_delete.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/import_users_transfer_delete.js new file mode 100644 index 0000000..6170661 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/import_users_transfer_delete.js @@ -0,0 +1,15 @@ +export { UsersTransferDeleteOperations } from "./users_transfer_delete_operations.js"; +export { GetStatusParam } from "./users_transfer_delete_operations.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { APIException } from "./api_exception.js"; +export { TransferAndDeleteByID } from "./transfer_and_delete_by_i_d.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export * as ActionHandler from "./action_handler.js"; +export * as ActionResponse from "./action_response.js"; +export { TransferAndDelete } from "./transfer_and_delete.js"; +export { SuccessResponse } from "./success_response.js"; +export * as ResponseHandler from "./response_handler.js"; +export { MoveSubordinate } from "./move_subordinate.js"; +export { Status } from "./status.js"; +export { Transfer } from "./transfer.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/move_subordinate.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/move_subordinate.js new file mode 100644 index 0000000..7c22d4b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/move_subordinate.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MoveSubordinate{ + + id; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + MoveSubordinate as MasterModel, + MoveSubordinate as MoveSubordinate +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/response_wrapper.js new file mode 100644 index 0000000..bbdcdab --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + transferAndDelete; + keyModified = new Map(); + /** + * The method to get the transferAndDelete + * @returns {Array} An Array representing the transferAndDelete + */ + getTransferAndDelete() { + return this.transferAndDelete; + + } + + /** + * The method to set the value to transferAndDelete + * @param {Array} transferAndDelete An Array representing the transferAndDelete + */ + setTransferAndDelete(transferAndDelete) { + if((transferAndDelete != null) && (!(Object.prototype.toString.call(transferAndDelete) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: transferAndDelete EXPECTED TYPE: Array", null, null); + } + this.transferAndDelete = transferAndDelete; + this.keyModified.set("transfer_and_delete", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/status.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/status.js new file mode 100644 index 0000000..1f219f8 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/status.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Status{ + + status; + keyModified = new Map(); + /** + * The method to get the status + * @returns {String} A String representing the status + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {String} status A String representing the status + */ + setStatus(status) { + if((status != null) && (!(Object.prototype.toString.call(status) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: String", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + Status as MasterModel, + Status as Status +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/success_response.js new file mode 100644 index 0000000..39525ad --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/transfer.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/transfer.js new file mode 100644 index 0000000..aa78077 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/transfer.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Transfer{ + + records; + assignment; + criteria; + id; + keyModified = new Map(); + /** + * The method to get the records + * @returns {Boolean} A Boolean representing the records + */ + getRecords() { + return this.records; + + } + + /** + * The method to set the value to records + * @param {Boolean} records A Boolean representing the records + */ + setRecords(records) { + if((records != null) && (!(Object.prototype.toString.call(records) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: records EXPECTED TYPE: Boolean", null, null); + } + this.records = records; + this.keyModified.set("records", 1); + + } + + /** + * The method to get the assignment + * @returns {Boolean} A Boolean representing the assignment + */ + getAssignment() { + return this.assignment; + + } + + /** + * The method to set the value to assignment + * @param {Boolean} assignment A Boolean representing the assignment + */ + setAssignment(assignment) { + if((assignment != null) && (!(Object.prototype.toString.call(assignment) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: assignment EXPECTED TYPE: Boolean", null, null); + } + this.assignment = assignment; + this.keyModified.set("assignment", 1); + + } + + /** + * The method to get the criteria + * @returns {Boolean} A Boolean representing the criteria + */ + getCriteria() { + return this.criteria; + + } + + /** + * The method to set the value to criteria + * @param {Boolean} criteria A Boolean representing the criteria + */ + setCriteria(criteria) { + if((criteria != null) && (!(Object.prototype.toString.call(criteria) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: criteria EXPECTED TYPE: Boolean", null, null); + } + this.criteria = criteria; + this.keyModified.set("criteria", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Transfer as MasterModel, + Transfer as Transfer +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete.js new file mode 100644 index 0000000..1c5fd17 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete.js @@ -0,0 +1,114 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class TransferAndDelete{ + + id; + transfer; + moveSubordinate; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the transfer + * @returns {Transfer} An instance of Transfer + */ + getTransfer() { + return this.transfer; + + } + + /** + * The method to set the value to transfer + * @param {Transfer} transfer An instance of Transfer + */ + async setTransfer(transfer) { + const Transfer = (await (import("./transfer.js"))).MasterModel; + if((transfer != null) && (!(transfer instanceof Transfer))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: transfer EXPECTED TYPE: Transfer", null, null); + } + this.transfer = transfer; + this.keyModified.set("transfer", 1); + + } + + /** + * The method to get the moveSubordinate + * @returns {MoveSubordinate} An instance of MoveSubordinate + */ + getMoveSubordinate() { + return this.moveSubordinate; + + } + + /** + * The method to set the value to moveSubordinate + * @param {MoveSubordinate} moveSubordinate An instance of MoveSubordinate + */ + async setMoveSubordinate(moveSubordinate) { + const MoveSubordinate = (await (import("./move_subordinate.js"))).MasterModel; + if((moveSubordinate != null) && (!(moveSubordinate instanceof MoveSubordinate))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moveSubordinate EXPECTED TYPE: MoveSubordinate", null, null); + } + this.moveSubordinate = moveSubordinate; + this.keyModified.set("move_subordinate", 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 { + TransferAndDelete as MasterModel, + TransferAndDelete as TransferAndDelete +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete_by_i_d.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete_by_i_d.js new file mode 100644 index 0000000..e19adbe --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/transfer_and_delete_by_i_d.js @@ -0,0 +1,91 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class TransferAndDeleteByID{ + + transfer; + moveSubordinate; + keyModified = new Map(); + /** + * The method to get the transfer + * @returns {Transfer} An instance of Transfer + */ + getTransfer() { + return this.transfer; + + } + + /** + * The method to set the value to transfer + * @param {Transfer} transfer An instance of Transfer + */ + async setTransfer(transfer) { + const Transfer = (await (import("./transfer.js"))).MasterModel; + if((transfer != null) && (!(transfer instanceof Transfer))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: transfer EXPECTED TYPE: Transfer", null, null); + } + this.transfer = transfer; + this.keyModified.set("transfer", 1); + + } + + /** + * The method to get the moveSubordinate + * @returns {MoveSubordinate} An instance of MoveSubordinate + */ + getMoveSubordinate() { + return this.moveSubordinate; + + } + + /** + * The method to set the value to moveSubordinate + * @param {MoveSubordinate} moveSubordinate An instance of MoveSubordinate + */ + async setMoveSubordinate(moveSubordinate) { + const MoveSubordinate = (await (import("./move_subordinate.js"))).MasterModel; + if((moveSubordinate != null) && (!(moveSubordinate instanceof MoveSubordinate))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moveSubordinate EXPECTED TYPE: MoveSubordinate", null, null); + } + this.moveSubordinate = moveSubordinate; + this.keyModified.set("move_subordinate", 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 { + TransferAndDeleteByID as MasterModel, + TransferAndDeleteByID as TransferAndDeleteByID +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/users_transfer_delete_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/users_transfer_delete_operations.js new file mode 100644 index 0000000..a7812cf --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_transfer_delete/users_transfer_delete_operations.js @@ -0,0 +1,101 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 UsersTransferDeleteOperations{ + /** + * The method to users transfer and delete + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async usersTransferAndDelete(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/users/actions/transfer_and_delete"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get status + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getStatus(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/users/actions/transfer_and_delete"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to user transfer and delete + * @param {BigInt} id A BigInt representing the id + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async userTransferAndDelete(id, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/users/"); + apiPath = apiPath.concat(id.toString()); + apiPath = apiPath.concat("/actions/transfer_and_delete"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class GetStatusParam{ + + static JOB_ID = new Param("job_id", "com.zoho.crm.api.UsersTransferDelete.GetStatusParam"); +} + +export { + GetStatusParam as GetStatusParam, + UsersTransferDeleteOperations as MasterModel, + UsersTransferDeleteOperations as UsersTransferDeleteOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/action_wrapper.js new file mode 100644 index 0000000..50eb83e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + usersUnavailability; + keyModified = new Map(); + /** + * The method to get the usersUnavailability + * @returns {Array} An Array representing the usersUnavailability + */ + getUsersUnavailability() { + return this.usersUnavailability; + + } + + /** + * The method to set the value to usersUnavailability + * @param {Array} usersUnavailability An Array representing the usersUnavailability + */ + setUsersUnavailability(usersUnavailability) { + if((usersUnavailability != null) && (!(Object.prototype.toString.call(usersUnavailability) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: usersUnavailability EXPECTED TYPE: Array", null, null); + } + this.usersUnavailability = usersUnavailability; + this.keyModified.set("users_unavailability", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/api_exception.js new file mode 100644 index 0000000..1f3bdfc --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/body_wrapper.js new file mode 100644 index 0000000..ae1b8df --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + usersUnavailability; + keyModified = new Map(); + /** + * The method to get the usersUnavailability + * @returns {Array} An Array representing the usersUnavailability + */ + getUsersUnavailability() { + return this.usersUnavailability; + + } + + /** + * The method to set the value to usersUnavailability + * @param {Array} usersUnavailability An Array representing the usersUnavailability + */ + setUsersUnavailability(usersUnavailability) { + if((usersUnavailability != null) && (!(Object.prototype.toString.call(usersUnavailability) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: usersUnavailability EXPECTED TYPE: Array", null, null); + } + this.usersUnavailability = usersUnavailability; + this.keyModified.set("users_unavailability", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/import_users_unavailability.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/import_users_unavailability.js new file mode 100644 index 0000000..7f1de4b --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/import_users_unavailability.js @@ -0,0 +1,14 @@ +export { ActionWrapper } from "./action_wrapper.js"; +export { UsersUnavailabilityOperations } from "./users_unavailability_operations.js"; +export { GetUsersUnavailabilityParam } from "./users_unavailability_operations.js"; +export { GetUserUnavailabilityParam } from "./users_unavailability_operations.js"; +export { User } from "./user.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export * as ActionHandler from "./action_handler.js"; +export { Info } from "./info.js"; +export * as ActionResponse from "./action_response.js"; +export { APIException } from "./api_exception.js"; +export { UsersUnavailability } from "./users_unavailability.js"; +export * as ResponseHandler from "./response_handler.js"; +export { SuccessResponse } from "./success_response.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/info.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/info.js new file mode 100644 index 0000000..e495623 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/info.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Info{ + + perPage; + count; + page; + moreRecords; + keyModified = new Map(); + /** + * The method to get the perPage + * @returns {number} A number representing the perPage + */ + getPerPage() { + return this.perPage; + + } + + /** + * The method to set the value to perPage + * @param {number} perPage A number representing the perPage + */ + setPerPage(perPage) { + if((perPage != null) && (!(Object.prototype.toString.call(perPage) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: perPage EXPECTED TYPE: number", null, null); + } + this.perPage = perPage; + this.keyModified.set("per_page", 1); + + } + + /** + * The method to get the count + * @returns {number} A number representing the count + */ + getCount() { + return this.count; + + } + + /** + * The method to set the value to count + * @param {number} count A number representing the count + */ + setCount(count) { + if((count != null) && (!(Object.prototype.toString.call(count) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: count EXPECTED TYPE: number", null, null); + } + this.count = count; + this.keyModified.set("count", 1); + + } + + /** + * The method to get the page + * @returns {number} A number representing the page + */ + getPage() { + return this.page; + + } + + /** + * The method to set the value to page + * @param {number} page A number representing the page + */ + setPage(page) { + if((page != null) && (!(Object.prototype.toString.call(page) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: page EXPECTED TYPE: number", null, null); + } + this.page = page; + this.keyModified.set("page", 1); + + } + + /** + * The method to get the moreRecords + * @returns {Boolean} A Boolean representing the moreRecords + */ + getMoreRecords() { + return this.moreRecords; + + } + + /** + * The method to set the value to moreRecords + * @param {Boolean} moreRecords A Boolean representing the moreRecords + */ + setMoreRecords(moreRecords) { + if((moreRecords != null) && (!(Object.prototype.toString.call(moreRecords) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: moreRecords EXPECTED TYPE: Boolean", null, null); + } + this.moreRecords = moreRecords; + this.keyModified.set("more_records", 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 { + Info as MasterModel, + Info as Info +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/response_wrapper.js new file mode 100644 index 0000000..4e6c062 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/response_wrapper.js @@ -0,0 +1,90 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + usersUnavailability; + info; + keyModified = new Map(); + /** + * The method to get the usersUnavailability + * @returns {Array} An Array representing the usersUnavailability + */ + getUsersUnavailability() { + return this.usersUnavailability; + + } + + /** + * The method to set the value to usersUnavailability + * @param {Array} usersUnavailability An Array representing the usersUnavailability + */ + setUsersUnavailability(usersUnavailability) { + if((usersUnavailability != null) && (!(Object.prototype.toString.call(usersUnavailability) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: usersUnavailability EXPECTED TYPE: Array", null, null); + } + this.usersUnavailability = usersUnavailability; + this.keyModified.set("users_unavailability", 1); + + } + + /** + * The method to get the info + * @returns {Info} An instance of Info + */ + getInfo() { + return this.info; + + } + + /** + * The method to set the value to info + * @param {Info} info An instance of Info + */ + async setInfo(info) { + const Info = (await (import("./info.js"))).MasterModel; + if((info != null) && (!(info instanceof Info))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: Info", null, null); + } + this.info = info; + this.keyModified.set("info", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/success_response.js new file mode 100644 index 0000000..39525ad --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + status; + code; + message; + details; + keyModified = new Map(); + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/user.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/user.js new file mode 100644 index 0000000..383edc2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/user.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class User{ + + name; + id; + zuid; + keyModified = new Map(); + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the zuid + * @returns {String} A String representing the zuid + */ + getZuid() { + return this.zuid; + + } + + /** + * The method to set the value to zuid + * @param {String} zuid A String representing the zuid + */ + setZuid(zuid) { + if((zuid != null) && (!(Object.prototype.toString.call(zuid) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: zuid EXPECTED TYPE: String", null, null); + } + this.zuid = zuid; + this.keyModified.set("zuid", 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 { + User as MasterModel, + User as User +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/users_unavailability.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/users_unavailability.js new file mode 100644 index 0000000..04feda1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/users_unavailability.js @@ -0,0 +1,274 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class UsersUnavailability{ + + service; + title; + allDay; + tpCalendarId; + tpEventId; + comments; + from; + id; + to; + user; + keyModified = new Map(); + /** + * The method to get the service + * @returns {String} A String representing the service + */ + getService() { + return this.service; + + } + + /** + * The method to set the value to service + * @param {String} service A String representing the service + */ + setService(service) { + if((service != null) && (!(Object.prototype.toString.call(service) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: service EXPECTED TYPE: String", null, null); + } + this.service = service; + this.keyModified.set("service", 1); + + } + + /** + * The method to get the title + * @returns {String} A String representing the title + */ + getTitle() { + return this.title; + + } + + /** + * The method to set the value to title + * @param {String} title A String representing the title + */ + setTitle(title) { + if((title != null) && (!(Object.prototype.toString.call(title) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: title EXPECTED TYPE: String", null, null); + } + this.title = title; + this.keyModified.set("title", 1); + + } + + /** + * The method to get the allDay + * @returns {Boolean} A Boolean representing the allDay + */ + getAllDay() { + return this.allDay; + + } + + /** + * The method to set the value to allDay + * @param {Boolean} allDay A Boolean representing the allDay + */ + setAllDay(allDay) { + if((allDay != null) && (!(Object.prototype.toString.call(allDay) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: allDay EXPECTED TYPE: Boolean", null, null); + } + this.allDay = allDay; + this.keyModified.set("all_day", 1); + + } + + /** + * The method to get the tpCalendarId + * @returns {String} A String representing the tpCalendarId + */ + getTpCalendarId() { + return this.tpCalendarId; + + } + + /** + * The method to set the value to tpCalendarId + * @param {String} tpCalendarId A String representing the tpCalendarId + */ + setTpCalendarId(tpCalendarId) { + if((tpCalendarId != null) && (!(Object.prototype.toString.call(tpCalendarId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tpCalendarId EXPECTED TYPE: String", null, null); + } + this.tpCalendarId = tpCalendarId; + this.keyModified.set("tp_calendar_id", 1); + + } + + /** + * The method to get the tpEventId + * @returns {String} A String representing the tpEventId + */ + getTpEventId() { + return this.tpEventId; + + } + + /** + * The method to set the value to tpEventId + * @param {String} tpEventId A String representing the tpEventId + */ + setTpEventId(tpEventId) { + if((tpEventId != null) && (!(Object.prototype.toString.call(tpEventId) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: tpEventId EXPECTED TYPE: String", null, null); + } + this.tpEventId = tpEventId; + this.keyModified.set("tp_event_id", 1); + + } + + /** + * The method to get the comments + * @returns {String} A String representing the comments + */ + getComments() { + return this.comments; + + } + + /** + * The method to set the value to comments + * @param {String} comments A String representing the comments + */ + setComments(comments) { + if((comments != null) && (!(Object.prototype.toString.call(comments) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: comments EXPECTED TYPE: String", null, null); + } + this.comments = comments; + this.keyModified.set("comments", 1); + + } + + /** + * The method to get the from + * @returns {Date} An instance of Date + */ + getFrom() { + return this.from; + + } + + /** + * The method to set the value to from + * @param {Date} from An instance of Date + */ + setFrom(from) { + if((from != null) && (!(from instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: from EXPECTED TYPE: Date", null, null); + } + this.from = from; + this.keyModified.set("from", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the to + * @returns {Date} An instance of Date + */ + getTo() { + return this.to; + + } + + /** + * The method to set the value to to + * @param {Date} to An instance of Date + */ + setTo(to) { + if((to != null) && (!(to instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: to EXPECTED TYPE: Date", null, null); + } + this.to = to; + this.keyModified.set("to", 1); + + } + + /** + * The method to get the user + * @returns {User} An instance of User + */ + getUser() { + return this.user; + + } + + /** + * The method to set the value to user + * @param {User} user An instance of User + */ + async setUser(user) { + const User = (await (import("./user.js"))).MasterModel; + if((user != null) && (!(user instanceof User))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: user EXPECTED TYPE: User", null, null); + } + this.user = user; + this.keyModified.set("user", 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 { + UsersUnavailability as MasterModel, + UsersUnavailability as UsersUnavailability +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/users_unavailability_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/users_unavailability_operations.js new file mode 100644 index 0000000..ab15fb4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/users_unavailability/users_unavailability_operations.js @@ -0,0 +1,187 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 UsersUnavailabilityOperations{ + /** + * The method to create users unavailability + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createUsersUnavailability(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/users_unavailability"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update users unavailabilites + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateUsersUnavailabilites(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/users_unavailability"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get users unavailability + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getUsersUnavailability(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/users_unavailability"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to update user unavailability + * @param {String} id A String representing the id + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateUserUnavailability(id, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/users_unavailability/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get user unavailability + * @param {String} id A String representing the id + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getUserUnavailability(id, paramInstance=null) { + if((!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/users_unavailability/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to delete user unavailability hour + * @param {String} id A String representing the id + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteUserUnavailabilityHour(id) { + if((!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/users_unavailability/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + +} +class GetUsersUnavailabilityParam{ + + static INCLUDE_INNER_DETAILS = new Param("include_inner_details", "com.zoho.crm.api.UsersUnavailability.GetUsersUnavailabilityParam"); + static GROUP_IDS = new Param("group_ids", "com.zoho.crm.api.UsersUnavailability.GetUsersUnavailabilityParam"); + static ROLE_IDS = new Param("role_ids", "com.zoho.crm.api.UsersUnavailability.GetUsersUnavailabilityParam"); + static TERRITORY_IDS = new Param("territory_ids", "com.zoho.crm.api.UsersUnavailability.GetUsersUnavailabilityParam"); + static FILTERS = new Param("filters", "com.zoho.crm.api.UsersUnavailability.GetUsersUnavailabilityParam"); +} + +class GetUserUnavailabilityParam{ + + static INCLUDE_INNER_DETAILS = new Param("include_inner_details", "com.zoho.crm.api.UsersUnavailability.GetUserUnavailabilityParam"); + static FILTERS = new Param("filters", "com.zoho.crm.api.UsersUnavailability.GetUserUnavailabilityParam"); +} + +export { + UsersUnavailabilityOperations as MasterModel, + UsersUnavailabilityOperations as UsersUnavailabilityOperations, + GetUsersUnavailabilityParam as GetUsersUnavailabilityParam, + GetUserUnavailabilityParam as GetUserUnavailabilityParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/api_exception.js new file mode 100644 index 0000000..e87a292 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + status; + message; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/import_variable_groups.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/import_variable_groups.js new file mode 100644 index 0000000..04b8183 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/import_variable_groups.js @@ -0,0 +1,6 @@ +export { VariableGroupsOperations } from "./variable_groups_operations.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { MinifiedVariableGroup } from "./minified_variable_group.js"; +export { VariableGroup } from "./variable_group.js"; +export { APIException } from "./api_exception.js"; +export * as ResponseHandler from "./response_handler.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/minified_variable_group.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/minified_variable_group.js new file mode 100644 index 0000000..58751a1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/minified_variable_group.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class MinifiedVariableGroup{ + + id; + apiName; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 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 { + MinifiedVariableGroup as MasterModel, + MinifiedVariableGroup as MinifiedVariableGroup +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/response_wrapper.js new file mode 100644 index 0000000..730cd97 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + variableGroups; + keyModified = new Map(); + /** + * The method to get the variableGroups + * @returns {Array} An Array representing the variableGroups + */ + getVariableGroups() { + return this.variableGroups; + + } + + /** + * The method to set the value to variableGroups + * @param {Array} variableGroups An Array representing the variableGroups + */ + setVariableGroups(variableGroups) { + if((variableGroups != null) && (!(Object.prototype.toString.call(variableGroups) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: variableGroups EXPECTED TYPE: Array", null, null); + } + this.variableGroups = variableGroups; + this.keyModified.set("variable_groups", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/variable_group.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/variable_group.js new file mode 100644 index 0000000..067fcd3 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/variable_group.js @@ -0,0 +1,181 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class VariableGroup{ + + displayLabel; + apiName; + name; + description; + id; + source; + keyModified = new Map(); + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the description + * @returns {String} A String representing the description + */ + getDescription() { + return this.description; + + } + + /** + * The method to set the value to description + * @param {String} description A String representing the description + */ + setDescription(description) { + if((description != null) && (!(Object.prototype.toString.call(description) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: description EXPECTED TYPE: String", null, null); + } + this.description = description; + this.keyModified.set("description", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the source + * @returns {String} A String representing the source + */ + getSource() { + return this.source; + + } + + /** + * The method to set the value to source + * @param {String} source A String representing the source + */ + setSource(source) { + if((source != null) && (!(Object.prototype.toString.call(source) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: source EXPECTED TYPE: String", null, null); + } + this.source = source; + this.keyModified.set("source", 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 { + VariableGroup as MasterModel, + VariableGroup as VariableGroup +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/variable_groups_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/variable_groups_operations.js new file mode 100644 index 0000000..42be865 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variable_groups/variable_groups_operations.js @@ -0,0 +1,76 @@ +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 VariableGroupsOperations{ + /** + * The method to get variable groups + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getVariableGroups() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/variable_groups"); + 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"); + + } + + /** + * The method to get variable group by id + * @param {String} id A String representing the id + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getVariableGroupById(id) { + if((!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/variable_groups/"); + apiPath = apiPath.concat(id.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/json"); + + } + + /** + * The method to get variable group by api name + * @param {String} apiName A String representing the apiName + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getVariableGroupByAPIName(apiName) { + if((!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/variable_groups/"); + apiPath = apiPath.concat(apiName.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/json"); + + } + +} +export { + VariableGroupsOperations as MasterModel, + VariableGroupsOperations as VariableGroupsOperations +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variables/action_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/action_handler.js new file mode 100644 index 0000000..48a5ea4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/action_handler.js @@ -0,0 +1,7 @@ +class ActionHandler{ + +} +export { + ActionHandler as MasterModel, + ActionHandler as ActionHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variables/action_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/action_response.js new file mode 100644 index 0000000..a722577 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/action_response.js @@ -0,0 +1,7 @@ +class ActionResponse{ + +} +export { + ActionResponse as MasterModel, + ActionResponse as ActionResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variables/action_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/action_wrapper.js new file mode 100644 index 0000000..e982b4e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/action_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ActionWrapper{ + + variables; + keyModified = new Map(); + /** + * The method to get the variables + * @returns {Array} An Array representing the variables + */ + getVariables() { + return this.variables; + + } + + /** + * The method to set the value to variables + * @param {Array} variables An Array representing the variables + */ + setVariables(variables) { + if((variables != null) && (!(Object.prototype.toString.call(variables) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: variables EXPECTED TYPE: Array", null, null); + } + this.variables = variables; + this.keyModified.set("variables", 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 { + ActionWrapper as MasterModel, + ActionWrapper as ActionWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variables/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/api_exception.js new file mode 100644 index 0000000..eef1972 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + details; + message; + status; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variables/body_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/body_wrapper.js new file mode 100644 index 0000000..dea34e8 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/body_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class BodyWrapper{ + + variables; + keyModified = new Map(); + /** + * The method to get the variables + * @returns {Array} An Array representing the variables + */ + getVariables() { + return this.variables; + + } + + /** + * The method to set the value to variables + * @param {Array} variables An Array representing the variables + */ + setVariables(variables) { + if((variables != null) && (!(Object.prototype.toString.call(variables) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: variables EXPECTED TYPE: Array", null, null); + } + this.variables = variables; + this.keyModified.set("variables", 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 { + BodyWrapper as MasterModel, + BodyWrapper as BodyWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variables/error_details.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/error_details.js new file mode 100644 index 0000000..bd8bb0c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/error_details.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ErrorDetails{ + + apiName; + jsonPath; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the jsonPath + * @returns {String} A String representing the jsonPath + */ + getJsonPath() { + return this.jsonPath; + + } + + /** + * The method to set the value to jsonPath + * @param {String} jsonPath A String representing the jsonPath + */ + setJsonPath(jsonPath) { + if((jsonPath != null) && (!(Object.prototype.toString.call(jsonPath) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: jsonPath EXPECTED TYPE: String", null, null); + } + this.jsonPath = jsonPath; + this.keyModified.set("json_path", 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 { + ErrorDetails as MasterModel, + ErrorDetails as ErrorDetails +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variables/import_variables.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/import_variables.js new file mode 100644 index 0000000..afade44 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/import_variables.js @@ -0,0 +1,16 @@ +export * as ActionHandler from "./action_handler.js"; +export * as ResponseHandler from "./response_handler.js"; +export { APIException } from "./api_exception.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { BodyWrapper } from "./body_wrapper.js"; +export { VariablesOperations } from "./variables_operations.js"; +export { GetVariablesParam } from "./variables_operations.js"; +export { DeleteVariablesParam } from "./variables_operations.js"; +export { GetVariableByIDParam } from "./variables_operations.js"; +export { GetVariableByAPINameParam } from "./variables_operations.js"; +export { ActionWrapper } from "./action_wrapper.js"; +export { VariableGroup } from "./variable_group.js"; +export { SuccessResponse } from "./success_response.js"; +export { ErrorDetails } from "./error_details.js"; +export * as ActionResponse from "./action_response.js"; +export { Variable } from "./variable.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variables/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variables/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/response_wrapper.js new file mode 100644 index 0000000..ee6d8ee --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + variables; + keyModified = new Map(); + /** + * The method to get the variables + * @returns {Array} An Array representing the variables + */ + getVariables() { + return this.variables; + + } + + /** + * The method to set the value to variables + * @param {Array} variables An Array representing the variables + */ + setVariables(variables) { + if((variables != null) && (!(Object.prototype.toString.call(variables) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: variables EXPECTED TYPE: Array", null, null); + } + this.variables = variables; + this.keyModified.set("variables", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variables/success_response.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/success_response.js new file mode 100644 index 0000000..e8b71a4 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/success_response.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class SuccessResponse{ + + code; + message; + status; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the message + * @returns {String} A String representing the message + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {String} message A String representing the message + */ + setMessage(message) { + if((message != null) && (!(Object.prototype.toString.call(message) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: String", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + SuccessResponse as MasterModel, + SuccessResponse as SuccessResponse +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variables/variable.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/variable.js new file mode 100644 index 0000000..9453f06 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/variable.js @@ -0,0 +1,249 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Variable{ + + apiName; + name; + description; + source; + id; + type; + variableGroup; + readOnly; + value; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the description + * @returns {String} A String representing the description + */ + getDescription() { + return this.description; + + } + + /** + * The method to set the value to description + * @param {String} description A String representing the description + */ + setDescription(description) { + if((description != null) && (!(Object.prototype.toString.call(description) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: description EXPECTED TYPE: String", null, null); + } + this.description = description; + this.keyModified.set("description", 1); + + } + + /** + * The method to get the source + * @returns {String} A String representing the source + */ + getSource() { + return this.source; + + } + + /** + * The method to set the value to source + * @param {String} source A String representing the source + */ + setSource(source) { + if((source != null) && (!(Object.prototype.toString.call(source) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: source EXPECTED TYPE: String", null, null); + } + this.source = source; + this.keyModified.set("source", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the type + * @returns {Choice} An instance of Choice + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {Choice} type An instance of Choice + */ + setType(type) { + if((type != null) && (!(type instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: Choice", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the variableGroup + * @returns {VariableGroup} An instance of VariableGroup + */ + getVariableGroup() { + return this.variableGroup; + + } + + /** + * The method to set the value to variableGroup + * @param {VariableGroup} variableGroup An instance of VariableGroup + */ + async setVariableGroup(variableGroup) { + const VariableGroup = (await (import("./variable_group.js"))).MasterModel; + if((variableGroup != null) && (!(variableGroup instanceof VariableGroup))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: variableGroup EXPECTED TYPE: VariableGroup", null, null); + } + this.variableGroup = variableGroup; + this.keyModified.set("variable_group", 1); + + } + + /** + * The method to get the readOnly + * @returns {Boolean} A Boolean representing the readOnly + */ + getReadOnly() { + return this.readOnly; + + } + + /** + * The method to set the value to readOnly + * @param {Boolean} readOnly A Boolean representing the readOnly + */ + setReadOnly(readOnly) { + if((readOnly != null) && (!(Object.prototype.toString.call(readOnly) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: readOnly EXPECTED TYPE: Boolean", null, null); + } + this.readOnly = readOnly; + this.keyModified.set("read_only", 1); + + } + + /** + * The method to get the value + * @returns {Object} An Object representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {Object} value An Object representing the value + */ + setValue(value) { + this.value = value; + this.keyModified.set("value", 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 { + Variable as MasterModel, + Variable as Variable +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variables/variable_group.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/variable_group.js new file mode 100644 index 0000000..2b21cac --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/variable_group.js @@ -0,0 +1,112 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class VariableGroup{ + + id; + apiName; + name; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + VariableGroup as MasterModel, + VariableGroup as VariableGroup +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/variables/variables_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/variables_operations.js new file mode 100644 index 0000000..b2a540c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/variables/variables_operations.js @@ -0,0 +1,275 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 VariablesOperations{ + /** + * The method to get variables + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getVariables(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/variables"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to createvariable + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async createvariable(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/variables"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_POST); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_CREATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update variables + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateVariables(request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/variables"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + handlerInstance.setMandatoryChecker(true); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete variables + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteVariables(paramInstance=null) { + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/variables"); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get variable by id + * @param {BigInt} id A BigInt representing the id + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getVariableById(id, paramInstance=null) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/variables/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + + /** + * The method to update variable by id + * @param {BigInt} id A BigInt representing the id + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateVariableById(id, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/variables/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_UPDATE); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to delete variable + * @param {BigInt} id A BigInt representing the id + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async deleteVariable(id) { + if((!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/variables/"); + apiPath = apiPath.concat(id.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_DELETE); + handlerInstance.setCategoryMethod(Constants.REQUEST_METHOD_DELETE); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to update variable by apiname + * @param {String} apiName A String representing the apiName + * @param {BodyWrapper} request An instance of BodyWrapper + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async updateVariableByApiname(apiName, request) { + const BodyWrapper = (await (import("./body_wrapper.js"))).MasterModel; + if((!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + if((request != null) && (!(request instanceof BodyWrapper))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: BodyWrapper", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/variables/"); + apiPath = apiPath.concat(apiName.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_PUT); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_ACTION); + handlerInstance.setContentType("application/json"); + handlerInstance.setRequest(request); + const require = createRequire(import.meta.url); + let ActionHandler = require.resolve("./action_handler.js"); + return handlerInstance.apiCall(ActionHandler, "application/json"); + + } + + /** + * The method to get variable by apiname + * @param {String} apiName A String representing the apiName + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getVariableByApiname(apiName, paramInstance=null) { + if((!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/variables/"); + apiPath = apiPath.concat(apiName.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + +} +class GetVariablesParam{ + + static GROUP = new Param("group", "com.zoho.crm.api.Variables.GetVariablesParam"); +} + +class DeleteVariablesParam{ + + static IDS = new Param("ids", "com.zoho.crm.api.Variables.DeleteVariablesParam"); +} + +class GetVariableByIDParam{ + + static GROUP = new Param("group", "com.zoho.crm.api.Variables.GetVariableByIDParam"); +} + +class GetVariableByAPINameParam{ + + static GROUP = new Param("group", "com.zoho.crm.api.Variables.GetVariableByAPINameParam"); +} + +export { + VariablesOperations as MasterModel, + VariablesOperations as VariablesOperations, + GetVariableByIDParam as GetVariableByIDParam, + GetVariableByAPINameParam as GetVariableByAPINameParam, + DeleteVariablesParam as DeleteVariablesParam, + GetVariablesParam as GetVariablesParam +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/actions.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/actions.js new file mode 100644 index 0000000..fa71dba --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/actions.js @@ -0,0 +1,180 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Actions{ + + id; + type; + segment; + fields; + value; + exemptedProfiles; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the segment + * @returns {Segment} An instance of Segment + */ + getSegment() { + return this.segment; + + } + + /** + * The method to set the value to segment + * @param {Segment} segment An instance of Segment + */ + async setSegment(segment) { + const Segment = (await (import("./segment.js"))).MasterModel; + if((segment != null) && (!(segment instanceof Segment))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: segment EXPECTED TYPE: Segment", null, null); + } + this.segment = segment; + this.keyModified.set("segment", 1); + + } + + /** + * The method to get the fields + * @returns {Fields} An instance of Fields + */ + getFields() { + return this.fields; + + } + + /** + * The method to set the value to fields + * @param {Fields} fields An instance of Fields + */ + async setFields(fields) { + const Fields = (await (import("../fields/fields.js"))).MasterModel; + if((fields != null) && (!(fields instanceof Fields))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: Fields", null, null); + } + this.fields = fields; + this.keyModified.set("fields", 1); + + } + + /** + * The method to get the value + * @returns {Object} An Object representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {Object} value An Object representing the value + */ + setValue(value) { + this.value = value; + this.keyModified.set("value", 1); + + } + + /** + * The method to get the exemptedProfiles + * @returns {Array} An Array representing the exemptedProfiles + */ + getExemptedProfiles() { + return this.exemptedProfiles; + + } + + /** + * The method to set the value to exemptedProfiles + * @param {Array} exemptedProfiles An Array representing the exemptedProfiles + */ + setExemptedProfiles(exemptedProfiles) { + if((exemptedProfiles != null) && (!(Object.prototype.toString.call(exemptedProfiles) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: exemptedProfiles EXPECTED TYPE: Array", null, null); + } + this.exemptedProfiles = exemptedProfiles; + this.keyModified.set("exempted_profiles", 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 { + Actions as MasterModel, + Actions as Actions +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/api_exception.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/api_exception.js new file mode 100644 index 0000000..e87a292 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/api_exception.js @@ -0,0 +1,136 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class APIException{ + + code; + status; + message; + details; + keyModified = new Map(); + /** + * The method to get the code + * @returns {Choice} An instance of Choice + */ + getCode() { + return this.code; + + } + + /** + * The method to set the value to code + * @param {Choice} code An instance of Choice + */ + setCode(code) { + if((code != null) && (!(code instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: code EXPECTED TYPE: Choice", null, null); + } + this.code = code; + this.keyModified.set("code", 1); + + } + + /** + * The method to get the status + * @returns {Choice} An instance of Choice + */ + getStatus() { + return this.status; + + } + + /** + * The method to set the value to status + * @param {Choice} status An instance of Choice + */ + setStatus(status) { + if((status != null) && (!(status instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: status EXPECTED TYPE: Choice", null, null); + } + this.status = status; + this.keyModified.set("status", 1); + + } + + /** + * The method to get the message + * @returns {Choice} An instance of Choice + */ + getMessage() { + return this.message; + + } + + /** + * The method to set the value to message + * @param {Choice} message An instance of Choice + */ + setMessage(message) { + if((message != null) && (!(message instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: message EXPECTED TYPE: Choice", null, null); + } + this.message = message; + this.keyModified.set("message", 1); + + } + + /** + * The method to get the details + * @returns {Map} A Map representing the details + */ + getDetails() { + return this.details; + + } + + /** + * The method to set the value to details + * @param {Map} details A Map representing the details + */ + setDetails(details) { + if((details != null) && (!(Object.prototype.toString.call(details) == "[object Map]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: details EXPECTED TYPE: Map", null, null); + } + this.details = details; + this.keyModified.set("details", 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 { + APIException as MasterModel, + APIException as APIException +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/button.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/button.js new file mode 100644 index 0000000..2baf461 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/button.js @@ -0,0 +1,342 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Button{ + + id; + sequenceNumber; + displayLabel; + criteria; + targetScreen; + type; + color; + shape; + backgroundColor; + visibility; + resource; + transition; + category; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the sequenceNumber + * @returns {number} A number representing the sequenceNumber + */ + getSequenceNumber() { + return this.sequenceNumber; + + } + + /** + * The method to set the value to sequenceNumber + * @param {number} sequenceNumber A number representing the sequenceNumber + */ + setSequenceNumber(sequenceNumber) { + if((sequenceNumber != null) && (!(Object.prototype.toString.call(sequenceNumber) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sequenceNumber EXPECTED TYPE: number", null, null); + } + this.sequenceNumber = sequenceNumber; + this.keyModified.set("sequence_number", 1); + + } + + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the criteria + * @returns {Criteria} An instance of Criteria + */ + getCriteria() { + return this.criteria; + + } + + /** + * The method to set the value to criteria + * @param {Criteria} criteria An instance of Criteria + */ + async setCriteria(criteria) { + const Criteria = (await (import("./criteria.js"))).MasterModel; + if((criteria != null) && (!(criteria instanceof Criteria))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: criteria EXPECTED TYPE: Criteria", null, null); + } + this.criteria = criteria; + this.keyModified.set("criteria", 1); + + } + + /** + * The method to get the targetScreen + * @returns {Screen} An instance of Screen + */ + getTargetScreen() { + return this.targetScreen; + + } + + /** + * The method to set the value to targetScreen + * @param {Screen} targetScreen An instance of Screen + */ + async setTargetScreen(targetScreen) { + const Screen = (await (import("./screen.js"))).MasterModel; + if((targetScreen != null) && (!(targetScreen instanceof Screen))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: targetScreen EXPECTED TYPE: Screen", null, null); + } + this.targetScreen = targetScreen; + this.keyModified.set("target_screen", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the color + * @returns {String} A String representing the color + */ + getColor() { + return this.color; + + } + + /** + * The method to set the value to color + * @param {String} color A String representing the color + */ + setColor(color) { + if((color != null) && (!(Object.prototype.toString.call(color) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: color EXPECTED TYPE: String", null, null); + } + this.color = color; + this.keyModified.set("color", 1); + + } + + /** + * The method to get the shape + * @returns {String} A String representing the shape + */ + getShape() { + return this.shape; + + } + + /** + * The method to set the value to shape + * @param {String} shape A String representing the shape + */ + setShape(shape) { + if((shape != null) && (!(Object.prototype.toString.call(shape) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: shape EXPECTED TYPE: String", null, null); + } + this.shape = shape; + this.keyModified.set("shape", 1); + + } + + /** + * The method to get the backgroundColor + * @returns {String} A String representing the backgroundColor + */ + getBackgroundColor() { + return this.backgroundColor; + + } + + /** + * The method to set the value to backgroundColor + * @param {String} backgroundColor A String representing the backgroundColor + */ + setBackgroundColor(backgroundColor) { + if((backgroundColor != null) && (!(Object.prototype.toString.call(backgroundColor) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: backgroundColor EXPECTED TYPE: String", null, null); + } + this.backgroundColor = backgroundColor; + this.keyModified.set("background_color", 1); + + } + + /** + * The method to get the visibility + * @returns {String} A String representing the visibility + */ + getVisibility() { + return this.visibility; + + } + + /** + * The method to set the value to visibility + * @param {String} visibility A String representing the visibility + */ + setVisibility(visibility) { + if((visibility != null) && (!(Object.prototype.toString.call(visibility) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: visibility EXPECTED TYPE: String", null, null); + } + this.visibility = visibility; + this.keyModified.set("visibility", 1); + + } + + /** + * The method to get the resource + * @returns {Object} An Object representing the resource + */ + getResource() { + return this.resource; + + } + + /** + * The method to set the value to resource + * @param {Object} resource An Object representing the resource + */ + setResource(resource) { + this.resource = resource; + this.keyModified.set("resource", 1); + + } + + /** + * The method to get the transition + * @returns {Transition} An instance of Transition + */ + getTransition() { + return this.transition; + + } + + /** + * The method to set the value to transition + * @param {Transition} transition An instance of Transition + */ + async setTransition(transition) { + const Transition = (await (import("./transition.js"))).MasterModel; + if((transition != null) && (!(transition instanceof Transition))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: transition EXPECTED TYPE: Transition", null, null); + } + this.transition = transition; + this.keyModified.set("transition", 1); + + } + + /** + * The method to get the category + * @returns {String} A String representing the category + */ + getCategory() { + return this.category; + + } + + /** + * The method to set the value to category + * @param {String} category A String representing the category + */ + setCategory(category) { + if((category != null) && (!(Object.prototype.toString.call(category) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: category EXPECTED TYPE: String", null, null); + } + this.category = category; + this.keyModified.set("category", 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 { + Button as MasterModel, + Button as Button +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/button_background.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/button_background.js new file mode 100644 index 0000000..8156a21 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/button_background.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ButtonBackground{ + + buttonBackground; + keyModified = new Map(); + /** + * The method to get the buttonBackground + * @returns {Array} An Array representing the buttonBackground + */ + getButtonBackground() { + return this.buttonBackground; + + } + + /** + * The method to set the value to buttonBackground + * @param {Array} buttonBackground An Array representing the buttonBackground + */ + setButtonBackground(buttonBackground) { + if((buttonBackground != null) && (!(Object.prototype.toString.call(buttonBackground) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: buttonBackground EXPECTED TYPE: Array", null, null); + } + this.buttonBackground = buttonBackground; + this.keyModified.set("button_background", 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 { + ButtonBackground as MasterModel, + ButtonBackground as ButtonBackground +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/chart_data.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/chart_data.js new file mode 100644 index 0000000..f9417fb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/chart_data.js @@ -0,0 +1,159 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ChartData{ + + nodes; + connections; + colorPalette; + canvasWidth; + canvasHeight; + keyModified = new Map(); + /** + * The method to get the nodes + * @returns {Array} An Array representing the nodes + */ + getNodes() { + return this.nodes; + + } + + /** + * The method to set the value to nodes + * @param {Array} nodes An Array representing the nodes + */ + setNodes(nodes) { + if((nodes != null) && (!(Object.prototype.toString.call(nodes) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: nodes EXPECTED TYPE: Array", null, null); + } + this.nodes = nodes; + this.keyModified.set("nodes", 1); + + } + + /** + * The method to get the connections + * @returns {Array} An Array representing the connections + */ + getConnections() { + return this.connections; + + } + + /** + * The method to set the value to connections + * @param {Array} connections An Array representing the connections + */ + setConnections(connections) { + if((connections != null) && (!(Object.prototype.toString.call(connections) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: connections EXPECTED TYPE: Array", null, null); + } + this.connections = connections; + this.keyModified.set("connections", 1); + + } + + /** + * The method to get the colorPalette + * @returns {ButtonBackground} An instance of ButtonBackground + */ + getColorPalette() { + return this.colorPalette; + + } + + /** + * The method to set the value to colorPalette + * @param {ButtonBackground} colorPalette An instance of ButtonBackground + */ + async setColorPalette(colorPalette) { + const ButtonBackground = (await (import("./button_background.js"))).MasterModel; + if((colorPalette != null) && (!(colorPalette instanceof ButtonBackground))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: colorPalette EXPECTED TYPE: ButtonBackground", null, null); + } + this.colorPalette = colorPalette; + this.keyModified.set("color_palette", 1); + + } + + /** + * The method to get the canvasWidth + * @returns {number} A number representing the canvasWidth + */ + getCanvasWidth() { + return this.canvasWidth; + + } + + /** + * The method to set the value to canvasWidth + * @param {number} canvasWidth A number representing the canvasWidth + */ + setCanvasWidth(canvasWidth) { + if((canvasWidth != null) && (!(Object.prototype.toString.call(canvasWidth) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: canvasWidth EXPECTED TYPE: number", null, null); + } + this.canvasWidth = canvasWidth; + this.keyModified.set("canvas_width", 1); + + } + + /** + * The method to get the canvasHeight + * @returns {number} A number representing the canvasHeight + */ + getCanvasHeight() { + return this.canvasHeight; + + } + + /** + * The method to set the value to canvasHeight + * @param {number} canvasHeight A number representing the canvasHeight + */ + setCanvasHeight(canvasHeight) { + if((canvasHeight != null) && (!(Object.prototype.toString.call(canvasHeight) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: canvasHeight EXPECTED TYPE: number", null, null); + } + this.canvasHeight = canvasHeight; + this.keyModified.set("canvas_height", 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 { + ChartData as MasterModel, + ChartData as ChartData +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/conditional_rules.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/conditional_rules.js new file mode 100644 index 0000000..dc2b764 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/conditional_rules.js @@ -0,0 +1,137 @@ +import {Choice} from "../../../../../../utils/util/choice.js"; +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ConditionalRules{ + + queryId; + executeOn; + criteria; + actions; + keyModified = new Map(); + /** + * The method to get the queryId + * @returns {BigInt} A BigInt representing the queryId + */ + getQueryId() { + return this.queryId; + + } + + /** + * The method to set the value to queryId + * @param {BigInt} queryId A BigInt representing the queryId + */ + setQueryId(queryId) { + if((queryId != null) && (!(Object.prototype.toString.call(queryId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: queryId EXPECTED TYPE: BigInt", null, null); + } + this.queryId = queryId; + this.keyModified.set("query_id", 1); + + } + + /** + * The method to get the executeOn + * @returns {Choice} An instance of Choice + */ + getExecuteOn() { + return this.executeOn; + + } + + /** + * The method to set the value to executeOn + * @param {Choice} executeOn An instance of Choice + */ + setExecuteOn(executeOn) { + if((executeOn != null) && (!(executeOn instanceof Choice))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: executeOn EXPECTED TYPE: Choice", null, null); + } + this.executeOn = executeOn; + this.keyModified.set("execute_on", 1); + + } + + /** + * The method to get the criteria + * @returns {Criteria} An instance of Criteria + */ + getCriteria() { + return this.criteria; + + } + + /** + * The method to set the value to criteria + * @param {Criteria} criteria An instance of Criteria + */ + async setCriteria(criteria) { + const Criteria = (await (import("./criteria.js"))).MasterModel; + if((criteria != null) && (!(criteria instanceof Criteria))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: criteria EXPECTED TYPE: Criteria", null, null); + } + this.criteria = criteria; + this.keyModified.set("criteria", 1); + + } + + /** + * The method to get the actions + * @returns {Array} An Array representing the actions + */ + getActions() { + return this.actions; + + } + + /** + * The method to set the value to actions + * @param {Array} actions An Array representing the actions + */ + setActions(actions) { + if((actions != null) && (!(Object.prototype.toString.call(actions) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: actions EXPECTED TYPE: Array", null, null); + } + this.actions = actions; + this.keyModified.set("actions", 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 { + ConditionalRules as MasterModel, + ConditionalRules as ConditionalRules +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/connection.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/connection.js new file mode 100644 index 0000000..f4d9b2a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/connection.js @@ -0,0 +1,91 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Connection{ + + sourceButton; + targetScreen; + keyModified = new Map(); + /** + * The method to get the sourceButton + * @returns {Button} An instance of Button + */ + getSourceButton() { + return this.sourceButton; + + } + + /** + * The method to set the value to sourceButton + * @param {Button} sourceButton An instance of Button + */ + async setSourceButton(sourceButton) { + const Button = (await (import("./button.js"))).MasterModel; + if((sourceButton != null) && (!(sourceButton instanceof Button))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sourceButton EXPECTED TYPE: Button", null, null); + } + this.sourceButton = sourceButton; + this.keyModified.set("source_button", 1); + + } + + /** + * The method to get the targetScreen + * @returns {Screen} An instance of Screen + */ + getTargetScreen() { + return this.targetScreen; + + } + + /** + * The method to set the value to targetScreen + * @param {Screen} targetScreen An instance of Screen + */ + async setTargetScreen(targetScreen) { + const Screen = (await (import("./screen.js"))).MasterModel; + if((targetScreen != null) && (!(targetScreen instanceof Screen))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: targetScreen EXPECTED TYPE: Screen", null, null); + } + this.targetScreen = targetScreen; + this.keyModified.set("target_screen", 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 { + Connection as MasterModel, + Connection as Connection +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/container.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/container.js new file mode 100644 index 0000000..66c21cb --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/container.js @@ -0,0 +1,137 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Container{ + + id; + layout; + chartData; + screens; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the layout + * @returns {Layouts} An instance of Layouts + */ + getLayout() { + return this.layout; + + } + + /** + * The method to set the value to layout + * @param {Layouts} layout An instance of Layouts + */ + async setLayout(layout) { + const Layouts = (await (import("../layouts/layouts.js"))).MasterModel; + if((layout != null) && (!(layout instanceof Layouts))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: layout EXPECTED TYPE: Layouts", null, null); + } + this.layout = layout; + this.keyModified.set("layout", 1); + + } + + /** + * The method to get the chartData + * @returns {ChartData} An instance of ChartData + */ + getChartData() { + return this.chartData; + + } + + /** + * The method to set the value to chartData + * @param {ChartData} chartData An instance of ChartData + */ + async setChartData(chartData) { + const ChartData = (await (import("./chart_data.js"))).MasterModel; + if((chartData != null) && (!(chartData instanceof ChartData))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: chartData EXPECTED TYPE: ChartData", null, null); + } + this.chartData = chartData; + this.keyModified.set("chart_data", 1); + + } + + /** + * The method to get the screens + * @returns {Array} An Array representing the screens + */ + getScreens() { + return this.screens; + + } + + /** + * The method to set the value to screens + * @param {Array} screens An Array representing the screens + */ + setScreens(screens) { + if((screens != null) && (!(Object.prototype.toString.call(screens) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: screens EXPECTED TYPE: Array", null, null); + } + this.screens = screens; + this.keyModified.set("screens", 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 { + Container as MasterModel, + Container as Container +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/criteria.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/criteria.js new file mode 100644 index 0000000..22816f1 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/criteria.js @@ -0,0 +1,156 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Criteria{ + + comparator; + field; + value; + groupOperator; + group; + keyModified = new Map(); + /** + * The method to get the comparator + * @returns {String} A String representing the comparator + */ + getComparator() { + return this.comparator; + + } + + /** + * The method to set the value to comparator + * @param {String} comparator A String representing the comparator + */ + setComparator(comparator) { + if((comparator != null) && (!(Object.prototype.toString.call(comparator) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: comparator EXPECTED TYPE: String", null, null); + } + this.comparator = comparator; + this.keyModified.set("comparator", 1); + + } + + /** + * The method to get the field + * @returns {Field} An instance of Field + */ + getField() { + return this.field; + + } + + /** + * The method to set the value to field + * @param {Field} field An instance of Field + */ + async setField(field) { + const Field = (await (import("./field.js"))).MasterModel; + if((field != null) && (!(field instanceof Field))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: field EXPECTED TYPE: Field", null, null); + } + this.field = field; + this.keyModified.set("field", 1); + + } + + /** + * The method to get the value + * @returns {Object} An Object representing the value + */ + getValue() { + return this.value; + + } + + /** + * The method to set the value to value + * @param {Object} value An Object representing the value + */ + setValue(value) { + this.value = value; + this.keyModified.set("value", 1); + + } + + /** + * The method to get the groupOperator + * @returns {String} A String representing the groupOperator + */ + getGroupOperator() { + return this.groupOperator; + + } + + /** + * The method to set the value to groupOperator + * @param {String} groupOperator A String representing the groupOperator + */ + setGroupOperator(groupOperator) { + if((groupOperator != null) && (!(Object.prototype.toString.call(groupOperator) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: groupOperator EXPECTED TYPE: String", null, null); + } + this.groupOperator = groupOperator; + this.keyModified.set("group_operator", 1); + + } + + /** + * The method to get the group + * @returns {Array} An Array representing the group + */ + getGroup() { + return this.group; + + } + + /** + * The method to set the value to group + * @param {Array} group An Array representing the group + */ + setGroup(group) { + if((group != null) && (!(Object.prototype.toString.call(group) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: group EXPECTED TYPE: Array", null, null); + } + this.group = group; + this.keyModified.set("group", 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 { + Criteria as MasterModel, + Criteria as Criteria +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/exempted_portal_user_type.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/exempted_portal_user_type.js new file mode 100644 index 0000000..8586ae0 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/exempted_portal_user_type.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ExemptedPortalUserType{ + + id; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + ExemptedPortalUserType as MasterModel, + ExemptedPortalUserType as ExemptedPortalUserType +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/field.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/field.js new file mode 100644 index 0000000..fb4ef4e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/field.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Field{ + + apiName; + id; + keyModified = new Map(); + /** + * The method to get the apiName + * @returns {String} A String representing the apiName + */ + getAPIName() { + return this.apiName; + + } + + /** + * The method to set the value to apiName + * @param {String} apiName A String representing the apiName + */ + setAPIName(apiName) { + if((apiName != null) && (!(Object.prototype.toString.call(apiName) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: apiName EXPECTED TYPE: String", null, null); + } + this.apiName = apiName; + this.keyModified.set("api_name", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Field as MasterModel, + Field as Field +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/import_wizards.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/import_wizards.js new file mode 100644 index 0000000..7c8d34e --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/import_wizards.js @@ -0,0 +1,22 @@ +export { Segment } from "./segment.js"; +export { ButtonBackground } from "./button_background.js"; +export * as ResponseHandler from "./response_handler.js"; +export { APIException } from "./api_exception.js"; +export { Node } from "./node.js"; +export { Container } from "./container.js"; +export { Wizard } from "./wizard.js"; +export { Actions } from "./actions.js"; +export { ConditionalRules } from "./conditional_rules.js"; +export { Resource } from "./resource.js"; +export { ResponseWrapper } from "./response_wrapper.js"; +export { WizardsOperations } from "./wizards_operations.js"; +export { GetWizardbyIDParam } from "./wizards_operations.js"; +export { Button } from "./button.js"; +export { ExemptedPortalUserType } from "./exempted_portal_user_type.js"; +export { Connection } from "./connection.js"; +export { ChartData } from "./chart_data.js"; +export { PortalUserType } from "./portal_user_type.js"; +export { Criteria } from "./criteria.js"; +export { Transition } from "./transition.js"; +export { Screen } from "./screen.js"; +export { Field } from "./field.js"; diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/node.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/node.js new file mode 100644 index 0000000..183a495 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/node.js @@ -0,0 +1,136 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Node{ + + posY; + posX; + startNode; + screen; + keyModified = new Map(); + /** + * The method to get the posY + * @returns {number} A number representing the posY + */ + getPosY() { + return this.posY; + + } + + /** + * The method to set the value to posY + * @param {number} posY A number representing the posY + */ + setPosY(posY) { + if((posY != null) && (!(Object.prototype.toString.call(posY) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: posY EXPECTED TYPE: number", null, null); + } + this.posY = posY; + this.keyModified.set("pos_y", 1); + + } + + /** + * The method to get the posX + * @returns {number} A number representing the posX + */ + getPosX() { + return this.posX; + + } + + /** + * The method to set the value to posX + * @param {number} posX A number representing the posX + */ + setPosX(posX) { + if((posX != null) && (!(Object.prototype.toString.call(posX) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: posX EXPECTED TYPE: number", null, null); + } + this.posX = posX; + this.keyModified.set("pos_x", 1); + + } + + /** + * The method to get the startNode + * @returns {Boolean} A Boolean representing the startNode + */ + getStartNode() { + return this.startNode; + + } + + /** + * The method to set the value to startNode + * @param {Boolean} startNode A Boolean representing the startNode + */ + setStartNode(startNode) { + if((startNode != null) && (!(Object.prototype.toString.call(startNode) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: startNode EXPECTED TYPE: Boolean", null, null); + } + this.startNode = startNode; + this.keyModified.set("start_node", 1); + + } + + /** + * The method to get the screen + * @returns {Screen} An instance of Screen + */ + getScreen() { + return this.screen; + + } + + /** + * The method to set the value to screen + * @param {Screen} screen An instance of Screen + */ + async setScreen(screen) { + const Screen = (await (import("./screen.js"))).MasterModel; + if((screen != null) && (!(screen instanceof Screen))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: screen EXPECTED TYPE: Screen", null, null); + } + this.screen = screen; + this.keyModified.set("screen", 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 { + Node as MasterModel, + Node as Node +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/portal_user_type.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/portal_user_type.js new file mode 100644 index 0000000..630dcdd --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/portal_user_type.js @@ -0,0 +1,137 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class PortalUserType{ + + id; + layout; + chartData; + screens; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the layout + * @returns {Layouts} An instance of Layouts + */ + getLayout() { + return this.layout; + + } + + /** + * The method to set the value to layout + * @param {Layouts} layout An instance of Layouts + */ + async setLayout(layout) { + const Layouts = (await (import("../layouts/layouts.js"))).MasterModel; + if((layout != null) && (!(layout instanceof Layouts))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: layout EXPECTED TYPE: Layouts", null, null); + } + this.layout = layout; + this.keyModified.set("layout", 1); + + } + + /** + * The method to get the chartData + * @returns {ChartData} An instance of ChartData + */ + getChartData() { + return this.chartData; + + } + + /** + * The method to set the value to chartData + * @param {ChartData} chartData An instance of ChartData + */ + async setChartData(chartData) { + const ChartData = (await (import("./chart_data.js"))).MasterModel; + if((chartData != null) && (!(chartData instanceof ChartData))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: chartData EXPECTED TYPE: ChartData", null, null); + } + this.chartData = chartData; + this.keyModified.set("chart_data", 1); + + } + + /** + * The method to get the screens + * @returns {Array} An Array representing the screens + */ + getScreens() { + return this.screens; + + } + + /** + * The method to set the value to screens + * @param {Array} screens An Array representing the screens + */ + setScreens(screens) { + if((screens != null) && (!(Object.prototype.toString.call(screens) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: screens EXPECTED TYPE: Array", null, null); + } + this.screens = screens; + this.keyModified.set("screens", 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 { + PortalUserType as MasterModel, + PortalUserType as PortalUserType +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/resource.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/resource.js new file mode 100644 index 0000000..095affa --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/resource.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Resource{ + + id; + name; + keyModified = new Map(); + /** + * The method to get the id + * @returns {String} A String representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {String} id A String representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: String", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + Resource as MasterModel, + Resource as Resource +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/response_handler.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/response_handler.js new file mode 100644 index 0000000..0407d8a --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/response_handler.js @@ -0,0 +1,7 @@ +class ResponseHandler{ + +} +export { + ResponseHandler as MasterModel, + ResponseHandler as ResponseHandler +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/response_wrapper.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/response_wrapper.js new file mode 100644 index 0000000..d591a9c --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/response_wrapper.js @@ -0,0 +1,66 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class ResponseWrapper{ + + wizards; + keyModified = new Map(); + /** + * The method to get the wizards + * @returns {Array} An Array representing the wizards + */ + getWizards() { + return this.wizards; + + } + + /** + * The method to set the value to wizards + * @param {Array} wizards An Array representing the wizards + */ + setWizards(wizards) { + if((wizards != null) && (!(Object.prototype.toString.call(wizards) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: wizards EXPECTED TYPE: Array", null, null); + } + this.wizards = wizards; + this.keyModified.set("wizards", 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 { + ResponseWrapper as MasterModel, + ResponseWrapper as ResponseWrapper +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/screen.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/screen.js new file mode 100644 index 0000000..b8bc67d --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/screen.js @@ -0,0 +1,135 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Screen{ + + id; + displayLabel; + conditionalRules; + segments; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the conditionalRules + * @returns {Array} An Array representing the conditionalRules + */ + getConditionalRules() { + return this.conditionalRules; + + } + + /** + * The method to set the value to conditionalRules + * @param {Array} conditionalRules An Array representing the conditionalRules + */ + setConditionalRules(conditionalRules) { + if((conditionalRules != null) && (!(Object.prototype.toString.call(conditionalRules) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: conditionalRules EXPECTED TYPE: Array", null, null); + } + this.conditionalRules = conditionalRules; + this.keyModified.set("conditional_rules", 1); + + } + + /** + * The method to get the segments + * @returns {Array} An Array representing the segments + */ + getSegments() { + return this.segments; + + } + + /** + * The method to set the value to segments + * @param {Array} segments An Array representing the segments + */ + setSegments(segments) { + if((segments != null) && (!(Object.prototype.toString.call(segments) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: segments EXPECTED TYPE: Array", null, null); + } + this.segments = segments; + this.keyModified.set("segments", 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 { + Screen as MasterModel, + Screen as Screen +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/segment.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/segment.js new file mode 100644 index 0000000..a7ccad2 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/segment.js @@ -0,0 +1,228 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Segment{ + + id; + sequenceNumber; + displayLabel; + type; + columnCount; + fields; + buttons; + resource; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the sequenceNumber + * @returns {number} A number representing the sequenceNumber + */ + getSequenceNumber() { + return this.sequenceNumber; + + } + + /** + * The method to set the value to sequenceNumber + * @param {number} sequenceNumber A number representing the sequenceNumber + */ + setSequenceNumber(sequenceNumber) { + if((sequenceNumber != null) && (!(Object.prototype.toString.call(sequenceNumber) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: sequenceNumber EXPECTED TYPE: number", null, null); + } + this.sequenceNumber = sequenceNumber; + this.keyModified.set("sequence_number", 1); + + } + + /** + * The method to get the displayLabel + * @returns {String} A String representing the displayLabel + */ + getDisplayLabel() { + return this.displayLabel; + + } + + /** + * The method to set the value to displayLabel + * @param {String} displayLabel A String representing the displayLabel + */ + setDisplayLabel(displayLabel) { + if((displayLabel != null) && (!(Object.prototype.toString.call(displayLabel) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: displayLabel EXPECTED TYPE: String", null, null); + } + this.displayLabel = displayLabel; + this.keyModified.set("display_label", 1); + + } + + /** + * The method to get the type + * @returns {String} A String representing the type + */ + getType() { + return this.type; + + } + + /** + * The method to set the value to type + * @param {String} type A String representing the type + */ + setType(type) { + if((type != null) && (!(Object.prototype.toString.call(type) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: type EXPECTED TYPE: String", null, null); + } + this.type = type; + this.keyModified.set("type", 1); + + } + + /** + * The method to get the columnCount + * @returns {number} A number representing the columnCount + */ + getColumnCount() { + return this.columnCount; + + } + + /** + * The method to set the value to columnCount + * @param {number} columnCount A number representing the columnCount + */ + setColumnCount(columnCount) { + if((columnCount != null) && (!(Object.prototype.toString.call(columnCount) == "[object Number]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: columnCount EXPECTED TYPE: number", null, null); + } + this.columnCount = columnCount; + this.keyModified.set("column_count", 1); + + } + + /** + * The method to get the fields + * @returns {Array} An Array representing the fields + */ + getFields() { + return this.fields; + + } + + /** + * The method to set the value to fields + * @param {Array} fields An Array representing the fields + */ + setFields(fields) { + if((fields != null) && (!(Object.prototype.toString.call(fields) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: fields EXPECTED TYPE: Array", null, null); + } + this.fields = fields; + this.keyModified.set("fields", 1); + + } + + /** + * The method to get the buttons + * @returns {Array} An Array representing the buttons + */ + getButtons() { + return this.buttons; + + } + + /** + * The method to set the value to buttons + * @param {Array} buttons An Array representing the buttons + */ + setButtons(buttons) { + if((buttons != null) && (!(Object.prototype.toString.call(buttons) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: buttons EXPECTED TYPE: Array", null, null); + } + this.buttons = buttons; + this.keyModified.set("buttons", 1); + + } + + /** + * The method to get the resource + * @returns {Resource} An instance of Resource + */ + getResource() { + return this.resource; + + } + + /** + * The method to set the value to resource + * @param {Resource} resource An instance of Resource + */ + async setResource(resource) { + const Resource = (await (import("./resource.js"))).MasterModel; + if((resource != null) && (!(resource instanceof Resource))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: resource EXPECTED TYPE: Resource", null, null); + } + this.resource = resource; + this.keyModified.set("resource", 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 { + Segment as MasterModel, + Segment as Segment +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/transition.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/transition.js new file mode 100644 index 0000000..917bb56 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/transition.js @@ -0,0 +1,89 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Transition{ + + id; + name; + keyModified = new Map(); + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 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 { + Transition as MasterModel, + Transition as Transition +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/wizard.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/wizard.js new file mode 100644 index 0000000..9f84457 --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/wizard.js @@ -0,0 +1,368 @@ +import {SDKException} from "../exception/sdk_exception.js"; +import {Constants} from "../../../../../../utils/util/constants.js"; + +class Wizard{ + + createdTime; + modifiedTime; + portalUserTypes; + exemptedPortalUserTypes; + module; + name; + modifiedBy; + profiles; + active; + containers; + createdBy; + parentWizard; + draft; + id; + keyModified = new Map(); + /** + * The method to get the createdTime + * @returns {Date} An instance of Date + */ + getCreatedTime() { + return this.createdTime; + + } + + /** + * The method to set the value to createdTime + * @param {Date} createdTime An instance of Date + */ + setCreatedTime(createdTime) { + if((createdTime != null) && (!(createdTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdTime EXPECTED TYPE: Date", null, null); + } + this.createdTime = createdTime; + this.keyModified.set("created_time", 1); + + } + + /** + * The method to get the modifiedTime + * @returns {Date} An instance of Date + */ + getModifiedTime() { + return this.modifiedTime; + + } + + /** + * The method to set the value to modifiedTime + * @param {Date} modifiedTime An instance of Date + */ + setModifiedTime(modifiedTime) { + if((modifiedTime != null) && (!(modifiedTime instanceof Date))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedTime EXPECTED TYPE: Date", null, null); + } + this.modifiedTime = modifiedTime; + this.keyModified.set("modified_time", 1); + + } + + /** + * The method to get the portalUserTypes + * @returns {Array} An Array representing the portalUserTypes + */ + getPortalUserTypes() { + return this.portalUserTypes; + + } + + /** + * The method to set the value to portalUserTypes + * @param {Array} portalUserTypes An Array representing the portalUserTypes + */ + setPortalUserTypes(portalUserTypes) { + if((portalUserTypes != null) && (!(Object.prototype.toString.call(portalUserTypes) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: portalUserTypes EXPECTED TYPE: Array", null, null); + } + this.portalUserTypes = portalUserTypes; + this.keyModified.set("portal_user_types", 1); + + } + + /** + * The method to get the exemptedPortalUserTypes + * @returns {Array} An Array representing the exemptedPortalUserTypes + */ + getExemptedPortalUserTypes() { + return this.exemptedPortalUserTypes; + + } + + /** + * The method to set the value to exemptedPortalUserTypes + * @param {Array} exemptedPortalUserTypes An Array representing the exemptedPortalUserTypes + */ + setExemptedPortalUserTypes(exemptedPortalUserTypes) { + if((exemptedPortalUserTypes != null) && (!(Object.prototype.toString.call(exemptedPortalUserTypes) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: exemptedPortalUserTypes EXPECTED TYPE: Array", null, null); + } + this.exemptedPortalUserTypes = exemptedPortalUserTypes; + this.keyModified.set("exempted_portal_user_types", 1); + + } + + /** + * The method to get the module + * @returns {Modules} An instance of Modules + */ + getModule() { + return this.module; + + } + + /** + * The method to set the value to module + * @param {Modules} module An instance of Modules + */ + async setModule(module) { + const Modules = (await (import("../modules/modules.js"))).MasterModel; + if((module != null) && (!(module instanceof Modules))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: module EXPECTED TYPE: Modules", null, null); + } + this.module = module; + this.keyModified.set("module", 1); + + } + + /** + * The method to get the name + * @returns {String} A String representing the name + */ + getName() { + return this.name; + + } + + /** + * The method to set the value to name + * @param {String} name A String representing the name + */ + setName(name) { + if((name != null) && (!(Object.prototype.toString.call(name) == "[object String]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: name EXPECTED TYPE: String", null, null); + } + this.name = name; + this.keyModified.set("name", 1); + + } + + /** + * The method to get the modifiedBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getModifiedBy() { + return this.modifiedBy; + + } + + /** + * The method to set the value to modifiedBy + * @param {MinifiedUser} modifiedBy An instance of MinifiedUser + */ + async setModifiedBy(modifiedBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((modifiedBy != null) && (!(modifiedBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modifiedBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.modifiedBy = modifiedBy; + this.keyModified.set("modified_by", 1); + + } + + /** + * The method to get the profiles + * @returns {Array} An Array representing the profiles + */ + getProfiles() { + return this.profiles; + + } + + /** + * The method to set the value to profiles + * @param {Array} profiles An Array representing the profiles + */ + setProfiles(profiles) { + if((profiles != null) && (!(Object.prototype.toString.call(profiles) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: profiles EXPECTED TYPE: Array", null, null); + } + this.profiles = profiles; + this.keyModified.set("profiles", 1); + + } + + /** + * The method to get the active + * @returns {Boolean} A Boolean representing the active + */ + getActive() { + return this.active; + + } + + /** + * The method to set the value to active + * @param {Boolean} active A Boolean representing the active + */ + setActive(active) { + if((active != null) && (!(Object.prototype.toString.call(active) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: active EXPECTED TYPE: Boolean", null, null); + } + this.active = active; + this.keyModified.set("active", 1); + + } + + /** + * The method to get the containers + * @returns {Array} An Array representing the containers + */ + getContainers() { + return this.containers; + + } + + /** + * The method to set the value to containers + * @param {Array} containers An Array representing the containers + */ + setContainers(containers) { + if((containers != null) && (!(Object.prototype.toString.call(containers) == "[object Array]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: containers EXPECTED TYPE: Array", null, null); + } + this.containers = containers; + this.keyModified.set("containers", 1); + + } + + /** + * The method to get the createdBy + * @returns {MinifiedUser} An instance of MinifiedUser + */ + getCreatedBy() { + return this.createdBy; + + } + + /** + * The method to set the value to createdBy + * @param {MinifiedUser} createdBy An instance of MinifiedUser + */ + async setCreatedBy(createdBy) { + const MinifiedUser = (await (import("../users/minified_user.js"))).MasterModel; + if((createdBy != null) && (!(createdBy instanceof MinifiedUser))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: createdBy EXPECTED TYPE: MinifiedUser", null, null); + } + this.createdBy = createdBy; + this.keyModified.set("created_by", 1); + + } + + /** + * The method to get the parentWizard + * @returns {Wizard} An instance of Wizard + */ + getParentWizard() { + return this.parentWizard; + + } + + /** + * The method to set the value to parentWizard + * @param {Wizard} parentWizard An instance of Wizard + */ + setParentWizard(parentWizard) { + if((parentWizard != null) && (!(parentWizard instanceof Wizard))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: parentWizard EXPECTED TYPE: Wizard", null, null); + } + this.parentWizard = parentWizard; + this.keyModified.set("parent_wizard", 1); + + } + + /** + * The method to get the draft + * @returns {Boolean} A Boolean representing the draft + */ + getDraft() { + return this.draft; + + } + + /** + * The method to set the value to draft + * @param {Boolean} draft A Boolean representing the draft + */ + setDraft(draft) { + if((draft != null) && (!(Object.prototype.toString.call(draft) == "[object Boolean]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: draft EXPECTED TYPE: Boolean", null, null); + } + this.draft = draft; + this.keyModified.set("draft", 1); + + } + + /** + * The method to get the id + * @returns {BigInt} A BigInt representing the id + */ + getId() { + return this.id; + + } + + /** + * The method to set the value to id + * @param {BigInt} id A BigInt representing the id + */ + setId(id) { + if((id != null) && (!(Object.prototype.toString.call(id) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: id EXPECTED TYPE: BigInt", null, null); + } + this.id = id; + this.keyModified.set("id", 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 { + Wizard as MasterModel, + Wizard as Wizard +} diff --git a/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/wizards_operations.js b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/wizards_operations.js new file mode 100644 index 0000000..205b3ff --- /dev/null +++ b/versions/3.0.0/lib/core/com/zoho/crm/api/wizards/wizards_operations.js @@ -0,0 +1,66 @@ +import {Param} from "../../../../../../routes/param.js"; +import {ParameterMap} from "../../../../../../routes/parameter_map.js"; +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 WizardsOperations{ + /** + * The method to get wizards + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getWizards() { + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/wizards"); + 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"); + + } + + /** + * The method to get wizard by id + * @param {BigInt} wizardId A BigInt representing the wizardId + * @param {ParameterMap} paramInstance An instance of ParameterMap + * @returns {APIResponse} An instance of APIResponse + * @throws {SDKException} + */ + async getWizardById(wizardId, paramInstance=null) { + if((!(Object.prototype.toString.call(wizardId) == "[object BigInt]"))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: wizardId EXPECTED TYPE: BigInt", null, null); + } + if((paramInstance != null) && (!(paramInstance instanceof ParameterMap))) { + throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: paramInstance EXPECTED TYPE: ParameterMap", null, null); + } + var handlerInstance = new CommonAPIHandler(); + var apiPath = ''; + apiPath = apiPath.concat("/crm/v5/settings/wizards/"); + apiPath = apiPath.concat(wizardId.toString()); + handlerInstance.setAPIPath(apiPath); + handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET); + handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ); + handlerInstance.setParam(paramInstance); + const require = createRequire(import.meta.url); + let ResponseHandler = require.resolve("./response_handler.js"); + return handlerInstance.apiCall(ResponseHandler, "application/json"); + + } + +} +class GetWizardbyIDParam{ + + static LAYOUT_ID = new Param("layout_id", "com.zoho.crm.api.Wizards.GetWizardbyIDParam"); +} + +export { + GetWizardbyIDParam as GetWizardbyIDParam, + WizardsOperations as MasterModel, + WizardsOperations as WizardsOperations +} diff --git a/versions/3.0.0/lib/index.js b/versions/3.0.0/lib/index.js new file mode 100644 index 0000000..4211a20 --- /dev/null +++ b/versions/3.0.0/lib/index.js @@ -0,0 +1 @@ +export * from "./zohocrmsdk.js"; diff --git a/versions/3.0.0/lib/models/authenticator/oauth_builder.js b/versions/3.0.0/lib/models/authenticator/oauth_builder.js new file mode 100644 index 0000000..c84b45b --- /dev/null +++ b/versions/3.0.0/lib/models/authenticator/oauth_builder.js @@ -0,0 +1,174 @@ +import {Utility} from "../../utils/util/utility.js"; +import {Constants} from "../../utils/util/constants.js"; +import {SDKException} from "../../core/com/zoho/crm/api/exception/sdk_exception.js"; +import {OAuthToken} from "./oauth_token.js"; + +class OAuthBuilder { + _clientID; + _clientSecret; + _redirectURL; + _refreshToken; + _grantToken; + _accessToken; + _id; + _usersignature = null; + + id(id) + { + this._id = id; + + return this; + } + + clientId(clientID) { + Utility.assertNotNull(clientID, Constants.TOKEN_ERROR, Constants.CLIENT_ID_NULL_ERROR_MESSAGE); + + if (typeof clientID !== Constants.STRING_NAMESPACE.toLowerCase()) { + let error = {}; + + error[Constants.ERROR_HASH_FIELD] = Constants.CLIENT_ID_FIELD; + + error[Constants.ERROR_HASH_EXPECTED_TYPE] = Constants.STRING_NAMESPACE; + + error[Constants.ERROR_HASH_CLASS] = OAuthToken.name; + + throw new SDKException(Constants.TOKEN_ERROR, null, error, null); + } + + this._clientID = clientID; + + return this; + } + + clientSecret(clientSecret) { + Utility.assertNotNull(clientSecret, Constants.TOKEN_ERROR, Constants.CLIENT_SECRET_NULL_ERROR_MESSAGE); + + if (typeof clientSecret !== Constants.STRING_NAMESPACE.toLowerCase()) { + let error = {}; + + error[Constants.ERROR_HASH_FIELD] = Constants.CLIENT_SECRET_FIELD; + + error[Constants.ERROR_HASH_EXPECTED_TYPE] = Constants.STRING_NAMESPACE; + + error[Constants.ERROR_HASH_CLASS] = OAuthToken.name; + + throw new SDKException(Constants.TOKEN_ERROR, null, error, null); + } + + this._clientSecret = clientSecret; + + return this; + } + + redirectURL(redirectURL) { + if (redirectURL != null && typeof redirectURL !== Constants.STRING_NAMESPACE.toLowerCase()) { + let error = {}; + + error[Constants.ERROR_HASH_FIELD] = Constants.REDIRECT_URL_FIELD; + + error[Constants.ERROR_HASH_EXPECTED_TYPE] = Constants.STRING_NAMESPACE; + + error[Constants.ERROR_HASH_CLASS] = OAuthToken.name; + + throw new SDKException(Constants.TOKEN_ERROR, null, error, null); + } + + this._redirectURL = redirectURL; + + return this; + } + + refreshToken(refreshToken) { + if (typeof refreshToken !== Constants.STRING_NAMESPACE.toLowerCase()) { + let error = {}; + + error[Constants.ERROR_HASH_FIELD] = Constants.REFRESH_TOKEN; + + error[Constants.ERROR_HASH_EXPECTED_TYPE] = Constants.STRING_NAMESPACE; + + error[Constants.ERROR_HASH_CLASS] = OAuthToken.name; + + throw new SDKException(Constants.TOKEN_ERROR, null, error, null); + } + + this._refreshToken = refreshToken; + + return this; + } + + grantToken(grantToken) { + if (typeof grantToken !== Constants.STRING_NAMESPACE.toLowerCase()) { + let error = {}; + + error[Constants.ERROR_HASH_FIELD] = Constants.GRANT_TOKEN; + + error[Constants.ERROR_HASH_EXPECTED_TYPE] = Constants.STRING_NAMESPACE; + + error[Constants.ERROR_HASH_CLASS] = OAuthToken.name; + + throw new SDKException(Constants.TOKEN_ERROR, null, error, null); + } + + this._grantToken = grantToken; + + return this; + } + + accessToken(accessToken) { + if (accessToken != null && typeof accessToken !== Constants.STRING_NAMESPACE.toLowerCase()) { + let error = {}; + + error[Constants.ERROR_HASH_FIELD] = Constants.ACCESS_TOKEN; + + error[Constants.ERROR_HASH_EXPECTED_TYPE] = Constants.STRING_NAMESPACE; + + error[Constants.ERROR_HASH_CLASS] = OAuthToken.name; + + throw new SDKException(Constants.TOKEN_ERROR, null, error, null); + } + + this._accessToken = accessToken; + + return this; + } + + userSignature(userSignature) + { + if (userSignature != null && typeof userSignature.getName() !== Constants.STRING_NAMESPACE.toLowerCase()) + { + let error = {}; + + error[Constants.ERROR_HASH_FIELD] = Constants.USER_SIGNATURE; + + error[Constants.ERROR_HASH_EXPECTED_TYPE] = Constants.STRING_NAMESPACE; + + error[Constants.ERROR_HASH_CLASS] = OAuthToken.name; + + throw new SDKException(Constants.TOKEN_ERROR, null, error, null); + } + this._usersignature = userSignature; + + return this; + } + + build() { + if (this._grantToken == null && this._refreshToken == null && this._id == null && this._accessToken == null && this._usersignature == null) + { + throw new SDKException(Constants.MANDATORY_VALUE_ERROR, Constants.MANDATORY_KEY_ERROR + "-" + Constants.OAUTH_MANDATORY_KEYS.join(",")); + } + if (this._grantToken != null || this._refreshToken != null) { + if (this._clientID == null && this._clientSecret == null) { + throw new SDKException(Constants.MANDATORY_VALUE_ERROR, Constants.MANDATORY_KEY_ERROR + "-" + Constants.OAUTH_MANDATORY_KEYS1.join(",")) + } else { + Utility.assertNotNull(this._clientID, Constants.MANDATORY_VALUE_ERROR, Constants.MANDATORY_KEY_ERROR + "-" + Constants.CLIENT_ID); + + Utility.assertNotNull(this._clientSecret, Constants.MANDATORY_VALUE_ERROR, Constants.MANDATORY_KEY_ERROR + "-" + Constants.CLIENT_SECRET); + } + } + return new OAuthToken(this._clientID, this._clientSecret, this._grantToken, this._refreshToken, this._redirectURL, this._id, this._accessToken, this._usersignature); + } +} +export { + OAuthBuilder as OAuthBuilder, + OAuthBuilder as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/models/authenticator/oauth_token.js b/versions/3.0.0/lib/models/authenticator/oauth_token.js new file mode 100644 index 0000000..bb67336 --- /dev/null +++ b/versions/3.0.0/lib/models/authenticator/oauth_token.js @@ -0,0 +1,522 @@ +import { Initializer } from '../../routes/initializer.js'; +import { Token } from './token.js'; +import FormData from "form-data"; +import { Constants } from '../../utils/util/constants.js'; +import pkg from "winston"; +let Logger = pkg; +import { SDKException } from '../../core/com/zoho/crm/api/exception/sdk_exception.js'; +import got from 'got'; +import {DataCenter} from "../../routes/dc/data_center.js"; + + +/** + * This class maintains the tokens and authenticates every request. + */ +class OAuthToken extends Token { + clientID; + + clientSecret; + + redirectURL; + + grantToken; + + refreshToken; + + accessToken; + + expiresIn = null; + + userSignature; + + id; + + apiDomain; + + /** + * This is a setter method to set OAuth client id. + * @param {string} clientID - A String containing the client Id. + */ + setClientId(clientID) { + this.clientID = clientID; + } + + /** + * This is a getter method to get OAuth client id. + * @returns A String representing the OAuth client id. + */ + getClientId() { + return this.clientID; + } + + /** + * This is a setter method to set OAuth client secret. + * @param {string} clientSecret - A String containing the client Secret. + */ + setClientSecret(clientSecret) { + this.clientSecret = clientSecret; + } + + /** + * This is a getter method to get OAuth client secret. + * @returns A String representing the OAuth client secret. + */ + getClientSecret() { + return this.clientSecret; + } + + /** + * This is a getter method to get OAuth redirect URL. + * @returns A String representing the OAuth redirect URL. + */ + getRedirectURL() { + return this.redirectURL; + } + + /** + * This is a setter method to set OAuth redirect URL. + * @param {string} redirectURL - A String containing the redirectURL. + */ + setRedirectURL(redirectURL) { + this.redirectURL = redirectURL; + } + + /** + * This is a setter method to set grant token. + * @param {string} grantToken - A String containing the grantToken. + */ + setGrantToken(grantToken) { + this.grantToken = grantToken; + } + + /** + * This is a getter method to get grant token. + * @returns A String representing the grant token. + */ + getGrantToken() { + return this.grantToken; + } + + /** + * This is a getter method to get refresh token. + * @returns A String representing the refresh token. + */ + getRefreshToken() { + return this.refreshToken; + } + + /** + * This is a setter method to set refresh token. + * @param {string} refreshToken - A String containing the refresh token. + */ + setRefreshToken(refreshToken) { + this.refreshToken = refreshToken; + } + + /** + * This is a getter method to get access token. + * @returns A String representing the access token. + */ + getAccessToken() { + return this.accessToken; + } + + /** + * This is a setter method to set access token. + * @param {string} accessToken A String containing the access token. + */ + setAccessToken(accessToken) { + this.accessToken = accessToken; + } + + /** + * This is a getter method to get token expire time. + * @returns A String representing the token expire time. + */ + getExpiresIn() { + return this.expiresIn; + } + + /** + * This is a setter method to set token expire time. + * @param {string} expiresIn A String containing the token expire time. + */ + setExpiresIn(expiresIn) { + this.expiresIn = expiresIn; + } + + /** + * This is a getter method to get token user mail. + * @returns {UserSignature/null} A String representing the userSignature + */ + getUserSignature() { + return this.userSignature; + } + + /** + * This is a setter method to set token user email. + * @param {UserSignature} userSignature A String containing the userMail + */ + setUserSignature(userSignature) { + this.userSignature = userSignature; + } + + /** + * This is a getter method to get the id + * @returns the id + */ + getId() { + return this.id; + } + + /** + * This is a setter method to set the id + * @param {String} id A String containing the id + */ + setId(id) { + this.id = id; + } + + /** + * This is a getter method to get the apiDomain + * @returns the apiDomain + */ + getAPIDomain() { + return this.apiDomain; + } + + /** + * This is a setter method to set the apiDomain + * @param {String} apiDomain A String containing the apiDomain + */ + setAPIDomain(apiDomain) { + this.apiDomain = apiDomain; + } + + async generateToken() { + await this.getToken().catch((err) => { throw err }); + } + + async getToken() { + let initializer = await Initializer.getInitializer().catch((err) => { throw err }); + let store = initializer.getStore(); + let oauthToken = await Reflect.construct(OAuthToken, []); + oauthToken = null; + if (this.getId() != null) { + oauthToken = await store.findTokenById(this.getId()); + await this.mergeObjects(this, oauthToken); + } + else { + oauthToken = await store.findToken(this); + } + if (oauthToken == null) { + if (this.getUserSignature() != null) { + await this.checkTokenDetails().catch((err) => { throw err }); + } + oauthToken = this; + } + + if (oauthToken.getAPIDomain() == null || oauthToken.getAPIDomain().length <= 0) + { + if(initializer.getEnvironment() == null) + { + throw new SDKException(Constants.ENVIRONMENT_ERROR_1, Constants.ENVIRONMENT_ERROR_MESSAGE.concat(" : ")); + } + oauthToken.setAPIDomain(initializer.getEnvironment().getUrl()); + } + let environment = await DataCenter.get(oauthToken.getAPIDomain()); + if (environment !== null) { + try{ + let initialzer = await Initializer.getInitializer(); + initializer["_environment"] = environment; + } + catch (error) + { + throw new SDKException(Constants.ENVIRONMENT_ERROR_MESSAGE.concat(" : "), null, null, error); + } + } + else { + if (initializer.getEnvironment() == null) + { + throw new SDKException(Constants.ENVIRONMENT_ERROR_1, Constants.ENVIRONMENT_ERROR_MESSAGE.concat(" : ")); + } + } + + let url = initializer.getEnvironment().getAccountsUrl(); + if (oauthToken.getAccessToken() == null || oauthToken.getAccessToken().length == 0) { + if (oauthToken.getRefreshToken() != null && oauthToken.getRefreshToken().length > 0) { + Logger.info(Constants.ACCESS_TOKEN_USING_REFRESH_TOKEN_MESSAGE); + await oauthToken.refreshAccessToken(oauthToken, store, url); + } + else { + Logger.info(Constants.ACCESS_TOKEN_USING_GRANT_TOKEN_MESSAGE); + await oauthToken.generateAccessToken(oauthToken, store, url).catch((err) => { throw err }); + } + } + else if (oauthToken.getExpiresIn() != null && (oauthToken.getExpiresIn()) > 0 && this.getTokenExpiry(oauthToken)) { + Logger.info(Constants.REFRESH_TOKEN_MESSAGE); + let refreshtoken = await oauthToken.refreshAccessToken(oauthToken, store, url); + refreshtoken.getAccessToken(); + } + else if (oauthToken.getExpiresIn() == null && oauthToken.getAccessToken() != null && oauthToken.getId() == null) { + await store.saveToken(oauthToken).catch((err) => { throw err }); + } + return oauthToken.getAccessToken(); + } + getTokenExpiry(oauthToken) { + let num = (parseInt(oauthToken.getExpiresIn()) - new Date().getTime()); + var check = num < 5000; + return check; + } + async checkTokenDetails() { + if (this.getGrantToken() == null && this.getRefreshToken() == null) { + throw new SDKException(Constants.MANDATORY_VALUE_ERROR, Constants.GET_TOKEN_BY_USER_NAME_ERROR + " - " + Constants.OAUTH_MANDATORY_KEYS2.join()) + } + return true; + } + + async mergeObjects(first, second) { + if (first instanceof OAuthToken && second instanceof OAuthToken) { + let fieldsarray = Object.keys(first); + fieldsarray.forEach(field => { + let value1 = Reflect.get(first, field); + let value2 = Reflect.get(second, field); + let value = (value1 != null) ? value1 : value2; + Reflect.set(first, field, value); + }); + } + } + + async authenticate(urlConnection) { + await urlConnection.addHeader(Constants.AUTHORIZATION, Constants.OAUTH_HEADER_PREFIX + await this.getToken()); + } + + async refreshAccessToken(oauthToken, store, url) { + var formDataRequestBody = new FormData(); + formDataRequestBody.append(Constants.CLIENT_ID, oauthToken.getClientId()); + formDataRequestBody.append(Constants.CLIENT_SECRET, oauthToken.getClientSecret()); + formDataRequestBody.append(Constants.GRANT_TYPE, Constants.REFRESH_TOKEN); + formDataRequestBody.append(Constants.REFRESH_TOKEN, oauthToken.getRefreshToken()); + const requestDetails = { + method: Constants.REQUEST_METHOD_POST, + headers: {}, + body: formDataRequestBody, + encoding: "utf8", + allowGetBody: true, + throwHttpErrors: false, + }; + var response = await this.getResponse(url, requestDetails); + + try { + await this.parseResponse(oauthToken, response.body).catch((err) => { + throw err; + }); + await store.saveToken(oauthToken).catch((err) => { + throw err; + }); + } catch (error) { + if (error instanceof SDKException) { + throw error; + } else if (error instanceof Error) { + throw new SDKException(Constants.SAVE_TOKEN_ERROR, null, null, error); + } + } + return oauthToken; + } + + + + async generateAccessToken(oauthToken, store, url) { + var formDataRequestBody = new FormData(); + formDataRequestBody.append(Constants.CLIENT_ID, oauthToken.getClientId()); + formDataRequestBody.append(Constants.CLIENT_SECRET, oauthToken.getClientSecret()); + if (oauthToken.getRedirectURL() != null) { + formDataRequestBody.append(Constants.REDIRECT_URI, oauthToken.getRedirectURL()); + } + formDataRequestBody.append( + Constants.GRANT_TYPE, + Constants.GRANT_TYPE_AUTH_CODE + ); + formDataRequestBody.append(Constants.CODE, oauthToken.getGrantToken()); + const requestDetails = { + method: Constants.REQUEST_METHOD_POST, + headers: {}, + body: formDataRequestBody, + encoding: "utf8", + allowGetBody: true, + throwHttpErrors: false, + }; + var response = await this.getResponse(url, requestDetails); + try { + await this.parseResponse(oauthToken, response.body).catch((err) => { + throw err; + }); + await store.saveToken(oauthToken).catch((err) => { + throw err; + }); + } catch (error) { + if (error instanceof SDKException) { + throw error; + } else if (error instanceof Error) { + throw new SDKException(Constants.SAVE_TOKEN_ERROR, null, null, error); + } + } + return oauthToken; + } + + async getResponse(url, requestDetails) { + return got(url, requestDetails); + } + + async parseResponse(oauthToken, response) { + var responseJSON = JSON.parse(response); + if (!responseJSON.hasOwnProperty(Constants.ACCESS_TOKEN)) { + throw new SDKException( + Constants.INVALID_TOKEN_ERROR, + responseJSON.hasOwnProperty(Constants.ERROR_KEY) + ? responseJSON[Constants.ERROR_KEY].toString() + : Constants.NO_ACCESS_TOKEN_ERROR + ); + } + oauthToken.setAccessToken(responseJSON[Constants.ACCESS_TOKEN]); + this.expiresIn = ( + new Date().getTime() + (await this.getTokenExpiryTime(responseJSON)) + ).toString(); + if (responseJSON.hasOwnProperty(Constants.REFRESH_TOKEN)) { + oauthToken.setRefreshToken(responseJSON[Constants.REFRESH_TOKEN]); + } + if (responseJSON.hasOwnProperty(Constants.API_DOMAIN)) + { + oauthToken.setAPIDomain(responseJSON[Constants.API_DOMAIN]); + } + + return oauthToken; + } + + getTokenExpiryTime(response) { + return response.hasOwnProperty(Constants.EXPIRES_IN_SEC) + ? response[Constants.EXPIRES_IN] + : response[Constants.EXPIRES_IN] * 1000; + } + + async remove() { + try { + let initializer = await Initializer.getInitializer(); + + await initializer.getStore().deleteToken(this.id).catch((err) => { + throw err; + }); + return true; + } catch (error) { + if (error instanceof SDKException) { + throw error; + } else if (error instanceof Error) { + throw new SDKException(null, null, null, error); + } + } + } + + /** + * Creates an OAuthToken class instance with the specified parameters. + * @param {String} clientID - A String containing the OAuth client id. + * @param {String} clientSecret - A String containing the OAuth client secret. + * @param {String} grantToken - A String containing the GRANT token. + * @param {String} refreshToken - A String containing the REFRESH token. + * @param {String} redirectURL - A String containing the OAuth redirect URL. + * @param {String} id - A string + * @param {String} accessToken - A String containing the ACCESS token. + * @param {String} userSignature - A String containing the UserName. + */ + constructor( + clientID, + clientSecret, + grantToken, + refreshToken = null, + redirectURL = null, + id = null, + accessToken = null, + userSignature + ) { + super(); + + this.clientID = clientID; + + this.clientSecret = clientSecret; + + this.grantToken = grantToken; + + this.refreshToken = refreshToken; + + this.redirectURL = redirectURL; + + this.accessToken = accessToken; + + this.id = id; + + this.userSignature = userSignature; + } + + async revoke(id) { + try { + if (Initializer.getInitializer() == null) { + throw new SDKException(Constants.SDK_UNINITIALIZATION_ERROR, Constants.SDK_UNINITIALIZATION_MESSAGE); + } + var initializer = Initializer.getInitializer(); + let store = initializer.getStore(); + let url = initializer.getEnvironment().getAccountsUrl(); + let isRevoke = false; + let oauthToken = await Reflect.construct(OAuthToken, null); + oauthToken.setId(id); + store.findToken(oauthToken); + if (oauthToken != null && oauthToken.getRefreshToken() != null) { + isRevoke = this.revokeRefreshToken(oauthToken.getRefreshToken(), url + Constants.REVOKE_URL); + Logger.info(Constants.ID + ":" + id + Constants.REFRESH_TOKEN_REMOVED); + } + else { + Logger.warn(Constants.ID + ":" + id + Constants.TOKEN_NOT_FOUND); + } + return isRevoke; + } + catch (error) { + if (!(error instanceof SDKException)) { + error = new SDKException(null, null, null, error); + } + throw error; + } + } + async revokeRefreshToken(refreshToken, url) { + var formDataRequestBody = new FormData(); + + formDataRequestBody.append(Constants.TOKEN, refreshToken); + + const requestDetails = { + method: Constants.REQUEST_METHOD_POST, + headers: {}, + body: formDataRequestBody, + encoding: "utf8", + allowGetBody: true, + throwHttpErrors: false, + }; + + try { + let response = await this.getResponse(url, requestDetails); + let responseJSON = JSON.parse(response.body); + if (responseJSON != null && responseJSON.has(Constants.STATUS) && responseJSON[Constants.STATUS] == Constants.STATUS_SUCCESS) { + return true; + } + return false; + } + catch (error) { + if (!(error instanceof SDKException)) { + throw error; + } + else if (error instanceof Error) { + throw new SDKException(Constants.REVOKE_TOKEN_ERROR, error); + } + } + } +} +export { + OAuthToken as OAuthToken, + OAuthToken as MasterModel +} diff --git a/versions/3.0.0/lib/models/authenticator/store/db_builder.js b/versions/3.0.0/lib/models/authenticator/store/db_builder.js new file mode 100644 index 0000000..f196183 --- /dev/null +++ b/versions/3.0.0/lib/models/authenticator/store/db_builder.js @@ -0,0 +1,80 @@ +import { DBStore } from "./db_store.js"; + +import { Constants } from "../../../utils/util/constants.js"; + +class DBBuilder { + _userName = Constants.MYSQL_USER_NAME; + + _portNumber = Constants.MYSQL_PORT_NUMBER; + + _password = ""; + + _host = Constants.MYSQL_HOST; + + _databaseName = Constants.MYSQL_DATABASE_NAME; + + _tableName = Constants.MYSQL_TABLE_NAME; + + userName(userName) { + if (userName != null) { + this._userName = userName; + } + + return this; + } + + portNumber(portNumber) { + if (portNumber != null) { + this._portNumber = portNumber; + } + + return this; + } + + password(password) { + if (password != null) { + this._password = password; + } + + return this; + } + + host(host) { + if (host != null) { + this._host = host; + } + + return this; + } + + databaseName(databaseName) { + if (databaseName != null) { + this._databaseName = databaseName; + } + + return this; + } + + tableName(tableName) { + if (tableName != null) { + this._tableName = tableName; + } + + return this; + } + + build() { + return new DBStore( + this._host, + this._databaseName, + this._tableName, + this._userName, + this._password, + this._portNumber + ); + } +} +export { + DBBuilder as DBBuilder, + DBBuilder as MasterModel +} diff --git a/versions/3.0.0/lib/models/authenticator/store/db_store.js b/versions/3.0.0/lib/models/authenticator/store/db_store.js new file mode 100644 index 0000000..28a2763 --- /dev/null +++ b/versions/3.0.0/lib/models/authenticator/store/db_store.js @@ -0,0 +1,509 @@ +import { OAuthBuilder } from "../oauth_builder.js"; + +import mysql from "mysql"; + +import { TokenStore } from "./token_store.js"; + +import { OAuthToken } from "../oauth_token.js"; + +import { Constants } from "../../../utils/util/constants.js"; + +import { SDKException } from "../../../core/com/zoho/crm/api/exception/sdk_exception.js"; + +import { UserSignature } from "../../../routes/user_signature.js"; + + +/** + * This class stores the user token details to the MySQL DataBase. + */ +class DBStore extends TokenStore { + userName; + + portNumber; + + password; + + host; + + databaseName; + + tableName; + + /** + * Creates an DBStore class instance with the specified parameters. + * @param {string} host - A String containing the DataBase host name. Default value is localhost + * @param {string} databaseName - A String containing the DataBase name. Default value is zohooauth + * @param {string} tableName - A String containing the DataBase table name. Default value is oauthtoken + * @param {string} userName - A String containing the DataBase user name. Default value is root + * @param {string} password - A String containing the DataBase password. Default value is an empty string + * @param {string} portNumber - A String containing the DataBase port number. Default value is 3306 + */ + constructor( + host = null, + databaseName = null, + tableName = null, + userName = null, + password = null, + portNumber = null + ) { + super(); + + this.host = host; + + this.databaseName = databaseName; + + this.tableName = tableName; + + this.userName = userName; + + this.password = password; + + this.portNumber = portNumber; + } + + async findToken(token) { + try { + if (token instanceof OAuthToken) { + let oauthToken = token; + var query = "select * from " + this.tableName; + if (oauthToken.getUserSignature() != null) { + let name = oauthToken.getUserSignature().getName(); + if (name != null && name.length > 0) { + query += " where user_name='" + name + "'"; + } + } + else if (oauthToken.getAccessToken() != null && oauthToken.getClientId() == null && oauthToken.getClientSecret() == null) { + query = query + " where access_token='" + oauthToken.getAccessToken() + "'"; + } + else if (oauthToken.getRefreshToken() != null || oauthToken.getGrantToken() != null && oauthToken.getClientId() != null && oauthToken.getClientSecret() != null) { + if (oauthToken.getGrantToken() != null && oauthToken.getGrantToken().length > 0) { + query += " where grant_token='" + oauthToken.getGrantToken() + "'"; + } + else if (oauthToken.getRefreshToken() != null && oauthToken.getRefreshToken().length > 0) { + query += " where refresh_token='" + oauthToken.getRefreshToken() + "'"; + } + } + query += "limit 1;"; + try { + var connection = await this.getConnection(); + var that = this; + return new Promise(function (resolve, reject) { + connection.connect(function (err) { + if (err) { + return reject(err); + } + connection.query(query, async function (err, result) { + connection.end(); + if (err) { + return reject(err); + } + if (result.length == 0) { + return resolve(null); + } + do { + await that.setMergeData(oauthToken, result); + break; + } + while (result.next()); + return resolve(oauthToken); + }); + }); + }).catch(err => { + throw err; + }); + } + catch (err) { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_DB_ERROR1, err); + } + } + } + catch (err) { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_DB_ERROR1, err); + } + } + + async saveToken(token) { + if (!(token instanceof OAuthToken)) { + return null; + } + else { + let oauthToken = token; + var query = "update " + this.tableName + " set "; + if (oauthToken.getUserSignature() != null) { + let name = oauthToken.getUserSignature().getName(); + if (name != null && name.length > 0) { + query += await this.setToken(oauthToken) + " where user_name='" + name + "'"; + } + } + else if (oauthToken.getAccessToken() != null && oauthToken.getAccessToken().length > 0 && oauthToken.getClientId() == null && oauthToken.getClientSecret() == null) { + query += await this.setToken(oauthToken) + " where access_token='" + oauthToken.getAccessToken() + "'"; + } + else if (((oauthToken.getRefreshToken() != null && oauthToken.getRefreshToken().length > 0) || oauthToken.getGrantToken() != null && oauthToken.getGrantToken().length > 0) && oauthToken.getClientId() != null && oauthToken.getClientSecret() != null) { + if (oauthToken.getGrantToken() != null && oauthToken.getGrantToken().length > 0) { + query += await this.setToken(oauthToken) + " where grant_token='" + oauthToken.getGrantToken() + "'"; + } + else if (oauthToken.getRefreshToken() != null && oauthToken.getRefreshToken().length > 0) { + query += await this.setToken(oauthToken) + " where refresh_token='" + oauthToken.getRefreshToken() + "'"; + } + } + query += " limit 1;"; + try { + let that = this; + + let connection = await this.getConnection(); + + return new Promise(async function (resolve, reject) { + connection.connect(function (err) { + if (err) { + return reject(err); + } + connection.query(query, async function (err, result) { + if (err) { + connection.end(); + return reject(err); + } + + if (result.affectedRows > 0) { + connection.end(); + return resolve(result); + } + else { + try { + if (oauthToken.getId() != null || oauthToken.getUserSignature() != null) { + if (oauthToken.getRefreshToken() == null && oauthToken.getGrantToken() == null && oauthToken.getAccessToken() == null) { + reject(new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_DB_ERROR1)); + } + } + if (oauthToken.getId() == null) { + let newId = await that.generateId().catch((err) => { throw err }); + oauthToken.setId(newId); + } + var sqlQuery = + "INSERT INTO " + + that.tableName + + "(id,user_name,client_id,client_secret,refresh_token,access_token,grant_token,expiry_time,redirect_url,api_domain) VALUES ?"; + + var values = [ + [ + token.getId(), + token.getUserSignature() == null ? token.getUserSignature() : token.getUserSignature().getName(), + token.getClientId(), + token.getClientSecret(), + token.getRefreshToken(), + token.getAccessToken(), + token.getGrantToken(), + token.getExpiresIn(), + token.getRedirectURL(), + token.getAPIDomain(), + ], + ]; + connection.query(sqlQuery, [values], function (err, result) { + connection.end(); + if (err) { + return reject(err); + } + return resolve(); + }); + } + catch (err) { + throw err; + } + } + }) + }) + }).catch(err => { + throw err; + }); + } + catch (err) { + throw new SDKException(Constants.TOKEN_STORE, Constants.SAVE_TOKEN_DB_ERROR, err); + } + } + } + + async deleteToken(id) { + try { + var connection = await this.getConnection(); + let query = "delete from " + this.tableName + " where id='" + id + "';"; + return new Promise(function (resolve, reject) { + connection.connect(function (err) { + if (err) { + return reject(err); + } + connection.query(query, function (err, result) { + connection.end(); + if (err) { + return reject(err); + } + return resolve(result); + }) + }) + }).catch(err => { throw err; }); + } + catch (error) { + throw new SDKException( + Constants.TOKEN_STORE, + Constants.DELETE_TOKEN_DB_ERROR, + null, + error + ); + } + } + + async getTokens() { + var tokens = []; + let _this = this; + try { + var connection = await this.getConnection(); + var sqlQuery = "select * from " + this.tableName + ";"; + return new Promise(function (resolve, reject) { + connection.connect(function (err) { + if (err) { + return reject(err); + } + connection.query(sqlQuery, function (err, result) { + connection.end(); + if (err) { + return reject(err); + } + if (result.length > 0) { + for (let row of result) { + + let oauthToken = Reflect.construct(OAuthToken, []); + _this.setMergeData(oauthToken, [row]) + tokens.push(oauthToken); + } + return resolve(tokens); + } + + return resolve(null); + }); + }); + }).catch(err => { throw err; }); + } catch (error) { + throw new SDKException( + Constants.TOKEN_STORE, + Constants.GET_TOKENS_DB_ERROR, + null, + error + ); + } + } + + async deleteTokens() { + try { + var connection = await this.getConnection(); + + var sqlQuery = "delete from " + this.tableName + ";"; + + return new Promise(function (resolve, reject) { + connection.connect(function (err) { + if (err) { + return reject(err); + } + + connection.query(sqlQuery, function (err, result) { + + connection.end(); + if (err) { + return reject(err); + } + + return resolve(result); + }); + }); + }).catch(err => { throw err; }); + } catch (error) { + throw new SDKException( + Constants.TOKEN_STORE, + Constants.DELETE_TOKENS_DB_ERROR, + null, + error + ); + } + } + + getConnection() { + var connection = mysql.createConnection({ + host: this.host, + user: this.userName, + password: this.password, + database: this.databaseName, + port: Number(this.portNumber), + }); + + return connection; + } + + async findTokenById(id) { + try { + let connection = await this.getConnection(); + let _this = this; + let oauthToken = Reflect.construct(OAuthToken, []); + let query = "select * from " + this.tableName + " where id='" + id + "';"; + return new Promise(function (resolve, reject) { + connection.connect(function (err) { + if (err) { + return reject(err); + } + connection.query(query, async function (err, result) { + connection.end(); + if (err) { + return reject(err); + } + if (result.length == 0) { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_BY_ID_DB_ERROR); + } + do { + await _this.setMergeData(oauthToken, result); + return resolve(oauthToken); + } + while (result.next()); + }); + }); + }).catch(err => { throw err; }); + } + catch (err) { + if (err instanceof SDKException) { + throw err; + } + else { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_BY_ID_DB_ERROR, err); + } + } + } + + async setMergeData(oauthToken, result) { + if (result.length != 0) { + if (oauthToken.getId() == null) { + oauthToken.setId(result[0].id); + } + if (oauthToken.getUserSignature() == null) { + let name = result[0].user_name; + if (name != null) { + oauthToken.setUserSignature(new UserSignature(name)); + } + } + if (oauthToken.getClientId() == null) { + oauthToken.setClientId(result[0].client_id); + } + if (oauthToken.getClientSecret() == null) { + oauthToken.setClientSecret(result[0].client_secret); + } + if (oauthToken.getRefreshToken() == null) { + oauthToken.setRefreshToken(result[0].refresh_token); + } + if (oauthToken.getAccessToken() == null) { + oauthToken.setAccessToken(result[0].access_token) + } + if (oauthToken.getGrantToken() == null) { + oauthToken.setGrantToken(result[0].grant_token); + } + if (oauthToken.getExpiresIn() == null) { + let expiresIn = result[0].expiry_time; + if (expiresIn != null) { + oauthToken.setExpiresIn(expiresIn.toString()); + } + } + if (oauthToken.getRedirectURL() == null) { + oauthToken.setRedirectURL(result[0].redirect_url); + } + if (oauthToken.getAPIDomain() == null) + { + oauthToken.setAPIDomain(result[0].api_domain) + } + } + } + + async setToken(oauthToken) { + let query = []; + + if (oauthToken.getUserSignature() != null) { + let name = oauthToken.getUserSignature().getName(); + if (name != null && name.length > 0) { + query.push(this.setTokenInfo(Constants.USER_NAME, name)); + } + } + if (oauthToken.getClientId() != null) { + query.push(this.setTokenInfo(Constants.CLIENT_ID, oauthToken.getClientId())); + } + if (oauthToken.getClientSecret() != null) { + query.push(this.setTokenInfo(Constants.CLIENT_SECRET, oauthToken.getClientSecret())); + } + if (oauthToken.getRefreshToken() != null) { + query.push(this.setTokenInfo(Constants.REFRESH_TOKEN, oauthToken.getRefreshToken())); + } + if (oauthToken.getAccessToken() != null) { + query.push(this.setTokenInfo(Constants.ACCESS_TOKEN, oauthToken.getAccessToken())); + } + if (oauthToken.getGrantToken() != null) { + query.push(this.setTokenInfo(Constants.GRANT_TOKEN, oauthToken.getGrantToken())); + } + if (oauthToken.getExpiresIn() != null) { + query.push(this.setTokenInfo(Constants.EXPIRY_TIME, oauthToken.getExpiresIn())); + } + if (oauthToken.getRedirectURL() != null) { + query.push(this.setTokenInfo(Constants.REDIRECT_URL, oauthToken.getRedirectURL())); + } + if (oauthToken.getAPIDomain() != null) { + query.push(this.setTokenInfo(Constants.API_DOMAIN, oauthToken.getAPIDomain())); + } + return query.join(","); + } + setTokenInfo(key, value) { + return key + "='" + value + "'"; + } + + async generateId() { + let id = '0'; + + try { + let connection = await this.getConnection(); + + let that = this; + + let query = "select max(id) as id from " + this.tableName + ";"; + return new Promise(function (resolve, reject) { + connection.connect(function (err) { + if (err) { + return reject(err); + } + connection.query(query, async function (err, result) { + connection.end(); + if (err) { + return reject(err); + } + if (result.length == 0) { + return resolve(id); + } + do { + let max = await that.getMax(result); + if (max != null) { + return resolve((parseInt(max) + 1).toString()); + } else { + return resolve('1'); + } + } + while (result.next()); + }); + }); + }).catch(err => { + throw err; + }); + } + catch (err) { + throw new SDKException(Constants.TOKEN_STORE, Constants.GENERATE_TOKEN_ID_ERROR, err); + } + } + async getMax(result) { + let max = 0; + if (result.length > 0) { + for (let row of result) { + max = row.id; + } + } + return max; + } +} + +export { DBStore as DBStore, DBStore as MasterModel }; diff --git a/versions/3.0.0/lib/models/authenticator/store/file_store.js b/versions/3.0.0/lib/models/authenticator/store/file_store.js new file mode 100644 index 0000000..6f96ce1 --- /dev/null +++ b/versions/3.0.0/lib/models/authenticator/store/file_store.js @@ -0,0 +1,361 @@ +import * as fs from "fs"; +import { TokenStore } from './token_store.js'; +import { Constants } from '../../../utils/util/constants.js'; +import { SDKException } from '../../../core/com/zoho/crm/api/exception/sdk_exception.js'; +import { OAuthToken } from "../oauth_token.js"; +import { OAuthBuilder } from "../oauth_builder.js"; +import { UserSignature } from "../../../zohocrmsdk.js"; + +/** + * This class stores the user token details to the file. + */ +class FileStore extends TokenStore { + filePath; + + /** + * Creates an FileStore class instance with the specified parameters. + * @param {string} filePath + */ + constructor(filePath) { + super(); + this.filePath = filePath; + let isCreate = false; + this.headers = [Constants.ID, Constants.USER_NAME, Constants.CLIENT_ID, Constants.CLIENT_SECRET, Constants.REFRESH_TOKEN, Constants.ACCESS_TOKEN, Constants.GRANT_TOKEN, Constants.EXPIRY_TIME, Constants.REDIRECT_URL, Constants.API_DOMAIN]; + if (!fs.existsSync(this.filePath) || (fs.existsSync(this.filePath) && fs.readFileSync(this.filePath, 'utf-8') === "")) { + isCreate = true; + fs.writeFileSync(filePath, this.headers.join(), 'utf-8'); + } + if (!isCreate){ + try{ + var allContents = fs.readFileSync(this.filePath, 'utf-8').toString().split("\n"); + let headers = allContents[0].split(","); + if (headers.length === 9) { + allContents = allContents.map(content => { + const arr = content.split(","); + const newArr = arr.slice(); + newArr.push(''); + return newArr; + }); + allContents[0] = this.headers.join(); + fs.writeFileSync(this.filePath, allContents.join("\n")); + } + } + catch (error){ + throw error; + } + } + } + + async findToken(token) { + if (!(token instanceof OAuthToken)) { + return token; + } + try { + var csvReader = fs.readFileSync(this.filePath, 'utf-8').toString().split("\n"); + if (token instanceof OAuthToken) { + let oauthToken = token; + let isRowPresent = false; + for (let index = 1; index < csvReader.length; index++) { + let allcontents = csvReader[index]; + let nextRecord = allcontents.split(","); + if (nextRecord.length > 1) { + isRowPresent = await this.checkCondition(oauthToken, nextRecord); + if (isRowPresent) { + await this.setMergeData(oauthToken, nextRecord); + return oauthToken; + } + } + } + if (!isRowPresent) { + return null; + } + } + } + catch (error) { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_FILE_ERROR, null, error); + } + return null; + } + + async saveToken(token) { + if (!(token instanceof OAuthToken)) { + return token; + } + try { + let oauthToken = token; + var csvReader = fs.readFileSync(this.filePath, 'utf-8').toString().split("\n"); + let isRowPresent = false; + for (var index = 1; index < csvReader.length; index++) { + var allcontents = csvReader[index]; + let nextRecord = allcontents.split(","); + if (nextRecord.length > 1) { + if (oauthToken.getId() != null) { + let id = await this.getData(nextRecord[0]); + if (id != null && oauthToken.getId() != null && id == oauthToken.getId()) { + isRowPresent = true; + } + } + else { + isRowPresent = await this.checkCondition(oauthToken, nextRecord); + } + if (isRowPresent) { + await this.setMergeData(oauthToken, nextRecord) + + csvReader.splice(index, 1, (await this.setToken(oauthToken)).join(",")); + + break; + } + } + else { + csvReader.slice(index, csvReader.length + 1); + } + } + if (!isRowPresent) { + if (oauthToken.getId() != null || oauthToken.getUserSignature() != null) { + if (oauthToken.getRefreshToken() == null && oauthToken.getGrantToken() == null && oauthToken.getAccessToken() == null) { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_FILE_ERROR1); + } + } + if (oauthToken.getId() == null) { + let newID = await this.generateID(csvReader); + + oauthToken.setId(newID); + } + // csvReader.push("\n"); + + csvReader.push((await this.setToken(oauthToken)).join(",")) + + fs.writeFileSync(this.filePath, csvReader.join("\n")); + } + if (isRowPresent) { + fs.writeFileSync(this.filePath, csvReader.join("\n")); + } + } + catch (err) { + if (err instanceof SDKException) { + throw err; + } + else { + throw new SDKException(Constants.TOKEN_STORE, Constants.SAVE_TOKEN_FILE_ERROR, null, err); + } + } + finally { + } + } + + + async deleteToken(id) { + try { + var csvReader = fs.readFileSync(this.filePath, 'utf-8').toString().split("\n"); + + let isRowPresent = false; + + for (let index = 1; index < csvReader.length; index++) { + let allcontents = csvReader[index]; + + let nextRecord = allcontents.split(","); + + if (nextRecord.length > 1) { + let recordId = await this.getData(nextRecord[0]); + + if (recordId == id) { + isRowPresent = true; + csvReader.splice(index, 1) + } + } + } + if (isRowPresent) { + fs.writeFileSync(this.filePath, csvReader.join("\n")); + } + else { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_BY_ID_FILE_ERROR); + } + } + catch (err) { + if (err instanceof SDKException) { + throw err; + } + else { + throw new SDKException(Constants.TOKEN_STORE, Constants.DELETE_TOKEN_FILE_ERROR, err); + } + } + } + + async getTokens() { + let _this = this; + try { + var tokens = []; + var csvReader = fs.readFileSync(this.filePath, 'utf-8').toString().split("\n"); + for (var i = 1; i < csvReader.length; i++) { + let allContents = csvReader[i]; + let nextRecord = allContents.split(","); + let oauthToken = Reflect.construct(OAuthToken, []); + await _this.setMergeData(oauthToken, nextRecord) + tokens.push(oauthToken); + } + return tokens; + } + catch (error) { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKENS_FILE_ERROR, null, error); + + } + } + + deleteTokens() { + try { + fs.writeFileSync(this.filePath, this.headers.join(), 'utf-8'); + } + catch (error) { + throw new SDKException(Constants.TOKEN_STORE, Constants.DELETE_TOKENS_FILE_ERROR, null, error); + } + } + + async findTokenById(id) { + try { + let csvReader = fs.readFileSync(this.filePath, 'utf-8').toString().split("\n"); + let oauthToken = Reflect.construct(OAuthToken, []); + let isRowPresent = false; + for (let index = 1; index < csvReader.length; index++) { + let nextRecord = csvReader[index].split(","); + if (nextRecord[0] == id) { + isRowPresent = true; + await this.setMergeData(oauthToken, nextRecord); + return oauthToken; + } + } + if (!isRowPresent) { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_BY_ID_FILE_ERROR); + } + } + catch (err) { + if (err instanceof SDKException) { + throw err; + } + else { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_BY_ID_FILE_ERROR, err); + } + } + } + + async checkCondition(oauthToken, nextRecord) { + let isRowPresent = false; + if (oauthToken.getUserSignature() != null) { + let name = oauthToken.getUserSignature().getName(); + let userName = await this.getData(nextRecord[1]); + if (name != null && name.length > 0 && userName != null && userName.length > 0 && name == userName) { + isRowPresent = true; + } + } + else if (oauthToken.getAccessToken() != null && oauthToken.getClientId() == null && oauthToken.getClientSecret() == null) { + let accessToken = await this.getData(nextRecord[5]); + if (accessToken != null && accessToken.length > 0 && oauthToken.getAccessToken().length > 0 && oauthToken.getAccessToken() == accessToken) { + isRowPresent = true; + } + } + else if (oauthToken.getRefreshToken() != null || oauthToken.getGrantToken() != null && oauthToken.getClientId() != null && oauthToken.getClientSecret() != null) { + let grantToken = await this.getData(nextRecord[6]); + let refreshToken = await this.getData(nextRecord[4]); + if (grantToken != null && grantToken.length > 0 && oauthToken.getGrantToken() != null && oauthToken.getGrantToken() == grantToken) { + isRowPresent = true; + } + else if (refreshToken != null && refreshToken.length > 0 && oauthToken.getRefreshToken() != null && oauthToken.getRefreshToken() == refreshToken) { + isRowPresent = true; + } + } + return isRowPresent; + } + + async getData(value) { + return (value != null && value.length > 0 && !(value.length == 0)) ? value : null; + } + + async setMergeData(oauthToken, nextRecord) { + if (oauthToken.getId() == null) { + oauthToken.setId(await this.getData(nextRecord[0])); + } + if (oauthToken.getUserSignature() == null) { + let name = await this.getData(nextRecord[1]); + if (name != null) { + oauthToken.setUserSignature(new UserSignature(name)); + } + else if (name == null) { + oauthToken.setUserSignature(null); + } + } + if (oauthToken.getClientId() == null) { + oauthToken.setClientId(await this.getData(nextRecord[2])); + } + if (oauthToken.getClientSecret() == null) { + oauthToken.setClientSecret(await this.getData(nextRecord[3])); + } + if (oauthToken.getRefreshToken() == null) { + oauthToken.setRefreshToken(await this.getData(nextRecord[4])); + } + if (oauthToken.getAccessToken() == null) { + oauthToken.setAccessToken(await this.getData(nextRecord[5])); + } + if (oauthToken.getGrantToken() == null) { + oauthToken.setGrantToken(await this.getData(nextRecord[6])); + } + if (oauthToken.getExpiresIn() == null) { + let expiresIn = await this.getData(nextRecord[7]); + if (expiresIn != null) { + oauthToken.setExpiresIn(expiresIn.toString()); + } + } + if (oauthToken.getRedirectURL() == null) { + oauthToken.setRedirectURL(await this.getData(nextRecord[8])); + } + if (oauthToken.getAPIDomain() == null) + { + oauthToken.setAPIDomain(await this.getData(nextRecord[9])); + } + } + + async setToken(oauthToken) { + let data = []; + + data[0] = oauthToken.getId(); + + data[1] = oauthToken.getUserSignature() != null ? oauthToken.getUserSignature().getName() : null; + + data[2] = oauthToken.getClientId(); + + data[3] = oauthToken.getClientSecret(); + + data[4] = oauthToken.getRefreshToken(); + + data[5] = oauthToken.getAccessToken(); + + data[6] = oauthToken.getGrantToken(); + + data[7] = oauthToken.getExpiresIn(); + + data[8] = oauthToken.getRedirectURL(); + + data[9] = oauthToken.getAPIDomain(); + + return data; + } + async generateID(allcontents) { + let maxValue = 0; + + if (allcontents.length > 1) { + for (var i = 1; i < allcontents.length; i++) { + let nextRecord = allcontents[i]; + + if (nextRecord.length > 1 && nextRecord[0] != null && nextRecord[0]) { + if (maxValue < parseInt(nextRecord[0])) { + maxValue = parseInt(nextRecord[0]); + } + } + } + } + return (maxValue + 1).toString(); + } +} + +export { + FileStore as FileStore, + FileStore as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/models/authenticator/store/token_store.js b/versions/3.0.0/lib/models/authenticator/store/token_store.js new file mode 100644 index 0000000..df718ed --- /dev/null +++ b/versions/3.0.0/lib/models/authenticator/store/token_store.js @@ -0,0 +1,55 @@ +import {Token} from "../token.js"; + +/** + * This class stores the user token details. + */ +class TokenStore { + + /** + This method is used to get user token details. + * @param {Token} token - A Token class instance. + * @returns {Token} A Token class instance representing the user token details. + * @throws {SDKException} + */ + findToken(token) { } + + /** + * This method is used to retrieve the user token details based on unique ID + * @param {String} id - A String representing the unique ID + * @return {Token} A Token class instance representing the user token details. + * @throws SDKException + */ + findTokenById(id) { } + + /** + * This method is used to store user token details. + * @param {Token} token - A Token class instance. + * @throws {SDKException} + */ + saveToken(token) { } + + /** + This method is used to delete user token details. + * @param {String} id - A String representing the unique ID + * @throws {SDKException} + */ + deleteToken(id) { } + + /** + * The method to retrieve all the stored tokens. + * @returns {Array} - An array of Token class instances + * @throws {SDKException} + */ + getTokens() { } + + /** + * The method to delete all the stored tokens. + * @throws {SDKException} + */ + deleteTokens() { } +} + +export { + TokenStore as TokenStore, + TokenStore as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/models/authenticator/token.js b/versions/3.0.0/lib/models/authenticator/token.js new file mode 100644 index 0000000..1c82dc3 --- /dev/null +++ b/versions/3.0.0/lib/models/authenticator/token.js @@ -0,0 +1,23 @@ +/** + * This class verifies and sets token to APIHTTPConnector instance. + */ + class Token { + + /** + * This method is to set authentication token to APIHTTPConnector instance. + * @param {APIHTTPConnector} urlConnection - A APIHTTPConnector class instance. + * @throws {SDKException} + */ + authenticate(urlConnection) { } + + /** + * The method to remove the current token from the Store. + * @returns {Boolean} - A Boolean value representing the removed status. + * @throws {SDKException} + */ + remove() { } +} +export { + Token as Token, + Token as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/controllers/api_http_connector.js b/versions/3.0.0/lib/routes/controllers/api_http_connector.js new file mode 100644 index 0000000..20fccba --- /dev/null +++ b/versions/3.0.0/lib/routes/controllers/api_http_connector.js @@ -0,0 +1,287 @@ +import { Constants } from '../../utils/util/constants.js'; +import got from 'got'; +import pkg from "winston"; +let Logger = pkg; +import { Converter } from '../../utils/util/converter.js'; +import { Initializer } from '../initializer.js'; +import { RequestProxy } from '../request_proxy.js'; +import * as tunnel from "tunnel"; + + + +/** + * This module is to make HTTP connections, trigger the requests and receive the response + */ +class APIHTTPConnector { + url; + + requestMethod; + + headers = new Map(); + + parameters = new Map(); + + requestBody = {}; + + contentType; + + /** + * This is a getter method to get the ContentType. + * @returns A String representing the ContentType. + */ + getContentType() { + return this.contentType; + } + + /** + * This is a setter method to set the ContentType. + * @param {string} contentType A String containing the ContentType. + */ + setContentType(contentType) { + this.contentType = contentType; + } + + /** + * This is a setter method to set the API URL. + * @param {string} url A String containing the API Request URL. + */ + setUrl(url) { + this.url = url; + } + + /** + * This is a setter method to set the API request method. + * @param {string} httpMethod - A String containing the API request method. + */ + setRequestMethod(httpMethod) { + this.requestMethod = httpMethod; + } + + /** + * This is a getter method to get API request headers. + * @returns A Map representing the API request headers. + */ + getHeaders() { + return this.headers; + } + + /** + * This is a setter method to set API request headers. + * @param {Map} headers - A Map containing the API request headers. + */ + setHeaders(headers) { + this.headers = headers; + } + + /** + * This method to add API request header name and value. + * @param {string} headerName - A String containing the API request header name. + * @param {string} headerValue - A String containing the API request header value. + */ + addHeader(headerName, headerValue) { + this.headers.set(headerName, headerValue); + } + + /** + * This is a getter method to get API request parameters. + * @returns A Map representing the API request parameters. + */ + getParams() { + return this.parameters; + } + + /** + * This is a setter method to set API request parameters. + * @param {Map} params - A Map containing the API request parameters. + */ + setParams(params) { + this.parameters = params; + } + + /** + * This method to add API request param name and value. + * @param {string} paramName - A String containing the API request param name. + * @param {string} paramValue - A String containing the API request param value. + */ + addParam(paramName, paramValue) { + this.parameters.set(paramName, paramValue); + } + + /** + * This is a setter method to set the API request body. + * @param {object} requestBody - A Object containing the API request body. + */ + setRequestBody(requestBody) { + this.requestBody = requestBody; + } + + getRequestBody() { + return this.requestBody; + } + + /** + * This method makes the Zoho CRM Rest API request. + * @param {object} converterInstance A Converter class instance to call appendToRequest method. + * @returns got instance or null + * + */ + async fireRequest(converterInstance) { + var apiHeaders = {}; + + var modifiedRequestBody = ""; + + if (this.contentType != null) { + this.setContentTypeHeader(); + } + + if (this.headers) { + this.headers.forEach(function (value, key) { + apiHeaders[key] = value; + }); + } + + if (this.parameters != null && this.parameters.size > 0) { + this.setQueryParams(this.parameters); + } + + if (Array.from(Object.keys(this.requestBody)).length > 0) { + modifiedRequestBody = await converterInstance + .appendToRequest(this, null); + } + + let initializer = await Initializer.getInitializer(); + + var requestDetails = { + method: this.requestMethod, + headers: apiHeaders, + body: modifiedRequestBody, + encoding: "utf8", + allowGetBody: true, + throwHttpErrors: false, + }; + + let timeout = initializer.getSDKConfig().getTimeout(); + + if (timeout > 0) { + requestDetails.timeout = timeout; + } + + if (initializer.getRequestProxy() != null) { + let requestProxy = initializer.getRequestProxy(); + + let proxyAuthorization = null; + + if (requestProxy.getUser() != null) { + proxyAuthorization = + requestProxy.getUser() + ":" + requestProxy.getPassword(); + } + + let httpTunnel = tunnel.httpOverHttp({ + proxy: { + host: requestProxy.getHost(), + port: requestProxy.getPort(), + proxyAuth: proxyAuthorization, + }, + }); + + let httpsTunnel = tunnel.httpsOverHttp({ + proxy: { + host: requestProxy.getHost(), + port: requestProxy.getPort(), + proxyAuth: proxyAuthorization, + }, + }); + + let agents = { + http: httpTunnel, + https: httpsTunnel, + }; + + requestDetails.agent = agents; + + Logger.info(this.proxyLog(requestProxy)); + } + + Logger.info(this.toString()); + + return got(this.url, requestDetails); + } + + setQueryParams(parameters) { + var params; + + parameters.forEach(function (value, key) { + if (parameters.has(key)) { + if (params) { + params = params + key + "=" + encodeURI(value) + "&"; + } else { + params = key + "=" + encodeURI(value) + "&"; + } + } + }); + + this.url = this.url + "?" + params; + } + + setContentTypeHeader() { + for (let url of Constants.SET_TO_CONTENT_TYPE) { + if (this.url.includes(url)) { + this.headers.set(Constants.CONTENT_TYPE_HEADER, this.contentType); + + return; + } + } + } + + toString() { + let headers = new Map(this.headers); + + headers.set(Constants.AUTHORIZATION, Constants.CANT_DISCLOSE); + + let headerMapString = JSON.stringify(headers, (key, value) => + value instanceof Map ? [...value] : value + ); + + let paramMapString = JSON.stringify(this.parameters, (key, value) => + value instanceof Map ? [...value] : value + ); + + return Constants.REQUEST_METHOD.concat(" = ") + .concat(this.requestMethod) + .concat(" , ") + .concat(Constants.URL) + .concat(" = ") + .concat(this.url) + .concat(" , ") + .concat(Constants.HEADERS) + .concat(" = ") + .concat(headerMapString) + .concat(" , ") + .concat(Constants.PARAMS) + .concat(" = ") + .concat(paramMapString) + .concat("."); + } + + proxyLog(requestProxy) { + let proxyDetails = Constants.PROXY_SETTINGS.concat(Constants.PROXY_HOST) + .concat(requestProxy.getHost()) + .concat(" , ") + .concat(Constants.PROXY_PORT) + .concat(requestProxy.getPort().toString()); + + if (requestProxy.getUser() != null) { + proxyDetails = proxyDetails + .concat(" , ") + .concat(Constants.PROXY_USER) + .concat(requestProxy.getUser()); + } + + return proxyDetails; + } +} + +export { + APIHTTPConnector as APIHTTPConnector, + APIHTTPConnector as MasterModel +} diff --git a/versions/3.0.0/lib/routes/controllers/api_response.js b/versions/3.0.0/lib/routes/controllers/api_response.js new file mode 100644 index 0000000..11ea779 --- /dev/null +++ b/versions/3.0.0/lib/routes/controllers/api_response.js @@ -0,0 +1,58 @@ +/** + * This class is the common API response object. + */ +class APIResponse { + + statusCode; + + object; + + headers; + + /** + * Creates an APIResponse class instance with the specified parameters. + * @param {Map} headers The map containing the API Response headers + * @param {Integer} statusCode The integer containing the API response HTTP status code. + * @param {Object} object The object containing the API response class instance. + */ + constructor(headers, statusCode, object) { + + this.headers = headers; + + this.statusCode = statusCode; + + this.object = object; + } + + /** + * The method to get the API Response headers + * @returns {Map} The map containing the API Response headers + */ + getHeaders() { + + return this.headers; + } + + /** + * The method to get the API response HTTP status code. + * @returns {Integer} The integer containing the API response HTTP status code. + */ + getStatusCode() { + + return this.statusCode; + } + + /** + * The method to get the API response class instance. + * @returns {Object} The object containing the API response class instance. + */ + getObject() { + + return this.object; + } +} + +export { + APIResponse as APIResponse, + APIResponse as MasterModel +} diff --git a/versions/3.0.0/lib/routes/dc/au_data_center.js b/versions/3.0.0/lib/routes/dc/au_data_center.js new file mode 100644 index 0000000..232c3fd --- /dev/null +++ b/versions/3.0.0/lib/routes/dc/au_data_center.js @@ -0,0 +1,65 @@ +import {DataCenter} from "./data_center.js"; + +/** + * This class represents the properties of Zoho CRM in AU Domain. + * @extends DataCenter + */ +class AUDataCenter extends DataCenter { + + static _PRODUCTION; + + static _SANDBOX; + + static _DEVELOPER; + + static AU = new AUDataCenter(); + + /** + * This method represents the Zoho CRM Production environment in AU domain + * @returns {Environment} An instance of Environment + */ + static PRODUCTION() { + + if (this._PRODUCTION == null) { + this._PRODUCTION = DataCenter.setEnvironment("https://www.zohoapis.com.au", this.AU.getIAMUrl(), this.AU.getFileUploadUrl(), "au_prd"); + } + + return this._PRODUCTION; + } + + /** + * This method represents the Zoho CRM Sandbox environment in AU domain + * @returns {Environment} An instance of Environment + */ + static SANDBOX() { + if (this._SANDBOX == null) { + this._SANDBOX = DataCenter.setEnvironment("https://sandbox.zohoapis.com.au", this.AU.getIAMUrl(), this.AU.getFileUploadUrl(), "au_sdb"); + } + + return this._SANDBOX; + } + + /** + * This method represents the Zoho CRM Developer environment in AU domain + * @returns {Environment} An instance of Environment + */ + static DEVELOPER() { + if (this._DEVELOPER == null) { + this._DEVELOPER = DataCenter.setEnvironment("https://developer.zohoapis.com.au", this.AU.getIAMUrl(), this.AU.getFileUploadUrl(), "au_dev"); + } + + return this._DEVELOPER; + } + + getIAMUrl() { + return "https://accounts.zoho.com.au/oauth/v2/token"; + } + + getFileUploadUrl() { + return "https://content.zohoapis.com.au" + } +} +export { + AUDataCenter as AUDataCenter, + AUDataCenter as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/dc/cn_data_center.js b/versions/3.0.0/lib/routes/dc/cn_data_center.js new file mode 100644 index 0000000..27da141 --- /dev/null +++ b/versions/3.0.0/lib/routes/dc/cn_data_center.js @@ -0,0 +1,64 @@ +import {DataCenter} from "./data_center.js"; + +/** + * This class represents the properties of Zoho CRM in CN Domain. + */ +class CNDataCenter extends DataCenter { + + static _PRODUCTION; + + static _SANDBOX; + + static _DEVELOPER; + + static CN = new CNDataCenter(); + + /** + * This method represents the Zoho CRM Production environment in CN domain + * @returns {Environment} An instance of Environment + */ + static PRODUCTION() { + if (this._PRODUCTION == null) { + this._PRODUCTION = DataCenter.setEnvironment("https://www.zohoapis.com.cn", this.CN.getIAMUrl(), this.CN.getFileUploadUrl(), "cn_prd"); + } + + return this._PRODUCTION; + } + + /** + * This method represents the Zoho CRM Sandbox environment in CN domain + * @returns {Environment} An instance of Environment + */ + static SANDBOX() { + if (this._SANDBOX == null) { + this._SANDBOX = DataCenter.setEnvironment("https://sandbox.zohoapis.com.cn", this.CN.getIAMUrl(), this.CN.getFileUploadUrl(), "cn_sdb"); + } + + return this._SANDBOX; + } + + /** + * This method represents the Zoho CRM Developer environment in CN domain + * @returns {Environment} An instance of Environment + */ + static DEVELOPER() { + if (this._DEVELOPER == null) { + this._DEVELOPER = DataCenter.setEnvironment("https://developer.zohoapis.com.cn", this.CN.getIAMUrl(), this.CN.getFileUploadUrl(), "cn_dev"); + } + + return this._DEVELOPER; + } + + getIAMUrl() { + return "https://accounts.zoho.com.cn/oauth/v2/token"; + } + + getFileUploadUrl() { + return "https://content.zohoapis.com.cn" + } +} + +export { + CNDataCenter as CNDataCenter, + CNDataCenter as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/dc/data_center.js b/versions/3.0.0/lib/routes/dc/data_center.js new file mode 100644 index 0000000..9d9e554 --- /dev/null +++ b/versions/3.0.0/lib/routes/dc/data_center.js @@ -0,0 +1,119 @@ +import {Environment} from "./environment.js"; + +/** + * The abstract class represents the properties of Zoho CRM DataCenter. + */ +class DataCenter { + + /** + * This method to get accounts URL. URL to be used when calling an OAuth accounts. + * @returns A String representing the accounts URL. + */ + getIAMUrl() { } + + /** + * The method to get the File Upload URL + * @returns A String representing the File Upload URL. + */ + getFileUploadUrl() { } + + /** + * This method sets the environment to the calling DataCenter instance + * @param {string} url - A String representing the domain URL + * @param {string} accountsUrl - A String representing the accounts URL to fetch tokens. + * @param {string} fileUploadUrl - A String representing the File Upload URL + * @param {string} name - A string + */ + static setEnvironment(url, accountsUrl, fileUploadUrl, name) { + return new Environment(url, accountsUrl, fileUploadUrl, name); + } + + /** + * This method gets the environment based on the api_domain + * @param config - A string representing the api_domain + * @returns {Promise} + */ + + static async get(config){ + const USDataCenter = (await import("./us_data_center.js")).MasterModel; + const JPDataCenter = (await import("./jp_data_center.js")).MasterModel; + const INDataCenter = (await import("./in_data_center.js")).MasterModel; + const EUDataCenter = (await import("./eu_data_center.js")).MasterModel; + const CNDataCenter = (await import("./cn_data_center.js")).MasterModel; + const AUDataCenter = (await import("./au_data_center.js")).MasterModel; + const Constants = (await import("../../utils/util/constants.js")).MasterModel; + + if (Constants.US_DATACENTER.some(a => a === config)){ + if (config.includes(Constants.SANDBOX)) + { + return USDataCenter.SANDBOX(); + } + else if(config.includes(Constants.DEVELOPER)) + { + return USDataCenter.DEVELOPER(); + } + return USDataCenter.PRODUCTION(); + } + else if (Constants.JP_DATACENTER.some(a => a === config)){ + if (config.includes(Constants.SANDBOX)) + { + return JPDataCenter.SANDBOX(); + } + else if(config.includes(Constants.DEVELOPER)) + { + return JPDataCenter.DEVELOPER(); + } + return JPDataCenter.PRODUCTION(); + } + else if (Constants.IN_DATACENTER.some(a => a === config)){ + if (config.includes(Constants.SANDBOX)) + { + return INDataCenter.SANDBOX(); + } + else if(config.includes(Constants.DEVELOPER)) + { + return INDataCenter.DEVELOPER(); + } + return INDataCenter.PRODUCTION(); + } + else if (Constants.EU_DATACENTER.some(a => a === config)){ + if (config.includes(Constants.SANDBOX)) + { + return EUDataCenter.SANDBOX(); + } + else if(config.includes(Constants.DEVELOPER)) + { + return EUDataCenter.DEVELOPER(); + } + return EUDataCenter.PRODUCTION(); + } + else if (Constants.CN_DATACENTER.some(a => a === config)){ + if (config.includes(Constants.SANDBOX)) + { + return CNDataCenter.SANDBOX(); + } + else if(config.includes(Constants.DEVELOPER)) + { + return CNDataCenter.DEVELOPER(); + } + return CNDataCenter.PRODUCTION(); + } + else if (Constants.AU_DATACENTER.some(a => a === config)){ + if (config.includes(Constants.SANDBOX)) + { + return AUDataCenter.SANDBOX(); + } + else if(config.includes(Constants.DEVELOPER)) + { + return AUDataCenter.DEVELOPER(); + } + return AUDataCenter.PRODUCTION(); + } + return null; + } +} + +export { + DataCenter as DataCenter, + DataCenter as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/dc/environment.js b/versions/3.0.0/lib/routes/dc/environment.js new file mode 100644 index 0000000..cb6248f --- /dev/null +++ b/versions/3.0.0/lib/routes/dc/environment.js @@ -0,0 +1,68 @@ +/** + * This class represents the Zoho CRM environment. + */ +class Environment { + + url; + + accountsUrl; + + fileUploadUrl; + + name; + + /** + * Creates an Environment class instance with the specified parameters. + * @param {string} url - A String representing the domain URL + * @param {string} accountsUrl - A String representing the accounts URL to fetch tokens. + * @param {string} fileUploadUrl - A string representing the file Upload URL + * @param {string} name - A string + */ + constructor(url, accountsUrl, fileUploadUrl, name) { + + this.url = url; + + this.accountsUrl = accountsUrl; + + this.fileUploadUrl = fileUploadUrl; + + this.name = name; + } + + /** + * The method is used to get the Zoho CRM API URL. + * @returns {string} A String representing the Zoho CRM API URL. + */ + getUrl() { + return this.url; + } + + /** + * The method to get the Zoho CRM Accounts URL. + * @returns {string} A String representing the accounts URL. + */ + getAccountsUrl() { + return this.accountsUrl; + } + + /** + * The method to get the File Upload URL. + * @returns {string} A String representing the File Upload URL. + */ + getFileUploadUrl() { + return this.fileUploadUrl; + } + + /** + * This method to get name. + * @return {string} A string representing the name. + */ + getName() { + return this.name; + } +} + +export { + Environment as Environment, + Environment as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/dc/eu_data_center.js b/versions/3.0.0/lib/routes/dc/eu_data_center.js new file mode 100644 index 0000000..4de31ac --- /dev/null +++ b/versions/3.0.0/lib/routes/dc/eu_data_center.js @@ -0,0 +1,65 @@ +import {DataCenter} from "./data_center.js"; + +/** + * This class represents the properties of Zoho CRM in EU Domain. + * @extends DataCenter + */ +class EUDataCenter extends DataCenter { + + static _PRODUCTION; + + static _SANDBOX; + + static _DEVELOPER; + + static EU = new EUDataCenter(); + + /** + * This method represents the Zoho CRM Production environment in EU domain + * @returns {Environment} An instance of Environment + */ + static PRODUCTION() { + if (this._PRODUCTION == null) { + this._PRODUCTION = DataCenter.setEnvironment("https://www.zohoapis.eu", this.EU.getIAMUrl(), this.EU.getFileUploadUrl(), "eu_prd"); + } + + return this._PRODUCTION; + }; + + /** + * This method represents the Zoho CRM Sandbox environment in EU domain + * @returns {Environment} An instance of Environment + */ + static SANDBOX() { + if (this._SANDBOX == null) { + this._SANDBOX = DataCenter.setEnvironment("https://sandbox.zohoapis.eu", this.EU.getIAMUrl(), this.EU.getFileUploadUrl(), "eu_sdb"); + } + + return this._SANDBOX; + }; + + /** + * This method represents the Zoho CRM Developer environment in EU domain + * @returns {Environment} An instance of Environment + */ + static DEVELOPER() { + if (this._DEVELOPER == null) { + this._DEVELOPER = DataCenter.setEnvironment("https://developer.zohoapis.eu", this.EU.getIAMUrl(), this.EU.getFileUploadUrl(), "eu_dev"); + } + + return this._DEVELOPER; + }; + + getIAMUrl() { + return "https://accounts.zoho.eu/oauth/v2/token"; + } + + getFileUploadUrl() { + return "https://content.zohoapis.eu" + } +} + +export { + EUDataCenter as EUDataCenter, + EUDataCenter as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/dc/in_data_center.js b/versions/3.0.0/lib/routes/dc/in_data_center.js new file mode 100644 index 0000000..796c247 --- /dev/null +++ b/versions/3.0.0/lib/routes/dc/in_data_center.js @@ -0,0 +1,65 @@ +import {DataCenter} from "./data_center.js"; + +/** + * This class represents the properties of Zoho CRM in IN Domain. + * @extends DataCenter + */ +class INDataCenter extends DataCenter { + + static _PRODUCTION; + + static _SANDBOX; + + static _DEVELOPER; + + static IN = new INDataCenter(); + + /** + * This method represents the Zoho CRM Production environment in IN domain + * @returns {Environment} An instance of Environment + */ + static PRODUCTION() { + if (this._PRODUCTION == null) { + this._PRODUCTION = DataCenter.setEnvironment("https://www.zohoapis.in", this.IN.getIAMUrl(), this.IN.getFileUploadUrl(), "in_prd"); + } + + return this._PRODUCTION; + }; + + /** + * This method represents the Zoho CRM Sandbox environment in IN domain + * @returns {Environment} An instance of Environment + */ + static SANDBOX() { + if (this._SANDBOX == null) { + this._SANDBOX = DataCenter.setEnvironment("https://sandbox.zohoapis.in", this.IN.getIAMUrl(), this.IN.getFileUploadUrl(), "in_sdb"); + } + + return this._SANDBOX; + }; + + /** + * This method represents the Zoho CRM Developer environment in IN domain + * @returns {Environment} An instance of Environment + */ + static DEVELOPER() { + if (this._DEVELOPER == null) { + this._DEVELOPER = DataCenter.setEnvironment("https://developer.zohoapis.in", this.IN.getIAMUrl(), this.IN.getFileUploadUrl(), "in_dev"); + } + + return this._DEVELOPER; + }; + + getIAMUrl() { + return "https://accounts.zoho.in/oauth/v2/token"; + } + + getFileUploadUrl() { + return "https://content.zohoapis.in" + } +} + +export { + INDataCenter as INDataCenter, + INDataCenter as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/dc/jp_data_center.js b/versions/3.0.0/lib/routes/dc/jp_data_center.js new file mode 100644 index 0000000..e03bb08 --- /dev/null +++ b/versions/3.0.0/lib/routes/dc/jp_data_center.js @@ -0,0 +1,66 @@ +import {DataCenter} from "./data_center.js"; + +/** + * This class represents the properties of Zoho CRM in Japan Domain. + * @extends DataCenter + */ +class JPDataCenter extends DataCenter { + + static _PRODUCTION; + + static _SANDBOX; + + static _DEVELOPER; + + static JP = new JPDataCenter(); + + /** + * This method represents the Zoho CRM Production environment in Japan domain + * @returns {Environment} An instance of Environment + */ + static PRODUCTION() { + + if (this._PRODUCTION == null) { + this._PRODUCTION = DataCenter.setEnvironment("https://www.zohoapis.jp", this.JP.getIAMUrl(), this.JP.getFileUploadUrl(), "jp_prd"); + } + + return this._PRODUCTION; + } + + /** + * This method represents the Zoho CRM Sandbox environment in Japan domain + * @returns {Environment} An instance of Environment + */ + static SANDBOX() { + if (this._SANDBOX == null) { + this._SANDBOX = DataCenter.setEnvironment("https://sandbox.zohoapis.jp", this.JP.getIAMUrl(), this.JP.getFileUploadUrl(), "jp_sdb"); + } + + return this._SANDBOX; + } + + /** + * This method represents the Zoho CRM Developer environment in Japan domain + * @returns {Environment} An instance of Environment + */ + static DEVELOPER() { + if (this._DEVELOPER == null) { + this._DEVELOPER = DataCenter.setEnvironment("https://developer.zohoapis.jp", this.JP.getIAMUrl(), this.JP.getFileUploadUrl(), "jp_dev"); + } + + return this._DEVELOPER; + } + + getIAMUrl() { + return "https://accounts.zoho.jp/oauth/v2/token"; + } + + getFileUploadUrl() { + return "https://content.zohoapis.jp" + } +} + +export { + JPDataCenter as JPDataCenter, + JPDataCenter as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/dc/us_data_center.js b/versions/3.0.0/lib/routes/dc/us_data_center.js new file mode 100644 index 0000000..a212c67 --- /dev/null +++ b/versions/3.0.0/lib/routes/dc/us_data_center.js @@ -0,0 +1,64 @@ +import {DataCenter} from "./data_center.js"; + +/** + * This class represents the properties of Zoho CRM in US Domain. + */ +class USDataCenter extends DataCenter { + + static _PRODUCTION; + + static _SANDBOX; + + static _DEVELOPER; + + static US = new USDataCenter(); + + /** + * This method represents the Zoho CRM Production environment in US domain + * @returns {Environment} An instance of Environment + */ + static PRODUCTION() { + if (this._PRODUCTION == null) { + this._PRODUCTION = DataCenter.setEnvironment("https://www.zohoapis.com", this.US.getIAMUrl(), this.US.getFileUploadUrl(), "us_prd"); + } + + return this._PRODUCTION; + } + + /** + * This method represents the Zoho CRM Sandbox environment in US domain + * @returns {Environment} An instance of Environment + */ + static SANDBOX() { + if (this._SANDBOX == null) { + this._SANDBOX = DataCenter.setEnvironment("https://sandbox.zohoapis.com", this.US.getIAMUrl(), this.US.getFileUploadUrl(), "us_sdb"); + } + + return this._SANDBOX; + } + + /** + * This method represents the Zoho CRM Developer environment in US domain + * @returns {Environment} An instance of Environment + */ + static DEVELOPER() { + if (this._DEVELOPER == null) { + this._DEVELOPER = DataCenter.setEnvironment("https://developer.zohoapis.com", this.US.getIAMUrl(), this.US.getFileUploadUrl(), "us_dev"); + } + + return this._DEVELOPER; + } + + getIAMUrl() { + return "https://accounts.zoho.com/oauth/v2/token"; + } + + getFileUploadUrl() { + return "https://content.zohoapis.com" + } +} + +export { + USDataCenter as USDataCenter, + USDataCenter as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/header.js b/versions/3.0.0/lib/routes/header.js new file mode 100644 index 0000000..d80f1fc --- /dev/null +++ b/versions/3.0.0/lib/routes/header.js @@ -0,0 +1,35 @@ +/** + * This class represents the HTTP header. + */ +class Header { + _name; + _className; + + /** + * Creates a Header class instance with the specified header name. + * @param {string} name - A String containing the header name. + * @param {string|null} className - A String containing the class name. + */ + constructor(name, className = null) { + this._name = name; + this._className = className; + } + + /** + * This is a getter method to get the header name. + * @returns A String representing the header name. + */ + getName() { + return this._name; + } + + /** + * This is a getter method to get the class name. + * @returns A String representing the class name. + */ + getClassName() { + return this._className; + } +} + +export { Header as Header, Header as MasterModel }; diff --git a/versions/3.0.0/lib/routes/header_map.js b/versions/3.0.0/lib/routes/header_map.js new file mode 100644 index 0000000..607797a --- /dev/null +++ b/versions/3.0.0/lib/routes/header_map.js @@ -0,0 +1,90 @@ +import {HeaderParamValidator} from "../utils/util/header_param_validator.js"; + +import {SDKException} from "../core/com/zoho/crm/api/exception/sdk_exception.js"; + +import {Constants} from "../utils/util/constants.js"; + +import {DatatypeConverter} from "../utils/util/datatype_converter.js"; + +/** + * This class represents the HTTP header name and value. + */ +class HeaderMap { + headerMap = new Map(); + + /** + * This is a getter method to get the header map. + * @returns {Map} A Map representing the API request headers. + */ + getHeaderMap() { + return this.headerMap; + } + + setHeaderMap(headerMap) + { + this.headerMap = headerMap; + } + + /** + * The method to add the header name and value. + * @param {Header} header - A Header class instance. + * @param {object} value - An object containing the header value. + * @throws {SDKException} + */ + async add(header, value) { + + if (header == null) { + throw new SDKException(Constants.HEADER_NULL_ERROR, Constants.HEADER_INSTANCE_NULL_ERROR); + } + var headerName = header.getName(); + + if (headerName == null) { + throw new SDKException(Constants.HEADER_NAME_NULL_ERROR, Constants.HEADER_NAME_NULL_ERROR_MESSAGE); + } + + if (value == null) { + throw new SDKException(Constants.HEADER_NULL_ERROR, headerName + Constants.NULL_VALUE_ERROR_MESSAGE); + } + + var headerClassName = header.getClassName(); + + var parsedHeaderValue = null; + + if (headerClassName != null) { + let headerParamValidator = new HeaderParamValidator(); + + parsedHeaderValue = await headerParamValidator.validate(header, value).catch(err=> { throw err;}); + } + else + { + try { + parsedHeaderValue = DatatypeConverter.postConvert(value, value.getClassName()); + } + catch (err) + { + parsedHeaderValue = value; + } + } + if (parsedHeaderValue === true || parsedHeaderValue === false) + { + parsedHeaderValue = JSON.stringify(parsedHeaderValue); + } + + if (this.headerMap.has(headerName) && this.headerMap.get(headerName) != null) { + let headerValue = this.headerMap.get(headerName); + + headerValue = headerValue.concat(",", parsedHeaderValue.toString()); + + this.headerMap.set(headerName, headerValue); + + } + else { + this.headerMap.set(headerName, parsedHeaderValue.toString()); + } + } +} + +export { + HeaderMap as HeaderMap, + HeaderMap as MasterModel +} diff --git a/versions/3.0.0/lib/routes/initialize_builder.js b/versions/3.0.0/lib/routes/initialize_builder.js new file mode 100644 index 0000000..7618f5b --- /dev/null +++ b/versions/3.0.0/lib/routes/initialize_builder.js @@ -0,0 +1,279 @@ + +import { Constants } from "../utils/util/constants.js"; + +import { Utility } from "../utils/util/utility.js"; + +import { SDKException } from "../core/com/zoho/crm/api/exception/sdk_exception.js"; + +import { Token } from "../models/authenticator/token.js"; + +import { TokenStore } from "../models/authenticator/store/token_store.js"; + +import { SDKConfig } from "./sdk_config.js"; + +import { Environment } from "./dc/environment.js"; + +import { Initializer } from "./initializer.js"; + +import { statSync } from "fs"; + +import { join } from "path"; + +import { Logger, Levels } from "./logger/logger.js"; + +import { LogBuilder } from "./logger/log_builder.js"; + +import { SDKConfigBuilder } from "./sdk_config_builder.js"; + +import { FileStore } from "../models/authenticator/store/file_store.js"; + +import { RequestProxy } from "./request_proxy.js"; + +import * as url from "url"; + +const __dirname = url.fileURLToPath(new URL(".",import.meta.url)); + +class InitializeBuilder { + _environment; + + _store; + + _token; + + _resourcePath; + + _requestProxy; + + _sdkConfig; + + _logger; + + errorMessage; + + initializer; + + constructor() { + return (async () => { + this.initializer = await Initializer.getInitializer().catch(err=>{throw err;}); + + this.errorMessage = + (await this.initializer) != null + ? Constants.SWITCH_USER_ERROR + : Constants.INITIALIZATION_ERROR; + + if (this.initializer != null) + { + this._environment = await this.initializer.getEnvironment(); + + this._token = await this.initializer.getToken(); + + this._sdkConfig = await this.initializer.getSDKConfig(); + } + return this; + })(); + } + + async initialize() { + Utility.assertNotNull( + this._token, + this.errorMessage, + Constants.TOKEN_ERROR_MESSAGE + ); + + if (this._store == null) { + this._store = new FileStore( + join(__dirname, "../../../../../", Constants.TOKEN_FILE) + ); + } + + if (this._sdkConfig == null) { + this._sdkConfig = new SDKConfigBuilder().build(); + } + + if (this._resourcePath == null) { + this._resourcePath = join(__dirname, "../../../../../", ""); + } + + if (this._logger == null) { + this._logger = new LogBuilder() + .level(Levels.INFO) + .filePath(null) + .build(); + } + + await Initializer.initialize( + this._environment, + this._token, + this._store, + this._sdkConfig, + this._resourcePath, + this._logger, + this._requestProxy + ); + } + + switchUser() { + Utility.assertNotNull( + Initializer.getInitializer(), + Constants.SDK_UNINITIALIZATION_ERROR, + Constants.SDK_UNINITIALIZATION_MESSAGE + ); + + Initializer.switchUser( + this._environment, + this._token, + this._sdkConfig, + this._requestProxy + ); + } + + logger(logger) { + if (logger != null && !(logger instanceof Logger)) { + let error = {}; + + error[Constants.ERROR_HASH_FIELD] = Constants.LOGGER; + + error[Constants.ERROR_HASH_EXPECTED_TYPE] = Logger.name; + + throw new SDKException( + Constants.INITIALIZATION_ERROR, + Constants.INITIALIZATION_EXCEPTION, + error + ); + } + + this._logger = logger; + + return this; + } + + token(token) { + Utility.assertNotNull( + token, + this.errorMessage, + Constants.TOKEN_ERROR_MESSAGE + ); + + if (!(token instanceof Token)) { + let error = {}; + + error[Constants.ERROR_HASH_FIELD] = Constants.TOKEN; + + error[Constants.ERROR_HASH_EXPECTED_TYPE] = Token.name; + + throw new SDKException( + Constants.INITIALIZATION_ERROR, + Constants.INITIALIZATION_EXCEPTION, + error + ); + } + + this._token = token; + + return this; + } + + SDKConfig(sdkConfig) { + if (sdkConfig != null && !(sdkConfig instanceof SDKConfig)) { + let error = {}; + + error[Constants.ERROR_HASH_FIELD] = Constants.SDK_CONFIG; + + error[Constants.ERROR_HASH_EXPECTED_TYPE] = SDKConfig.name; + + throw new SDKException( + Constants.INITIALIZATION_ERROR, + Constants.INITIALIZATION_EXCEPTION, + error + ); + } + + this._sdkConfig = sdkConfig; + + return this; + } + + requestProxy(requestProxy) { + if (requestProxy != null && !(requestProxy instanceof RequestProxy)) { + let error = {}; + + error[Constants.ERROR_HASH_FIELD] = Constants.REQUEST_PROXY; + + error[Constants.ERROR_HASH_EXPECTED_TYPE] = RequestProxy.name; + + throw new SDKException( + Constants.INITIALIZATION_ERROR, + Constants.INITIALIZATION_EXCEPTION, + error + ); + } + + this._requestProxy = requestProxy; + + return this; + } + + resourcePath(resourcePath) { + if (resourcePath != null && !statSync(resourcePath).isDirectory()) { + throw new SDKException( + this.errorMessage, + Constants.RESOURCE_PATH_INVALID_ERROR_MESSAGE + ); + } + + this._resourcePath = resourcePath; + + return this; + } + + store(store) { + if (store != null && !(store instanceof TokenStore)) { + let error = {}; + + error[Constants.ERROR_HASH_FIELD] = Constants.STORE; + + error[Constants.ERROR_HASH_EXPECTED_TYPE] = Store.name; + + throw new SDKException( + Constants.INITIALIZATION_ERROR, + Constants.INITIALIZATION_EXCEPTION, + error + ); + } + + this._store = store; + + return this; + } + + environment(environment) { + Utility.assertNotNull( + environment, + this.errorMessage, + Constants.ENVIRONMENT_ERROR_MESSAGE + ); + + if (!(environment instanceof Environment)) { + let error = {}; + + error[Constants.ERROR_HASH_FIELD] = Constants.ENVIRONMENT; + + error[Constants.ERROR_HASH_EXPECTED_TYPE] = Environment.name; + + throw new SDKException( + Constants.INITIALIZATION_ERROR, + Constants.INITIALIZATION_EXCEPTION, + error + ); + } + + this._environment = environment; + + return this; + } +} + +export { + InitializeBuilder as InitializeBuilder, + InitializeBuilder as MasterModel +} diff --git a/versions/3.0.0/lib/routes/initializer.js b/versions/3.0.0/lib/routes/initializer.js new file mode 100644 index 0000000..ab3e10a --- /dev/null +++ b/versions/3.0.0/lib/routes/initializer.js @@ -0,0 +1,327 @@ +/** + Copyright (c) 2021, ZOHO CORPORATION PRIVATE LIMITED + All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + **/ + +import pkg from "winston"; +let Logger = pkg; +import * as fs from 'fs'; +import * as path from "path"; +import { Constants } from '../utils/util/constants.js'; +import { SDKLogger } from './logger/sdk_logger.js'; +import { SDKException } from '../core/com/zoho/crm/api/exception/sdk_exception.js'; +import * as url from 'url'; +const __filename = url.fileURLToPath(import.meta.url); +const __dirname = url.fileURLToPath(new URL('.', import.meta.url)); +import { OAuthToken } from "../models/authenticator/oauth_token.js"; +import {unlinkSync} from "fs"; + + +/** + * The class to initialize Zoho CRM SDK. + */ +class Initializer { + static LOCAL = new Map(); + + static initializer; + + _environment; + + _store; + + _token; + + static jsonDetails; + + _resourcePath; + + _requestProxy; + + _sdkConfig; + + /** + * The method is to initialize the SDK. + * @param {Environment} environment - A Environment class instance containing the CRM API base URL and Accounts URL. + * @param {Token} token - A Token class instance containing the OAuth client application information. + * @param {TokenStore} store - A TokenStore class instance containing the token store information. + * @param {SDKConfig} sdkConfig - A SDKConfig class instance containing the configuration. + * @param {String} resourcePath - A String containing the absolute directory path to store user specific JSON files containing module fields information. + * @param {Logger} logger - A Logger class instance containing the log file path and Logger type. + * @param {RequestProxy} proxy - A RequestProxy class instance containing the proxy properties of the user. + * @throws {SDKException} + */ + static async initialize(environment, token, store, sdkConfig, resourcePath, logger = null, proxy = null) { + try { + SDKLogger.initialize(logger); + + try { + if (Initializer.jsonDetails == null) { + Initializer.jsonDetails = Initializer.getJSON(path.join(__dirname, "..", Constants.CONFIG_DIRECTORY, Constants.JSON_DETAILS_FILE_PATH)); + } + } + catch (ex) { + throw new SDKException(Constants.JSON_DETAILS_ERROR, null, null, ex); + } + + let initializer = new Initializer(); + + initializer._environment = environment; + + initializer._store = store; + + initializer._sdkConfig = sdkConfig; + + initializer._resourcePath = resourcePath; + + initializer._requestProxy = proxy; + + Initializer.initializer = initializer; + + initializer._token = token; + + if (token != null && token instanceof OAuthToken) + { + await token.generateToken().catch((err) => {throw err}); + } + initializer._token = token; + + Initializer.initializer = initializer; + + Initializer.LOCAL.set(await initializer.getEncodedKey(), initializer); + + Logger.info(Constants.INITIALIZATION_SUCCESSFUL.concat(Initializer.initializer.getEnvironment().getUrl())); + + } catch (err) { + if (!(err instanceof SDKException)) { + err = new SDKException(Constants.INITIALIZATION_EXCEPTION, null, null, err); + } + + throw err; + } + } + + /** + * This method to get record field and class details. + * @param filePath A String containing the file path. + * @returns A JSON representing the class information details. + */ + static getJSON(filePath) { + + let fileData = fs.readFileSync(filePath); + + return JSON.parse(fileData); + } + + /** + * This method is to get Initializer class instance. + * @returns A Initializer class instance representing the SDK configuration details. + */ + static async getInitializer() { + if (Array.from(Initializer.LOCAL.keys()).length > 0) { + let initializer = new Initializer(); + + let encodedKey = await initializer.getEncodedKey().catch(err => {throw err;}); + + if (Initializer.LOCAL.has(encodedKey)) { + return Initializer.LOCAL.get(encodedKey); + } + } + return Initializer.initializer; + } + + /** + * This method is to switch the different user in SDK environment. + * @param {Environment} environment - A Environment class instance containing the CRM API base URL and Accounts URL. + * @param {Token} token - A Token class instance containing the OAuth client application information. + * @param {SDKConfig} sdkConfig - A SDKConfig instance representing the configuration + * @param {RequestProxy} proxy - A RequestProxy class instance containing the proxy properties. + */ + static async switchUser(environment, token, sdkConfig, proxy = null) { + let initializer = new Initializer(); + + initializer._environment = environment; + + initializer._token = token; + + initializer._store = Initializer.initializer.getStore(); + + initializer._sdkConfig = sdkConfig; + + initializer._requestProxy = proxy; + + initializer._resourcePath = Initializer.initializer.getResourcePath(); + + if (token != null) + { + token.generateToken(); + } + initializer._token = token; + + Initializer.LOCAL.set(await initializer.getEncodedKey().catch(err => {throw err;}), initializer); + + Initializer.initializer = initializer; + + Logger.info(Constants.INITIALIZATION_SWITCHED.concat(Initializer.initializer.toString())) + } + + /** + * This is a getter method to get API environment. + * @returns A Environment representing the API environment. + */ + getEnvironment() { + return this._environment; + } + + /** + * This is a getter method to get Token Store. + * @returns A TokenStore class instance containing the token store information. + */ + getStore() { + return this._store; + } + + /** + * This is a getter method to get Proxy information. + * @returns {RequestProxy} A RequestProxy class instance representing the API Proxy information. + */ + getRequestProxy() { + return this._requestProxy; + } + + /** + * This is a getter method to get OAuth client application information. + * @returns A Token class instance representing the OAuth client application information. + */ + getToken() { + return this._token; + } + + /** + * This is a getter method to get resourcePath value. + * @returns A String value representing the resourcePath. + */ + getResourcePath() { + return this._resourcePath; + } + + /** + * This is a getter method to get the SDK Configuration + * @returns {SDKConfig} A SDKConfig instance representing the configuration + */ + getSDKConfig() { + return this._sdkConfig; + } + + static async removeUserConfiguration(token) { + let initializer = new Initializer(); + + if (token instanceof OAuthToken) + { + if (token.getId() == Initializer.initializer.getToken().getId()) + { + let key = initializer.getEncodedKey(); + if (Initializer.LOCAL.has(key)) + { + Initializer.LOCAL.delete(key); + } + else + { + let exception = new SDKException(null, Constants.USER_NOT_FOUND_ERROR_MESSAGE); + + Logger.info(Constants.USER_NOT_FOUND_ERROR, exception); + + throw exception; + } + } + } + } + async getEncodedKey() { + let initializer = Initializer.initializer; + + let token = initializer.getToken(); + + let key; + + if (token instanceof OAuthToken) + { + let oauthToken = token; + + let refreshToken = oauthToken.getRefreshToken(); + + if (refreshToken != null && refreshToken.length > 0) + { + key = refreshToken.substring(refreshToken.length - 32); + } + else + { + let accessToken = oauthToken.getAccessToken(); + + if (accessToken != null && accessToken.length > 0) + { + key = accessToken.substring(accessToken.length - 32); + } + } + } + let tokenKey = Initializer.initializer.getEnvironment().getUrl(); + + if (key != null && key.length > 0) + { + tokenKey = tokenKey + key; + } + return Buffer.from(this.toUTF8Array(key)).toString('base64'); + } + + + async toString() { + return (Constants.IN_ENVIRONMENT).concat((await Initializer.initializer)._environment.getUrl()).concat("."); + } + + toUTF8Array(str) { + var utf8 = []; + + for (var i = 0; i < str.length; i++) { + var charcode = str.charCodeAt(i); + + if (charcode < 0x80) utf8.push(charcode); + else if (charcode < 0x800) { + utf8.push(0xc0 | (charcode >> 6), + 0x80 | (charcode & 0x3f)); + } + else if (charcode < 0xd800 || charcode >= 0xe000) { + utf8.push(0xe0 | (charcode >> 12), + 0x80 | ((charcode >> 6) & 0x3f), + 0x80 | (charcode & 0x3f)); + } + else { + i++; + // UTF-16 encodes 0x10000-0x10FFFF by + // subtracting 0x10000 and splitting the + // 20 bits of 0x0-0xFFFFF into two halves + charcode = 0x10000 + (((charcode & 0x3ff) << 10) + | (str.charCodeAt(i) & 0x3ff)); + + utf8.push(0xf0 | (charcode >> 18), + 0x80 | ((charcode >> 12) & 0x3f), + 0x80 | ((charcode >> 6) & 0x3f), + 0x80 | (charcode & 0x3f)); + } + } + return utf8; + } +} +export { + Initializer as Initializer, + Initializer as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/logger/log_builder.js b/versions/3.0.0/lib/routes/logger/log_builder.js new file mode 100644 index 0000000..4a83401 --- /dev/null +++ b/versions/3.0.0/lib/routes/logger/log_builder.js @@ -0,0 +1,28 @@ +import {Logger} from "./logger.js"; + +class LogBuilder { + _level; + + _filePath; + + level(level) { + this._level = level; + + return this; + } + + filePath(filePath) { + this._filePath = filePath; + + return this; + } + + build() { + return Logger.getInstance(this._level, this._filePath); + } +} + +export { + LogBuilder as LogBuilder, + LogBuilder as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/logger/logger.js b/versions/3.0.0/lib/routes/logger/logger.js new file mode 100644 index 0000000..7c28099 --- /dev/null +++ b/versions/3.0.0/lib/routes/logger/logger.js @@ -0,0 +1,55 @@ +/** + * This class represents the Logger level and the file path. + */ +class Logger { + level; + filePath; + + constructor(level, filePath) { + this.level = level; + this.filePath = filePath; + } + + /** + * Creates an Logger class instance with the specified log level and file path. + * @param {Levels} level A Levels class member containing log level. + * @param {String} filePath A string containing absolute file path to write logs. + */ + static getInstance(level, filePath) { + return new Logger(level, filePath) + } + + /** + * The method to get the logger level + * @returns {String} A string representing the Log level. + */ + getLevel() { + return this.level; + } + + /** + * The method to get the logger filepath + * @returns {String} A string representing the Log filepath + */ + getFilePath() { + return this.filePath; + } +} + +/** + * This class represents the possible logger levels + */ +class Levels { + static INFO = 'info'; + static DEBUG = 'debug'; + static WARN = 'warn'; + static VERBOSE = 'verbose'; + static ERROR = 'error'; + static SILLY = 'silly'; +} +export { + Levels as Levels, + Logger as LoggerFile, + Logger as Logger + +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/logger/sdk_logger.js b/versions/3.0.0/lib/routes/logger/sdk_logger.js new file mode 100644 index 0000000..a8c7173 --- /dev/null +++ b/versions/3.0.0/lib/routes/logger/sdk_logger.js @@ -0,0 +1,52 @@ +import pkg from "winston"; + +/** + * The class to initialize the SDK logger. + */ +class SDKLogger { + + constructor(loggerInstance) { + let winston = pkg; + if (loggerInstance.getFilePath() == null || loggerInstance.getFilePath == "") + { + winston.configure({ + silent : true, + + transports: [ + new winston.transports.Console({ + silent: true + }) + ] + }); + } + else { + winston.configure({ + + level: loggerInstance.level, + + format: winston.format.combine( + winston.format.timestamp({format: 'YYYY-MM-DD HH:mm:ss'}), + winston.format.prettyPrint() + ), + transports: [ + new winston.transports.File({ + filename: loggerInstance.getFilePath() + }) + ] + }); + } + } + /** + * The method to initialize SDKLogger + * @param {Logger} loggerInstance A Logger class instance + */ + static initialize(loggerInstance) { + return new SDKLogger(loggerInstance); + } +} + + +export { + SDKLogger as SDKLogger, + SDKLogger as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/middlewares/common_api_handler.js b/versions/3.0.0/lib/routes/middlewares/common_api_handler.js new file mode 100644 index 0000000..3615edf --- /dev/null +++ b/versions/3.0.0/lib/routes/middlewares/common_api_handler.js @@ -0,0 +1,535 @@ +import { SDKException } from "../../core/com/zoho/crm/api/exception/sdk_exception.js"; + +import { Constants } from "../../utils/util/constants.js"; + +import { APIHTTPConnector } from "../controllers/api_http_connector.js"; + +import { Header } from "../header.js"; + +import { HeaderMap } from "../header_map.js"; + +import { Initializer } from "../initializer.js"; + +import { Param } from "../param.js"; + +import { ParameterMap } from "../parameter_map.js"; + +import pkg from "winston"; + +let Logger = pkg; + +import * as path from "path"; + +import * as os from "os"; + +import { APIResponse } from "../controllers/api_response.js"; + +import { JSONConverter } from "../../utils/util/json_converter.js"; + +import { XMLConverter } from "../../utils/util/xml_converter.js"; + +import { FormDataConverter } from "../../utils/util/form_data_converter.js"; + +import { Downloader } from "../../utils/util/downloader.js"; + +import { Converter } from "../../utils/util/converter.js"; + + +/** + * This class is to process the API request and its response. + * Construct the objects that are to be sent as parameters or in the request body with the API. + * The Request parameter, header and body objects are constructed here. + * Process the response JSON and converts it to relevant objects in the library. + */ +class CommonAPIHandler { + apiPath; + + param = new ParameterMap(); + + header = new HeaderMap(); + + request; + + httpMethod; + + moduleAPIName; + + contentType; + + categoryMethod; + + mandatoryChecker; + + /** + * This is a setter method to set an API request content type. + * @param {string} contentType - A String containing the API request content type. + */ + setContentType(contentType) { + this.contentType = contentType; + } + + /** + * This is a setter method to set the API request URL. + * @param {string} apiPath - A String containing the API request URL. + */ + setAPIPath(apiPath) { + this.apiPath = apiPath; + } + + /** + * This method is to add an API request parameter. + * @param {Param} paramInstance - A Param instance containing the API request parameter. + * @param {object} paramValue - An object containing the API request parameter value. + * @throws {SDKException} + */ + async addParam(paramInstance, paramValue) { + if (paramValue == null) { + return; + } + + if (this.param == null) { + this.param = new ParameterMap(); + } + + await this.param.add(paramInstance, paramValue); + } + + /** + * This method is to add an API request header. + * @param {Header} headerInstance - A Header instance containing the API request header. + * @param {object} headerValue - An object containing the API request header value. + * @throws {SDKException} + */ + async addHeader(headerInstance, headerValue) { + if (headerValue == null) { + return; + } + + if (this.header == null) { + this.header = new HeaderMap(); + } + + await this.header.add(headerInstance, headerValue); + } + + /** + * This is a setter method to set the API request parameter map. + * @param {ParameterMap} param - A ParameterMap class instance containing the API request parameter. + */ + setParam(param) { + if (param == null) { + return; + } + + if ( + this.param.getParameterMap() != null && + this.param.getParameterMap().size > 0 + ) { + for (let key of param.getParameterMap().keys()) { + this.param.getParameterMap().set(key, param.getParameterMap().get(key)); + } + } else { + this.param = param; + } + } + + /** + * This is a getter method to get the Zoho CRM module API name. + * @returns A String representing the Zoho CRM module API name. + */ + getModuleAPIName() { + return this.moduleAPIName; + } + + /** + * This is a setter method to set the Zoho CRM module API name. + * @param {string} moduleAPIName - A String containing the Zoho CRM module API name. + */ + setModuleAPIName(moduleAPIName) { + this.moduleAPIName = moduleAPIName; + } + + /** + * This is a setter method to set the API request header map. + * @param {HeaderMap} header - A HeaderMap class instance containing the API request header. + */ + setHeader(header) { + if (header == null) { + return; + } + + if ( + this.header.getHeaderMap() != null && + this.header.getHeaderMap().size > 0 + ) { + for (let key of header.getHeaderMap().keys()) { + this.header.getHeaderMap().set(key, header.getHeaderMap().get(key)); + } + } else { + this.header = header; + } + } + + /** + * This is a setter method to set the API request body object. + * @param {object} request - An Object containing the API request body object. + */ + setRequest(request) { + this.request = request; + } + + /** + * This is a setter method to set the HTTP API request method. + * @param {string} httpMethod - A String containing the HTTP API request method. + */ + setHttpMethod(httpMethod) { + this.httpMethod = httpMethod; + } + + /** + * This method is used in constructing API request and response details. To make the Zoho CRM API calls. + * @param {class} className - A Class containing the method return type. + * @param {string} encodeType - A String containing the expected API response content type. + * @see APIHTTPConnector + * @returns {APIResponse} An instance of APIResponse representing the Zoho CRM API response + * @throws {SDKException} + */ + async apiCall(className, encodeType) { + let initializer = await Initializer.getInitializer(); + + if (initializer == null) { + throw new SDKException( + Constants.SDK_UNINITIALIZATION_ERROR, + Constants.SDK_UNINITIALIZATION_MESSAGE + ); + } + + var connector = new APIHTTPConnector(); + + try { + await this.setAPIUrl(connector).catch((err) => { + throw err; + }); + } catch (error) { + if (!(error instanceof SDKException)) { + error = new SDKException(null, null, null, error); + } + + Logger.error(Constants.SET_API_URL_EXCEPTION, error); + + throw error; + } + + connector.setRequestMethod(this.httpMethod); + + connector.setContentType(this.contentType); + + if (this.header != null && this.header.getHeaderMap().size > 0) { + connector.setHeaders(this.header.getHeaderMap()); + } + + if (this.param != null && this.param.getParameterMap().size > 0) { + connector.setParams(this.param.getParameterMap()); + } + + try { + await initializer.getToken().authenticate(connector); + } catch (error) { + if (!(error instanceof SDKException)) { + error = new SDKException(null, null, null, error); + } + + Logger.error(Constants.AUTHENTICATION_EXCEPTION, error); + + throw error; + } + + className = className.replace(/\\/g, "/"); + + let baseName = className.split("/"); + + let fileName = path.basename(className).split(".").slice(0, -1).join("."); + + let index = baseName.indexOf(Constants.CORE); + + let packageNames = baseName.slice(index, baseName.length - 1); + + packageNames.push(fileName); + + var pack = packageNames.join("/"); + + var returnObject = null; + + var converterInstance = null; + + if ( + this.contentType != null && + Constants.IS_GENERATE_REQUEST_BODY.includes(this.httpMethod.toUpperCase()) + ) { + let requestObject = null; + + let baseName = pack.split("/"); + + baseName.pop(); + + try { + converterInstance = this.getConverterClassInstance( + this.contentType.toLowerCase() + ); + + var className = converterInstance.getFileName( + this.request.constructor.name + ); + + baseName.push(className); + + requestObject = await converterInstance + .formRequest(this.request, baseName.join("/"), null, null) + .catch((err) => { + throw err; + }); + } catch (error) { + if (!(error instanceof SDKException)) { + error = new SDKException(null, null, null, error); + } + + Logger.error(Constants.FORM_REQUEST_EXCEPTION, error); + + throw error; + } + + connector.setRequestBody(requestObject); + } + + try { + connector.headers.set( + Constants.ZOHO_SDK, + os.platform() + + "/" + + os.release() + + "/nodejs-5.0/" + + process.version + + ":" + + Constants.SDK_VERSION + ); + + let response = await connector + .fireRequest(converterInstance) + .catch((err) => { + throw err; + }); + + let headerMap = await this.getHeaders(response.headers).catch(err=>{throw err;}); + + if ( + response.headers.hasOwnProperty( + Constants.CONTENT_TYPE_HEADER.toLowerCase() + ) + ) { + let contentTypeHeader = + response.headers[Constants.CONTENT_TYPE_HEADER.toLowerCase()]; + + let contentType = contentTypeHeader.split(";")[0]; + + converterInstance = this.getConverterClassInstance( + contentType.toLowerCase() + ); + + returnObject = await converterInstance + .getWrappedResponse(response, pack) + .catch((err) => { + throw err; + }); + } else { + Logger.info(Constants.API_ERROR_RESPONSE + response.statusCode.toString()); + } + + return new APIResponse(headerMap, response.statusCode, returnObject); + } catch (error) { + if (!(error instanceof SDKException)) { + error = new SDKException(null, null, null, error); + } + + Logger.error(Constants.API_CALL_EXCEPTION, error); + + throw error; + } + } + + async getHeaders(headers) { + let headerMap = new Map(); + + if (Object.keys(headers).length > 0) { + for (let key in headers) { + headerMap.set(key, headers[key]); + } + } + + return headerMap; + } + + /** + * This method is used to get a Converter class instance. + * @param {string} encodeType - A String containing the API response content type. + * @returns A Converter class instance. + */ + getConverterClassInstance(encodeType) { + var type = null; + + switch (encodeType) { + case "application/json": + case "text/plain": + case "application/ld+json": + type = new JSONConverter(this); + break; + case "application/xml": + case "text/xml": + type = new XMLConverter(this); + break; + case "multipart/form-data": + type = new FormDataConverter(this); + break; + case "image/png": + case "image/jpeg": + case "image/gif": + case "image/tiff": + case "image/tif": + case "image/svg+xml": + case "image/bmp": + case "image/webp": + case "text/csv": + case "text/html": + case "text/css": + case "text/javascript": + case "text/calendar": + case "application/x-download": + case "application/zip": + case "application/pdf": + case "application/java-archive": + case "application/javascript": + case "application/octet-stream": + case "application/xhtml+xml": + case "application/x-bzip": + case "application/msword": + case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": + case "application/gzip": + case "application/x-httpd-php": + case "application/vnd.ms-powerpoint": + case "application/vnd.rar": + case "application/x-sh": + case "application/x-tar": + case "application/vnd.ms-excel": + case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": + case "application/x-7z-compressed": + case "audio/mpeg": + case "audio/x-ms-wma": + case "audio/vnd.rn-realaudio": + case "audio/x-wav": + case "audio/3gpp": + case "audio/3gpp2": + case "video/mpeg": + case "video/mp4": + case "video/webm": + case "video/3gpp": + case "video/3gpp2": + case "font/ttf": + type = new Downloader(this); + break; + } + + return type; + } + + async setAPIUrl(connector) { + var apiPath = ""; + + let initializer = await Initializer.getInitializer(); + + if (this.apiPath.toString().includes(Constants.HTTP)) { + if (this.apiPath.toString().includes(Constants.CONTENT_API_URL)) { + apiPath = apiPath.concat( + initializer.getEnvironment().getFileUploadUrl() + ); + + try { + const myURL = new URL(this.apiPath); + + apiPath = apiPath.concat(myURL.pathname); + } catch (error) { + throw new SDKException( + Constants.INVALID_URL_ERROR, + null, + null, + error + ); + } + } else { + if (this.apiPath.substring(0, 1) == "/") { + this.apiPath = this.apiPath.substring(1); + } + + apiPath = apiPath.concat(this.apiPath); + } + } else { + apiPath = apiPath.concat(initializer.getEnvironment().getUrl()); + + apiPath = apiPath.concat(this.apiPath); + } + + connector.url = apiPath; + } + + /** + * This is a getter method to get mandatoryChecker + * @returns {Boolean} - A Boolean value representing mandatoryChecker + */ + isMandatoryChecker() { + return this.mandatoryChecker; + } + + /** + * This is a setter method to set mandatoryChecker + * @param {Bool} mandatoryChecker - A Boolean value + */ + setMandatoryChecker(mandatoryChecker) { + this.mandatoryChecker = mandatoryChecker; + } + + /** + * This is a getter method to get the HTTP API request method. + * @returns {string} A String containing the HTTP API request method. + */ + getHttpMethod() { + return this.httpMethod; + } + + /** + * This is a getter method to get categoryMethod + * @returns {String} - A String value representing categoryMethod + */ + getCategoryMethod() { + return this.categoryMethod; + } + + /** + * This is a setter method to set categoryMethod + * @param {String} categoryMethod - A String value representing categoryMethod + */ + setCategoryMethod(categoryMethod) { + this.categoryMethod = categoryMethod; + } + + /** + * This is a getter method to get the API request URL. + * @returns {String} A String containing the API request URL. + */ + getAPIPath() { + return this.apiPath; + } +} + + +export { + CommonAPIHandler as CommonAPIHandler, + CommonAPIHandler as MasterModel +} diff --git a/versions/3.0.0/lib/routes/param.js b/versions/3.0.0/lib/routes/param.js new file mode 100644 index 0000000..7e320bc --- /dev/null +++ b/versions/3.0.0/lib/routes/param.js @@ -0,0 +1,40 @@ +/** + * This class represents the HTTP parameter. + */ +class Param { + + _name; + + _className; + + /** + * Creates an Param class instance with the specified parameter name. + * @param {string} name - A String containing the parameter name. + * @param {string|null} className - A String containing the class name. + */ + constructor(name, className = null) { + this._name = name; + this._className = className; + } + + /** + * This is a getter method to get parameter name. + * @returns {string} A String representing the parameter name. + */ + getName() { + return this._name; + } + + /** + * This is a getter method to get class name. + * @returns {string} A String representing the class name. + */ + getClassName() { + return this._className; + } +} + +export { + Param as Param, + Param as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/parameter_map.js b/versions/3.0.0/lib/routes/parameter_map.js new file mode 100644 index 0000000..6138dac --- /dev/null +++ b/versions/3.0.0/lib/routes/parameter_map.js @@ -0,0 +1,76 @@ +import {HeaderParamValidator} from "../utils/util/header_param_validator.js"; + +import {SDKException} from "../core/com/zoho/crm/api/exception/sdk_exception.js"; + +import {Constants} from "../utils/util/constants.js"; + +/** + * This class represents the HTTP parameter name and value. + */ +class ParameterMap { + + parameterMap = new Map(); + + /** + * This is a getter method to get parameter map. + * @returns {Map} A Map representing the API request parameters. + */ + getParameterMap() { + return this.parameterMap; + } + + setParameterMap(parameterMap) + { + this.parameterMap = parameterMap; + } + + /** + * The method to add parameter name and value. + * @param {Param} param - A Param class instance. + * @param {object} value - An object containing the parameter value. + * @throws {SDKException} + */ + async add(param, value) { + + if (param == null) { + throw new SDKException(Constants.PARAMETER_NULL_ERROR, Constants.PARAM_INSTANCE_NULL_ERROR); + } + + var paramName = param.getName(); + + if (paramName == null) { + throw new SDKException(Constants.PARAM_NAME_NULL_ERROR, Constants.PARAM_NAME_NULL_ERROR_MESSAGE); + } + + if (value == null) { + throw new SDKException(Constants.PARAMETER_NULL_ERROR, paramName + Constants.NULL_VALUE_ERROR_MESSAGE); + } + + var paramClassName = param.getClassName(); + + var parsedParamValue = null; + + if (paramClassName != null) { + let headerParamValidator = new HeaderParamValidator(); + + parsedParamValue = await headerParamValidator.validate(param, value); + } + + if (this.parameterMap.has(paramName) && this.parameterMap.get(paramName) != null) { + let paramValue = this.parameterMap.get(paramName) + + paramValue = paramValue.concat(",", parsedParamValue.toString()); + + this.parameterMap.set(paramName, paramValue); + + } + else { + this.parameterMap.set(paramName, parsedParamValue.toString()); + } + } +} + +export { + ParameterMap as ParameterMap, + ParameterMap as MasterModel +} diff --git a/versions/3.0.0/lib/routes/proxy_builder.js b/versions/3.0.0/lib/routes/proxy_builder.js new file mode 100644 index 0000000..4e31190 --- /dev/null +++ b/versions/3.0.0/lib/routes/proxy_builder.js @@ -0,0 +1,56 @@ +import {Constants} from "../utils/util/constants.js"; + +import {Utility} from "../utils/util/utility.js"; + +import {RequestProxy} from "./request_proxy.js"; + +class ProxyBuilder { + _host; + + _port; + + _user; + + _password = ""; + + host(host) { + Utility.assertNotNull(host, Constants.REQUEST_PROXY_ERROR, Constants.HOST_ERROR_MESSAGE); + + this._host = host; + + return this; + } + + port(port) { + Utility.assertNotNull(port, Constants.REQUEST_PROXY_ERROR, Constants.PORT_ERROR_MESSAGE); + + this._port = port; + + return this; + } + + user(user) { + this._user = user; + + return this; + } + + password(password) { + this._password = password; + + return this; + } + + build() { + Utility.assertNotNull(this._host, Constants.REQUEST_PROXY_ERROR, Constants.HOST_ERROR_MESSAGE); + + Utility.assertNotNull(this._port, Constants.REQUEST_PROXY_ERROR, Constants.PORT_ERROR_MESSAGE); + + return new RequestProxy(this._host, this._port, this._user, this._password); + } +} + +export { + ProxyBuilder as ProxyBuilder, + ProxyBuilder as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/request_proxy.js b/versions/3.0.0/lib/routes/request_proxy.js new file mode 100644 index 0000000..ca2e08c --- /dev/null +++ b/versions/3.0.0/lib/routes/request_proxy.js @@ -0,0 +1,64 @@ +class RequestProxy { + _host; + + _port; + + _user; + + _password; + + /** + * Creates a RequestProxy class instance with the specified parameters. + * @param {String} host A String containing the hostname or address of the proxy server + * @param {Number} port An Integer containing The port number of the proxy server + * @param {String} user A String containing the user name of the proxy server + * @param {String} password A String containing the password of the proxy server + */ + constructor(host, port, user = null, password = null) { + + this._host = host; + + this._port = port; + + this._user = user; + + this._password = password; + } + + /** + * This is a getter method to get Proxy host. + * @returns {String} + */ + getHost() { + return this._host; + } + + /** + * This is a getter method to get the Proxy port. + * @returns {Number} + */ + getPort() { + return this._port; + } + + /** + * This is a getter method to get the Proxy user name. + * @returns {String} + */ + getUser() { + return this._user; + } + + /** + * This is a getter method to get the Proxy password. + * @returns {String} + */ + getPassword() { + return this._password; + } +} + +export { + RequestProxy as RequestProxy, + RequestProxy as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/sdk_config.js b/versions/3.0.0/lib/routes/sdk_config.js new file mode 100644 index 0000000..9224c4a --- /dev/null +++ b/versions/3.0.0/lib/routes/sdk_config.js @@ -0,0 +1,54 @@ +/** + * The class to configure the SDK. + */ +class SDKConfig { + autoRefreshFields; + + pickListValidation; + + _timeout; + + /** + * Creates an instance of SDKConfig with the given parameters + * @param {Boolean} autoRefreshFields A boolean representing autoRefreshFields + * @param {Boolean} pickListValidation A boolean representing pickListValidation + * @param {number} timeout A Integer representing timeout + */ + constructor(autoRefreshFields, pickListValidation, timeout) { + this.autoRefreshFields = autoRefreshFields; + + this.pickListValidation = pickListValidation; + + this._timeout = timeout; + } + + /** + * This is a getter method to get autoRefreshFields. + * @returns {Boolean} A boolean representing autoRefreshFields + */ + getAutoRefreshFields() { + return this.autoRefreshFields; + } + + /** + * This is a getter method to get pickListValidation. + * @returns {Boolean} A boolean representing pickListValidation + */ + getPickListValidation() { + return this.pickListValidation; + } + + /** + * This is a getter method to get timeout. + * @returns {number} A Integer representing API timeout + */ + getTimeout() { + return this._timeout; + } +} + + +export { + SDKConfig as SDKConfig, + SDKConfig as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/sdk_config_builder.js b/versions/3.0.0/lib/routes/sdk_config_builder.js new file mode 100644 index 0000000..3ea4076 --- /dev/null +++ b/versions/3.0.0/lib/routes/sdk_config_builder.js @@ -0,0 +1,55 @@ +import {SDKConfig} from "./sdk_config.js"; + +class SDKConfigBuilder { + _autoRefreshFields = false; + + _pickListValidation = true; + + _timeout = 0; + + /** + * This is a setter method to set autoRefreshFields. + * @param {Boolean} autoRefreshFields A boolean value + * @returns {SDKConfigBuilder} An instance of SDKConfigBuilder + */ + autoRefreshFields(autoRefreshFields) { + this._autoRefreshFields = autoRefreshFields; + + return this; + } + + /** + * This is a setter method to set pickListValidation. + * @param {Boolean} pickListValidation A boolean value + * @returns {SDKConfigBuilder} An instance of SDKConfigBuilder + */ + pickListValidation(pickListValidation) { + this._pickListValidation = pickListValidation; + + return this; + } + + /** + * This is a setter method to set API timeout. + * @param {number} timeout + * @returns {SDKConfigBuilder} An instance of SDKConfigBuilder + */ + timeout(timeout) { + this._timeout = timeout > 0 ? timeout : 0; + + return this; + } + + /** + * The method to build the SDKConfig instance + * @returns {SDKConfig} An instance of SDKConfig + */ + build() { + return new SDKConfig(this._autoRefreshFields, this._pickListValidation, this._timeout); + } +} + +export { + SDKConfigBuilder as SDKConfigBuilder, + SDKConfigBuilder as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/routes/user_signature.js b/versions/3.0.0/lib/routes/user_signature.js new file mode 100644 index 0000000..21365e6 --- /dev/null +++ b/versions/3.0.0/lib/routes/user_signature.js @@ -0,0 +1,30 @@ +import {Constants, Utility} from "../zohocrmsdk.js"; + +/** + * This class represents the Zoho CRM User. + */ +class UserSignature { + + name + + constructor(name){ + if (name == null) + { + Utility.assertNotNull(null, Constants.MANDATORY_VALUE_ERROR, Constants.MANDATORY_KEY_ERROR + " - " + Constants.NAME).then(r => r); + } + this.name = name; + } + + /** + * This is a getter method to get user email. + * @returns {string} A String representing the CRM user email. + */ + getName(){ + return this.name; + } +} + +export { + UserSignature as UserSignature, + UserSignature as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/utils/util/choice.js b/versions/3.0.0/lib/utils/util/choice.js new file mode 100644 index 0000000..882587f --- /dev/null +++ b/versions/3.0.0/lib/utils/util/choice.js @@ -0,0 +1,19 @@ +/** + * Common Class to provide or obtain a value, when there are multiple supported values. + */ +class Choice { + value; + + constructor(value) { + this.value = value; + } + + getValue() { + return this.value; + } +} + +export { + Choice as Choice, + Choice as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/utils/util/constants.js b/versions/3.0.0/lib/utils/util/constants.js new file mode 100644 index 0000000..0afc8b3 --- /dev/null +++ b/versions/3.0.0/lib/utils/util/constants.js @@ -0,0 +1,757 @@ +class Constants { + static TYPE_VS_DATATYPE = new Map([ + ["map", "[object Map]"], + ["hashmap", "[object Map]"], + ["string", "[object String]"], + ["list", "[object Array]"], + ["long", "[object BigInt]"], + ["integer", "[object Number]"], + ["float", "[object Number]"], + ["double", "[object Number]"], + ["boolean", "[object Boolean]"], + ["datetime", "[object Date]"], + ["date", "[object Date]"] + ]); + + static SPECIAL_TYPES = new Map([ + ["DateTime", "Date"], + ["Date", "Date"], + ["Long", "BigInt"], + ["TimeZone", "MomentZone"] + ]); + + static PRIMITIVE_TYPES = ['string', 'number', 'boolean']; + + static OAUTH_HEADER_PREFIX = "Zoho-oauthtoken "; + + static GENERATE_TOKEN_ID_ERROR = "Exception in generateId() - DBStore"; + + static AUTHORIZATION = "Authorization"; + + static REVOKE_URL = "/revoke"; + + static REFRESH_TOKEN_REMOVED = "Refresh token revoked successfully"; + + static TOKEN_NOT_FOUND = " No tokens exist for the given user-id."; + + static USER_NAME = "user_name"; + + static GRANT_TYPE = "grant_type"; + + static GRANT_TYPE_AUTH_CODE = "authorization_code"; + + static ACCESS_TOKEN = "access_token"; + + static USER_SIGNATURE = "user_signature"; + + static EXPIRES_IN = "expires_in"; + + static STATUS_SUCCESS = "success"; + + static REVOKE_TOKEN_ERROR = "Exception while revoke the refresh token."; + + static ACCESS_TOKEN_USING_REFRESH_TOKEN_MESSAGE = "Access token can be generated by refresh token"; + + static ACCESS_TOKEN_USING_GRANT_TOKEN_MESSAGE = "Access token can be generated by grant token."; + + static EXPIRES_IN_SEC = "expires_in_sec"; + + static GET_TOKEN_FILE_ERROR1 = "Exception in FileStore : Given user authentication details not found."; + + static REFRESH_TOKEN = "refresh_token"; + + static CLIENT_ID = "client_id"; + + static CLIENT_SECRET = "client_secret"; + + static REDIRECT_URL = "redirect_url"; + + static REDIRECT_URI = "redirect_uri"; + + static REQUEST_METHOD_POST = "POST"; + + static REQUEST_METHOD_PATCH = "PATCH"; + + static GET_TOKEN_DB_ERROR1 = "Exception in DBStore : Given user authentication details not found."; + + static CODE = "code"; + + static STATUS = "status"; + + static MESSAGE = "message"; + + static API_EXCEPTION = "API_EXCEPTION"; + + static REQUEST_METHOD_PUT = "PUT"; + + static REQUEST_METHOD_DELETE = "DELETE"; + + static REQUEST_METHOD_GET = "GET"; + + static ZOHO_SDK = "X-ZOHO-SDK"; + + static SDK_VERSION = "3.0.0"; + + static MYSQL_HOST = "localhost"; + + static MYSQL_DATABASE_NAME = "zohooauth"; + + static MYSQL_USER_NAME = "root"; + + static MYSQL_PORT_NUMBER = "3306"; + + static GET_TOKEN_DB_ERROR = "Exception in getToken - DBStore : "; + + static GET_TOKEN_BY_USER_NAME_ERROR = "Exception in getToken() - OAuthToken : Given user_name token details not found, Please give required item"; + + static GET_TOKENS_DB_ERROR = "Exception in getTokens - DBStore : "; + + static DELETE_TOKEN_DB_ERROR = "Exception in deleteToken - DBStore : "; + + static DELETE_TOKENS_DB_ERROR = "Exception in deleteTokens - DBStore : "; + + static SAVE_TOKEN_DB_ERROR = "Exception in saveToken - DBStore : "; + + static GET_TOKEN_FILE_ERROR = "Exception in getToken - FileStore : "; + + static GET_TOKENS_FILE_ERROR = "Exception in getTokens - FileStore : "; + + static SAVE_TOKEN_FILE_ERROR = "Exception in saveToken - FileStore : "; + + static DELETE_TOKEN_FILE_ERROR = "Exception in deleteToken - FileStore : "; + + static DELETE_TOKENS_FILE_ERROR = "Exception in deleteTokens - FileStore : "; + + static OAUTH_TOKEN_FIELDS = ["clientID", "clientSecret","refreshToken", "redirectURL", "grantToken", "accessToken", "expiresIn", "userSignature", "id"]; + + static TOKEN_STORE = "TOKEN_STORE"; + + static GRANT_TOKEN = "grant_token"; + + static EXPIRY_TIME = "expiry_time"; + + static TOKEN_ERROR = "TOKEN ERROR"; + + static ERROR_HASH_FIELD = 'field'; + + static ERROR_HASH_EXPECTED_TYPE = 'expected_type'; + + static ERROR_HASH_CLASS = 'class'; + + static CONTENT_TYPE = 'content-type'; + + static INSTANCE_NUMBER = 'instance-number'; + + static ERROR_HASH_MEMBER = 'member'; + + static NAME = 'name'; + + static DATA_TYPE_ERROR = "DATA TYPE ERROR"; + + static VALUES = 'values'; + + static ACCEPTED_VALUES = 'accepted-values'; + + static ACCEPTED_TYPE = 'accepted-type'; + + static GIVEN_TYPE = "given-type"; + + static GIVEN_LENGTH = "given-length"; + + static GIVEN_VALUE = "given-value"; + + static UNACCEPTED_VALUES_ERROR = 'UNACCEPTED VALUES ERROR'; + + static MIN_LENGTH = "min-length"; + + static MAX_LENGTH = "max-length"; + + static ERROR_HASH_MAXIMUM_LENGTH = "maximum-length"; + + static MAXIMUM_LENGTH_ERROR = "MAXIMUM LENGTH ERROR"; + + static ERROR_HASH_MINIMUM_LENGTH = "minimum-length"; + + static MINIMUM_LENGTH_ERROR = "MINIMUM LENGTH ERROR"; + + static REGEX = "regex"; + + static REGEX_MISMATCH_ERROR = "REGEX MISMATCH ERROR"; + + static UNIQUE = "unique"; + + static UNIQUE_KEY_ERROR = "UNIQUE KEY ERROR"; + + static FIRST_INDEX = "first-index"; + + static NEXT_INDEX = "next-index"; + + static LONG_NAMESPACE = 'Long'; + + static BOOLEAN_NAMESPACE = 'Boolean'; + + static INTEGER_NAMESPACE = 'Integer'; + + static STRING_NAMESPACE = 'String'; + + static DOUBLE_NAMESPACE = 'Double'; + + static DATETIME_NAMESPACE = 'DateTime'; + + static DATE_NAMESPACE = 'Date'; + + static FLOAT_NAMESPACE = 'Float'; + + static OBJECT_NAMESPACE = 'Object'; + + static DOUBLE_COLON = '::'; + + static DOT = '.'; + + static UNDERSCORE = "_"; + + static STREAM_WRAPPER_CLASS_PATH = "utils/util/stream_wrapper"; + + static FILE_NAMESPACE = "utils/util/stream_wrapper"; + + static CONTENT_DISPOSITION = "content-disposition"; + + static PACKAGE_PREFIX = 'com.zoho.crm.api.'; + + static INTERFACE = "interface"; + + static CLASSES = "classes"; + + static CLASS_KEY = "class"; + + static READ_ONLY = "read-only"; + + static IS_KEY_MODIFIED = 'is_key_modified'; + + static SET_KEY_MODIFIED = "set_key_modified"; + + static REQUIRED = "required"; + + static REQUIRED_IN_UPDATE = "required-in-update"; + + static MANDATORY_VALUE_ERROR = "MANDATORY VALUE ERROR"; + + static MANDATORY_VALUE_NULL_ERROR = "MANDATORY VALUE NULL ERROR"; + + static MANDATORY_KEY_ERROR = "Value missing or null for mandatory key(s) :"; + + static MANDATORY_KEY_NULL_ERROR = "Null Value for mandatory key : "; + + static LIST_NAMESPACE = "list"; + + static MAP_NAMESPACE = "map"; + + static HASH_MAP_NAMESPACE = "HashMap"; + + static STRUCTURE_NAME = "structure_name"; + + static KEYS = "keys"; + + static KEY_VALUES = "key_values"; + + static INITIALIZATION_ERROR = 'INITIALIZATION ERROR'; + + static INITIALIZATION_EXCEPTION = "Exception in initialization : "; + + static SWITCH_USER_EXCEPTION = "Exception in switching user : "; + + static EMAIL = "email"; + + static USER_ERROR = "USER ERROR"; + + static CLIENT_ID_FIELD = "clientID"; + + static CLIENT_SECRET_FIELD = "clientSecret"; + + static REDIRECT_URL_FIELD = "redirectURL"; + + static TYPE = "type"; + + static TYPE_ERROR = "TYPE ERROR"; + + static HEADER_PARAM_VALIDATION_ERROR = "Exception in header or param validation"; + + static TOKEN = "token"; + + static EXPECTED_TOKEN_TYPES = "REFRESH, GRANT"; + + static INVALID_CLIENT_ERROR = "INVALID CLIENT ERROR"; + + static ERROR_KEY = "error"; + + static GET_TOKEN_ERROR = "Exception in getting access token"; + + static LOG_FILE_NAME = "sdk_logs.log"; + + static TOKEN_FILE = "sdk_tokens.txt" + + static JSON_DETAILS_FILE_PATH = "json_details.json"; + + static CONFIG_DIRECTORY = "config"; + + static JSON_DETAILS_ERROR = "ERROR IN READING JSONDETAILS FILE"; + + static USER = "user"; + + static ENVIRONMENT = "environment"; + + static STORE = "store"; + + static SDK_CONFIG = "sdkConfig"; + + static USER_PROXY = "proxy"; + + static INDEX = "index"; + + static CONTENT_TYPE = 'Content-Type'; + + static APPLICATION_JSON_CONTENT_TYPE = 'application/json'; + + static EXCEPTION_IS_KEY_MODIFIED = "Exception in calling isKeyModified"; + + static EXCEPTION_SET_KEY_MODIFIED = "Exception in calling setKeyModified"; + + static ARRAY_TYPE = "[object Array]"; + + static ARRAY_KEY = "Array"; + + static MAP_TYPE = "[object Map]"; + + static OBJECT_TYPE = "[object Object]"; + + static OBJECT_KEY = "object"; + + static STRING_TYPE = "[object String]"; + + static INTEGER_TYPE = "[object Integer]"; + + static RECORD_NAMESPACE = 'core/com/zoho/crm/api/record/record'; + + static ATTACHMENTS_NAMESPACE = 'core/com/zoho/crm/api/attachments/attachment'; + + static FIELD_FILE_NAMESPACE = 'core/com/zoho/crm/api/record/file_details'; + + static LINE_TAX_NAMESPACE = 'core/com/zoho/crm/api/record/line_tax'; + + static INVENTORY_LINE_ITEMS = 'core/com/zoho/crm/api/record/inventory_line_items'; + + static PRICING_DETAILS = 'core/com/zoho/crm/api/record/pricing_details'; + + static COMMENT_NAMESPACE = 'core/com/zoho/crm/api/record/comment'; + + static PARTICIPANTS = 'core/com/zoho/crm/api/record/participants'; + + static REMINDAT_NAMESPACE = 'core/com/zoho/crm/api/record/remind_at'; + + static CONSENT_NAMESPACE = 'core/com/zoho/crm/api/record/consent'; + + static REMINDER_NAMESPACE = 'core/com/zoho/crm/api/record/reminder'; + + static RECURRING_ACTIVITY_NAMESPACE = 'core/com/zoho/crm/api/record/recurring_activity'; + + static USER_NAMESPACE = 'core/com/zoho/crm/api/users/minified_user'; + + static MODULE_NAMESPACE = 'core/com/zoho/crm/api/modules/modules'; + + static LAYOUT_NAMESPACE = 'core/com/zoho/crm/api/layouts/layouts'; + + static TERRITORY_NAMESPACE = "core/com/zoho/crm/api/record/territory"; + + static TAX_NAMESPACE = "core/com/zoho/crm/api/record/tax"; + + static IMAGEUPLOAD_NAMESPACE = "core/com/zoho/crm/api/record/image_upload"; + + static KEY_VALUES = "keyValues"; + + static KEY_MODIFIED = "keyModified"; + + static CHOICE_NAMESPACE = "utils/util/choice"; + + static MODULE = "module"; + + static CHOICE_PATH = "./choice"; + + static PACKAGE_NAMESPACE = "core/com/zoho/crm/api"; + + static MODULEPACKAGENAME = "modulePackageName"; + + static MODULEDETAILS = "moduleDetails"; + + static KEYS_TO_SKIP = ["Created_Time", "Modified_Time", "Created_By", "Modified_By", "Tag"]; + + static PRODUCT_DETAILS = "Product_Details"; + + static PRICING_DETAILS_API_NAME = "Pricing_Details"; + + static PARTICIPANT_API_NAME = "Participants"; + + static COMMENTS = 'Comments'; + + static SOLUTIONS = 'solutions'; + + static CASES = 'cases'; + + static NOTES = "notes"; + + static ATTACHMENTS = "$attachments"; + + static INVENTORY_MODULES = ["invoices", "sales_orders", "purchase_orders", "quotes"]; + + static PRICE_BOOKS = "price_books"; + + static EVENTS = "events"; + + static CALLS = "calls"; + + static CALL_DURATION = "call_duration"; + + static ACTIVITIES = "activities"; + + static LAYOUT = "Layout"; + + static SUBFORM = "subform"; + + static LOOKUP = "lookup"; + + static SE_MODULE = "se_module"; + + static FIELDS_LAST_MODIFIED_TIME = "FIELDS-LAST-MODIFIED-TIME"; + + static ATTACHMENT_ID = "attachment_id"; + + static FILE_ID = "file_id"; + + static DELETE_FIELD_FILE_ERROR = "Exception in deleting Current User Fields file"; + + static DELETE_FIELD_FILES_ERROR = "Exception in deleting all Fields files"; + + static DELETE_MODULE_FROM_FIELDFILE_ERROR = "Exception in deleting module from Fields file"; + + static HTTP = "http"; + + static CONTENT_API_URL = "content.zohoapis.com"; + + static INVALID_URL_ERROR = "Invalid URL Error"; + + static SET_API_URL_EXCEPTION = "Exception in setting API URL : "; + + static AUTHENTICATION_EXCEPTION = "Exception in authenticating current request : "; + + static FORM_REQUEST_EXCEPTION = "Exception in forming request body : "; + + static API_CALL_EXCEPTION = "Exception in current API call execution : "; + + static CORE = "core"; + + static SAVE_TOKEN_ERROR = "Exception in saving tokens"; + + static SET_TO_CONTENT_TYPE = ["/crm/bulk/v5/read", "/crm/bulk/v5/write"]; + + static CONTENT_TYPE_HEADER = "Content-Type"; + + static EVENTS_MODULE_PARAMS = ["startDateTime", "endDateTime"]; + + static FILE_BODY_WRAPPER = "file_body_wrapper"; + + static USER_NOT_FOUND_ERROR_MESSAGE = "Given user not found in SDK configuration details"; + + static USER_NOT_FOUND_ERROR = "USER NOT FOUND ERROR"; + + static LINE_TAX = "$line_tax"; + + static RESOURCE_PATH_ERROR = "EMPTY_RESOURCE_PATH"; + + static RESOURCE_PATH_ERROR_MESSAGE = "Resource Path MUST NOT be null/empty."; + + static INITIALIZATION_SUCCESSFUL = "Initialization successful "; + + static INITIALIZATION_SWITCHED = "Initialization switched "; + + static IN_ENVIRONMENT = " in Environment : "; + + static FOR_EMAIL_ID = "for Email Id : "; + + static FIELD_DETAILS_DIRECTORY = "resources"; + + static CANT_DISCLOSE = " ## can't disclose ## "; + + static URL = "URL"; + + static HEADERS = "HEADERS"; + + static PARAMS = "PARAMS"; + + static REQUEST_METHOD = "REQUEST-METHOD"; + + static UNDERSCORE = "_"; + + static RELATED_LISTS = "Related_Lists"; + + static API_NAME = "api_name"; + + static HREF = "href"; + + static NO_CONTENT_STATUS_CODE = 204; + + static NOT_MODIFIED_STATUS_CODE = 304; + + static EXCEPTION = "Exception "; + + static REFRESH_TOKEN_MESSAGE = "Access Token has expired. Hence refreshing."; + + static PRIMARY = "primary"; + + static ID = "id"; + + static REQUEST_CATEGORY_CREATE = "CREATE"; + + static REQUEST_CATEGORY_UPDATE = "UPDATE"; + + static REQUEST_CATEGORY_READ = "READ"; + + static REQUEST_CATEGORY_ACTION = "ACTION"; + + static FORMULA = "formula"; + + static LOOKUP = "lookup"; + + static ACCOUNTS = "accounts"; + + static REFRESH_SINGLE_MODULE_FIELDS_ERROR = "Exception in refreshing fields of module : "; + + static REFRESH_ALL_MODULE_FIELDS_ERROR = "Exception in refreshing fields of all modules : "; + + static SKIP_MANDATORY = "skip-mandatory"; + + static PRIMARY_KEY_ERROR = "Value missing or null for required key(s) : "; + + static PICKLIST = "picklist"; + + static AUTO_REFRESH_FIELDS_ERROR_MESSAGE = "autoRefreshFields MUST NOT be null."; + + static SDK_UNINITIALIZATION_ERROR = "SDK UNINITIALIZED ERROR"; + + static SDK_UNINITIALIZATION_MESSAGE = "SDK is UnInitialized"; + + static USER_PROXY_ERROR = "USERPROXY ERROR"; + + static HOST_ERROR_MESSAGE = "Host MUST NOT be null."; + + static PORT_ERROR_MESSAGE = "Port MUST NOT be null."; + + static SWITCH_USER_ERROR = "SWITCH USER ERROR"; + + static PARAMETER_NULL_ERROR = "NULL PARAMETER ERROR"; + + static HEADER_NULL_ERROR = "NULL HEADER ERROR"; + + static PARAM_NAME_NULL_ERROR = "NULL PARAM NAME ERROR"; + + static HEADER_NAME_NULL_ERROR = "NULL HEADER NAME ERROR"; + + static PARAM_NAME_NULL_ERROR_MESSAGE = "Param Name MUST NOT be null"; + + static HEADER_NAME_NULL_ERROR_MESSAGE = "Header Name MUST NOT be null"; + + static NULL_VALUE_ERROR_MESSAGE = " MUST NOT be null"; + + static PARAM_INSTANCE_NULL_ERROR = "Param Instance MUST NOT be null"; + + static HEADER_INSTANCE_NULL_ERROR = "Header Instance MUST NOT be null"; + + static PARAMETER_ERROR_MESSAGE = " MUST NOT be null"; + + static UNSUPPORTED_IN_API = "API UNSUPPORTED OPERATION"; + + static UNSUPPORTED_IN_API_MESSAGE = " Operation is not supported by API"; + + static NULL_VALUE = "null"; + + static PROXY_SETTINGS = "Proxy settings - "; + + static PROXY_HOST = "Host: "; + + static PROXY_PORT = "Port: "; + + static PROXY_USER = "User: "; + + static API_ERROR_RESPONSE = "Error response : "; + + static FILE_ERROR = "file_error"; + + static FILE_DOES_NOT_EXISTS = "file does not exists"; + + static CONSENT_LOOKUP = "consent_lookup"; + + static USER_MAIL_NULL_ERROR = "USER MAIL NULL ERROR"; + + static USER_MAIL_NULL_ERROR_MESSAGE = "User Mail MUST NOT be null. Use userMail setter to set value."; + + static MYSQL_TABLE_NAME = "oauthtoken"; + + static GET_TOKEN_BY_ID_DB_ERROR = "Exception in getTokenById - DBStore : Given ID is invalid"; + + static GET_TOKEN_BY_ID_FILE_ERROR = "Exception in getTokenById - FileStore : Given ID is invalid"; + + static CLIENT_ID_NULL_ERROR_MESSAGE = "ClientID MUST NOT be null"; + + static CLIENT_SECRET_NULL_ERROR_MESSAGE = "ClientSecret MUST NOT be null"; + + static IS_GENERATE_REQUEST_BODY = ["PATCH", "POST", "PUT"]; + + static USER_SIGNATURE_ERROR_MESSAGE = "UserSignature MUST NOT be null."; + + static ENVIRONMENT_ERROR_MESSAGE = "Environment MUST NOT be null."; + + static TOKEN_ERROR_MESSAGE = "Token MUST NOT be null."; + + static STORE_ERROR_MESSAGE = "Store MUST NOT be null."; + + static SDK_CONFIG_ERROR_MESSAGE = "sdkConfig MUST NOT be null."; + + static RESOURCE_PATH_INVALID_ERROR_MESSAGE = "Resource Path MUST be a valid directory."; + + static REQUEST_PROXY_ERROR = "REQUESTPROXY ERROR"; + + static USER_SIGNATURE_ERROR = "USERSIGNATURE ERROR"; + + static REGULAR_EXPRESSION = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; + + static DEFAULT_MODULENAME_VS_APINAME = new Map([ + ["leads", "Leads"], + ["contacts", "Contacts"], + ["accounts", "Accounts"], + ["deals", "Deals"], + ["tasks", "Tasks"], + ["events", "Events"], + ["activities", "Activities"], + ["calls", "Calls"], + ["products", "Products"], + ["quotes", "Quotes"], + ["sales_orders", "Sales_Orders"], + ["purchase_orders", "Purchase_Orders"], + ["invoices", "Invoices"], + ["campaigns", "Campaigns"], + ["vendors", "Vendors"], + ["price_books", "Price_Books"], + ["cases", "Cases"], + ["solutions", "Solutions"], + ["visits", "Visits"], + ["approvals", "Approvals"], + ["notes", "Notes"], + ["attachments", "Attachments"], + ["actions_performed", "Actions_Performed"] + ]); + + static PHOTO_SUPPORTED_MODULES = ["leads", "contacts", "accounts", "products", "vendors"]; + + static GENERATED_TYPE = "generated_type"; + + static GENERATED_TYPE_CUSTOM = "custom"; + + static UPLOAD_PHOTO_UNSUPPORTED_ERROR = "UPLOAD PHOTO UNSUPPORTED MODULE"; + + static UPLOAD_PHOTO_UNSUPPORTED_MESSAGE = "Photo Upload Operation is not supported by the module: "; + + static KEY_VS_INVENTORY_MODULE = new Map([ + ["Quoted_Items", "quotes"], + ["Invoiced_Items", "invoices"], + ["Purchase_Items", "purchase_orders"], + ["Ordered_Items", "sales_orders"] + ]); + + static MULTI_SELECT_LOOKUP = "multiselectlookup"; + + static MULTI_USER_LOOKUP = "multiuserlookup"; + + static NO_ACCESS_TOKEN_ERROR = "ACCESS TOKEN IS NOT PRESENT IN RESPONSE"; + + static TERRITORIES = "territories"; + + static TERRITORY = "Territory"; + + static PRODUCTS = "Products"; + + static TAX = "TAX"; + + static INVENTORYTEMPLATE = "inventorytemplate"; + + static TEMPLATE = "core/com/zoho/crm/api/send_mail/template"; + + static OAUTH_MANDATORY_KEYS = ["grantToken", "refreshToken", "id", "accessToken"]; + + static OAUTH_MANDATORY_KEYS2 = [Constants.GRANT_TOKEN, Constants.REFRESH_TOKEN]; + + static OAUTH_MANDATORY_KEYS1 = [Constants.CLIENT_ID, Constants.CLIENT_SECRET]; + + static INVALID_TOKEN_ERROR = "INVALID TOKEN ERROR"; + + static SDK_MODULE_METADATA = "SDK-MODULE-METADATA"; + + static INVENTORY_MODULES_ITEMS = ["invoiced_items", "quoted_items", "purchase_items", "ordered_items"]; + + static PRODUCT_NAME = "Product_Name"; + + static LINEITEM_PRODUCT = "core/com/zoho/crm/api/record/line_item_product"; + + static DISCOUNT = "Discount"; + + static LINETAX = "core/com/zoho/crm/api/record/line_tax"; + + static NODEJS = "nodejs_"; + + static LOGGER = "logger"; + + static REQUEST_PROXY = "request_proxy"; + + static COUNT = "count"; + + static SKIP_MODULES = ["deals"]; + + static OWNER_LOOKUP = "ownerlookup"; + + static NUMBER_TYPE = "[object Number]"; + + static MULTI_MODULE_LOOKUP = "multi_module_lookup"; + + static TIMEZONE_NAMESPACE = "TimeZone"; + + static ENVIRONMENT_ERROR_1 = "ENVIRONMENT_ERROR"; + + static ENVIRONMENT_ERROR_RESPONSE = "Exception in set the api environment."; + + static API_DOMAIN = "api_domain"; + + static US_DATACENTER = ["https://www.zohoapis.com", "https://sandbox.zohoapis.com", "https://developer.zohoapis.com", + "https://accounts.zoho.com/oauth/v2/token", "us"] + + static JP_DATACENTER = ["https://www.zohoapis.jp", "https://sandbox.zohoapis.jp", "https://developer.zohoapis.jp", + "https://accounts.zoho.jp/oauth/v2/token", "jp"] + + static IN_DATACENTER = ["https://www.zohoapis.in", "https://sandbox.zohoapis.in", "https://developer.zohoapis.in", + "https://accounts.zoho.in/oauth/v2/token", "in"] + + static EU_DATACENTER = ["https://www.zohoapis.eu", "https://sandbox.zohoapis.eu", "https://developer.zohoapis.eu", + "https://accounts.zoho.eu/oauth/v2/token", "eu"] + + static CN_DATACENTER = ["https://www.zohoapis.com.cn", "https://sandbox.zohoapis.com.cn", + "https://developer.zohoapis.com.cn", "https://accounts.zoho.com.cn/oauth/v2/token", "cn"] + + static AU_DATACENTER = ["https://www.zohoapis.com.au", "https://sandbox.zohoapis.com.au", + "https://developer.zohoapis.com.au", "https://accounts.zoho.com.au/oauth/v2/token", "au"] + + static SANDBOX = "sandbox"; + + static DEVELOPER = "developer"; + +} + +export { + Constants as Constants, + Constants as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/utils/util/converter.js b/versions/3.0.0/lib/utils/util/converter.js new file mode 100644 index 0000000..c711b87 --- /dev/null +++ b/versions/3.0.0/lib/utils/util/converter.js @@ -0,0 +1,384 @@ +import {Constants} from "./constants.js"; + +import {SDKException} from "../../core/com/zoho/crm/api/exception/sdk_exception.js"; + +import {Initializer} from "../../routes/initializer.js"; + +import {Choice} from "./choice.js"; + +import {Utility} from "./utility.js"; + +import {APIHTTPConnector} from "../../routes/controllers/api_http_connector.js"; + +import {OAuthToken} from "../../models/authenticator/oauth_token.js"; +import path from "path"; + + +/** + * This class is to construct API request and response. + */ +class Converter { + commonAPIHandler; + + /** + * Creates a Converter class instance with the CommonAPIHandler class instance. + * @param {CommonAPIHandler} commonAPIHandler - A CommonAPIHandler class instance. + */ + constructor(commonAPIHandler) { + this.commonAPIHandler = commonAPIHandler; + } + + /** + * This abstract method is to process the API response. + * @param {object} response - An Object containing the API response contents or response. + * @param {string} pack - A String containing the expected method return type. + * @returns An Object representing the class instance. + * @throws {Error} + */ + getResponse(response, pack) { } + + /** + * This method is to construct the API request. + * @param {object} requestObject - An Object containing the class instance. + * @param {string} pack - A String containing the expected method return type. + * @param {int} instanceNumber - An Integer containing the class instance list number. + * @param {object} memberDetail - An object containing the member properties + * @returns An Object representing the API request body object. + * @throws {Error} + */ + formRequest(requestObject, pack, instanceNumber, memberDetail) { } + + /** + * This abstract method is to construct the API request body. + * @param {object} requestBase + * @param {object} requestObject - A Object containing the API request body object. + * @throws {Error} + */ + appendToRequest(requestBase, requestObject) { } + + /** + * This abstract method is to process the API response. + * @param {object} response - An Object containing the HttpResponse class instance. + * @param {string} pack - A String containing the expected method return type. + * @returns An Object representing the class instance. + * @throws {Error} + */ + getWrappedResponse(response, pack) { } + + /** + * This method is to validate if the input values satisfy the constraints for the respective fields. + * @param {string} className - A String containing the class name. + * @param {string} memberName - A String containing the member name. + * @param {object} keyDetails - A JSONObject containing the key JSON details. + * @param {object} value - A Object containing the key value. + * @param {Map} uniqueValuesMap - A Map containing the value of constructed object's unique fields. + * @param {int} instanceNumber - An Integer containing the class instance list number. + * @returns A Boolean representing the key value is expected pattern, unique, length, and values. + * @throws {SDKException} + */ + async valueChecker(className, memberName, keyDetails, value, uniqueValuesMap, instanceNumber) { + + var detailsJO = {}; + + var name = keyDetails[Constants.NAME]; + + var type = keyDetails[Constants.TYPE]; + + var valueType = Object.prototype.toString.call(value); + + let check = true; + + let givenType = null; + + if (Constants.TYPE_VS_DATATYPE.has(type.toLowerCase())) { + if (Array.isArray(value) && keyDetails.hasOwnProperty(Constants.STRUCTURE_NAME)) { + let structureName = keyDetails[Constants.STRUCTURE_NAME]; + + let index = 0; + let className = (await import("../../" + structureName+".js")).MasterModel; + + for (let data of value) { + if (!(data instanceof className)) { + check = false; + + instanceNumber = index; + + let baseName = structureName.split("/").pop(); + + let classNameSplit = baseName.split("_"); + + let expectedClassName = ""; + + for (var nameIndex = 0; nameIndex < classNameSplit.length; nameIndex++) { + var fieldName = classNameSplit[nameIndex]; + + var firstLetterUppercase = fieldName[0].toUpperCase() + fieldName.slice(1); + + expectedClassName = expectedClassName.concat(firstLetterUppercase); + } + + type = Constants.ARRAY_KEY + "(" + expectedClassName + ")"; + + givenType = Constants.ARRAY_KEY + "(" + data.constructor.name + ")"; + + break; + } + + index = index + 1; + } + } + else if (value != null) { + check = (valueType != Constants.TYPE_VS_DATATYPE.get(type.toLowerCase()) ? false : true); + + if (check && type == Constants.INTEGER_NAMESPACE) { + check = Utility.checkInteger(value); + } + + givenType = Object.getPrototypeOf(value).constructor.name; + } + } + else if (value != null && type.toLowerCase() !== Constants.OBJECT_KEY) { + let expectedStructure = keyDetails[Constants.TYPE]; + + if(expectedStructure == "TimeZone") { + check = false; + if(value.hasOwnProperty("name")) { + check = true; + } + } + else { + let className = (await import("../../" + expectedStructure + ".js")).MasterModel; + + if (!(value instanceof className)) { + check = false; + + type = expectedStructure; + + givenType = value.constructor.name; + } + + if (check == false) { + if (givenType.toLowerCase() == Constants.INVENTORYTEMPLATE && type.toLowerCase() == Constants.TEMPLATE) { + check = true; + } + } + } + } + + if (!check) { + detailsJO[Constants.ERROR_HASH_FIELD] = name; + + detailsJO[Constants.ERROR_HASH_CLASS] = className; + + detailsJO[Constants.ACCEPTED_TYPE] = Constants.SPECIAL_TYPES.has(type) ? Constants.SPECIAL_TYPES.get(type) : type; + + detailsJO[Constants.GIVEN_TYPE] = givenType; + + if (instanceNumber != null) { + detailsJO[Constants.INDEX] = instanceNumber; + } + + throw new SDKException(Constants.TYPE_ERROR, null, detailsJO, null); + } + + let initializer = await Initializer.getInitializer(); + + if (keyDetails.hasOwnProperty(Constants.VALUES) && (!keyDetails.hasOwnProperty(Constants.PICKLIST) || (keyDetails[Constants.PICKLIST] && initializer.getSDKConfig().getPickListValidation() == true))) + { + let valuesJA = keyDetails[Constants.VALUES]; + + if (Array.isArray(value)) + { + let value_1 = value; + for (let value_2 of value) + { + if (value_2 instanceof Choice) + { + let choice = value_2; + value_2 = choice.getValue(); + } + if (!valuesJA.includes(value_2)) + { + detailsJO[Constants.ERROR_HASH_FIELD] = memberName; + + detailsJO[Constants.ERROR_HASH_CLASS] = className; + + if (instanceNumber != null) + { + detailsJO[Constants.INDEX] = instanceNumber; + } + detailsJO[Constants.GIVEN_VALUE] = value; + + detailsJO[Constants.ACCEPTED_VALUES] = valuesJA; + + throw new SDKException(Constants.UNACCEPTED_VALUES_ERROR, null, detailsJO); + } + } + } + else + { + if (value instanceof Choice) { + value = value.getValue(); + } + + if (!valuesJA.includes(value)) { + detailsJO[Constants.ERROR_HASH_FIELD] = memberName; + + detailsJO[Constants.ERROR_HASH_CLASS] = className; + + if (instanceNumber != null) { + detailsJO[Constants.INDEX] = instanceNumber; + } + + detailsJO[Constants.GIVEN_VALUE] = value; + + detailsJO[Constants.ACCEPTED_VALUES] = valuesJA; + + throw new SDKException(Constants.UNACCEPTED_VALUES_ERROR, null, detailsJO); + } + } + } + + if (keyDetails.hasOwnProperty(Constants.UNIQUE)) { + let valuesArray = uniqueValuesMap[name]; + + if (valuesArray != null && valuesArray.includes(value)) { + detailsJO[Constants.ERROR_HASH_FIELD] = memberName; + + detailsJO[Constants.ERROR_HASH_CLASS] = className; + + detailsJO[Constants.FIRST_INDEX] = valuesArray.indexOf(value); + + detailsJO[Constants.NEXT_INDEX] = instanceNumber; + + throw new SDKException(Constants.UNIQUE_KEY_ERROR, null, detailsJO); + } + else { + if (valuesArray == null) { + valuesArray = []; + } + + valuesArray.push(value); + + uniqueValuesMap[name] = valuesArray; + } + } + + if (keyDetails.hasOwnProperty(Constants.MIN_LENGTH) || keyDetails.hasOwnProperty(Constants.MAX_LENGTH)) { + let count = value.toString().length; + + if (Array.isArray(value)) { + count = value.length; + } + + if (keyDetails.hasOwnProperty(Constants.MAX_LENGTH) && (count > keyDetails[Constants.MAX_LENGTH])) { + detailsJO[Constants.ERROR_HASH_FIELD] = memberName; + + detailsJO[Constants.ERROR_HASH_CLASS] = className; + + detailsJO[Constants.GIVEN_LENGTH] = count; + + detailsJO[Constants.ERROR_HASH_MAXIMUM_LENGTH] = keyDetails[Constants.MAX_LENGTH]; + + throw new SDKException(Constants.MAXIMUM_LENGTH_ERROR, null, detailsJO); + } + + if (keyDetails.hasOwnProperty(Constants.MIN_LENGTH) && count < keyDetails[Constants.MIN_LENGTH]) { + detailsJO[Constants.ERROR_HASH_FIELD] = memberName; + + detailsJO[Constants.ERROR_HASH_CLASS] = className; + + detailsJO[Constants.GIVEN_LENGTH] = count; + + detailsJO[Constants.ERROR_HASH_MINIMUM_LENGTH] = keyDetails[Constants.MIN_LENGTH]; + + throw new SDKException(Constants.MINIMUM_LENGTH_ERROR, null, detailsJO); + } + } + + // if (keyDetails.hasOwnProperty(Constants.REGEX) && !keyDetails[Constants.REGEX].match(value)) { + // detailsJO[Constants.ERROR_HASH_FIELD] = memberName; + // + // detailsJO[Constants.ERROR_HASH_CLASS] = className; + // + // if (instanceNumber != null) { + // detailsJO[Constants.INDEX] = instanceNumber; + // } + // + // throw new SDKException(Constants.REGEX_MISMATCH_ERROR, null, detailsJO); + // } + + return true; + } + + async getEncodedFileName() { + let initializer = await Initializer.getInitializer(); + + let token = initializer.getToken(); + let accessToken = ""; + let refreshToken = ""; + let tokenKey = ""; + if (token instanceof OAuthToken) { + let oauthToken = token; + refreshToken = token.getRefreshToken(); + if (refreshToken != null && refreshToken.length > 0) { + tokenKey = refreshToken.substring(refreshToken.length - 32); + } + else { + accessToken = token.getAccessToken(); + if (accessToken != null && accessToken.length > 0) { + tokenKey = accessToken.substring(accessToken.length - 32); + } + } + } + let fileName = initializer.getEnvironment().getUrl(); + if (tokenKey != null && tokenKey.length > 0) { + fileName = fileName + tokenKey; + } + var input = this.toUTF8Array(fileName); + + var str = Buffer.from(input).toString('base64'); + + let filepath = path.join(initializer.getResourcePath(), Constants.FIELD_DETAILS_DIRECTORY); + + return path.join(filepath, str + ".json"); + } + + toUTF8Array(str) { + var utf8 = []; + + for (var i = 0; i < str.length; i++) { + var charcode = str.charCodeAt(i); + + if (charcode < 0x80) utf8.push(charcode); + else if (charcode < 0x800) { + utf8.push(0xc0 | (charcode >> 6), + 0x80 | (charcode & 0x3f)); + } + else if (charcode < 0xd800 || charcode >= 0xe000) { + utf8.push(0xe0 | (charcode >> 12), + 0x80 | ((charcode >> 6) & 0x3f), + 0x80 | (charcode & 0x3f)); + } + else { + i++; + // UTF-16 encodes 0x10000-0x10FFFF by + // subtracting 0x10000 and splitting the + // 20 bits of 0x0-0xFFFFF into two halves + charcode = 0x10000 + (((charcode & 0x3ff) << 10) + | (str.charCodeAt(i) & 0x3ff)); + + utf8.push(0xf0 | (charcode >> 18), + 0x80 | ((charcode >> 12) & 0x3f), + 0x80 | ((charcode >> 6) & 0x3f), + 0x80 | (charcode & 0x3f)); + } + } + return utf8; + } +} + +export { + Converter as Converter, + Converter as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/utils/util/datatype_converter.js b/versions/3.0.0/lib/utils/util/datatype_converter.js new file mode 100644 index 0000000..107436b --- /dev/null +++ b/versions/3.0.0/lib/utils/util/datatype_converter.js @@ -0,0 +1,182 @@ +import {Constants} from "./constants.js"; +import moment from 'moment-timezone'; + +/** + * This class converts JSON value to the expected object type and vice versa. + */ +class DatatypeConverter { + static preConverterMap = new Map(); + + static postConverterMap = new Map(); + + /** + * This method is to initialize the PreConverter and PostConverter lambda functions. + */ + static init() { + if (this.preConverterMap.size != 0 && this.postConverterMap.size != 0) { + return; + } + + var string = (obj) => { return obj.toString(); } + + var integer = (obj) => { return parseInt(obj); } + + var long = (obj) => { return obj.toString() != Constants.NULL_VALUE ? BigInt(obj) : null; } + + var longToString = (obj) => { return obj.toString() } + + var bool = (obj) => { return Boolean(obj); } + + var stringToDateTime = (obj) => { return new Date(obj); } + + var dateTimeToString = (obj) => { return obj.toISOString().split('.')[0] + "Z"; } + + var dateToString = (obj) => { return obj.toISOString().split('T')[0]; } + + var stringToDate = (obj) => { return new Date(obj); } + + var double = (obj) => { return parseFloat(obj.toString()); } + + var preObject = (obj) => { return this.preConvertObjectData(obj); } + + var postObject = (obj) => { return this.postConvertObjectData(obj); } + + var stringtoTimeZone = (obj) => { return moment.tz.zone(obj); } + + var timeZonetoSting = (obj) => { return obj.name; } + + this.addToMap(Constants.STRING_NAMESPACE, string, string); + + this.addToMap(Constants.INTEGER_NAMESPACE, integer, integer); + + this.addToMap(Constants.LONG_NAMESPACE, long, longToString); + + this.addToMap(Constants.BOOLEAN_NAMESPACE, bool, bool); + + this.addToMap(Constants.DATE_NAMESPACE, stringToDate, dateToString); + + this.addToMap(Constants.DATETIME_NAMESPACE, stringToDateTime, dateTimeToString); + + this.addToMap(Constants.DOUBLE_NAMESPACE, double, double); + + this.addToMap(Constants.FLOAT_NAMESPACE, double, double); + + this.addToMap(Constants.OBJECT_NAMESPACE, preObject, postObject); + + this.addToMap(Constants.TIMEZONE_NAMESPACE, stringtoTimeZone, timeZonetoSting); + } + + static preConvertObjectData(obj) { + return obj; + } + + static postConvertObjectData(obj) { + if (Array.isArray(obj) && obj.length > 0) { + let list = []; + + for (let data of obj) { + if (data instanceof Date) { + if (data.getHours() == 0 && data.getMinutes() == 0 && data.getSeconds() == 0) { + list.push(this.postConvert(data, Constants.DATE_NAMESPACE)); + } + else { + list.push(this.postConvert(data, Constants.DATETIME_NAMESPACE)); + } + } + else if (data instanceof Map) { + this.postConvertObjectData(data); + } + else { + list.push(data); + } + } + return list; + } + else if (obj instanceof Map) { + let requestObject = {}; + + for (let key of Array.from(obj.keys())) { + let value = obj.get(key); + + if (Array.isArray(value)) { + requestObject[key] = this.postConvertObjectData(value); + } + else if (value instanceof Date) { + if (value.getHours() == 0 && value.getMinutes() == 0 && value.getSeconds() == 0) { + requestObject[key] = this.postConvert(value, Constants.DATE_NAMESPACE); + } + else { + requestObject[key] = this.postConvert(value, Constants.DATETIME_NAMESPACE); + } + } + else if (value instanceof Map) { + requestObject[key] = this.postConvertObjectData(value); + } + else { + requestObject[key] = value; + } + } + + return requestObject; + } + else if (obj instanceof Date) { + if (obj.getHours() == 0 && obj.getMinutes() == 0 && obj.getSeconds() == 0) { + return this.postConvert(obj, Constants.DATE_NAMESPACE); + } + else { + return this.postConvert(obj, Constants.DATETIME_NAMESPACE); + } + } + else { + return obj; + } + } + + /** + * This method is to add PreConverter and PostConverter instance. + * @param {string} name - A String containing the data type class name. + * @param {object} preConverter - A PreConverter instance. + * @param {object} postConverter - A PostConverter instance. + */ + static addToMap(name, preConverter, postConverter) { + this.preConverterMap.set(name, preConverter); + + this.postConverterMap.set(name, postConverter); + } + + /** + * This method is to convert JSON value to expected data value. + * @param {object} obj - An Object containing the JSON value. + * @param {string} type - A String containing the expected method return type. + * @throws {Error} + */ + static preConvert(obj, type) { + this.init(); + + if (this.preConverterMap.has(type)) { + return this.preConverterMap.get(type)(obj); + } + + return obj; + } + + /** + * This method to convert JavaScript data to JSON data value. + * @param {object} obj - An object containing the JavaScript data value. + * @param {string} type - A String containing the expected method return type. + * @throws {Error} + */ + static postConvert(obj, type) { + this.init(); + + if (this.postConverterMap.has(type)) { + return this.postConverterMap.get(type)(obj); + } + + return obj; + } +} +export { + DatatypeConverter as DatatypeConverter, + DatatypeConverter as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/utils/util/downloader.js b/versions/3.0.0/lib/utils/util/downloader.js new file mode 100644 index 0000000..e6c3858 --- /dev/null +++ b/versions/3.0.0/lib/utils/util/downloader.js @@ -0,0 +1,92 @@ +import {Converter} from "./converter.js"; + +import {StreamWrapper} from "./stream_wrapper.js"; + +import {Initializer} from "../../routes/initializer.js"; + +import {Constants} from "./constants.js"; + + +/** + * This class is to process the download file and stream response. + * @extends Converter + */ +class Downloader extends Converter { + uniqueValuesMap = []; + + constructor(commonApiHandler) { + super(commonApiHandler); + } + + appendToRequest(requestBase, requestObject) { + return; + } + + formRequest(requestObject, pack, instanceNumber, classMemberDetail) { + return null; + } + + getWrappedResponse(response, pack) { + return this.getResponse(response, pack); + } + + async getResponse(response, pack) { + var instance = null; + + var instanceValue = null; + + var recordJsonDetails = Initializer.jsonDetails[pack]; + + if (recordJsonDetails.hasOwnProperty(Constants.INTERFACE) && recordJsonDetails[Constants.INTERFACE]) { + let classes = recordJsonDetails[Constants.CLASSES]; + + for (let index = 0; index < classes.length; index++) { + let className = classes[index]; + + if (className.toString().includes(Constants.FILE_BODY_WRAPPER)) { + return this.getResponse(response, className); + } + } + } + else { + let ClassName = (await import("../../"+pack+".js")).MasterModel; + + instance = new ClassName(); + + for (let memberName in recordJsonDetails) { + var memberJsonDetails = recordJsonDetails[memberName]; + + var type = memberJsonDetails[Constants.TYPE]; + + if (type === Constants.STREAM_WRAPPER_CLASS_PATH) { + + var fileName = ""; + + let contentDisposition = (response.headers[Constants.CONTENT_DISPOSITION]).toString(); + + if (contentDisposition.includes("'")) { + let start_index = contentDisposition.lastIndexOf("'"); + + fileName = contentDisposition.substring(start_index + 1); + } + else if (contentDisposition.includes("\"")) { + let start_index = contentDisposition.lastIndexOf("="); + + fileName = contentDisposition.substring(start_index + 1).replace(/"/g, ""); + } + + instanceValue = new StreamWrapper(fileName, response.rawBody, null); + } + + Reflect.set(instance, memberName, instanceValue); + } + + return instance; + } + } +} + +export { + Downloader as Downloader, + Downloader as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/utils/util/form_data_converter.js b/versions/3.0.0/lib/utils/util/form_data_converter.js new file mode 100644 index 0000000..5b09233 --- /dev/null +++ b/versions/3.0.0/lib/utils/util/form_data_converter.js @@ -0,0 +1,309 @@ +import { Converter } from "./converter.js"; +import { StreamWrapper } from "./stream_wrapper.js"; +import { Initializer } from "../../routes/initializer.js"; +import { Constants } from "./constants.js"; +import formData from "form-data"; +import {SDKException} from "../../core/com/zoho/crm/api/exception/sdk_exception.js"; + +/** + * This class is to process the upload file and stream. + * @extends {Converter} + */ +class FormDataConverter extends Converter { + uniqueValuesMap = []; + + constructor(commonApiHandler) { + super(commonApiHandler); + } + + async appendToRequest(requestBase, requestObject) { + var formDataRequestBody = new formData(); + + await this.addFileBody( + requestBase.getRequestBody(), + formDataRequestBody + ).catch((err) => { + throw err; + }); + + return formDataRequestBody; + } + + async addFileBody(requestObject, formData) { + let requestKeys = Object.keys(requestObject); + + for (let key of requestKeys) { + let value = requestObject[key]; + + if (Array.isArray(value)) { + for (let fileObject of value) { + if (fileObject instanceof StreamWrapper) { + formData.append(key, fileObject.getStream()); + } else { + formData.append(key, fileObject); + } + } + } else if (value instanceof StreamWrapper) { + formData.append(key, value.getStream()); + } else { + formData.append(key, value); + } + } + } + + async formRequest(requestInstance, pack, instanceNumber, classMemberDetail) { + var classDetail = Initializer.jsonDetails[pack]; + + var request = {}; + + if ( + classDetail.hasOwnProperty(Constants.INTERFACE) && + classDetail[Constants.INTERFACE] + ) { + var classes = classDetail[Constants.CLASSES]; + + var baseName = pack.split("/").slice(0, -1); + + let className = this.getFileName(requestInstance.constructor.name); + + baseName.push(className); + + let requestObjectClassName = baseName.join("/"); + + for (let className in classes) { + if (classes[className].toLowerCase() == requestObjectClassName) { + classDetail = Initializer.jsonDetails[requestObjectClassName]; + + break; + } + } + } + + for (let memberName in classDetail) { + var modification = null; + + var memberDetail = classDetail[memberName]; + + if ( + (memberDetail.hasOwnProperty(Constants.READ_ONLY) && + memberDetail[Constants.READ_ONLY] == "true") || + !memberDetail.hasOwnProperty(Constants.NAME) + ) { + continue; + } + + try { + modification = requestInstance.isKeyModified( + memberDetail[Constants.NAME] + ); + } catch (e) { + throw new SDKException( + Constants.EXCEPTION_IS_KEY_MODIFIED, + null, + null, + e + ); + } + + // check required + if ( + (modification == null || modification == 0) && + memberDetail.hasOwnProperty(Constants.REQUIRED) && + memberDetail[Constants.REQUIRED] == "true" + ) { + throw new SDKException( + Constants.MANDATORY_VALUE_ERROR, + Constants.MANDATORY_KEY_ERROR + memberName + ); + } + + var fieldValue = Reflect.get(requestInstance, memberName); + + if ( + modification != null && + modification != 0 && + (await this.valueChecker( + requestInstance.constructor.name, + memberName, + memberDetail, + fieldValue, + this.uniqueValuesMap, + instanceNumber + ).catch((err) => { + throw err; + })) + ) { + var keyName = memberDetail[Constants.NAME]; + + var type = memberDetail[Constants.TYPE]; + + if (type.toLowerCase() == Constants.LIST_NAMESPACE.toLowerCase()) { + request[keyName] = await this.setJSONArray( + fieldValue, + memberDetail + ).catch((err) => { + throw err; + }); + } else if ( + type.toLowerCase() == Constants.MAP_NAMESPACE.toLowerCase() + ) { + request[keyName] = await this.setJSONObject( + fieldValue, + memberDetail + ).catch((err) => { + throw err; + }); + } else if (memberDetail.hasOwnProperty(Constants.STRUCTURE_NAME)) { + request[keyName] = await this.formRequest( + fieldValue, + memberDetail[Constants.STRUCTURE_NAME], + 0, + memberDetail + ).catch((err) => { + throw err; + }); + } else { + request[keyName] = fieldValue; + } + } + } + + return request; + } + + getFileName(name) { + let fileName = []; + + let nameParts = name.split(/([A-Z][a-z]+)/).filter(function (e) { + return e; + }); + + fileName.push(nameParts[0].toLowerCase()); + + for (let i = 1; i < nameParts.length; i++) { + fileName.push(nameParts[i].toLowerCase()); + } + + return fileName.join("_"); + } + + async setJSONObject(fieldValue, memberDetail) { + var jsonObject = {}; + + var requestObject = fieldValue; + + if (memberDetail == null) { + for (let key of Array.from(requestObject.keys())) { + jsonObject[key] = this.redirectorForObjectToJSON( + requestObject.get(key) + ); + } + } else { + var keysDetail = memberDetail[Constants.KEYS]; + + for (let keyIndex = 0; keyIndex < keysDetail.length; keyIndex++) { + let keyDetail = keysDetail[keyIndex]; + + let keyName = keyDetail[Constants.NAME]; + + let keyValue = null; + + if (requestObject.has(keyName) && requestObject.get(keyName) != null) { + if (keyDetail.hasOwnProperty(Constants.STRUCTURE_NAME)) { + keyValue = await this.formRequest( + requestObject.get(keyName), + keyDetail[Constants.STRUCTURE_NAME], + 0, + memberDetail + ).catch((err) => { + throw err; + }); + } else { + keyValue = await this.redirectorForObjectToJSON( + requestObject.get(keyName) + ).catch((err) => { + throw err; + }); + } + } + + jsonObject[keyName] = keyValue; + } + } + + return jsonObject; + } + + async setJSONArray(fieldValue, memberDetail) { + var jsonArray = []; + + var requestObjects = fieldValue; + + if (memberDetail == null) { + for (let request of requestObjects) { + jsonArray.push( + await this.redirectorForObjectToJSON(request).catch((err) => { + throw err; + }) + ); + } + } else { + if (memberDetail.hasOwnProperty(Constants.STRUCTURE_NAME)) { + let instanceCount = 0; + + let pack = memberDetail[Constants.STRUCTURE_NAME]; + + for (let request of requestObjects) { + jsonArray.push( + await this.formRequest( + request, + pack, + instanceCount++, + memberDetail + ).catch((err) => { + throw err; + }) + ); + } + } else { + for (let request of requestObjects) { + jsonArray.push( + await this.redirectorForObjectToJSON(request).catch((err) => { + throw err; + }) + ); + } + } + } + + return jsonArray; + } + + async redirectorForObjectToJSON(request) { + let type = Object.prototype.toString.call(request); + + if (type == Constants.ARRAY_TYPE) { + return await this.setJSONArray(request, null).catch((err) => { + throw err; + }); + } else if (type == Constants.MAP_TYPE) { + return await this.setJSONObject(request, null).catch((err) => { + throw err; + }); + } else { + return request; + } + } + + getWrappedResponse(responseObject, pack) { + return this.getResponse(responseObject, pack); + } + + getResponse(responseJson, pack) { + return null; + } +} +export { + FormDataConverter as FormDataConverter, + FormDataConverter as MasterModel +} diff --git a/versions/3.0.0/lib/utils/util/header_param_validator.js b/versions/3.0.0/lib/utils/util/header_param_validator.js new file mode 100644 index 0000000..b843782 --- /dev/null +++ b/versions/3.0.0/lib/utils/util/header_param_validator.js @@ -0,0 +1,121 @@ +import path from "path"; + +import {Constants} from "./constants.js"; + +import {SDKException} from "../../core/com/zoho/crm/api/exception/sdk_exception.js"; + +import {DatatypeConverter as DataTypeConverter} from "./datatype_converter.js"; + +import {Utility} from "./utility.js"; + +import * as url from "url"; + +const __dirname = url.fileURLToPath(new URL('.', import.meta.url)); + +/** + * This class validates the Header and Parameter values with the type accepted by the CRM APIs. + */ +class HeaderParamValidator { + async validate(headerParam, value) { + let name = headerParam.getName(); + + let className = headerParam.getClassName(); + + let jsonDetails = await this.getJSONDetails().catch(err=>{throw err;}); + + let jsonClassName = await this.getFileName(className); + + let typeDetail = null; + + if (jsonDetails.hasOwnProperty(jsonClassName)) { + typeDetail = await this.getKeyJSONDetails(name, jsonDetails[jsonClassName]).catch(err=>{throw err;}); + } + + if (typeDetail != null) { + if (!await this.checkDataType(typeDetail, value)) { + let type = jsonClassName != null && jsonClassName.endsWith("param") ? "PARAMETER" : "HEADER"; + + let detailsJO = {}; + + detailsJO[type] = name; + + detailsJO[Constants.CLASS_KEY] = className; + + detailsJO[Constants.ERROR_HASH_EXPECTED_TYPE] = Constants.SPECIAL_TYPES.has(typeDetail[Constants.TYPE]) ? Constants.SPECIAL_TYPES.get(typeDetail[Constants.TYPE]) : typeDetail[Constants.TYPE]; + + throw new SDKException(Constants.TYPE_ERROR, null, detailsJO, null); + } + else { + value = DataTypeConverter.postConvert(value, typeDetail[Constants.TYPE]); + } + } + + return value; + } + + async getJSONDetails() { + let Initializer = (await import("../../routes/initializer.js")).Initializer; + + if (Initializer.jsonDetails == null) { + Initializer.jsonDetails = await Initializer.getJSON(path.join(__dirname, "..", "..", Constants.CONFIG_DIRECTORY, Constants.JSON_DETAILS_FILE_PATH)); + } + + return Initializer.jsonDetails; + } + + async getFileName(name) { + let spl = name.toString().split("."); + let className = await this.getSplitFileName(spl.pop()); + let resourceName = await this.getSplitFileName(spl.pop()); + return "core/" + spl.join("/").toLowerCase() + "/" + resourceName.join("_") + "/" + className.join("_"); + } + + async getSplitFileName(className) { + let fileName = [] + let nameParts = className.split(/([A-Z][a-z]+)/).filter(function (e) { return e }); + + fileName.push(nameParts[0].toLowerCase()); + + for (let i = 1; i < nameParts.length; i++) { + fileName.push(nameParts[i].toLowerCase()); + } + + return fileName; + } + + async getKeyJSONDetails(name, jsonDetails) { + let keyArray = Array.from(Object.keys(jsonDetails)); + for (let index = 0; index < keyArray.length; index++) { + const key = keyArray[index]; + + let detail = jsonDetails[key]; + + if (detail.hasOwnProperty(Constants.NAME) && detail[Constants.NAME].toLowerCase() == name.toLowerCase()) { + return detail; + } + } + } + + async checkDataType(keyDetail, value) { + let type = keyDetail[Constants.TYPE]; + + let dataType = Constants.SPECIAL_TYPES.has(type) ? Constants.SPECIAL_TYPES.get(type) : type; + + if (Constants.TYPE_VS_DATATYPE.has(dataType.toLowerCase())) { + if (type == Constants.INTEGER_NAMESPACE) { + return Utility.checkInteger(value); + } + if (Object.prototype.toString.call(value) != Constants.TYPE_VS_DATATYPE.get(type.toLowerCase())) { + return false; + } + } + + return true; + } +} + + +export { + HeaderParamValidator as HeaderParamValidator, + HeaderParamValidator as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/utils/util/json_converter.js b/versions/3.0.0/lib/utils/util/json_converter.js new file mode 100644 index 0000000..825d6c8 --- /dev/null +++ b/versions/3.0.0/lib/utils/util/json_converter.js @@ -0,0 +1,1280 @@ +import {Converter} from "./converter.js"; +import {Initializer} from "../../routes/initializer.js"; +import {SDKException} from "../../core/com/zoho/crm/api/exception/sdk_exception.js"; +import {DatatypeConverter} from "./datatype_converter.js"; +import {join} from "path"; +import {Constants} from "./constants.js"; +import {Utility} from "./utility.js"; +import {Record} from "../../core/com/zoho/crm/api/record/record.js"; +import {Choice} from "./choice.js"; +import {writeFileSync} from "fs"; + +/** + * This class processes the API response to the object and an object to a JSON object, containing the request body. + */ +class JSONConverter extends Converter { + uniqueValuesMap = {}; + + constructor(commonAPIHandler) { + super(commonAPIHandler); + } + + async appendToRequest(requestBase, requestObject) { + return JSON.stringify(requestBase.getRequestBody()) || null; + } + + async formRequest(requestInstance, pack, instanceNumber, memberDetail) { + var classDetail = Initializer.jsonDetails[pack]; + + if (classDetail.hasOwnProperty(Constants.INTERFACE) && classDetail[Constants.INTERFACE]) + { + var classes = classDetail[Constants.CLASSES]; + + var baseName = pack.split("/").slice(0, -1); + + let className = this.getFileName(requestInstance.constructor.name); + + baseName.push(className); + + let fileName = requestInstance.constructor.name; + + fileName = fileName.split(/(?=[A-Z])/); + + baseName[5]=fileName[0].toLowerCase() + "_" + fileName[1].toLowerCase() + "s"; + + let requestObjectClassName = baseName.join("/"); + + for (let className1 in classes) { + if (classes[className1].toLowerCase() == requestObjectClassName) { + classDetail = Initializer.jsonDetails[requestObjectClassName]; + + break; + } + } + } + + if (requestInstance instanceof Record) { + let moduleAPIName = this.commonAPIHandler.getModuleAPIName(); + + let returnJSON = await this.isRecordRequest(requestInstance, classDetail, instanceNumber, memberDetail).catch((err) => {throw err;}); + + this.commonAPIHandler.setModuleAPIName(moduleAPIName); + + return returnJSON; + } else + { + return await this.isNotRecordRequest(requestInstance, classDetail, instanceNumber, memberDetail).catch((err) => {throw err;}); + } + } + + async isNotRecordRequest(requestInstance, classDetail, instanceNumber, classMemberDetail) + { + var lookUp = false; + + var skipMandatory = false; + + var classMemberName = null; + + if (classMemberDetail != null) { + lookUp = classMemberDetail.hasOwnProperty(Constants.LOOKUP) + ? classMemberDetail[Constants.LOOKUP] + : false; + + skipMandatory = classMemberDetail.hasOwnProperty(Constants.SKIP_MANDATORY) + ? classMemberDetail[Constants.SKIP_MANDATORY] + : false; + + classMemberName = this.buildName(classMemberDetail[Constants.NAME]); + } + + var requestJSON = {}; + + var primaryKeys = new Map(); + + var requiredKeys = new Map(); + + var requiredInUpdateKeys = new Map(); + + for (let memberName in classDetail) { + var modification = null; + + var memberDetail = classDetail[memberName]; + + if ( + (memberDetail.hasOwnProperty(Constants.READ_ONLY) && + memberDetail[Constants.READ_ONLY] == "true") || + !memberDetail.hasOwnProperty(Constants.NAME) + ) { + // read only or no keyName + continue; + } + + var keyName = memberDetail[Constants.NAME]; + + try { + modification = requestInstance.isKeyModified(keyName); + } catch (ex) { + throw new SDKException( + Constants.EXCEPTION_IS_KEY_MODIFIED, + null, + null, + ex + ); + } + + if ( + memberDetail.hasOwnProperty(Constants.REQUIRED) && + memberDetail[Constants.REQUIRED] == true + ) { + requiredKeys.set(keyName, true); + } + + if ( + memberDetail.hasOwnProperty(Constants.PRIMARY) && + memberDetail[Constants.PRIMARY] == true && + (!memberDetail.hasOwnProperty(Constants.REQUIRED_IN_UPDATE) || + memberDetail[Constants.REQUIRED_IN_UPDATE] == true) + ) { + primaryKeys.set(keyName, true); + } + + if ( + memberDetail.hasOwnProperty(Constants.REQUIRED_IN_UPDATE) && + memberDetail[Constants.REQUIRED_IN_UPDATE] == true + ) { + requiredInUpdateKeys.set(keyName, true); + } + + var fieldValue = null; + + if (modification != null && modification != 0) { + fieldValue = Reflect.get(requestInstance, memberName); + if (fieldValue != null) { + + if (await this.valueChecker(requestInstance.constructor.name, memberName, memberDetail, fieldValue, this.uniqueValuesMap, instanceNumber).catch((err) => {throw err;})) { + requiredKeys.delete(keyName); + + primaryKeys.delete(keyName); + + requiredInUpdateKeys.delete(keyName); + } + } + requestJSON[keyName] = await this.setData(memberDetail, fieldValue).catch((err) => {throw err;}); + } + } + + if ( + skipMandatory || + this.checkException( + classMemberName, + requestInstance, + instanceNumber, + lookUp, + requiredKeys, + primaryKeys, + requiredInUpdateKeys + ) === true + ) { + return requestJSON; + } + } + + checkException( + memberName, + requestInstance, + instanceNumber, + lookUp, + requiredKeys, + primaryKeys, + requiredInUpdateKeys + ) { + if ( + requiredInUpdateKeys.size > 0 && + this.commonAPIHandler.getCategoryMethod() != null && + this.commonAPIHandler.getCategoryMethod().toUpperCase() == + Constants.REQUEST_CATEGORY_UPDATE + ) { + let error = {}; + + error.field = memberName; + + error.type = requestInstance.constructor.name; + + error.keys = Array.from(requiredInUpdateKeys.keys()).toString(); + + if (instanceNumber != null) { + error.instance_number = instanceNumber; + } + + throw new SDKException( + Constants.MANDATORY_VALUE_ERROR, + Constants.MANDATORY_KEY_ERROR, + error, + null + ); + } + + if ( + this.commonAPIHandler.isMandatoryChecker() != null && + this.commonAPIHandler.isMandatoryChecker() + ) { + if ( + this.commonAPIHandler.getCategoryMethod().toUpperCase() == + Constants.REQUEST_CATEGORY_CREATE + ) { + if (lookUp) { + if (primaryKeys.size > 0) { + let error = {}; + + error.field = memberName; + + error.type = requestInstance.constructor.name; + + error.keys = Array.from(primaryKeys.keys()).toString(); + + if (instanceNumber != null) { + error.instance_number = instanceNumber; + } + + throw new SDKException( + Constants.MANDATORY_VALUE_ERROR, + Constants.PRIMARY_KEY_ERROR, + error, + null + ); + } + } else if (requiredKeys.size > 0) { + let error = {}; + + error.field = memberName; + + error.type = requestInstance.constructor.name; + + error.keys = Array.from(requiredKeys.keys()).toString(); + + if (instanceNumber != null) { + error.instance_number = instanceNumber; + } + + throw new SDKException( + Constants.MANDATORY_VALUE_ERROR, + Constants.MANDATORY_KEY_ERROR, + error, + null + ); + } + } + + if ( + this.commonAPIHandler.getCategoryMethod().toUpperCase() == + Constants.REQUEST_CATEGORY_UPDATE && + primaryKeys.size > 0 + ) { + let error = {}; + + error.field = memberName; + + error.type = requestInstance.constructor.name; + + error.keys = Array.from(primaryKeys.keys()).toString(); + + if (instanceNumber != null) { + error.instance_number = instanceNumber; + } + + throw new SDKException( + Constants.MANDATORY_VALUE_ERROR, + Constants.PRIMARY_KEY_ERROR, + error, + null + ); + } + } else if ( + lookUp && + this.commonAPIHandler.getCategoryMethod().toUpperCase() == + Constants.REQUEST_CATEGORY_UPDATE + ) { + if (primaryKeys.size > 0) { + let error = {}; + + error.field = memberName; + + error.type = requestInstance.constructor.name; + + error.keys = Array.from(primaryKeys.keys()).toString(); + + if (instanceNumber != null) { + error.instance_number = instanceNumber; + } + + throw new SDKException( + Constants.MANDATORY_VALUE_ERROR, + Constants.PRIMARY_KEY_ERROR, + error, + null + ); + } + } + + return true; + } + + async isRecordRequest( + recordInstance, + classDetail, + instanceNumber, + memberDetail + ) { + var lookUp = false; + + var skipMandatory = false; + + var classMemberName = null; + + if (memberDetail != null) { + lookUp = memberDetail.hasOwnProperty(Constants.LOOKUP) + ? memberDetail[Constants.LOOKUP] + : false; + + skipMandatory = memberDetail.hasOwnProperty(Constants.SKIP_MANDATORY) + ? memberDetail[Constants.SKIP_MANDATORY] + : false; + + classMemberName = this.buildName(memberDetail[Constants.NAME]); + } + + var requestJSON = {}; + + var moduleDetail = {}; + + var moduleAPIName = this.commonAPIHandler.getModuleAPIName(); + + if (moduleAPIName != null) + { + // entry + this.commonAPIHandler.setModuleAPIName(null); + + moduleDetail = await this.getModuleDetailFromUserSpecJSON(moduleAPIName).catch((err) => {throw err;}); + } + else { + // inner case + moduleDetail = classDetail; + + classDetail = Initializer.jsonDetails[Constants.RECORD_NAMESPACE]; + } // class detail must contain record structure at this point + + let uniqueValues = new Map(); + + var keyValues = Reflect.get(recordInstance, Constants.KEY_VALUES); + + var keyModified = Reflect.get(recordInstance, Constants.KEY_MODIFIED); + + var requiredKeys = new Map(); + + var primaryKeys = new Map(); + + if (!skipMandatory) { + for (let keyName of Object.keys(moduleDetail)) { + const keyDetail = moduleDetail[keyName]; + + let name = keyDetail[Constants.NAME]; + + if ( + keyDetail != null && + keyDetail.hasOwnProperty(Constants.REQUIRED) && + keyDetail[Constants.REQUIRED] == true + ) { + requiredKeys.set(name, true); + } + + if ( + keyDetail != null && + keyDetail.hasOwnProperty(Constants.PRIMARY) && + keyDetail[Constants.PRIMARY] == true + ) { + primaryKeys.set(name, true); + } + } + + for (let keyName of Object.keys(classDetail)) { + const keyDetail = classDetail[keyName]; + + let name = keyDetail[Constants.NAME]; + + if ( + keyDetail.hasOwnProperty(Constants.REQUIRED) && + keyDetail[Constants.REQUIRED] == true + ) { + requiredKeys.set(name, true); + } + + if ( + keyDetail.hasOwnProperty(Constants.PRIMARY) && + keyDetail[Constants.PRIMARY] == true + ) { + primaryKeys.set(name, true); + } + } + } + + for (let keyName of Array.from(keyModified.keys())) { + if (keyModified.get(keyName) != 1) { + continue; + } + + let keyDetail = {}; + + let keyValue = keyValues.has(keyName) ? keyValues.get(keyName) : null; + + let jsonValue = null; + + if (keyValue != null) { + requiredKeys.delete(keyName); + + primaryKeys.delete(keyName); + } + + let memberName = this.buildName(keyName); + + var customHandling = false; + + if (moduleDetail != null && Object.keys(moduleDetail).length > 0 && (moduleDetail.hasOwnProperty(keyName) || moduleDetail.hasOwnProperty(memberName))) + { + if (moduleDetail.hasOwnProperty(keyName)) { + keyDetail = moduleDetail[keyName]; // incase of user spec json + } else { + keyDetail = moduleDetail[memberName]; // json details + } + } + else if (classDetail.hasOwnProperty(memberName)) { + keyDetail = classDetail[memberName]; + } else { + customHandling = true; + } + if (keyValue != null) + { + + if (Object.keys(keyDetail).length > 0) + { + if ((keyDetail.hasOwnProperty(Constants.READ_ONLY) && (keyDetail[Constants.READ_ONLY] == true || keyDetail[Constants.READ_ONLY] == "true")) || !keyDetail.hasOwnProperty(Constants.NAME)) { + // read only or no keyName + continue; + } + + if (await this.valueChecker(recordInstance.constructor.name, memberName, keyDetail, keyValue, uniqueValues, instanceNumber).catch((err) => { + throw err; + })) { + jsonValue = await this.setData(keyDetail, keyValue).catch((err) => { + throw err; + }); + } + } + else + { + if (customHandling && !(Array.isArray(keyValue)) && !(keyValue instanceof Map) && !(keyValue instanceof Choice)) + { + let key = await this.keyINJSONDetails(keyValue.constructor.name); + + if (keyValue instanceof Date) + { + if (keyValue.getHours() == 0 && keyValue.getMinutes() == 0 && keyValue.getSeconds() == 0) + { + jsonValue = DatatypeConverter.postConvert(keyValue, "Date"); + } + else + { + jsonValue = DatatypeConverter.postConvert(keyValue, "DateTime"); + } + } + if (Constants.PRIMITIVE_TYPES.includes(typeof keyValue)) + { + keyDetail[Constants.TYPE] = typeof keyValue; + + jsonValue = await this.setData(keyDetail, keyValue).catch((err) => { + throw err + }); + } + else if (key != null) + { + keyDetail[Constants.STRUCTURE_NAME] = key; + + keyDetail[Constants.NAME] = keyName; + + keyDetail[Constants.TYPE] = key; + + jsonValue = await this.setData(keyDetail, keyValue).catch((err) => { + throw err + }); + } + } + else + { + if (customHandling && keyValue.constructor.name == Constants.ARRAY_KEY) { + let key1 = await this.keyINJSONDetails(keyValue[0].constructor.name); + if (key1 != null) { + keyDetail[Constants.STRUCTURE_NAME] = key1; + + keyDetail[Constants.NAME] = keyName; + + keyDetail[Constants.TYPE] = key1; + + jsonValue = await this.setJSONArray(keyValue, keyDetail); + } else { + jsonValue = await this.redirectorForObjectToJSON(keyValue).catch((err) => { + throw err; + }); + } + } else { + jsonValue = await this.redirectorForObjectToJSON(keyValue).catch((err) => { + throw err; + }); + } + } + } + } + else + { + jsonValue = null + } + requestJSON[keyName] = jsonValue; + } + + if (skipMandatory === true || this.checkException(classMemberName, recordInstance, instanceNumber, lookUp, requiredKeys, primaryKeys, new Map())) { + return requestJSON; + } + + return requestJSON; + } + + async keyINJSONDetails(className) + { + let jsondetails = Initializer.jsonDetails; + + for (var key in jsondetails){ + + let arr = key.split("/"); + + let fileName = arr[arr.length-1]; + + fileName = fileName.split("_").join(""); + + if (fileName.toLowerCase() == className.toLowerCase()) + { + return key; + } + } + return null; + } + + async setData(memberDetail, fieldValue) { + if (fieldValue != null) { + let type = memberDetail[Constants.TYPE].toString(); + + if (type.toLowerCase() == Constants.LIST_NAMESPACE.toLowerCase()) { + return await this.setJSONArray(fieldValue, memberDetail).catch( + (err) => { + throw err; + } + ); + } else if (type.toLowerCase() == Constants.MAP_NAMESPACE.toLowerCase()) { + return await this.setJSONObject(fieldValue, memberDetail).catch( + (err) => { + throw err; + } + ); + } else if ( + type == Constants.CHOICE_NAMESPACE || + (memberDetail.hasOwnProperty(Constants.STRUCTURE_NAME) && + memberDetail[Constants.STRUCTURE_NAME] == Constants.CHOICE_NAMESPACE) + ) { + return fieldValue.getValue(); + } else if ( + memberDetail.hasOwnProperty(Constants.STRUCTURE_NAME) && + memberDetail.hasOwnProperty(Constants.MODULE) + ) { + return await this.isRecordRequest( + fieldValue, + await this.getModuleDetailFromUserSpecJSON( + memberDetail[Constants.MODULE] + ).catch((err) => { + throw err; + }), + null, + memberDetail + ).catch((err) => { + throw err; + }); + } else if (memberDetail.hasOwnProperty(Constants.STRUCTURE_NAME)) { + return await this.formRequest( + fieldValue, + memberDetail[Constants.STRUCTURE_NAME], + null, + memberDetail + ).catch((err) => { + throw err; + }); + } else { + return DatatypeConverter.postConvert(fieldValue, type); + } + } + + return null; + } + + async setJSONObject(requestObject, memberDetail) { + var jsonObject = {}; + + if (Array.from(requestObject.keys()).length > 0) { + if ( + memberDetail == null || + (memberDetail != null && !memberDetail.hasOwnProperty(Constants.KEYS)) + ) { + for (let key of Array.from(requestObject.keys())) { + jsonObject[key] = await this.redirectorForObjectToJSON( + requestObject.get(key) + ).catch((err) => { + throw err; + }); + } + } else { + if ( + memberDetail !== null && + memberDetail.hasOwnProperty(Constants.KEYS) + ) { + var keysDetail = memberDetail[Constants.KEYS]; + + for (let keyIndex = 0; keyIndex < keysDetail.length; keyIndex++) { + let keyDetail = keysDetail[keyIndex]; + + let keyName = keyDetail[Constants.NAME]; + + let keyValue = null; + + if ( + requestObject.has(keyName) && + requestObject.get(keyName) != null + ) { + keyValue = await this.setData( + keyDetail, + requestObject.get(keyName) + ).catch((err) => { + throw err; + }); + + jsonObject[keyName] = keyValue; + } + } + } + } + } + + return jsonObject; + } + + async setJSONArray(requestObjects, memberDetail) { + var jsonArray = []; + + if (requestObjects.length > 0) { + if (memberDetail == null || (memberDetail != null && !memberDetail.hasOwnProperty(Constants.STRUCTURE_NAME))) + { + for (let request of requestObjects) { + jsonArray.push(await this.redirectorForObjectToJSON(request)); + } + } + else { + let pack = memberDetail[Constants.STRUCTURE_NAME].toString(); + + if (pack == Constants.CHOICE_NAMESPACE) + { + for (let request of requestObjects) + { + jsonArray.push(request.getValue()); + } + } + else if + ( + memberDetail.hasOwnProperty(Constants.MODULE) && + memberDetail[Constants.MODULE] != null + ) { + let instanceCount = 0; + + for (let request of requestObjects) { + jsonArray.push( + await this.isRecordRequest( + request, + await this.getModuleDetailFromUserSpecJSON( + memberDetail[Constants.MODULE] + ).catch((err) => { + throw err; + }), + instanceCount++, + memberDetail + ).catch((err) => { + throw err; + }) + ); + } + } else { + let instanceCount = 0; + + for (let request of requestObjects) { + jsonArray.push( + await this.formRequest( + request, + pack, + instanceCount++, + memberDetail + ).catch((err) => { + throw err; + }) + ); + } + } + } + } + + return jsonArray; + } + + async redirectorForObjectToJSON(request) { + if (Array.isArray(request)) { + return await this.setJSONArray(request, null).catch((err) => { + throw err; + }); + } else if (request instanceof Map) { + return await this.setJSONObject(request, null).catch((err) => { + throw err; + }); + } + else if (request instanceof Choice) + { + return request.getValue(); + } + else { + return request; + } + } + + async getWrappedResponse(response, pack) { + if (response.body.length != 0) { + var responseJson = JSON.parse(response.body); + + return await this.getResponse(responseJson, pack).catch((err) => { + throw err; + }); + } + + return null; + } + + async getResponse(responseJson, packageName) { + var instance = null; + + if (responseJson == null || responseJson == "" || responseJson.length == 0) + { + return instance; + } + + var classDetail = Initializer.jsonDetails[packageName]; + + if (classDetail.hasOwnProperty(Constants.INTERFACE) && classDetail[Constants.INTERFACE]) + { + let classes = classDetail[Constants.CLASSES]; + + instance = await this.findMatch(classes, responseJson).catch((err) => {throw err;}); // findmatch returns instance(calls getresponse() recursively) + } + else + { + let ClassName = (await import("../../".concat(packageName).concat(".js"))).MasterModel; + + instance = new ClassName(); + + if (instance instanceof Record) + { + // if record -> based on response json data will be assigned to field Values + let moduleAPIName = this.commonAPIHandler.getModuleAPIName(); + + instance = await this.isRecordResponse(responseJson, classDetail, packageName).catch((err) => {throw err;}); + + this.commonAPIHandler.setModuleAPIName(moduleAPIName); + } + else + { + instance = await this.notRecordResponse(instance, responseJson, classDetail).catch((err) => {throw err;}); // based on json details data will be assigned + } + } + return instance; + } + + async notRecordResponse(instance, responseJSON, classDetail) + { + for (let memberName in classDetail) { + let keyDetail = classDetail[memberName]; + + let keyName = keyDetail.hasOwnProperty(Constants.NAME) + ? keyDetail[Constants.NAME] + : null; // api-name of the member + + if ( + keyName != null && + responseJSON.hasOwnProperty(keyName) && + responseJSON[keyName] !== null + ) { + let keyData = responseJSON[keyName]; + + let memberValue = await this.getData(keyData, keyDetail).catch( + (err) => { + throw err; + } + ); + + Reflect.set(instance, memberName, memberValue); + } + } + return instance; + } + + async isRecordResponse(responseJson, classDetail, pack) { + + let className = (await import("../../"+pack+".js")).MasterModel; + + let recordInstance = new className(); + + let moduleAPIName = this.commonAPIHandler.getModuleAPIName(); + + let moduleDetail = {}; + + if (moduleAPIName != null) { + // entry + this.commonAPIHandler.setModuleAPIName(null); + moduleDetail = await this.getModuleDetailFromUserSpecJSON(moduleAPIName).catch((err) => {throw err;}); + } + for (let key in classDetail) { + if (moduleDetail == null){ + moduleDetail = {} + } + moduleDetail[key] = classDetail[key]; + } + + var recordDetail = Initializer.jsonDetails[Constants.RECORD_NAMESPACE]; + + var keyValues = new Map(); + + for (let keyName in responseJson) { + let memberName = this.buildName(keyName); + + let keyDetail = {}; + + if ( + moduleDetail != null && + Object.keys(moduleDetail).length > 0 && + (moduleDetail.hasOwnProperty(keyName) || + moduleDetail.hasOwnProperty(memberName)) + ) { + if (moduleDetail.hasOwnProperty(keyName)) { + keyDetail = moduleDetail[keyName]; + } else { + keyDetail = moduleDetail[memberName]; + } + } else if (recordDetail.hasOwnProperty(memberName)) { + keyDetail = recordDetail[memberName]; + } + + let keyValue = null; + + let keyData = responseJson[keyName]; + + if (keyDetail != null && Object.keys(keyDetail).length > 0) { + keyName = keyDetail[Constants.NAME]; + + keyValue = await this.getData(keyData, keyDetail).catch((err) => { + throw err; + }); + } else { + // if not key detail + keyValue = await this.redirectorForJSONToObject(keyData).catch( + (err) => { + throw err; + } + ); + } + + keyValues.set(keyName, keyValue); + } + + Reflect.set(recordInstance, Constants.KEY_VALUES, keyValues); + + return recordInstance; + } + + async getData(keyData, memberDetail) { + let memberValue = null; + + if (keyData != null) { + let type = memberDetail[Constants.TYPE].toString(); + + if (type.toLowerCase() == Constants.LIST_NAMESPACE.toLowerCase()) { + memberValue = await this.getCollectionsData( + keyData, + memberDetail + ).catch((err) => { + throw err; + }); + } else if (type.toLowerCase() == Constants.MAP_NAMESPACE.toLowerCase()) { + memberValue = await this.getMapData(keyData, memberDetail).catch( + (err) => { + throw err; + } + ); + } else if ( + type == Constants.CHOICE_NAMESPACE || + (memberDetail.hasOwnProperty(Constants.STRUCTURE_NAME) && + memberDetail[Constants.STRUCTURE_NAME] == Constants.CHOICE_NAMESPACE) + ) { + let Choice = (await import(Constants.CHOICE_PATH+".js")).MasterModel; + memberValue = new Choice(keyData); + } else if ( + memberDetail.hasOwnProperty(Constants.STRUCTURE_NAME) && + memberDetail.hasOwnProperty(Constants.MODULE) + ) { + memberValue = await this.isRecordResponse( + keyData, + await this.getModuleDetailFromUserSpecJSON( + memberDetail[Constants.MODULE] + ).catch((err) => { + throw err; + }), + memberDetail[Constants.STRUCTURE_NAME] + ).catch((err) => { + throw err; + }); + } else if (memberDetail.hasOwnProperty(Constants.STRUCTURE_NAME)) { + memberValue = await this.getResponse( + keyData, + memberDetail[Constants.STRUCTURE_NAME] + ).catch((err) => { + throw err; + }); + } else { + memberValue = await DatatypeConverter.preConvert(keyData, type); + } + } + + return memberValue; + } + + async getMapData(response, memberDetail) { + var mapInstance = new Map(); + + if (Object.keys(response).length > 0) { + if ( + memberDetail == null || + (memberDetail != null && !memberDetail.hasOwnProperty(Constants.KEYS)) + ) { + for (let key in response) { + mapInstance.set( + key, + await this.redirectorForJSONToObject(response[key]).catch((err) => { + throw err; + }) + ); + } + } else { + // member must have keys + if (memberDetail.hasOwnProperty(Constants.KEYS)) { + var keysDetail = memberDetail[Constants.KEYS]; + + for (let keyIndex = 0; keyIndex < keysDetail.length; keyIndex++) { + var keyDetail = keysDetail[keyIndex]; + + var keyName = keyDetail[Constants.NAME]; + + var keyValue = null; + + if (response.hasOwnProperty(keyName) && response[keyName] != null) { + keyValue = await this.getData(response[keyName], keyDetail).catch( + (err) => { + throw err; + } + ); + + mapInstance.set(keyName, keyValue); + } + } + } + } + } + + return mapInstance; + } + + async getCollectionsData(responses, memberDetail) { + var values = new Array(); + + if (responses.length > 0) { + if ( + memberDetail == null || + (memberDetail != null && + !memberDetail.hasOwnProperty(Constants.STRUCTURE_NAME)) + ) { + for (let response of responses) { + values.push( + await this.redirectorForJSONToObject(response).catch((err) => { + throw err; + }) + ); + } + } else { + // need to have structure Name in memberDetail + var pack = memberDetail[Constants.STRUCTURE_NAME]; + + if (pack == Constants.CHOICE_NAMESPACE) { + for (let response of responses) { + + let choiceClass = (await import(Constants.CHOICE_PATH+".js")).MasterModel; + + let choiceInstance = new choiceClass(response); + + values.push(choiceInstance); + } + } else if ( + memberDetail.hasOwnProperty(Constants.MODULE) && + memberDetail[Constants.MODULE] != null + ) { + for (let response of responses) { + values.push( + await this.isRecordResponse( + response, + await this.getModuleDetailFromUserSpecJSON( + memberDetail[Constants.MODULE] + ).catch((err) => { + throw err; + }), + pack + ).catch((err) => { + throw err; + }) + ); + } + } else { + for (let response of responses) { + values.push( + await this.getResponse(response, pack).catch((err) => { + throw err; + }) + ); + } + } + } + } + + return values; + } + + async getModuleDetailFromUserSpecJSON(module) { + let initializer = await Initializer.getInitializer(); + + var recordFieldDetailsPath = join(await this.getEncodedFileName().catch((err) => {throw err;})); + + var moduleDetailFromUserSpecJSON = Initializer.getJSON(recordFieldDetailsPath) + + var moduleDetail = await Utility.getJSONObject(moduleDetailFromUserSpecJSON, module) + + if (moduleDetail != null && Object.keys(moduleDetail).length == 0) + { + try { + delete moduleDetailFromUserSpecJSON[module.toLowerCase()]; + writeFileSync(recordFieldDetailsPath, JSON.stringify(moduleDetailFromUserSpecJSON)) + } + catch (e) { + throw e; + } + } + return moduleDetail; + } + + async redirectorForJSONToObject(keyData) { + let type = Object.prototype.toString.call(keyData); + + if (type == Constants.OBJECT_TYPE) { + return await this.getMapData(keyData, null).catch((err) => { + throw err; + }); + } else if (type == Constants.ARRAY_TYPE) { + return await this.getCollectionsData(keyData, null).catch((err) => { + throw err; + }); + } else { + return keyData; + } + } + + async findMatch(classes, responseJson) { + let pack = ""; + + let ratio = 0; + + for (let className of classes) { + var matchRatio = await this.findRatio(className, responseJson); + + if (matchRatio == 1.0) { + pack = className; + + ratio = 1; + + break; + } else if (matchRatio > ratio) { + ratio = matchRatio; + + pack = className; + } + } + + return this.getResponse(responseJson, pack); + } + + findRatio(className, responseJson) { + var classDetail = Initializer.jsonDetails[className]; + + var totalPoints = Array.from(Object.keys(classDetail)).length; + + var matches = 0; + + if (totalPoints == 0) { + return 0; + } else { + for (let memberName in classDetail) { + var memberDetail = classDetail[memberName]; + + var keyName = memberDetail.hasOwnProperty(Constants.NAME) + ? memberDetail[Constants.NAME] + : null; + + if ( + keyName != null && + responseJson.hasOwnProperty(keyName) && + responseJson[keyName] != null + ) { + // key not empty + var keyData = responseJson[keyName]; + + let type = Object.prototype.toString.call(keyData); + + let structureName = memberDetail.hasOwnProperty( + Constants.STRUCTURE_NAME + ) + ? memberDetail[Constants.STRUCTURE_NAME] + : null; + + if (type == Constants.OBJECT_TYPE) { + type = Constants.MAP_TYPE; + } + + if ( + Constants.TYPE_VS_DATATYPE.has( + memberDetail[Constants.TYPE].toLowerCase() + ) && + Constants.TYPE_VS_DATATYPE.get( + memberDetail[Constants.TYPE].toLowerCase() + ) == type + ) { + matches++; + } else if ( + keyName.toLowerCase() == Constants.COUNT && + memberDetail[Constants.TYPE].toLowerCase() == + Constants.LONG_NAMESPACE.toLowerCase() && + type == Constants.NUMBER_TYPE + ) { + matches++; + } else if ( + memberDetail[Constants.TYPE] == Constants.CHOICE_NAMESPACE + ) { + let values = memberDetail[Constants.VALUES]; + + for (let value in values) { + if (keyData == values[value]) { + matches++; + + break; + } + } + } + + if ( + structureName != null && + structureName == memberDetail[Constants.TYPE] + ) { + if (memberDetail.hasOwnProperty(Constants.VALUES)) { + let values = memberDetail[Constants.VALUES]; + + for (let value in values) { + if (keyData == values[value]) { + matches++; + + break; + } + } + } else { + matches++; + } + } + } + } + } + + return matches / totalPoints; + } + + buildName(memberName) { + let name = memberName.toLowerCase().split("_"); + + var index = 0; + + if (name.length == 0) { + index = 1; + } + + var sdkName = name[0]; + + if (sdkName.length != 0 && name[0].length != 0) + { + sdkName = sdkName[0].toLowerCase() + sdkName.slice(1); + } + index = 1; + + for (var nameIndex = index; nameIndex < name.length; nameIndex++) { + var fieldName = name[nameIndex]; + + var firstLetterUppercase = ""; + + if (fieldName.length > 0) { + firstLetterUppercase = fieldName[0].toUpperCase() + fieldName.slice(1); + } + + sdkName = sdkName.concat(firstLetterUppercase); + } + + return sdkName; + } + + getFileName(name) { + let fileName = []; + + let nameParts = name.split(/([A-Z][a-z]+)/).filter(function (e) { + return e; + }); + + fileName.push(nameParts[0].toLowerCase()); + + for (let i = 1; i < nameParts.length; i++) { + fileName.push(nameParts[i].toLowerCase()); + } + + return fileName.join("_"); + } +} + +export { + JSONConverter as JSONConverter, + JSONConverter as MasterModel +} diff --git a/versions/3.0.0/lib/utils/util/module_fields_handler.js b/versions/3.0.0/lib/utils/util/module_fields_handler.js new file mode 100644 index 0000000..65b83da --- /dev/null +++ b/versions/3.0.0/lib/utils/util/module_fields_handler.js @@ -0,0 +1,167 @@ +import { Converter } from "./converter.js"; +import { existsSync, unlinkSync, readdirSync, writeFileSync } from "fs"; +import { join, resolve } from "path"; +import { Initializer } from "../../routes/initializer.js"; +import pkg from "winston"; +const Logger = pkg; +import { SDKException } from "../../core/com/zoho/crm/api/exception/sdk_exception.js"; +import { Constants } from "./constants.js"; +import { Utility } from "./utility.js"; +import {JSONConverter} from "../../zohocrmsdk.js"; + +/** + * The class contains methods to manipulate the module fields only when autoRefreshFields is set to false in Initializer. + */ +class ModuleFieldsHandler { + /** + * The method to obtain resources directory path. + * @returns {String} A String representing the directory's absolute path. + */ + static async getDirectory() { + let initializer = await Initializer.getInitializer(); + + return join( + initializer.getResourcePath(), + Constants.FIELD_DETAILS_DIRECTORY + ); + } + + /** + * The method to delete fields JSON File of the current user. + * @throws {SDKException} + */ + static async deleteFieldsFile() { + try { + // let recordFieldDetailsPath = join( + // await ModuleFieldsHandler.getDirectory(), + // await new Converter().getEncodedFileName() + // ); + + let recordFieldDetailsPath = await new JSONConverter().getEncodedFileName(); + + if (existsSync(recordFieldDetailsPath)) { + unlinkSync(recordFieldDetailsPath); + } + } catch (error) { + let exception = new SDKException(null, null, null, error); + + Logger.error(Constants.DELETE_FIELD_FILE_ERROR, exception); + + throw exception; + } + } + + /** + * The method to delete all field JSON files. + * @throws {SDKException} + */ + static async deleteAllFieldFiles() { + try { + let dir = await ModuleFieldsHandler.getDirectory() + + readdirSync(dir).forEach((fileName) => { + let filepath = resolve(dir, fileName); + + unlinkSync(filepath); + }); + } catch (error) { + let exception = new SDKException(null, null, null, error); + + Logger.error(Constants.DELETE_FIELD_FILES_ERROR, exception); + + throw exception; + } + } + + /** + * The method to delete fields of the given module from the current user's fields JSON file. + * @param {String} module A string representing the module. + * @throws {SDKException} + */ + static async deleteFields(module) { + try { + if (module == null){ + throw new SDKException(null,"module should not be null",null,null); + } + let initializer = await Initializer.getInitializer(); + + let recordFieldDetailsPath = await new JSONConverter().getEncodedFileName(); + + if (existsSync(recordFieldDetailsPath)) { + let recordFieldDetailsJson = await Initializer.getJSON( + recordFieldDetailsPath + ) + + if (recordFieldDetailsJson.hasOwnProperty(module.toLowerCase())) { + await Utility.deleteFields(recordFieldDetailsJson, module).catch( + (err) => { + throw err; + } + ); + + writeFileSync( + recordFieldDetailsPath, + JSON.stringify(recordFieldDetailsJson) + ); + } + } + } catch (error) { + let exception = new SDKException(null, null, null, error); + + throw exception; + } + } + + /** + * The method to force-refresh fields of a module. + * @param {String} module A string representing the module. + * @throws {SDKException} + */ + static async refreshFields(module) { + try { + if (module == null){ + throw new SDKException(null,"module should not be null",null,null); + } + await this.deleteFields(module).catch((err) => { + throw err; + }); + + await Utility.getFieldsInfo(module).catch((err) => { + throw err; + }); + } catch (error) { + if (!(error instanceof SDKException)) { + error = new SDKException(null, null, null, error); + } + + Logger.error(Constants.REFRESH_SINGLE_MODULE_FIELDS_ERROR + module, error); + + throw error; + } + } + + /** + * The method to force-refresh fields of all the available modules. + * @throws {SDKException} + */ + static async refreshAllModules() { + try { + await Utility.refreshModules().catch((err) => { + throw err; + }); + } catch (error) { + if (!(error instanceof SDKException)) { + error = new SDKException(null, null, null, error); + } + + Logger.error(Constants.REFRESH_ALL_MODULE_FIELDS_ERROR, error); + + throw error; + } + } +} + +export { + ModuleFieldsHandler as ModuleFieldsHandler, + ModuleFieldsHandler as MasterModel +} diff --git a/versions/3.0.0/lib/utils/util/stream_wrapper.js b/versions/3.0.0/lib/utils/util/stream_wrapper.js new file mode 100644 index 0000000..a84a491 --- /dev/null +++ b/versions/3.0.0/lib/utils/util/stream_wrapper.js @@ -0,0 +1,64 @@ +import path from "path"; + +import fs from "fs"; + +import {SDKException} from "../../core/com/zoho/crm/api/exception/sdk_exception.js"; + +import {Constants} from "./constants.js"; + +/** + * This class handles the file stream and name. + */ +class StreamWrapper { + + name; + + stream; + + file; + + /** + * Creates a StreamWrapper class instance with the specified parameters. + * @param {string} name - A String containing the file name. + * @param {object} stream - A InputStream containing the file stream. + * @param {string} filePath - A String containing the absolute file path. + */ + constructor(name = null, stream = null, filePath = null) { + if (filePath == null) { + this.name = name; + + this.stream = stream; + } + else { + if (!fs.existsSync(filePath)) { + throw new SDKException(Constants.FILE_ERROR, Constants.FILE_DOES_NOT_EXISTS); + } + + this.file = filePath; + + this.name = path.basename(filePath); + + this.stream = fs.createReadStream(filePath); + } + } + + /** + * This is a getter method to get the file name. + * @returns A String representing the file name. + */ + getName() { + return this.name; + } + + /** + * This is a getter method to get the file input stream. + * @returns A ReadStream representing the file input stream. + */ + getStream() { + return this.stream; + } +} +export { + StreamWrapper as StreamWrapper, + StreamWrapper as MasterModel +} diff --git a/versions/3.0.0/lib/utils/util/utility.js b/versions/3.0.0/lib/utils/util/utility.js new file mode 100644 index 0000000..0c5f158 --- /dev/null +++ b/versions/3.0.0/lib/utils/util/utility.js @@ -0,0 +1,1667 @@ +import path from "path"; +import { Converter } from "./converter.js"; +import { Initializer } from "../../routes/initializer.js"; +import { Constants } from "./constants.js"; +import { MinifiedModule } from "../../core/com/zoho/crm/api/modules/minified_module.js"; +import Logger from "winston"; +import fs from "fs"; +import { SDKException } from "../../core/com/zoho/crm/api/exception/sdk_exception.js"; +import {OAuthToken} from "../../zohocrmsdk.js"; + +/** + * This class handles module field details. + */ +class Utility { + static apiTypeVsDataType = new Map(); + + static apiTypeVsStructureName = new Map(); + + static newFile = false; + + static getModifiedModules = false; + + static forceRefresh = false; + + static moduleAPIName; + + static apiSupportedModule = {}; + + static async assertNotNull(value, errorCode, errorMessage) { + if (value == null) { + throw new SDKException(errorCode, errorMessage); + } + } + + static async fileExistsFlow( + moduleAPIName, + recordFieldDetailsPath, + lastModifiedTime + ) { + let recordFieldDetailsJson = Initializer.getJSON(recordFieldDetailsPath); + + let initializer = await Initializer.getInitializer(); + + if ( + initializer.getSDKConfig().getAutoRefreshFields() == true && + !this.newFile && + !this.getModifiedModules && + (!recordFieldDetailsJson.hasOwnProperty( + Constants.FIELDS_LAST_MODIFIED_TIME + ) || + this.forceRefresh || + new Date().getTime() - + recordFieldDetailsJson[Constants.FIELDS_LAST_MODIFIED_TIME] > + 3600000) + ) { + this.getModifiedModules = true; + + lastModifiedTime = + !this.forceRefresh && + recordFieldDetailsJson.hasOwnProperty( + Constants.FIELDS_LAST_MODIFIED_TIME + ) + ? recordFieldDetailsJson[Constants.FIELDS_LAST_MODIFIED_TIME] + : null; + + await Utility.modifyFields( + recordFieldDetailsPath, + lastModifiedTime + ).catch((err) => { + throw err; + }); + + this.getModifiedModules = false; + } else if ( + initializer.getSDKConfig().getAutoRefreshFields() == false && + this.forceRefresh && + !this.getModifiedModules + ) { + this.getModifiedModules = true; + + await Utility.modifyFields( + recordFieldDetailsPath, + lastModifiedTime + ).catch((err) => { + throw err; + }); + + this.getModifiedModules = false; + } + recordFieldDetailsJson = Initializer.getJSON(recordFieldDetailsPath); + if ( + moduleAPIName == null || + (recordFieldDetailsJson.hasOwnProperty(moduleAPIName.toLowerCase()) && + recordFieldDetailsJson[moduleAPIName.toLowerCase()] != null) + ) { + return; + } else { + await Utility.fillDataType().catch((err) => { + throw err; + }); + + recordFieldDetailsJson[moduleAPIName.toLowerCase()] = {}; + + fs.writeFileSync( + recordFieldDetailsPath, + JSON.stringify(recordFieldDetailsJson) + ); + + let fieldsDetails = await Utility.getFieldsDetails(moduleAPIName).catch( + (err) => { + throw err; + } + ); + + recordFieldDetailsJson = await Initializer.getJSON( + recordFieldDetailsPath + ); + + recordFieldDetailsJson[moduleAPIName.toLowerCase()] = fieldsDetails; + + fs.writeFileSync( + recordFieldDetailsPath, + JSON.stringify(recordFieldDetailsJson) + ); + } + } + + static async verifyModuleAPIName(moduleName) { + if ( + moduleName != null && + Constants.DEFAULT_MODULENAME_VS_APINAME.has(moduleName.toLowerCase()) && + Constants.DEFAULT_MODULENAME_VS_APINAME.get(moduleName.toLowerCase()) != + null + ) { + return Constants.DEFAULT_MODULENAME_VS_APINAME.get( + moduleName.toLowerCase() + ); + } + + var recordFieldDetailsPath = await this.getFileName().catch((err) => { + throw err; + }); + + if (fs.existsSync(recordFieldDetailsPath)) { + let fieldsJSON = Initializer.getJSON(recordFieldDetailsPath); + + if ( + fieldsJSON.hasOwnProperty(Constants.SDK_MODULE_METADATA) && + fieldsJSON[Constants.SDK_MODULE_METADATA].hasOwnProperty( + moduleName.toLowerCase() + ) + ) { + let moduleMeta = fieldsJSON[Constants.SDK_MODULE_METADATA]; + + return moduleMeta[moduleName.toLowerCase()][Constants.API_NAME]; + } + } + + return moduleName; + } + + static async setHandlerAPIPath(moduleAPIName, handlerInstance) { + if (handlerInstance == null) { + return; + } + + let apiPath = handlerInstance.getAPIPath(); + + if (apiPath.toLowerCase().includes(moduleAPIName.toLowerCase())) { + let apiPathSplit = apiPath.split("/"); + + for (var i = 0; i < apiPathSplit.length; i++) { + if (apiPathSplit[i].toLowerCase() == moduleAPIName.toLowerCase()) { + apiPathSplit[i] = moduleAPIName; + } else if ( + Constants.DEFAULT_MODULENAME_VS_APINAME.has( + apiPathSplit[i].toLowerCase() + ) && + Constants.DEFAULT_MODULENAME_VS_APINAME.get( + apiPathSplit[i].toLowerCase() + ) != null + ) { + apiPathSplit[i] = Constants.DEFAULT_MODULENAME_VS_APINAME.get( + apiPathSplit[i].toLowerCase() + ); + } + } + + apiPath = apiPathSplit.join("/"); + + handlerInstance.setAPIPath(apiPath); + } + } + + /** + * This method to fetch field details of the current module for the current user and store the result in a JSON file. + * @param {string} moduleAPIName - A String containing the CRM module API name. + * @param {string} handlerInstance - A String containing CommonAPIHandler Instance. + */ + static async getFields(moduleAPIName, handlerInstance = null) { + this.moduleAPIName = moduleAPIName; + + await this.getFieldsInfo(this.moduleAPIName, handlerInstance).catch( + (err) => { + throw err; + } + ); + } + + /** + * This method to fetch field details of the current module for the current user and store the result in a JSON file. + * @param {string} moduleAPIName - A String containing the CRM module API name. + * @param {string} handlerInstance - A String containing CommonAPIHandler Instance. + */ + static async getFieldsInfo(moduleAPIName, handlerInstance = null) { + let lastModifiedTime = null; + + var recordFieldDetailsPath = null; + + try { + + let initializer = await Initializer.getInitializer(); + + var resourcesPath = path.join( + initializer.getResourcePath(), + Constants.FIELD_DETAILS_DIRECTORY + ); + + if (!fs.existsSync(resourcesPath)) { + fs.mkdirSync(resourcesPath, { recursive: true }); + } + if (moduleAPIName != null) { + moduleAPIName = await Utility.verifyModuleAPIName(moduleAPIName).catch( + (err) => { + throw err; + } + ); + + await Utility.setHandlerAPIPath(moduleAPIName, handlerInstance); + + if ( + handlerInstance != null && + handlerInstance.getModuleAPIName() == null && + !Constants.SKIP_MODULES.includes(moduleAPIName.toLowerCase()) + ) { + return; + } + } + + recordFieldDetailsPath = resourcesPath + "/" + await this.getFileName().catch((err) => { + throw err; + }); + + if (fs.existsSync(recordFieldDetailsPath)) { + await Utility.fileExistsFlow( + moduleAPIName, + recordFieldDetailsPath, + lastModifiedTime + ).catch((err) => { + throw err; + }); + } else if (initializer.getSDKConfig().getAutoRefreshFields() == true) { + this.newFile = true; + + await Utility.fillDataType().catch((err) => { + throw err; + }); + + this.apiSupportedModule = + Object.keys(this.apiSupportedModule).length > 0 + ? this.apiSupportedModule + : await Utility.getModules(null).catch((err) => { + throw err; + }); + + let recordFieldDetailsJson = fs.existsSync(recordFieldDetailsPath) + ? Initializer.getJSON(recordFieldDetailsPath) + : {}; + + recordFieldDetailsJson[Constants.FIELDS_LAST_MODIFIED_TIME] = + new Date().getTime(); + + if (Object.keys(this.apiSupportedModule).length > 0) { + for (let module in this.apiSupportedModule) { + if (!recordFieldDetailsJson.hasOwnProperty(module)) { + let moduleData = this.apiSupportedModule[module]; + + recordFieldDetailsJson[module] = {}; + + fs.writeFileSync( + recordFieldDetailsPath, + JSON.stringify(recordFieldDetailsJson) + ); + + let fieldsDetails = await Utility.getFieldsDetails( + moduleData[Constants.API_NAME] + ).catch((err) => { + throw err; + }); + + recordFieldDetailsJson = await Initializer.getJSON( + recordFieldDetailsPath + ); + + recordFieldDetailsJson[module] = fieldsDetails; + + fs.writeFileSync( + recordFieldDetailsPath, + JSON.stringify(recordFieldDetailsJson) + ); + } + } + } + + this.newFile = false; + } else if (this.forceRefresh && !this.getModifiedModules) { + //New file - and force refresh by Users + this.getModifiedModules = true; + + let recordFieldDetailsJson = {}; + + fs.writeFileSync( + recordFieldDetailsPath, + JSON.stringify(recordFieldDetailsJson) + ); + + await Utility.modifyFields( + recordFieldDetailsPath, + lastModifiedTime + ).catch((err) => { + throw err; + }); + + this.getModifiedModules = false; + } else { + await Utility.fillDataType().catch((err) => { + throw err; + }); + + let recordFieldDetailsJson = {}; + if (moduleAPIName != null) { + recordFieldDetailsJson[moduleAPIName.toLowerCase()] = {}; + } + + fs.writeFileSync( + recordFieldDetailsPath, + JSON.stringify(recordFieldDetailsJson) + ); + + let fieldsDetails = await Utility.getFieldsDetails(moduleAPIName).catch( + (err) => { + throw err; + } + ); + + recordFieldDetailsJson = await Initializer.getJSON( + recordFieldDetailsPath + ); + if (moduleAPIName != null) { + recordFieldDetailsJson[moduleAPIName.toLowerCase()] = fieldsDetails; + } + fs.writeFileSync( + recordFieldDetailsPath, + JSON.stringify(recordFieldDetailsJson) + ); + } + } catch (error) { + if ( + recordFieldDetailsPath != null && + fs.existsSync(recordFieldDetailsPath) + ) { + try { + let recordFieldDetailsJson = await Initializer.getJSON( + recordFieldDetailsPath + ); + + if (moduleAPIName != null) { + if ( + recordFieldDetailsJson.hasOwnProperty(moduleAPIName.toLowerCase()) + ) { + delete recordFieldDetailsJson[moduleAPIName.toLowerCase()]; + } + } + + if (this.newFile) { + if ( + recordFieldDetailsJson.hasOwnProperty( + Constants.FIELDS_LAST_MODIFIED_TIME + ) + ) { + delete recordFieldDetailsJson[ + Constants.FIELDS_LAST_MODIFIED_TIME + ]; + } + + this.newFile = false; + } + + if (this.getModifiedModules || this.forceRefresh) { + this.getModifiedModules = false; + + this.forceRefresh = false; + + if (lastModifiedTime != null) { + recordFieldDetailsJson[Constants.FIELDS_LAST_MODIFIED_TIME] = + lastModifiedTime; + } + } + + fs.writeFileSync( + recordFieldDetailsPath, + JSON.stringify(recordFieldDetailsJson) + ); + } catch (error) { + error = new SDKException(null, null, null, error); + + Logger.error(Constants.EXCEPTION, error); + + throw error; + } + } + + if (!(error instanceof SDKException)) { + error = new SDKException(null, null, null, error); + } + + Logger.error(Constants.EXCEPTION, error); + + throw error; + } + } + + static async modifyFields(recordFieldDetailsPath, modifiedTime) { + let modifiedModules = await this.getModules(modifiedTime).catch((err) => { + throw err; + }); + + let recordFieldDetailsJson = await Initializer.getJSON( + recordFieldDetailsPath + ); + + recordFieldDetailsJson[Constants.FIELDS_LAST_MODIFIED_TIME] = + new Date().getTime(); + + fs.writeFileSync( + recordFieldDetailsPath, + JSON.stringify(recordFieldDetailsJson) + ); + + if (Object.keys(modifiedModules).length > 0) { + for (let module in modifiedModules) { + if (recordFieldDetailsJson.hasOwnProperty(module)) { + delete recordFieldDetailsJson[module]; + } + } + + fs.writeFileSync( + recordFieldDetailsPath, + JSON.stringify(recordFieldDetailsJson) + ); + + for (let module in modifiedModules) { + let moduleData = modifiedModules[module]; + + await Utility.getFieldsInfo(moduleData[Constants.API_NAME], null).catch( + (err) => { + throw err; + } + ); + } + } + } + + static async deleteFields(recordFieldDetailsJson, module) { + let subformModules = []; + + let fieldsJSON = recordFieldDetailsJson[module.toLowerCase()]; + + for (let keyName of Object.keys(fieldsJSON)) { + if ( + fieldsJSON[keyName].hasOwnProperty(Constants.SUBFORM) && + fieldsJSON[keyName][Constants.SUBFORM] == true && + recordFieldDetailsJson.hasOwnProperty( + fieldsJSON[keyName][Constants.MODULE].toLowerCase() + ) + ) { + let subformModuleName = fieldsJSON[keyName][Constants.MODULE]; + + if (!subformModules.includes(subformModuleName)) { + subformModules.push(subformModuleName); + } + } + } + + delete recordFieldDetailsJson[module.toLowerCase()]; + + if (subformModules.length > 0) { + for (let subformModule of subformModules) { + await this.deleteFields(recordFieldDetailsJson, subformModule).catch( + (err) => { + throw err; + } + ); + } + } + } + + // static async getFileName() { + // let initializer = await Initializer.getInitializer(); + // + // return path.join( + // initializer.getResourcePath(), + // Constants.FIELD_DETAILS_DIRECTORY, + // await new Converter().getEncodedFileName() + // ); + // } + + static async getFileName() + { + let initializer = await Initializer.getInitializer(); + + let token = initializer.getToken(); + + let tokenKey = ""; + + if (token instanceof OAuthToken) + { + let oauthToken = token; + + let refreshToken = oauthToken.getRefreshToken(); + + if (refreshToken != null && refreshToken.length > 0) + { + tokenKey = refreshToken.substring(refreshToken.length - 32); + } + else + { + let accessToken = oauthToken.getAccessToken(); + + if (accessToken != null && accessToken.length > 0) + { + tokenKey = accessToken.substring(accessToken.length - 32); + } + } + } + let fileName = initializer.getEnvironment().getUrl(); + + if (tokenKey != null && tokenKey.length > 0) + { + fileName = fileName + tokenKey; + } + var input = new Converter().toUTF8Array(fileName); + + var str = Buffer.from(input).toString('base64'); + + return str + ".json"; + } + + static async getRelatedLists( + relatedModuleName, + moduleAPIName, + commonAPIHandler + ) { + try { + let isnewData = false; + + let key = ( + moduleAPIName + + Constants.UNDERSCORE + + Constants.RELATED_LISTS + ).toLowerCase(); + + let initializer = await Initializer.getInitializer(); + + let resourcesPath = path.join( + initializer.getResourcePath(), + Constants.FIELD_DETAILS_DIRECTORY + ); + + if (!fs.existsSync(resourcesPath)) { + fs.mkdirSync(resourcesPath, { recursive: true }); + } + + var recordFieldDetailsPath = initializer.getResourcePath() + "resources/" + await this.getFileName().catch((err) => { + throw err; + }); + + let recordFieldDetailsJSON = null; + + if ( + !fs.existsSync(recordFieldDetailsPath) || + (fs.existsSync(recordFieldDetailsPath) && + (!Initializer.getJSON(recordFieldDetailsPath).hasOwnProperty(key) || + Initializer.getJSON(recordFieldDetailsPath)[key] == null || + Initializer.getJSON(recordFieldDetailsPath)[key].length <= 0)) + ) { + isnewData = true; + + moduleAPIName = await Utility.verifyModuleAPIName(moduleAPIName).catch( + (err) => { + throw err; + } + ); + + let relatedListValues = await this.getRelatedListDetails( + moduleAPIName + ).catch((err) => { + throw err; + }); + + recordFieldDetailsJSON = fs.existsSync(recordFieldDetailsPath) + ? await Initializer.getJSON(recordFieldDetailsPath) + : {}; + + recordFieldDetailsJSON[key] = relatedListValues; + + fs.writeFileSync( + recordFieldDetailsPath, + JSON.stringify(recordFieldDetailsJSON) + ); + } + + recordFieldDetailsJSON = await Initializer.getJSON( + recordFieldDetailsPath + ); + + let moduleRelatedList = recordFieldDetailsJSON.hasOwnProperty(key) + ? recordFieldDetailsJSON[key] + : {}; + + if ( + !(await this.checkRelatedListExists( + relatedModuleName, + moduleRelatedList, + commonAPIHandler + ).catch((err) => { + throw err; + })) && + !isnewData + ) { + delete recordFieldDetailsJSON[key]; + + fs.writeFileSync( + recordFieldDetailsPath, + JSON.stringify(recordFieldDetailsJSON) + ); + + await Utility.getRelatedLists( + relatedModuleName, + moduleAPIName, + commonAPIHandler + ).catch((err) => { + throw err; + }); + } + } catch (error) { + if (!(error instanceof SDKException)) { + error = new SDKException(null, null, null, error); + } + + Logger.error(Constants.EXCEPTION, error); + + throw error; + } + } + + static async checkRelatedListExists( + relatedModuleName, + modulerelatedListArray, + commonAPIHandler + ) { + for (let index = 0; index < modulerelatedListArray.length; index++) { + const relatedListObject = modulerelatedListArray[index]; + + if ( + relatedListObject[Constants.API_NAME] != null && + relatedListObject[Constants.API_NAME].toLowerCase() == + relatedModuleName.toLowerCase() + ) { + if ( + relatedListObject[Constants.HREF].toLowerCase() == + Constants.NULL_VALUE + ) { + throw new SDKException( + Constants.UNSUPPORTED_IN_API, + commonAPIHandler.getHttpMethod() + + " " + + commonAPIHandler.getAPIPath() + + Constants.UNSUPPORTED_IN_API_MESSAGE + ); + } + + if ( + relatedListObject[Constants.MODULE].toLowerCase() != + Constants.NULL_VALUE + ) { + commonAPIHandler.setModuleAPIName( + relatedListObject[Constants.MODULE] + ); + + await Utility.getFieldsInfo( + relatedListObject[Constants.MODULE], + commonAPIHandler + ).catch((err) => { + throw err; + }); + } + + return true; + } + } + + return false; + } + + static async getRelatedListDetails(moduleAPIName) { + let RelatedListsOperations = ( + await import( + "../../core/com/zoho/crm/api/related_lists/related_lists_operations.js" + ) + ).RelatedListsOperations; + + let ResponseWrapper = ( + await import( + "../../core/com/zoho/crm/api/related_lists/response_wrapper.js" + ) + ).ResponseWrapper; + + let APIException = ( + await import("../../core/com/zoho/crm/api/related_lists/api_exception.js") + ).APIException; + + let GetRelatedListsParam = ( + await import("../../core/com/zoho/crm/api/related_lists/related_lists_operations.js") + ).GetRelatedListsParam; + + let ParameterMap = ( await import("../../routes/parameter_map.js")).ParameterMap; + + let relatedListArray = []; + + let paramInstance = new ParameterMap(); + + await paramInstance.add(GetRelatedListsParam.MODULE, moduleAPIName); + + let response = await new RelatedListsOperations().getRelatedLists(paramInstance); + + if (response != null) { + if (response.getStatusCode() == Constants.NO_CONTENT_STATUS_CODE) { + return relatedListArray; + } + + let responseObject = response.getObject(); + + if (responseObject != null) { + if (responseObject instanceof ResponseWrapper) { + let relatedLists = responseObject.getRelatedLists(); + + relatedLists.forEach((relatedList) => { + let relatedListDetail = {}; + + relatedListDetail[Constants.API_NAME] = relatedList.getAPIName(); + + relatedListDetail[Constants.MODULE] = + relatedList.getModule() != null + ? relatedList.getModule().getAPIName() + : Constants.NULL_VALUE; + + relatedListDetail[Constants.NAME] = relatedList.getName(); + + relatedListDetail[Constants.HREF] = + relatedList.getHref() != null + ? relatedList.getHref() + : Constants.NULL_VALUE; + + relatedListArray.push(relatedListDetail); + }); + } else if (responseObject instanceof APIException) { + let errorResponse = {}; + + errorResponse[Constants.CODE] = responseObject.getCode().getValue(); + + errorResponse[Constants.STATUS] = responseObject + .getStatus() + .getValue(); + + errorResponse[Constants.MESSAGE] = responseObject + .getMessage(); + + throw new SDKException( + Constants.API_EXCEPTION, + null, + errorResponse, + null + ); + } else { + let errorResponse = {}; + + errorResponse[Constants.CODE] = response.getStatusCode(); + + throw new SDKException( + Constants.API_EXCEPTION, + null, + errorResponse, + null + ); + } + } + } + + return relatedListArray; + } + + /** + * This method is to get module field data from Zoho CRM. + * @param {string} moduleAPIName - A String containing the CRM module API name. + * @returns {object} An Object representing the Zoho CRM module field details. + */ + static async getFieldsDetails(moduleAPIName) { + + let FieldOperations = (await import("../../core/com/zoho/crm/api/fields/fields_operations.js")).FieldsOperations; + + let FieldsResponseWrapper = (await import("../../core/com/zoho/crm/api/fields/body_wrapper.js")).BodyWrapper; + + let APIException = (await import("../../core/com/zoho/crm/api/fields/api_exception.js")).APIException; + + let ParameterMap = ( await import("../../routes/parameter_map.js")).ParameterMap; + + let GetFieldsParam = (await import("../../core/com/zoho/crm/api/fields/fields_operations.js")).GetFieldsParam; + + let paramInstance = new ParameterMap(); + + await paramInstance.add(GetFieldsParam.MODULE, moduleAPIName); + + let response = await new FieldOperations().getFields(paramInstance); + + let fieldsDetails = {}; + + if (response != null) { + if (response.getStatusCode() == Constants.NO_CONTENT_STATUS_CODE) { + return fieldsDetails; + } + + let responseHandler = response.getObject(); + + if (responseHandler != null) { + if (responseHandler instanceof FieldsResponseWrapper) { + let fields = await responseHandler.getFields(); + + for (let field in fields) { + let keyName = fields[field].getAPIName(); + + if (Constants.KEYS_TO_SKIP.includes(keyName)) { + continue; + } + + let fieldDetail = {}; + + await Utility.setDataType( + fieldDetail, + fields[field], + moduleAPIName + ).catch((err) => { + throw err; + }); + + fieldsDetails[fields[field].getAPIName()] = fieldDetail; + } + + if ( + Constants.INVENTORY_MODULES.includes(moduleAPIName.toLowerCase()) + ) { + let fieldDetail = {}; + + fieldDetail[Constants.NAME] = Constants.LINE_TAX; + + fieldDetail[Constants.TYPE] = Constants.LIST_NAMESPACE; + + fieldDetail[Constants.STRUCTURE_NAME] = + Constants.LINE_TAX_NAMESPACE; + + fieldDetail[Constants.LOOKUP] = true; + + fieldsDetails[Constants.LINE_TAX] = fieldDetail; + } + + if (moduleAPIName.toLowerCase() == Constants.NOTES) { + let fieldDetail = {}; + + fieldDetail[Constants.NAME] = Constants.ATTACHMENTS; + + fieldDetail[Constants.TYPE] = Constants.LIST_NAMESPACE; + + fieldDetail[Constants.STRUCTURE_NAME] = + Constants.ATTACHMENTS_NAMESPACE; + + fieldsDetails[Constants.ATTACHMENTS] = fieldDetail; + } + } else if (responseHandler instanceof APIException) { + let errorResponse = {}; + + errorResponse[Constants.CODE] = responseHandler.getCode().getValue(); + + errorResponse[Constants.STATUS] = responseHandler + .getStatus() + .getValue(); + + errorResponse[Constants.MESSAGE] = responseHandler + .getMessage(); + + let exception = new SDKException( + Constants.API_EXCEPTION, + null, + errorResponse, + null + ); + + if (this.moduleAPIName != null && this.moduleAPIName.toLowerCase() == moduleAPIName.toLowerCase()) { + throw exception; + } + + Logger.error(Constants.API_EXCEPTION, exception); + } + } else { + let errorResponse = {}; + + errorResponse[Constants.CODE] = response.getStatusCode(); + + throw new SDKException( + Constants.API_EXCEPTION, + null, + errorResponse, + null + ); + } + } + + return fieldsDetails; + } + + static async verifyPhotoSupport(moduleAPIName) { + try { + moduleAPIName = await Utility.verifyModuleAPIName(moduleAPIName).catch( + (err) => { + throw err; + } + ); + + if ( + Constants.PHOTO_SUPPORTED_MODULES.includes(moduleAPIName.toLowerCase()) + ) { + return true; + } + + let modules = await Utility.getModuleNames().catch((err) => { + throw err; + }); + + if ( + modules.hasOwnProperty(moduleAPIName.toLowerCase()) && + modules[moduleAPIName.toLowerCase()] != null + ) { + let moduleMetaData = modules[moduleAPIName.toLowerCase()]; + + if ( + moduleMetaData.hasOwnProperty(Constants.GENERATED_TYPE) && + moduleMetaData[Constants.GENERATED_TYPE] != + Constants.GENERATED_TYPE_CUSTOM + ) { + throw new SDKException( + Constants.UPLOAD_PHOTO_UNSUPPORTED_ERROR, + Constants.UPLOAD_PHOTO_UNSUPPORTED_MESSAGE + moduleAPIName + ); + } + } + } catch (error) { + if (!(error instanceof SDKException)) { + error = new SDKException(null, null, null, error); + } + + Logger.error(Constants.EXCEPTION, error); + + throw error; + } + + return true; + } + + static async getModuleNames() { + let moduleData = {}; + + var resourcesPath = path.join( + (await Initializer.getInitializer()).getResourcePath(), + Constants.FIELD_DETAILS_DIRECTORY + ); + + if (!fs.existsSync(resourcesPath)) { + fs.mkdirSync(resourcesPath, { recursive: true }); + } + + let recordFieldDetailsPath = await this.getFileName().catch((err) => { + throw err; + }); + + let fieldMetaJSON = Initializer.getJSON(recordFieldDetailsPath); + + if ( + !fs.existsSync(recordFieldDetailsPath) || + (fs.existsSync(recordFieldDetailsPath) && + (!fieldMetaJSON.hasOwnProperty(Constants.SDK_MODULE_METADATA) || + fieldMetaJSON[Constants.SDK_MODULE_METADATA] == null || + fieldMetaJSON[Constants.SDK_MODULE_METADATA].length <= 0)) + ) { + moduleData = await Utility.getModules(null).catch((err) => { + throw err; + }); + + await Utility.writeModuleMetaData( + recordFieldDetailsPath, + moduleData + ).catch((err) => { + throw err; + }); + + return moduleData; + } + + let recordFieldDetailsJson = Initializer.getJSON(recordFieldDetailsPath); + + return recordFieldDetailsJson[Constants.SDK_MODULE_METADATA]; + } + + static async writeModuleMetaData(recordFieldDetailsPath, moduleData) { + let fieldDetailsJSON = fs.existsSync(recordFieldDetailsPath) + ? Initializer.getJSON(recordFieldDetailsPath) + : {}; + + fieldDetailsJSON[Constants.SDK_MODULE_METADATA] = moduleData; + + fs.writeFileSync(recordFieldDetailsPath, JSON.stringify(fieldDetailsJSON)); + } + + static async getModules(header) { + const HeaderMap = (await import("../../routes/header_map.js")).HeaderMap; + + let ResponseWrapper = ( + await import("../../core/com/zoho/crm/api/modules/response_wrapper.js") + ).ResponseWrapper; + + let APIException = ( + await import("../../core/com/zoho/crm/api/modules/api_exception.js") + ).APIException; + + const ModuleOperations = ( + await import("../../core/com/zoho/crm/api/modules/modules_operations.js") + ).ModulesOperations; + + const GetModulesHeader = ( + await import("../../core/com/zoho/crm/api/modules/modules_operations.js") + ).GetModulesHeader; + + let apiNames = {}; + + let headerMap = new HeaderMap(); + + if (header != null) { + await headerMap.add(GetModulesHeader.IF_MODIFIED_SINCE, new Date(header)); + } + + let response = await new ModuleOperations().getModules(headerMap); + + if (response != null) { + if ( + [ + Constants.NO_CONTENT_STATUS_CODE, + Constants.NOT_MODIFIED_STATUS_CODE, + ].includes(response.getStatusCode()) + ) { + return apiNames; + } + + let responseObject = response.getObject(); + + if (responseObject != null) { + if (responseObject instanceof ResponseWrapper) { + let modules = responseObject.getModules(); + + modules.forEach((module) => { + if (module.getAPISupported() == true) { + let moduleDetails = {}; + + moduleDetails[Constants.API_NAME] = module.getAPIName(); + + moduleDetails[Constants.GENERATED_TYPE] = module + .getGeneratedType() + .getValue(); + + apiNames[module.getAPIName().toLowerCase()] = moduleDetails; + } + }); + } else if (responseObject instanceof APIException) { + let errorResponse = {}; + + errorResponse[Constants.CODE] = responseObject.getCode().getValue(); + + errorResponse[Constants.STATUS] = responseObject + .getStatus() + .getValue(); + + errorResponse[Constants.MESSAGE] = responseObject + .getMessage(); + + throw new SDKException( + Constants.API_EXCEPTION, + null, + errorResponse, + null + ); + } + } + } + + if (header == null) { + try { + var resourcesPath = path.join( + (await Initializer.getInitializer()).getResourcePath(), + Constants.FIELD_DETAILS_DIRECTORY + ); + + if (!fs.existsSync(resourcesPath)) { + fs.mkdirSync(resourcesPath, { recursive: true }); + } + + var recordFieldDetailsPath = resourcesPath + "/" + await this.getFileName().catch((err) => { + throw err; + }); + + await Utility.writeModuleMetaData( + recordFieldDetailsPath, + apiNames + ).catch((err) => { + throw err; + }); + } catch (error) { + if (!(error instanceof SDKException)) { + error = new SDKException(null, null, null, error); + } + + Logger.error(Constants.EXCEPTION, error); + + throw error; + } + } + + return apiNames; + } + + static async refreshModules() { + this.forceRefresh = true; + + await Utility.getFieldsInfo(null).catch((err) => { + throw err; + }); + + this.forceRefresh = false; + } + + static async getJSONObject(json, key) { + let keyArray = Array.from(Object.keys(json)); + + for (let keyInJSON of keyArray) { + if (key.toLowerCase() == keyInJSON.toLowerCase()) { + return json[keyInJSON]; + } + } + + return null; + } + + static async setDataType(fieldDetail, field, moduleAPIName) { + var apiType = field.getDataType().getValue(); + + var keyName = field.getAPIName(); + + var module = new MinifiedModule(); + + if ( + field.getSystemMandatory() != null && + field.getSystemMandatory() == true && + !( + moduleAPIName.toLowerCase() == Constants.CALLS && + keyName.toLowerCase() == Constants.CALL_DURATION + ) + ) { + fieldDetail.required = true; + } + + if ( + keyName.toLowerCase() == + Constants.PRICING_DETAILS_API_NAME.toLowerCase() && + moduleAPIName.toLowerCase() == Constants.PRICE_BOOKS + ) { + fieldDetail.name = keyName; + + fieldDetail.type = Constants.LIST_NAMESPACE; + + fieldDetail.structure_name = Constants.PRICING_DETAILS; + + fieldDetail[Constants.SKIP_MANDATORY] = true; + + return; + } else if ( + keyName.toLowerCase() == Constants.PARTICIPANT_API_NAME.toLowerCase() && + (moduleAPIName.toLowerCase() == Constants.EVENTS || + moduleAPIName.toLowerCase() == Constants.ACTIVITIES) + ) { + fieldDetail.name = keyName; + + fieldDetail.type = Constants.LIST_NAMESPACE; + + fieldDetail.structure_name = Constants.PARTICIPANTS; + + fieldDetail[Constants.SKIP_MANDATORY] = true; + + return; + } else if ( + keyName.toLowerCase() == Constants.COMMENTS.toLowerCase() && + (moduleAPIName.toLowerCase() == Constants.SOLUTIONS || + moduleAPIName.toLowerCase() == Constants.CASES) + ) { + fieldDetail.name = keyName; + + fieldDetail.type = Constants.LIST_NAMESPACE; + + fieldDetail.structure_name = Constants.COMMENT_NAMESPACE; + + fieldDetail.lookup = true; + + return; + } else if (keyName.toLowerCase() == Constants.LAYOUT.toLowerCase()) { + fieldDetail.name = keyName; + + fieldDetail.type = Constants.LAYOUT_NAMESPACE; + + fieldDetail.structure_name = Constants.LAYOUT_NAMESPACE; + + fieldDetail.lookup = true; + + return; + } else if ( + (keyName.toLowerCase() == Constants.TERRITORIES.toLowerCase() || + keyName.toLowerCase() == Constants.TERRITORY.toLowerCase()) && + field.getCustomField() !== null && + field.getCustomField() == false + ) { + fieldDetail.name = keyName; + + fieldDetail.type = Constants.LIST_NAMESPACE; + + fieldDetail.structure_name = Constants.TERRITORY_NAMESPACE; + + fieldDetail.lookup = true; + + return; + } else if ( + keyName.toLowerCase() == Constants.PRODUCT_NAME.toLowerCase() && + Constants.INVENTORY_MODULES_ITEMS.includes(moduleAPIName.toLowerCase()) + ) { + fieldDetail.name = keyName; + + fieldDetail.type = Constants.LINEITEM_PRODUCT; + + fieldDetail.structure_name = Constants.LINEITEM_PRODUCT; + + fieldDetail[Constants.SKIP_MANDATORY] = true; + + return; + } else if ( + keyName.toLowerCase() == Constants.DISCOUNT.toLowerCase() && + Constants.INVENTORY_MODULES_ITEMS.includes(moduleAPIName.toLowerCase()) + ) { + fieldDetail.name = keyName; + + fieldDetail.type = Constants.STRING_NAMESPACE; + + return; + } else if ( + keyName.toLowerCase() == Constants.TAX.toLowerCase() && + Constants.PRODUCTS.toLowerCase() == moduleAPIName.toLowerCase() + ) { + fieldDetail.name = keyName; + + fieldDetail.type = Constants.LIST_NAMESPACE; + + fieldDetail.structure_name = Constants.TAX_NAMESPACE; + + return; + } else if (Utility.apiTypeVsDataType.has(apiType)) { + fieldDetail.type = Utility.apiTypeVsDataType.get(apiType); + } else if (apiType.toLowerCase() == Constants.FORMULA.toLowerCase()) { + if (field.getFormula() != null) { + let returnType = field.getFormula().getReturnType().getValue(); + + if ( + returnType != null && + Utility.apiTypeVsDataType.has(returnType) && + Utility.apiTypeVsDataType.get(returnType) != null + ) { + fieldDetail.type = Utility.apiTypeVsDataType.get(returnType); + } + } + + fieldDetail[Constants.READ_ONLY] = true; + } else { + return; + } + + if (apiType.toLowerCase().includes(Constants.LOOKUP.toLowerCase())) { + fieldDetail.lookup = true; + } + + if ( + apiType.toLowerCase() == Constants.CONSENT_LOOKUP || + apiType.toLowerCase() == Constants.OWNER_LOOKUP + ) { + fieldDetail[Constants.SKIP_MANDATORY] = true; + } + + if (apiType.toLowerCase() == Constants.MULTI_SELECT_LOOKUP) { + fieldDetail[Constants.SKIP_MANDATORY] = true; + + if ( + field.getMultiselectlookup() != null && + field.getMultiselectlookup().getLinkingModule() != null + ) { + let linkingModule = field.getMultiselectlookup().getLinkingModule(); + + fieldDetail[Constants.MODULE] = linkingModule.getAPIName(); + + module = linkingModule; + } + + fieldDetail[Constants.SUBFORM] = true; + } + + if (apiType.toLowerCase() == Constants.MULTI_USER_LOOKUP) { + fieldDetail[Constants.SKIP_MANDATORY] = true; + + if ( + field.getMultiuserlookup() != null && + field.getMultiuserlookup().getLinkingModule() != null + ) { + let linkingModule = field.getMultiuserlookup().getLinkingModule(); + + fieldDetail[Constants.MODULE] = linkingModule.getAPIName(); + + module = linkingModule; + } + + fieldDetail[Constants.SUBFORM] = true; + } + + if(apiType.toLowerCase() == Constants.MULTI_MODULE_LOOKUP) + { + fieldDetail[Constants.SKIP_MANDATORY] = true; + + fieldDetail[Constants.SUBFORM] = true; + } + + if (Utility.apiTypeVsStructureName.has(apiType)) { + fieldDetail.structure_name = Utility.apiTypeVsStructureName.get(apiType); + } + + if ( + apiType.toLowerCase() == Constants.PICKLIST && + field.getPickListValues() != null && + field.getPickListValues().length > 0 + ) { + let values = []; + + fieldDetail.picklist = true; + + field.getPickListValues().every((x) => values.push(x.getDisplayValue())); + + fieldDetail.values = values; + } + + if (apiType == Constants.SUBFORM && field.getAssociatedModule() != null) { + module.setAPIName(field.getAssociatedModule().getModule()); + + fieldDetail.module = module.getAPIName(); + + fieldDetail[Constants.SKIP_MANDATORY] = true; + + fieldDetail.subform = true; + } + + if (apiType == Constants.LOOKUP && field.getLookup() != null) { + let module1 = field.getLookup().getModule(); + + if (module1 != null && module1.getAPIName().toLowerCase() != Constants.SE_MODULE) { + module.setAPIName(module1.getAPIName()); + module.setId(module1.getId()); + fieldDetail.module = module.getAPIName(); + + if ( + module1.getAPIName().toLowerCase() == Constants.ACCOUNTS && + field.getCustomField() != null && + !field.getCustomField() + ) { + fieldDetail[Constants.SKIP_MANDATORY] = true; + } + } else { + const MinifiedModule = (await import("../../core/com/zoho/crm/api/modules/minified_module.js")).MinifiedModule; + module = new MinifiedModule(); + } + + fieldDetail.lookup = true; + } + + if (module != null && module.getAPIName() != null && module.getAPIName().length > 0) { + await Utility.getFieldsInfo(module.getAPIName()).catch((err) => { + throw err; + }); + } + + fieldDetail.name = keyName; + } + + static async fillDataType() { + if (this.apiTypeVsDataType.size > 0) { + return; + } + + let fieldAPINamesString = [ + "textarea", + "text", + "website", + "email", + "phone", + "mediumtext", + "profileimage", + "autonumber", + ]; + + let fieldAPINamesInteger = ["integer"]; + + let fieldAPINamesBoolean = ["boolean"]; + + let fieldAPINamesLong = ["long", "bigint"]; + + let fieldAPINamesDouble = ["double", "percent", "lookup", "currency"]; + + let fieldAPINamesFieldFile = ["fileupload"]; + + let fieldAPINamesDateTime = ["datetime", "event_reminder"]; + + let fieldAPINamesDate = ["date"]; + + let fieldAPINamesLookup = ["lookup"]; + + let fieldAPINamesPickList = ["picklist"]; + + let fieldAPINamesMultiSelectPickList = ["multiselectpicklist"]; + + let fieldAPINamesSubForm = ["subform"]; + + let fieldAPINamesOwnerLookUp = ["ownerlookup", "userlookup"]; + + let fieldAPINamesMultiUserLookUp = ["multiuserlookup"]; + + let fieldAPINameTaskRemindAt = ["ALARM"]; + + let fieldAPINameRecurringActivity = ["RRULE"]; + + let fieldAPINameReminder = ["multireminder"]; + + let fieldAPINameConsentLookUp = ["consent_lookup"]; + + let fieldAPINameImageUpload = ["imageupload"]; + + let fieldAPInameMultiSelectLookUp = ["multiselectlookup"]; + + let fieldAPINameLineTax = ["linetax"]; + + let fieldAPINamesModule = ["module"]; + + let fieldAPINamesLayout = ["layout"]; + + let fieldAPINamesMultiModuleLookUp = ["multi_module_lookup"]; + + for (let fieldAPIName of fieldAPINamesString) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.STRING_NAMESPACE); + } + + for (let fieldAPIName of fieldAPINamesInteger) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.INTEGER_NAMESPACE); + } + + for (let fieldAPIName of fieldAPINamesBoolean) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.BOOLEAN_NAMESPACE); + } + + for (let fieldAPIName of fieldAPINamesLong) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.LONG_NAMESPACE); + } + + for (let fieldAPIName of fieldAPINamesDouble) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.DOUBLE_NAMESPACE); + } + + for (let fieldAPIName of fieldAPINamesDateTime) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.DATETIME_NAMESPACE); + } + + for (let fieldAPIName of fieldAPINamesDate) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.DATE_NAMESPACE); + } + + for (let fieldAPIName of fieldAPINamesLookup) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.RECORD_NAMESPACE); + + Utility.apiTypeVsStructureName.set( + fieldAPIName, + Constants.RECORD_NAMESPACE + ); + } + + for (let fieldAPIName of fieldAPINamesPickList) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.CHOICE_NAMESPACE); + } + + for (let fieldAPIName of fieldAPINamesMultiSelectPickList) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.LIST_NAMESPACE); + + Utility.apiTypeVsStructureName.set( + fieldAPIName, + Constants.CHOICE_NAMESPACE + ); + } + + for (let fieldAPIName of fieldAPINamesSubForm) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.LIST_NAMESPACE); + + Utility.apiTypeVsStructureName.set( + fieldAPIName, + Constants.RECORD_NAMESPACE + ); + } + + for (let fieldAPIName of fieldAPINamesOwnerLookUp) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.USER_NAMESPACE); + + Utility.apiTypeVsStructureName.set( + fieldAPIName, + Constants.USER_NAMESPACE + ); + } + + for (let fieldAPIName of fieldAPINamesMultiUserLookUp) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.LIST_NAMESPACE); + + Utility.apiTypeVsStructureName.set( + fieldAPIName, + Constants.USER_NAMESPACE + ); + } + + for (let fieldAPIName of fieldAPINamesFieldFile) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.LIST_NAMESPACE); + + Utility.apiTypeVsStructureName.set( + fieldAPIName, + Constants.FIELD_FILE_NAMESPACE + ); + } + + for (let fieldAPIName of fieldAPINameTaskRemindAt) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.REMINDAT_NAMESPACE); + + Utility.apiTypeVsStructureName.set( + fieldAPIName, + Constants.REMINDAT_NAMESPACE + ); + } + + for (let fieldAPIName of fieldAPINameRecurringActivity) { + Utility.apiTypeVsDataType.set( + fieldAPIName, + Constants.RECURRING_ACTIVITY_NAMESPACE + ); + + Utility.apiTypeVsStructureName.set( + fieldAPIName, + Constants.RECURRING_ACTIVITY_NAMESPACE + ); + } + + for (let fieldAPIName of fieldAPINameReminder) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.LIST_NAMESPACE); + + Utility.apiTypeVsStructureName.set( + fieldAPIName, + Constants.REMINDER_NAMESPACE + ); + } + + for (let fieldAPIName of fieldAPINameConsentLookUp) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.CONSENT_NAMESPACE); + + Utility.apiTypeVsStructureName.set( + fieldAPIName, + Constants.CONSENT_NAMESPACE + ); + } + + for (let fieldAPIName of fieldAPINameImageUpload) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.LIST_NAMESPACE); + + Utility.apiTypeVsStructureName.set( + fieldAPIName, + Constants.IMAGEUPLOAD_NAMESPACE + ); + } + + for (let fieldAPIName of fieldAPInameMultiSelectLookUp) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.LIST_NAMESPACE); + + Utility.apiTypeVsStructureName.set( + fieldAPIName, + Constants.RECORD_NAMESPACE + ); + } + + for (let fieldAPIName of fieldAPINameLineTax) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.LIST_NAMESPACE); + + Utility.apiTypeVsStructureName.set(fieldAPIName, Constants.LINETAX); + } + + for (let fieldAPIName of fieldAPINamesModule) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.MODULE_NAMESPACE); + + Utility.apiTypeVsStructureName.set(fieldAPIName, Constants.MODULE_NAMESPACE); + } + + for (let fieldAPIName of fieldAPINamesMultiModuleLookUp) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.LIST_NAMESPACE); + + Utility.apiTypeVsStructureName.set( + fieldAPIName, + Constants.RECORD_NAMESPACE + ); + } + + for (let fieldAPIName of fieldAPINamesLayout) { + Utility.apiTypeVsDataType.set(fieldAPIName, Constants.LAYOUT_NAMESPACE); + + Utility.apiTypeVsStructureName.set(fieldAPIName, Constants.LAYOUT_NAMESPACE); + } + } + + static checkInteger(value) { + return parseInt(value) === value ? true : false; + } +} + +export { Utility as Utility, Utility as MasterModel }; diff --git a/versions/3.0.0/lib/utils/util/xml_converter.js b/versions/3.0.0/lib/utils/util/xml_converter.js new file mode 100644 index 0000000..4d94fc0 --- /dev/null +++ b/versions/3.0.0/lib/utils/util/xml_converter.js @@ -0,0 +1,7 @@ +class XMLConverter { + +} +export { + XMLConverter as XMLConverter, + XMLConverter as MasterModel +} \ No newline at end of file diff --git a/versions/3.0.0/lib/zohocrmsdk.js b/versions/3.0.0/lib/zohocrmsdk.js new file mode 100644 index 0000000..263f26b --- /dev/null +++ b/versions/3.0.0/lib/zohocrmsdk.js @@ -0,0 +1,540 @@ +// core file +import * as DeleteTransferUsers from "./core/com/zoho/crm/api/users_transfer_delete/import_users_transfer_delete.js"; +import * as TypeUserUsers from "./core/com/zoho/crm/api/user_type_users/import_user_type_users.js"; +import * as AssociateEmail from "./core/com/zoho/crm/api/associate_email/import_associate_email.js"; +import * as Layouts from "./core/com/zoho/crm/api/layouts/import_layouts.js"; +import * as GroupsVariable from "./core/com/zoho/crm/api/variable_groups/import_variable_groups.js"; +import * as PreferenceService from "./core/com/zoho/crm/api/service_preference/import_service_preference.js"; +import * as BulkRead from "./core/com/zoho/crm/api/bulk_read/import_bulk_read.js"; +import * as HoursShift from "./core/com/zoho/crm/api/shift_hours/import_shift_hours.js"; +import * as Pipeline from "./core/com/zoho/crm/api/pipeline/import_pipeline.js"; +import * as DependencyFieldMap from "./core/com/zoho/crm/api/field_map_dependency/import_field_map_dependency.js"; +import * as TerritoriesUsers from "./core/com/zoho/crm/api/users_territories/import_users_territories.js"; +import * as AppointmentPreference from "./core/com/zoho/crm/api/appointment_preference/import_appointment_preference.js"; +import * as UnavailabilityUsers from "./core/com/zoho/crm/api/users_unavailability/import_users_unavailability.js"; +import * as Fields from "./core/com/zoho/crm/api/fields/import_fields.js"; +import * as Blueprint from "./core/com/zoho/crm/api/blueprint/import_blueprint.js"; +import * as PreferencePrivacy from "./core/com/zoho/crm/api/privacy_preference/import_privacy_preference.js"; +import * as Taxes from "./core/com/zoho/crm/api/taxes/import_taxes.js"; +import * as Roles from "./core/com/zoho/crm/api/roles/import_roles.js"; +import * as EmailRecordsRelated from "./core/com/zoho/crm/api/email_related_records/import_email_related_records.js"; +import * as Modules from "./core/com/zoho/crm/api/modules/import_modules.js"; +import * as InvitePortal from "./core/com/zoho/crm/api/portal_invite/import_portal_invite.js"; +import * as Attachments from "./core/com/zoho/crm/api/attachments/import_attachments.js"; +import * as Timelines from "./core/com/zoho/crm/api/timelines/import_timelines.js"; +import * as GroupsUser from "./core/com/zoho/crm/api/user_groups/import_user_groups.js"; +import * as EntityScores from "./core/com/zoho/crm/api/entity_scores/import_entity_scores.js"; +import * as ContactRoles from "./core/com/zoho/crm/api/contact_roles/import_contact_roles.js"; +import * as Portals from "./core/com/zoho/crm/api/portals/import_portals.js"; +import * as RulesScoring from "./core/com/zoho/crm/api/scoring_rules/import_scoring_rules.js"; +import * as AvailableCurrencies from "./core/com/zoho/crm/api/available_currencies/import_available_currencies.js"; +import * as MailMerge from "./core/com/zoho/crm/api/mail_merge/import_mail_merge.js"; +import * as Org from "./core/com/zoho/crm/api/org/import_org.js"; +import * as Query from "./core/com/zoho/crm/api/query/import_query.js"; +import * as FiscalYear from "./core/com/zoho/crm/api/fiscal_year/import_fiscal_year.js"; +import * as Users from "./core/com/zoho/crm/api/users/import_users.js"; +import * as ChangeMassOwner from "./core/com/zoho/crm/api/mass_change_owner/import_mass_change_owner.js"; +import * as CustomViews from "./core/com/zoho/crm/api/custom_views/import_custom_views.js"; +import * as Tags from "./core/com/zoho/crm/api/tags/import_tags.js"; +import * as EmailTemplates from "./core/com/zoho/crm/api/email_templates/import_email_templates.js"; +import * as Files from "./core/com/zoho/crm/api/files/import_files.js"; +import * as AppsConfigurablePrivacy from "./core/com/zoho/crm/api/privacy_configurable_apps/import_privacy_configurable_apps.js"; +import * as ConvertMass from "./core/com/zoho/crm/api/mass_convert/import_mass_convert.js"; +import * as ComposeEmailMeta from "./core/com/zoho/crm/api/email_compose_meta/import_email_compose_meta.js"; +import * as Templates from "./core/com/zoho/crm/api/templates/import_templates.js"; +import * as Definition from "./core/com/zoho/crm/api/definition/import_definition.js"; +import * as Territories from "./core/com/zoho/crm/api/territories/import_territories.js"; +import * as CancelMeetings from "./core/com/zoho/crm/api/cancel_meetings/import_cancel_meetings.js"; +import * as TerritoryUsers from "./core/com/zoho/crm/api/territory_users/import_territory_users.js"; +import * as BusinessHours from "./core/com/zoho/crm/api/business_hours/import_business_hours.js"; +import * as MetaPortals from "./core/com/zoho/crm/api/portals_meta/import_portals_meta.js"; +import * as RecordsShare from "./core/com/zoho/crm/api/share_records/import_share_records.js"; +import * as InventoryTemplates from "./core/com/zoho/crm/api/inventory_templates/import_inventory_templates.js"; +import * as AddressesFrom from "./core/com/zoho/crm/api/from_addresses/import_from_addresses.js"; +import * as Holidays from "./core/com/zoho/crm/api/holidays/import_holidays.js"; +import * as Wizards from "./core/com/zoho/crm/api/wizards/import_wizards.js"; +import * as Profiles from "./core/com/zoho/crm/api/profiles/import_profiles.js"; +import * as MailSend from "./core/com/zoho/crm/api/send_mail/import_send_mail.js"; +import * as CvidDeleteMass from "./core/com/zoho/crm/api/mass_delete_cvid/import_mass_delete_cvid.js"; +import * as ContactDealRoles from "./core/com/zoho/crm/api/deal_contact_roles/import_deal_contact_roles.js"; +import * as EmailSharing from "./core/com/zoho/crm/api/email_sharing/import_email_sharing.js"; +import * as Currencies from "./core/com/zoho/crm/api/currencies/import_currencies.js"; +import * as Notes from "./core/com/zoho/crm/api/notes/import_notes.js"; +import * as IscSignature from "./core/com/zoho/crm/api/isc_signature/import_isc_signature.js"; +import * as AttachmentsField from "./core/com/zoho/crm/api/field_attachments/import_field_attachments.js"; +import * as Backup from "./core/com/zoho/crm/api/backup/import_backup.js"; +import * as ListsRelated from "./core/com/zoho/crm/api/related_lists/import_related_lists.js"; +import * as HistoryReschedule from "./core/com/zoho/crm/api/reschedule_history/import_reschedule_history.js"; +import * as Variables from "./core/com/zoho/crm/api/variables/import_variables.js"; +import * as ChangeOwner from "./core/com/zoho/crm/api/change_owner/import_change_owner.js"; +import * as RecordsRelated from "./core/com/zoho/crm/api/related_records/import_related_records.js"; +import * as DownloadImagesInline from "./core/com/zoho/crm/api/download_inline_images/import_download_inline_images.js"; +import * as AssignmentRules from "./core/com/zoho/crm/api/assignment_rules/import_assignment_rules.js"; +import * as Notifications from "./core/com/zoho/crm/api/notifications/import_notifications.js"; +import * as BulkWrite from "./core/com/zoho/crm/api/bulk_write/import_bulk_write.js"; +import * as AttachmentsDownload from "./core/com/zoho/crm/api/download_attachments/import_download_attachments.js"; +import * as PortalTypeUser from "./core/com/zoho/crm/api/portal_user_type/import_portal_user_type.js"; +import * as Record from "./core/com/zoho/crm/api/record/import_record.js"; +import * as ComplianceHipaa from "./core/com/zoho/crm/api/hipaa_compliance/import_hipaa_compliance.js"; + +// exception +import { SDKException } from "./core/com/zoho/crm/api/exception/sdk_exception.js"; + +// token store +import { DBBuilder } from "./models/authenticator/store/db_builder.js"; +import { DBStore } from "./models/authenticator/store/db_store.js"; +import { FileStore } from "./models/authenticator/store/file_store.js"; +import * as TokenStore from "./models/authenticator/store/token_store.js"; + +// authenticator +import { OAuthBuilder } from "./models/authenticator/oauth_builder.js"; +import { OAuthToken } from "./models/authenticator/oauth_token.js"; +import * as Token from "./models/authenticator/token.js"; + +// controllers +import { APIHTTPConnector } from "./routes/controllers/api_http_connector.js"; +import { APIResponse } from "./routes/controllers/api_response.js"; + +//dc +import { AUDataCenter } from "./routes/dc/au_data_center.js"; +import { CNDataCenter } from "./routes/dc/cn_data_center.js"; +import { DataCenter } from "./routes/dc/data_center.js"; +import { Environment } from "./routes/dc/environment.js"; +import { EUDataCenter } from "./routes/dc/eu_data_center.js"; +import { INDataCenter } from "./routes/dc/in_data_center.js"; +import { USDataCenter } from "./routes/dc/us_data_center.js"; +import { JPDataCenter } from "./routes/dc/jp_data_center.js"; + +// logger +import { LogBuilder } from "./routes/logger/log_builder.js"; +import { Logger } from "./routes/logger/logger.js"; +import { Levels } from "./routes/logger/logger.js"; +import { SDKLogger } from "./routes/logger/sdk_logger.js"; + +// middlewares +import { CommonAPIHandler } from "./routes/middlewares/common_api_handler.js"; + +// root files +import { HeaderMap } from "./routes/header_map.js"; +import { Header } from "./routes/header.js"; +import { InitializeBuilder } from "./routes/initialize_builder.js"; +import { Initializer } from "./routes/initializer.js"; +import { Param } from "./routes/param.js"; +import { ParameterMap } from "./routes/parameter_map.js"; +import { ProxyBuilder } from "./routes/proxy_builder.js"; +import { RequestProxy } from "./routes/request_proxy.js"; +import { SDKConfigBuilder } from "./routes/sdk_config_builder.js"; +import { SDKConfig } from "./routes/sdk_config.js"; +import { UserSignature } from "./routes/user_signature.js"; + +//util files +import { Choice } from "./utils/util/choice.js"; +import { Constants } from "./utils/util/constants.js"; +import { Converter } from "./utils/util/converter.js"; +import { DatatypeConverter } from "./utils/util/datatype_converter.js"; +import { Downloader } from "./utils/util/downloader.js"; +import { FormDataConverter } from "./utils/util/form_data_converter.js"; +import { HeaderParamValidator } from "./utils/util/header_param_validator.js"; +import { JSONConverter } from "./utils/util/json_converter.js"; +import { ModuleFieldsHandler } from "./utils/util/module_fields_handler.js"; +import { StreamWrapper } from "./utils/util/stream_wrapper.js"; +import { Utility } from "./utils/util/utility.js"; +import { XMLConverter } from "./utils/util/xml_converter.js"; +class zohocrmsdk { + DeleteTransferUsers; + TypeUserUsers; + AssociateEmail; + Layouts; + GroupsVariable; + PreferenceService; + BulkRead; + HoursShift; + Pipeline; + DependencyFieldMap; + TerritoriesUsers; + AppointmentPreference; + UnavailabilityUsers; + Fields; + Blueprint; + PreferencePrivacy; + Taxes; + Roles; + EmailRecordsRelated; + Modules; + InvitePortal; + Attachments; + Timelines; + GroupsUser; + EntityScores; + ContactRoles; + Portals; + RulesScoring; + AvailableCurrencies; + MailMerge; + Org; + Query; + FiscalYear; + Users; + ChangeMassOwner; + CustomViews; + Tags; + EmailTemplates; + Files; + AppsConfigurablePrivacy; + ConvertMass; + ComposeEmailMeta; + Templates; + Definition; + Territories; + CancelMeetings; + TerritoryUsers; + BusinessHours; + MetaPortals; + RecordsShare; + InventoryTemplates; + AddressesFrom; + Holidays; + Wizards; + Profiles; + MailSend; + CvidDeleteMass; + ContactDealRoles; + EmailSharing; + Currencies; + Notes; + IscSignature; + AttachmentsField; + Backup; + ListsRelated; + HistoryReschedule; + Variables; + ChangeOwner; + RecordsRelated; + DownloadImagesInline; + AssignmentRules; + Notifications; + BulkWrite; + AttachmentsDownload; + PortalTypeUser; + Record; + ComplianceHipaa; + + SDKException; + + DBBuilder; + DBStore; + FileStore; + TokenStore; + + OAuthBuilder; + OAuthToken; + Token; + + APIHTTPConnector; + APIResponse; + + AUDataCenter; + CNDataCenter; + DataCenter; + Environment; + EUDataCenter; + INDataCenter; + USDataCenter; + JPDataCenter; + + LogBuilder; + Logger; + Levels; + SDKLogger; + + CommonAPIHandler; + + HeaderMap; + Header; + InitializeBuilder; + Initializer; + Param; + ParameterMap; + ProxyBuilder; + RequestProxy; + SDKConfigBuilder; + SDKConfig; + UserSignature; + + Choice; + Constants; + Converter; + DataTypeConverter; + Downloader; + FormDataConverter; + HeaderParamValidator; + JSONConverter; + ModuleFieldsHandler; + StreamWrapper; + Utility; + XMLConverter; + + constructor() { + this.DeleteTransferUsers = DeleteTransferUsers; + this.TypeUserUsers = TypeUserUsers; + this.AssociateEmail = AssociateEmail; + this.Layouts = Layouts; + this.GroupsVariable = GroupsVariable; + this.PreferenceService = PreferenceService; + this.BulkRead = BulkRead; + this.HoursShift = HoursShift; + this.Pipeline = Pipeline; + this.DependencyFieldMap = DependencyFieldMap; + this.TerritoriesUsers = TerritoriesUsers; + this.AppointmentPreference = AppointmentPreference; + this.UnavailabilityUsers = UnavailabilityUsers; + this.Fields = Fields; + this.Blueprint = Blueprint; + this.PreferencePrivacy = PreferencePrivacy; + this.Taxes = Taxes; + this.Roles = Roles; + this.EmailRecordsRelated = EmailRecordsRelated; + this.Modules = Modules; + this.InvitePortal = InvitePortal; + this.Attachments = Attachments; + this.Timelines = Timelines; + this.GroupsUser = GroupsUser; + this.EntityScores = EntityScores; + this.ContactRoles = ContactRoles; + this.Portals = Portals; + this.RulesScoring = RulesScoring; + this.AvailableCurrencies = AvailableCurrencies; + this.MailMerge = MailMerge; + this.Org = Org; + this.Query = Query; + this.FiscalYear = FiscalYear; + this.Users = Users; + this.ChangeMassOwner = ChangeMassOwner; + this.CustomViews = CustomViews; + this.Tags = Tags; + this.EmailTemplates = EmailTemplates; + this.Files = Files; + this.AppsConfigurablePrivacy = AppsConfigurablePrivacy; + this.ConvertMass = ConvertMass; + this.ComposeEmailMeta = ComposeEmailMeta; + this.Templates = Templates; + this.Definition = Definition; + this.Territories = Territories; + this.CancelMeetings = CancelMeetings; + this.TerritoryUsers = TerritoryUsers; + this.BusinessHours = BusinessHours; + this.MetaPortals = MetaPortals; + this.RecordsShare = RecordsShare; + this.InventoryTemplates = InventoryTemplates; + this.AddressesFrom = AddressesFrom; + this.Holidays = Holidays; + this.Wizards = Wizards; + this.Profiles = Profiles; + this.MailSend = MailSend; + this.CvidDeleteMass = CvidDeleteMass; + this.ContactDealRoles = ContactDealRoles; + this.EmailSharing = EmailSharing; + this.Currencies = Currencies; + this.Notes = Notes; + this.IscSignature = IscSignature; + this.AttachmentsField = AttachmentsField; + this.Backup = Backup; + this.ListsRelated = ListsRelated; + this.HistoryReschedule = HistoryReschedule; + this.Variables = Variables; + this.ChangeOwner = ChangeOwner; + this.RecordsRelated = RecordsRelated; + this.DownloadImagesInline = DownloadImagesInline; + this.AssignmentRules = AssignmentRules; + this.Notifications = Notifications; + this.BulkWrite = BulkWrite; + this.AttachmentsDownload = AttachmentsDownload; + this.PortalTypeUser = PortalTypeUser; + this.Record = Record; + this.ComplianceHipaa = ComplianceHipaa; + + this.SDKException = SDKException; + + this.DBBuilder = DBBuilder; + this.DBStore = DBStore; + this.FileStore = FileStore; + this.TokenStore = TokenStore; + + this.OAuthBuilder = OAuthBuilder; + this.OAuthToken = OAuthToken; + this.Token = Token; + + this.APIHTTPConnector = APIHTTPConnector; + this.APIResponse = APIResponse; + + this.AUDataCenter = AUDataCenter; + this.CNDataCenter = CNDataCenter; + this.DataCenter = DataCenter; + this.Environment = Environment; + this.EUDataCenter = EUDataCenter; + this.INDataCenter = INDataCenter; + this.USDataCenter = USDataCenter; + this.JPDataCenter = JPDataCenter; + + this.LogBuilder = LogBuilder; + this.Logger = Logger; + this.Levels = Levels; + this.SDKLogger = SDKLogger; + + this.CommonAPIHandler = CommonAPIHandler; + + this.HeaderMap = HeaderMap; + this.Header = Header; + this.InitializeBuilder = InitializeBuilder; + this.Initializer = Initializer; + this.Param = Param; + this.ParameterMap = ParameterMap; + this.ProxyBuilder = ProxyBuilder; + this.RequestProxy = RequestProxy; + this.SDKConfigBuilder = SDKConfigBuilder; + this.SDKConfig = SDKConfig; + this.UserSignature = UserSignature; + + this.Choice = Choice; + this.Constants = Constants; + this.Converter = Converter; + this.DataTypeConverter = DatatypeConverter; + this.Downloader = Downloader; + this.FormDataConverter = FormDataConverter; + this.HeaderParamValidator = HeaderParamValidator; + this.JSONConverter = JSONConverter; + this.ModuleFieldsHandler = ModuleFieldsHandler; + this.StreamWrapper = StreamWrapper; + this.Utility = Utility; + this.XMLConverter = XMLConverter; + } +} +// +export default zohocrmsdk; +// +export { + DeleteTransferUsers, + TypeUserUsers, + AssociateEmail, + Layouts, + GroupsVariable, + PreferenceService, + BulkRead, + HoursShift, + Pipeline, + DependencyFieldMap, + TerritoriesUsers, + AppointmentPreference, + UnavailabilityUsers, + Fields, + Blueprint, + PreferencePrivacy, + Taxes, + Roles, + EmailRecordsRelated, + Modules, + InvitePortal, + Attachments, + Timelines, + GroupsUser, + EntityScores, + ContactRoles, + Portals, + RulesScoring, + AvailableCurrencies, + MailMerge, + Org, + Query, + FiscalYear, + Users, + ChangeMassOwner, + CustomViews, + Tags, + EmailTemplates, + Files, + AppsConfigurablePrivacy, + ConvertMass, + ComposeEmailMeta, + Templates, + Definition, + Territories, + CancelMeetings, + TerritoryUsers, + BusinessHours, + MetaPortals, + RecordsShare, + InventoryTemplates, + AddressesFrom, + Holidays, + Wizards, + Profiles, + MailSend, + CvidDeleteMass, + ContactDealRoles, + EmailSharing, + Currencies, + Notes, + IscSignature, + AttachmentsField, + Backup, + ListsRelated, + HistoryReschedule, + Variables, + ChangeOwner, + RecordsRelated, + DownloadImagesInline, + AssignmentRules, + Notifications, + BulkWrite, + AttachmentsDownload, + PortalTypeUser, + Record, + ComplianceHipaa, + + SDKException, + DBBuilder, + DBStore, + FileStore, + TokenStore, + OAuthBuilder, + OAuthToken, + Token, + APIHTTPConnector, + APIResponse, + AUDataCenter, + CNDataCenter, + DataCenter, + Environment, + EUDataCenter, + INDataCenter, + USDataCenter, + JPDataCenter, + LogBuilder, + Logger, + Levels, + SDKLogger, + CommonAPIHandler, + HeaderMap, + Header, + InitializeBuilder, + Initializer, + Param, + ParameterMap, + ProxyBuilder, + RequestProxy, + SDKConfigBuilder, + SDKConfig, + UserSignature, + Choice, + Constants, + Converter, + DatatypeConverter, + Downloader, + FormDataConverter, + HeaderParamValidator, + JSONConverter, + ModuleFieldsHandler, + StreamWrapper, + Utility, + XMLConverter, +}; diff --git a/versions/3.0.0/package.json b/versions/3.0.0/package.json new file mode 100644 index 0000000..0fb90fa --- /dev/null +++ b/versions/3.0.0/package.json @@ -0,0 +1,35 @@ +{ + "name": "@zohocrm/nodejs-sdk-5.0", + "version": "3.0.0", + "description": "Node JS SDK for Zoho CRM", + "main": "lib/index.js", + "type": "module", + "repository": { + "type": "git", + "url": "https://github.com/zoho/zohocrm-nodejs-sdk-5.0" + }, + "files": [ + "lib" + ], + "keywords": [ + "Node", + "Zoho", + "CRM", + "OAuth2", + "API" + ], + "author": "Zoho CRM API Team (support@zohocrm.com)", + "license": "Apache-2.0", + "dependencies": { + "form-data": "3.0.1", + "got": "11.6.0", + "moment-timezone": "0.5.43", + "mysql": "2.18.1", + "tunnel": "0.0.6", + "winston": "3.3.3" + }, + "homepage": "https://github.com/zoho/zohocrm-nodejs-sdk-5.0#readme", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + } +} diff --git a/versions/3.0.0/samples/appointmentpreferences/GetAppointmentPreference.js b/versions/3.0.0/samples/appointmentpreferences/GetAppointmentPreference.js new file mode 100644 index 0000000..935e2af --- /dev/null +++ b/versions/3.0.0/samples/appointmentpreferences/GetAppointmentPreference.js @@ -0,0 +1,83 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetAppointmentPreference +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getAppointmentPreference() + { + let appointmentPreferenceOperations = new ZOHOCRMSDK.AppointmentPreference.AppointmentPreferenceOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.AppointmentPreference.GetAppointmentPreferenceParam.INCLUDE, ""); + let response = await appointmentPreferenceOperations.getAppointmentPreference(paramInstance); + if (response != null) { + console.log("Status code " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.AppointmentPreference.ResponseWrapper) + { + let responseWrapper = responseHandler; + let appointmentPreferences = responseWrapper.getAppointmentPreferences(); + if (appointmentPreferences != null) + { + console.log("AppointmentPreference showJobSheet :" + appointmentPreferences.getShowJobSheet()); + console.log("AppointmentPreference whenDurationExceeds :" + appointmentPreferences.getWhenDurationExceeds().getValue()); + console.log("AppointmentPreference allowBookingOutsideServiceAvailability :" + appointmentPreferences.getAllowBookingOutsideServiceAvailability()); + console.log("AppointmentPreference whenAppointmentCompleted :" + appointmentPreferences.getWhenAppointmentCompleted().getValue()); + console.log("AppointmentPreference allowBookingOutsideBusinesshours :" + appointmentPreferences.getAllowBookingOutsideBusinesshours()); + let dealRecordConfiguration = appointmentPreferences.getDealRecordConfiguration(); + if (dealRecordConfiguration != null) + { + Array.from(dealRecordConfiguration.keys()).forEach(key => { + if (key == "layout") { + let layout = dealRecordConfiguration.get(key); + console.log("Layout ID : " + layout.getId()); + console.log("LayoutName : " + layout.getAPIName()); + } + if (key == "field_mappings") { + let fieldMappings = dealRecordConfiguration.get(key); + if (fieldMappings != null) { + fieldMappings.forEach(fieldMapping => { + console.log("FieldMappings Type: " + fieldMapping.getType().getValue()); + console.log("FieldMappings Value : " + fieldMapping.getValue()); + let field = fieldMapping.getField(); + if (field != null) { + console.log("Field APIName : " + field.getAPIName()); + console.log("Field ID : " + field.getId()); + } + }); + } + } + }); + } + } + } + else if (responseHandler instanceof ZOHOCRMSDK.AppointmentPreference.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage()); + } + } + } +} +await GetAppointmentPreference.initialize(); +await GetAppointmentPreference.getAppointmentPreference(); \ No newline at end of file diff --git a/versions/3.0.0/samples/appointmentpreferences/UpdateAppointmentPreference.js b/versions/3.0.0/samples/appointmentpreferences/UpdateAppointmentPreference.js new file mode 100644 index 0000000..7cf1b1c --- /dev/null +++ b/versions/3.0.0/samples/appointmentpreferences/UpdateAppointmentPreference.js @@ -0,0 +1,89 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateAppointmentPreference +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .grantToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateAppointmentPreference() { + let appointmentPreferenceOperations = new ZOHOCRMSDK.AppointmentPreference.AppointmentPreferenceOperations(); + let request = new ZOHOCRMSDK.AppointmentPreference.BodyWrapper(); + let appointmentPreferences = new ZOHOCRMSDK.AppointmentPreference.AppointmentPreference(); + appointmentPreferences.setAllowBookingOutsideBusinesshours(false); + appointmentPreferences.setWhenAppointmentCompleted(new ZOHOCRMSDK.Choice("create_deal")); + appointmentPreferences.setWhenDurationExceeds(new ZOHOCRMSDK.Choice("mark_as_complete")); + appointmentPreferences.setShowJobSheet(false); + let dealRecordConfiguration = new Map(); + let layout = new ZOHOCRMSDK.AppointmentPreference.Layout(); + layout.setAPIName("Standard"); + layout.setId(440248000173n); + dealRecordConfiguration.set("layout", layout); + let mappings = []; + let fieldMappings = new ZOHOCRMSDK.AppointmentPreference.FieldMappings(); + fieldMappings.setType(new ZOHOCRMSDK.Choice("static")); + fieldMappings.setValue("Closed Won"); + let field = new ZOHOCRMSDK.AppointmentPreference.Field(); + field.setAPIName("Stage"); + field.setId(4402480001324032n); + await fieldMappings.setField(field); + mappings.push(fieldMappings); + dealRecordConfiguration.set("field_mappings", mappings); + appointmentPreferences.setDealRecordConfiguration(dealRecordConfiguration); + await request.setAppointmentPreferences(appointmentPreferences); + let response = await appointmentPreferenceOperations.updateAppointmentPreference(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.AppointmentPreference.ActionWrapper) { + let actionResponse = responseObject.getAppointmentPreferences(); + if (actionResponse instanceof ZOHOCRMSDK.AppointmentPreference.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.AppointmentPreference.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + } else if (responseObject instanceof ZOHOCRMSDK.AppointmentPreference.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await UpdateAppointmentPreference.initialize(); +await UpdateAppointmentPreference.updateAppointmentPreference(); \ No newline at end of file diff --git a/versions/3.0.0/samples/assignment_rules/getAssignmentRule.js b/versions/3.0.0/samples/assignment_rules/getAssignmentRule.js new file mode 100644 index 0000000..530e3b7 --- /dev/null +++ b/versions/3.0.0/samples/assignment_rules/getAssignmentRule.js @@ -0,0 +1,84 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetAssignmentRule{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("clientId") + .clientSecret("clientSecret") + .refreshToken("refreshToken") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get AssignmentRule

+ * This method is used to get a single assignment rule + * @param {BigInt} ruleId The id of the assignment rule + * @returns + */ + static async getAssignmentRule(ruleId) { + let assignmentRulesOperations = new ZOHOCRMSDK.AssignmentRules.AssignmentRulesOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.AssignmentRules.GetAssignmentRuleParam.MODULE, "Leads"); + //Call getAssignmentRule method that takes ruleId and ParameterMap instance as parameter + let response = await assignmentRulesOperations.getAssignmentRule(ruleId, paramInstance); + if (response != null) { + console.log("Status code " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.AssignmentRules.ResponseWrapper) { + let responseWrapper = responseHandler; + let assignmentRules = responseWrapper.getAssignmentRules(); + assignmentRules.forEach(assignmentRule => { + console.log("AssignmentRule ModifiedTime : " + assignmentRule.getModifiedTime()); + console.log("AssignmentRule CreatedTime : " + assignmentRule.getCreatedTime()); + let defaultAssignee = assignmentRule.getDefaultAssignee(); + if (defaultAssignee != null) { + console.log("AssignmentRule DefaultAssignee Id : " + defaultAssignee.getId()); + console.log("AssignmentRule DefaultAssignee Name : " + defaultAssignee.getName()); + } + let module = assignmentRule.getModule(); + if (module != null) { + console.log("AssignmentRule Module Id : " + module.getId()); + console.log("AssignmentRule Module APIName : " + module.getAPIName()); + } + console.log("AssignmentRule Name : " + assignmentRule.getName()); + let modifiedBy = assignmentRule.getModifiedBy(); + if (modifiedBy != null) { + console.log("AssignmentRule ModifiedBy Id : " + modifiedBy.getId()); + console.log("AssignmentRule ModifiedBy Name : " + modifiedBy.getName()); + console.log("AssignmentRule ModifiedBy User-Email : " + modifiedBy.getEmail()); + } + let createdBy = assignmentRule.getCreatedBy(); + if (createdBy != null) { + console.log("AssignmentRule CreatedBy Id : " + createdBy.getId()); + console.log("AssignmentRule CreatedBy Name : " + createdBy.getName()); + console.log("AssignmentRule CreatedBy User-Email : " + createdBy.getEmail()); + } + console.log("AssignmentRule ID : " + assignmentRule.getId()); + console.log("AssignmentRule Description : " + assignmentRule.getDescription()); + }); + } + else if (responseHandler instanceof ZOHOCRMSDK.AssignmentRules.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage().getValue()); + } + } + } +} +await GetAssignmentRule.initialize(); +let ruleId =4402481305001n; +await GetAssignmentRule.getAssignmentRule(ruleId); \ No newline at end of file diff --git a/versions/3.0.0/samples/assignment_rules/getAssignmentRules.js b/versions/3.0.0/samples/assignment_rules/getAssignmentRules.js new file mode 100644 index 0000000..7ff3f92 --- /dev/null +++ b/versions/3.0.0/samples/assignment_rules/getAssignmentRules.js @@ -0,0 +1,80 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetAssignmentRules{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .grantToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get AssignmentRules

+ * This method is used to get assignment rules + * @returns + */ + static async getAssignmentRules() { + let assignmentRulesOperations = new ZOHOCRMSDK.AssignmentRules.AssignmentRulesOperations(); + //Call getAssignmentRules method + let response = await assignmentRulesOperations.getAssignmentRules(); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.AssignmentRules.ResponseWrapper) { + let responseWrapper = responseHandler; + let assignmentRules = responseWrapper.getAssignmentRules(); + assignmentRules.forEach(assignmentRule => { + console.log("AssignmentRule ModifiedTime : " + assignmentRule.getModifiedTime()); + console.log("AssignmentRule CreatedTime : " + assignmentRule.getCreatedTime()); + let defaultAssignee = assignmentRule.getDefaultAssignee(); + if (defaultAssignee != null) { + console.log("AssignmentRule DefaultAssignee Id : " + defaultAssignee.getId()); + console.log("AssignmentRule DefaultAssignee Name : " + defaultAssignee.getName()); + } + let module = assignmentRule.getModule(); + if (module != null) { + console.log("AssignmentRule Module Id : " + module.getId()); + console.log("AssignmentRule Module APIName : " + module.getAPIName()); + } + console.log("AssignmentRule Name : " + assignmentRule.getName()); + let modifiedBy = assignmentRule.getModifiedBy(); + if (modifiedBy != null) { + console.log("AssignmentRule ModifiedBy User-Id : " + modifiedBy.getId()); + console.log("AssignmentRule ModifiedBy User-Name : " + modifiedBy.getName()); + console.log("AssignmentRule ModifiedBy User-Email : " + modifiedBy.getEmail()); + } + let createdBy = assignmentRule.getCreatedBy(); + if (createdBy != null) { + console.log("AssignmentRule CreatedBy User-Id : " + createdBy.getId()); + console.log("AssignmentRule CreatedBy User-Name : " + createdBy.getName()); + console.log("AssignmentRule CreatedBy User-Email : " + createdBy.getEmail()); + } + console.log("AssignmentRule ID : " + assignmentRule.getId()); + console.log("AssignmentRule Description : " + assignmentRule.getDescription()); + }); + } + else if (responseHandler instanceof ZOHOCRMSDK.AssignmentRules.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage().getValue()); + } + } + } +} +await GetAssignmentRules.initialize(); +await GetAssignmentRules.getAssignmentRules(); \ No newline at end of file diff --git a/versions/3.0.0/samples/associateEmail/associateEmail.js b/versions/3.0.0/samples/associateEmail/associateEmail.js new file mode 100644 index 0000000..c5d89ac --- /dev/null +++ b/versions/3.0.0/samples/associateEmail/associateEmail.js @@ -0,0 +1,121 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class AssociateEmail +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async associate(recordId, module) + { + let associateEmailOperations = new ZOHOCRMSDK.AssociateEmail.AssociateEmailOperations(); + let request = new ZOHOCRMSDK.AssociateEmail.BodyWrapper(); + let emails = []; + for (let i = 0; i<1; i++) + { + let associateEmail = new ZOHOCRMSDK.AssociateEmail.AssociateEmail(); + let from = new ZOHOCRMSDK.AssociateEmail.From(); + from.setEmail("abc@gmail.com"); + from.setUserName("username"); + await associateEmail.setFrom(from); + let tos = []; + let to = new ZOHOCRMSDK.AssociateEmail.To(); + to.setEmail("abc123@gmail.com"); + to.setUserName("username1"); + tos.push(to); + let tos1 = []; + let to1 = new ZOHOCRMSDK.AssociateEmail.To(); + to1.setEmail('abc2@gmail.com'); + to1.setUserName('username2'); + tos1.push(to1); + let tos2 = []; + let to2 = new ZOHOCRMSDK.AssociateEmail.To(); + to2.setEmail('abc3@gmail.com'); + to2.setUserName('username3'); + tos2.push(to2); + associateEmail.setTo(tos); + associateEmail.setCc(tos1); + associateEmail.setBcc(tos2); + associateEmail.setSubject("subject"); + associateEmail.setOriginalMessageId("c6085fae06cbd7b75001d80ffefab4694dcd3a7fd6966372d5932b109244"); + associateEmail.setDateTime(new Date()); + associateEmail.setSent(true); + associateEmail.setContent('

Mail is of rich text format

REGARDS,

AZ
ADMIN
') + associateEmail.setMailFormat(new ZOHOCRMSDK.Choice("text")); + let attachments = []; + let attachment = new ZOHOCRMSDK.AssociateEmail.Attachments(); + attachment.setId("csdsfrfjebjhsdehjdvbsbhhsvdvebdedeferfdjwb"); + attachments.push(attachment); + emails.push(associateEmail); + } + request.setEmails(emails); + let response = await associateEmailOperations.associate(recordId, module, request); + if (response != null) + { + console.log("Status code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.AssociateEmail.ActionWrapper) + { + let actionWrapper = actionHandler; + let actionsResponses = actionWrapper.getEmails(); + actionsResponses.forEach(actionResponse => + { + if (actionResponse instanceof ZOHOCRMSDK.AssociateEmail.SuccessResponse) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.AssociateEmail.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + else if (actionHandler instanceof ZOHOCRMSDK.AssociateEmail.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let recordId = 440248077154n; +let module = "leads"; +await AssociateEmail.initialize(); +await AssociateEmail.associate(recordId, module); \ No newline at end of file diff --git a/versions/3.0.0/samples/attachments/deleteAttachment.js b/versions/3.0.0/samples/attachments/deleteAttachment.js new file mode 100644 index 0000000..5327385 --- /dev/null +++ b/versions/3.0.0/samples/attachments/deleteAttachment.js @@ -0,0 +1,83 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteAttachment{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Delete Attachment

+ * This method is used to delete an attachment of a single record of a module with ID and attachment ID and print the response + * @param {String} moduleAPIName The API Name of the record's module + * @param {BigInt} recordId The ID of the record to delete attachment + * @param {BigInt} attachmentId The ID of the attachment to be deleted + */ + static async deleteAttachment(moduleAPIName, recordId, attachmentId) { + //example + // let moduleAPIName = "module_api_name"; + // let recordId = 32267003n; + // let attachmentId = 32267024n; + let attachmentsOperations = new ZOHOCRMSDK.Attachments.AttachmentsOperations(); + //Call deleteAttachment method that takes attachmentId as parameter + let response = await attachmentsOperations.deleteAttachment(attachmentId, recordId, moduleAPIName); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Attachments.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Attachments.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Attachments.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Attachments.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await DeleteAttachment.initialize(); +let moduleAPIName = "leads"; +let recordId = 44024800774074n; +let attachmentId = 4402480001369001n; +await DeleteAttachment.deleteAttachment(moduleAPIName,recordId,attachmentId); diff --git a/versions/3.0.0/samples/attachments/deleteAttachments.js b/versions/3.0.0/samples/attachments/deleteAttachments.js new file mode 100644 index 0000000..bf9497a --- /dev/null +++ b/versions/3.0.0/samples/attachments/deleteAttachments.js @@ -0,0 +1,88 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteAttachments{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Delete Attachments

+ * This method is used to Delete attachments of a single record with ID and print the response. + * @param {String} moduleAPIName The API Name of the record's module + * @param {BigInt} recordId The ID of the record to delete attachments + * @param {bigint[]} attachmentIds The array of attachment IDs to be deleted + */ + static async deleteAttachments(moduleAPIName, recordId, attachmentIds) { + //example + // let moduleAPIName = "module_api_name"; + // let recordId = 32267003n; + // let attachmentIds = [32267024n, 32267034n, 32267198n] + let attachmentsOperations = new ZOHOCRMSDK.Attachments.AttachmentsOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + for (let attachmentId of attachmentIds) { + //Add the ids to parameter map instance + await paramInstance.add(ZOHOCRMSDK.Attachments.DeleteAttachmentsParam.IDS, attachmentIds); + } + //Call deleteAttachments method that takes paramInstance as parameter + let response = await attachmentsOperations.deleteAttachments(recordId, moduleAPIName, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Attachments.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Attachments.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Attachments.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Attachments.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await DeleteAttachments.initialize(); +let moduleAPIName = "leads"; +let recordId = 44024800774074n; +let attachmentIds = [20032n,400032n]; +await DeleteAttachments.deleteAttachments(moduleAPIName,recordId,attachmentIds); \ No newline at end of file diff --git a/versions/3.0.0/samples/attachments/downloadAttachment.js b/versions/3.0.0/samples/attachments/downloadAttachment.js new file mode 100644 index 0000000..3ed218d --- /dev/null +++ b/versions/3.0.0/samples/attachments/downloadAttachment.js @@ -0,0 +1,71 @@ +import path from "path"; +import fs from "fs"; +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DownloadAttachment{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Download Attachment

+ * This method is used to download an attachment of a single record of a module with ID and attachment ID and write the file in the specified destination. + * @param {String} moduleAPIName The API Name of the record's module + * @param {BigInt} recordId The ID of the record to download attachment + * @param {BigInt} attachmentId The ID of the attachment to be downloaded + * @param {String} destinationFolder The absolute path of the destination folder to store the attachment + */ + static async downloadAttachment(moduleAPIName, recordId, attachmentId, destinationFolder) { + //example + // let moduleAPIName = "module_api_name"; + // let recordId = 32267003n; + // let attachmentId = 32267024n; + // let destinationFolder = "/Users/user-name/Desktop"; + let attachmentsOperations = new ZOHOCRMSDK.Attachments.AttachmentsOperations(); + //Call downloadAttachment method that takes attachmentId as parameters + let response = await attachmentsOperations.getAttachment(attachmentId, recordId, moduleAPIName); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if (response.getStatusCode() == 204) { + console.log("No Content"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Attachments.FileBodyWrapper) { + let streamWrapper = responseObject.getFile(); + //Construct the file name by joining the destinationFolder and the name from StreamWrapper instance + let fileName = path.join(destinationFolder, streamWrapper.getName()); + let readStream = streamWrapper.getStream(); + //Write the stream to the destination file. + fs.writeFileSync(fileName, readStream); + } + else if (responseObject instanceof ZOHOCRMSDK.Attachments.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await DownloadAttachment.initialize(); +let moduleAPIName = "leads"; +let recordId = 44024800774074n; +let attachmentId = 44024801369001n; +let destinationFolder = "/users/nodejs-sdk-sample/file"; +await DownloadAttachment.downloadAttachment(moduleAPIName,recordId,attachmentId,destinationFolder); \ No newline at end of file diff --git a/versions/3.0.0/samples/attachments/getAttachments.js b/versions/3.0.0/samples/attachments/getAttachments.js new file mode 100644 index 0000000..9219cbf --- /dev/null +++ b/versions/3.0.0/samples/attachments/getAttachments.js @@ -0,0 +1,118 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetAttachments{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Attachments

+ * This method is used to get a single record's attachments' details with ID and print the response. + * @param {String} moduleAPIName The API Name of the record's module + * @param {BigInt} recordID The ID of the record to get attachments + */ + static async getAttachments(moduleAPIName, recordID) { + //example + // let moduleAPIName = "module_api_name"; + // let recordId = 34097003n; + let attachmentsOperations = new ZOHOCRMSDK.Attachments.AttachmentsOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + //Possible parameters of Get Attachments Operation + await paramInstance.add(ZOHOCRMSDK.Attachments.GetAttachmentsParam.FIELDS, "id"); + await paramInstance.add(ZOHOCRMSDK.Attachments.GetAttachmentsParam.PAGE, 1); + await paramInstance.add(ZOHOCRMSDK.Attachments.GetAttachmentsParam.PER_PAGE, 10); + //Call getAttachments method that takes ParameterMap instance as parameter + let response = await attachmentsOperations.getAttachments(recordId, moduleAPIName, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Attachments.ResponseWrapper) { + let attachments = responseObject.getData(); + attachments.forEach(attachment => { + console.log("Attachment ID: " + attachment.getId()); + let owner = attachment.getOwner(); + if (owner != null) { + console.log("Attachment Owner - Name: " + owner.getName()); + console.log("Attachment Owner ID: " + owner.getId()); + console.log("Attachment Owner Email: " + owner.getEmail()); + } + if (attachment.getModifiedTime() != null) { + console.log("Attachment Modified Time: " + attachment.getModifiedTime().toString()); + } + console.log("Attachment File Name: " + attachment.getFileName()); + console.log("Attachment Created Time: " + attachment.getCreatedTime()); + console.log("Attachment File Size: " + attachment.getSize()); + let parentId = attachment.getParentId(); + if (parentId != null) { + console.log("Attachment parent record Name: " + parentId.getKeyValue("name")); + console.log("Attachment parent record ID: " + parentId.getId()); + } + if (attachment.getEditable() != null) { + console.log("Attachment is Editable: " + attachment.getEditable().toString()); + } + console.log("Attachment SharingPermission: " + attachment.getSharingPermission()); + console.log("Attachment File ID: " + attachment.getFileId()); + console.log("Attachment File Type: " + attachment.getType()); + console.log("Attachment seModule: " + attachment.getSeModule()); + let modifiedBy = attachment.getModifiedBy(); + if (modifiedBy != null) { + console.log("Attachment Modified By User-Name: " + modifiedBy.getName()); + console.log("Attachment Modified By User-ID: " + modifiedBy.getId()); + console.log("Attachment Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("Attachment Type: " + attachment.getAttachmentType()); + console.log("Attachment State: " + attachment.getState()); + let createdBy = attachment.getCreatedBy(); + if (createdBy != null) { + console.log("Attachment Created By User-Name: " + createdBy.getName()); + console.log("Attachment Created By User-ID: " + createdBy.getId()); + console.log("Attachment Created By User-Email: " + createdBy.getEmail()); + } + console.log("Attachment LinkUrl: " + attachment.getLinkUrl()); + }); + let info = responseObject.getInfo(); + if (info != null) { + if (info.getPerPage() != null) { + console.log("Attachment Info PerPage: " + info.getPerPage().toString()); + } + if (info.getCount() != null) { + console.log("Attachment Info Count: " + info.getCount().toString()); + } + if (info.getPage() != null) { + console.log("Attachment Info Page: " + info.getPage().toString()); + } + if (info.getMoreRecords() != null) { + console.log("Attachment Info MoreRecords: " + info.getMoreRecords().toString()); + } + } + } + else if (responseObject instanceof ZOHOCRMSDK.Attachments.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetAttachments.initialize(); +let moduleAPIName = "leads"; +let recordId =4402480074n; +await GetAttachments.getAttachments(moduleAPIName,recordId); diff --git a/versions/3.0.0/samples/attachments/uploadAttachments.js b/versions/3.0.0/samples/attachments/uploadAttachments.js new file mode 100644 index 0000000..4a71e36 --- /dev/null +++ b/versions/3.0.0/samples/attachments/uploadAttachments.js @@ -0,0 +1,97 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UploadAttachments{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Upload Attachments

+ * This method is used to upload an attachment to a single record of a module with ID and print the response. + * @param {String} moduleAPIName The API Name of the record's module + * @param {BigInt} recordId The ID of the record to upload attachment + * @param {String} absoluteFilePath The absolute file path of the file to be attached + */ + static async uploadAttachments(moduleAPIName, recordId, absoluteFilePath) { + //example + // let moduleAPIName = "module_api_name"; + // let recordId = 34096003n; + // let absoluteFilePath = "/Users/user-name/Documents/image.jpg"; + let attachmentsOperations = new ZOHOCRMSDK.Attachments.AttachmentsOperations(); + let fileBodyWrapper = new ZOHOCRMSDK.Attachments.FileBodyWrapper(); + /** StreamWrapper can be initialized in any of the following ways */ + /** + * param 1 -> fileName + * param 2 -> Read Stream. + */ + let streamWrapper = new ZOHOCRMSDK.StreamWrapper(null, null, absoluteFilePath);//fs.createReadStream(absoluteFilePath) + /** + * param 1 -> fileName + * param 2 -> Read Stream + * param 3 -> Absolute File Path of the file to be attached + */ + // let streamWrapper = new StreamWrapper(null, null, absoluteFilePath); + fileBodyWrapper.setFile(streamWrapper); + //Call uploadAttachment method that takes FileBodyWrapper instance as parameter + let response = await attachmentsOperations.createAttachment(recordId, moduleAPIName, fileBodyWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Attachments.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Attachments.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Attachments.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Attachments.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await UploadAttachments.initialize(); +let moduleAPIName ="leads"; +let recordId = 4402480774074n; +let absoluteFilePath = "/users/file.txt"; +await UploadAttachments.uploadAttachments(moduleAPIName,recordId,absoluteFilePath); \ No newline at end of file diff --git a/versions/3.0.0/samples/attachments/uploadLinkAttachment.js b/versions/3.0.0/samples/attachments/uploadLinkAttachment.js new file mode 100644 index 0000000..661298d --- /dev/null +++ b/versions/3.0.0/samples/attachments/uploadLinkAttachment.js @@ -0,0 +1,86 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UploadLinkAttachment{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Upload Link Attachments

+ * This method is used to upload link attachment and print the response. + * @param {String} moduleAPIName The API Name of the record's module + * @param {BigInt} recordId The ID of the record to upload Link attachment + * @param {String} attachmentURL The attachmentURL of the doc or image link to be attached + */ + static async uploadLinkAttachment(moduleAPIName, recordId, attachmentURL) { + //example + // let moduleAPIName = "module_api_name"; + // let recordId = 32267003n; + // let attachmentURL = "https://5.imimg.com/data5/KJ/UP/MY-8655440/zoho-crm-500x500.png"; + let attachmentsOperations = new ZOHOCRMSDK.Attachments.AttachmentsOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + //Add the attachmentURL to parameter Instance + await paramInstance.add(ZOHOCRMSDK.Attachments.UploadUrlAttachmentsParam.ATTACHMENTURL, attachmentURL); + //Call uploadLinkAttachments method that takes paramInstance as parameter + let response = await attachmentsOperations.uploadUrlAttachments(recordId, moduleAPIName, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Attachments.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Attachments.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Attachments.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Attachments.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UploadLinkAttachment.initialize(); +let moduleAPIName = "leads"; +let recordId = 20043n; +let attachmentURL = "https://5.imimg.com/data5/KJ/UP/MY-8655440/zoho-crm-500x500.png"; +await UploadLinkAttachment.uploadLinkAttachment(moduleAPIName,recordId,attachmentURL); \ No newline at end of file diff --git a/versions/3.0.0/samples/availableCurrencies/getAvailableCurrencies.js b/versions/3.0.0/samples/availableCurrencies/getAvailableCurrencies.js new file mode 100644 index 0000000..ddcfe9c --- /dev/null +++ b/versions/3.0.0/samples/availableCurrencies/getAvailableCurrencies.js @@ -0,0 +1,61 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetAvailableCurrencies +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getAvailableCurrnecies() + { + let currenciesOpertions = new ZOHOCRMSDK.AvailableCurrencies.AvailableCurrenciesOperations(); + let response = await currenciesOpertions.getAvailableCurrencies(); + if (response != null) + { + console.log("Status code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content\n" : "Not Modified\n"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.AvailableCurrencies.ResponseWrapper) + { + let responseWrapper = responseHandler; + let currenciesList = responseWrapper.getAvailableCurrencies(); + currenciesList.forEach(currency => { + console.log ("Currency DisplayValue: " + currency.getDisplayValue() + "\n"); + console.log ("Currency DecimalSeparator: " + currency.getDecimalSeparator() + "\n"); + console.log ("Currency Symbol: " + currency.getSymbol() + "\n"); + console.log ("Currency ThousandSeparator: " + currency.getThousandSeparator() + "\n"); + console.log ("Currency IsoCode: " + currency.getIsoCode() + "\n"); + console.log ("Currency DisplayName: " + currency.getDisplayName() + "\n"); + console.log ("Currency DecimalPlaces: " + currency.getDecimalPlaces() + "\n"); + }); + } + else if (responseHandler instanceof ZOHOCRMSDK.AvailableCurrencies.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await GetAvailableCurrencies.initialize(); +await GetAvailableCurrencies.getAvailableCurrnecies(); \ No newline at end of file diff --git a/versions/3.0.0/samples/backup/cancel.js b/versions/3.0.0/samples/backup/cancel.js new file mode 100644 index 0000000..039ef78 --- /dev/null +++ b/versions/3.0.0/samples/backup/cancel.js @@ -0,0 +1,76 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class Cancel +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async cancel(id) + { + let backupOperations = new ZOHOCRMSDK.Backup.BackupOperations(); + let response = backupOperations.cancel(id); + if (response != null) + { + console.log("Status code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Backup.ActionWrapper) + { + let actionWrapper = actionHandler; + let actionResponse = actionWrapper.getBackup(); + if (actionResponse instanceof ZOHOCRMSDK.Backup.SuccessResponse) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.Backup.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.Backup.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let id = 420343004342443n; +await Cancel.initialize(); +await Cancel.cancel(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/backup/downloadBackedupData.js b/versions/3.0.0/samples/backup/downloadBackedupData.js new file mode 100644 index 0000000..c7124a2 --- /dev/null +++ b/versions/3.0.0/samples/backup/downloadBackedupData.js @@ -0,0 +1,55 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +import path from "path"; +import fs from "fs"; +class DownloadBackedUpData +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async downlaodBackedUpData(downloadURL, destinationFolder) + { + let backupOperations = new ZOHOCRMSDK.Backup.BackupOperations(); + let response = backupOperations.downloadBackedUpData(downloadURL); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if (response.getStatusCode() == 204) { + console.log("No Content"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Backup.FileBodyWrapper) { + let streamWrapper = responseObject.getFile(); + let fileName = path.join(destinationFolder, streamWrapper.getName()); + let readStream = streamWrapper.getStream(); + fs.writeFileSync(fileName, readStream); + } + else if (responseObject instanceof ZOHOCRMSDK.Backup.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +let downloadURL = 'https://download-accl.zoho.com/v2/crm/123456789/backup/36523971763003/Data_001.zip'; +let destinationFolder = "Users/sdk-sample/file"; +await DownloadBackedUpData.initialize(); +await DownloadBackedUpData.downlaodBackedUpData(downloadURL, destinationFolder); \ No newline at end of file diff --git a/versions/3.0.0/samples/backup/getDetails.js b/versions/3.0.0/samples/backup/getDetails.js new file mode 100644 index 0000000..4abff8b --- /dev/null +++ b/versions/3.0.0/samples/backup/getDetails.js @@ -0,0 +1,69 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetDetails +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getDetails() + { + let backupOperations = new ZOHOCRMSDK.Backup.BackupOperations(); + let response = backupOperations.getDetails(); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + if (response.getStatusCode() == 204 || response.getStatusCode() == 304) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responsehandler = response.getObject(); + if (responsehandler instanceof ZOHOCRMSDK.Backup.BodyWrapper) + { + let responseWrapper = responsehandler; + let backup = responseWrapper.getBackup(); + if (backup != null) + { + console.log("Backup Rrule: " + backup.getRrule() + "\n"); + console.log("Backup Id: " + backup.getId() + "\n"); + console.log("Backup StartDate: " . backup.getStartDate().toDateString() + "\n"); + console.log("Backup ScheduledDate: " . backup.getScheduledDate().toDateString() + "\n"); + console.log("Backup Status: " + backup.getStatus() + "\n"); + let requester = backup.getRequester(); + if (requester != null) + { + console.log("Backup Requester Id: " + requester.getId() + "\n"); + console.log("Backup Requester Name: " + requester.getName() + "\n"); + console.log("Backup Requester Zuid: " + requester.getZuid() + "\n"); + + } + } + } + else if (responsehandler instanceof ZOHOCRMSDK.Backup.APIException) + { + let exception = responsehandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await GetDetails.initialize(); +await GetDetails.getDetails(); \ No newline at end of file diff --git a/versions/3.0.0/samples/backup/getUrls.js b/versions/3.0.0/samples/backup/getUrls.js new file mode 100644 index 0000000..692330d --- /dev/null +++ b/versions/3.0.0/samples/backup/getUrls.js @@ -0,0 +1,72 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetUrls +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getUrls() + { + let backupOperations = new ZOHOCRMSDK.Backup.BackupOperations(); + let response = backupOperations.getUrls(); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + if (response.getStatusCode() == 204 || response.getStatusCode() == 304) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.Backup.UrlsWrapper) + { + let responseWrapper = responseHandler; + let urls = responseWrapper.getUrls(); + if (urls != null) + { + let dataLinks = urls.getDataLinks(); + if (dataLinks != null) + { + console.log("Urls DataLinks: " + "\n"); + dataLinks.forEach(dataLink => { + console.log(dataLink + "\n"); + }); + } + let attachmentLinks = urls.getAttachmentLinks(); + if (attachmentLinks != null) + { + console.log("Urls attachmeents: " + "\n"); + attachmentLinks.forEach(attachmentLink => { + console.log(attachmentLink + "\n"); + }); + } + console.log("Urls ExpiryDate: " + urls.getExpiryDate().toDateString()); + } + } + else if (responseHandler instanceof ZOHOCRMSDK.Backup.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await GetUrls.initialize(); +await GetUrls.getUrls(); \ No newline at end of file diff --git a/versions/3.0.0/samples/backup/history.js b/versions/3.0.0/samples/backup/history.js new file mode 100644 index 0000000..32a851f --- /dev/null +++ b/versions/3.0.0/samples/backup/history.js @@ -0,0 +1,88 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class History +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async history() + { + let backupOperations = new ZOHOCRMSDK.Backup.BackupOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + let response = backupOperations.history(paramInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + if (response.getStatusCode() == 204 || response.getStatusCode() == 304) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.Backup.HistoryWrapper) + { + let historyWrapper = responseHandler; + let history = historyWrapper.getHistory(); + history.forEach(history1 => { + if (history1 instanceof ZOHOCRMSDK.Backup.History) + { + console.log("HistoryId: " + history1.getId() + "\n"); + let doneby = history1.getDoneBy(); + if (doneby != null) + { + console.log("History DoneBy Id : " + doneby.getId() + "\n"); + console.log("History DoneBy Name : " + doneby.getName() + "\n"); + console.log("History DoneBy Zuid : " + doneby.getZuid() + "\n"); + } + console.log("History LogTime: " + history1.getLogTime().toString() + "\n"); + console.log("History State: " + history1.getState() + "\n"); + console.log("History Action: " + history1.getAction() + "\n"); + console.log("History RepeatType: " + history1.getRepeatType() + "\n"); + console.log("History FileName: " + history1.getFileName() + "\n"); + console.log("History Count: " + history1.getCount() + "\n" ); + } + let info = historyWrapper.getInfo(); + if (info != null) + { + if (info.getPerPage() != null) { + console.log("History Info PerPage: " . info.getPerPage().toString()); + } + if (info.getCount() != null) { + console.log("History Info Count: " . info.getCount().toString()); + } + if (info.getPage() != null) { + console.log("History Info Page: " . info.getPage().toString()); + } + if (info.getMoreRecords() != null) { + console.log("History Info MoreRecords: " . info.getMoreRecords().toString()); + } + } + }); + } + else if (responseHandler instanceof ZOHOCRMSDK.Backup.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await History.initialize(); +await History.history(); \ No newline at end of file diff --git a/versions/3.0.0/samples/backup/schedule.js b/versions/3.0.0/samples/backup/schedule.js new file mode 100644 index 0000000..a63792d --- /dev/null +++ b/versions/3.0.0/samples/backup/schedule.js @@ -0,0 +1,79 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class Schedule +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async schedule() + { + let backupOperations = new ZOHOCRMSDK.Backup.BackupOperations(); + let bodyWrapper = new ZOHOCRMSDK.Backup.BodyWrapper(); + let backup = new ZOHOCRMSDK.Backup.Backup(); + backup.setRrule("RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=1TH"); + await bodyWrapper.setBackup(backup); + let response = backupOperations.schedule(bodyWrapper); + if (response != null) + { + console.log("Status code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Backup.ActionWrapper) + { + let actionWrapper = actionHandler; + let actionResponse = actionWrapper.getBackup(); + if (actionResponse instanceof ZOHOCRMSDK.Backup.SuccessResponse) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.Backup.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.Backup.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await Schedule.initialize(); +await Schedule.schedule(); \ No newline at end of file diff --git a/versions/3.0.0/samples/blue_print/getBluePrint.js b/versions/3.0.0/samples/blue_print/getBluePrint.js new file mode 100644 index 0000000..9c3158f --- /dev/null +++ b/versions/3.0.0/samples/blue_print/getBluePrint.js @@ -0,0 +1,306 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetBluePrint{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Blueprint

+ * This method is used to get a single record's Blueprint details with ID and print the response. + * @param {String} moduleAPIName The API Name of the record's module + * @param {String} recordId The ID of the record to get Blueprint + */ + static async getBlueprint(moduleAPIName, recordId) { + //example + // let moduleAPIName = "module_api_name"; + // let recordId = 2469044n; + let bluePrintOperations = new ZOHOCRMSDK.Blueprint.BlueprintOperations(recordId, moduleAPIName); + //Call getBlueprint method + let response = await bluePrintOperations.getBlueprint(); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Blueprint.ResponseWrapper) { + let bluePrint = responseObject.getBlueprint(); + let processInfo = bluePrint.getProcessInfo(); + if (processInfo != null) { + console.log("ProcessInfo Field-ID: " + processInfo.getFieldId()); + let escalation = processInfo.getEscalation(); + if (escalation != null) { + console.log("ProcessInfo Escalation Days : " + escalation.getDays()); + console.log("ProcessInfo Escalation Status : " + escalation.getStatus()); + } + console.log("ProcessInfo isContinuous: " + processInfo.getIsContinuous()); + console.log("ProcessInfo API Name: " + processInfo.getAPIName()); + console.log("ProcessInfo Continuous: " + processInfo.getContinuous()); + console.log("ProcessInfo FieldLabel: " + processInfo.getFieldLabel()); + console.log("ProcessInfo Name: " + processInfo.getName()); + console.log("ProcessInfo ColumnName: " + processInfo.getColumnName()); + console.log("ProcessInfo FieldValue: " + processInfo.getFieldValue()); + console.log("ProcessInfo ID: " + processInfo.getId()); + console.log("ProcessInfo FieldName: " + processInfo.getFieldName()); + } + let transitions = bluePrint.getTransitions(); + transitions.forEach(transition => { + let nextTransitions = transition.getNextTransitions(); + nextTransitions.forEach(nextTransition => { + console.log("NextTransition ID: " + nextTransition.getId()); + console.log("NextTransition CriteriaMatched: " + nextTransition.getCriteriaMatched()); + console.log("NextTransition Name: " + nextTransition.getName()); + console.log("NextTransition Type: " + nextTransition.getType()); + }); + let parentTransition = transition.getParentTransition(); + if (parentTransition != null) { + console.log("Parenttransition ID: " + parentTransition.getId()); + } + let data = transition.getData(); + if (data != null) { + console.log("Record ID: " + data.getId()); + let createdBy = data.getCreatedBy(); + if (createdBy != null) { + console.log("Record Created By User-ID: " + createdBy.getId()); + console.log("Record Created By User-Name: " + createdBy.getName()); + } + if (data.getCreatedTime() != null) { + console.log("Record Created Time: " + data.getCreatedTime().toString()); + } + if (data.getModifiedTime() != null) { + console.log("Record Modified Time: " + data.getModifiedTime().toString()); + } + let modifiedBy = data.getModifiedBy(); + if (modifiedBy != null) { + console.log("Record Modified By User-ID: " + modifiedBy.getId()); + console.log("Record Modified By user-Name: " + modifiedBy.getName()); + } + Array.from(data.getKeyValues().keys()).forEach(key => { + console.log(key + ": " + data.getKeyValues().get(key)); + }); + } + console.log("Transition NextFieldValue: " + transition.getNextFieldValue()); + console.log("Transition Name: " + transition.getName()); + console.log("Transition CriteriaMatched: " + transition.getCriteriaMatched().toString()); + console.log("Transition ID: " + transition.getId()); + let fields = transition.getFields(); + console.log("Transition Fields"); + for (let index = 0; index < fields.length; index++) { + const field = fields[index]; + if (field.getSystemMandatory() != null) { + console.log("SystemMandatory: " + field.getSystemMandatory().toString()); + } + console.log("Private" + field.getPrivate()); + console.log("Webhook: " + field.getWebhook()); + console.log("JsonType: " + field.getJsonType()); + if (field.getCrypt() != null) { + let crypt = field.getCrypt(); + console.log("Crypt Mode: " + crypt.getMode()); + console.log("Crypt Column: " + crypt.getColumn()); + console.log("Crypt Table: " + crypt.getTable()); + console.log("Crypt Status: " + crypt.getStatus()); + } + console.log("FieldLabel: " + field.getFieldLabel()); + let toolTip = field.getTooltip(); + if (toolTip != null) { + console.log("Tooltip Name: " + toolTip.getName()); + console.log("Tooltip Value: " + toolTip.getValue()); + } + console.log("CreatedSource: " + field.getCreatedSource()); + let layout = field.getLayouts(); + if (layout != null) { + console.log("Layout ID: " + layout.getId()); + console.log("Layout Name: " + layout.getName()); + } + if (field.getFieldReadOnly() != null) { + console.log("FieldReadOnly: " + field.getFieldReadOnly().toString()); + } + console.log("Field Content: " + field.getContent()); + console.log("DisplayLabel: " + field.getDisplayLabel()); + if (field.getDisplayType() != null) { + console.log("Field DisplayType: " + field.getDisplayType().getValue()); + } + console.log("Field UiType: " + field.getUiType()); + console.log("Field ValidationRule: " + field.getValidationRule()); + if (field.getReadOnly() != null) { + console.log("ReadOnly: " + field.getReadOnly().toString()); + } + console.log("AssociationDetails: " + field.getAssociationDetails()); + if (field.getQuickSequenceNumber() != null) { + console.log("QuickSequenceNumber: " + field.getQuickSequenceNumber().toString()); + } + let multiModuleLookup = field.getMultiModuleLookup(); + if (multiModuleLookup != null) { + let module = multiModuleLookup.getModule(); + if (module != null) { + console.log("Field MultiModuleLookup Module APIName: " + module.getAPIName()); + console.log("Field MultiModuleLookup Module Id: " + module.getId()); + } + console.log("Field MultiModuleLookup Name: " + multiModuleLookup.getName()); + console.log("Field MultiModuleLookup Id: " + multiModuleLookup.getId()); + } + let currency = field.getCurrency(); + if (currency != null) { + console.log("Field Currency RoundingOption: " + currency.getRoundingOption()); + if (currency.getPrecision() != null) { + console.log("Field Currency Precision: " + currency.getPrecision()); + } + } + console.log("ID: " + field.getId()); + if (field.getCustomField() != null) { + console.log("CustomField: " + field.getCustomField().toString()); + } + let lookup = field.getLookup(); + if (lookup != null) { + let layout1 = lookup.getLayout(); + if (layout1 != null) { + console.log("Field Lookup Layout ID: " + layout1.getId()); + console.log("Field Lookup Layout Name: " + layout1.getName()); + } + console.log("Field Lookup DisplayLabel: " + lookup.getDisplayLabel()); + console.log("Field Lookup APIName: " + lookup.getAPIName()); + console.log("Field Lookup Module: " + lookup.getModule()); + if (lookup.getId() != null) { + console.log("Field Lookup ID: " + lookup.getId()); + } + } + console.log("Field Filterable: " + field.getFilterable()); + if (field.getConvertMapping() != null) { + Array.from(field.getConvertMapping().keys()).forEach(key => { + console.log(key + ": " + field.getConvertMapping().get(key)); + }); + } + if (field.getVisible() != null) { + console.log("Visible: " + field.getVisible().toString()); + } + let profiles = field.getProfiles(); + if (profiles != null) { + profiles.forEach(profile => { + console.log("Field Profile PermissionType: " + profile.getPermissionType()); + console.log("Field Profile Name: " + profile.getName()); + console.log("Field Profile Id: " + profile.getId()); + }); + } + if (field.getLength() != null) { + console.log("Length: " + field.getLength().toString()); + } + console.log("ColumnName: " + field.getColumnName()); + console.log("Type: " + field.getType()); + let viewType = field.getViewType(); + if (viewType != null) { + console.log("Field View: " + viewType.getView()); + console.log("Field Edit: " + viewType.getEdit()); + console.log("Field Create: " + viewType.getCreate()); + console.log("Field QuickCreate: " + viewType.getQuickCreate()); + } + console.log("Field PickListValuesSortedLexically: " + field.getPickListValuesSortedLexically()); + console.log("Sortable: " + field.getSortable()); + console.log("TransitionSequence: " + field.getTransitionSequence().toString()); + let external = field.getExternal(); + if (external != null) { + console.log("Field External Show: " + external.getShow()); + console.log("Field External Type: " + external.getType()); + console.log("Field External AllowMultipleConfig: " + external.getAllowMultipleConfig()); + } + console.log("APIName: " + field.getAPIName()); + let unique = field.getUnique(); + if (unique != null) { + console.log("Field Unique Casesensitive : " + unique.getCasesensitive()); + } + if (field.getHistoryTracking() != null) { + console.log("Field HistoryTracking: " + field.getHistoryTracking()); + } + console.log("DataType: " + field.getDataType()); + let formula = field.getFormula(); + if (formula != null) { + console.log("Field Formula ReturnType : " + formula.getReturnType()); + if (formula.getExpression() != null) { + console.log("Field Formula Expression : " + formula.getExpression()); + } + } + console.log("DecimalPlace: " + field.getDecimalPlace()); + let multiSelectLookup = field.getMultiselectlookup(); + if (multiSelectLookup != null) { + console.log("DisplayLabel: " + multiSelectLookup.getDisplayLabel()); + console.log("LinkingModule: " + multiSelectLookup.getLinkingModule()); + console.log("LookupApiname: " + multiSelectLookup.getLookupApiname()); + console.log("APIName: " + multiSelectLookup.getAPIName()); + console.log("ConnectedlookupApiname: " + multiSelectLookup.getConnectedlookupApiname()); + console.log("ID: " + multiSelectLookup.getId()); + } + let pickListValues = field.getPickListValues(); + if (pickListValues != null) { + pickListValues.forEach(pickListValue => { + this.printPickListValue(pickListValue); + }); + } + let autoNumber = field.getAutoNumber(); + if (autoNumber != null) { + console.log("Prefix: " + autoNumber.getPrefix()); + console.log("Suffix: " + autoNumber.getSuffix()); + if (autoNumber.getStartNumber() != null) { + console.log("StartNumber: " + autoNumber.getStartNumber().toString()); + } + } + console.log("PersonalityName: " + field.getPersonalityName()); + if (field.getMandatory() != null) { + console.log("Mandatory: " + field.getMandatory().toString()); + } + } + console.log("Transition CriteriaMessage: " + transition.getCriteriaMessage()); + console.log("Transition PercentPartialSave: " + transition.getPercentPartialSave()); + if (transition.getExecutionTime() != null) { + console.log("Transition ExecutionTime: " + transition.getExecutionTime().toString()); + } + console.log("Transition Type: " + transition.getType()); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Blueprint.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } + static printPickListValue(pickListValue) { + console.log("DisplayValue: " + pickListValue.getDisplayValue()); + console.log("SequenceNumber: " + pickListValue.getSequenceNumber().toString()); + console.log("ExpectedDataType: " + pickListValue.getExpectedDataType()); + console.log("ActualValue: " + pickListValue.getActualValue()); + console.log("SysRefName: " + pickListValue.getSysRefName()); + console.log("Type: " + pickListValue.getType()); + console.log("Id: " + pickListValue.getId()); + if (pickListValue.getMaps() != null) { + pickListValue.getMaps().forEach(map => { + let pickListValues = map.getPickListValues(); + if (pickListValues != null) { + pickListValues.forEach(pickListValue1 => { + this.printPickListValue(pickListValue1); + }); + } + }); + } + } +} +await GetBluePrint.initialize(); +let moduleAPIName = "Leads"; +let recordId = "44024800262318"; +await GetBluePrint.getBlueprint(moduleAPIName,recordId); diff --git a/versions/3.0.0/samples/blue_print/updateBluePrint.js b/versions/3.0.0/samples/blue_print/updateBluePrint.js new file mode 100644 index 0000000..48caeec --- /dev/null +++ b/versions/3.0.0/samples/blue_print/updateBluePrint.js @@ -0,0 +1,93 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateBluePrint{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Blueprint

+ * This method is used to update a single record's Blueprint details with ID and print the response. + * @param {String} moduleAPIName The API Name of the record's module + * @param {String} recordId The ID of the record to update Blueprint + * @param {String} transitionId The ID of the Blueprint transition Id + */ + static async updateBlueprint(moduleAPIName, recordId, transitionId) { + //example + // let moduleAPIName = "module_api_name"; + // let recordId = 2469044n; + // let transitionId = 1172075n; + let bluePrintOperations = new ZOHOCRMSDK.Blueprint.BlueprintOperations(recordId, moduleAPIName); + let bodyWrapper = new ZOHOCRMSDK.Blueprint.BodyWrapper(); + //Array to contain BluePrint instances + let bluePrintArray = []; + let bluePrint = new ZOHOCRMSDK.Blueprint.BluePrint(); + bluePrint.setTransitionId(transitionId); + let data = new ZOHOCRMSDK.Record.Record(); + let lookup = new Map(); + lookup.set("Phone", "8940372937"); + lookup.set("id", "8940372937"); + // data.addKeyValue("Data_3", lookup); + data.addKeyValue("Phone", "8940372937"); + data.addKeyValue("Notes", "Updated via blueprint"); + let checkLists = []; + let checkListItem = new Map(); + checkListItem.set("list 1", true); + checkLists.push(checkListItem); + checkListItem = new Map(); + checkListItem.set("list 2", true); + checkLists.push(checkListItem); + checkListItem = new Map(); + checkListItem.set("list 3", true); + checkLists.push(checkListItem); + data.addKeyValue("CheckLists", checkLists); + await bluePrint.setData(data); + //Add BluePrint instance to the array + bluePrintArray.push(bluePrint); + bodyWrapper.setBlueprint(bluePrintArray); + //Call updateBluePrint method that takes BodyWrapper instance + let response = await bluePrintOperations.updateBlueprint(bodyWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.BluePrints.SuccessResponse) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + else if (responseObject instanceof ZOHOCRMSDK.BluePrints.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateBluePrint.initialize(); +let moduleAPIName = "leads"; +let recordId = "423210"; +let transitionId = "1172075"; +await UpdateBluePrint.updateBlueprint(moduleAPIName,recordId,transitionId); \ No newline at end of file diff --git a/versions/3.0.0/samples/bulk_read/createBulkReadJob.js b/versions/3.0.0/samples/bulk_read/createBulkReadJob.js new file mode 100644 index 0000000..6be2075 --- /dev/null +++ b/versions/3.0.0/samples/bulk_read/createBulkReadJob.js @@ -0,0 +1,145 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class CreateBulkReadJob{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Create BulkRead Job

+ * This method is used to create a bulk read job to export records. + * @param {String} moduleAPIName The API Name of the record's module + */ + static async createBulkReadJob(moduleAPIName) { + //example + //let moduleAPIName = "module_api_name"; + let bulkReadOperations = new ZOHOCRMSDK.BulkRead.BulkReadOperations(); + let requestWrapper = new ZOHOCRMSDK.BulkRead.RequestWrapper(); + //Specifies the API Name of the module to be read. + let module = new ZOHOCRMSDK.Modules.MinifiedModule(); + module.setAPIName(moduleAPIName); + let callBack = new ZOHOCRMSDK.BulkRead.CallBack(); + callBack.setUrl("https://www.example.com/callback"); + callBack.setMethod(new ZOHOCRMSDK.Choice("post")); + //The Bulk Read Job's details is posted to this URL on successful completion / failure of the job. + await requestWrapper.setCallback(callBack); + let query = new ZOHOCRMSDK.BulkRead.Query(); + // Specifies the the module to be read. + await query.setModule(module); + //Specifies the unique ID of the custom view, whose records you want to export. + // query.setCvid("0087501"); + //Array of field names + let fieldAPINames = []; + // fieldAPINames.push("Last_Name"); + //Specifies the API Name of the fields to be fetched. + // query.setFields(fieldAPINames); + query.setPage(1); + let criteria = new ZOHOCRMSDK.BulkRead.Criteria(); + criteria.setGroupOperator(new ZOHOCRMSDK.Choice("or")); + let criteriaArray = []; + let group11 = new ZOHOCRMSDK.BulkRead.Criteria(); + group11.setGroupOperator(new ZOHOCRMSDK.Choice("and")); + let groupArray11 = []; + let group111 = new ZOHOCRMSDK.BulkRead.Criteria(); + let field1 = new ZOHOCRMSDK.Fields.MinifiedField(); + field1.setAPIName("Company"); + await group111.setField(field1); + group111.setComparator(new ZOHOCRMSDK.Choice("equal")); + group111.setValue("Zoho"); + groupArray11.push(group111); + let group112 = new ZOHOCRMSDK.BulkRead.Criteria(); + let field2 = new ZOHOCRMSDK.Fields.MinifiedField(); + field2.setAPIName("Owner"); + await group112.setField(field2); + group112.setComparator(new ZOHOCRMSDK.Choice("in")); + group112.setValue(["34770610173021"]); + groupArray11.push(group112); + group11.setGroup(groupArray11); + criteriaArray.push(group11); + let group12 = new ZOHOCRMSDK.BulkRead.Criteria(); + group12.setGroupOperator(new ZOHOCRMSDK.Choice("or")); + let groupArray12 = []; + let group121 = new ZOHOCRMSDK.BulkRead.Criteria(); + let field3 = new ZOHOCRMSDK.Fields.MinifiedField(); + field3.setAPIName("Paid"); + await group121.setField(field3); + group121.setComparator(new ZOHOCRMSDK.Choice("equal")); + group121.setValue(true); + groupArray12.push(group121); + let group122 = new ZOHOCRMSDK.BulkRead.Criteria(); + let field4 = new ZOHOCRMSDK.Fields.MinifiedField(); + field4.setAPIName("Created_Time"); + await group122.setField(field4); + group122.setComparator(new ZOHOCRMSDK.Choice("between")); + let time = ["2020-06-03T17:31:48+05:30", "2020-06-03T17:31:48+05:30"]; + group122.setValue(time); + groupArray12.push(group122); + group12.setGroup(groupArray12); + criteriaArray.push(group12); + criteria.setGroup(criteriaArray); + //To filter the records to be exported. + await query.setCriteria(criteria); + await requestWrapper.setQuery(query); + //Specify the value for this key as "ics" to export all records in the Events module as an ICS file. + //requestWrapper.setFileType(new Choice("ics")); + //Call createBulkReadJob method that takes RequestWrapper instance as parameter + let response = await bulkReadOperations.createBulkReadJob(requestWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.BulkRead.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.BulkRead.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.BulkRead.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.BulkRead.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await CreateBulkReadJob.initialize(); +let moduleAPIName = "leads"; +await CreateBulkReadJob.createBulkReadJob(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/bulk_read/downloadResult.js b/versions/3.0.0/samples/bulk_read/downloadResult.js new file mode 100644 index 0000000..2002367 --- /dev/null +++ b/versions/3.0.0/samples/bulk_read/downloadResult.js @@ -0,0 +1,65 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +import path from "path"; +import fs from "fs"; +class DownloadResult{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Download Result

+ * This method is used to download the result of Bulk Read operation + * @param {BigInt} jobId The unique ID of the bulk read job. + * @param {String} destinationFolder The absolute path where downloaded file has to be stored. + */ + static async downloadResult(jobId, destinationFolder) { + //example + //String jobId = 2461001n; + //String destinationFolder = "/Users/user_name/Documents"; + let bulkReadOperations = new ZOHOCRMSDK.BulkRead.BulkReadOperations(); + //Call downloadResult method that takes jobId as parameter + let response = await bulkReadOperations.downloadResult(jobId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.BulkRead.FileBodyWrapper) { + let streamWrapper = responseObject.getFile(); + //Construct the file name by joining the destinationFolder and the name from StreamWrapper instance + let fileName = path.join(destinationFolder, streamWrapper.getName()); + let readStream = streamWrapper.getStream(); + //Write the stream to the destination file. + fs.writeFileSync(fileName, readStream); + } + else if (responseObject instanceof ZOHOCRMSDK.BulkRead.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await DownloadResult.initialize(); +let jobId = 100063n; +let destinationFolder = "users/documents/file"; +await DownloadResult.downloadResult(jobId,destinationFolder); \ No newline at end of file diff --git a/versions/3.0.0/samples/bulk_read/getBulkReadJobDetails.js b/versions/3.0.0/samples/bulk_read/getBulkReadJobDetails.js new file mode 100644 index 0000000..9e9097b --- /dev/null +++ b/versions/3.0.0/samples/bulk_read/getBulkReadJobDetails.js @@ -0,0 +1,118 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetBulkReadJobDetails{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get BulkRead Job Details

+ * This method is used to get the details of a bulk read job performed previously. + * @param {BigInt} jobId The unique ID of the bulk read job. + */ + static async getBulkReadJobDetails(jobId) { + //example + // let jobId = 2461001n; + let bulkReadOperations = new ZOHOCRMSDK.BulkRead.BulkReadOperations(); + //Call getBulkReadJobDetails method that takes jobId as parameter + let response = await bulkReadOperations.getBulkReadJobDetails(jobId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.BulkRead.ResponseWrapper) { + let jobDetails = responseObject.getData(); + jobDetails.forEach(jobDetail => { + console.log("Bulk read Job ID: " + jobDetail.getId()); + console.log("Bulk read Operation: " + jobDetail.getOperation()); + console.log("Bulk read State: " + jobDetail.getState().getValue()); + let result = jobDetail.getResult(); + if (result != null) { + console.log("Bulkread Result Page: " + result.getPage().toString()); + console.log("Bulkread Result Count: " + result.getCount().toString()); + console.log("Bulkread Result Download URL: " + result.getDownloadUrl()); + console.log("Bulkread Result Per_Page: " + result.getPerPage().toString()); + console.log("Bulkread Result MoreRecords: " + result.getMoreRecords().toString()); + } + let query = jobDetail.getQuery(); + if (query != null) { + let module = query.getModule(); + if (module != null) { + console.log("Bulkread Query Module Name : " + module.getAPIName()); + console.log("Bulkread Query Module Id : " + module.getId()); + } + console.log("Bulk read Query Module: " + query.getModule()); + console.log("Bulk read Query Page: " + query.getPage().toString()); + console.log("Bulk read Query cvid: " + query.getCvid()); + let fields = query.getFields(); + if (fields != null) { + fields.forEach(fieldName => { + console.log("Bulk read Query Fields: " + fieldName); + }); + } + let criteria = query.getCriteria(); + if (criteria != null) { + this.printCriteria(criteria); + } + } + let createdBy = jobDetail.getCreatedBy(); + if (createdBy != null) { + console.log("Bulkread Created By User-ID: " + createdBy.getId()); + console.log("Bulkread Created By user-Name: " + createdBy.getName()); + } + console.log("Bulkread CreatedTime: " + jobDetail.getCreatedTime()); + console.log("Bulkread File Type: " + jobDetail.getFileType()); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.BulkRead.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } + static async printCriteria(criteria) { + let field = criteria.getField(); + if (field != null) { + console.log("Bulkread Query Criteria Field Id: " + field.getId()); + console.log("Bulkread Query Criteria Field APIName: " + field.getAPIName()); + } + if (criteria.getComparator() != null) { + console.log("BulkRead Criteria Comparator: " + criteria.getComparator().getValue()); + } + if (criteria.getValue() != null) { + console.log("BulkRead Criteria Value: " + criteria.getValue().toString()); + } + let criteriaGroup = criteria.getGroup(); + if (criteriaGroup != null) { + criteriaGroup.forEach(eachCriteria => { + this.printCriteria(eachCriteria); + }); + } + if (criteria.getGroupOperator() != null) { + console.log("BulkRead Criteria Group Operator: " + criteria.getGroupOperator().getValue()); + } + } +} +await GetBulkReadJobDetails.initialize(); +let jobId = 100032n; +await GetBulkReadJobDetails.getBulkReadJobDetails(jobId); \ No newline at end of file diff --git a/versions/3.0.0/samples/bulk_write/createBulkWriteJob.js b/versions/3.0.0/samples/bulk_write/createBulkWriteJob.js new file mode 100644 index 0000000..8e26696 --- /dev/null +++ b/versions/3.0.0/samples/bulk_write/createBulkWriteJob.js @@ -0,0 +1,107 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class CreateBulkWriteJob{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Create BulkWrite Job

+ * This method is used to create bulk write job with the uploaded file ID + * @param {String} moduleAPIName The API Name of the module. + * @param {String} fileId The ID of the uploaded file to create BulkWrite Job. + */ + static async createBulkWriteJob(moduleAPIName, fileId) { + //example + //let moduleAPIName = "module_api_name"; + //let fileId = "6121001"; + let bulkWriteOperations = new ZOHOCRMSDK.BulkWrite.BulkWriteOperations(); + let requestWrapper = new ZOHOCRMSDK.BulkWrite.RequestWrapper(); + let callBack = new ZOHOCRMSDK.BulkWrite.CallBack(); + callBack.setUrl("https://www.example.com/callback"); + callBack.setMethod(new ZOHOCRMSDK.Choice("post")); + //The Bulk Write Job's details are posted to this URL on successful completion / failure of the job. + await requestWrapper.setCallback(callBack); + requestWrapper.setCharacterEncoding("UTF-8"); + requestWrapper.setOperation(new ZOHOCRMSDK.Choice("update")); + let resources = []; + let resource = new ZOHOCRMSDK.BulkWrite.Resource(); + resource.setType(new ZOHOCRMSDK.Choice("data")); + let module = new ZOHOCRMSDK.Modules.MinifiedModule(); + module.setAPIName(moduleAPIName); + await resource.setModule(module); + resource.setFileId(fileId); + //True - Ignores the empty values.The default value is false. + resource.setIgnoreEmpty(true); + resource.setFindBy("Email"); + let fieldMappings = []; + let fieldMapping = new ZOHOCRMSDK.BulkWrite.FieldMapping(); + fieldMapping.setAPIName("Last_Name"); + fieldMapping.setIndex(0); + fieldMappings.push(fieldMapping); + fieldMapping = new ZOHOCRMSDK.BulkWrite.FieldMapping(); + fieldMapping.setAPIName("Email"); + fieldMapping.setIndex(1); + fieldMappings.push(fieldMapping); + fieldMapping = new ZOHOCRMSDK.BulkWrite.FieldMapping(); + fieldMapping.setAPIName("Company"); + fieldMapping.setIndex(2); + fieldMappings.push(fieldMapping); + fieldMapping = new ZOHOCRMSDK.BulkWrite.FieldMapping(); + fieldMapping.setAPIName("Phone"); + fieldMapping.setIndex(3); + fieldMappings.push(fieldMapping); + let defaultValue = new Map(); + fieldMapping = new ZOHOCRMSDK.BulkWrite.FieldMapping(); + fieldMapping.setAPIName("Website"); + defaultValue.set("value", "https://www.zohoapis.com"); + await fieldMapping.setDefaultValue(defaultValue); + fieldMappings.push(fieldMapping); + resource.setFieldMappings(fieldMappings); + resources.push(resource); + requestWrapper.setResource(resources); + //Call createBulkWriteJob method that takes RequestWrapper instance as parameter + let response = await bulkWriteOperations.createBulkWriteJob(requestWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.BulkWrite.SuccessResponse) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + else if (responseObject instanceof ZOHOCRMSDK.BulkWrite.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await CreateBulkWriteJob.initialize(); +let moduleAPIName = "leads"; +let fileId = "120032"; +await CreateBulkWriteJob.createBulkWriteJob(moduleAPIName,fileId); diff --git a/versions/3.0.0/samples/bulk_write/downloadBulkWriteResult.js b/versions/3.0.0/samples/bulk_write/downloadBulkWriteResult.js new file mode 100644 index 0000000..918e2d7 --- /dev/null +++ b/versions/3.0.0/samples/bulk_write/downloadBulkWriteResult.js @@ -0,0 +1,65 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +import path from "path"; +import fs from "fs"; +class DownloadBulkWriteResult{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Download BulkWrite Result

+ * This method is used to download the result of bulk write job. + * @param {String} downloadUrl The URL present in the download_url key in the response of Get Bulk Write Job Details. + * @param {String} destinationFolder The absolute path where downloaded file has to be stored. + */ + static async downloadBulkWriteResult(downloadUrl, destinationFolder) { + //example + //let downloadUrl = "https://download-accl.zoho.com/v2/crm/6735/bulk-write/347706122009/347706122009.zip"; + //let destinationFolder = "/Users/user_name/Documents"; + let bulkWriteOperations = new ZOHOCRMSDK.BulkWrite.BulkWriteOperations(); + //Call downloadBulkWriteResult method that takes downloadUrl as parameter + let response = await bulkWriteOperations.downloadBulkWriteResult(downloadUrl); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.BulkWrite.FileBodyWrapper) { + let streamWrapper = responseObject.getFile(); + //Construct the file name by joining the destinationFolder and the name from StreamWrapper instance + let fileName = path.join(destinationFolder, streamWrapper.getName()); + let readStream = streamWrapper.getStream(); + //Write the stream to the destination file. + fs.writeFileSync(fileName, readStream); + } + else if (responseObject instanceof ZOHOCRMSDK.BulkWrite.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await DownloadBulkWriteResult.initialize(); +let downloadURL = "https://download-accl.zoho.com/v2/crm/6735/bulk-write/347706122009/347706122009.zip"; +let destinationFolder = "users/documents/file"; +await DownloadBulkWriteResult.downloadBulkWriteResult(downloadURL,destinationFolder); \ No newline at end of file diff --git a/versions/3.0.0/samples/bulk_write/getBulkWriteJobDetails.js b/versions/3.0.0/samples/bulk_write/getBulkWriteJobDetails.js new file mode 100644 index 0000000..718106f --- /dev/null +++ b/versions/3.0.0/samples/bulk_write/getBulkWriteJobDetails.js @@ -0,0 +1,121 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetBulkWriteJobDetails{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get BulkWriteJob Details

+ * This method is used to get the details of a bulk write job performed previously. + * @param {String} jobId The unique ID of the bulk write job. + */ + static async getBulkWriteJobDetails(jobId) { + //example + //let jobId = 5003n; + let bulkWriteOperations = new ZOHOCRMSDK.BulkWrite.BulkWriteOperations(); + //Call getBulkWriteJobDetails method that takes jobId as parameter + let response = await bulkWriteOperations.getBulkWriteJobDetails(jobId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.BulkWrite.BulkWriteResponse) { + console.log("Bulk write Job Status: " + responseObject.getStatus()); + console.log("Bulk write CharacterEncoding: " + responseObject.getCharacterEncoding()); + let resources = responseObject.getResource(); + if (resources != null) { + resources.forEach(resource => { + console.log("Bulk write Resource Status: " + resource.getStatus().getValue()); + console.log("Bulk write Resource Type: " + resource.getType().getValue()); + let module = resource.getModule(); + if (module != null) { + console.log("Bulkwrite Resource Module Name : " + module.getAPIName()); + console.log("Bulkwrite Resource Module Id : " + module.getId()); + } + let fieldMappings = resource.getFieldMappings(); + if (fieldMappings != null) { + fieldMappings.forEach(fieldMapping => { + console.log("Bulk write Resource FieldMapping Module: " + fieldMapping.getAPIName()); + if (fieldMapping.getIndex() != null) { + console.log("Bulk write Resource FieldMapping Inded: " + fieldMapping.getIndex().toString()); + } + if (fieldMapping.getFormat() != null) { + console.log("Bulk write Resource FieldMapping Format: " + fieldMapping.getFormat()); + } + if (fieldMapping.getFindBy() != null) { + console.log("Bulk write Resource FieldMapping FindBy: " + fieldMapping.getFindBy()); + } + if (fieldMapping.getModule() != null) { + console.log("Bulkwrite Resource FieldMapping Module: " + fieldMapping.getModule()); + } + if (fieldMapping.getDefaultValue() != null) { + Array.from(fieldMapping.getDefaultValue().keys()).forEach(key => { + console.log(key + ": " + fieldMapping.getDefaultValue().get(key)); + }); + } + }); + } + if (resource.getFindBy() != null) { + console.log("Bulkwrite Resource FindBy: " + resource.getFindBy()); + } + let file = resource.getFile(); + if (file != null) { + console.log("Bulk write Resource File Status: " + file.getStatus().getValue()); + console.log("Bulk write Resource File Name: " + file.getName()); + console.log("Bulk write Resource File AddedCount: " + file.getAddedCount().toString()); + console.log("Bulk write Resource File SkippedCount: " + file.getSkippedCount().toString()); + console.log("Bulk write Resource File UpdatedCount: " + file.getUpdatedCount().toString()); + console.log("Bulk write Resource File TotalCount: " + file.getTotalCount().toString()); + } + console.log("Bulkwrite Resource Code: " + resource.getCode()); + }); + } + let callback = responseObject.getCallback(); + if (callback != null) { + console.log("Bulk write CallBack Url: " + callback.getUrl()); + console.log("Bulk write CallBack Method: " + callback.getMethod().getValue()); + } + console.log("Bulk write ID: " + responseObject.getId().toString()); + let result = responseObject.getResult(); + if (result != null) { + console.log("Bulk write DownloadUrl: " + result.getDownloadUrl()); + } + let createdBy = responseObject.getCreatedBy(); + if (createdBy != null) { + console.log("Bulkwrite Created By User-ID: " + createdBy.getId()); + console.log("Bulkwrite Created By user-Name: " + createdBy.getName()); + } + console.log("Bulk write Operation: " + responseObject.getOperation()); + console.log("Bulk write File CreatedTime: " + responseObject.getCreatedTime().toString()); + } + else if (responseObject instanceof ZOHOCRMSDK.BulkWrite.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetBulkWriteJobDetails.initialize(); +let jobId = "232312"; +await GetBulkWriteJobDetails.getBulkWriteJobDetails(jobId); \ No newline at end of file diff --git a/versions/3.0.0/samples/bulk_write/uploadFile.js b/versions/3.0.0/samples/bulk_write/uploadFile.js new file mode 100644 index 0000000..b34d0fe --- /dev/null +++ b/versions/3.0.0/samples/bulk_write/uploadFile.js @@ -0,0 +1,102 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +import fs from "fs"; +class UploadFile{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Upload File

+ * This method is used to upload a CSV file in ZIP format for bulk write API. The response contains the file_id. + * Use this ID while making the bulk write request. + * @param {String} orgID The unique ID (zgid) of your organization obtained through the Organization API. + * @param {String} absoluteFilePath The absoluteFilePath of the zip file you want to upload. + */ + static async uploadFile(orgID, absoluteFilePath) { + //example + //let orgID = "6745"; + //let absoluteFilePath = "/Users/user_name/Documents/Leads.zip"; + let bulkWriteOperations = new ZOHOCRMSDK.BulkWrite.BulkWriteOperations(); + let fileBodyWrapper = new ZOHOCRMSDK.BulkWrite.FileBodyWrapper(); + /** StreamWrapper can be initialized in any of the following ways */ + /** + * param 1 -> fileName + * param 2 -> Read Stream. + */ + let streamWrapper = new ZOHOCRMSDK.StreamWrapper(null, fs.createReadStream(absoluteFilePath)); + /** + * param 1 -> fileName + * param 2 -> Read Stream + * param 3 -> Absolute File Path of the file to be attached + */ + // let streamWrapper = new StreamWrapper(null, null, absoluteFilePath); + fileBodyWrapper.setFile(streamWrapper); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + //To indicate that this a bulk write operation + await headerInstance.add(ZOHOCRMSDK.BulkWrite.UploadFileHeader.FEATURE, "bulk-write"); + await headerInstance.add(ZOHOCRMSDK.BulkWrite.UploadFileHeader.X_CRM_ORG, orgID); + //Call uploadFile method that takes FileBodyWrapper instance and headerInstance as parameter + let response = await bulkWriteOperations.uploadFile(fileBodyWrapper, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.BulkWrite.SuccessResponse) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + else if (responseObject instanceof ZOHOCRMSDK.BulkWrite.APIException) { + if (responseObject.getStatus() != null) { + console.log("Status: " + responseObject.getStatus().getValue()); + } + if (responseObject.getCode() != null) { + console.log("Code: " + responseObject.getCode().getValue()); + } + console.log("Details"); + if (responseObject.getDetails() != null) { + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + } + if (responseObject.getErrorMessage() != null) { + console.log("Error Message: " + responseObject.getErrorMessage().getValue()); + } + console.log("ErrorCode: " + responseObject.getErrorCode()); + if (responseObject.getXError() != null) { + console.log("XError: " + responseObject.getXError().getValue()); + } + if (responseObject.getInfo() != null) { + console.log("Info: " + responseObject.getInfo().getValue()); + } + if (responseObject.getXInfo() != null) { + console.log("XInfo: " + responseObject.getXInfo().getValue()); + } + console.log("HttpStatus: " + responseObject.getHttpStatus()); + } + } + } + } +} +await UploadFile.initialize(); +let orgID = "4402420813"; +let absoluteFilePath = "/users/Desktop/emptytest.zip"; +await UploadFile.uploadFile(orgID,absoluteFilePath); \ No newline at end of file diff --git a/versions/3.0.0/samples/businessHours/createBusinessHours.js b/versions/3.0.0/samples/businessHours/createBusinessHours.js new file mode 100644 index 0000000..f37168a --- /dev/null +++ b/versions/3.0.0/samples/businessHours/createBusinessHours.js @@ -0,0 +1,98 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class CreateBusinessHours +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createBusinessHours() + { + let businessHoursOperations = new ZOHOCRMSDK.BusinessHours.BusinessHoursOperations(''); + let request = new ZOHOCRMSDK.BusinessHours.BodyWrapper(); + let businessHours = new ZOHOCRMSDK.BusinessHours.BusinessHours(); + let businessDays = []; + businessDays.push(new ZOHOCRMSDK.Choice("Monday")); + businessHours.setBusinessDays(businessDays); + businessHours.setWeekStartsOn(new ZOHOCRMSDK.Choice("Monday")); + let bhct = new ZOHOCRMSDK.BusinessHours.BreakHoursCustomTiming(); + bhct.setDays(new ZOHOCRMSDK.Choice("Monday")); + let businessTiming = []; + businessTiming.push("10:00"); + businessTiming.push("11:00"); + bhct.setBusinessTiming(businessTiming); + let customTiming = []; + customTiming.push(bhct); + businessHours.setCustomTiming(customTiming); + businessHours.setSameAsEveryday(false); + // when sameAsEveryDay is true + let dailyTiming = []; + dailyTiming.push("10:00"); + dailyTiming.push("11:00"); + // + businessHours.setType(new ZOHOCRMSDK.Choice("custom")); + await request.setBusinessHours(businessHours); + let response = businessHoursOperations.createBusinessHours(request); + if (response != null) + { + console.log("Status code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.BusinessHours.ActionWrapper) + { + let actionWrapper = actionHandler; + let actionResponse = actionWrapper.getBusinessHours(); + if (actionResponse instanceof ZOHOCRMSDK.BusinessHours.BusinessHoursCreated) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.BusinessHours.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.BusinessHours.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await CreateBusinessHours.initialize(); +await CreateBusinessHours.createBusinessHours(); \ No newline at end of file diff --git a/versions/3.0.0/samples/businessHours/getBusinessHours.js b/versions/3.0.0/samples/businessHours/getBusinessHours.js new file mode 100644 index 0000000..edcd1c2 --- /dev/null +++ b/versions/3.0.0/samples/businessHours/getBusinessHours.js @@ -0,0 +1,99 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetBusinessHours +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getBusinessHours() + { + let businessHoursOperations = new ZOHOCRMSDK.BusinessHours.BusinessHoursOperations("440248813"); + let response = await businessHoursOperations.getBusinessHours(); + if (response != null) + { + console.log('Status Code: ' + response.getStatusCode()); + if (response.getStatusCode() == 204 || response.getStatusCode() == 304) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject instanceof ZOHOCRMSDK.BusinessHours.ResponseWrapper) + { + let responseWrapper = responseObject; + let businessHours = responseWrapper.getBusinessHours(); + let businessDays = businessHours.getBusinessDays(); + if (businessDays != null) + { + console.log("BusinessDays : " ); + businessDays.forEach(businessDay => { + console.log(businessDay.getValue()); + }); + } + else + { + console.log("BusinmessDays : null"); + } + let customToiming = businessHours.getCustomTiming(); + if (customToiming != null) + { + console.log("CustomTiming : "); + customToiming.forEach(bhct => + { + console.log("days: " + bhct.getDays().getValue()); + let businessTimings= bhct.getBusinessTiming(); + businessTimings.forEach(businessTiming => + { + console.log("Businesstiming : " + businessTiming ); + }); + }); + } + else + { + console.log("Custom_Timing : null " ); + } + let dailyTimings = businessHours.getDailyTiming(); + if (dailyTimings != null) + { + console.log("dailyTimings : " ); + dailyTimings.forEach(dailyTiming => { + console.log(dailyTiming ); + }); + } + else + { + console.log("dailyTiming : null" ); + } + console.log("Week_starts_on: " + businessHours.getWeekStartsOn().getValue() ); + console.log("same_as_every_day : " + businessHours.getSameAsEveryday() ); + console.log("businessHours_Id: " + businessHours.getId() ); + console.log("businessHours_type: " + businessHours.getType().getValue()); + } + else if (responseObject instanceof ZOHOCRMSDK.BusinessHours.APIException) + { + let exception = responseObject; + console.log("Status: " + exception.getStatus().getValue() ); + console.log("Code: " + exception.getCode().getValue() ); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) ); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await GetBusinessHours.initialize(); +await GetBusinessHours.getBusinessHours(); \ No newline at end of file diff --git a/versions/3.0.0/samples/businessHours/updateBusinessHours.js b/versions/3.0.0/samples/businessHours/updateBusinessHours.js new file mode 100644 index 0000000..28d1476 --- /dev/null +++ b/versions/3.0.0/samples/businessHours/updateBusinessHours.js @@ -0,0 +1,118 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateBusinessHours +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateBusinessHours() + { + let businessHoursOperations = new ZOHOCRMSDK.BusinessHours.BusinessHoursOperations('440248020813'); + let request = new ZOHOCRMSDK.BusinessHours.BodyWrapper(); + let businessHours = new ZOHOCRMSDK.BusinessHours.BusinessHours(); + businessHours.setId(440241017425n); + businessHours.setSameAsEveryday(false); + let businessDays = []; + businessDays.push(new ZOHOCRMSDK.Choice("Monday")); + businessDays.push(new ZOHOCRMSDK.Choice("Tuesday")); + businessDays.push(new ZOHOCRMSDK.Choice("Wednesday")); + // businessDays.push(new ZOHOCRMSDK.Choice("Thursday")); + // businessDays.push(new ZOHOCRMSDK.Choice("Friday")); + businessHours.setBusinessDays(businessDays); + businessHours.setWeekStartsOn(new ZOHOCRMSDK.Choice("Monday")); + let bhct = new ZOHOCRMSDK.BusinessHours.BreakHoursCustomTiming(); + bhct.setDays(new ZOHOCRMSDK.Choice("Monday")); + let businessTiming = []; + businessTiming.push("09:00"); + businessTiming.push("17:00"); + bhct.setBusinessTiming(businessTiming); + let bhct1= new ZOHOCRMSDK.BusinessHours.BreakHoursCustomTiming(); + bhct1.setDays(new ZOHOCRMSDK.Choice("Tuesday")); + let businessTiming1 = []; + businessTiming1.push("09:00"); + businessTiming1.push("17:00"); + bhct1.setBusinessTiming(businessTiming1); + let bhct2 = new ZOHOCRMSDK.BusinessHours.BreakHoursCustomTiming(); + bhct2.setDays(new ZOHOCRMSDK.Choice("Wednesday")); + let businessTiming2 = []; + businessTiming2.push("09:00"); + businessTiming2.push("17:00"); + bhct2.setBusinessTiming(businessTiming2); + let customTiming = []; + customTiming.push(bhct); + customTiming.push(bhct1); + customTiming.push(bhct2); + businessHours.setCustomTiming(customTiming); + // when sameAsEveryDay is true + // let dailyTiming = []; + // dailyTiming.push("10:00"); + // dailyTiming.push("19:00"); + // businessHours.setDailyTiming(dailyTiming); + // + businessHours.setType(new ZOHOCRMSDK.Choice("custom")); + await request.setBusinessHours(businessHours); + let response = await businessHoursOperations.updateBusinessHours(request); + if (response != null) + { + console.log("Status code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.BusinessHours.ActionWrapper) + { + let actionWrapper = actionHandler; + let actionResponse = actionWrapper.getBusinessHours(); + if (actionResponse instanceof ZOHOCRMSDK.BusinessHours.BusinessHoursCreated) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.BusinessHours.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.BusinessHours.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await UpdateBusinessHours.initialize(); +await UpdateBusinessHours.updateBusinessHours(); \ No newline at end of file diff --git a/versions/3.0.0/samples/cancel_meetings/CancelMeetings.js b/versions/3.0.0/samples/cancel_meetings/CancelMeetings.js new file mode 100644 index 0000000..8dc173d --- /dev/null +++ b/versions/3.0.0/samples/cancel_meetings/CancelMeetings.js @@ -0,0 +1,76 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class CancelMeetings { + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async cancelmeetings(event_id){ + + let cmo = new ZOHOCRMSDK.CancelMeetings.CancelMeetingsOperations(event_id); + let bodyWrapper = new ZOHOCRMSDK.CancelMeetings.BodyWrapper(); + let notify = new ZOHOCRMSDK.CancelMeetings.Notify(); + notify.setSendCancellingMail(false); + let notify_list = []; + notify_list.push(notify); + bodyWrapper.setData(notify_list); + let response = await cmo.cancelMeetings(bodyWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.CancelMeetings.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.CancelMeetings.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.CancelMeetings.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.CancelMeetings.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await CancelMeetings.initialize(); +let event_id =44024800977005n; +await CancelMeetings.cancelmeetings(event_id); \ No newline at end of file diff --git a/versions/3.0.0/samples/change_owner/updateRecordOwner.js b/versions/3.0.0/samples/change_owner/updateRecordOwner.js new file mode 100644 index 0000000..4223856 --- /dev/null +++ b/versions/3.0.0/samples/change_owner/updateRecordOwner.js @@ -0,0 +1,94 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateRecordOwner +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateRecordOwner(moduleAPIName,recordId) + { + let changeOwnerOperations = new ZOHOCRMSDK.ChangeOwner.ChangeOwnerOperations(moduleAPIName); + let bodyWrapper = new ZOHOCRMSDK.ChangeOwner.BodyWrapper(); + let owner = new ZOHOCRMSDK.ChangeOwner.Owner(); + owner.setId(4402480254001n); + await bodyWrapper.setOwner(owner); + bodyWrapper.setNotify(true); + let relatedModules = []; + let relatedModule = new ZOHOCRMSDK.ChangeOwner.RelatedModules(); + relatedModule.setId(4402480365145n); + relatedModule.setAPIName("Tasks"); + relatedModules.push(relatedModule); + // relatedModule = new ZOHOCRMSDK.ChangeOwner.RelatedModules(); + // relatedModule.setId(347706114686005n); + // relatedModule.setAPIName("Tasks"); + relatedModules.push(relatedModule); + bodyWrapper.setRelatedModules(relatedModules); + let response = await changeOwnerOperations.singleUpdate(recordId, bodyWrapper); + if (response != null) + { + // Get the status code from response + console.log("Status Code: " + response.getStatusCode() + "\n"); + let responseObject = response.getObject(); + if(responseObject != null) + { + if(responseObject instanceof ZOHOCRMSDK.ChangeOwner.ActionWrapper) + { + let changeowners = responseObject.getData(); + changeowners.forEach(changeowner => { + if(changeowner instanceof ZOHOCRMSDK.ChangeOwner.SuccessResponse) + { + console.log("Status:" + changeowner.getStatus().getValue() + "\n"); + console.log("Code : "+ changeowner.getCode().getValue() + "\n"); + console.log("Details: " + "\n"); + let details = changeowner.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + changeowner.getMessage() + "\n"); + } + else if( changeowner instanceof ZOHOCRMSDK.ChangeOwner.APIException) + { + console.log("Status: " + changeowner.getStatus().getValue() + "\n"); + console.log("Code: " + changeowner.getCode().getValue() + "\n"); + let details = changeowner.getDetails(); + console.log("Details: " + "\n"); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + changeowner.getMessage() +"\n"); + } + }); + } + else if(responseObject instanceof ZOHOCRMSDK.ChangeOwner.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue() + "\n"); + console.log("Code: " + responseObject.getCode().getValue() + "\n"); + let details = responseObject.getDetails(); + console.log("Details: " + "\n"); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + responseObject.getMessage() + "\n"); + } + } + } + } +} +let recordId = 4402480077154n; +let moduleAPIName = "Leads"; +await UpdateRecordOwner.initialize(); +await UpdateRecordOwner.updateRecordOwner(moduleAPIName, recordId); \ No newline at end of file diff --git a/versions/3.0.0/samples/change_owner/updateRecordsOwner.js b/versions/3.0.0/samples/change_owner/updateRecordsOwner.js new file mode 100644 index 0000000..2399a85 --- /dev/null +++ b/versions/3.0.0/samples/change_owner/updateRecordsOwner.js @@ -0,0 +1,133 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateRecordsOwner +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateRecordsOwner(moduleAPIName) { + let changeOwnerOperations = new ZOHOCRMSDK.ChangeOwner.ChangeOwnerOperations(moduleAPIName); + + let massWrapper = new ZOHOCRMSDK.ChangeOwner.MassWrapper(); + + let Ids = []; + + Ids.push("44024001177154"); + + Ids.push("440248004002"); + + massWrapper.setIds(Ids); + + let owner = new ZOHOCRMSDK.ChangeOwner.Owner(); + + owner.setId(440248054001n); + + await massWrapper.setOwner(owner); + + massWrapper.setNotify(false); + + let relatedModules = []; + + let relatedModule = new ZOHOCRMSDK.ChangeOwner.RelatedModules(); + + relatedModule.setId(347706114686005n); + + relatedModule.setAPIName("Tasks"); + + relatedModules.add(relatedModule); + + relatedModule = new ZOHOCRMSDK.ChangeOwner.RelatedModules(); + + relatedModule.setId(347706114686005n); + + relatedModule.setAPIName("Tasks"); + + relatedModules.add(relatedModule); + + massWrapper.setRelatedModules(relatedModules); + + let response = await changeOwnerOperations.massUpdate(massWrapper); + + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + + let responseObject = response.getObject(); + + if (responseObject != null) { + + if (responseObject instanceof ZOHOCRMSDK.ChangeOwner.ActionWrapper) { + let changeowners = responseObject.getData(); + + changeowners.forEach(changeowner => { + + if (changeowner instanceof ZOHOCRMSDK.ChangeOwner.SuccessResponse) { + console.log("Status:" + changeowner.getStatus().getValue()); + + console.log("Code : " + changeowner.getCode().getValue()); + + console.log("Details: "); + + let details = changeowner.getDetails(); + + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + changeowner.getMessage()); + } else if (changeowner instanceof ZOHOCRMSDK.ChangeOwner.APIException) { + console.log("Status: " + changeowner.getStatus().getValue()); + + // Get the Code + console.log("Code: " + changeowner.getCode().getValue()); + + let details = changeowner.getDetails(); + + console.log("Details: "); + + // Get the details map + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + + // Get the Message + console.log("Message: " + changeowner.getMessage()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.ChangeOwner.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + + // Get the Code + console.log("Code: " + responseObject.getCode().getValue()); + + let details = responseObject.getDetails(); + + console.log("Details: "); + + // Get the details map + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + + // Get the Message + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +let moduleAPIName = "Leads"; +await UpdateRecordsOwner.initialize(); +await UpdateRecordsOwner.updateRecordsOwner(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/contact_roles/createContactRoles.js b/versions/3.0.0/samples/contact_roles/createContactRoles.js new file mode 100644 index 0000000..3f1e514 --- /dev/null +++ b/versions/3.0.0/samples/contact_roles/createContactRoles.js @@ -0,0 +1,84 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class CreateContactRoles{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Create Contact Roles

+ * This method is used to create Contact Roles and print the response. + */ + static async createContactRoles() { + let contactRolesOperations = new ZOHOCRMSDK.ContactRoles.ContactRolesOperations(); + let request = new ZOHOCRMSDK.ContactRoles.BodyWrapper(); + //Array to hold ContactRole instances + let contactRolesArray = []; + for (let index = 1; index < 2; index++) { + let contactRole = new ZOHOCRMSDK.ContactRoles.ContactRole(); + contactRole.setName("contactRole-NodeJS" + index.toString()); + contactRole.setSequenceNumber(index); + //Add ContactRole instance to the array + contactRolesArray.push(contactRole); + } + request.setContactRoles(contactRolesArray); + //Call createContactRoles method that takes BodyWrapper instance as parameter + let response = await contactRolesOperations.createRoles(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.ContactRoles.ActionWrapper) { + let actionResponses = responseObject.getContactRoles(); + actionResponses.forEach((actionResponse) => { + if (actionResponse instanceof ZOHOCRMSDK.ContactRoles.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach((key) => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.ContactRoles.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach((key) => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.ContactRoles.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach((key) => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await CreateContactRoles.initialize(); +await CreateContactRoles.createContactRoles(); \ No newline at end of file diff --git a/versions/3.0.0/samples/contact_roles/deleteContactRole.js b/versions/3.0.0/samples/contact_roles/deleteContactRole.js new file mode 100644 index 0000000..4d50fe2 --- /dev/null +++ b/versions/3.0.0/samples/contact_roles/deleteContactRole.js @@ -0,0 +1,79 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteContactRole{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Delete Contact Role

+ * This method is used to delete single Contact Role with ID and print the response. + * @param {BigInt} contactRoleId ID of the ContactRole to be deleted + */ + static async deleteContactRole(contactRoleId) { + //example + //let contactRoleId = 2212003n; + let contactRolesOperations = new ZOHOCRMSDK.ContactRoles.ContactRolesOperations(); + //Call deleteContactRole which takes contactRoleId as parameter + let response = await contactRolesOperations.deleteRole( + contactRoleId + ); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.ContactRoles.ActionWrapper) { + let actionResponses = responseObject.getContactRoles(); + actionResponses.forEach((actionResponse) => { + if (actionResponse instanceof ZOHOCRMSDK.ContactRoles.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach((key) => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.ContactRoles.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach((key) => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.ContactRoles.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach((key) => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await DeleteContactRole.initialize(); +let contactRoleId = 2212003n; +await DeleteContactRole.deleteContactRole(contactRoleId); \ No newline at end of file diff --git a/versions/3.0.0/samples/contact_roles/deleteContactRoles.js b/versions/3.0.0/samples/contact_roles/deleteContactRoles.js new file mode 100644 index 0000000..219db15 --- /dev/null +++ b/versions/3.0.0/samples/contact_roles/deleteContactRoles.js @@ -0,0 +1,84 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteContactRoles{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Delete Contact Roles

+ * This method is used to delete Contact Roles and print the response. + * @param {Array} contactRoleIds The array of ContactRole IDs to be deleted. + */ + static async deleteContactRoles(contactRoleIds) { + //example + //let contactRoleIds = ["2157002", "1619001", "6883"]; + let contactRolesOperations = new ZOHOCRMSDK.ContactRoles.ContactRolesOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + //Add ids to ParameterMap instance + for (let contactRoleId of contactRoleIds) { + await paramInstance.add(ZOHOCRMSDK.ContactRoles.DeleteRolesParam.IDS, contactRoleId); + } + //Call deleteContactRoles method that takes paramInstance as parameter + let response = await contactRolesOperations.deleteRoles( + paramInstance + ); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.ContactRoles.ActionWrapper) { + let actionResponses = responseObject.getContactRoles(); + actionResponses.forEach((actionResponse) => { + if (actionResponse instanceof ZOHOCRMSDK.ContactRoles.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach((key) => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.ContactRoles.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach((key) => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.ContactRoles.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach((key) => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await DeleteContactRoles.initialize(); +let contactRoleIds = ["440248020557", "4402480020548"]; +await DeleteContactRoles.deleteContactRoles(contactRoleIds); \ No newline at end of file diff --git a/versions/3.0.0/samples/contact_roles/getContactRole.js b/versions/3.0.0/samples/contact_roles/getContactRole.js new file mode 100644 index 0000000..2f9c6cc --- /dev/null +++ b/versions/3.0.0/samples/contact_roles/getContactRole.js @@ -0,0 +1,64 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetContactRole{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Contact Role

+ * This method is used to get single Contact Role with ID and print the response. + * @param {BigInt} contactRoleId The ID of the ContactRole to be obtained + */ + static async getContactRole(contactRoleId) { + //example + //let contactRoleId = 2212003n; + let contactRolesOperations = new ZOHOCRMSDK.ContactRoles.ContactRolesOperations(); + //Call getContactRole method that takes contactRoleId as parameter + let response = await contactRolesOperations.getRole(contactRoleId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log( + response.getStatusCode() == 204 ? "No Content" : "Not Modified" + ); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.ContactRoles.BodyWrapper) { + let contactRoles = responseObject.getContactRoles(); + contactRoles.forEach((contactRole) => { + console.log("ContactRole ID: " + contactRole.getId()); + console.log("ContactRole Name: " + contactRole.getName()); + console.log( + "ContactRole SequenceNumber: " + contactRole.getSequenceNumber() + ); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.ContactRoles.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach((key) => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetContactRole.initialize(); +let contactRoleId = 440241368011n; +await GetContactRole.getContactRole(contactRoleId); \ No newline at end of file diff --git a/versions/3.0.0/samples/contact_roles/getContactRoles.js b/versions/3.0.0/samples/contact_roles/getContactRoles.js new file mode 100644 index 0000000..a002dee --- /dev/null +++ b/versions/3.0.0/samples/contact_roles/getContactRoles.js @@ -0,0 +1,62 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetContactRoles{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Contact Roles

+ * This method is used to get all the Contact Roles and print the response. + */ + static async getContactRoles() { + let contactRolesOperations = new ZOHOCRMSDK.ContactRoles.ContactRolesOperations(); + //Call getContactRoles method + let response = await contactRolesOperations.getRoles(); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log( + response.getStatusCode() === 204 ? "No Content" : "Not Modified" + ); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.ContactRoles.BodyWrapper) { + let contactRoles = responseObject.getContactRoles(); + contactRoles.forEach((contactRole) => { + console.log("ContactRole ID: " + contactRole.getId()); + console.log("ContactRole Name: " + contactRole.getName()); + console.log( + "ContactRole SequenceNumber: " + contactRole.getSequenceNumber() + ); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.ContactRoles.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach((key) => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetContactRoles.initialize(); +await GetContactRoles.getContactRoles(); \ No newline at end of file diff --git a/versions/3.0.0/samples/contact_roles/updateContactRole.js b/versions/3.0.0/samples/contact_roles/updateContactRole.js new file mode 100644 index 0000000..8637c04 --- /dev/null +++ b/versions/3.0.0/samples/contact_roles/updateContactRole.js @@ -0,0 +1,88 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateContactRole{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Contact Role

+ * This method is used to update single Contact Role with ID and print the response. + * @param {BigInt} contactRoleId The ID of the ContactRole to be updated + */ + static async updateContactRole(contactRoleId) { + //example + //let contactRoleId = 2212003n; + let contactRolesOperations = new ZOHOCRMSDK.ContactRoles.ContactRolesOperations(); + let request = new ZOHOCRMSDK.ContactRoles.BodyWrapper(); + //Array to hold ContactRole instances + let contactRolesArray = []; + let cr1 = new ZOHOCRMSDK.ContactRoles.ContactRole(); + cr1.setSequenceNumber(1); + //Add ContactRole instance to the array + contactRolesArray.push(cr1); + request.setContactRoles(contactRolesArray); + //Call updateContactRole method that takes BodyWrapper instance and contactRoleId as parameters + let response = await contactRolesOperations.updateRole( + contactRoleId, + request + ); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.ContactRoles.ActionWrapper) { + let actionResponses = responseObject.getContactRoles(); + actionResponses.forEach((actionResponse) => { + if (actionResponse instanceof ZOHOCRMSDK.ContactRoles.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach((key) => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.ContactRoles.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach((key) => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.ContactRoles.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach((key) => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateContactRole.initialize(); +let contactRoleId = 2212003n; +await UpdateContactRole.updateContactRole(contactRoleId); diff --git a/versions/3.0.0/samples/contact_roles/updateContactRoles.js b/versions/3.0.0/samples/contact_roles/updateContactRoles.js new file mode 100644 index 0000000..73a6236 --- /dev/null +++ b/versions/3.0.0/samples/contact_roles/updateContactRoles.js @@ -0,0 +1,87 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateContactRoles{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Contact Roles

+ * This method is used to update Contact Roles and print the response. + */ + static async updateContactRoles() { + let contactRolesOperations = new ZOHOCRMSDK.ContactRoles.ContactRolesOperations(); + let request = new ZOHOCRMSDK.ContactRoles.BodyWrapper(); + //Array to hold ContactRole instances + let contactRolesArray = []; + let cr1 = new ZOHOCRMSDK.ContactRoles.ContactRole(); + cr1.setId(44024800011n); + cr1.setName("Edited123"); + // Add ContactRole instance to the array + contactRolesArray.push(cr1); + cr1 = new ZOHOCRMSDK.ContactRoles.ContactRole(); + cr1.setId(347706112517019n); + cr1.setName("Edited2"); + // Add ContactRole instance to the array + contactRolesArray.push(cr1); + request.setContactRoles(contactRolesArray); + //Call updateContactRoles method that takes BodyWrapper instance as parameter + let response = await contactRolesOperations.updateRoles(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.ContactRoles.ActionWrapper) { + let actionResponses = responseObject.getContactRoles(); + actionResponses.forEach((actionResponse) => { + if (actionResponse instanceof ZOHOCRMSDK.ContactRoles.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach((key) => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.ContactRoles.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach((key) => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.ContactRoles.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach((key) => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await UpdateContactRoles.initialize(); +await UpdateContactRoles.updateContactRoles(); \ No newline at end of file diff --git a/versions/3.0.0/samples/createRecords/createAccounts.js b/versions/3.0.0/samples/createRecords/createAccounts.js new file mode 100644 index 0000000..6c12257 --- /dev/null +++ b/versions/3.0.0/samples/createRecords/createAccounts.js @@ -0,0 +1,180 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateAccounts +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createAccounts(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.ACCOUNT_NAME, 'New Account'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.PHONE, '12121212'); + record1.addKeyValue("Email", 'abc@gmail.com'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.FAX, 'Fax'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.ACCOUNT_SITE, 'www.domain.com'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.WEBSITE, 'website.com'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.ACCOUNT_NUMBER, 100001n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.EMPLOYEES, 10); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.SIC_CODE, 1213); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.ANNUAL_REVENUE, 1212.1); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.OWNERSHIP, new ZOHOCRMSDK.Choice("Private")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.ACCOUNT_TYPE, new ZOHOCRMSDK.Choice("Customer")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.INDUSTRY, new ZOHOCRMSDK.Choice("Real Estate")); + let parent_account = new ZOHOCRMSDK.Record.Record(); + parent_account.setId(4402480001389082n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.PARENT_ACCOUNT, parent_account); + // Address Info + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.BILLING_CITY, 'billing_city'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.BILLING_STREET, 'billing_street'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.BILLING_CODE, 'billing_code'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.BILLING_COUNTRY, 'billing_Country'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.BILLING_STATE, 'billing_state'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.SHIPPING_CITY, 'Shipping_city'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.SHIPPING_STREET, 'Shipping_street'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.SHIPPING_CODE, 'Shipping_code'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.SHIPPING_COUNTRY, 'Shipping_Country'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.SHIPPING_STATE, 'shipping_state'); + // + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.DESCRIPTION, 'description'); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Accounts"; +await CreateAccounts.initialize(); +await CreateAccounts.createAccounts(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/createRecords/createCalls.js b/versions/3.0.0/samples/createRecords/createCalls.js new file mode 100644 index 0000000..aec5585 --- /dev/null +++ b/versions/3.0.0/samples/createRecords/createCalls.js @@ -0,0 +1,189 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateCalls +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createCalls(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + + // Schedule a call + let whoId = new ZOHOCRMSDK.Record.Record(); + whoId.setId(440248001030088n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.WHO_ID, whoId); + let whatId = new ZOHOCRMSDK.Record.Record(); + whatId.setId(44024801389082n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.WHAT_ID, whatId); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_TYPE, new ZOHOCRMSDK.Choice("Outbound")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.OUTGOING_CALL_STATUS, new ZOHOCRMSDK.Choice("Scheduled")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_START_TIME, new Date(2023,8,2,11,3,6)); + let user = new ZOHOCRMSDK.Users.Users(); + user.setId(44024800254001n); + record1.addKeyValue("Call_Owner", user); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.SUBJECT, 'call Scheduled'); + // await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.REMINDER, new ZOHOCRMSDK.Choice("5 mins")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_PURPOSE, new ZOHOCRMSDK.Choice("Demo")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_AGENDA, 'agenda to make a call'); + record1.addKeyValue('$se_module', "Accounts"); + + // log a call + let whoId1 = new ZOHOCRMSDK.Record.Record(); + whoId1.setId(4402480030088n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.WHO_ID, whoId1); + let whatId1 = new ZOHOCRMSDK.Record.Record(); + whatId1.setId(44024801389082n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.WHAT_ID, whatId1); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_TYPE, new ZOHOCRMSDK.Choice("Outbound")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.SUBJECT, "Call"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_DURATION, "10:00"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.OUTGOING_CALL_STATUS, new ZOHOCRMSDK.Choice("Completed")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_START_TIME, new Date(2023,2,12, 11, 3, 6)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_PURPOSE, new ZOHOCRMSDK.Choice("Demo")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_AGENDA, "agenda to make call"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_RESULT, new ZOHOCRMSDK.Choice("Not interested")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.DESCRIPTION, 'description'); + record1.addKeyValue('$se_module', "Accounts"); + // + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user2 = new ZOHOCRMSDK.Users.MinifiedUser(); + user2.setId(4323001232n); + record1.addKeyValue("User_1", user2); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response =await recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Calls"; +await CreateCalls.initialize(); +await CreateCalls.createCalls(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/createRecords/createCampaigns.js b/versions/3.0.0/samples/createRecords/createCampaigns.js new file mode 100644 index 0000000..e1532c4 --- /dev/null +++ b/versions/3.0.0/samples/createRecords/createCampaigns.js @@ -0,0 +1,162 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateCampaigns +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createCampaigns(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.CAMPAIGN_NAME, "New Campaign"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.NUM_SENT, 10n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.START_DATE, new Date(2023, 8,12)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.END_DATE, new Date(2023, 8, 29)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.ACTUAL_COST, 100.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.EXPECTED_REVENUE, 120.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.TYPE, new ZOHOCRMSDK.Choice("Webinar")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.BUDGETED_COST, 110.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.EXPECTED_RESPONSE, 100n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.DESCRIPTION, "description"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.STATUS, new ZOHOCRMSDK.Choice("Active")); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Campaigns"; +await CreateCampaigns.initialize(); +await CreateCampaigns.createCampaigns(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/createRecords/createCases.js b/versions/3.0.0/samples/createRecords/createCases.js new file mode 100644 index 0000000..553a983 --- /dev/null +++ b/versions/3.0.0/samples/createRecords/createCases.js @@ -0,0 +1,175 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateCases +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createCases(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.SUBJECT, "New Case"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.TYPE, new ZOHOCRMSDK.Choice("Question")); + let productName = new ZOHOCRMSDK.Record.Record(); + productName.setId(403334342442n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.PRODUCT_NAME, productName); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.CASE_ORIGIN, new ZOHOCRMSDK.Choice("Email")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.STATUS, new ZOHOCRMSDK.Choice("On Hold")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.REPORTED_BY, "none"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.PHONE, "3200132001"); + let contactName = new ZOHOCRMSDK.Record.Record(); + contactName.setId(400234244232n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.RELATED_TO, contactName); + let accountName = new ZOHOCRMSDK.Record.Record(); + accountName.setId(4330242352342342n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.ACCOUNT_NAME, accountName); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.EMAIL, "abc@gmail.com"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.PRIORITY, new ZOHOCRMSDK.Choice("Low")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.CASE_REASON, new ZOHOCRMSDK.Choice("New problem")); + let dealName = new ZOHOCRMSDK.Record.Record(); + dealName.addKeyValue("id", 42334423425234n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.DEAL_NAME, dealName); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.DESCRIPTION, "description"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.INTERNAL_COMMENTS, "Comments"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.SOLUTION, "solution for problem"); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Cases"; +await CreateCases.initialize(); +await CreateCases.createCases(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/createRecords/createContacts.js b/versions/3.0.0/samples/createRecords/createContacts.js new file mode 100644 index 0000000..355db4a --- /dev/null +++ b/versions/3.0.0/samples/createRecords/createContacts.js @@ -0,0 +1,190 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateContacts +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createContacts(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.LAST_NAME, 'lastname'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.FIRST_NAME, 'firstname'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.EMAIL, 'abc@gmail.com'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.TITLE, 'title'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.PHONE, '1001001'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.DEPARTMENT, 'Department name'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.OTHER_PHONE, '20010021'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.HOME_PHONE, '300022222'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.MOBILE, '109109'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.FAX, 'fax'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.ASSISTANT, 'Assistant'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.DATE_OF_BIRTH, new Date(1999, 10,23)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.ASST_PHONE, ''); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.EMAIL_OPT_OUT, true); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.SKYPE_ID, 'sky_123'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.SECONDARY_EMAIL, 'abc1@gmail.com'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.TWITTER, 'twitter_55'); + let accountName = new ZOHOCRMSDK.Record.Record(); + accountName.setId(440248390054n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.ACCOUNT_NAME, accountName); + let vendorName = new ZOHOCRMSDK.Record.Record(); + vendorName.setId(4402480330038n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.VENDOR_NAME, vendorName); + let reportingTo = new ZOHOCRMSDK.Record.Record(); + reportingTo.setId(430900423424n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.REPORTING_TO, reportingTo); + // Address Info + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.MAILING_CITY, 'mailing_city'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.MAILING_COUNTRY, 'Mailing Country'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.MAILING_STATE, 'Mailing State'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.MAILING_STREET, 'Mailing Street'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.MAILING_ZIP, 'Mailing Zip'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.OTHER_CITY, 'Other city'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.OTHER_COUNTRY, 'other country'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.OTHER_STATE, 'other state'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.OTHER_STREET, 'other street'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.OTHER_ZIP, 'other zip'); + // + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.DESCRIPTION, 'description'); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Contacts"; +await CreateContacts.initialize(); +await CreateContacts.createContacts(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/createRecords/createDeals.js b/versions/3.0.0/samples/createRecords/createDeals.js new file mode 100644 index 0000000..5f88f2f --- /dev/null +++ b/versions/3.0.0/samples/createRecords/createDeals.js @@ -0,0 +1,170 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateDeals +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createDeals(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.DEAL_NAME, 'New Deal'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.AMOUNT, 100.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.CLOSING_DATE, new Date(2023, 8, 8)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.STAGE, new ZOHOCRMSDK.Choice("Qualification")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.TYPE, new ZOHOCRMSDK.Choice("New Business")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.PROBABILITY, 10); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.NEXT_STEP, 'Next Step'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.EXPECTED_REVENUE, 120.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.LEAD_SOURCE, new ZOHOCRMSDK.Choice("Cold Call")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.DESCRIPTION, 'description'); + let accountName = new ZOHOCRMSDK.Record.Record(); + accountName.setId(4402480001390054n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.ACCOUNT_NAME, accountName); + let contactName = new ZOHOCRMSDK.Record.Record(); + contactName.setId(4402480001393062n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.CONTACT_NAME, contactName); + let campaign_source = new ZOHOCRMSDK.Record.Record(); + campaign_source.setId(4402480001393057n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.CAMPAIGN_SOURCE, campaign_source); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Deals"; +await CreateDeals.initialize(); +await CreateDeals.createDeals(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/createRecords/createEvents.js b/versions/3.0.0/samples/createRecords/createEvents.js new file mode 100644 index 0000000..4717524 --- /dev/null +++ b/versions/3.0.0/samples/createRecords/createEvents.js @@ -0,0 +1,184 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateEvents +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createEvents(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Events.DESCRIPTION, 'description'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Events.START_DATETIME, new Date(2023,9,9,11,32,33)); + let participants = []; + let participant1 = new ZOHOCRMSDK.Record.Participants(); + participant1.setEmail('abc@gmail.com'); + participant1.setType('email'); + participant1.setId(4402480254001n); + participants.push(participant1); + let participant2 = new ZOHOCRMSDK.Record.Participants(); + participant2.addKeyValue('participant', 4003423423434n); + participant2.addKeyValue('type', 'lead'); + participants.push(participant2); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Events.PARTICIPANTS, participants); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Events.ALL_DAY, true); + record1.addKeyValue('send_notification', true); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Events.EVENT_TITLE, 'New Automated Event'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Events.END_DATETIME, new Date(2023, 9, 10, 11, 30, 22)); + let reminderList = []; + let remindAt = new ZOHOCRMSDK.Record.Reminder(); + remindAt.setPeriod("minutes"); + remindAt.setUnit(15); + reminderList.push(remindAt); + let remindAt1 = new ZOHOCRMSDK.Record.Reminder(); + remindAt1.setPeriod("minutes"); + remindAt1.setUnit(15); + remindAt1.setTime("10:30"); + reminderList.push(remindAt1); + record1.addKeyValue('$se_module', 'leads'); + let whatId = new ZOHOCRMSDK.Record.Record(); + whatId = new ZOHOCRMSDK.Record.Record(); + whatId.setId(4300234243n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Events.WHAT_ID, whatId); + record1.addKeyValue('Currency', new ZOHOCRMSDK.Choice("USD")); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Events"; +await CreateEvents.initialize(); +await CreateEvents.createEvents(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/createRecords/createInvoices.js b/versions/3.0.0/samples/createRecords/createInvoices.js new file mode 100644 index 0000000..afe1659 --- /dev/null +++ b/versions/3.0.0/samples/createRecords/createInvoices.js @@ -0,0 +1,210 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateInvoices +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createInvoices(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + let accountName = new ZOHOCRMSDK.Record.Record(); + accountName.setId(4402401390054n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.ACCOUNT_NAME, accountName); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.SUBJECT, "new Invoice"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.ADJUSTMENT, 10.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.INVOICE_DATE, new Date(2023, 9, 12)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.DUE_DATE, new Date(2023, 10, 12)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.SALES_COMMISSION, 20.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.PURCHASE_ORDER, "purchase_order"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.EXCISE_DUTY, 10.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.STATUS, new ZOHOCRMSDK.Choice("Created")); + let contactName = new ZOHOCRMSDK.Record.Record(); + contactName.setId(44024801393062n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.CONTACT_NAME, contactName); + let dealName = new ZOHOCRMSDK.Record.Record(); + dealName.setId(4402481393069n); + record1.addKeyValue("Deal_Name__s", dealName); + let salesOrder = new ZOHOCRMSDK.Record.Record(); + salesOrder.setId(44024801330025n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.SALES_ORDER, salesOrder); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.TERMS_AND_CONDITIONS, "details of terms and Conditions"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.DESCRIPTION, 'description'); + let inventoryLineItemList = []; + let inventoryLineItem = new ZOHOCRMSDK.Record.Record(); + let lineItemProduct = new ZOHOCRMSDK.Record.LineItemProduct(); + lineItemProduct.setId(44024324534n); + inventoryLineItem.addKeyValue("Description", "asd"); + inventoryLineItem.addKeyValue("Discount", "5"); + inventoryLineItem.addKeyValue("Quantity", 10.0); + inventoryLineItem.addKeyValue("List_price", 100.0); + inventoryLineItem.addKeyValue("Product_Name", lineItemProduct); + inventoryLineItem.addKeyValue("Product_Category_1", "hardware"); + let productLineTaxes = []; + let productLineTax = new ZOHOCRMSDK.Record.LineTax(); + productLineTax.setName("Vat"); + productLineTax.setValue(10.0); + productLineTax.setId(4402480020810n); + productLineTax.setPercentage(10.0); + productLineTaxes.push(productLineTax); + inventoryLineItem.addKeyValue("Line_Tax", productLineTaxes); + inventoryLineItemList.push(inventoryLineItem); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.INVOICED_ITEMS, inventoryLineItemList); + let lineTaxes = []; + let lineTax = new ZOHOCRMSDK.Record.LineTax(); + lineTax.setName("MyTax123"); + lineTax.setPercentage(20.0); + lineTaxes.push(lineTax); + record1.addKeyValue('line_tax', lineTaxes); + // Address INFO + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.BILLING_CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.BILLING_STATE, "state"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.BILLING_COUNTRY, "country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.BILLING_CODE, "code"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.BILLING_STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.SHIPPING_STATE, "state"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.SHIPPING_CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.SHIPPING_COUNTRY, "country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.SHIPPING_STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.SHIPPING_CODE, "code"); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Invoices"; +await CreateInvoices.initialize(); +await CreateInvoices.createInvoices(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/createRecords/createLeads.js b/versions/3.0.0/samples/createRecords/createLeads.js new file mode 100644 index 0000000..a31ccc3 --- /dev/null +++ b/versions/3.0.0/samples/createRecords/createLeads.js @@ -0,0 +1,180 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateLeads +{ + + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createLeads(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.COMPANY, "company"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LAST_NAME, "LastName"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.FIRST_NAME, "First_Name"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.ANNUAL_REVENUE, 100.1); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.EMAIL, "abc@gmail.com"); + record1.addKeyValue("Designation", "Title_Name"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.SECONDARY_EMAIL, "abc1@gmail.com"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.PHONE, "3003003330"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.FAX, "fax"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.MOBILE, "10101010"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.WEBSITE, "www.domain.com"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LEAD_STATUS, new ZOHOCRMSDK.Choice("Contacted")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LEAD_SOURCE, new ZOHOCRMSDK.Choice("Advertisement")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.NO_OF_EMPLOYEES, 10); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.INDUSTRY, new ZOHOCRMSDK.Choice("ERP")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.EMAIL_OPT_OUT, true); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.RATING, new ZOHOCRMSDK.Choice("Active")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.SKYPE_ID, "skype_id"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.TWITTER, "twitter55"); + // Address Info + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.STATE, "State"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.CITY, "City"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.COUNTRY, "Country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.ZIP_CODE, "zip_code"); + // + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.DESCRIPTION, "description"); + // used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("Longinteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(44024804001n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(4402480774074n); + record1.addKeyValue("Lookup_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", "true"); + //for Custom MultiPickList + record1.addKeyValue("Multiselect", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("Customfield", "customValue"); + let user1 = new ZOHOCRMSDK.users.MinifiedUser(); + user1.setId(4402401411046n); + subform.addKeyValue("user_1", user1); + subformList.push(subform); + record1.addKeyValue("Subform_1", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 4402481393052n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 4402481390054n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectLookup", multiSelectList); + + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "leads"; +await CreateLeads.initialize(); +await CreateLeads.createLeads(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/createRecords/createPriceBooks.js b/versions/3.0.0/samples/createRecords/createPriceBooks.js new file mode 100644 index 0000000..44b9a23 --- /dev/null +++ b/versions/3.0.0/samples/createRecords/createPriceBooks.js @@ -0,0 +1,167 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreatePriceBooks +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createPriceBooks(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + let pricingDetails =[]; + let pricingDetail1 = new ZOHOCRMSDK.Record.PricingDetails(); + pricingDetail1.setFromRange(1.0); + pricingDetail1.setToRange(5.0); + pricingDetail1.setDiscount(2.0); + pricingDetails.push(pricingDetail1); + let pricingDetail2 = new ZOHOCRMSDK.Record.PricingDetails(); + pricingDetail2.addKeyValue('from_range', 6.0); + pricingDetail2.addKeyValue('to_range', 11.0); + pricingDetail2.addKeyValue('discount', 3.0); + pricingDetails.push(pricingDetail2); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Price_Books.PRICING_DETAILS, pricingDetails); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Price_Books.DESCRIPTION, 'description'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Price_Books.PRICE_BOOK_NAME, 'bookName'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Price_Books.PRICING_MODEL, new ZOHOCRMSDK.Choice('Flat')); + record1.addKeyValue('Email', 'abc@gmail.com'); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Price_Books"; +await CreatePriceBooks.initialize(); +await CreatePriceBooks.createPriceBooks(moduleAPIName); diff --git a/versions/3.0.0/samples/createRecords/createProducts.js b/versions/3.0.0/samples/createRecords/createProducts.js new file mode 100644 index 0000000..9cf6d11 --- /dev/null +++ b/versions/3.0.0/samples/createRecords/createProducts.js @@ -0,0 +1,181 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateProducts +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createProducts(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.PRODUCT_NAME, 'prod'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.PRODUCT_CODE, 'code123'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.PRODUCT_ACTIVE, true); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.PRODUCT_CATEGORY, new ZOHOCRMSDK.Choice('Hardware')); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.MANUFACTURER, new ZOHOCRMSDK.Choice('LexPon Inc.')); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.UNIT_PRICE, 100.1); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.COMMISSION_RATE, 12.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.USAGE_UNIT, new ZOHOCRMSDK.Choice('Box')); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.QTY_ORDERED, 100.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.QTY_IN_DEMAND, 120.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.QTY_IN_STOCK, 200.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.REORDER_LEVEL, 1.0); + let vendorName = new ZOHOCRMSDK.Record.Record(); + vendorName.setId(440248030038n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.VENDOR_NAME, vendorName); + let handler = new ZOHOCRMSDK.Users.Users(); + handler.setId(440248000254001n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.HANDLER, handler); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.SALES_END_DATE, new Date(2023, 9, 10)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.SALES_START_DATE, new Date(2023, 8, 10)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.SUPPORT_EXPIRY_DATE, new Date(2023, 10, 10)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.SUPPORT_START_DATE, new Date(2023, 8, 10)); + let taxes = []; + let line_tax = new ZOHOCRMSDK.Record.Tax(); + line_tax.setId(4402480020810n); + line_tax.setValue("10.0"); + taxes.push(line_tax); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.TAX, taxes); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.TAXABLE, true); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.DESCRIPTION, 'description'); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Products"; +await CreateProducts.initialize(); +await CreateProducts.createProducts(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/createRecords/createPurchaseOrders.js b/versions/3.0.0/samples/createRecords/createPurchaseOrders.js new file mode 100644 index 0000000..37853ec --- /dev/null +++ b/versions/3.0.0/samples/createRecords/createPurchaseOrders.js @@ -0,0 +1,206 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreatePurchaseOrders +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createPurchaseOrders(module) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + let vendor = new ZOHOCRMSDK.Record.Record(); + await vendor.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.ID, 4402480330038n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.VENDOR_NAME, vendor); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.SUBJECT, "new order"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.ADJUSTMENT, 30.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.CARRIER, new ZOHOCRMSDK.Choice("FedEX")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.PO_DATE, new Date(2023, 9, 23)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.PO_NUMBER, "123123"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.EXCISE_DUTY, 25.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.TRACKING_NUMBER, "42231"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.SALES_COMMISSION, 43.32); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.REQUISITION_NO, null); + let contact_Name = new ZOHOCRMSDK.Record.Record(); + await contact_Name.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.ID, 44024801393062n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.CONTACT_NAME, contact_Name); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.DESCRIPTION, "description"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.TERMS_AND_CONDITIONS, "details of terms and condition"); + + let inventoryLineItemList = []; + let inventoryLineItem = new ZOHOCRMSDK.Record.Record(); + let lineItemProduct = new ZOHOCRMSDK.Record.LineItemProduct(); + lineItemProduct.setId(4402480026058n); + inventoryLineItem.addKeyValue("Description", "asd"); + inventoryLineItem.addKeyValue("Discount", "5"); + inventoryLineItem.addKeyValue("Quantity", 10.0); + inventoryLineItem.addKeyValue("List_price", 100.0); + inventoryLineItem.addKeyValue("Product_Name", lineItemProduct); + inventoryLineItem.addKeyValue("Product_Category_1", "hardware"); + let productLineTaxes = []; + let productLineTax = new ZOHOCRMSDK.Record.LineTax(); + productLineTax.setName("Vat"); + productLineTax.setValue(10.0); + productLineTax.setId(440240020810n); + productLineTax.setPercentage(10.0); + productLineTaxes.push(productLineTax); + inventoryLineItem.addKeyValue("Line_Tax", productLineTaxes); + inventoryLineItemList.push(inventoryLineItem); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.PURCHASE_ITEMS, inventoryLineItemList); + let lineTaxes = []; + let lineTax = new ZOHOCRMSDK.Record.LineTax(); + lineTax.setName("MyTax123"); + lineTax.setPercentage(20.0); + lineTaxes.push(lineTax); + record1.addKeyValue('line_tax', lineTaxes); + // Address INFO + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.BILLING_CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.BILLING_STATE, "state"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.BILLING_COUNTRY, "country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.BILLING_CODE, "code"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.BILLING_STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.SHIPPING_STATE, "state"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.SHIPPING_CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.SHIPPING_COUNTRY, "country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.SHIPPING_STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.SHIPPING_CODE, "code"); + + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.createRecords(module, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await CreatePurchaseOrders.initialize(); +await CreatePurchaseOrders.createPurchaseOrders("Purchase_Orders"); \ No newline at end of file diff --git a/versions/3.0.0/samples/createRecords/createQuotes.js b/versions/3.0.0/samples/createRecords/createQuotes.js new file mode 100644 index 0000000..5f2a930 --- /dev/null +++ b/versions/3.0.0/samples/createRecords/createQuotes.js @@ -0,0 +1,207 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateQuotes +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createQuotes(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + let accountName = new ZOHOCRMSDK.Record.Record(); + accountName.addKeyValue("name", "automated"); + await accountName.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.ID, 4402481393052n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.ACCOUNT_NAME, accountName); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.SUBJECT, "new quote"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.ADJUSTMENT, 10.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.VALID_TILL,new Date(2023, 12, 10)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.TEAM, "teamName"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.TERMS_AND_CONDITIONS, "details of terms and conditions"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.DESCRIPTION, "description"); + let dealName = new ZOHOCRMSDK.Record.Record(); + await dealName.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.ID, 44024801393069n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.DEAL_NAME, dealName); + let contactName = new ZOHOCRMSDK.Record.Record(); + await contactName.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.ID, 44024801393062n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.CONTACT_NAME, contactName); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.QUOTE_STAGE, new ZOHOCRMSDK.Choice("Draft")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.CARRIER, new ZOHOCRMSDK.Choice("FedEX")); + + let inventoryLineItemList = []; + let inventoryLineItem = new ZOHOCRMSDK.Record.Record(); + let lineItemProduct = new ZOHOCRMSDK.Record.LineItemProduct(); + lineItemProduct.setId(440248001326058n); + inventoryLineItem.addKeyValue("Description", "asd"); + inventoryLineItem.addKeyValue("Discount", "5"); + inventoryLineItem.addKeyValue("Quantity", 10.0); + inventoryLineItem.addKeyValue("List_price", 100.0); + inventoryLineItem.addKeyValue("Product_Name", lineItemProduct); + inventoryLineItem.addKeyValue("Product_Category_1", "hardware"); + let productLineTaxes = []; + let productLineTax = new ZOHOCRMSDK.Record.LineTax(); + productLineTax.setName("Vat"); + productLineTax.setValue(10.0); + productLineTax.setId(440248020810n); + productLineTax.setPercentage(10.0); + productLineTaxes.push(productLineTax); + inventoryLineItem.addKeyValue("Line_Tax", productLineTaxes); + inventoryLineItemList.push(inventoryLineItem); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.QUOTED_ITEMS, inventoryLineItemList); + let lineTaxes = []; + let lineTax = new ZOHOCRMSDK.Record.LineTax(); + lineTax.setName("MyTax123"); + lineTax.setPercentage(20.0); + lineTaxes.push(lineTax); + record1.addKeyValue('line_tax', lineTaxes); + // Address INFO + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.BILLING_CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.BILLING_STATE, "state"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.BILLING_COUNTRY, "country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.BILLING_CODE, "code"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.BILLING_STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.SHIPPING_STATE, "state"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.SHIPPING_CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.SHIPPING_COUNTRY, "country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.SHIPPING_STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.SHIPPING_CODE, "code"); + + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await CreateQuotes.initialize(); +await CreateQuotes.createQuotes("Quotes"); \ No newline at end of file diff --git a/versions/3.0.0/samples/createRecords/createSalesOrder.js b/versions/3.0.0/samples/createRecords/createSalesOrder.js new file mode 100644 index 0000000..ae4ffbc --- /dev/null +++ b/versions/3.0.0/samples/createRecords/createSalesOrder.js @@ -0,0 +1,215 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateSalesOrder +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createSalesOrders(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + + let account = new ZOHOCRMSDK.Record.Record(); +// account.addKeyValue("name", "automated"); + await account.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.ID, 44024801393052n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.ACCOUNT_NAME, account); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.SUBJECT, "new order"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.ADJUSTMENT, 10.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.DESCRIPTION, "description"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.TERMS_AND_CONDITIONS, "details of terms and conditions"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.CUSTOMER_NO, "123212211"); + let quoteName = new ZOHOCRMSDK.Record.Record(); + await quoteName.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.ID, 4402481392125n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.QUOTE_NAME, quoteName); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.PENDING, null); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.CARRIER, new ZOHOCRMSDK.Choice("FedEX")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.SALES_COMMISSION, 40.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.PURCHASE_ORDER, null); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.EXCISE_DUTY, 30.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.STATUS, new ZOHOCRMSDK.Choice("Created")); + let deal_name = new ZOHOCRMSDK.Record.Record(); + await deal_name.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.ID, 4402480393069n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.DEAL_NAME, deal_name); + let contact_name = new ZOHOCRMSDK.Record.Record(); + await contact_name.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.ID, 4402480001393062n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.CONTACT_NAME, contact_name); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.DUE_DATE, new Date(2023, 12, 21)); + + let inventoryLineItemList = []; + let inventoryLineItem = new ZOHOCRMSDK.Record.Record(); + let lineItemProduct = new ZOHOCRMSDK.Record.LineItemProduct(); + lineItemProduct.setId(44024801326058n); + inventoryLineItem.addKeyValue("Description", "asd"); + inventoryLineItem.addKeyValue("Discount", "5"); + inventoryLineItem.addKeyValue("Quantity", 10.0); + inventoryLineItem.addKeyValue("List_price", 100.0); + inventoryLineItem.addKeyValue("Product_Name", lineItemProduct); + inventoryLineItem.addKeyValue("Product_Category_1", "hardware"); + let productLineTaxes = []; + let productLineTax = new ZOHOCRMSDK.Record.LineTax(); + productLineTax.setName("Vat"); + productLineTax.setValue(10.0); + productLineTax.setId(4402480810n); + productLineTax.setPercentage(10.0); + productLineTaxes.push(productLineTax); + inventoryLineItem.addKeyValue("Line_Tax", productLineTaxes); + inventoryLineItemList.push(inventoryLineItem); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.ORDERED_ITEMS, inventoryLineItemList); + let lineTaxes = []; + let lineTax = new ZOHOCRMSDK.Record.LineTax(); + lineTax.setName("MyTax123"); + lineTax.setPercentage(20.0); + lineTaxes.push(lineTax); + record1.addKeyValue('line_tax', lineTaxes); + // Address INFO + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.BILLING_CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.BILLING_STATE, "state"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.BILLING_COUNTRY, "country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.BILLING_CODE, "code"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.BILLING_STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.SHIPPING_STATE, "state"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.SHIPPING_CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.SHIPPING_COUNTRY, "country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.SHIPPING_STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.SHIPPING_CODE, "code"); + + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await CreateSalesOrder.initialize(); +await CreateSalesOrder.createSalesOrders("Sales_Orders"); \ No newline at end of file diff --git a/versions/3.0.0/samples/createRecords/createSolutions.js b/versions/3.0.0/samples/createRecords/createSolutions.js new file mode 100644 index 0000000..a69d82e --- /dev/null +++ b/versions/3.0.0/samples/createRecords/createSolutions.js @@ -0,0 +1,161 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateSolutions +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createSolutions(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Solutions.SOLUTION_TITLE, "new Solution"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Solutions.QUESTION, "question?"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Solutions.ANSWER, "answer."); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Solutions.STATUS, new ZOHOCRMSDK.Choice('Draft')); + let productName = new ZOHOCRMSDK.Record.Record(); + productName.setId(44024801391082n); + await productName.addFieldValue(ZOHOCRMSDK.Record.Field.Solutions.PRODUCT_NAME, productName); + let solutionOwner = new ZOHOCRMSDK.Users.Users(); + solutionOwner.setId(4402480254001n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Solutions.OWNER, solutionOwner); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Solutions"; +await CreateSolutions.initialize(); +await CreateSolutions.createSolutions(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/createRecords/createTasks.js b/versions/3.0.0/samples/createRecords/createTasks.js new file mode 100644 index 0000000..070da4e --- /dev/null +++ b/versions/3.0.0/samples/createRecords/createTasks.js @@ -0,0 +1,172 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateTasks +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createTasks(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.DESCRIPTION, 'description'); + record1.addKeyValue('Rupee', new ZOHOCRMSDK.Choice("INR")); + let remindAt = new ZOHOCRMSDK.Record.RemindAt(); + remindAt.setAlarm("ACTION=EMAIL;TRIGGER=-P1D;TRIGGER_TIME=22:52"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.REMIND_AT, remindAt); + let whoId = new ZOHOCRMSDK.Record.Record(); + whoId.setId(440248001393062n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.WHO_ID, whoId); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.STATUS, new ZOHOCRMSDK.Choice('Not Started')); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.PRIORITY, new ZOHOCRMSDK.Choice('Low')); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.DUE_DATE, new Date(2023, 10, 12)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.SUBJECT, 'Email1'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.SEND_NOTIFICATION_EMAIL, false); + let whatId = new ZOHOCRMSDK.Record.Record(); + whatId.setId(4402480093052n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.WHAT_ID, whatId); + record1.addKeyValue('$se_module', "Accounts"); + // Recurring Activity can be provided in any activity Module + let recurringActivity = new ZOHOCRMSDK.Record.RecurringActivity(); + recurringActivity.setRrule("FREQ=DAILY;INTERVAL=1;DTSTART=2022-04-06;UNTIL=2022-04-12"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.RECURRING_ACTIVITY, recurringActivity); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Tasks"; +await CreateTasks.initialize(); +await CreateTasks.createTasks(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/createRecords/createVendors.js b/versions/3.0.0/samples/createRecords/createVendors.js new file mode 100644 index 0000000..5d8ed28 --- /dev/null +++ b/versions/3.0.0/samples/createRecords/createVendors.js @@ -0,0 +1,163 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateVendors +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createVendors(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.VENDOR_NAME, 'new vendor name'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.PHONE, '123321'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.EMAIL, 'abc@gmail.com'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.WEBSITE, null); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.GL_ACCOUNT, new ZOHOCRMSDK.Choice('Sales-Software')); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.CATEGORY, ''); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.CITY, 'city'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.COUNTRY, 'Country'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.STATE, 'State'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.STREET, 'street'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.ZIP_CODE, 'Zip123'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.DESCRIPTION, 'description'); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Vendors"; +await CreateVendors.initialize(); +await CreateVendors.createVendors(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/currencies/addCurrencies.js b/versions/3.0.0/samples/currencies/addCurrencies.js new file mode 100644 index 0000000..a780dc4 --- /dev/null +++ b/versions/3.0.0/samples/currencies/addCurrencies.js @@ -0,0 +1,96 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class AddCurrencies{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Add Currencies

+ * This method is used to add new currencies to your organization. + */ + static async addCurrencies() { + let currenciesOperations = new ZOHOCRMSDK.Currencies.CurrenciesOperations(); + let request = new ZOHOCRMSDK.Currencies.BodyWrapper(); + //Array to hold Currency instances + let currencies = []; + let currency = new ZOHOCRMSDK.Currencies.Currency(); + //true: Display ISO code before the currency value. + //false: Display ISO code after the currency value. + currency.setPrefixSymbol(true); + currency.setName("Angolan Kwanza - AOA"); + currency.setIsoCode("AOA"); + currency.setSymbol("Kz"); + currency.setExchangeRate("20."); + //true: The currency is active. + //false: The currency is inactive. + currency.setIsActive(true); + let format = new ZOHOCRMSDK.Currencies.CurrencyFormat(); + //It can be a Period or Comma, depending on the currency. + format.setDecimalSeparator(new ZOHOCRMSDK.Choice("Period")); + //It can be a Period, Comma, or Space, depending on the currency. + format.setThousandSeparator(new ZOHOCRMSDK.Choice("Comma")); + format.setDecimalPlaces(new ZOHOCRMSDK.Choice("2")); + await currency.setFormat(format); + currencies.push(currency); + request.setCurrencies(currencies); + //Call addCurrencies method that takes BodyWrapper instance as parameter + let response = await currenciesOperations.createCurrencies(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Currencies.ActionWrapper) { + let actionResponses = responseObject.getCurrencies(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Currencies.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Currencies.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Currencies.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await AddCurrencies.initialize(); +await AddCurrencies.addCurrencies(); \ No newline at end of file diff --git a/versions/3.0.0/samples/currencies/enableMultipleCurrencies.js b/versions/3.0.0/samples/currencies/enableMultipleCurrencies.js new file mode 100644 index 0000000..bf70672 --- /dev/null +++ b/versions/3.0.0/samples/currencies/enableMultipleCurrencies.js @@ -0,0 +1,91 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class EnableMultipleCurrencies{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Enable Multiple Currencies

+ * This method is used to enable multiple currencies for your organization. + */ + static async enableMultipleCurrencies() { + let currenciesOperations = new ZOHOCRMSDK.Currencies.CurrenciesOperations(); + let request = new ZOHOCRMSDK.Currencies.BaseCurrencyWrapper(); + let currency = new ZOHOCRMSDK.Currencies.BaseCurrency(); + //true: Display ISO code before the currency value. + //false: Display ISO code after the currency value. + currency.setPrefixSymbol(true); + currency.setName("Algerian Dinar-ADN"); + currency.setIsoCode("DZD"); + // currency.setSymbol("Af"); + currency.setExchangeRate("1.00"); + //true: The currency is active. + //false: The currency is inactive. + // currency.setIsActive(true); + let format = new ZOHOCRMSDK.Currencies.Format(); + // It can be a Period or Comma, depending on the base currency. + format.setDecimalSeparator(new ZOHOCRMSDK.Choice("Period")); + //It can be a Period, Comma, or Space, depending on the base currency. + format.setThousandSeparator(new ZOHOCRMSDK.Choice("Comma")); + format.setDecimalPlaces(new ZOHOCRMSDK.Choice("2")); + await currency.setFormat(format); + await request.setBaseCurrency(currency); + //Call enableMultipleCurrencies method that takes BodyWrapper instance as parameter + let response = await currenciesOperations.enableCurrency(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Currencies.BaseCurrencyActionWrapper) { + let actionResponse = responseObject.getBaseCurrency(); + if (actionResponse instanceof ZOHOCRMSDK.Currencies.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Currencies.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + } + else if (responseObject instanceof ZOHOCRMSDK.Currencies.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await EnableMultipleCurrencies.initialize(); +await EnableMultipleCurrencies.enableMultipleCurrencies() \ No newline at end of file diff --git a/versions/3.0.0/samples/currencies/getCurrencies.js b/versions/3.0.0/samples/currencies/getCurrencies.js new file mode 100644 index 0000000..b31075f --- /dev/null +++ b/versions/3.0.0/samples/currencies/getCurrencies.js @@ -0,0 +1,79 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetCurrencies{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Currencies

+ * This method is used to get all the available currencies in your organization. + */ + static async getCurrencies() { + let currenciesOperations = new ZOHOCRMSDK.Currencies.CurrenciesOperations(); + //Call getCurrencies method + let response = await currenciesOperations.getCurrencies(); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Currencies.BodyWrapper) { + let currencies = responseObject.getCurrencies(); + currencies.forEach(currency => { + console.log("Currency Symbol: " + currency.getSymbol()); + console.log("Currency CreatedTime: " + currency.getCreatedTime()); + console.log("Currency IsActive: " + currency.getIsActive().toString()); + console.log("Currency ExchangeRate: " + currency.getExchangeRate()); + let format = currency.getFormat(); + if (format != null) { + console.log("Currency Format DecimalSeparator: " + format.getDecimalSeparator().getValue()); + console.log("Currency Format ThousandSeparator: " + format.getThousandSeparator().getValue()); + console.log("Currency Format DecimalPlaces: " + format.getDecimalPlaces().getValue()); + } + let createdBy = currency.getCreatedBy(); + if (createdBy != null) { + console.log("Currency CreatedBy User-Name: " + createdBy.getName()); + console.log("Currency CreatedBy User-ID: " + createdBy.getId()); + } + console.log("Currency PrefixSymbol: " + currency.getPrefixSymbol().toString()); + console.log("Currency IsBase: " + currency.getIsBase().toString()); + console.log("Currency ModifiedTime: " + currency.getModifiedTime()); + console.log("Currency Name: " + currency.getName()); + let modifiedBy = currency.getModifiedBy(); + if (modifiedBy != null) { + console.log("Currency ModifiedBy User-Name: " + modifiedBy.getName()); + console.log("Currency ModifiedBy User-ID: " + modifiedBy.getId()); + } + console.log("Currency Id: " + currency.getId()); + console.log("Currency IsoCode: " + currency.getIsoCode()); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Currencies.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetCurrencies.initialize(); +await GetCurrencies.getCurrencies(); \ No newline at end of file diff --git a/versions/3.0.0/samples/currencies/getCurrency.js b/versions/3.0.0/samples/currencies/getCurrency.js new file mode 100644 index 0000000..d90c3aa --- /dev/null +++ b/versions/3.0.0/samples/currencies/getCurrency.js @@ -0,0 +1,83 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetCurrency{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Currency

+ * This method is used to get the details of a specific currency. + * @param {BigInt} currencyId Specify the unique ID of the currency. + */ + static async getCurrency(currencyId) { + //example + //let currencyId = 1001n; + let currenciesOperations = new ZOHOCRMSDK.Currencies.CurrenciesOperations(); + //Call getCurrency method that takes currencyId as parameter + let response = await currenciesOperations.getCurrency(currencyId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Currencies.BodyWrapper) { + let currencies = responseObject.getCurrencies(); + currencies.forEach(currency => { + console.log("Currency Id: " + currency.getId()); + console.log("Currency IsoCode: " + currency.getIsoCode()); + console.log("Currency Symbol: " + currency.getSymbol()); + console.log("Currency CreatedTime: " + currency.getCreatedTime()); + console.log("Currency IsActive: " + currency.getIsActive().toString()); + console.log("Currency ExchangeRate: " + currency.getExchangeRate()); + let format = currency.getFormat(); + if (format != null) { + console.log("Currency Format DecimalSeparator: " + format.getDecimalSeparator().getValue()); + console.log("Currency Format ThousandSeparator: " + format.getThousandSeparator().getValue()); + console.log("Currency Format DecimalPlaces: " + format.getDecimalPlaces().getValue()); + } + let createdBy = currency.getCreatedBy(); + if (createdBy != null) { + console.log("Currency CreatedBy User-Name: " + createdBy.getName()); + console.log("Currency CreatedBy User-ID: " + createdBy.getId()); + } + console.log("Currency PrefixSymbol: " + currency.getPrefixSymbol().toString()); + console.log("Currency IsBase: " + currency.getIsBase().toString()); + console.log("Currency ModifiedTime: " + currency.getModifiedTime()); + console.log("Currency Name: " + currency.getName()); + let modifiedBy = currency.getModifiedBy(); + if (modifiedBy != null) { + console.log("Currency ModifiedBy User-Name: " + modifiedBy.getName()); + console.log("Currency ModifiedBy User-ID: " + modifiedBy.getId()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Currencies.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetCurrency.initialize(); +let currencyId = 3477061000006008002n; +await GetCurrency.getCurrency(currencyId); \ No newline at end of file diff --git a/versions/3.0.0/samples/currencies/updateBaseCurrency.js b/versions/3.0.0/samples/currencies/updateBaseCurrency.js new file mode 100644 index 0000000..ad09799 --- /dev/null +++ b/versions/3.0.0/samples/currencies/updateBaseCurrency.js @@ -0,0 +1,87 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateBaseCurrency{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Currency

+ * This method is used to update base currency details. + */ + static async updateBaseCurrency() { + let currenciesOperations = new ZOHOCRMSDK.Currencies.CurrenciesOperations(); + let request = new ZOHOCRMSDK.Currencies.BaseCurrencyWrapper(); + let currency = new ZOHOCRMSDK.Currencies.BaseCurrency(); + //true: Display ISO code before the currency value. + //false: Display ISO code after the currency value. + currency.setPrefixSymbol(true); + currency.setSymbol("Af"); + currency.setExchangeRate("1.00"); + currency.setId(34770616008002n); + let format = new ZOHOCRMSDK.Currencies.Format(); + //It can be a Period or Comma, depending on the base currency. + format.setDecimalSeparator(new ZOHOCRMSDK.Choice("Period")); + //It can be a Period, Comma, or Space, depending on the base currency. + format.setThousandSeparator(new ZOHOCRMSDK.Choice("Comma")); + format.setDecimalPlaces(new ZOHOCRMSDK.Choice("2")); + await currency.setFormat(format); + await request.setBaseCurrency(currency); + //Call updateBaseCurrency method that takes BodyWrapper instance as parameter + let response = await currenciesOperations.updateBaseCurrency(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Currencies.BaseCurrencyActionWrapper) { + let actionResponse = responseObject.getBaseCurrency(); + if (actionResponse instanceof ZOHOCRMSDK.Currencies.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Currencies.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + } + else if (responseObject instanceof ZOHOCRMSDK.Currencies.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await UpdateBaseCurrency.initialize(); +await UpdateBaseCurrency.updateBaseCurrency(); \ No newline at end of file diff --git a/versions/3.0.0/samples/currencies/updateCurrencies.js b/versions/3.0.0/samples/currencies/updateCurrencies.js new file mode 100644 index 0000000..6b056c7 --- /dev/null +++ b/versions/3.0.0/samples/currencies/updateCurrencies.js @@ -0,0 +1,95 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateCurrencies{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Currencies

+ * This method is used to update currency details. + */ + static async updateCurrencies() { + let currenciesOperations = new ZOHOCRMSDK.Currencies.CurrenciesOperations(); + let request = new ZOHOCRMSDK.Currencies.BodyWrapper(); + //Array to hold Currency instances + let currencies = []; + let currency = new ZOHOCRMSDK.Currencies.Currency(); + currency.setId(34770616011001n); + //true: Display ISO code before the currency value. + //false: Display ISO code after the currency value. + currency.setPrefixSymbol(true); + currency.setExchangeRate("10."); + //true: The currency is active. + //false: The currency is inactive. + currency.setIsActive(true); + let format = new ZOHOCRMSDK.Currencies.CurrencyFormat(); + //It can be a Period or Comma, depending on the currency. + format.setDecimalSeparator(new ZOHOCRMSDK.Choice("Period")); + //It can be a Period, Comma, or Space, depending on the currency. + format.setThousandSeparator(new ZOHOCRMSDK.Choice("Space")); + format.setDecimalPlaces(new ZOHOCRMSDK.Choice("2")); + await currency.setFormat(format); + //Add Currency instance to the array + currencies.push(currency); + request.setCurrencies(currencies); + //Call updateCurrencies method that takes BodyWrapper instance as parameter + let response = await currenciesOperations.updateCurrencies(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Currencies.ActionWrapper) { + let actionResponses = responseObject.getCurrencies(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Currencies.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Currencies.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Currencies.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await UpdateCurrencies.initialize(); +await UpdateCurrencies.updateCurrencies(); \ No newline at end of file diff --git a/versions/3.0.0/samples/currencies/updateCurrency.js b/versions/3.0.0/samples/currencies/updateCurrency.js new file mode 100644 index 0000000..ea27a38 --- /dev/null +++ b/versions/3.0.0/samples/currencies/updateCurrency.js @@ -0,0 +1,98 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateCurrency{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Currency

+ * This method is used to update currency details. + * @param {BigInt} currencyId Specify the unique ID of the currency. + */ + static async updateCurrency(currencyId) { + //example + //let currencyId = 6011001n; + let currenciesOperations = new ZOHOCRMSDK.Currencies.CurrenciesOperations(); + let request = new ZOHOCRMSDK.Currencies.BodyWrapper(); + //Array to hold Currency instances + let currencies = []; + let currency = new ZOHOCRMSDK.Currencies.Currency(); + //true: Display ISO code before the currency value. + //false: Display ISO code after the currency value. + currency.setPrefixSymbol(true); + currency.setExchangeRate("5.00"); + //true: The currency is active. + //false: The currency is inactive. + currency.setIsActive(true); + let format = new ZOHOCRMSDK.Currencies.CurrencyFormat(); + //It can be a Period or Comma, depending on the currency. + format.setDecimalSeparator(new ZOHOCRMSDK.Choice("Period")); + //It can be a Period, Comma, or Space, depending on the currency. + format.setThousandSeparator(new ZOHOCRMSDK.Choice("Comma")); + format.setDecimalPlaces(new ZOHOCRMSDK.Choice("2")); + await currency.setFormat(format); + //Add the Currency instance to the array + currencies.push(currency); + request.setCurrencies(currencies); + //Call updateCurrency method that takes BodyWrapper instance and currencyId as parameters + let response = await currenciesOperations.updateCurrency(currencyId, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Currencies.ActionWrapper) { + let actionResponses = responseObject.getCurrencies(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Currencies.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Currencies.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Currencies.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateCurrency.initialize(); +let currencyId = 1001n; +await UpdateCurrency.updateCurrency(currencyId); \ No newline at end of file diff --git a/versions/3.0.0/samples/custom_views/getCustomView.js b/versions/3.0.0/samples/custom_views/getCustomView.js new file mode 100644 index 0000000..b971cd4 --- /dev/null +++ b/versions/3.0.0/samples/custom_views/getCustomView.js @@ -0,0 +1,139 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetCustomView{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + * This method is used to get the data of any specific custom view of the module. + * Specify the custom view ID of the module in your API request whose custom view data you want to retrieve. + * @param {String} moduleAPIName Specify the API name of the required module. + * @param {BigInt} customViewId ID of the CustomView to be obtained. + */ + static async getCustomView(moduleAPIName, customViewId) { + let customViewsOperations = new ZOHOCRMSDK.CustomViews.CustomViewsOperations(); + let paraminstance = new ZOHOCRMSDK.ParameterMap(); + await paraminstance.add(ZOHOCRMSDK.CustomViews.GetCustomViewParam.MODULE, moduleAPIName); + let response = await customViewsOperations.getCustomView(customViewId, paraminstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.CustomViews.BodyWrapper) { + let customViews = responseObject.getCustomViews(); + for (let index = 0; index < customViews.length; index++) { + let customView = customViews[index]; + console.log("CustomView ID: " + customView.getId()); + console.log("CustomView Name: " + customView.getName()); + console.log("CustomView DisplayValue: " + customView.getDisplayValue()); + console.log("CustomView AccessType: " + customView.getAccessType()); + let criteria = customView.getCriteria(); + if (criteria != null) { + await this.printCriteria(criteria); + } + console.log("CustomView SystemName: " + customView.getSystemName()); + console.log("CustomView SortBy: " + customView.getSortBy()); + let createdBy = customView.getCreatedBy(); + if (createdBy != null) { + console.log("CustomView Created By User-Name: " + createdBy.getName()); + console.log("CustomView Created By User-ID: " + createdBy.getId()); + } + let sharedToArray = customView.getSharedTo(); + if (sharedToArray != null) { + sharedToArray.forEach(sharedTo => { + console.log("CustomView sharedTo Name: " + sharedTo.getName()); + console.log("CustomView sharedTo Id: " + sharedTo.getId()); + console.log("CustomView sharedTo Type: " + sharedTo.getType()); + console.log("CustomView sharedTo Subordinates: " + sharedTo.getSubordinates()); + }); + } + console.log("CustomView Default: " + customView.getDefault().toString()); + console.log("CustomView ModifiedTime: " + customView.getModifiedTime()); + console.log("CustomView SystemDefined: " + customView.getSystemDefined().toString()); + let modifiedBy = customView.getModifiedBy(); + if (modifiedBy != null) { + console.log("CustomView Modified By User-Name: " + modifiedBy.getName()); + console.log("CustomView Modified By User-ID: " + modifiedBy.getId()); + } + let fields = customView.getFields(); + if (fields != null) { + fields.forEach(field => { + console.log("CustomView Fields APIName: " + field.getAPIName()); + console.log("CustomView Fields Id: " + field.getId()); + }); + } + console.log("CustomView Category: " + customView.getCategory()); + console.log("CustomView LastAccessedTime: " + customView.getLastAccessedTime()); + if (customView.getFavorite() != null) { + console.log("CustomView Favorite: " + customView.getFavorite().toString()); + } + if (customView.getSortOrder() != null) { + console.log("CustomView SortOrder: " + customView.getSortOrder().toString()); + } + } + let info = responseObject.getInfo(); + if (info != null) { + let translation = info.getTranslation(); + if (translation != null) { + console.log("Translation details"); + console.log("PublicViews: " + translation.getPublicViews()); + console.log("OtherUsersViews: " + translation.getOtherUsersViews()); + console.log("SharedWithMe: " + translation.getSharedWithMe()); + console.log("CreatedByMe: " + translation.getCreatedByMe()); + } + } + } + else if (responseObject instanceof ZOHOCRMSDK.CustomViews.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } + static async printCriteria(criteria) { + let field = criteria.getField(); + if (field != null) { + console.log("Bulkread Query Criteria Field Id: " + field.getId()); + console.log("Bulkread Query Criteria Field APIName: " + field.getAPIName()); + } + if (criteria.getComparator() != null) { + console.log("BulkRead Criteria Comparator: " + criteria.getComparator()); + } + if (criteria.getValue() != null) { + console.log("BulkRead Criteria Value: " + criteria.getValue().toString()); + } + let criteriaGroup = criteria.getGroup(); + if (criteriaGroup != null) { + criteriaGroup.forEach(eachCriteria => { + this.printCriteria(eachCriteria); + }); + } + if (criteria.getGroupOperator() != null) { + console.log("BulkRead Criteria Group Operator: " + criteria.getGroupOperator()); + } + } +} +await GetCustomView.initialize(); +let moduleAPIName = "leads"; +let customViewId = 44024800063n; +await GetCustomView.getCustomView(moduleAPIName,customViewId); \ No newline at end of file diff --git a/versions/3.0.0/samples/custom_views/getCustomViews.js b/versions/3.0.0/samples/custom_views/getCustomViews.js new file mode 100644 index 0000000..aa73c07 --- /dev/null +++ b/versions/3.0.0/samples/custom_views/getCustomViews.js @@ -0,0 +1,110 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetCustomViews{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get CustomViews

+ * This method is used to get the custom views data of a particular module. + * Specify the module name in your API request whose custom view data you want to retrieve. + * @param {String} moduleAPIName Specify the API name of the required module. + */ + static async getCustomViews(moduleAPIName) { + //example + //let moduleAPIName = "module_api_name"; + let customViewsOperations = new ZOHOCRMSDK.CustomViews.CustomViewsOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + //Possible parameters of Get CustomViews operation + await paramInstance.add(ZOHOCRMSDK.CustomViews.GetCustomViewsParam.MODULE, moduleAPIName); + //Call getCustomViews method that takes ParameterMap instance as parameter + let response = await customViewsOperations.getCustomViews(paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.CustomViews.BodyWrapper) { + let customViews = responseObject.getCustomViews(); + customViews.forEach(customView => { + console.log("CustomView DisplayValue: " + customView.getDisplayValue()); + console.log("CustomView Default: " + customView.getDefault().toString()); + console.log("CustomView ModifiedTime: " + customView.getModifiedTime()); + console.log("CustomView SystemName: " + customView.getSystemName()); + console.log("CustomView Name: " + customView.getName()); + console.log("CustomView SystemDefined: " + customView.getSystemDefined().toString()); + let modifiedBy = customView.getModifiedBy(); + if (modifiedBy != null) { + console.log("CustomView Modified By User-Name: " + modifiedBy.getName()); + console.log("CustomView Modified By User-ID: " + modifiedBy.getId()); + } + console.log("CustomView ID: " + customView.getId()); + console.log("CustomView Category: " + customView.getCategory()); + console.log("CustomView LastAccessedTime: " + customView.getLastAccessedTime()); + if (customView.getFavorite() != null) { + console.log("CustomView Favorite: " + customView.getFavorite().toString()); + } + let createdBy = customView.getCreatedBy(); + if (createdBy != null) { + console.log("CustomView Created By User-Name: " + createdBy.getName()); + console.log("CustomView Created By User-ID: " + createdBy.getId()); + } + }); + let info = responseObject.getInfo(); + if (info != null) { + console.log("CustomView Info"); + if (info.getPerPage() != null) { + console.log("PerPage: " + info.getPerPage().toString()); + } + if (info.getDefault() != null) { + console.log("Default: " + info.getDefault()); + } + if (info.getCount() != null) { + console.log("Count: " + info.getCount().toString()); + } + let translation = info.getTranslation(); + if (translation != null) { + console.log("Translation details"); + console.log("PublicViews: " + translation.getPublicViews()); + console.log("OtherUsersViews: " + translation.getOtherUsersViews()); + console.log("SharedWithMe: " + translation.getSharedWithMe()); + console.log("CreatedByMe: " + translation.getCreatedByMe()); + } + if (info.getPage() != null) { + console.log("Page: " + info.getPage().toString()); + } + if (info.getMoreRecords() != null) { + console.log("MoreRecords: " + info.getMoreRecords().toString()); + } + } + } + else if (responseObject instanceof ZOHOCRMSDK.CustomViews.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetCustomViews.initialize(); +let moduleAPIName = "leads"; +await GetCustomViews.getCustomViews(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/dealContactRoles/addContactRoleToDeal.js b/versions/3.0.0/samples/dealContactRoles/addContactRoleToDeal.js new file mode 100644 index 0000000..c037d03 --- /dev/null +++ b/versions/3.0.0/samples/dealContactRoles/addContactRoleToDeal.js @@ -0,0 +1,88 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class AddContactRoleToDeal +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async addContactRoleToDeal(contactId, dealId) + { + let contactRolesOperations = new ZOHOCRMSDK.ContactDealRoles.DealContactRolesOperations(); + let bodyWrapper = new ZOHOCRMSDK.ContactDealRoles.BodyWrapper(); + let data = []; + let data1 = new ZOHOCRMSDK.ContactDealRoles.Data(); + let contactRole = new ZOHOCRMSDK.ContactDealRoles.ContactRole(); + contactRole.setId(44024800330004n); + contactRole.setName("contactRoleof2"); + await data1.setContactRole(contactRole); + data.push(data1); + bodyWrapper.setData(data); + let response = await contactRolesOperations.associateContactRoleToDeal(contactId, dealId, bodyWrapper); + if (response != null) + { + console.log("Status code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.ContactDealRoles.ActionWrapper) + { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.ContactDealRoles.SuccessResponse) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.ContactDealRoles.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + else if (actionHandler instanceof ZOHOCRMSDK.ContactDealRoles.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let contactId = 44024800306013n; +let dealId = 440248001177050n; +await AddContactRoleToDeal.initialize(); +await AddContactRoleToDeal.addContactRoleToDeal(contactId, dealId); \ No newline at end of file diff --git a/versions/3.0.0/samples/dealContactRoles/getAllContactRolesofDeal.js b/versions/3.0.0/samples/dealContactRoles/getAllContactRolesofDeal.js new file mode 100644 index 0000000..a82d0fb --- /dev/null +++ b/versions/3.0.0/samples/dealContactRoles/getAllContactRolesofDeal.js @@ -0,0 +1,125 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetAllContactRolesofDeal +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getAllContactRolesofDeal(dealId) + { + let contactRolesOperations = new ZOHOCRMSDK.ContactDealRoles.DealContactRolesOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.ContactDealRoles.GetAssociatedContactRolesParam.FIELDS, "Last_Name"); + let response = await contactRolesOperations.getAssociatedContactRoles(dealId, paramInstance); + if (response != null) + { + console.log('Status Code: ' + response.getStatusCode() + "\n"); + if (response.getStatusCode() == 204 || response.getStatusCode() == 304) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.ContactDealRoles.BodyWrapper) + { + let responseWrapper = responseHandler; + let records = responseWrapper.getData(); + records.forEach(record => { + console.log("Record ID : " + record.getId() + "\n"); + let createdBy = record.getCreatedBy(); + if (createdBy != null) + { + console.log("Record Created By User-ID: " + createdBy.getId() + "\n"); + console.log("Record CreatedBy User-Name: " + createdBy.getName() + "\n"); + console.log("Record created by user-Email: " + createdBy.getEmail() + "\n"); + } + console.log("Record CreatedTime: "); + console.log(record.getCreatedTime()); + console.log("\n"); + let modifiedBy = record.getModifiedBy(); + if (modifiedBy != null) + { + console.log("Record Modified By User-ID: " + modifiedBy.getId() + "\n"); + console.log("Record Modified By User-Name: " + modifiedBy.getName() + "\n"); + console.log("Record Modified By User-Email: " + modifiedBy.getEmail() + "\n"); + } + console.log("Record Field Value : " + record.getKeyValue("Last_Name") + "\n"); + console.log("Record KeyValues : \n"); + let keyvalues = record.getKeyValues(); + Array.from(keyvalues.keys()).forEach(keyName => { + if (keyvalues.get(keyName) != null) + { + if (Array.isArray(keyvalues.get(keyName)) && keyvalues.get(keyName).length > 0 && keyvalues.get(keyName) != null) + { + console.log("Record KeyName : " + keyName + " : \n"); + let dataList = keyvalues.get(keyName); + dataList.forEach(data => { + if (Array.isArray(data)) + { + console.log("Record KeyName : " + keyName + " - Value : \n"); + Array.from(data.keys()).forEach(key => { + console.log(key + " : " + data.get(key) + "\n"); + }); + } + else + { + console.log(data); + console.log("\n"); + } + }); + } + else if (keyvalues.get(keyName) instanceof ZOHOCRMSDK.ContactDealRoles.ContactRole) + { + console.log("Record ConstactRole Name : " + keyvalues.get(keyName).getName() + "\n"); + console.log("Record ContactRole Id : " + keyvalues.get(keyName).getId() + "\n"); + } + else + { + console.log("Record KeyName : " + keyName + " - value : \n"); + console.log(keyvalues.get(keyName)); + console.log("\n"); + } + } + }); + }); + let info = responseWrapper.getInfo(); + if (info != null) + { + if (info.getCount() != null) + { + console.log("Record INfo Count : " + info.getCount() + "\n"); + } + if (info.getMoreRecords() != null) + { + console.log("Record info MoreRecords : " + info.getMoreRecords() + "\n"); + } + } + } + else if (responseHandler instanceof ZOHOCRMSDK.ContactDealRoles.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let dealId = 440248001177050n; +await GetAllContactRolesofDeal.initialize(); +await GetAllContactRolesofDeal.getAllContactRolesofDeal(dealId); \ No newline at end of file diff --git a/versions/3.0.0/samples/dealContactRoles/getContactRoleOfDeal.js b/versions/3.0.0/samples/dealContactRoles/getContactRoleOfDeal.js new file mode 100644 index 0000000..f495a55 --- /dev/null +++ b/versions/3.0.0/samples/dealContactRoles/getContactRoleOfDeal.js @@ -0,0 +1,106 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetContactRoleOfDeal { + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + + static async getContactRoleOfDeal(contactId, dealId) { + let contactRoleSOperations = new ZOHOCRMSDK.ContactDealRoles.DealContactRolesOperations(); + let response = await contactRoleSOperations.getAssociatedContactRolesSpecificToContact(contactId, dealId); + if (response != null) { + console.log('Status Code: ' + response.getStatusCode() + "\n"); + if (response.getStatusCode() == 204 || response.getStatusCode() == 304) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.ContactDealRoles.BodyWrapper) { + let responseWrapper = responseHandler; + let records = responseWrapper.getData(); + records.forEach(record => { + console.log("Record ID : " + record.getId() + "\n"); + let createdBy = record.getCreatedBy(); + if (createdBy != null) { + console.log("Record Created By User-ID: " + createdBy.getId() + "\n"); + console.log("Record CreatedBy User-Name: " + createdBy.getName() + "\n"); + console.log("Record created by user-Email: " + createdBy.getEmail() + "\n"); + } + console.log("Record CreatedTime: \n"); + console.log(record.getCreatedTime().toString()); + console.log("\n"); + let modifiedBy = record.getModifiedBy(); + if (modifiedBy != null) { + console.log("Record Modified By User-ID: " + modifiedBy.getId() + "\n"); + console.log("Record Modified By User-Name: " + modifiedBy.getName() + "\n"); + console.log("Record Modified By User-Email: " + modifiedBy.getEmail() + "\n"); + } + console.log("Record ModifiedTime : \n"); + console.log(record.getModifiedTime().toString() + "\n"); + console.log("Record Field Value : " + record.getKeyValue("Last_Name") + "\n"); + console.log("Record KeyValues : \n"); + let keyvalues = record.getKeyValues(); + Array.from(keyvalues.keys()).forEach(keyName => { + if (keyvalues.get(keyName) != null) { + if (Array.isArray(keyvalues.get(keyName)) && keyvalues.get(keyName).length > 0 && keyvalues.get(keyName) != null) { + console.log("Record KeyName : " + keyName + " : \n"); + let dataList = keyvalues.get(keyName); + dataList.forEach(data => { + if (Array.isArray(data)) { + console.log("Record KeyName : " + keyName + " - Value : \n"); + Array.from(data.keys()).forEach(key => { + console.log(key + " : " + data.get(key) + "\n"); + }); + } else { + console.log(data); + console.log("\n"); + } + }); + } else if (keyvalues.get(keyName) instanceof ZOHOCRMSDK.ContactDealRoles.ContactRole) { + console.log("Record ConstactRole Name : " + keyvalues.get(keyName).getName() + "\n"); + console.log("Record ContactRole Id : " + keyvalues.get(keyName).getId() + "\n"); + } else { + console.log("Record KeyName : " + keyName + " - value : \n"); + console.log(keyvalues.get(keyName)); + console.log("\n"); + } + } + }); + }); + let info = responseWrapper.getInfo(); + if (info != null) { + if (info.getCount() != null) { + console.log("Record INfo Count : " + info.getCount() + "\n"); + } + if (info.getMoreRecords() != null) { + console.log("Record info MoreRecords : " + info.getMoreRecords() + "\n"); + } + } + } else if (responseHandler instanceof ZOHOCRMSDK.ContactDealRoles.APIException) { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let contactId = 440201306013n; +let dealId = 440201177050n; +await GetContactRoleOfDeal.initialize(); +await GetContactRoleOfDeal.getContactRoleOfDeal(contactId, dealId); \ No newline at end of file diff --git a/versions/3.0.0/samples/dealContactRoles/removeContactRoleFromDeal.js b/versions/3.0.0/samples/dealContactRoles/removeContactRoleFromDeal.js new file mode 100644 index 0000000..4971c94 --- /dev/null +++ b/versions/3.0.0/samples/dealContactRoles/removeContactRoleFromDeal.js @@ -0,0 +1,79 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class RemoveContactRoleFromDeal +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async removeContactRoleFromDeal(contactId, dealId) + { + let contactRoleOperations = new ZOHOCRMSDK.ContactDealRoles.DealContactRolesOperations(); + let response = await contactRoleOperations.deleteContactRoleRealation(contactId, dealId); + if (response != null) + { + console.log("Status code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.ContactDealRoles.ActionWrapper) + { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.ContactDealRoles.SuccessResponse) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.ContactDealRoles.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + else if (actionHandler instanceof ZOHOCRMSDK.ContactDealRoles.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let contactId = 44024001306013n; +let dealId = 44024801177050n; +await RemoveContactRoleFromDeal.initialize(); +await RemoveContactRoleFromDeal.removeContactRoleFromDeal(contactId, dealId); \ No newline at end of file diff --git a/versions/3.0.0/samples/downloadAttachments/getDownloadAttachmentDetails.js b/versions/3.0.0/samples/downloadAttachments/getDownloadAttachmentDetails.js new file mode 100644 index 0000000..e845ff7 --- /dev/null +++ b/versions/3.0.0/samples/downloadAttachments/getDownloadAttachmentDetails.js @@ -0,0 +1,62 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +import path from "path"; +import fs from "fs"; +class GetDownloadAttachmentDetails +{ + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getDownloadAttachmentDetails(module, recordId, userId, messageId, destinationFolder) + { + let downlaodAttachmentOperations = new ZOHOCRMSDK.AttachmentsDownload.DownloadAttachmentsOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.AttachmentsDownload.GetDownloadAttachmentsDetailsParam.MESSAGE_ID, messageId); + await paramInstance.add(ZOHOCRMSDK.AttachmentsDownload.GetDownloadAttachmentsDetailsParam.USER_ID, userId); + let response = await downlaodAttachmentOperations.getDownloadAttachmentsDetails(recordId, module, paramInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + if (response.getStatusCode() == 204) { + console.log("No Content"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.AttachmentsDownload.FileBodyWrapper) { + let streamWrapper = responseObject.getFile(); + let fileName = path.join(destinationFolder, streamWrapper.getName()); + let readStream = streamWrapper.getStream(); + fs.writeFileSync(fileName, readStream); + } + else if (responseObject instanceof ZOHOCRMSDK.AttachmentsDownload.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let recordId = 44024800774074n; +let moduleId = "leads"; +let userId = 44024800254001n; +let messageId = "c6085fae06d80ffefab46bccc9442ce15a2ba26e4b0eed3737b4"; +let destinationFolder = "/nodejs-sdk-sample/file"; +await GetDownloadAttachmentDetails.initialize(); +await GetDownloadAttachmentDetails.getDownloadAttachmentDetails(moduleId, recordId, userId, messageId, destinationFolder); \ No newline at end of file diff --git a/versions/3.0.0/samples/downloadInlineImages/getDownloadInlineImages.js b/versions/3.0.0/samples/downloadInlineImages/getDownloadInlineImages.js new file mode 100644 index 0000000..d78e003 --- /dev/null +++ b/versions/3.0.0/samples/downloadInlineImages/getDownloadInlineImages.js @@ -0,0 +1,66 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +import path from "path"; +import fs from "fs"; +class GetDownloadInlineImages +{ + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getDownloadInlineImages(module, recordId, userId, messageId, id, destinationFolder) + { + let downloadInlineImagesOperations = new ZOHOCRMSDK.DownloadImagesInline.DownloadInlineImagesOperations(); + let paraminstance = new ZOHOCRMSDK.ParameterMap(); + await paraminstance.add(ZOHOCRMSDK.DownloadImagesInline.GetDownloadInlineImagesParam.ID, id); + await paraminstance.add(ZOHOCRMSDK.DownloadImagesInline.GetDownloadInlineImagesParam.MESSAGE_ID, messageId); + await paraminstance.add(ZOHOCRMSDK.DownloadImagesInline.GetDownloadInlineImagesParam.USER_ID, userId); + let response = await downloadInlineImagesOperations.getDownloadInlineImages(recordId, module, paraminstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + if (response.getStatusCode() == 204) { + console.log("No Content"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.DownloadImagesInline.FileBodyWrapper) { + let streamWrapper = responseObject.getFile(); + let fileName = path.join(destinationFolder, streamWrapper.getName()); + let readStream = streamWrapper.getStream(); + fs.writeFileSync(fileName, readStream); + } + else if (responseObject instanceof ZOHOCRMSDK.DownloadImagesInline.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let recordId = 400343234234n; +let module = "leads"; +let userId = 400453943545345n; +let messageId = "c6085fae06cbd7b75001d80ffefab46ba69e719ae66"; +let destinationFolder = "Users/docs/file"; +let id = "179f60b8703bc6f6c60c12501b04e68912a42ebaa4a549e0535000940953e2b8e9506e1119667564d7d1017304deeb964d78a3321"; +await GetDownloadInlineImages.initialize(); +await GetDownloadInlineImages.getDownloadInlineImages(module, recordId, userId, messageId, id, destinationFolder); + + diff --git a/versions/3.0.0/samples/emailRelatedRecords/getRelatedEmail.js b/versions/3.0.0/samples/emailRelatedRecords/getRelatedEmail.js new file mode 100644 index 0000000..616b215 --- /dev/null +++ b/versions/3.0.0/samples/emailRelatedRecords/getRelatedEmail.js @@ -0,0 +1,154 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetRelatedEmail +{ + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getRelatedEmail(moduleAPIName, id, messageId) + { + let emailRelatedOperations = new ZOHOCRMSDK.EmailRecordsRelated.EmailRelatedRecordsOperations(id, moduleAPIName); + let response = await emailRelatedOperations.getEmailsRelatedRecord(messageId); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + if (response.getStatusCode() == 204) { + console.log("No Content"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.EmailRecordsRelated.ResponseWrapper) + { + let responseWrapper = responseHandler; + let emailTemplates = responseWrapper.getEmails(); + if (emailTemplates != null) + { + emailTemplates.forEach(emailTemplate => { + if (emailTemplate instanceof ZOHOCRMSDK.EmailRecordsRelated.Email) + { + let userDetails = emailTemplate.getCc(); + if (userDetails != null) + { + userDetails.forEach(userDetail => { + console.log("GetRelatedEmail user Email: " + userDetail.getEmail() ); + console.log("GetRelatedEmail User Name: " + userDetail.getUserName() ); + }) + } + console.log("getRelatedEmail Summary : " + emailTemplate.getSummary() ); + let owner = emailTemplate.getOwner(); + if (owner != null) + { + console.log("GetRelatedEmail User Id : " + owner.getId() ); + console.log("GetRelatedEmail User Name : " + owner.getName() ); + } + console.log ("GetRelatedEmail Read: " + emailTemplate.getRead() ); + console.log ("GetRelatedEmail Sent: " + emailTemplate.getSent() ); + console.log ("GetRelatedEmail Subject: " + emailTemplate.getSubject() ); + console.log ("GetRelatedEmail Intent: " + emailTemplate.getIntent() ); + console.log ("GetRelatedEmail Content: " + emailTemplate.getContent() ); + console.log ("GetRelatedEmail SentimentInfo: " + emailTemplate.getSentimentInfo() +"\n"); + console.log ("GetRelatedEmail MessageId: " + emailTemplate.getMessageId() ); + console.log ("GetRelatedEmail MessageId: " + emailTemplate.getSource() ); + let linkedRecord = emailTemplate.getLinkedRecord(); + if (linkedRecord != null){ + console.log("GetRelatedEmail LinkedRecord id :" + linkedRecord.getId() ); + let module = linkedRecord.getModule(); + if (module != null) + { + console.log("GetRelatedEmail LinkedRecord Module APIName : " + module.getAPIName() ); + console.log("GetRelatedEmail LinkedRecord Module Id: " + module.getId() ); + } + } + let attechments = emailTemplate.getAttachments(); + if (attechments != null) + { + attechments.forEach(attacment => { + console.log("EmailRelatedRecords Attachment size : " + attacment.getSize() ); + console.log("EmailRelatedRecords Attachment Name : " + attacment.getName() ); + console.log("EmailRelatedRecords Attachment Id : " + attacment.getId() ); + }); + } + console.log("GetRelatedEmail Emotion : " + emailTemplate.getEmotion() ); + let from = emailTemplate.getFrom(); + if (from != null) + { + console.log("GetRelatedEmail From User Email : " + from.getEmail() ); + console.log("GetRelatedEmail From User Name : " + from.getUserName() ); + } + let toUserDetails = emailTemplate.getTo(); + if (toUserDetails != null) + { + toUserDetails.forEach(userDetail => { + console.log("GetRelatedEmail User Email : " + userDetail.getEmail() ); + console.log("GetRelatedEmail User Name : " + userDetail.getUserName() ); + }); + } + console.log("GetRelatedEmail Time: "); + console.log(emailTemplate.getTime()); + let status = emailTemplate.getStatus(); + if (status != null) { + status.forEach(status1 => { + if (status1 instanceof ZOHOCRMSDK.EmailRecordsRelated.Status) { + console.log("GetRelatedEmail Status Type : " + status1.getType() ); + console.log("GetRelatedEmail Status BouncedTime : " + status1.getBouncedTime()); + console.log("GetRelatedEmail Status BouncedReason : " + status1.getBouncedReason() ); + } + }); + } + } + }); + } + let info = responseWrapper.getInfo(); + if (info != null) + { + if (info.getCount() != null) + { + console.log("Record Info Count: " + info.getCount() ); + } + if (info.getNextIndex() != null) + { + console.log("Record Info NextIndex: " + info.getNextIndex() ); + } + if (info.getPrevIndex() != null) + { + console.log("Record Info PrevIndex: " + info.getPrevIndex() ); + } + if (info.getPerPage() != null) + { + console.log("Record Info PerPage: " + info.getPerPage() ); + } + if (info.getMoreRecords() != null) + { + console.log("Record Info MoreRecords: " + info.getMoreRecords() ); + } + } + } + else if (responseHandler instanceof ZOHOCRMSDK.EmailRecordsRelated.APIException) + { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage()); + } + } + } +} +let moduleAPIName = "leads"; +let id = 440248000774074n; +let messageId = "c6085fae06cbd7b75001db46b0457da52959ba504be6680f5ee9c9b70"; +await GetRelatedEmail.initialize(); +await GetRelatedEmail.getRelatedEmail(moduleAPIName, id, messageId); \ No newline at end of file diff --git a/versions/3.0.0/samples/emailRelatedRecords/getRelatedEmails.js b/versions/3.0.0/samples/emailRelatedRecords/getRelatedEmails.js new file mode 100644 index 0000000..0cb3765 --- /dev/null +++ b/versions/3.0.0/samples/emailRelatedRecords/getRelatedEmails.js @@ -0,0 +1,145 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetRelatedEmails +{ + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getRelatedEmails(moduleAPIName, id) + { + let emailRelatedOperations = new ZOHOCRMSDK.EmailRecordsRelated.EmailRelatedRecordsOperations(id, moduleAPIName); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + let response = await emailRelatedOperations.getEmailsRelatedRecords(paramInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + if (response.getStatusCode() == 204 || response.getStatusCode() == 304) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.EmailRecordsRelated.ResponseWrapper) + { + let responseWrapper = responseHandler; + let emailTemplates = responseWrapper.getEmails(); + if (emailTemplates != null) + { + emailTemplates.forEach(emailTemplate => { + if (emailTemplate instanceof ZOHOCRMSDK.EmailRecordsRelated.Email) + { + let userDetails = emailTemplate.getCc(); + if (userDetails != null) + { + userDetails.forEach(userDetail => { + console.log("GetRelatedEmail user Email: " + userDetail.getEmail() ); + console.log("GetRelatedEmail User Name: " + userDetail.getUserName() ); + }) + } + console.log("getRelatedEmail Summary : " + emailTemplate.getSummary() ); + let owner = emailTemplate.getOwner(); + if (owner != null) + { + console.log("GetRelatedEmail User Id : " + owner.getId() ); + console.log("GetRelatedEmail User Name : " + owner.getName() ); + } + console.log ("GetRelatedEmail Read: " + emailTemplate.getRead() ); + console.log ("GetRelatedEmail Sent: " + emailTemplate.getSent() ); + console.log ("GetRelatedEmail Subject: " + emailTemplate.getSubject() ); + console.log ("GetRelatedEmail Intent: " + emailTemplate.getIntent() ); + console.log ("GetRelatedEmail Content: " + emailTemplate.getContent() ); + console.log ("GetRelatedEmail SentimentInfo: " + emailTemplate.getSentimentInfo() +"\n"); + console.log ("GetRelatedEmail MessageId: " + emailTemplate.getMessageId() ); + console.log ("GetRelatedEmail MessageId: " + emailTemplate.getSource() ); + let linkedRecord = emailTemplate.getLinkedRecord(); + if (linkedRecord != null){ + console.log("GetRelatedEmail LinkedRecord id :" + linkedRecord.getId() ); + let module = linkedRecord.getModule(); + if (module != null) + { + console.log("GetRelatedEmail LinkedRecord Module APIName : " + module.getAPIName() ); + console.log("GetRelatedEmail LinkedRecord Module Id: " + module.getId() ); + } + } + console.log("GetRelatedEmail Emotion : " + emailTemplate.getEmotion() ); + let from = emailTemplate.getFrom(); + if (from != null) + { + console.log("GetRelatedEmail From User Email : " + from.getEmail() ); + console.log("GetRelatedEmail From User Name : " + from.getUserName() ); + } + let toUserDetails = emailTemplate.getTo(); + if (toUserDetails != null) + { + toUserDetails.forEach(userDetail => { + console.log("GetRelatedEmail User Email : " + userDetail.getEmail() ); + console.log("GetRelatedEmail User Name : " + userDetail.getUserName() ); + }); + } + console.log("GetRelatedEmail Time: "); + console.log(emailTemplate.getTime().toString() ); + let status = emailTemplate.getStatus(); + if (status != null) { + status.forEach(status1 => { + if (status1 instanceof ZOHOCRMSDK.EmailRecordsRelated.Status) { + console.log("GetRelatedEmail Status Type : " + status1.getType() ); + console.log("GetRelatedEmail Status BouncedTime : " + status1.getBouncedTime() ); + console.log("GetRelatedEmail Status BouncedReason : " + status1.getBouncedReason() ); + } + }); + } + } + }); + } + let info = responseWrapper.getInfo(); + if (info != null) + { + if (info.getCount() != null) + { + console.log("Record Info Count: " + info.getCount() ); + } + if (info.getNextIndex() != null) + { + console.log("Record Info NextIndex: " + info.getNextIndex() ); + } + if (info.getPrevIndex() != null) + { + console.log("Record Info PrevIndex: " + info.getPrevIndex() ); + } + if (info.getPerPage() != null) + { + console.log("Record Info PerPage: " + info.getPerPage() ); + } + if (info.getMoreRecords() != null) + { + console.log("Record Info MoreRecords: " + info.getMoreRecords() ); + } + } + } + else if (responseHandler instanceof ZOHOCRMSDK.EmailRecordsRelated.APIException) + { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage()); + } + } + } +} +let moduleAPIName = "leads"; +let id = 4402400774074n; +await GetRelatedEmails.initialize(); +await GetRelatedEmails.getRelatedEmails(moduleAPIName, id); \ No newline at end of file diff --git a/versions/3.0.0/samples/emailSharing/getEmailSharingDetails.js b/versions/3.0.0/samples/emailSharing/getEmailSharingDetails.js new file mode 100644 index 0000000..6798489 --- /dev/null +++ b/versions/3.0.0/samples/emailSharing/getEmailSharingDetails.js @@ -0,0 +1,77 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetEmailSharingDetails +{ + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getEmailSharingDetails(recordId, module) + { + let emailSharingOperations = new ZOHOCRMSDK.EmailSharing.EmailSharingOperations(recordId, module); + let response = await emailSharingOperations.getEmailSharingDetails(); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.EmailSharing.ResponseWrapper) + { + let responseWrapper = responseHandler; + let emailSharingDetails = responseWrapper.getEmailssharingdetails(); + if (emailSharingDetails != null) + { + emailSharingDetails.forEach(getEmailSharing => { + console.log("Email Sharing_Details: " + "\n"); + let shareFromUsers = getEmailSharing.getShareFromUsers(); + if (shareFromUsers != null) + { + console.log("ShareFromUSers : \n"); + shareFromUsers.forEach(shareFromUSer => { + console.log("id: " + shareFromUSer.getId() + "\n"); + console.log("name : " + shareFromUSer.getName() + "\n"); + console.log("type : " + shareFromUSer.getType() + "\n"); + }); + } + let availableTypes = getEmailSharing.getAvailableTypes(); + if (availableTypes != null) + { + console.log("AvailableTypes: " + "\n"); + availableTypes.forEach(availableType => { + console.log(availableType + "\n"); + }); + } + }) + } + } + else if (responseHandler instanceof ZOHOCRMSDK.EmailSharing.APIException) + { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage()); + } + } + } +} +let recordId = 440248000774074n; +let module = "leads"; +await GetEmailSharingDetails.initialize(); +await GetEmailSharingDetails.getEmailSharingDetails(recordId, module); \ No newline at end of file diff --git a/versions/3.0.0/samples/email_templates/getEmailTemplateById.js b/versions/3.0.0/samples/email_templates/getEmailTemplateById.js new file mode 100644 index 0000000..5ef4ce8 --- /dev/null +++ b/versions/3.0.0/samples/email_templates/getEmailTemplateById.js @@ -0,0 +1,93 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetEmailTemplateById { + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + + static async getEmailTemplateById(Id) { + let emailTemplatesOperations = new ZOHOCRMSDK.EmailTemplates.EmailTemplatesOperations(); + let response = await emailTemplatesOperations.getEmailTemplate(Id); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.EmailTemplates.ResponseWrapper) { + let responseWrapper = responseHandler; + let emailTemplates = responseWrapper.getEmailTemplates(); + emailTemplates.forEach(emailTemplate => { + console.log("EmailTemplate CreatedTime: " + emailTemplate.getCreatedTime()); + let attachments = emailTemplate.getAttachments(); + if (attachments != null) { + attachments.forEach(attachment => { + console.log("Attachment Size: " + attachment.getSize()); + console.log("Attachment FileId: " + attachment.getFileId()); + console.log("Attachment FileName: " + attachment.getFileName()); + console.log("Attachment ID: " + attachment.getId()); + }); + } + console.log("EmailTemplate Subject: " + emailTemplate.getSubject()); + let module = emailTemplate.getModule(); + if (module != null) { + console.log("EmailTemplate Module Name : " + module.getAPIName()); + console.log("EmailTemplate Module Id : " + module.getId()); + } + console.log("EmailTemplate Type: " + emailTemplate.getType()); + let createdBy = emailTemplate.getCreatedBy(); + if (createdBy != null) { + console.log("EmailTemplate Created By User-ID: " + createdBy.getId()); + console.log("EmailTemplate Created By User-Name: " + createdBy.getName()); + console.log("EmailTemplate Created By User-Email: " + createdBy.getEmail()); + } + console.log("EmailTemplate ModifiedTime: " + emailTemplate.getModifiedTime()); + let folder = emailTemplate.getFolder(); + if (folder != null) { + console.log("EmailTemplate Folder Id: " + folder.getId()); + console.log("EmailTemplate Folder Name: " + folder.getName()); + } + console.log("EmailTemplate LastUsageTime: " + emailTemplate.getLastUsageTime()); + console.log("EmailTemplate Associated: " + emailTemplate.getAssociated()); + console.log("EmailTemplate Name: " + emailTemplate.getName()); + console.log("EmailTemplate ConsentLinked: " + emailTemplate.getConsentLinked()); + let modifiedBy = emailTemplate.getModifiedBy(); + if (modifiedBy != null) { + console.log("EmailTemplate Modified By User-ID: " + modifiedBy.getId()); + console.log("EmailTemplate Modified By user-Name: " + modifiedBy.getName()); + console.log("EmailTemplate Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("EmailTemplate ID: " + emailTemplate.getId()); + console.log("EmailTemplate Content: " + emailTemplate.getContent()); + console.log("EmailTemplate Description: " + emailTemplate.getDescription()); + console.log("EmailTemplate EditorMode: " + emailTemplate.getEditorMode()); + console.log("EmailTemplate Favorite: " + emailTemplate.getFavorite()); + console.log("EmailTemplate Subject: " + emailTemplate.getSubject()); + }); + } else if (responseHandler instanceof ZOHOCRMSDK.EmailTemplates.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage()); + } + } + } +} +await GetEmailTemplateById.initialize(); +let id = 4402480627040n; +await GetEmailTemplateById.getEmailTemplateById(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/email_templates/getEmailTemplates.js b/versions/3.0.0/samples/email_templates/getEmailTemplates.js new file mode 100644 index 0000000..6f455d1 --- /dev/null +++ b/versions/3.0.0/samples/email_templates/getEmailTemplates.js @@ -0,0 +1,101 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetEmailTemplates { + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + + static async getEmailTemplates(moduleAPIName) { + let emailTemplatesOperations = new ZOHOCRMSDK.EmailTemplates.EmailTemplatesOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.EmailTemplates.GetEmailTemplatesParam.MODULE, moduleAPIName); + //Call getEmailTemplates method that takes ParameterMap instance as parameter + let response = await emailTemplatesOperations.getEmailTemplates(paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.EmailTemplates.ResponseWrapper) { + let responseWrapper = responseHandler; + let emailTemplates = responseWrapper.getEmailTemplates(); + emailTemplates.forEach(emailTemplate => { + console.log("EmailTemplate CreatedTime: " + emailTemplate.getCreatedTime()); + let attachments = emailTemplate.getAttachments(); + if (attachments != null) { + attachments.forEach(attachment => { + console.log("Attachment Size: " + attachment.getSize()); + console.log("Attachment FileId: " + attachment.getFileId()); + console.log("Attachment FileName: " + attachment.getFileName()); + console.log("Attachment ID: " + attachment.getId()); + }); + } + console.log("EmailTemplate Subject: " + emailTemplate.getSubject()); + let module = emailTemplate.getModule(); + if (module != null) { + console.log("EmailTemplate Module Name : " + module.getAPIName()); + console.log("EmailTemplate Module Id : " + module.getId()); + } + console.log("EmailTemplate Type: " + emailTemplate.getType()); + let createdBy = emailTemplate.getCreatedBy(); + if (createdBy != null) { + console.log("EmailTemplate Created By User-ID: " + createdBy.getId()); + console.log("EmailTemplate Created By User-Name: " + createdBy.getName()); + console.log("EmailTemplate Created By User-Email: " + createdBy.getEmail()); + } + console.log("EmailTemplate ModifiedTime: " + emailTemplate.getModifiedTime()); + let folder = emailTemplate.getFolder(); + if (folder != null) { + console.log("EmailTemplate Folder Id: " + folder.getId()); + console.log("EmailTemplate Folder Name: " + folder.getName()); + } + console.log("EmailTemplate LastUsageTime: " + emailTemplate.getLastUsageTime()); + console.log("EmailTemplate Associated: " + emailTemplate.getAssociated()); + console.log("EmailTemplate Name: " + emailTemplate.getName()); + console.log("EmailTemplate ConsentLinked: " + emailTemplate.getConsentLinked()); + let modifiedBy = emailTemplate.getModifiedBy(); + if (modifiedBy != null) { + console.log("EmailTemplate Modified By User-ID: " + modifiedBy.getId()); + console.log("EmailTemplate Modified By User-Name: " + modifiedBy.getName()); + console.log("EmailTemplate Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("EmailTemplate ID: " + emailTemplate.getId()); + console.log("EmailTemplate Content: " + emailTemplate.getContent()); + console.log("EmailTemplate Description: " + emailTemplate.getDescription()); + console.log("EmailTemplate EditorMode: " + emailTemplate.getEditorMode()); + console.log("EmailTemplate Favorite: " + emailTemplate.getFavorite()); + console.log("EmailTemplate Subject: " + emailTemplate.getSubject()); + }); + let info = responseWrapper.getInfo(); + console.log("EmailTemplate Info PerPage : " + info.getPerPage()); + console.log("EmailTemplate Info Count : " + info.getCount()); + console.log("EmailTemplate Info Page : " + info.getPage()); + console.log("EmailTemplate Info MoreRecords : " + info.getMoreRecords()); + } else if (responseHandler instanceof ZOHOCRMSDK.EmailTemplates.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage()); + } + } + } +} +await GetEmailTemplates.initialize(); +let moduleAPIName = "leads"; +await GetEmailTemplates.getEmailTemplates(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/entiityscores/GetModule.js b/versions/3.0.0/samples/entiityscores/GetModule.js new file mode 100644 index 0000000..e89a2ed --- /dev/null +++ b/versions/3.0.0/samples/entiityscores/GetModule.js @@ -0,0 +1,102 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetModule +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getModule(recordId, module) + { + let entityScoresOperations = new ZOHOCRMSDK.EntityScores.EntityScoresOperations("Positive_Score"); + let response = await entityScoresOperations.getModule(recordId, module); + if(response != null) + { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) + { + if(responseObject instanceof ZOHOCRMSDK.EntityScores.ResponseWrapper) + { + let entityScores = responseObject.getData(); + if (entityScores != null) + { + entityScores.forEach(entityScore =>{ + console.log("EntityScore Id: " + entityScore.getId()); + console.log("EntityScore Score: " + entityScore.getScore()); + console.log("EntityScore PositiveScore: " + entityScore.getPositiveScore()); + console.log("EntityScore NegativeScore: " + entityScore.getNegativeScore()); + console.log("EntityScore touchPointNegativeScore: " + entityScore.getTouchPointNegativeScore()); + console.log("EntityScore touchPointPositiveScore: " + entityScore.getTouchPointPositiveScore()); + console.log("EntityScore ZiaVisions: " + entityScore.getZiaVisions()); + let scoringRule = entityScore.getScoringRule(); + if (scoringRule != null) + { + console.log("ScoringRule Id : " + scoringRule.getId()); + console.log("ScoringRule Name : " + scoringRule.getName()); + } + let fieldStates = entityScore.getFieldStates(); + if (fieldStates != null) + { + fieldStates.forEach(fieldState => { + console.log("fieldStates : " + fieldState); + }); + } + }); + let info = responseObject.getInfo(); + if (info != null) + { + if (info.getPerPage() != null) + { + console.log("Info PerPage: " + info.getPerPage().toString()); + } + if (info.getCount() != null) + { + console.log("Info Count: " + info.getCount().toString()); + } + if (info.getPage() != null) + { + console.log("Info Page: " + info.getPage()); + } + if (info.getMoreRecords() != null) + { + console.log("Info MoreRecords: " + info.getMoreRecords().toString()); + } + } + } + } + else if(responseObject instanceof ZOHOCRMSDK.EntityScores.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + let details = responseObject.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +let recordId = 44024800262315n; +let module = "Leads"; +await GetModule.initialize(); +await GetModule.getModule(recordId, module); \ No newline at end of file diff --git a/versions/3.0.0/samples/entiityscores/GetModules.js b/versions/3.0.0/samples/entiityscores/GetModules.js new file mode 100644 index 0000000..988a186 --- /dev/null +++ b/versions/3.0.0/samples/entiityscores/GetModules.js @@ -0,0 +1,103 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetModules +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getModules() + { + let entityScoresOperations = new ZOHOCRMSDK.EntityScores.EntityScoresOperations("Positive_Score"); + let response = await entityScoresOperations.getModules(); + + if(response != null) + { + console.log("Status Code: " + response.getStatusCode()); + + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + + if (responseObject != null) + { + if(responseObject instanceof ZOHOCRMSDK.EntityScores.ResponseWrapper) + { + let entityScores = responseObject.getData(); + if (entityScores != null) + { + entityScores.forEach(entityScore =>{ + console.log("EntityScore Id: " + entityScore.getId()); + console.log("EntityScore Score: " + entityScore.getScore()); + console.log("EntityScore PositiveScore: " + entityScore.getPositiveScore()); + console.log("EntityScore NegativeScore: " + entityScore.getNegativeScore()); + console.log("EntityScore touchPointNegativeScore: " + entityScore.getTouchPointNegativeScore()); + console.log("EntityScore touchPointPositiveScore: " + entityScore.getTouchPointPositiveScore()); + console.log("EntityScore ZiaVisions: " + entityScore.getZiaVisions()); + let scoringRule = entityScore.getScoringRule(); + if (scoringRule != null) + { + console.log("ScoringRule Id : " + scoringRule.getId()); + console.log("ScoringRule Name : " + scoringRule.getName()); + } + let fieldStates = entityScore.getFieldStates(); + if (fieldStates != null) + { + fieldStates.forEach(fieldState => { + console.log("fieldStates : " + fieldState); + }); + } + }); + let info = responseObject.getInfo(); + if (info != null) + { + if (info.getPerPage() != null) + { + console.log("Info PerPage: " + info.getPerPage().toString()); + } + if (info.getCount() != null) + { + console.log("Info Count: " + info.getCount().toString()); + } + if (info.getPage() != null) + { + console.log("Info Page: " + info.getPage()); + } + if (info.getMoreRecords() != null) + { + console.log("Info MoreRecords: " + info.getMoreRecords().toString()); + } + } + } + } + else if(responseObject instanceof ZOHOCRMSDK.EntityScores.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + let details = responseObject.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetModules.initialize(); +await GetModules.getModules(); \ No newline at end of file diff --git a/versions/3.0.0/samples/field_attachments/field_attachment.js b/versions/3.0.0/samples/field_attachments/field_attachment.js new file mode 100644 index 0000000..9fb46b4 --- /dev/null +++ b/versions/3.0.0/samples/field_attachments/field_attachment.js @@ -0,0 +1,59 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +const fs = require("fs"); +const path = require("path"); +class FieldAttachment { + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getFieldAttachments(moduleAPIName, recordId, fieldsAttachmentId = null, destinationFolder = null) { + let fieldAttachmentsOperations = new ZOHOCRMSDK.AttachmentsField.FieldAttachmentsOperations(moduleAPIName, recordId, fieldsAttachmentId); + let response = await fieldAttachmentsOperations.getFieldAttachments(); + if (response != null) { + console.log("Status code " + response.getStatusCode()); + if (response.getStatusCode() == 204) { + console.log("No Content\n"); + return; + } + //Get object from response + let responseHandler = response.getObject(); + //Check if expected FileBodyWrapper instance is received. + if (responseHandler instanceof ZOHOCRMSDK.AttachmentsField.FileBodyWrapper) { + //Get StreamWrapper instance from the returned FileBodyWrapper instance + let streamWrapper = responseHandler.getFile(); + //Construct the file name by joining the destinationFolder and the name from StreamWrapper instance + let fileName = path.join(destinationFolder, streamWrapper.getName()); + //Get the stream from StreamWrapper instance + let readStream = streamWrapper.getStream(); + //Write the stream to the destination file. + fs.writeFileSync(fileName, readStream); + } + else if (responseHandler instanceof ZOHOCRMSDK.AttachmentsField.APIException) { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue()); + console.log("Code: " + exception.getCode().getValue()); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + exception.getMessage()); + } + } + } +} +await FieldAttachment.initialize(); +let moduleAPIName = "leads"; +let recordId = 30021n; +let fieldsAttachmentId = 400021n; +let destinationFolder = "users/documents/file"; +await FieldAttachment.getFieldAttachments(moduleAPIName,recordId,fieldsAttachmentId,destinationFolder); \ No newline at end of file diff --git a/versions/3.0.0/samples/fields/getField.js b/versions/3.0.0/samples/fields/getField.js new file mode 100644 index 0000000..fa9fb4f --- /dev/null +++ b/versions/3.0.0/samples/fields/getField.js @@ -0,0 +1,321 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetField{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Field

+ * This method is used to get metadata about a single field of a module with fieldID and print the response. + * @param {String} moduleAPIName The API Name of the field's module + * @param {BigInt} fieldId The ID of the field to be obtained + */ + static async getField(moduleAPIName, fieldId) { + //example + // let moduleAPIName = "module_api_name" + // let fieldId = 93043n + let fieldsOperations = new ZOHOCRMSDK.Fields.FieldsOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Fields.GetFieldParam.MODULE, moduleAPIName); + //Call getField method which takes fieldId as parameter + let response = await fieldsOperations.getField(fieldId, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Fields.BodyWrapper) { + let fields = responseObject.getFields(); + fields.forEach(field => { + console.log("Field SystemMandatory: " + field.getSystemMandatory().toString()); + console.log("Field Webhook: " + field.getWebhook().toString()); + console.log("Field JsonType: " + field.getJsonType()); + let privateInfo = field.getPrivate(); + if (privateInfo != null) { + console.log("Private Details\n"); + console.log("Field Private Type: " + privateInfo.getType()); + console.log("Field Private Export: " + privateInfo.getExport()); + console.log("Field Private Restricted: " + privateInfo.getRestricted()); + } + let crypt = field.getCrypt(); + if (crypt != null) { + console.log("Field Crypt Mode: " + crypt.getMode()); + console.log("Field Crypt Column: " + crypt.getColumn()); + console.log("Field Crypt Table: " + crypt.getTable()); + console.log("Field Crypt Status: " + crypt.getStatus().toString()); + let encFldIds = crypt.getEncfldids(); + if (encFldIds != null) { + console.log("EncFldIds : "); + encFldIds.forEach(encFldId => { + console.log(encFldId); + }); + } + console.log("Field Crypt Notify: " + crypt.getNotify()); + } + console.log("Field FieldLabel: " + field.getFieldLabel()); + let toolTip = field.getTooltip(); + if (toolTip != null) { + console.log("Field ToolTip Name: " + toolTip.getName()); + console.log("Field ToolTip Value: " + toolTip.getValue()); + } + console.log("Field CreatedSource: " + field.getCreatedSource()); + console.log("Field Type: " + field.getType()); + console.log("Field FieldReadOnly: " + field.getFieldReadOnly().toString()); + console.log("Field DisplayLabel: " + field.getDisplayLabel()); + console.log("Field DisplayType: " + field.getDisplayType()); + console.log("Field UIType: " + field.getUiType()); + console.log("Field ReadOnly: " + field.getReadOnly().toString()); + let associationDetails = field.getAssociationDetails(); + if (associationDetails != null) { + let lookupField = associationDetails.getLookupField(); + if (lookupField != null) { + console.log("Field AssociationDetails LookupField ID: " + lookupField.getId()); + console.log("Field AssociationDetails LookupField Name: " + lookupField.getName()) + } + let relatedField = associationDetails.getRelatedField(); + if (relatedField != null) { + console.log("Field AssociationDetails RelatedField ID: " + relatedField.getId()); + console.log("Field AssociationDetails RelatedField Name: " + relatedField.getName()); + } + } + if (field.getQuickSequenceNumber() != null) { + console.log("Field QuickSequenceNumber: " + field.getQuickSequenceNumber().toString()); + } + if (field.getBusinesscardSupported() != null) { + console.log("Field BusinesscardSupported: " + field.getBusinesscardSupported().toString()); + } + let multiModuleLookup = field.getMultiModuleLookup(); + if (multiModuleLookup != null) { + console.log("Field MultiModuleLookup Name: " + multiModuleLookup.getAPIName()); + console.log("Field MultiModuleLookup DisplayLabel: " + multiModuleLookup.getDisplayLabel()); + let module1 = multiModuleLookup.getModules(); + if (module1 != null) { + console.log("Field MultiModuleLookup Module APIName: " + module1.getAPIName()); + console.log("Field MultiModuleLookup Module Id: " + module1.getId()); + } + } + let currency = field.getCurrency(); + if (currency != null) { + console.log("Field Currency RoundingOption: " + currency.getRoundingOption()); + if (currency.getPrecision() != null) { + console.log("Field Currency Precision: " + currency.getPrecision().toString()); + } + } + console.log("Field ID: " + field.getId()); + if (field.getCustomField() != null) { + console.log("Field CustomField: " + field.getCustomField().toString()); + } + let lookup = field.getLookup(); + if (lookup != null) { + console.log("Field ModuleLookup DisplayLabel: " + lookup.getDisplayLabel()); + console.log("Field ModuleLookup RevalidateFilterDuringEdit: " + lookup.getRevalidateFilterDuringEdit()); + console.log("Field ModuleLookup APIName: " + lookup.getAPIName()); + let module = lookup.getModule(); + if (module != null) + { + console.log("Field ModuleLookup Module APIName: " + module.getAPIName()); + console.log("Field ModuleLookup Module Id: " + module.getId()); + } + let querydetails = lookup.getQueryDetails(); + if (querydetails != null) + { + console.log("Field ModuleLookup QueryDetails Query Id: " + querydetails.getQueryId()); + } + if (lookup.getId() != null) + { + console.log("Field ModuleLookup ID: " + lookup.getId().toString()); + } + } + console.log("Field Filterable: " + field.getFilterable()); + if (field.getVisible() != null) { + console.log("Field Visible: " + field.getVisible().toString()); + } + let profiles = field.getProfiles(); + if (profiles != null) { + profiles.forEach(profile => { + console.log("Field Profile PermissionType: " + profile.getPermissionType()); + console.log("Field Profile Name: " + profile.getName()); + console.log("Field Profile Id: " + profile.getId()); + }); + } + if (field.getLength() != null) { + console.log("Field Length: " + field.getLength().toString()); + } + let viewType = field.getViewType(); + if (viewType != null) { + console.log("Field ViewType View: " + viewType.getView().toString()); + console.log("Field ViewType Edit: " + viewType.getEdit().toString()); + console.log("Field ViewType Create: " + viewType.getCreate().toString()); + console.log("Field ViewType QuickCreate: " + viewType.getQuickCreate().toString()); + } + if(field.getDisplayField() != null) { + //check if field is DisplayField + console.log("Field DisplayField " + field.getDisplayField()); + } + console.log("Field PickListValuesSortedLexically: " + field.getPickListValuesSortedLexically()); + console.log("Field Sortable: " + field.getSortable()); + let subform = field.getAssociatedModule(); + if (subform != null) { + console.log("Field Subform Module: " + subform.getModule()); + if (subform.getId() != null) { + console.log("Field Subform ID: " + subform.getId().toString()); + } + } + if(field.getSequenceNumber() != null) { + //get UI type of field + console.log("Field sequence number " + field.getSequenceNumber()); + } + let external = field.getExternal(); + if (external != null) { + console.log("Field External Show: " + external.getShow()); + console.log("Field External Type: " + external.getType()); + console.log("Field External AllowMultipleConfig: " + external.getAllowMultipleConfig()); + } + console.log("Field APIName: " + field.getAPIName().toString()); + let unique = field.getUnique(); + if (unique != null) { + console.log("Field Unique Casesensitive : " + unique.getCasesensitive()); + } + if (field.getHistoryTracking() != null) { + let historytracking = field.getHistoryTracking(); + let module = historytracking.getModule(); + if (module != null) { + let moduleLayout = module.getLayout(); + if (moduleLayout != null) { + console.log("Module Layout ID" + moduleLayout.getId()); + } + console.log("Module DisplayLabel" + module.getDisplayLabel()); + console.log("Module APIName" + module.getAPIName()); + console.log("Module ID" + module.getId()); + console.log("Module Module" + module.getModule()); + console.log("Module ModuleName"+module.getModuleName()); + } + let durationConfigured = historytracking.getDurationConfiguredField(); + if(durationConfigured != null) { + console.log("Historytracking duration configured field" + durationConfigured.getId()); + } + } + console.log("Field DataType: " + field.getDataType().toString()); + let formula = field.getFormula(); + if (formula != null) { + console.log("Field Formula ReturnType : " + formula.getReturnType()); + if (formula.getExpression() != null) { + console.log("Field Formula Expression : " + formula.getExpression().toString()); + } + } + if (field.getDecimalPlace() != null) { + console.log("Field DecimalPlace: " + field.getDecimalPlace().toString()); + } + console.log("Field MassUpdate: " + field.getMassUpdate()); + if (field.getBlueprintSupported() != null) { + console.log("Field BlueprintSupported: " + field.getBlueprintSupported().toString()); + } + let multiSelectLookup = field.getMultiselectlookup(); + if (multiSelectLookup != null) { + console.log("Field MultiSelectLookup DisplayLabel: " + multiSelectLookup.getDisplayLabel()); + console.log("Field MultiSelectLookup LinkingModule: " + multiSelectLookup.getLinkingModule()); + console.log("Field MultiSelectLookup LookupApiname: " + multiSelectLookup.getLookupApiname()); + console.log("Field MultiSelectLookup APIName: " + multiSelectLookup.getAPIName()); + console.log("Field MultiSelectLookup ConnectedlookupApiname: " + multiSelectLookup.getConnectedlookupApiname()); + console.log("Field MultiSelectLookup ID: " + multiSelectLookup.getId()); + console.log("Field MultiSelectLookup ConnectedModule: " + multiSelectLookup.getConnectedModule()); + } + let pickListValues = field.getPickListValues(); + if (pickListValues != null) { + pickListValues.forEach(async pickListValue => { + await this.printPickListValue(pickListValue); + }); + } + let autoNumber = field.getAutoNumber(); + if (autoNumber != null) { + console.log("Field AutoNumber Prefix: " + autoNumber.getPrefix()); + console.log("Field AutoNumber Suffix: " + autoNumber.getSuffix()); + if (autoNumber.getStartNumber() != null) { + console.log("Field AutoNumber StartNumber: " + autoNumber.getStartNumber().toString()); + } + } + if(field.getDefaultValue() != null) { + console.log("Field DefaultValue: " + field.getDefaultValue()); + } + if (field.getConvertMapping() != null) { + let convertMapping = field.getConvertMapping(); + console.log("Field ConvertMapping Account : " + convertMapping.getAccounts()); + console.log("Field ConvertMapping Contact : "+ convertMapping.getContacts()); + console.log("Field ConvertMapping Account : "+ convertMapping.getDeals()); + } + //get multi user lookup for field + if (field.getMultiuserlookup() != null) { + let multiuserlookup = field.getMultiuserlookup(); + //get displaylabel of multiuser lookup + console.log("Field MultiUserLookup DisplayLabel" + multiuserlookup.getDisplayLabel()); + //get linking module of multiuser lookup + console.log("Field MultiUserLookup LinkingModule" + multiuserlookup.getLinkingModule()); + //get lookup apiname of multiuser lookup + console.log("Field MultiUserLookup LookupApiname" + multiuserlookup.getLookupApiname()); + //get apiname of multiuser lookup + console.log("Field MultiUserLookup APIName" + multiuserlookup.getAPIName()); + //get id of multiuser lookup + console.log("Field MultiUserLookup ID" + multiuserlookup.getId()); + //get connected module of multiuser lookup + console.log("Field MultiUserLookup ConnectedModule" + multiuserlookup.getConnectedModule()); + //get connected lookup apiname of multiuser lookup + console.log("Field MultiUserLookup ConnectedlookupApiname" + multiuserlookup.getConnectedlookupApiname()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Fields.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } + static async printPickListValue(pickListValue) { + console.log("Field PickListValue DisplayValue: " + pickListValue.getDisplayValue()); + console.log(" Fields PickListValue Probability: " + pickListValue.getProbability()); + console.log(" Fields PickListValue ForecastCategory: " + pickListValue.getForecastCategory()); + if (pickListValue.getSequenceNumber() != null) { + console.log("Field PickListValue SequenceNumber: " + pickListValue.getSequenceNumber().toString()); + } + console.log("Field PickListValue ExpectedDataType: " + pickListValue.getExpectedDataType()); + console.log("Field PickListValue ActualValue: " + pickListValue.getActualValue()); + console.log("Field PickListValue SysRefName: " + pickListValue.getSysRefName()); + console.log("Field PickListValue Type: " + pickListValue.getType()); + console.log("Field PickListValue Id: " + pickListValue.getId()); + console.log(" Fields PickListValue ForecastType: " + pickListValue.getForecastType()); + if (pickListValue.getMaps() != null) { + pickListValue.getMaps().forEach(map => { + console.log("Field PickListValue Maps APIName: " + map.getAPIName()); + let pickListValues = map.getPickListValues(); + if (pickListValues != null) { + pickListValues.forEach(async pickListValue1 => { + await this.printPickListValue(pickListValue1); + }); + } + }); + } + } +} +await GetField.initialize(); +let moduleAPIName = "leads"; +let fieldId = 4402481244139n; +await GetField.getField(moduleAPIName,fieldId); diff --git a/versions/3.0.0/samples/fields/getFields.js b/versions/3.0.0/samples/fields/getFields.js new file mode 100644 index 0000000..8f275a3 --- /dev/null +++ b/versions/3.0.0/samples/fields/getFields.js @@ -0,0 +1,319 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetFields{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Fields

+ * This method is used to get metadata about all the fields of a module and print the response. + * @param {String} moduleAPIName The API Name of the module to get fields + */ + static async getFields(moduleAPIName) { + //example + //let moduleAPIName = "module_api_name"; + let fieldsOperations = new ZOHOCRMSDK.Fields.FieldsOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Fields.GetFieldsParam.TYPE, "unused"); + await paramInstance.add(ZOHOCRMSDK.Fields.GetFieldsParam.MODULE, moduleAPIName); + //Call getFields method that takes paramInstance as parameter + let response = await fieldsOperations.getFields(paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Fields.BodyWrapper) { + let fields = responseObject.getFields(); + fields.forEach(field => { + console.log("Field SystemMandatory: " + field.getSystemMandatory().toString()); + console.log("Field Webhook: " + field.getWebhook().toString()); + console.log("Field JsonType: " + field.getJsonType()); + let privateInfo = field.getPrivate(); + if (privateInfo != null) { + console.log("Private Details\n"); + console.log("Field Private Type: " + privateInfo.getType()); + console.log("Field Private Export: " + privateInfo.getExport()); + console.log("Field Private Restricted: " + privateInfo.getRestricted()); + } + let crypt = field.getCrypt(); + if (crypt != null) { + console.log("Field Crypt Mode: " + crypt.getMode()); + console.log("Field Crypt Column: " + crypt.getColumn()); + console.log("Field Crypt Table: " + crypt.getTable()); + console.log("Field Crypt Status: " + crypt.getStatus().toString()); + let encFldIds = crypt.getEncfldids(); + if (encFldIds != null) { + console.log("EncFldIds : "); + encFldIds.forEach(encFldId => { + console.log(encFldId); + }); + } + console.log("Field Crypt Notify: " + crypt.getNotify()); + } + console.log("Field FieldLabel: " + field.getFieldLabel()); + let toolTip = field.getTooltip(); + if (toolTip != null) { + console.log("Field ToolTip Name: " + toolTip.getName()); + console.log("Field ToolTip Value: " + toolTip.getValue()); + } + console.log("Field CreatedSource: " + field.getCreatedSource()); + console.log("Field Type: " + field.getType()); + console.log("Field FieldReadOnly: " + field.getFieldReadOnly().toString()); + console.log("Field DisplayLabel: " + field.getDisplayLabel()); + console.log("Field DisplayType: " + field.getDisplayType()); + console.log("Field UIType: " + field.getUiType()); + console.log("Field ReadOnly: " + field.getReadOnly().toString()); + let associationDetails = field.getAssociationDetails(); + if (associationDetails != null) { + let lookupField = associationDetails.getLookupField(); + if (lookupField != null) { + console.log("Field AssociationDetails LookupField ID: " + lookupField.getId()); + console.log("Field AssociationDetails LookupField Name: " + lookupField.getName()) + } + let relatedField = associationDetails.getRelatedField(); + if (relatedField != null) { + console.log("Field AssociationDetails RelatedField ID: " + relatedField.getId()); + console.log("Field AssociationDetails RelatedField Name: " + relatedField.getName()); + } + } + if (field.getQuickSequenceNumber() != null) { + console.log("Field QuickSequenceNumber: " + field.getQuickSequenceNumber().toString()); + } + if (field.getBusinesscardSupported() != null) { + console.log("Field BusinesscardSupported: " + field.getBusinesscardSupported().toString()); + } + let multiModuleLookup = field.getMultiModuleLookup(); + if (multiModuleLookup != null) { + console.log("Field MultiModuleLookup Name: " + multiModuleLookup.getAPIName()); + console.log("Field MultiModuleLookup DisplayLabel: " + multiModuleLookup.getDisplayLabel()); + let module1 = multiModuleLookup.getModules(); + if (module1 != null) { + console.log("Field MultiModuleLookup Module APIName: " + module1.getAPIName()); + console.log("Field MultiModuleLookup Module Id: " + module1.getId()); + } + } + let currency = field.getCurrency(); + if (currency != null) { + console.log("Field Currency RoundingOption: " + currency.getRoundingOption()); + if (currency.getPrecision() != null) { + console.log("Field Currency Precision: " + currency.getPrecision().toString()); + } + } + console.log("Field ID: " + field.getId()); + if (field.getCustomField() != null) { + console.log("Field CustomField: " + field.getCustomField().toString()); + } + let lookup = field.getLookup(); + if (lookup != null) { + console.log("Field ModuleLookup DisplayLabel: " + lookup.getDisplayLabel()); + console.log("Field ModuleLookup RevalidateFilterDuringEdit: " + lookup.getRevalidateFilterDuringEdit()); + console.log("Field ModuleLookup APIName: " + lookup.getAPIName()); + let module = lookup.getModule(); + if (module != null) + { + console.log("Field ModuleLookup Module APIName: " + module.getAPIName()); + console.log("Field ModuleLookup Module Id: " + module.getId()); + } + let querydetails = lookup.getQueryDetails(); + if (querydetails != null) + { + console.log("Field ModuleLookup QueryDetails Query Id: " + querydetails.getQueryId()); + } + if (lookup.getId() != null) + { + console.log("Field ModuleLookup ID: " + lookup.getId().toString()); + } + } + console.log("Field Filterable: " + field.getFilterable()); + if (field.getVisible() != null) { + console.log("Field Visible: " + field.getVisible().toString()); + } + let profiles = field.getProfiles(); + if (profiles != null) { + profiles.forEach(profile => { + console.log("Field Profile PermissionType: " + profile.getPermissionType()); + console.log("Field Profile Name: " + profile.getName()); + console.log("Field Profile Id: " + profile.getId()); + }); + } + if (field.getLength() != null) { + console.log("Field Length: " + field.getLength().toString()); + } + let viewType = field.getViewType(); + if (viewType != null) { + console.log("Field ViewType View: " + viewType.getView().toString()); + console.log("Field ViewType Edit: " + viewType.getEdit().toString()); + console.log("Field ViewType Create: " + viewType.getCreate().toString()); + console.log("Field ViewType QuickCreate: " + viewType.getQuickCreate().toString()); + } + if(field.getDisplayField() != null) { + //check if field is DisplayField + console.log("Field DisplayField " + field.getDisplayField()); + } + console.log("Field PickListValuesSortedLexically: " + field.getPickListValuesSortedLexically()); + console.log("Field Sortable: " + field.getSortable()); + let subform = field.getAssociatedModule(); + if (subform != null) { + console.log("Field Subform Module: " + subform.getModule()); + if (subform.getId() != null) { + console.log("Field Subform ID: " + subform.getId().toString()); + } + } + if(field.getSequenceNumber() != null) { + //get UI type of field + console.log("Field sequence number " + field.getSequenceNumber()); + } + let external = field.getExternal(); + if (external != null) { + console.log("Field External Show: " + external.getShow()); + console.log("Field External Type: " + external.getType()); + console.log("Field External AllowMultipleConfig: " + external.getAllowMultipleConfig()); + } + console.log("Field APIName: " + field.getAPIName().toString()); + let unique = field.getUnique(); + if (unique != null) { + console.log("Field Unique Casesensitive : " + unique.getCasesensitive()); + } + if (field.getHistoryTracking() != null) { + let historytracking = field.getHistoryTracking(); + let module = historytracking.getModule(); + if (module != null) { + let moduleLayout = module.getLayout(); + if (moduleLayout != null) { + console.log("Module Layout ID" + moduleLayout.getId()); + } + console.log("Module DisplayLabel" + module.getDisplayLabel()); + console.log("Module APIName" + module.getAPIName()); + console.log("Module ID" + module.getId()); + console.log("Module Module" + module.getModule()); + console.log("Module ModuleName"+module.getModuleName()); + } + let durationConfigured = historytracking.getDurationConfiguredField(); + if(durationConfigured != null) { + console.log("Historytracking duration configured field" + durationConfigured.getId()); + } + } + console.log("Field DataType: " + field.getDataType().toString()); + let formula = field.getFormula(); + if (formula != null) { + console.log("Field Formula ReturnType : " + formula.getReturnType()); + if (formula.getExpression() != null) { + console.log("Field Formula Expression : " + formula.getExpression().toString()); + } + } + if (field.getDecimalPlace() != null) { + console.log("Field DecimalPlace: " + field.getDecimalPlace().toString()); + } + console.log("Field MassUpdate: " + field.getMassUpdate()); + if (field.getBlueprintSupported() != null) { + console.log("Field BlueprintSupported: " + field.getBlueprintSupported().toString()); + } + let multiSelectLookup = field.getMultiselectlookup(); + if (multiSelectLookup != null) { + console.log("Field MultiSelectLookup DisplayLabel: " + multiSelectLookup.getDisplayLabel()); + console.log("Field MultiSelectLookup LinkingModule: " + multiSelectLookup.getLinkingModule()); + console.log("Field MultiSelectLookup LookupApiname: " + multiSelectLookup.getLookupApiname()); + console.log("Field MultiSelectLookup APIName: " + multiSelectLookup.getAPIName()); + console.log("Field MultiSelectLookup ConnectedlookupApiname: " + multiSelectLookup.getConnectedlookupApiname()); + console.log("Field MultiSelectLookup ID: " + multiSelectLookup.getId()); + console.log("Field MultiSelectLookup ConnectedModule: " + multiSelectLookup.getConnectedModule()); + } + let pickListValues = field.getPickListValues(); + if (pickListValues != null) { + pickListValues.forEach(async pickListValue => { + await this.printPickListValue(pickListValue); + }); + } + let autoNumber = field.getAutoNumber(); + if (autoNumber != null) { + console.log("Field AutoNumber Prefix: " + autoNumber.getPrefix()); + console.log("Field AutoNumber Suffix: " + autoNumber.getSuffix()); + if (autoNumber.getStartNumber() != null) { + console.log("Field AutoNumber StartNumber: " + autoNumber.getStartNumber().toString()); + } + } + if(field.getDefaultValue() != null) { + console.log("Field DefaultValue: " + field.getDefaultValue()); + } + if (field.getConvertMapping() != null) { + let convertMapping = field.getConvertMapping(); + console.log("Field ConvertMapping Account : " + convertMapping.getAccounts()); + console.log("Field ConvertMapping Contact : "+ convertMapping.getContacts()); + console.log("Field ConvertMapping Account : "+ convertMapping.getDeals()); + } + //get multi user lookup for field + if (field.getMultiuserlookup() != null) { + let multiuserlookup = field.getMultiuserlookup(); + //get displaylabel of multiuser lookup + console.log("Field MultiUserLookup DisplayLabel" + multiuserlookup.getDisplayLabel()); + //get linking module of multiuser lookup + console.log("Field MultiUserLookup LinkingModule" + multiuserlookup.getLinkingModule()); + //get lookup apiname of multiuser lookup + console.log("Field MultiUserLookup LookupApiname" + multiuserlookup.getLookupApiname()); + //get apiname of multiuser lookup + console.log("Field MultiUserLookup APIName" + multiuserlookup.getAPIName()); + //get id of multiuser lookup + console.log("Field MultiUserLookup ID" + multiuserlookup.getId()); + //get connected module of multiuser lookup + console.log("Field MultiUserLookup ConnectedModule" + multiuserlookup.getConnectedModule()); + //get connected lookup apiname of multiuser lookup + console.log("Field MultiUserLookup ConnectedlookupApiname" + multiuserlookup.getConnectedlookupApiname()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Fields.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } + static async printPickListValue(pickListValue) { + console.log("Field PickListValue DisplayValue: " + pickListValue.getDisplayValue()); + console.log(" Fields PickListValue Probability: " + pickListValue.getProbability()); + console.log(" Fields PickListValue ForecastCategory: " + pickListValue.getForecastCategory()); + if (pickListValue.getSequenceNumber() != null) { + console.log("Field PickListValue SequenceNumber: " + pickListValue.getSequenceNumber().toString()); + } + console.log("Field PickListValue ExpectedDataType: " + pickListValue.getExpectedDataType()); + console.log("Field PickListValue ActualValue: " + pickListValue.getActualValue()); + console.log("Field PickListValue SysRefName: " + pickListValue.getSysRefName()); + console.log("Field PickListValue Type: " + pickListValue.getType()); + console.log("Field PickListValue Id: " + pickListValue.getId()); + console.log(" Fields PickListValue ForecastType: " + pickListValue.getForecastType()); + if (pickListValue.getMaps() != null) { + pickListValue.getMaps().forEach(map => { + console.log("Field PickListValue Maps APIName: " + map.getAPIName()); + let pickListValues = map.getPickListValues(); + if (pickListValues != null) { + pickListValues.forEach(async pickListValue1 => { + await this.printPickListValue(pickListValue1); + }); + } + }); + } + } +} +await GetFields.initialize(); +let moduleAPIName = "leads"; +await GetFields.getFields(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/filedMapDependency/createMapDependency.js b/versions/3.0.0/samples/filedMapDependency/createMapDependency.js new file mode 100644 index 0000000..393d18d --- /dev/null +++ b/versions/3.0.0/samples/filedMapDependency/createMapDependency.js @@ -0,0 +1,106 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateMapDependency +{ + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createMapDependency(layoutId, module) + { + let fieldMapDependencyOperations = new ZOHOCRMSDK.DependencyFieldMap.FieldMapDependencyOperations(layoutId, module); + let bodyWrapper = new ZOHOCRMSDK.DependencyFieldMap.BodyWrapper(); + let mapDependencies = []; + let mapDependency = new ZOHOCRMSDK.DependencyFieldMap.MapDependency(); + let parent = new ZOHOCRMSDK.DependencyFieldMap.Parent(); + parent.setAPIName("Stage"); + parent.setId(4402480887n); + await mapDependency.setParent(parent); + let child = new ZOHOCRMSDK.DependencyFieldMap.Child(); + child.setAPIName("Lead_Source"); + child.setId(4402480085n); + await mapDependency.setChild(child); + let pickListValues = []; + let pickListValue = new ZOHOCRMSDK.DependencyFieldMap.PickListMapping(); + pickListValue.setDisplayValue("-None-"); + pickListValue.setId(4402480011340n); + pickListValue.setActualValue("-None-"); + let pickListMaps =[]; + let pickListMap = new ZOHOCRMSDK.DependencyFieldMap.PicklistMap(); + pickListMap.setId(44024011274n); + pickListMap.setActualValue("Cold Call"); + pickListMap.setDisplayValue("Cold Call"); + pickListMaps.push(pickListMap); + pickListMap = new ZOHOCRMSDK.DependencyFieldMap.PicklistMap(); + pickListMap.setId(40434223542343n); + pickListMap.setActualValue("-None-"); + pickListMap.setDisplayValue("-None-"); + pickListMaps.push(pickListMap); + pickListValue.setMaps(pickListMaps); + pickListValues.push(pickListValue); + mapDependency.setPickListValues(pickListValues); + mapDependencies.push(mapDependency); + bodyWrapper.setMapDependency(mapDependencies); + let response = await fieldMapDependencyOperations.createMapDependency(bodyWrapper); + if (response != null) { + console.log("Status code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.DependencyFieldMap.ActionWrapper) { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getMapDependency(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.DependencyFieldMap.SuccessResponse) { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.DependencyFieldMap.APIException) { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } else if (actionHandler instanceof ZOHOCRMSDK.DependencyFieldMap.APIException) { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let layoutId = 440248000173n; +let module = "Deals"; +await CreateMapDependency.initialize(); +await CreateMapDependency.createMapDependency(layoutId, module); \ No newline at end of file diff --git a/versions/3.0.0/samples/filedMapDependency/deleteMapDependency.js b/versions/3.0.0/samples/filedMapDependency/deleteMapDependency.js new file mode 100644 index 0000000..6d1d1f1 --- /dev/null +++ b/versions/3.0.0/samples/filedMapDependency/deleteMapDependency.js @@ -0,0 +1,77 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteMapDependency +{ + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async deleteMapDependency(layoutId, module, dependencyId) + { + let fieldMapDependencyOperations = new ZOHOCRMSDK.DependencyFieldMap.FieldMapDependencyOperations(layoutId, module) + { + let response = await fieldMapDependencyOperations.deleteMapDependency(dependencyId); + if (response != null) + { + console.log("Status code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.DependencyFieldMap.ActionWrapper) { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getMapDependency(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.DependencyFieldMap.SuccessResponse) { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.DependencyFieldMap.APIException) { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } else if (actionHandler instanceof ZOHOCRMSDK.DependencyFieldMap.APIException) { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } + } +} +let layoutId = 44024800167n; +let module = "leads"; +let dependencyId = 44024801379002n; +await DeleteMapDependency.initialize(); +await DeleteMapDependency.deleteMapDependency(layoutId, module, dependencyId); \ No newline at end of file diff --git a/versions/3.0.0/samples/filedMapDependency/getMapDependencies.js b/versions/3.0.0/samples/filedMapDependency/getMapDependencies.js new file mode 100644 index 0000000..4c6de4f --- /dev/null +++ b/versions/3.0.0/samples/filedMapDependency/getMapDependencies.js @@ -0,0 +1,110 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetMapDependencies +{ + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getMapDependencies(layoutId, module) + { + let fieldMapDependencyOperations = new ZOHOCRMSDK.DependencyFieldMap.FieldMapDependencyOperations(layoutId, module); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + let response = await fieldMapDependencyOperations.getMapDependencies(paramInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.DependencyFieldMap.BodyWrapper) + { + let responseWrapper = responseHandler; + let mapDependencies = responseWrapper.getMapDependency(); + if (mapDependencies != null) { + mapDependencies.forEach(mapDependency => { + let parent = mapDependency.getParent(); + if (parent != null) { + console.log("MapDependency Parent ID : " + parent.getId() + "\n"); + console.log("MapDependency Parent APIName : " + parent.getAPIName() + "\n"); + } + let child = mapDependency.getChild(); + if (child != null) { + console.log("MapDependency child ID : " + child.getId() + "\n"); + console.log("MapDependency child APIName : " + child.getAPIName() + "\n"); + } + let pickListValues = mapDependency.getPickListValues(); + if (pickListValues != null) { + pickListValues.forEach(pickListValue => { + console.log("MapDependency PickListvalue ID: " + pickListValue.getId() + "\n"); + console.log("MapDependency PickListvalue ActualValue: " + pickListValue.getActualValue() + "\n"); + console.log("MapDependency PickListvalue DisplayValue: " + pickListValue.getDisplayValue() + "\n"); + let pickListMaps = pickListValue.getMaps(); + if (pickListMaps != null) { + pickListMaps.forEach(pickListMap => { + console.log("MapDependency PickListValue Map ID : " + pickListMap.getId() + "\n"); + console.log("MapDependency PickListValue Map ActualValue : " + pickListMap.getActualValue() + "\n"); + console.log("MapDependency PickListValue Map DisplayValue : " + pickListMap.getDisplayValue() + "\n"); + }); + } + }); + } + console.log("MapDependency Internal : " + mapDependency.getInternal() + "\n"); + console.log("MapDependency Active : " + mapDependency.getActive() + "\n"); + console.log("MapDependency ID : " + mapDependency.getId() + "\n"); + console.log("MapDependency Source : " + mapDependency.getSource() + "\n"); + console.log("MapDependency Category : " + mapDependency.getCategory() + "\n"); + }); + let info = responseWrapper.getInfo(); + if (info != null) + { + if (info.getPerPage() != null) + { + console.log("MapDependency INfo PerPage: " + info.getPerPage() + "\n"); + } + if (info.getCount() != null) + { + console.log("MapDependency INfo Count: " + info.getCount() + "\n"); + } + if (info.getPage() != null) + { + console.log("MapDependency INfo Page: " + info.getPage() + "\n"); + } + if (info.getMoreRecords() != null) + { + console.log("MapDependency INfo MoreRecords: " + info.getMoreRecords() + "\n"); + } + } + } + } + else if (responseHandler instanceof ZOHOCRMSDK.DependencyFieldMap.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let layoutId = 44024832423423; +let module = "leads"; +await GetMapDependencies.initialize(); +await GetMapDependencies.getMapDependencies(layoutId, module); \ No newline at end of file diff --git a/versions/3.0.0/samples/filedMapDependency/getMapDependency.js b/versions/3.0.0/samples/filedMapDependency/getMapDependency.js new file mode 100644 index 0000000..fa7725f --- /dev/null +++ b/versions/3.0.0/samples/filedMapDependency/getMapDependency.js @@ -0,0 +1,110 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetMapDependency +{ + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getMapDependency(layputId, module, dependencyId) + { + let fieldMapDependencyOperations = new ZOHOCRMSDK.DependencyFieldMap.FieldMapDependencyOperations(layoutId, module); + let response = await fieldMapDependencyOperations.getMapDependency(dependencyId); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.DependencyFieldMap.BodyWrapper) + { + let responseWrapper = responseHandler; + let mapDependencies = responseWrapper.getMapDependency(); + if (mapDependencies != null) { + mapDependencies.forEach(mapDependency => { + let parent = mapDependency.getParent(); + if (parent != null) { + console.log("MapDependency Parent ID : " + parent.getId() + "\n"); + console.log("MapDependency Parent APIName : " + parent.getAPIName() + "\n"); + } + let child = mapDependency.getChild(); + if (child != null) { + console.log("MapDependency child ID : " + child.getId() + "\n"); + console.log("MapDependency child APIName : " + child.getAPIName() + "\n"); + } + let pickListValues = mapDependency.getPickListValues(); + if (pickListValues != null) { + pickListValues.forEach(pickListValue => { + console.log("MapDependency PickListvalue ID: " + pickListValue.getId() + "\n"); + console.log("MapDependency PickListvalue ActualValue: " + pickListValue.getActualValue() + "\n"); + console.log("MapDependency PickListvalue DisplayValue: " + pickListValue.getDisplayValue() + "\n"); + let pickListMaps = pickListValue.getMaps(); + if (pickListMaps != null) { + pickListMaps.forEach(pickListMap => { + console.log("MapDependency PickListValue Map ID : " + pickListMap.getId() + "\n"); + console.log("MapDependency PickListValue Map ActualValue : " + pickListMap.getActualValue() + "\n"); + console.log("MapDependency PickListValue Map DisplayValue : " + pickListMap.getDisplayValue() + "\n"); + }); + } + }); + } + console.log("MapDependency Internal : " + mapDependency.getInternal() + "\n"); + console.log("MapDependency Active : " + mapDependency.getActive() + "\n"); + console.log("MapDependency ID : " + mapDependency.getId() + "\n"); + console.log("MapDependency Source : " + mapDependency.getSource() + "\n"); + console.log("MapDependency Category : " + mapDependency.getCategory() + "\n"); + }); + let info = responseWrapper.getInfo(); + if (info != null) + { + if (info.getPerPage() != null) + { + console.log("MapDependency INfo PerPage: " + info.getPerPage() + "\n"); + } + if (info.getCount() != null) + { + console.log("MapDependency INfo Count: " + info.getCount() + "\n"); + } + if (info.getPage() != null) + { + console.log("MapDependency INfo Page: " + info.getPage() + "\n"); + } + if (info.getMoreRecords() != null) + { + console.log("MapDependency INfo MoreRecords: " + info.getMoreRecords() + "\n"); + } + } + } + } + else if (responseHandler instanceof ZOHOCRMSDK.DependencyFieldMap.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let layoutId = 440248000167n; +let module = "leads"; +let dependencyId = 44024801379002n; +await GetMapDependency.initialize(); +await GetMapDependency.getMapDependency(layoutId, module, dependencyId); \ No newline at end of file diff --git a/versions/3.0.0/samples/filedMapDependency/updateMapDependency.js b/versions/3.0.0/samples/filedMapDependency/updateMapDependency.js new file mode 100644 index 0000000..6d3f15b --- /dev/null +++ b/versions/3.0.0/samples/filedMapDependency/updateMapDependency.js @@ -0,0 +1,106 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateMapDependency +{ + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateMapDependency(layoutId, module, dependencyId) + { + let fieldMapDependencyOperations = new ZOHOCRMSDK.DependencyFieldMap.FieldMapDependencyOperations(layoutId, module); + let bodyWrapper = new ZOHOCRMSDK.DependencyFieldMap.BodyWrapper(); + let mapDependencies = []; + let mapDependency = new ZOHOCRMSDK.DependencyFieldMap.MapDependency(); + let parent = new ZOHOCRMSDK.DependencyFieldMap.Parent(); + parent.setAPIName("Lead_Status"); + parent.setId(403423423432423n); + await mapDependency.setParent(parent); + let child = new ZOHOCRMSDK.DependencyFieldMap.Child(); + child.setAPIName("Pick_List_1"); + child.setId(40434345342343n); + await mapDependency.setChild(child); + let pickListValues = []; + let pickListValue = new ZOHOCRMSDK.DependencyFieldMap.PickListMapping(); + pickListValue.setDisplayValue("-None-"); + pickListValue.setId(43435453412445n); + pickListValue.setActualValue("-None-"); + let pickListMaps =[]; + let pickListMap = new ZOHOCRMSDK.DependencyFieldMap.PicklistMap(); + pickListMap.setId(4043423423542343n); + pickListMap.setActualValue("Option 1"); + pickListMap.setDisplayValue("Option 1"); + pickListMaps.push(pickListMap); + pickListMap = new ZOHOCRMSDK.DependencyFieldMap.PicklistMap(); + pickListMap.setId(4043423423542343n); + pickListMap.setActualValue("-None-"); + pickListMap.setDisplayValue("-None-"); + pickListMaps.push(pickListMap); + pickListValue.setMaps(pickListMaps); + pickListValues.push(pickListValue); + mapDependency.setPickListValues(pickListValues); + mapDependencies.push(mapDependency); + bodyWrapper.setMapDependency(mapDependencies); + let response = await fieldMapDependencyOperations.updateMapDependency(dependencyId, bodyWrapper); + if (response != null) { + console.log("Status code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.DependencyFieldMap.ActionWrapper) { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getMapDependency(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.DependencyFieldMap.SuccessResponse) { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.DependencyFieldMap.APIException) { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } else if (actionHandler instanceof ZOHOCRMSDK.DependencyFieldMap.APIException) { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let layoutId = 401242424124n; +let module = "leads"; +let dependencyId = 40489476274223n; +await UpdateMapDependency.initialize(); +await UpdateMapDependency.updateMapDependency(layoutId, module, dependencyId); \ No newline at end of file diff --git a/versions/3.0.0/samples/files/getFile.js b/versions/3.0.0/samples/files/getFile.js new file mode 100644 index 0000000..bdf4eac --- /dev/null +++ b/versions/3.0.0/samples/files/getFile.js @@ -0,0 +1,68 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +import path from "path"; +import fs from "fs"; +class GetFile{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get File

+ * This method is used to download the file with ID and write in the destinationFolder + * @param {String} id The ID of the uploaded File. + * @param {String} destinationFolder The absolute path of the destination folder to store the File + */ + static async getFile(id, destinationFolder) { + //example + //let id = "c3231aae3bfeef7d5e00a54b7563c0dd42b"; + //let destinationFolder = "/Users/user_name/Desktop" + let fileOperations = new ZOHOCRMSDK.Files.FilesOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + //Add the id to ParameterMap instance + await paramInstance.add(ZOHOCRMSDK.Files.GetFileParam.ID, id); + //Call getFile method that takes ParameterMap instance as parameter + let response = await fileOperations.getFile(paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Files.FileBodyWrapper) { + let streamWrapper = responseObject.getFile(); + //Construct the file name by joining the destinationFolder and the name from StreamWrapper instance + let fileName = path.join(destinationFolder, streamWrapper.getName()); + let readStream = streamWrapper.getStream(); + //Write the stream to the destination file. + fs.writeFileSync(fileName, readStream); + } + else if (responseObject instanceof ZOHOCRMSDK.Files.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetFile.initialize(); +let id = "c6085fae06cbd7b75001d80ffeb1555a2ef302be67258d0dcfff6b100bf"; +let destinationFolder = "users/nodejs-sdk-sample/file"; +await GetFile.getFile(id,destinationFolder); \ No newline at end of file diff --git a/versions/3.0.0/samples/files/uploadFiles.js b/versions/3.0.0/samples/files/uploadFiles.js new file mode 100644 index 0000000..36de290 --- /dev/null +++ b/versions/3.0.0/samples/files/uploadFiles.js @@ -0,0 +1,94 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UploadFiles{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Upload File

+ * This method is used to upload a file and print the response. + * @param {String} absoluteFilePath The absolute file path of the file to be attached + */ + static async uploadFiles() { + //example + //let absoluteFilePath = "/Users/user_name/Desktop/download.png"; + let fileOperations = new ZOHOCRMSDK.Files.FilesOperations(); + let request = new ZOHOCRMSDK.Files.BodyWrapper(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Files.UploadFilesParam.TYPE, "inline"); + /** StreamWrapper can be initialized in any of the following ways */ + /** + * param 1 -> fileName + * param 2 -> Read Stream. + */ + // let streamWrapper1 = new StreamWrapper(null, fs.createReadStream("/Users/user_name/Desktop/file1.txt")); + // let streamWrapper3 = new StreamWrapper(null, fs.createReadStream("/Users/user_name/Desktop/file2.txt")); + /** + * param 1 -> fileName + * param 2 -> Read Stream + * param 3 -> Absolute File Path of the file to be attached + */ + let streamWrapper2 = new ZOHOCRMSDK.StreamWrapper(null, null, "/Users/user_name/Desktop/download.png"); + // request.setFile([streamWrapper1, streamWrapper2, streamWrapper3]); + request.setFile([streamWrapper2]); + //Call uploadFile method that takes BodyWrapper instance and ParameterMap instance as parameter. + let response = await fileOperations.uploadFiles(request, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Files.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Files.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Files.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Files.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await UploadFiles.initialize(); +await UploadFiles.uploadFiles(); \ No newline at end of file diff --git a/versions/3.0.0/samples/fiscalyear/GetFiscalYear.js b/versions/3.0.0/samples/fiscalyear/GetFiscalYear.js new file mode 100644 index 0000000..896d501 --- /dev/null +++ b/versions/3.0.0/samples/fiscalyear/GetFiscalYear.js @@ -0,0 +1,61 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetFiscalYear +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + + static async getFiscalYear() + { + let fiscalYearOperations = new ZOHOCRMSDK.FiscalYear.FiscalYearOperations(); + let response = await fiscalYearOperations.getFiscalYear(); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) + { + if (responseObject instanceof ZOHOCRMSDK.FiscalYear.ResponseWrapper) + { + let fiscalYear = responseObject.getFiscalYear(); + if (fiscalYear != null) + { + console.log("FiscalYear StartMonth : " + fiscalYear.getStartMonth().getValue()); + console.log("FiscalYear DisplayBasedOn : " + fiscalYear.getDisplayBasedOn().getValue()); + console.log("FiscalYear Id : " + fiscalYear.getId()); + } + } + else if(responseObject instanceof ZOHOCRMSDK.FiscalYear.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + let details = responseObject.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetFiscalYear.initialize(); +await GetFiscalYear.getFiscalYear(); \ No newline at end of file diff --git a/versions/3.0.0/samples/fiscalyear/UpdateFiscalYear.js b/versions/3.0.0/samples/fiscalyear/UpdateFiscalYear.js new file mode 100644 index 0000000..daa5d7b --- /dev/null +++ b/versions/3.0.0/samples/fiscalyear/UpdateFiscalYear.js @@ -0,0 +1,82 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateFiscalYear +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + + static async updateFiscalYear() + { + let fiscalYearOperations = new ZOHOCRMSDK.FiscalYear.FiscalYearOperations(); + let request = new ZOHOCRMSDK.FiscalYear.BodyWrapper(); + let fiscalYear = new ZOHOCRMSDK.FiscalYear.Year(); + fiscalYear.setStartMonth(new ZOHOCRMSDK.Choice("May")); + fiscalYear.setDisplayBasedOn(new ZOHOCRMSDK.Choice("start_month")); + await request.setFiscalYear(fiscalYear); + let response = await fiscalYearOperations.updateFiscalYear(request); + if (response != null) + { + console.log("Status code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.FiscalYear.ActionWrapper) + { + let actionWrapper = actionHandler; + let actionResponse = actionWrapper.getFiscalYear(); + if (actionResponse instanceof ZOHOCRMSDK.FiscalYear.SuccessResponse) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.FiscalYear.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.FiscalYear.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await UpdateFiscalYear.initialize(); +await UpdateFiscalYear.updateFiscalYear(); \ No newline at end of file diff --git a/versions/3.0.0/samples/fromAddresses/fromAddresses.js b/versions/3.0.0/samples/fromAddresses/fromAddresses.js new file mode 100644 index 0000000..4df05ff --- /dev/null +++ b/versions/3.0.0/samples/fromAddresses/fromAddresses.js @@ -0,0 +1,58 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class FromAddresses +{ + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getEmailAddresses() + { + let sendMailOperations = new ZOHOCRMSDK.AddressesFrom.FromAddressesOperations(); + let response = await sendMailOperations.getFromAddresses(); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.AddressesFrom.ResponseWrapper) + { + let responseWrapper = responseHandler; + let userAddresses = responseWrapper.getFromAddresses(); + userAddresses.forEach(userAddress => { + console.log("UserAddress Email: " + userAddress.getEmail() + "\n"); + console.log("UserAddress Type: " + userAddress.getType() + "\n"); + console.log("UserAddress UserName: " + userAddress.getUserName() + "\n"); + console.log("UserAddress Default: " + userAddress.getDefault() + "\n"); + }); + } + else if (responseHandler instanceof ZOHOCRMSDK.AddressesFrom.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await FromAddresses.initialize(); +await FromAddresses.getEmailAddresses(); \ No newline at end of file diff --git a/versions/3.0.0/samples/holidays/GetHoliday.js b/versions/3.0.0/samples/holidays/GetHoliday.js new file mode 100644 index 0000000..b000030 --- /dev/null +++ b/versions/3.0.0/samples/holidays/GetHoliday.js @@ -0,0 +1,75 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetHoliday +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getHoliday(id) + { + let holidaysOperations = new ZOHOCRMSDK.Holidays.HolidaysOperations("44020020813"); + let response = await holidaysOperations.getHoliday(id); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.Holidays.ResponseWrapper) + { + let holidays = responseHandler.getHolidays(); + if (holidays != null) + { + console.log("Holidays : " + "\n"); + holidays.forEach(holiday=> { + if (holiday instanceof ZOHOCRMSDK.Holidays.Holiday) + { + console.log("Holiday Id : " + holiday.getId() + "\n"); + console.log("Holiday Name : " + holiday.getName() + "\n"); + console.log("Holiday Date : " + holiday.getDate().toString() + "\n"); + console.log("Holiday Year : " + holiday.getYear() + "\n"); + console.log("Holiday Type : " + holiday.getType() + "\n"); + let shiftHour = holiday.getShiftHour(); + if (shiftHour != null) + { + console.log("ShiftHour : " + "\n"); + console.log("Name: " + shiftHour.getName() + "\n"); + console.log("ShiftHour Id : " + shiftHour.getId() + "\n"); + } + } + }); + } + } + else if (responseHandler instanceof ZOHOCRMSDK.Holidays.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let id = 4402481393119n; +await GetHoliday.initialize(); +await GetHoliday.getHoliday(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/holidays/UpdateHoliday.js b/versions/3.0.0/samples/holidays/UpdateHoliday.js new file mode 100644 index 0000000..75ac495 --- /dev/null +++ b/versions/3.0.0/samples/holidays/UpdateHoliday.js @@ -0,0 +1,89 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateHoliday +{ + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateHoliday(id) + { + let holidaysOperations = new ZOHOCRMSDK.Holidays.HolidaysOperations("3323124323231"); + let request = new ZOHOCRMSDK.Holidays.Holidays(); + let holidays = []; + let holiday = new ZOHOCRMSDK.Holidays.Holiday(); + holiday.setName("Holiday 1"); + holiday.setDate(new Date(2020, 10, 12)); + holiday.setType("shift_holiday"); + // when type is shift holiday + let shifthour = new ZOHOCRMSDK.Holidays.ShiftHour(); + shifthour.setName("Shift hour for TX"); + shifthour.setId(4400032232423n); + await holiday.setShiftHour(shifthour); + holiday.setYear(2020); + holidays.push(holiday); + request.setHolidays(holidays); + let response = await holidaysOperations.updateHoliday(id, request); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Holidays.ActionWrapper) { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getHolidays(); + if (actionResponses != null) { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Holidays.SuccessResponse) { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.Holidays.APIException) { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } else if (actionHandler instanceof ZOHOCRMSDK.Holidays.APIException) { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let id = 323241213123n; +await UpdateHoliday.initialize(); +await UpdateHoliday.updateHoliday(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/holidays/createHolidays.js b/versions/3.0.0/samples/holidays/createHolidays.js new file mode 100644 index 0000000..b8f566c --- /dev/null +++ b/versions/3.0.0/samples/holidays/createHolidays.js @@ -0,0 +1,95 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class CreateHolidays +{ + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createHolidays() + { + let holidaysOperations = new ZOHOCRMSDK.Holidays.HolidaysOperations("440240020813n"); + let request = new ZOHOCRMSDK.Holidays.CreateBusinessHoliday(); + let holidays = []; + let holiday = new ZOHOCRMSDK.Holidays.BusinessHoliday(); + holiday.setName("Holiday 2"); + holiday.setDate(new Date(2023, 10, 23)); + holiday.setType(new ZOHOCRMSDK.Choice("business_holiday")); + holidays.push(holiday); + request.setHolidays(holidays); + // when type is Shift_holiday + let request1 = new ZOHOCRMSDK.Holidays.CreateShiftHoliday(); + let shiftholidays = []; + let shiftholiday = new ZOHOCRMSDK.Holidays.ShiftHoliday(); + let shifthour = new ZOHOCRMSDK.Holidays.ShiftHour(); + shifthour.setName("shift hour for TX"); + shifthour.setId(4402481394758n); + await shiftholiday.setShiftHour(shifthour); + shiftholiday.setName("shiftholiday"); + shiftholiday.setType(new ZOHOCRMSDK.Choice("shift_holiday")); + shiftholiday.setDate(new Date(2023, 11, 12)); + shiftholidays.push(shiftholiday); + request1.setHolidays(shiftholidays); + let response =await holidaysOperations.createHolidays(request); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Holidays.ActionWrapper) { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getHolidays(); + if (actionResponses != null) { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Holidays.SuccessResponse) { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.Holidays.APIException) { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } else if (actionHandler instanceof ZOHOCRMSDK.Holidays.APIException) { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await CreateHolidays.initialize(); +await CreateHolidays.createHolidays(); \ No newline at end of file diff --git a/versions/3.0.0/samples/holidays/deleteHolidays.js b/versions/3.0.0/samples/holidays/deleteHolidays.js new file mode 100644 index 0000000..9a47ea5 --- /dev/null +++ b/versions/3.0.0/samples/holidays/deleteHolidays.js @@ -0,0 +1,76 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class DeleteHolidays +{ + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async deleteHolidays(id) + { + let holidaysOperations = new ZOHOCRMSDK.Holidays.HolidaysOperations("440240020813"); + let response = await holidaysOperations.deleteHoliday(id); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Holidays.ActionWrapper) { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getHolidays(); + if (actionResponses != null) { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Holidays.SuccessResponse) { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.Holidays.APIException) { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } else if (actionHandler instanceof ZOHOCRMSDK.Holidays.APIException) { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let id = 440241176034n; +await DeleteHolidays.initialize(); +await DeleteHolidays.deleteHolidays(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/holidays/getHolidays.js b/versions/3.0.0/samples/holidays/getHolidays.js new file mode 100644 index 0000000..d53bd65 --- /dev/null +++ b/versions/3.0.0/samples/holidays/getHolidays.js @@ -0,0 +1,87 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetHolidays +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getHolidays() + { + let holidaysOperations = new ZOHOCRMSDK.Holidays.HolidaysOperations("4402480020813"); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Holidays.GetHolidaysParam.YEAR, 2023); + await paramInstance.add(ZOHOCRMSDK.Holidays.GetHolidaysParam.SHIFT_ID, 4402494758n); + let response = await holidaysOperations.getHolidays(paramInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.Holidays.ResponseWrapper) + { + let responseWrapper = responseHandler; + let holidays = responseWrapper.getHolidays(); + if (holidays != null) + { + console.log("Holidays : " + "\n"); + holidays.forEach(holiday=> { + if (holiday instanceof ZOHOCRMSDK.Holidays.Holiday) + { + console.log("Holiday Id : " + holiday.getId() + "\n"); + console.log("Holiday Name : " + holiday.getName() + "\n"); + console.log("Holiday Date : " + holiday.getDate().toString() + "\n"); + console.log("Holiday Year : " + holiday.getYear() + "\n"); + console.log("Holiday Type : " + holiday.getType() + "\n"); + let shiftHour = holiday.getShiftHour(); + if (shiftHour != null) + { + console.log("ShiftHour : " + "\n"); + console.log("Name: " + shiftHour.getName() + "\n"); + console.log("ShiftHour Id : " + shiftHour.getId() + "\n"); + } + } + }); + } + let info = responseWrapper.getInfo(); + if (info != null) + { + console.log("Info : " + "\n"); + console.log("PerPage : " + info.getPerPage() + "\n"); + console.log("Count : " + info.getCount() + "\n"); + console.log("Page : " + info.getPage() + "\n"); + console.log("more Record : " + info.getMoreRecords() + '\n'); + } + } + else if (responseHandler instanceof ZOHOCRMSDK.Holidays.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await GetHolidays.initialize(); +await GetHolidays.getHolidays(); \ No newline at end of file diff --git a/versions/3.0.0/samples/holidays/updateHolidays.js b/versions/3.0.0/samples/holidays/updateHolidays.js new file mode 100644 index 0000000..1b606a1 --- /dev/null +++ b/versions/3.0.0/samples/holidays/updateHolidays.js @@ -0,0 +1,90 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateHolidays +{ + static async initialize() { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateHolidays() + { + let holidaysOperations = new ZOHOCRMSDK.Holidays.HolidaysOperations("343423412313233"); + let request = new ZOHOCRMSDK.Holidays.Holidays(); + let holidays = []; + let holiday = new ZOHOCRMSDK.Holidays.Holiday(); + holiday.setId(400023423421432423n); + holiday.setName("Holiday 1"); + holiday.setDate(new Date(2020, 10, 12)); + holiday.setType("shift_holiday"); + // when type is shift holiday + let shifthour = new ZOHOCRMSDK.Holidays.ShiftHour(); + shifthour.setName("Shift hour for TX"); + shifthour.setId(4400032232432423n); + await holiday.setShiftHour(shifthour); + holiday.setYear(2020); + holidays.push(holiday); + request.setHolidays(holidays); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + let response = await holidaysOperations.updateHolidays(request); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Holidays.ActionWrapper) { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getHolidays(); + if (actionResponses != null) { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Holidays.SuccessResponse) { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.Holidays.APIException) { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } else if (actionHandler instanceof ZOHOCRMSDK.Holidays.APIException) { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await UpdateHolidays.initialize(); +await UpdateHolidays.updateHolidays(); \ No newline at end of file diff --git a/versions/3.0.0/samples/inventory_templates/getInventoryTemplateById.js b/versions/3.0.0/samples/inventory_templates/getInventoryTemplateById.js new file mode 100644 index 0000000..a84d0d0 --- /dev/null +++ b/versions/3.0.0/samples/inventory_templates/getInventoryTemplateById.js @@ -0,0 +1,81 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetInventoryTemplateById{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getInventoryTemplateById(Id) { + let sortBy = null; + let sortOrder = null; + let category = null; + let inventoryTemplatesOperations = new ZOHOCRMSDK.InventoryTemplates.InventoryTemplatesOperations(); + //Call getInventoryTemplateById method that takes Id as parameter + let response = await inventoryTemplatesOperations.getInventoryTemplate(Id); + if (response != null) { + console.log("Status code " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.InventoryTemplates.ResponseWrapper) { + let responseWrapper = responseHandler; + let inventoryTemplates = responseWrapper.getInventoryTemplates(); + inventoryTemplates.forEach(inventoryTemplate => { + console.log("InventoryTemplate CreatedTime: " + inventoryTemplate.getCreatedTime()); + let module = inventoryTemplate.getModule(); + if (module != null) { + console.log("InventoryTemplate Module API Name : " + module.getAPIName()); + console.log("InventoryTemplate Module ID : " + module.getId()); + } + console.log("InventoryTemplate Type: " + inventoryTemplate.getType()); + let createdBy = inventoryTemplate.getCreatedBy(); + if (createdBy != null) { + console.log("InventoryTemplate Created By User-ID: " + createdBy.getId()); + console.log("InventoryTemplate Created By User-Name: " + createdBy.getName()); + } + console.log("InventoryTemplate ModifiedTime: " + inventoryTemplate.getModifiedTime()); + let folder = inventoryTemplate.getFolder(); + if (folder != null) { + console.log("InventoryTemplate Folder Id: " + folder.getId()); + console.log("InventoryTemplate Folder Name: " + folder.getName()); + } + console.log("InventoryTemplate LastUsageTime: " + inventoryTemplate.getLastUsageTime()); + console.log("InventoryTemplate Name: " + inventoryTemplate.getName()); + let modifiedBy = inventoryTemplate.getModifiedBy(); + if (modifiedBy != null) { + console.log("InventoryTemplate Modified By User-ID: " + modifiedBy.getId()); + console.log("InventoryTemplate Modified By User-Name: " + modifiedBy.getName()); + } + console.log("InventoryTemplate ID: " + inventoryTemplate.getId()); + console.log("InventoryTemplate EditorMode: " + inventoryTemplate.getEditorMode()); + console.log("InventoryTemplate Content: " + inventoryTemplate.getContent()); + console.log("InventoryTemplate Favorite: " + inventoryTemplate.getFavorite()); + }); + } + else if (responseHandler instanceof ZOHOCRMSDK.InventoryTemplates.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage()); + } + } + } +} +await GetInventoryTemplateById.initialize(); +let id = 4402480079n; +await GetInventoryTemplateById.getInventoryTemplateById(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/inventory_templates/getInventoryTemplates.js b/versions/3.0.0/samples/inventory_templates/getInventoryTemplates.js new file mode 100644 index 0000000..c71e57a --- /dev/null +++ b/versions/3.0.0/samples/inventory_templates/getInventoryTemplates.js @@ -0,0 +1,88 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetInventoryTemplates{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .grantToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getInventoryTemplates() { + let moduleAPIName = "Quotes"; + let sortBy = "modified_time"; + let sortOrder = "desc"; + let category = "created_by_me"; + let inventoryTemplatesOperations = new ZOHOCRMSDK.InventoryTemplates.InventoryTemplatesOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.InventoryTemplates.GetInventoryTemplatesParam.MODULE, moduleAPIName); + //Call getInventoryTemplates method that takes paramInstance as parameter + let response = await inventoryTemplatesOperations.getInventoryTemplates(paramInstance); + if (response != null) { + console.log("Status code " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.InventoryTemplates.ResponseWrapper) { + let responseWrapper = responseHandler; + let inventoryTemplates = responseWrapper.getInventoryTemplates(); + inventoryTemplates.forEach(inventoryTemplate => { + console.log("InventoryTemplate CreatedTime: " + inventoryTemplate.getCreatedTime()); + let module = inventoryTemplate.getModule(); + if (module != null) { + console.log("InventoryTemplate Module API Name : " + module.getAPIName()); + console.log("InventoryTemplate Module ID : " + module.getId()); + } + console.log("InventoryTemplate Type: " + inventoryTemplate.getType()); + let createdBy = inventoryTemplate.getCreatedBy(); + if (createdBy != null) { + console.log("InventoryTemplate Created By User-ID: " + createdBy.getId()); + console.log("InventoryTemplate Created By User-Name: " + createdBy.getName()); + } + console.log("InventoryTemplate ModifiedTime: " + inventoryTemplate.getModifiedTime()); + let folder = inventoryTemplate.getFolder(); + if (folder != null) { + console.log("InventoryTemplate Folder Id: " + folder.getId()); + console.log("InventoryTemplate Folder Name: " + folder.getName()); + } + console.log("InventoryTemplate LastUsageTime: " + inventoryTemplate.getLastUsageTime()); + console.log("InventoryTemplate Name: " + inventoryTemplate.getName()); + let modifiedBy = inventoryTemplate.getModifiedBy(); + if (modifiedBy != null) { + console.log("InventoryTemplate Modified By User-ID: " + modifiedBy.getId()); + console.log("InventoryTemplate Modified By User-Name: " + modifiedBy.getName()); + } + console.log("InventoryTemplate ID: " + inventoryTemplate.getId()); + console.log("InventoryTemplate EditorMode: " + inventoryTemplate.getEditorMode()); + console.log("InventoryTemplate Content: " + inventoryTemplate.getContent()); + console.log("InventoryTemplate Favorite: " + inventoryTemplate.getFavorite()); + }); + let info = responseWrapper.getInfo(); + console.log("InventoryTemplate Info PerPage : " + info.getPerPage()); + console.log("InventoryTemplate Info Count : " + info.getCount()); + console.log("InventoryTemplate Info Page : " + info.getPage()); + console.log("InventoryTemplate Info MoreRecords : " + info.getMoreRecords()); + } + else if (responseHandler instanceof ZOHOCRMSDK.InventoryTemplates.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage()); + } + } + } +} +await GetInventoryTemplates.initialize(); +await GetInventoryTemplates.getInventoryTemplates(); \ No newline at end of file diff --git a/versions/3.0.0/samples/layouts/getLayout.js b/versions/3.0.0/samples/layouts/getLayout.js new file mode 100644 index 0000000..d71376a --- /dev/null +++ b/versions/3.0.0/samples/layouts/getLayout.js @@ -0,0 +1,375 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetLayout{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Layout

+ * This method is used to get metadata about a single layout of a module with layoutID and print the response. + * @param {String} moduleAPIName The API Name of the layout's modules + * @param {BigInt} layoutId The ID of the layout to be obtained + */ + static async getLayout(moduleAPIName, layoutId) { + //example + //let moduleAPIName = "module_api_name"; + //let layoutId = 091055n + let layoutsOperations = new ZOHOCRMSDK.Layouts.LayoutsOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Layouts.GetLayoutsParam.MODULE, moduleAPIName); + //Call getLayout method + let response = await layoutsOperations.getLayout(layoutId, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Layouts.ResponseWrapper) { + let layouts = responseObject.getLayouts(); + layouts.forEach(layout => { + if (layout.getCreatedTime() != null) { + console.log("Layout CreatedTime: " + layout.getCreatedTime().toString()); + } + console.log("Layout Visible: " + layout.getVisible().toString()); + let createdFor = layout.getCreatedFor(); + if (createdFor != null) { + console.log("Layout CreatedFor User-Name: " + createdFor.getName()); + console.log("Layout CreatedFor User-ID: " + createdFor.getId()); + console.log("Layout CreatedFor User-Email: " + createdFor.getEmail()); + } + let profiles = layout.getProfiles(); + if (profiles != null) { + profiles.forEach(profile => { + console.log("Layout Profile Default: " + profile.getDefault().toString()); + console.log("Layout Profile Name: " + profile.getName().toString()); + console.log("Layout Profile ID: " + profile.getId().toString()); + let defaultView = profile.getDefaultview(); + if (defaultView != null) { + console.log("Layout Profile DefaultView Name: " + defaultView.getName()); + console.log("Layout Profile DefaultView ID: " + defaultView.getId()); + console.log("Layout Profile DefaultView Type: " + defaultView.getType()); + } + }); + } + let createdBy = layout.getCreatedBy(); + if (createdBy != null) { + console.log("Layout CreatedBy User-Name: " + createdBy.getName()); + console.log("Layout CreatedBy User-ID: " + createdBy.getId()); + console.log("Layout CreatedBy User-Email: " + createdBy.getEmail()); + } + let sections = layout.getSections(); + if (sections != null) { + sections.forEach(section => { + console.log("Layout Section DisplayLabel: " + section.getDisplayLabel()); + console.log("Layout Section SequenceNumber: " + section.getSequenceNumber().toString()); + console.log("Layout Section Issubformsection: " + section.getIssubformsection().toString()); + console.log("Layout Section TabTraversal: " + section.getTabTraversal().toString()); + console.log("Layout Section APIName: " + section.getAPIName()); + console.log("Layout Section ColumnCount: " + section.getColumnCount().toString()); + console.log("Layout Section Name: " + section.getName()); + console.log("Layout Section GeneratedType: " + section.getGeneratedType()); + console.log("Layout Section Type: " + section.getType()); + let fields = section.getFields(); + if (fields != null) { + fields.forEach(async field => { + await this.printField(field); + }); + } + let properties = section.getProperties(); + if (properties != null) { + console.log("Layout Section Properties ReorderRows: " + properties.getReorderRows().toString()); + let tooltip = properties.getTooltip(); + if (tooltip != null) { + console.log("Layout Section Properties ToolTip Name: " + tooltip.getName().toString()); + console.log("Layout Section Properties ToolTip Value: " + tooltip.getValue().toString()); + } + console.log("Layout Section Properties MaximumRows: " + properties.getMaximumRows().toString()); + } + }); + } + console.log("Layout ShowBusinessCard: " + layout.getShowBusinessCard()); + if (layout.getModifiedTime() != null) { + console.log("Layout ModifiedTime: " + layout.getModifiedTime()); + } + console.log("Layout Name: " + layout.getName()); + let modifiedBy = layout.getModifiedBy(); + if (modifiedBy != null) { + console.log("Layout ModifiedBy User-Name: " + modifiedBy.getName()); + console.log("Layout ModifiedBy User-ID: " + modifiedBy.getId()); + console.log("Layout ModifiedBy User-Email: " + modifiedBy.getEmail()); + } + console.log("Layout ID: " + layout.getId()); + console.log("Layout Status: " + layout.getStatus()); + console.log("Layout DisplayType : " + layout.getDisplayType()); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Layouts.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } + static async printField(field) { + console.log("Field SystemMandatory: " + field.getSystemMandatory().toString()); + console.log("Field Webhook: " + field.getWebhook().toString()); + console.log("Field JsonType: " + field.getJsonType()); + let privateInfo = field.getPrivate(); + if (privateInfo != null) { + console.log("Private Details\n"); + console.log("Field Private Type: " + privateInfo.getType()); + console.log("Field Private Export: " + privateInfo.getExport()); + console.log("Field Private Restricted: " + privateInfo.getRestricted()); + } + let crypt = field.getCrypt(); + if (crypt != null) { + console.log("Crypt Details"); + console.log("Field Crypt Mode: " + crypt.getMode()); + console.log("Field Crypt Column: " + crypt.getColumn()); + console.log("Field Crypt Table: " + crypt.getTable()); + console.log("Field Crypt Status: " + crypt.getStatus().toString()); + let encFldIds = crypt.getEncfldids(); + if (encFldIds != null) { + console.log("EncFldIds : "); + encFldIds.forEach(encFldId => { + console.log(encFldId); + }); + } + console.log("Field Crypt Notify: " + crypt.getNotify()); + } + console.log("Field FieldLabel: " + field.getFieldLabel()); + let toolTip = field.getTooltip(); + if (toolTip != null) { + console.log("Field ToolTip Name: " + toolTip.getName()); + console.log("Field ToolTip Value: " + toolTip.getValue()); + } + console.log("Field CreatedSource: " + field.getCreatedSource()); + console.log("Field FieldReadOnly: " + field.getFieldReadOnly().toString()); + console.log("Field DisplayLabel: " + field.getDisplayLabel()); + console.log("Field ReadOnly: " + field.getReadOnly().toString()); + let associationDetails = field.getAssociationDetails(); + if (associationDetails != null) { + let lookupField = associationDetails.getLookupField(); + if (lookupField != null) { + console.log("Field AssociationDetails LookupField ID: " + lookupField.getId()); + console.log("Field AssociationDetails LookupField Name: " + lookupField.getName()) + } + let relatedField = associationDetails.getRelatedField(); + if (relatedField != null) { + console.log("Field AssociationDetails RelatedField ID: " + relatedField.getId()); + console.log("Field AssociationDetails RelatedField Name: " + relatedField.getName()); + } + } + console.log("Field Filterable: "+ field.getFilterable() ); + if (field.getConvertMapping() != null) { + console.log("Field ConvertMapping: \n"); + let convertMapping = field.getConvertMapping(); + console.log(convertMapping.getAccounts()); + console.log(convertMapping.getContacts()); + console.log(convertMapping.getDeals()); + } + if(field.getHistoryTracking() != null) + { + let historytracking = field.getHistoryTracking(); + let module = historytracking.getModule(); + if (module != null) { + let moduleLayout = module.getLayout(); + if (moduleLayout != null) { + console.log("Module Layout ID" + moduleLayout.getId()); + } + console.log("Module Layout Module DisplayLabe" + module.getDisplayLabel()); + console.log("Module Layout Module APIName" + module.getAPIName()); + console.log("Module Layout Module ID" + module.getId()); + console.log("Module Layout Module" + module.getModule()); + console.log("Module Layout Module Name" + module.getModuleName()); + } + let durationConfigured = historytracking.getDurationConfiguredField(); + if(durationConfigured != null) { + console.log("historytracking duration configured field" + durationConfigured.getId()); + } + } + if (field.getBusinesscardSupported() != null) { + console.log("Field BusinesscardSupported: " + field.getBusinesscardSupported().toString()); + } + let currency = field.getCurrency(); + if (currency != null) { + console.log("Field Currency RoundingOption: " + currency.getRoundingOption()); + if (currency.getPrecision() != null) { + console.log("Field Currency Precision: " + currency.getPrecision().toString()); + } + } + if (field.getQuickSequenceNumber() != null) { + console.log("Field QuickSequenceNumber: " + field.getQuickSequenceNumber().toString()); + } + console.log("Field ID: " + field.getId().toString()); + if (field.getCustomField() != null) { + console.log("Field CustomField: " + field.getCustomField().toString()); + } + let lookup = field.getLookup(); + if (lookup != null) { + console.log("Field Lookup DisplayLabel: " + lookup.getDisplayLabel()); + console.log("Field Lookup APIName: " + lookup.getAPIName()); + console.log("Field Lookup Module: " + lookup.getModule()); + if (lookup.getId() != null) { + console.log("Field Lookup ID: " + lookup.getId().toString()); + } + } + if (field.getVisible() != null) { + console.log("Field Visible: " + field.getVisible().toString()); + } + console.log("Field PickListValuesSortedLexically: " + field.getPickListValuesSortedLexically()); + console.log("Field Sortable: " + field.getSortable()); + console.log("Field UIType: " + field.getUiType()); + if (field.getSequenceNumber() != null) { + console.log("Field PickListValue SequenceNumber: " + field.getSequenceNumber().toString()); + } + let profiles = field.getProfiles(); + if (profiles != null) { + profiles.forEach(profile => { + console.log("Field Profile PermissionType: " + profile.getPermissionType()); + console.log("Field Profile Name: " + profile.getName()); + console.log("Field Profile Id: " + profile.getId()); + }); + } + if(field.getLength() != null) { + console.log("Field Length: " + field.getLength().toString()); + } + let viewType = field.getViewType(); + if (viewType != null) { + console.log("Field ViewType View: " + viewType.getView().toString()); + console.log("Field ViewType Edit: " + viewType.getEdit().toString()); + console.log("Field ViewType Create: " + viewType.getCreate().toString()); + console.log("Field ViewType QuickCreate: " + viewType.getQuickCreate().toString()); + } + let subform = field.getAssociatedModule(); + if (subform != null) + { + console.log("Field Subform Module: " + subform.getModule()); + console.log("Field Subform ID: " + subform.getId().toString()); + } + console.log("Field APIName: " + field.getAPIName().toString()); + let unique = field.getUnique(); + if (unique != null) { + console.log("Field Unique Casesensitive : " + unique.getCasesensitive()); + } + console.log("Field DataType: " + field.getDataType().toString()); + let formula = field.getFormula(); + if (formula != null) { + console.log("Field Formula ReturnType : " + formula.getReturnType()); + if (formula.getExpression() != null) { + console.log("Field Formula Expression : " + formula.getExpression().toString()); + } + } + if (field.getDecimalPlace() != null) { + console.log("Field DecimalPlace: " + field.getDecimalPlace().toString()); + } + console.log("Field MassUpdate: " + field.getMassUpdate()); + if (field.getBlueprintSupported() != null) { + console.log("Field BlueprintSupported: " + field.getBlueprintSupported().toString()); + } + let multiSelectLookup = field.getMultiselectlookup(); + if (multiSelectLookup != null) { + console.log("Field MultiSelectLookup DisplayLabel: " + multiSelectLookup.getDisplayLabel()); + console.log("Field MultiSelectLookup LinkingModule: " + multiSelectLookup.getLinkingModule()); + console.log("Field MultiSelectLookup LookupApiname: " + multiSelectLookup.getLookupApiname()); + console.log("Field MultiSelectLookup APIName: " + multiSelectLookup.getAPIName()); + console.log("Field MultiSelectLookup ConnectedModule: " + multiSelectLookup.getConnectedModule()); + console.log("Field MultiSelectLookup ConnectedlookupApiname: " + multiSelectLookup.getConnectedlookupApiname()); + console.log("Field MultiSelectLookup ID: " + multiSelectLookup.getId()); + } + let pickListValues = field.getPickListValues(); + if (pickListValues != null) { + for (const pickListValue of pickListValues) { + await this.printPickListValue(pickListValue); + } + } + let autoNumber = field.getAutoNumber(); + if (autoNumber != null) { + console.log("Field AutoNumber Prefix: " + autoNumber.getPrefix()); + console.log("Field AutoNumber Suffix: " + autoNumber.getSuffix()); + if (autoNumber.getStartNumber() != null) { + console.log("Field AutoNumber StartNumber: " + autoNumber.getStartNumber().toString()); + } + } + if(field.getDefaultValue() != null){ + console.log("Field DefaultValue: " + field.getDefaultValue().toString()); + } + console.log("Field DisplayType: " + field.getDisplayType()); + if(field.getValidationRule() != null) { + console.log("Field ValidationRule: \n"); + Array.from(field.getValidationRule().keys()).forEach(key => { + console.log(key + ": " + field.getValidationRule().get(key)); + }); + } + console.log("Get field type" + field.getType()); + let external = field.getExternal(); + if (external != null) { + console.log("Field External Show: " + external.getShow()); + console.log("Field External Type: " + external.getType()); + console.log("Field External AllowMultipleConfig: " + external.getAllowMultipleConfig()); + } + //get multi user lookup for field + if (field.getMultiuserlookup() != null) { + let multiuserlookup = field.getMultiuserlookup(); + //get displaylabel of multiuser lookup + console.log("Field MultiUserLookup DisplayLabel" + multiuserlookup.getDisplayLabel()); + //get linking module of multiuser lookup + console.log("Field MultiUserLookup LinkingModule" + multiuserlookup.getLinkingModule()); + //get lookup apiname of multiuser lookup + console.log("Field MultiUserLookup LookupApiname" + multiuserlookup.getLookupApiname()); + //get apiname of multiuser lookup + console.log("Field MultiUserLookup APIName" + multiuserlookup.getAPIName()); + //get id of multiuser lookup + console.log("Field MultiUserLookup ID" + multiuserlookup.getId()); + //get connected module of multiuser lookup + console.log("Field MultiUserLookup ConnectedModule" + multiuserlookup.getConnectedModule()); + //get connected lookup apiname of multiuser lookup + console.log("Field MultiUserLookup ConnectedlookupApiname" + multiuserlookup.getConnectedlookupApiname()); + } + } + static async printPickListValue(pickListValue) { + console.log("Field PickListValue DisplayValue: " + pickListValue.getDisplayValue()); + if (pickListValue.getSequenceNumber() != null) { + console.log("Field PickListValue SequenceNumber: " + pickListValue.getSequenceNumber().toString()); + } + console.log("Field PickListValue ExpectedDataType: " + pickListValue.getExpectedDataType()); + if (pickListValue.getMaps() != null) { + pickListValue.getMaps().forEach(map => { + console.log("Field PickListValue Maps APIName: " + map.getAPIName()); + let pickListValues = map.getPickListValues(); + if (pickListValues != null) { + pickListValues.forEach(async pickListValue1 => { + await this.printPickListValue(pickListValue1); + }); + } + }); + } + console.log("Field PickListValue ActualValue: " + pickListValue.getActualValue()); + console.log("Field PickListValue SysRefName: " + pickListValue.getSysRefName()); + console.log("Field PickListValue Type: " + pickListValue.getType()); + console.log("Field PickListValue Id: " + pickListValue.getId()); + } +} +await GetLayout.initialize(); +let moduleAPIName = "leads"; +let layoutId = 44024800167n +await GetLayout.getLayout(moduleAPIName,layoutId); \ No newline at end of file diff --git a/versions/3.0.0/samples/layouts/getLayouts.js b/versions/3.0.0/samples/layouts/getLayouts.js new file mode 100644 index 0000000..27557b2 --- /dev/null +++ b/versions/3.0.0/samples/layouts/getLayouts.js @@ -0,0 +1,366 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetLayouts{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getLayouts(moduleAPIName) { + //example + //let moduleAPIName = "module_api_name"; + let layoutsOperations = new ZOHOCRMSDK.Layouts.LayoutsOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Layouts.GetLayoutsParam.MODULE, moduleAPIName); + //Call getLayouts method + let response = await layoutsOperations.getLayouts(paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Layouts.ResponseWrapper) { + let layouts = responseObject.getLayouts(); + for (const layout of layouts) { + if (layout.getCreatedTime() != null) { + console.log("Layout CreatedTime: " + layout.getCreatedTime().toString()); + } + console.log("Layout Visible: " + layout.getVisible().toString()); + let createdFor = layout.getCreatedFor(); + if (createdFor != null) { + console.log("Layout CreatedFor User-Name: " + createdFor.getName()); + console.log("Layout CreatedFor User-ID: " + createdFor.getId()); + console.log("Layout CreatedFor User-Email: " + createdFor.getEmail()); + } + let profiles = layout.getProfiles(); + if (profiles != null) { + profiles.forEach(profile => { + console.log("Layout Profile Default: " + profile.getDefault().toString()); + console.log("Layout Profile Name: " + profile.getName().toString()); + console.log("Layout Profile ID: " + profile.getId().toString()); + let defaultView = profile.getDefaultview(); + if (defaultView != null) { + console.log("Layout Profile DefaultView Name: " + defaultView.getName()); + console.log("Layout Profile DefaultView ID: " + defaultView.getId()); + console.log("Layout Profile DefaultView Type: " + defaultView.getType()); + } + }); + } + let createdBy = layout.getCreatedBy(); + if (createdBy != null) { + console.log("Layout CreatedBy User-Name: " + createdBy.getName()); + console.log("Layout CreatedBy User-ID: " + createdBy.getId()); + console.log("Layout CreatedBy User-Email: " + createdBy.getEmail()); + } + let sections = layout.getSections(); + if (sections != null) { + sections.forEach(section => { + console.log("Layout Section DisplayLabel: " + section.getDisplayLabel()); + console.log("Layout Section SequenceNumber: " + section.getSequenceNumber().toString()); + console.log("Layout Section Issubformsection: " + section.getIssubformsection().toString()); + console.log("Layout Section TabTraversal: " + section.getTabTraversal().toString()); + console.log("Layout Section APIName: " + section.getAPIName()); + console.log("Layout Section ColumnCount: " + section.getColumnCount().toString()); + console.log("Layout Section Name: " + section.getName()); + console.log("Layout Section GeneratedType: " + section.getGeneratedType()); + console.log("Layout Section Type: " + section.getType()); + let fields = section.getFields(); + if (fields != null) { + fields.forEach(async field => { + await this.printField(field); + }); + } + let properties = section.getProperties(); + if (properties != null) { + console.log("Layout Section Properties ReorderRows: " + properties.getReorderRows().toString()); + let tooltip = properties.getTooltip(); + if (tooltip != null) { + console.log("Layout Section Properties ToolTip Name: " + tooltip.getName().toString()); + console.log("Layout Section Properties ToolTip Value: " + tooltip.getValue().toString()); + } + console.log("Layout Section Properties MaximumRows: " + properties.getMaximumRows().toString()); + } + }); + } + console.log("Layout ShowBusinessCard: " + layout.getShowBusinessCard()); + if (layout.getModifiedTime() != null) { + console.log("Layout ModifiedTime: " + layout.getModifiedTime()); + } + console.log("Layout Name: " + layout.getName()); + let modifiedBy = layout.getModifiedBy(); + if (modifiedBy != null) { + console.log("Layout ModifiedBy User-Name: " + modifiedBy.getName()); + console.log("Layout ModifiedBy User-ID: " + modifiedBy.getId()); + console.log("Layout ModifiedBy User-Email: " + modifiedBy.getEmail()); + } + console.log("Layout ID: " + layout.getId()); + console.log("Layout Status: " + layout.getStatus()); + console.log("Layout DisplayType : " + layout.getDisplayType()); + } + } + else if (responseObject instanceof ZOHOCRMSDK.Layouts.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } + static async printField(field) { + console.log("Field SystemMandatory: " + field.getSystemMandatory().toString()); + console.log("Field Webhook: " + field.getWebhook().toString()); + console.log("Field JsonType: " + field.getJsonType()); + let privateInfo = field.getPrivate(); + if (privateInfo != null) { + console.log("Private Details\n"); + console.log("Field Private Type: " + privateInfo.getType()); + console.log("Field Private Export: " + privateInfo.getExport()); + console.log("Field Private Restricted: " + privateInfo.getRestricted()); + } + let crypt = field.getCrypt(); + if (crypt != null) { + console.log("Crypt Details"); + console.log("Field Crypt Mode: " + crypt.getMode()); + console.log("Field Crypt Column: " + crypt.getColumn()); + console.log("Field Crypt Table: " + crypt.getTable()); + console.log("Field Crypt Status: " + crypt.getStatus().toString()); + let encFldIds = crypt.getEncfldids(); + if (encFldIds != null) { + console.log("EncFldIds : "); + encFldIds.forEach(encFldId => { + console.log(encFldId); + }); + } + console.log("Field Crypt Notify: " + crypt.getNotify()); + } + console.log("Field FieldLabel: " + field.getFieldLabel()); + let toolTip = field.getTooltip(); + if (toolTip != null) { + console.log("Field ToolTip Name: " + toolTip.getName()); + console.log("Field ToolTip Value: " + toolTip.getValue()); + } + console.log("Field CreatedSource: " + field.getCreatedSource()); + console.log("Field FieldReadOnly: " + field.getFieldReadOnly().toString()); + console.log("Field DisplayLabel: " + field.getDisplayLabel()); + console.log("Field ReadOnly: " + field.getReadOnly().toString()); + let associationDetails = field.getAssociationDetails(); + if (associationDetails != null) { + let lookupField = associationDetails.getLookupField(); + if (lookupField != null) { + console.log("Field AssociationDetails LookupField ID: " + lookupField.getId()); + console.log("Field AssociationDetails LookupField Name: " + lookupField.getName()) + } + let relatedField = associationDetails.getRelatedField(); + if (relatedField != null) { + console.log("Field AssociationDetails RelatedField ID: " + relatedField.getId()); + console.log("Field AssociationDetails RelatedField Name: " + relatedField.getName()); + } + } + console.log("Field Filterable: "+ field.getFilterable() ); + if (field.getConvertMapping() != null) { + let convertMapping = field.getConvertMapping(); + console.log(convertMapping.getAccounts()); + console.log(convertMapping.getContacts()); + console.log(convertMapping.getDeals()); + } + if(field.getHistoryTracking() != null) + { + let historytracking = field.getHistoryTracking(); + let module = historytracking.getModule(); + if (module != null) { + let moduleLayout = module.getLayout(); + if (moduleLayout != null) { + console.log("Module Layout ID" + moduleLayout.getId()); + } + console.log("Module Layout Module DisplayLabe" + module.getDisplayLabel()); + console.log("Module Layout Module APIName" + module.getAPIName()); + console.log("Module Layout Module ID" + module.getId()); + console.log("Module Layout Module" + module.getModule()); + console.log("Module Layout Module Name" + module.getModuleName()); + } + let durationConfigured = historytracking.getDurationConfiguredField(); + if(durationConfigured != null) { + console.log("historytracking duration configured field" + durationConfigured.getId()); + } + } + if (field.getBusinesscardSupported() != null) { + console.log("Field BusinesscardSupported: " + field.getBusinesscardSupported().toString()); + } + let currency = field.getCurrency(); + if (currency != null) { + console.log("Field Currency RoundingOption: " + currency.getRoundingOption()); + if (currency.getPrecision() != null) { + console.log("Field Currency Precision: " + currency.getPrecision().toString()); + } + } + if (field.getQuickSequenceNumber() != null) { + console.log("Field QuickSequenceNumber: " + field.getQuickSequenceNumber().toString()); + } + console.log("Field ID: " + field.getId().toString()); + if (field.getCustomField() != null) { + console.log("Field CustomField: " + field.getCustomField().toString()); + } + let lookup = field.getLookup(); + if (lookup != null) { + console.log("Field Lookup DisplayLabel: " + lookup.getDisplayLabel()); + console.log("Field Lookup APIName: " + lookup.getAPIName()); + console.log("Field Lookup Module: " + lookup.getModule()); + if (lookup.getId() != null) { + console.log("Field Lookup ID: " + lookup.getId().toString()); + } + } + if (field.getVisible() != null) { + console.log("Field Visible: " + field.getVisible().toString()); + } + console.log("Field PickListValuesSortedLexically: " + field.getPickListValuesSortedLexically()); + console.log("Field Sortable: " + field.getSortable()); + console.log("Field UIType: " + field.getUiType()); + if (field.getSequenceNumber() != null) { + console.log("Field PickListValue SequenceNumber: " + field.getSequenceNumber().toString()); + } + let profiles = field.getProfiles(); + if (profiles != null) { + profiles.forEach(profile => { + console.log("Field Profile PermissionType: " + profile.getPermissionType()); + console.log("Field Profile Name: " + profile.getName()); + console.log("Field Profile Id: " + profile.getId()); + }); + } + if(field.getLength() != null) { + console.log("Field Length: " + field.getLength().toString()); + } + let viewType = field.getViewType(); + if (viewType != null) { + console.log("Field ViewType View: " + viewType.getView().toString()); + console.log("Field ViewType Edit: " + viewType.getEdit().toString()); + console.log("Field ViewType Create: " + viewType.getCreate().toString()); + console.log("Field ViewType QuickCreate: " + viewType.getQuickCreate().toString()); + } + let subform = field.getAssociatedModule(); + if (subform != null) + { + console.log("Field Subform Module: " + subform.getModule()); + console.log("Field Subform ID: " + subform.getId().toString()); + } + console.log("Field APIName: " + field.getAPIName().toString()); + let unique = field.getUnique(); + if (unique != null) { + console.log("Field Unique Casesensitive : " + unique.getCasesensitive()); + } + console.log("Field DataType: " + field.getDataType().toString()); + let formula = field.getFormula(); + if (formula != null) { + console.log("Field Formula ReturnType : " + formula.getReturnType()); + if (formula.getExpression() != null) { + console.log("Field Formula Expression : " + formula.getExpression().toString()); + } + } + if (field.getDecimalPlace() != null) { + console.log("Field DecimalPlace: " + field.getDecimalPlace().toString()); + } + console.log("Field MassUpdate: " + field.getMassUpdate()); + if (field.getBlueprintSupported() != null) { + console.log("Field BlueprintSupported: " + field.getBlueprintSupported().toString()); + } + let multiSelectLookup = field.getMultiselectlookup(); + if (multiSelectLookup != null) { + console.log("Field MultiSelectLookup DisplayLabel: " + multiSelectLookup.getDisplayLabel()); + console.log("Field MultiSelectLookup LinkingModule: " + multiSelectLookup.getLinkingModule()); + console.log("Field MultiSelectLookup LookupApiname: " + multiSelectLookup.getLookupApiname()); + console.log("Field MultiSelectLookup APIName: " + multiSelectLookup.getAPIName()); + console.log("Field MultiSelectLookup ConnectedModule: " + multiSelectLookup.getConnectedModule()); + console.log("Field MultiSelectLookup ConnectedlookupApiname: " + multiSelectLookup.getConnectedlookupApiname()); + console.log("Field MultiSelectLookup ID: " + multiSelectLookup.getId()); + } + let pickListValues = field.getPickListValues(); + if (pickListValues != null) { + for (const pickListValue of pickListValues) { + await this.printPickListValue(pickListValue); + } + } + let autoNumber = field.getAutoNumber(); + if (autoNumber != null) { + console.log("Field AutoNumber Prefix: " + autoNumber.getPrefix()); + console.log("Field AutoNumber Suffix: " + autoNumber.getSuffix()); + if (autoNumber.getStartNumber() != null) { + console.log("Field AutoNumber StartNumber: " + autoNumber.getStartNumber().toString()); + } + } + if(field.getDefaultValue() != null){ + console.log("Field DefaultValue: " + field.getDefaultValue().toString()); + } + console.log("Field DisplayType: " + field.getDisplayType()); + if(field.getValidationRule() != null) { + console.log("Field ValidationRule: \n"); + Array.from(field.getValidationRule().keys()).forEach(key => { + console.log(key + ": " + field.getValidationRule().get(key)); + }); + } + console.log("Get field type" + field.getType()); + let external = field.getExternal(); + if (external != null) { + console.log("Field External Show: " + external.getShow()); + console.log("Field External Type: " + external.getType()); + console.log("Field External AllowMultipleConfig: " + external.getAllowMultipleConfig()); + } + //get multi user lookup for field + if (field.getMultiuserlookup() != null) { + let multiuserlookup = field.getMultiuserlookup(); + //get displaylabel of multiuser lookup + console.log("Field MultiUserLookup DisplayLabel" + multiuserlookup.getDisplayLabel()); + //get linking module of multiuser lookup + console.log("Field MultiUserLookup LinkingModule" + multiuserlookup.getLinkingModule()); + //get lookup apiname of multiuser lookup + console.log("Field MultiUserLookup LookupApiname" + multiuserlookup.getLookupApiname()); + //get apiname of multiuser lookup + console.log("Field MultiUserLookup APIName" + multiuserlookup.getAPIName()); + //get id of multiuser lookup + console.log("Field MultiUserLookup ID" + multiuserlookup.getId()); + //get connected module of multiuser lookup + console.log("Field MultiUserLookup ConnectedModule" + multiuserlookup.getConnectedModule()); + //get connected lookup apiname of multiuser lookup + console.log("Field MultiUserLookup ConnectedlookupApiname" + multiuserlookup.getConnectedlookupApiname()); + } + } + static async printPickListValue(pickListValue) { + console.log("Field PickListValue DisplayValue: " + pickListValue.getDisplayValue()); + if (pickListValue.getSequenceNumber() != null) { + console.log("Field PickListValue SequenceNumber: " + pickListValue.getSequenceNumber().toString()); + } + console.log("Field PickListValue ExpectedDataType: " + pickListValue.getExpectedDataType()); + if (pickListValue.getMaps() != null) { + pickListValue.getMaps().forEach(map => { + console.log("Field PickListValue Maps APIName: " + map.getAPIName()); + let pickListValues = map.getPickListValues(); + if (pickListValues != null) { + pickListValues.forEach(async pickListValue1 => { + await this.printPickListValue(pickListValue1); + }); + } + }); + } + console.log("Field PickListValue ActualValue: " + pickListValue.getActualValue()); + console.log("Field PickListValue SysRefName: " + pickListValue.getSysRefName()); + console.log("Field PickListValue Type: " + pickListValue.getType()); + console.log("Field PickListValue Id: " + pickListValue.getId()); + } +} +await GetLayouts.initialize(); +let moduleAPIName = "leads"; +await GetLayouts.getLayouts(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/massChangeOwner/changeOwner.js b/versions/3.0.0/samples/massChangeOwner/changeOwner.js new file mode 100644 index 0000000..3c15712 --- /dev/null +++ b/versions/3.0.0/samples/massChangeOwner/changeOwner.js @@ -0,0 +1,84 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class ChangeOwner +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async changeOwner(moduleAPIName) + { + let massChangeOwnerOperations = new ZOHOCRMSDK.ChangeMassOwner.MassChangeOwnerOperations(); + let bodyWrapper = new ZOHOCRMSDK.ChangeMassOwner.BodyWrapper(); + bodyWrapper.setCvid(440248001996n); + let owner = new ZOHOCRMSDK.ChangeMassOwner.Owner(); + owner.setId(440248054001n); + await bodyWrapper.setOwner(owner); + let terrirtory = new ZOHOCRMSDK.ChangeMassOwner.Territory(); + terrirtory.setId(435238954372342n); + await bodyWrapper.setTerritory(terrirtory); + let response = await massChangeOwnerOperations.changeOwner(moduleAPIName, bodyWrapper); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.ChangeMassOwner.ActionWrapper) { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getData(); + if (actionResponses != null) { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.ChangeMassOwner.SuccessResponse) { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.ChangeMassOwner.APIException) { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } else if (actionHandler instanceof ZOHOCRMSDK.ChangeMassOwner.APIException) { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let moduleAPIName = "Calls"; +await ChangeOwner.initialize(); +await ChangeOwner.changeOwner(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/massChangeOwner/checkStatus.js b/versions/3.0.0/samples/massChangeOwner/checkStatus.js new file mode 100644 index 0000000..94fda5f --- /dev/null +++ b/versions/3.0.0/samples/massChangeOwner/checkStatus.js @@ -0,0 +1,59 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class CheckStatus +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async checkStatus(jobId, module) + { + let massChangeOwnerOperations = new ZOHOCRMSDK.ChangeMassOwner.MassChangeOwnerOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.ChangeMassOwner.CheckStatusParam.JOB_ID, jobId); + let response = await massChangeOwnerOperations.checkStatus(module, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.ChangeMassOwner.ResponseWrapper) { + let responseWrapper = responseHandler; + let status = responseWrapper.getData(); + status.forEach(status1 => { + console.log("MassChangeOwner TotalCount : " + status1.getTotalCount() + '\n'); + console.log("MassChangeOwner UpdatedCount : " + status1.getUpdatedCount() + '\n'); + console.log("MassChangeOwner NotUpdatedCount : " + status1.getNotUpdatedCount() + '\n'); + console.log("MassChangeOwner FailedCount : " + status1.getFailedCount() + '\n'); + console.log("MassChangeOwner Status : " + status1.getStatus() + '\n'); + }); + } else if (responseHandler instanceof ZOHOCRMSDK.ChangeMassOwner.APIException) { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let jonId = 44024800377005n; +let module = "leads"; +await CheckStatus.initialize(); +await CheckStatus.checkStatus(jonId, module); \ No newline at end of file diff --git a/versions/3.0.0/samples/massConvert/getJobStatus.js b/versions/3.0.0/samples/massConvert/getJobStatus.js new file mode 100644 index 0000000..afcefd3 --- /dev/null +++ b/versions/3.0.0/samples/massConvert/getJobStatus.js @@ -0,0 +1,58 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetJobStatus +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getJobStatus(jobId) + { + let massCovertOperations = new ZOHOCRMSDK.ConvertMass.MassConvertOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.ConvertMass.GetJobStatusParam.JOB_ID, jobId); + let response = await massCovertOperations.getJobStatus(paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.ConvertMass.ResponseWrapper) { + let responseWrapper = responseHandler; + let status = responseWrapper.getData(); + status.forEach(status1 => { + console.log("MassConvert TotalCount : " + status1.getTotalCount() + '\n'); + console.log("MassConvert ConvertedCount : " + status1.getConvertedCount() + '\n'); + console.log("MassConvert NotConvertedCount: " + status1.getNotConvertedCount() + "\n"); + console.log("MassConvert FailedCount : " + status1.getFailedCount() + '\n'); + console.log("MassConvert Status : " + status1.getStatus() + '\n'); + }); + } else if (responseHandler instanceof ZOHOCRMSDK.ConvertMass.APIException) { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let jobId = 4402480004n; +await GetJobStatus.initialize(); +await GetJobStatus.getJobStatus(jobId); \ No newline at end of file diff --git a/versions/3.0.0/samples/massConvert/massConvert.js b/versions/3.0.0/samples/massConvert/massConvert.js new file mode 100644 index 0000000..3481d00 --- /dev/null +++ b/versions/3.0.0/samples/massConvert/massConvert.js @@ -0,0 +1,88 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class MassConvert +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async massConvert() + { + let massconvertoperations = new ZOHOCRMSDK.ConvertMass.MassConvertOperations(); + let bodyWrapper = new ZOHOCRMSDK.ConvertMass.Convert(); + bodyWrapper.setIds(["44024804002", "4402401286021"]); + let deals = new ZOHOCRMSDK.Record.Record(); + await deals.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.AMOUNT, 1000.0); + await deals.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.DEAL_NAME, 'SDK'); + await deals.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.CLOSING_DATE, new Date(2020, 10, 12)); + await deals.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.PIPELINE, new ZOHOCRMSDK.Choice("Standard(Standard)")); + await deals.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.STAGE, new ZOHOCRMSDK.Choice("Closed Won")); + await bodyWrapper.setDeals(deals); + let carryOvertags = new ZOHOCRMSDK.ConvertMass.MoveAttachmentsTo(); + carryOvertags.setId(4325423423n); + carryOvertags.setAPIName("Contacts"); + bodyWrapper.setCarryOverTags([carryOvertags]); + let relatedModules = []; + let relatedModule = new ZOHOCRMSDK.ConvertMass.RelatedModule(); + relatedModule.setAPIName("Tasks"); + relatedModule.setId(40032424343n); + relatedModules.push(relatedModule); + relatedModule = new ZOHOCRMSDK.ConvertMass.RelatedModule(); + relatedModule.setAPIName("Tasks"); + relatedModule.setId(40032424343n); + relatedModules.push(relatedModule); + bodyWrapper.setRelatedModules(relatedModules); + let assignTo = new ZOHOCRMSDK.ConvertMass.AssignTo(); + assignTo.setId(44024800254001n); + await bodyWrapper.setAssignTo(assignTo); + let move_attachmnets_to = new ZOHOCRMSDK.ConvertMass.MoveAttachmentsTo(); + move_attachmnets_to.setAPIName("Contacts"); + move_attachmnets_to.setId(439999999234232n); + await bodyWrapper.setMoveAttachmentsTo(move_attachmnets_to); + let response = await massconvertoperations.massConvert(bodyWrapper); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.ConvertMass.SuccessResponse) + { + let successResponse = actionHandler; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + else if (actionHandler instanceof ZOHOCRMSDK.ConvertMass.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await MassConvert.initialize(); +await MassConvert.massConvert(); \ No newline at end of file diff --git a/versions/3.0.0/samples/massDeletecvid/MassDeleteRecordId.js b/versions/3.0.0/samples/massDeletecvid/MassDeleteRecordId.js new file mode 100644 index 0000000..6dc902f --- /dev/null +++ b/versions/3.0.0/samples/massDeletecvid/MassDeleteRecordId.js @@ -0,0 +1,97 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class MassDeleteRecordId +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async massDeleteRecordId(moduleAPIName) + { + let massDeleteCvidOperations = new ZOHOCRMSDK.CvidDeleteMass.MassDeleteCvidOperations(moduleAPIName); + let bodyWrapper = new ZOHOCRMSDK.CvidDeleteMass.RecordIdBodyWrapper(); + bodyWrapper.setIds(["4402481177154"]); + let territory = new ZOHOCRMSDK.CvidDeleteMass.Territory(); + territory.setId(0n); + territory.setIncludeChild(true); + await bodyWrapper.setTerritory(territory); + let response = await massDeleteCvidOperations.massDeleteByRecordId(bodyWrapper); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.CvidDeleteMass.ActionWrapper) { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getData(); + if (actionResponses != null) { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.CvidDeleteMass.SuccessResponse) { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.CvidDeleteMass.MassDeleteScheduled) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.CvidDeleteMass.APIException) { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } else if (actionHandler instanceof ZOHOCRMSDK.CvidDeleteMass.APIException) { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let moduleAPIName = "Leads"; +await MassDeleteRecordId.initialize(); +await MassDeleteRecordId.massDeleteRecordId(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/massDeletecvid/getMassDeleteStatus.js b/versions/3.0.0/samples/massDeletecvid/getMassDeleteStatus.js new file mode 100644 index 0000000..c701b18 --- /dev/null +++ b/versions/3.0.0/samples/massDeletecvid/getMassDeleteStatus.js @@ -0,0 +1,62 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetMassDeleteStatus +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getMassDeleteStatus(jobId, moduleAPIName) + { + let massDeleteCvidoperations = new ZOHOCRMSDK.CvidDeleteMass.MassDeleteCvidOperations(moduleAPIName); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.CvidDeleteMass.GetMassDeleteStatusParam.JOB_ID, jobId); + let response = await massDeleteCvidoperations.getMassDeleteStatus(paramInstance); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + '\n'); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.CvidDeleteMass.ResponseWrapper){ + let responseWrapper = responseHandler; + let status = responseWrapper.getData(); + status.forEach(status1 => { + console.log("MassDelete TotalCount : " + status1.getTotalCount() + "\n"); + console.log("MassDelete ConvertedCount : " + status1.getDeletedCount() + "\n"); + console.log("MassDelete FailedCount : " + status1.getFailedCount() + "\n"); + console.log("MassDelete Status : " + status1.getStatus().getValue() + "\n"); + }); + } + else if (responseHandler instanceof ZOHOCRMSDK.CvidDeleteMass.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let id = 440248177154n; +let moduleAPIName = "Calls"; +await GetMassDeleteStatus.initialize(); +await GetMassDeleteStatus.getMassDeleteStatus(id, moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/massDeletecvid/massDeleteByCvid.js b/versions/3.0.0/samples/massDeletecvid/massDeleteByCvid.js new file mode 100644 index 0000000..95cc6ac --- /dev/null +++ b/versions/3.0.0/samples/massDeletecvid/massDeleteByCvid.js @@ -0,0 +1,97 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class MassDeleteByCvid +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async massDeleteByCvid(moduleAPIName) + { + let massDeleteCvidOperations = new ZOHOCRMSDK.CvidDeleteMass.MassDeleteCvidOperations(moduleAPIName); + let bodyWrapper = new ZOHOCRMSDK.CvidDeleteMass.CvidBodyWrapper(); + bodyWrapper.setCvid(44024800296n); + let territory = new ZOHOCRMSDK.CvidDeleteMass.Territory(); + territory.setId(0n); + territory.setIncludeChild(true); + await bodyWrapper.setTerritory(territory); + let response = await massDeleteCvidOperations.massDeleteByCvid(bodyWrapper); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.CvidDeleteMass.ActionWrapper) { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getData(); + if (actionResponses != null) { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.CvidDeleteMass.SuccessResponse) { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.CvidDeleteMass.MassDeleteScheduled) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.CvidDeleteMass.APIException) { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } else if (actionHandler instanceof ZOHOCRMSDK.CvidDeleteMass.APIException) { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let moduleAPIName = "Calls"; +await MassDeleteByCvid.initialize(); +await MassDeleteByCvid.massDeleteByCvid(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/modules/GetModuleById.js b/versions/3.0.0/samples/modules/GetModuleById.js new file mode 100644 index 0000000..bdc7464 --- /dev/null +++ b/versions/3.0.0/samples/modules/GetModuleById.js @@ -0,0 +1,239 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetModuleById { + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Module

+ * This method is used to get metadata about single module with it's API Name and print the response. + * @param {BigInt} id The API Name of the module to obtain metadata + */ + static async getModuleById(id) { + let modulesOperations = new ZOHOCRMSDK.Modules.ModulesOperations(); + let response = await modulesOperations.getModule(id); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Modules.ResponseWrapper) { + let modules = responseObject.getModules(); + for (const module of modules) { + console.log("Module GlobalSearchSupported: " + module.getGlobalSearchSupported()); + if (module.getKanbanView() != null) { + console.log("Module KanbanView: " + module.getKanbanView()); + } + console.log("Module Deletable: " + module.getDeletable()); + console.log("Module Description: " + module.getDescription()); + console.log("Module Creatable: " + module.getCreatable()); + if (module.getFilterStatus() != null) { + console.log("Module FilterStatus: " + module.getFilterStatus()); + } + console.log("Module InventoryTemplateSupported: " + module.getInventoryTemplateSupported()); + if (module.getModifiedTime() != null) { + console.log("Module ModifiedTime: " + module.getModifiedTime()); + } + console.log("Module PluralLabel: " + module.getPluralLabel()); + console.log("Module PresenceSubMenu: " + module.getPresenceSubMenu()); + console.log("Module TriggersSupported: " + module.getTriggersSupported()); + console.log("Module Id: " + module.getId()); + console.log("Module IsBlueprintSupported: " + module.getIsblueprintsupported()); + let relatedListProperties = module.getRelatedListProperties(); + if (relatedListProperties != null) { + console.log("Module RelatedListProperties SortBy: " + relatedListProperties.getSortBy()); + let fields = relatedListProperties.getFields(); + if (fields != null) { + fields.forEach(fieldName => { + console.log("Module RelatedListProperties Fields: " + fieldName); + }); + } + console.log("Module RelatedListProperties SortOrder: " + relatedListProperties.getSortOrder()); + } + console.log("Module PerPage: " + module.getPerPage()); + let properties = module.getProperties(); + if (properties != null) { + properties.forEach(fieldName => { + console.log("Module Properties Fields: " + fieldName); + }); + } + console.log("Module visible: " + module.getVisible()); + console.log("Module Visibility: " + module.getVisibility()); + console.log("Module Convertable: " + module.getConvertable()); + console.log("Module Editable: " + module.getEditable()); + console.log("Module EmailtemplateSupport: " + module.getEmailtemplateSupport()); + let profiles = module.getProfiles(); + if (profiles != null) { + profiles.forEach(profile => { + console.log("Module Profile Name: " + profile.getName()); + console.log("Module Profile Id: " + profile.getId()); + }); + } + console.log("Module FilterSupported: " + module.getFilterSupported()); + let onDemandProperties = module.getOnDemandProperties(); + if(onDemandProperties != null) { + onDemandProperties.forEach(fieldName => { + console.log("Module onDemandProperties Fields: " + fieldName); + }); + } + console.log("Module DisplayField: " + module.getDisplayField()); + let searchLayoutFields = module.getSearchLayoutFields(); + if (searchLayoutFields != null) { + searchLayoutFields.forEach(fieldName => { + console.log("Module SearchLayoutFields Fields: " + fieldName); + }); + } + if (module.getKanbanViewSupported() != null) { + console.log("Module KanbanViewSupported: " + module.getKanbanViewSupported()); + } + console.log("Module ShowAsTab: " + module.getShowAsTab()); + console.log("Module WebLink: " + module.getWebLink()); + console.log("Module SequenceNumber: " + module.getSequenceNumber()); + console.log("Module SingularLabel: " + module.getSingularLabel()); + console.log("Module Viewable: " + module.getViewable()); + console.log("Module APISupported: " + module.getAPISupported()); + console.log("Module APIName: " + module.getAPIName()); + console.log("Module QuickCreate: " + module.getQuickCreate()); + let modifiedBy = module.getModifiedBy(); + if (modifiedBy != null) { + console.log("Module Modified By User-Name: " + modifiedBy.getName()); + console.log("Module Modified By User-ID: " + modifiedBy.getId()); + } + console.log("Module GeneratedType: " + module.getGeneratedType().getValue()); + console.log("Module FeedsRequired: " + module.getFeedsRequired()); + console.log("Module ScoringSupported: " + module.getScoringSupported()); + console.log("Module WebformSupported: " + module.getWebformSupported()); + let moduleArguments = module.getArguments(); + if (moduleArguments != null) { + moduleArguments.forEach(argument => { + console.log("Module Argument Name: " + argument.getName()); + console.log("Module Argument Value: " + argument.getValue()); + }); + } + console.log("Module ModuleName: " + module.getModuleName()); + console.log("Module BusinessCardFieldLimit: " + module.getBusinessCardFieldLimit()); + let customView = module.getCustomView(); + if (customView != null) { + await this.printCustomView(customView); + } + let parentModule = module.getParentModule(); + if (parentModule != null && parentModule.getAPIName() != null) { + console.log("Module Parent Module Name: " + parentModule.getAPIName()); + console.log("Module Parent Module Id: " + parentModule.getId()); + } + } + } + else if (responseObject instanceof ZOHOCRMSDK.Modules.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } + static async printCustomView(customView) { + console.log("CustomView DisplayValue: " + customView.getDisplayValue()); + if(customView.getCreatedTime() != null) { + console.log("Module CustomView CreatedTime: " + customView.getCreatedTime()); + } + console.log("Module CustomView AccessType: " + customView.getAccessType()); + let criteria = customView.getCriteria(); + if (criteria != null) { + await this.printCriteria(criteria); + } + console.log("CustomView SystemName: " + customView.getSystemName()); + console.log("CustomView SortBy: " + customView.getSortBy()); + let createdBy = customView.getCreatedBy(); + if(createdBy != null) { + console.log("Module Created By User-Name: " + createdBy.getName()); + console.log("Module Created By User-ID: " + createdBy.getId()); + } + let sharedToDetails = customView.getSharedTo(); + if(sharedToDetails != null) { + sharedToDetails.forEach(sharedTo => { + console.log("SharedDetails Name: " + sharedTo.getName()); + console.log("SharedDetails ID: " + sharedTo.getId()); + console.log("SharedDetails Type: " + sharedTo.getType()); + console.log("SharedDetails Subordinates: " + sharedTo.getSubordinates()); + }); + } + console.log("CustomView Default: " + customView.getDefault()); + if(customView.getModifiedTime() != null) { + console.log("Module CustomView ModifiedTime: " + customView.getModifiedTime()); + } + console.log("CustomView Name: " + customView.getName()); + console.log("CustomView SystemDefined: " + customView.getSystemDefined()); + let modifiedBy = customView.getModifiedBy(); + if(modifiedBy != null) { + console.log("Module Modified By User-Name: " + modifiedBy.getName()); + console.log("Module Modified By User-ID: " + modifiedBy.getId()); + } + console.log("CustomView ID: " + customView.getId()); + let fields = customView.getFields(); + if (fields != null) { + console.log("Fields"); + fields.forEach(field => { + console.log("Module CustomView Field APIName: " + field.getAPIName()); + console.log("Module CustomView Field ID: " + field.getId()); + }); + } + console.log("CustomView Category: " + customView.getCategory()); + if(customView.getLastAccessedTime() != null) + { + console.log("Module CustomView LastAccessedTime: " + customView.getLastAccessedTime()); + } + if (customView.getFavorite() != null) { + console.log("CustomView Favorite: " + customView.getFavorite()); + } + if (customView.getSortOrder() != null) { + console.log("CustomView SortOrder: " + customView.getSortOrder()); + } + } + static async printCriteria(criteria) { + if (criteria.getComparator() != null) { + console.log("CustomView Criteria Comparator: " + criteria.getComparator()); + } + if (criteria.getField() != null) { + console.log("CustomView Criteria Field: " + criteria.getField()); + } + let field = criteria.getField(); + if (field != null) { + console.log("CustomView Criteria Field APIName : " + field.getAPIName()); + console.log("CustomView Criteria Field Id: " + field.getId()); + } + if (criteria.getValue() != null) { + console.log("CustomView Criteria Value: " + criteria.getValue()); + } + let criteriaGroup = criteria.getGroup(); + if (criteriaGroup != null) { + for (const eachCriteria of criteriaGroup) + { + await this.printCriteria(eachCriteria); + } + } + if (criteria.getGroupOperator() != null) { + console.log("CustomView Criteria Group Operator: " + criteria.getGroupOperator().getValue()); + } + } +} +await GetModuleById.initialize(); +let id = 44024800037n; +await GetModuleById.getModuleById(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/modules/getModuleByAPIName.js b/versions/3.0.0/samples/modules/getModuleByAPIName.js new file mode 100644 index 0000000..d9d80c0 --- /dev/null +++ b/versions/3.0.0/samples/modules/getModuleByAPIName.js @@ -0,0 +1,239 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetModuleByAPIName { + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Module

+ * This method is used to get metadata about single module with it's API Name and print the response. + * @param {String} moduleAPIName The API Name of the module to obtain metadata + */ + static async getModuleByAPIName(moduleAPIName) { + let modulesOperations = new ZOHOCRMSDK.Modules.ModulesOperations(); + let response = await modulesOperations.getModuleByAPIName(moduleAPIName); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Modules.ResponseWrapper) { + let modules = responseObject.getModules(); + for (const module of modules) { + console.log("Module GlobalSearchSupported: " + module.getGlobalSearchSupported()); + if (module.getKanbanView() != null) { + console.log("Module KanbanView: " + module.getKanbanView()); + } + console.log("Module Deletable: " + module.getDeletable()); + console.log("Module Description: " + module.getDescription()); + console.log("Module Creatable: " + module.getCreatable()); + if (module.getFilterStatus() != null) { + console.log("Module FilterStatus: " + module.getFilterStatus()); + } + console.log("Module InventoryTemplateSupported: " + module.getInventoryTemplateSupported()); + if (module.getModifiedTime() != null) { + console.log("Module ModifiedTime: " + module.getModifiedTime()); + } + console.log("Module PluralLabel: " + module.getPluralLabel()); + console.log("Module PresenceSubMenu: " + module.getPresenceSubMenu()); + console.log("Module TriggersSupported: " + module.getTriggersSupported()); + console.log("Module Id: " + module.getId()); + console.log("Module IsBlueprintSupported: " + module.getIsblueprintsupported()); + let relatedListProperties = module.getRelatedListProperties(); + if (relatedListProperties != null) { + console.log("Module RelatedListProperties SortBy: " + relatedListProperties.getSortBy()); + let fields = relatedListProperties.getFields(); + if (fields != null) { + fields.forEach(fieldName => { + console.log("Module RelatedListProperties Fields: " + fieldName); + }); + } + console.log("Module RelatedListProperties SortOrder: " + relatedListProperties.getSortOrder()); + } + console.log("Module PerPage: " + module.getPerPage()); + let properties = module.getProperties(); + if (properties != null) { + properties.forEach(fieldName => { + console.log("Module Properties Fields: " + fieldName); + }); + } + console.log("Module visible: " + module.getVisible()); + console.log("Module Visibility: " + module.getVisibility()); + console.log("Module Convertable: " + module.getConvertable()); + console.log("Module Editable: " + module.getEditable()); + console.log("Module EmailtemplateSupport: " + module.getEmailtemplateSupport()); + let profiles = module.getProfiles(); + if (profiles != null) { + profiles.forEach(profile => { + console.log("Module Profile Name: " + profile.getName()); + console.log("Module Profile Id: " + profile.getId()); + }); + } + console.log("Module FilterSupported: " + module.getFilterSupported()); + let onDemandProperties = module.getOnDemandProperties(); + if(onDemandProperties != null) { + onDemandProperties.forEach(fieldName => { + console.log("Module onDemandProperties Fields: " + fieldName); + }); + } + console.log("Module DisplayField: " + module.getDisplayField()); + let searchLayoutFields = module.getSearchLayoutFields(); + if (searchLayoutFields != null) { + searchLayoutFields.forEach(fieldName => { + console.log("Module SearchLayoutFields Fields: " + fieldName); + }); + } + if (module.getKanbanViewSupported() != null) { + console.log("Module KanbanViewSupported: " + module.getKanbanViewSupported()); + } + console.log("Module ShowAsTab: " + module.getShowAsTab()); + console.log("Module WebLink: " + module.getWebLink()); + console.log("Module SequenceNumber: " + module.getSequenceNumber()); + console.log("Module SingularLabel: " + module.getSingularLabel()); + console.log("Module Viewable: " + module.getViewable()); + console.log("Module APISupported: " + module.getAPISupported()); + console.log("Module APIName: " + module.getAPIName()); + console.log("Module QuickCreate: " + module.getQuickCreate()); + let modifiedBy = module.getModifiedBy(); + if (modifiedBy != null) { + console.log("Module Modified By User-Name: " + modifiedBy.getName()); + console.log("Module Modified By User-ID: " + modifiedBy.getId()); + } + console.log("Module GeneratedType: " + module.getGeneratedType().getValue()); + console.log("Module FeedsRequired: " + module.getFeedsRequired()); + console.log("Module ScoringSupported: " + module.getScoringSupported()); + console.log("Module WebformSupported: " + module.getWebformSupported()); + let moduleArguments = module.getArguments(); + if (moduleArguments != null) { + moduleArguments.forEach(argument => { + console.log("Module Argument Name: " + argument.getName()); + console.log("Module Argument Value: " + argument.getValue()); + }); + } + console.log("Module ModuleName: " + module.getModuleName()); + console.log("Module BusinessCardFieldLimit: " + module.getBusinessCardFieldLimit()); + let customView = module.getCustomView(); + if (customView != null) { + await this.printCustomView(customView); + } + let parentModule = module.getParentModule(); + if (parentModule != null && parentModule.getAPIName() != null) { + console.log("Module Parent Module Name: " + parentModule.getAPIName()); + console.log("Module Parent Module Id: " + parentModule.getId()); + } + } + } + else if (responseObject instanceof ZOHOCRMSDK.Modules.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } + static async printCustomView(customView) { + console.log("CustomView DisplayValue: " + customView.getDisplayValue()); + if(customView.getCreatedTime() != null) { + console.log("Module CustomView CreatedTime: " + customView.getCreatedTime()); + } + console.log("Module CustomView AccessType: " + customView.getAccessType()); + let criteria = customView.getCriteria(); + if (criteria != null) { + await this.printCriteria(criteria); + } + console.log("CustomView SystemName: " + customView.getSystemName()); + console.log("CustomView SortBy: " + customView.getSortBy()); + let createdBy = customView.getCreatedBy(); + if(createdBy != null) { + console.log("Module Created By User-Name: " + createdBy.getName()); + console.log("Module Created By User-ID: " + createdBy.getId()); + } + let sharedToDetails = customView.getSharedTo(); + if(sharedToDetails != null) { + sharedToDetails.forEach(sharedTo => { + console.log("SharedDetails Name: " + sharedTo.getName()); + console.log("SharedDetails ID: " + sharedTo.getId()); + console.log("SharedDetails Type: " + sharedTo.getType()); + console.log("SharedDetails Subordinates: " + sharedTo.getSubordinates()); + }); + } + console.log("CustomView Default: " + customView.getDefault()); + if(customView.getModifiedTime() != null) { + console.log("Module CustomView ModifiedTime: " + customView.getModifiedTime()); + } + console.log("CustomView Name: " + customView.getName()); + console.log("CustomView SystemDefined: " + customView.getSystemDefined()); + let modifiedBy = customView.getModifiedBy(); + if(modifiedBy != null) { + console.log("Module Modified By User-Name: " + modifiedBy.getName()); + console.log("Module Modified By User-ID: " + modifiedBy.getId()); + } + console.log("CustomView ID: " + customView.getId()); + let fields = customView.getFields(); + if (fields != null) { + console.log("Fields"); + fields.forEach(field => { + console.log("Module CustomView Field APIName: " + field.getAPIName()); + console.log("Module CustomView Field ID: " + field.getId()); + }); + } + console.log("CustomView Category: " + customView.getCategory()); + if(customView.getLastAccessedTime() != null) + { + console.log("Module CustomView LastAccessedTime: " + customView.getLastAccessedTime()); + } + if (customView.getFavorite() != null) { + console.log("CustomView Favorite: " + customView.getFavorite()); + } + if (customView.getSortOrder() != null) { + console.log("CustomView SortOrder: " + customView.getSortOrder()); + } + } + static async printCriteria(criteria) { + if (criteria.getComparator() != null) { + console.log("CustomView Criteria Comparator: " + criteria.getComparator()); + } + if (criteria.getField() != null) { + console.log("CustomView Criteria Field: " + criteria.getField()); + } + let field = criteria.getField(); + if (field != null) { + console.log("CustomView Criteria Field APIName : " + field.getAPIName()); + console.log("CustomView Criteria Field Id: " + field.getId()); + } + if (criteria.getValue() != null) { + console.log("CustomView Criteria Value: " + criteria.getValue()); + } + let criteriaGroup = criteria.getGroup(); + if (criteriaGroup != null) { + for (const eachCriteria of criteriaGroup) + { + await this.printCriteria(eachCriteria); + } + } + if (criteria.getGroupOperator() != null) { + console.log("CustomView Criteria Group Operator: " + criteria.getGroupOperator().getValue()); + } + } +} +await GetModuleByAPIName.initialize(); +let moduleAPIName = "leads" +await GetModuleByAPIName.getModuleByAPIName(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/modules/getModules.js b/versions/3.0.0/samples/modules/getModules.js new file mode 100644 index 0000000..6c9a099 --- /dev/null +++ b/versions/3.0.0/samples/modules/getModules.js @@ -0,0 +1,119 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetModules{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Modules

+ * This method is used to get metadata about all the modules and print the response. + */ + static async getModules() { + let modulesOperations = new ZOHOCRMSDK.Modules.ModulesOperations(); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + //Add header to HeaderMap instance, if necessary + await headerInstance.add(ZOHOCRMSDK.Modules.GetModulesHeader.IF_MODIFIED_SINCE, new Date("2020-07-13T12:12:12+05:30")); + //Call getModules method that takes headerInstance as parameters + let response = await modulesOperations.getModules(headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Modules.ResponseWrapper) { + let modules = responseObject.getModules(); + modules.forEach(module => { + console.log("Module GlobalSearchSupported: " + module.getGlobalSearchSupported()); + console.log("Module Deletable: " + module.getDeletable()); + console.log("Module Description: " + module.getDescription()); + console.log("Module Creatable: " + module.getCreatable()); + console.log("Module InventoryTemplateSupported: " + module.getInventoryTemplateSupported()); + if (module.getModifiedTime() != null) { + console.log("Module ModifiedTime: " + module.getModifiedTime()); + } + console.log("Module PluralLabel: " + module.getPluralLabel()); + console.log("Module PresenceSubMenu: " + module.getPresenceSubMenu()); + console.log("Module TriggersSupported: " + module.getTriggersSupported()); + console.log("Module Id: " + module.getId()); + console.log("Module IsBlueprintSupported: " + module.getIsblueprintsupported()); + console.log("Module Visible: " + module.getVisible()); + console.log("Module Visibility: " + module.getVisibility()); + console.log("Module Convertable: " + module.getConvertable()); + console.log("Module Editable: " + module.getEditable()); + console.log("Module EmailtemplateSupport: " + module.getEmailtemplateSupport()); + let onDemandProperties = module.getOnDemandProperties(); + if(onDemandProperties != null) { + onDemandProperties.forEach(fieldName => { + console.log("Module onDemandProperties Fields: " + fieldName); + }); + } + let profiles = module.getProfiles(); + if (profiles != null) { + profiles.forEach(profile => { + console.log("Module Profile Name: " + profile.getName()); + console.log("Module Profile Id: " + profile.getId()); + }); + } + console.log("Module FilterSupported: " + module.getFilterSupported()); + console.log("Module ShowAsTab: " + module.getShowAsTab()); + console.log("Module WebLink: " + module.getWebLink()); + console.log("Module SequenceNumber: " + module.getSequenceNumber()); + console.log("Module SingularLabel: " + module.getSingularLabel()); + console.log("Module Viewable: " + module.getViewable()); + console.log("Module APISupported: " + module.getAPISupported()); + console.log("Module APIName: " + module.getAPIName()); + console.log("Module QuickCreate: " + module.getQuickCreate()); + let modifiedBy = module.getModifiedBy(); + if (modifiedBy != null) { + console.log("Module Modified By User-Name: " + modifiedBy.getName()); + console.log("Module Modified By User-ID: " + modifiedBy.getId()); + } + console.log("Module GeneratedType: " + module.getGeneratedType().getValue()); + console.log("Module FeedsRequired: " + module.getFeedsRequired()); + console.log("Module ScoringSupported: " + module.getScoringSupported()); + console.log("Module WebformSupported: " + module.getWebformSupported()); + let moduleArguments = module.getArguments(); + if (moduleArguments != null) { + moduleArguments.forEach(argument => { + console.log("Module Argument Name: " + argument.getName()); + console.log("Module Argument Value: " + argument.getValue()); + }); + } + console.log("Module ModuleName: " + module.getModuleName()); + console.log("Module BusinessCardFieldLimit: " + module.getBusinessCardFieldLimit()); + let parentModule = module.getParentModule(); + if (parentModule != null && parentModule.getAPIName() != null) { + console.log("Module Parent Module Name: " + parentModule.getAPIName()); + console.log("Module Parent Module Id: " + parentModule.getId()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Modules.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetModules.initialize(); +await GetModules.getModules(); \ No newline at end of file diff --git a/versions/3.0.0/samples/modules/updateModuleByAPIName.js b/versions/3.0.0/samples/modules/updateModuleByAPIName.js new file mode 100644 index 0000000..1f78e57 --- /dev/null +++ b/versions/3.0.0/samples/modules/updateModuleByAPIName.js @@ -0,0 +1,89 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateModuleByAPIName{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Module By APIName

+ * This method is used to update module details using module APIName and print the response. + * @param {String} moduleAPIName The API Name of the module to update + */ + static async updateModuleByAPIName(moduleAPIName) { + //example + //let moduleAPIName = "module_api_name"; + let modulesOperations = new ZOHOCRMSDK.Modules.ModulesOperations(); + let modulesArray = []; + let profilesArray = []; + let profile = new ZOHOCRMSDK.Profiles.MinifiedProfile(); + profile.setId(34770610026014n); + //Add Profile instance to the array + profilesArray.push(profile); + let module = new ZOHOCRMSDK.Modules.Modules(); + module.setProfiles(profilesArray); + //Add the Module instance to array + modulesArray.push(module); + let request = new ZOHOCRMSDK.Modules.BodyWrapper(); + request.setModules(modulesArray); + //Call updateModuleByAPIName method that takes BodyWrapper instance and moduleAPIName as parameter + let response = await modulesOperations.updateModuleByAPIName(moduleAPIName, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Modules.ActionWrapper) { + let actionResponses = responseObject.getModules(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Modules.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Modules.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Modules.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await UpdateModuleByAPIName.initialize(); +let moduleAPIName = "leads"; +await UpdateModuleByAPIName.updateModuleByAPIName(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/modules/updateModuleById.js b/versions/3.0.0/samples/modules/updateModuleById.js new file mode 100644 index 0000000..82d5c37 --- /dev/null +++ b/versions/3.0.0/samples/modules/updateModuleById.js @@ -0,0 +1,91 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateModuleById{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Module By Id

+ * This method is used to update module details using module Id and print the response. + * @param {BigInt} moduleId The ID of the module to be updated. + */ + static async updateModuleById(moduleId) { + //example + //moduleId = 252001n + let modulesOperations = new ZOHOCRMSDK.Modules.ModulesOperations(); + let modulesArray = []; + let profilesArray = []; + let profile = new ZOHOCRMSDK.Profiles.MinifiedProfile(); + let module = new ZOHOCRMSDK.Modules.Modules(); + profile.setId(34770610026014n); + profile.setDelete(true); + //Add the Profile instance to the array. + profilesArray.push(profile); + module.setProfiles(profilesArray); + module.setAPIName("Test1"); + //Add the Module instance to the array + modulesArray.push(module); + let request = new ZOHOCRMSDK.Modules.BodyWrapper(); + request.setModules(modulesArray); + //Call updateModuleById method that takes BodyWrapper instance and moduleAPIName as parameter + let response = await modulesOperations.updateModule(moduleId, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Modules.ActionWrapper) { + let actionResponses = responseObject.getModules(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Modules.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key));; + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Modules.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Modules.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await UpdateModuleById.initialize(); +let moduleId = 40021n; +await UpdateModuleById.updateModuleById(moduleId); \ No newline at end of file diff --git a/versions/3.0.0/samples/notes/createNotes.js b/versions/3.0.0/samples/notes/createNotes.js new file mode 100644 index 0000000..5e0f43f --- /dev/null +++ b/versions/3.0.0/samples/notes/createNotes.js @@ -0,0 +1,88 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class CreateNotes{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Create Notes

+ * This method is used to add new notes and print the response. + */ + static async createNotes() { + let notesOperations = new ZOHOCRMSDK.Notes.NotesOperations(); + let bodyWrapper = new ZOHOCRMSDK.Notes.BodyWrapper(); + //Array to hold Note instances + let notesArray = []; + for (let index = 0; index < 1; index++) { + let note = new ZOHOCRMSDK.Notes.Note(); + note.setNoteContent("Need to do further tracking"); + note.setNoteTitle("Contacted"); + let parentRecord = new ZOHOCRMSDK.Record.Record(); + parentRecord.setId(4402480774074n); + await note.setParentId(parentRecord); + note.setSeModule(new ZOHOCRMSDK.Choice("Leads")); + //Add Note instance to the array + notesArray.push(note); + } + bodyWrapper.setData(notesArray); + //Call createNotes method that takes BodyWrapper instance as parameter + let response = await notesOperations.createNotes(bodyWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Notes.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Notes.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Notes.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Notes.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await CreateNotes.initialize(); +await CreateNotes.createNotes(); \ No newline at end of file diff --git a/versions/3.0.0/samples/notes/deleteNote.js b/versions/3.0.0/samples/notes/deleteNote.js new file mode 100644 index 0000000..9031145 --- /dev/null +++ b/versions/3.0.0/samples/notes/deleteNote.js @@ -0,0 +1,76 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteNote{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + * This method is used to delete a single note with ID and print the response. + * @param {BigInt} noteId The ID of the note to be deleted + */ + static async deleteNote(noteId) { + //example + //let noteId = 549003n + let notesOperations = new ZOHOCRMSDK.Notes.NotesOperations(); + //Call deleteNote method that takes noteID as parameter + let response = await notesOperations.deleteNote(noteId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Notes.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Notes.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Notes.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Notes.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await DeleteNote.initialize(); +let noteId = 44024801378005n; +await DeleteNote.deleteNote(noteId); diff --git a/versions/3.0.0/samples/notes/deleteNotes.js b/versions/3.0.0/samples/notes/deleteNotes.js new file mode 100644 index 0000000..1ab6a6d --- /dev/null +++ b/versions/3.0.0/samples/notes/deleteNotes.js @@ -0,0 +1,81 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteNotes{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + * This method is used to delete notes in bulk and print the response. + * @param {Array} noteIds The array of Note IDs to be deleted + */ + static async deleteNotes(noteIds) { + //example + //let noteIds = [648001n, 648005n]; + let notesOperations = new ZOHOCRMSDK.Notes.NotesOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + //Add the ids to ParameterMap instance' + for (let noteId of noteIds) { + await paramInstance.add(ZOHOCRMSDK.Notes.DeleteNotesParam.IDS, noteId); + } + //Call deleteNotes method that takes paramInstance as parameter + let response = await notesOperations.deleteNotes(paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Notes.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Notes.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Notes.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Notes.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await DeleteNotes.initialize(); +let noteIds = [648001n, 648005n]; +await DeleteNotes.deleteNotes(noteIds); \ No newline at end of file diff --git a/versions/3.0.0/samples/notes/getNote.js b/versions/3.0.0/samples/notes/getNote.js new file mode 100644 index 0000000..4ee9b01 --- /dev/null +++ b/versions/3.0.0/samples/notes/getNote.js @@ -0,0 +1,144 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetNote{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Note

+ * This method is used to get the note and print the response. + * @param {BigInt} noteId The ID of the Note to be obtained + */ + static async getNote(noteId) { + //example + //let noteId = 549003n + let notesOperations = new ZOHOCRMSDK.Notes.NotesOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters for Get Note */ + // await paramInstance.add(ZOHOCRMSDK.Notes.GetNoteParam.FIELDS, "id, Note_Content") + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + /* Possible headers for Get Note */ + // await headerInstance.add(ZOHOCRMSDK.Notes.GetNoteHeader.IF_MODIFIED_SINCE, new Date()); + //Call getNote method that takes noteId as parameter + let response = await notesOperations.getNote(noteId, paramInstance, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Notes.ResponseWrapper) { + let notes = responseObject.getData(); + notes.forEach(note => { + let owner = note.getOwner(); + if (owner != null) { + console.log("Note Owner User-Name: " + owner.getName()); + console.log("Note Owner User-ID: " + owner.getId()); + console.log("Note Owner Email: " + owner.getEmail()); + } + console.log("Note ModifiedTime: " + note.getModifiedTime()); + let attachments = note.getAttachments(); + if (attachments != null) { + attachments.forEach(attachment => { + this.printAttachment(attachment); + }); + } + console.log("Note CreatedTime: " + note.getCreatedTime()); + let parentId = note.getParentId(); + if (parentId != null) { + if (parentId.getKeyValue("name") != null) { + console.log("Note parent record Name: " + parentId.getKeyValue("name")); + } + console.log("Note parent record ID: " + parentId.getId()); + } + console.log("Note Editable: " + note.getEditable()); + console.log("Note SeModule: " + note.getSeModule()); + console.log("Note IsSharedToClient: " + note.getIsSharedToClient()); + let modifiedBy = note.getModifiedBy(); + if (modifiedBy != null) { + console.log("Note Modified By User-Name: " + modifiedBy.getName()); + console.log("Note Modified By User-ID: " + modifiedBy.getId()); + console.log("Note Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("Note Size: " + note.getSize()); + console.log("Note State: " + note.getState()); + console.log("Note VoiceNote: " + note.getVoiceNote()); + console.log("Note Id: " + note.getId()); + let createdBy = note.getCreatedBy(); + if (createdBy != null) { + console.log("Note Created By User-Name: " + createdBy.getName()); + console.log("Note Created By User-ID: " + createdBy.getId()); + console.log("Note Created By User-Email: " + createdBy.getEmail()); + } + console.log("Note NoteTitle: " + note.getNoteTitle()); + console.log("Note NoteContent: " + note.getNoteContent()); + console.log("Note SharingPermission: " + note.getSharingPermission()); + }); + } + } + else if (responseObject instanceof ZOHOCRMSDK.Notes.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + static async printAttachment(attachment) { + let owner = attachment.getOwner(); + if (owner != null) { + console.log("Note Attachment Owner User-Name: " + owner.getName()); + console.log("Note Attachment Owner User-ID: " + owner.getId()); + console.log("Note Attachment Owner User-Email: " + owner.getEmail()); + } + console.log("Note Attachment Modified Time: " + attachment.getModifiedTime().toString()); + console.log("Note Attachment File Name: " + attachment.getFileName()); + console.log("Note Attachment Created Time: " + attachment.getCreatedTime().toString()); + console.log("Note Attachment File Size: " + attachment.getSize().toString()); + let parentId = attachment.getParentId(); + if (parentId != null) { + console.log("Note Attachment parent record Name: " + parentId.getKeyValue("name")); + console.log("Note Attachment parent record ID: " + parentId.getId()); + } + console.log("Note Attachment is Editable: " + attachment.getEditable().toString()); + console.log("Note Attachment SharingPermission: " + attachment.getSharingPermission()); + console.log("Note Attachment File ID: " + attachment.getFileId()); + console.log("Note Attachment File Type: " + attachment.getType()); + console.log("Note Attachment seModule: " + attachment.getSeModule()); + let modifiedBy = attachment.getModifiedBy(); + if (modifiedBy != null) { + console.log("Note Attachment Modified By User-Name: " + modifiedBy.getName()); + console.log("Note Attachment Modified By User-ID: " + modifiedBy.getId()); + console.log("Note Attachment Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("Note Attachment Type: " + attachment.getAttachmentType()); + console.log("Note Attachment State: " + attachment.getState()); + console.log("Note Attachment ID: " + attachment.getId()); + let createdBy = attachment.getCreatedBy(); + if (createdBy != null) { + console.log("Note Attachment Created By User-Name: " + createdBy.getName()); + console.log("Note Attachment Created By User-ID: " + createdBy.getId()); + console.log("Note Attachment Created By User-Email: " + createdBy.getEmail()); + } + console.log("Note Attachment LinkUrl: " + attachment.getLinkUrl()); + } +} +await GetNote.initialize(); +let noteId = 4402481378005n +await GetNote.getNote(noteId); \ No newline at end of file diff --git a/versions/3.0.0/samples/notes/getNotes.js b/versions/3.0.0/samples/notes/getNotes.js new file mode 100644 index 0000000..f5f06a3 --- /dev/null +++ b/versions/3.0.0/samples/notes/getNotes.js @@ -0,0 +1,156 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetNotes{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Notes

+ * This method is used to get the list of notes and print the response. + */ + static async getNotes() { + let notesOperations = new ZOHOCRMSDK.Notes.NotesOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters for Get Notes */ + await paramInstance.add(ZOHOCRMSDK.Notes.GetNotesParam.PAGE, "1"); + await paramInstance.add(ZOHOCRMSDK.Notes.GetNotesParam.PER_PAGE, "200"); + await paramInstance.add(ZOHOCRMSDK.Notes.GetNotesParam.FIELDS, "id,Modified_Time"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + /* Possible headers for Get Notes */ + await headerInstance.add(ZOHOCRMSDK.Notes.GetNotesHeader.IF_MODIFIED_SINCE,"2019-06-01T00:00:00+05:30"); + //Call getNotes method that takes paramInstance and headerInstance as parameters + let response = await notesOperations.getNotes(paramInstance, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Notes.ResponseWrapper) { + let notes = responseObject.getData(); + notes.forEach(note => { + let owner = note.getOwner(); + if (owner != null) { + console.log("Note Owner User-Name: " + owner.getName()); + console.log("Note Owner User-ID: " + owner.getId()); + console.log("Note Owner Email: " + owner.getEmail()); + } + console.log("Note ModifiedTime: " + note.getModifiedTime()); + let attachments = note.getAttachments(); + if (attachments != null) { + attachments.forEach(attachment => { + this.printAttachment(attachment); + }); + } + console.log("Note CreatedTime: " + note.getCreatedTime()); + let parentId = note.getParentId(); + if (parentId != null) { + if (parentId.getKeyValue("name") != null) { + console.log("Note parent record Name: " + parentId.getKeyValue("name")); + } + console.log("Note parent record ID: " + parentId.getId()); + } + console.log("Note Editable: " + note.getEditable()); + console.log("Note SharingPermission: " + note.getSharingPermission()); + console.log("Note SeModule: " + note.getSeModule()); + console.log("Note IsSharedToClient: " + note.getIsSharedToClient()); + let modifiedBy = note.getModifiedBy(); + if (modifiedBy != null) { + console.log("Note Modified By User-Name: " + modifiedBy.getName()); + console.log("Note Modified By User-ID: " + modifiedBy.getId()); + console.log("Note Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("Note Size: " + note.getSize()); + console.log("Note State: " + note.getState()); + console.log("Note VoiceNote: " + note.getVoiceNote()); + console.log("Note Id: " + note.getId()); + let createdBy = note.getCreatedBy(); + if (createdBy != null) { + console.log("Note Created By User-Name: " + createdBy.getName()); + console.log("Note Created By User-ID: " + createdBy.getId()); + console.log("Note Created By User-Email: " + createdBy.getEmail()); + } + console.log("Note NoteTitle: " + note.getNoteTitle()); + console.log("Note NoteContent: " + note.getNoteContent()); + }); + let info = responseObject.getInfo(); + if (info != null) { + if (info.getPerPage() != null) { + console.log("Note Info PerPage: " + info.getPerPage().toString()); + } + if (info.getCount() != null) { + console.log("Note Info Count: " + info.getCount().toString()); + } + if (info.getPage() != null) { + console.log("Note Info Page: " + info.getPage()); + } + if (info.getMoreRecords() != null) { + console.log("Note Info MoreRecords: " + info.getMoreRecords().toString()); + } + } + } else if (responseObject instanceof ZOHOCRMSDK.Notes.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } + static async printAttachment(attachment) { + let owner = attachment.getOwner(); + if (owner != null) { + console.log("Note Attachment Owner User-Name: " + owner.getName()); + console.log("Note Attachment Owner User-ID: " + owner.getId()); + console.log("Note Attachment Owner User-Email: " + owner.getEmail()); + } + console.log("Note Attachment Modified Time: " + attachment.getModifiedTime().toString()); + console.log("Note Attachment File Name: " + attachment.getFileName()); + console.log("Note Attachment Created Time: " + attachment.getCreatedTime().toString()); + console.log("Note Attachment File Size: " + attachment.getSize().toString()); + let parentId = attachment.getParentId(); + if (parentId != null) { + console.log("Note Attachment parent record Name: " + parentId.getKeyValue("name")); + console.log("Note Attachment parent record ID: " + parentId.getId()); + } + console.log("Note Attachment is Editable: " + attachment.getEditable().toString()); + console.log("Note Attachment SharingPermission: " + attachment.getSharingPermission()); + console.log("Note Attachment File ID: " + attachment.getFileId()); + console.log("Note Attachment File Type: " + attachment.getType()); + console.log("Note Attachment seModule: " + attachment.getSeModule()); + let modifiedBy = attachment.getModifiedBy(); + if (modifiedBy != null) { + console.log("Note Attachment Modified By User-Name: " + modifiedBy.getName()); + console.log("Note Attachment Modified By User-ID: " + modifiedBy.getId()); + console.log("Note Attachment Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("Note Attachment Type: " + attachment.getAttachmentType()); + console.log("Note Attachment State: " + attachment.getState()); + console.log("Note Attachment ID: " + attachment.getId()); + let createdBy = attachment.getCreatedBy(); + if (createdBy != null) { + console.log("Note Attachment Created By User-Name: " + createdBy.getName()); + console.log("Note Attachment Created By User-ID: " + createdBy.getId()); + console.log("Note Attachment Created By User-Email: " + createdBy.getEmail()); + } + console.log("Note Attachment LinkUrl: " + attachment.getLinkUrl()); + } +} +await GetNotes.initialize(); +await GetNotes.getNotes(); \ No newline at end of file diff --git a/versions/3.0.0/samples/notes/updateNote.js b/versions/3.0.0/samples/notes/updateNote.js new file mode 100644 index 0000000..50f5835 --- /dev/null +++ b/versions/3.0.0/samples/notes/updateNote.js @@ -0,0 +1,86 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateNote{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Note

+ * This method is used to update an existing note and print the response. + * @param {BigInt} noteId The ID of the Note to be updated + */ + static async updateNote(noteId) { + //example + //let noteId = 549003n + let notesOperations = new ZOHOCRMSDK.Notes.NotesOperations(); + let request = new ZOHOCRMSDK.Notes.BodyWrapper(); + //Array to hold Note instances + let notesArray = []; + let note = new ZOHOCRMSDK.Notes.Note(); + note.setNoteTitle("Contacted12"); + note.setNoteContent("Need to do further tracking12"); + //Add Note instance to the list + notesArray.push(note); + request.setData(notesArray); + //Call updateNote method that takes BodyWrapper instance and noteId as parameter + let response = await notesOperations.updateNote(noteId, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Notes.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Notes.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Notes.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Notes.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateNote.initialize(); +let noteId = 321002n; +await UpdateNote.updateNote(noteId); \ No newline at end of file diff --git a/versions/3.0.0/samples/notes/updateNotes.js b/versions/3.0.0/samples/notes/updateNotes.js new file mode 100644 index 0000000..9fd0065 --- /dev/null +++ b/versions/3.0.0/samples/notes/updateNotes.js @@ -0,0 +1,89 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateNotes{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Notes

+ * This method is used to update existing notes with Ids and print the response. + */ + static async updateNotes() { + let notesOperations = new ZOHOCRMSDK.Notes.NotesOperations(); + let bodyWrapper = new ZOHOCRMSDK.Notes.BodyWrapper(); + //Array to hold Note instances + let notesArray = []; + let note = new ZOHOCRMSDK.Notes.Note(); + note.setId(347706112535001n); + note.setNoteTitle("Contacted12"); + note.setNoteContent("Need to do further tracking12"); + //Add Note instance to the array + notesArray.push(note); + note = new ZOHOCRMSDK.Notes.Note(); + note.setId(347706112535002n); + note.setNoteTitle("Contacted13"); + note.setNoteContent("Need to do further tracking13"); + //Add Note instance to the array + notesArray.push(note); + bodyWrapper.setData(notesArray); + //Call updateNotes method that takes BodyWrapper instance as parameter + let response = await notesOperations.updateNotes(bodyWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Notes.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Notes.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Notes.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Notes.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateNotes.initialize(); +await UpdateNotes.updateNotes(); \ No newline at end of file diff --git a/versions/3.0.0/samples/notification/disableNotification.js b/versions/3.0.0/samples/notification/disableNotification.js new file mode 100644 index 0000000..b1ae89f --- /dev/null +++ b/versions/3.0.0/samples/notification/disableNotification.js @@ -0,0 +1,99 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DisableNotification{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Disable Specific Notifications

+ * This method is used to disable notifications for the specified events in a channel. + */ + static async disableNotification() { + let notificationOperations = new ZOHOCRMSDK.Notifications.NotificationsOperations(); + let bodyWrapper = new ZOHOCRMSDK.Notifications.BodyWrapper(); + //Array of Notification instances + let notificationsArray = []; + let notification = new ZOHOCRMSDK.Notifications.Notification(); + notification.setChannelId("1006800211"); + let events = ["Deals.edit"]; + //To subscribe based on particular operations on given modules. + notification.setEvents(events); + notification.setDeleteevents(new ZOHOCRMSDK.Choice(true)); + //Add Notification instance to the array + notificationsArray.push(notification); + bodyWrapper.setWatch(notificationsArray); + //Call disableNotification which takes BodyWrapper instance as parameter + let response = await notificationOperations.disableNotification(bodyWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Notifications.ActionWrapper) { + let actionResponses = responseObject.getWatch(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Notifications.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if(details != null) { + Array.from(details.keys()).forEach(key => { + if (Array.isArray(details.get(key))) { + let dataList = details.get(key); + if (dataList.length > 0 && dataList[0] instanceof ZOHOCRMSDK.Notifications.Notification) { + for (let event of dataList) { + console.log("Notification ChannelExpiry: " + event.getChannelExpiry()); + console.log("Notification ResourceUri: " + event.getResourceUri()); + console.log("Notification ResourceId: " + event.getResourceId()); + console.log("Notification ResourceName: " + notification.getResourceName()); + console.log("Notification ChannelId: " + notification.getChannelId()); + } + } + } + else { + console.log(key + " : " + details.get(key)); + } + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Notifications.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Notifications.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await DisableNotification.initialize(); +await DisableNotification.disableNotification(); \ No newline at end of file diff --git a/versions/3.0.0/samples/notification/disableNotifications.js b/versions/3.0.0/samples/notification/disableNotifications.js new file mode 100644 index 0000000..77aeeab --- /dev/null +++ b/versions/3.0.0/samples/notification/disableNotifications.js @@ -0,0 +1,96 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DisableNotifications{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Disable Notifications

+ * To stop all the instant notifications enabled by the user for a channel. + * @param {Array} channelIds Specify the unique IDs of the notification channels to be disabled. + */ + static async disableNotifications(channelIds) { + //example + //channelIds = [10068002n, 10068020n, 10068101n] + let notificationOperations = new ZOHOCRMSDK.Notifications.NotificationsOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + //Possible parameters for disable Notifications operation + for (let channelId of channelIds) { + await paramInstance.add(ZOHOCRMSDK.Notifications.DeleteNotificationParam.CHANNEL_IDS, channelId); + } + //Call disableNotifications method that takes paramInstance as parameter + let response = await notificationOperations.deleteNotification(paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Notifications.ActionWrapper) { + let actionResponses = responseObject.getWatch(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Notifications.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Notifications.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if(details != null) { + Array.from(details.keys()).forEach(key => { + if (Array.isArray(details.get(key))) { + let dataList = details.get(key); + if (dataList.length > 0 && dataList[0] instanceof ZOHOCRMSDK.Notifications.Notification) { + for (let event of dataList) { + console.log("Notification ChannelExpiry: " + event.getChannelExpiry()); + console.log("Notification ResourceUri: " + event.getResourceUri()); + console.log("Notification ResourceId: " + event.getResourceId()); + console.log("Notification ResourceName: " + event.getResourceName()); + console.log("Notification ChannelId: " + event.getChannelId()); + } + } + } + else { + console.log(key + " : " + details.get(key)); + } + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Notifications.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await DisableNotifications.initialize(); +let channelIds = [10068002n, 10068020n, 10068101n] +await DisableNotifications.disableNotifications(channelIds); \ No newline at end of file diff --git a/versions/3.0.0/samples/notification/enableNotifications.js b/versions/3.0.0/samples/notification/enableNotifications.js new file mode 100644 index 0000000..57d1054 --- /dev/null +++ b/versions/3.0.0/samples/notification/enableNotifications.js @@ -0,0 +1,117 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class EnableNotifications{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Enable Notifications

+ * This method is used to Enable Notifications and print the response. + */ + static async enableNotifications() { + let notificationOperations = new ZOHOCRMSDK.Notifications.NotificationsOperations(); + let bodyWrapper = new ZOHOCRMSDK.Notifications.BodyWrapper(); + //Array of Notification instances + let notificationsArray = []; + let notification1 = new ZOHOCRMSDK.Notifications.Notification(); + notification1.setChannelId("100680021"); + let events = ["Deals.all"]; + //To subscribe based on particular operations on given modules. + notification1.setEvents(events); + notification1.setChannelExpiry(new Date(2020, 10, 10, 10, 20, 0)); + //To ensure that the notification is sent from Zoho CRM, by sending back the given value in notification URL body. + //By using this value, user can validate the notifications. + notification1.setToken("TOKEN_FOR_VERIFICATION_OF_10068002"); + //URL to be notified (POST request) + notification1.setNotifyUrl("https://www.zohoapis.com"); + //Add Notification instance to the array + notificationsArray.push(notification1); + let notification2 = new ZOHOCRMSDK.Notifications.Notification(); + notification2.setChannelId("1006800232"); + let events2 = ["Accounts.all"]; + //To subscribe based on particular operations on given modules. + notification2.setEvents(events2); + notification2.setChannelExpiry(new Date(2020, 11, 10, 10, 0, 0)); + //To ensure that the notification is sent from Zoho CRM, by sending back the given value in notification URL body. + //By using this value, user can validate the notifications. + notification2.setToken("TOKEN_FOR_VERIFICATION_OF_1006800211"); + //URL to be notified (POST request) + notification2.setNotifyUrl("https://www.zohoapis.com"); + //Add Notification instance to the array + notificationsArray.push(notification2); + bodyWrapper.setWatch(notificationsArray); + //Call enableNotifications method that takes BodyWrapper instance as parameter + let response = await notificationOperations.enableNotifications(bodyWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Notifications.ActionWrapper) { + let actionResponses = responseObject.getWatch(); + for (let actionResponse of actionResponses) { + if (actionResponse instanceof ZOHOCRMSDK.Notifications.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if(details != null) { + Array.from(details.keys()).forEach(key => { + if (Array.isArray(details.get(key))) { + let dataList = details.get(key); + if (dataList.length > 0 && dataList[0] instanceof ZOHOCRMSDK.Notifications.Notification) { + for (let event of dataList) { + console.log("Notification ChannelExpiry: " + event.getChannelExpiry()); + console.log("Notification ResourceUri: " + event.getResourceUri()); + console.log("Notification ResourceId: " + event.getResourceId()); + console.log("Notification ResourceName: " + event.getResourceName()); + console.log("Notification ChannelId: " + event.getChannelId()); + } + } + } + else { + console.log(key + " : " + details.get(key)); + } + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Notifications.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + } + } + else if (responseObject instanceof ZOHOCRMSDK.Notifications.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await EnableNotifications.initialize(); +await EnableNotifications.enableNotifications(); diff --git a/versions/3.0.0/samples/notification/getNotificationDetails.js b/versions/3.0.0/samples/notification/getNotificationDetails.js new file mode 100644 index 0000000..f937645 --- /dev/null +++ b/versions/3.0.0/samples/notification/getNotificationDetails.js @@ -0,0 +1,87 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetNotificationDetails{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Notification Details

+ * This method is used to get all the Notification and print the response. + */ + static async getNotificationDetails() { + let notificationOperations = new ZOHOCRMSDK.Notifications.NotificationsOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Notifications.GetNotificationsParam.CHANNEL_ID, 1006800211n); + await paramInstance.add(ZOHOCRMSDK.Notifications.GetNotificationsParam.MODULE, "Accounts"); + await paramInstance.add(ZOHOCRMSDK.Notifications.GetNotificationsParam.PAGE, 1); + await paramInstance.add(ZOHOCRMSDK.Notifications.GetNotificationsParam.PER_PAGE, 200); + //Call getNotificationDetails method + let response = await notificationOperations.getNotifications(paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Notifications.ResponseWrapper) { + let notificationsArray = responseObject.getWatch(); + notificationsArray.forEach(notification => { + console.log("Notification NotifyOnRelatedAction: " + notification.getNotifyOnRelatedAction()); + console.log("Notification ChannelExpiry: " + notification.getChannelExpiry()); + console.log("Notification ResourceUri: " + notification.getResourceUri()); + console.log("Notification ResourceId: " + notification.getResourceId()); + console.log("Notification NotifyUrl: " + notification.getNotifyUrl()); + console.log("Notification ResourceName: " + notification.getResourceName()); + console.log("Notification ChannelId: " + notification.getChannelId()); + let fields = notification.getEvents(); + if (fields != null) { + for (let field of fields) { + console.log("Notification Events: " + field); + } + } + console.log("Notification Token: " + notification.getToken()); + }); + let info = responseObject.getInfo(); + if (info != null) { + if (info.getPerPage() != null) { + console.log("Notification Info PerPage: " + info.getPerPage().toString()); + } + if (info.getCount() != null) { + console.log("Notification Info Count: " + info.getCount().toString()); + } + if (info.getPage() != null) { + console.log("Notification Info Page: " + info.getPage().toString()); + } + if (info.getMoreRecords() != null) { + console.log("Notification Info MoreRecords: " + info.getMoreRecords().toString()); + } + } + } + else if (responseObject instanceof ZOHOCRMSDK.Notifications.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetNotificationDetails.initialize(); +await GetNotificationDetails.getNotificationDetails(); diff --git a/versions/3.0.0/samples/notification/updateNotification.js b/versions/3.0.0/samples/notification/updateNotification.js new file mode 100644 index 0000000..1386117 --- /dev/null +++ b/versions/3.0.0/samples/notification/updateNotification.js @@ -0,0 +1,98 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateNotification{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Specific Information of a Notification

+ * This method is used to update single Notification and print the response. + */ + static async updateNotification() { + let notificationOperations = new ZOHOCRMSDK.Notifications.NotificationsOperations(); + let bodyWrapper = new ZOHOCRMSDK.Notifications.BodyWrapper(); + let notificationsArray = []; + let notification1 = new ZOHOCRMSDK.Notifications.Notification(); + notification1.setChannelId("1006800211"); + let events = ["Accounts.all"]; + notification1.setEvents(events); + notification1.setChannelExpiry(new Date()); + notification1.setToken("TOKEN_FOR_VERIFICATION_OF_10068002"); + notification1.setNotifyUrl("https://www.zohoapis.com"); + notificationsArray.push(notification1); + bodyWrapper.setWatch(notificationsArray); + //Call updateNotification method that takes BodyWrapper instance as parameters + let response = await notificationOperations.updateNotification(bodyWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Notifications.ActionWrapper) { + let actionResponses = responseObject.getWatch(); + for (let actionResponse of actionResponses) { + if (actionResponse instanceof ZOHOCRMSDK.Notifications.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if(details != null) { + Array.from(details.keys()).forEach(key => { + if (Array.isArray(details.get(key))) { + let dataList = details.get(key); + if (dataList.length > 0 && dataList[0] instanceof ZOHOCRMSDK.Notifications.Notification) { + for (let event of dataList) { + console.log("Notification ChannelExpiry: " + event.getChannelExpiry()); + console.log("Notification ResourceUri: " + event.getResourceUri()); + console.log("Notification ResourceId: " + event.getResourceId()); + console.log("Notification ResourceName: " + event.getResourceName()); + console.log("Notification ChannelId: " + event.getChannelId()); + } + } + } + else { + console.log(key + " : " + details.get(key)); + } + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Notifications.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + } + } + else if (responseObject instanceof ZOHOCRMSDK.Notifications.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await UpdateNotification.initialize(); +await UpdateNotification.updateNotification(); \ No newline at end of file diff --git a/versions/3.0.0/samples/notification/updateNotifications.js b/versions/3.0.0/samples/notification/updateNotifications.js new file mode 100644 index 0000000..57a34c3 --- /dev/null +++ b/versions/3.0.0/samples/notification/updateNotifications.js @@ -0,0 +1,104 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateNotifications{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Notifications

+ * This method is used to update Notifications and print the response. + */ + static async updateNotifications() { + let notificationOperations = new ZOHOCRMSDK.Notifications.NotificationsOperations(); + let bodyWrapper = new ZOHOCRMSDK.Notifications.BodyWrapper(); + //Array of Notification instances + let notificationsArray = []; + let notification1 = new ZOHOCRMSDK.Notifications.Notification(); + notification1.setChannelId("1006800211"); + let events = ["Accounts.all"]; + //To subscribe based on particular operations on given modules. + notification1.setEvents(events); + notification1.setChannelExpiry(new Date()); + //To ensure that the notification is sent from Zoho CRM, by sending back the given value in notification URL body. + //By using this value, user can validate the notifications. + notification1.setToken("TOKEN_FOR_VERIFICATION_OF_10068002"); + //URL to be notified (POST request) + notification1.setNotifyUrl("https://www.zohoapis.com"); + //Add Notification instance to the array + notificationsArray.push(notification1); + bodyWrapper.setWatch(notificationsArray); + //Call updateNotifications method that takes BodyWrapper instance as parameter + let response = await notificationOperations.updateNotifications(bodyWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Notifications.ActionWrapper) { + let actionResponses = responseObject.getWatch(); + for (let actionResponse of actionResponses) { + if (actionResponse instanceof ZOHOCRMSDK.Notifications.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if(details != null) { + Array.from(details.keys()).forEach(key => { + if (Array.isArray(details.get(key))) { + let dataList = details.get(key); + if (dataList.length > 0 && dataList[0] instanceof ZOHOCRMSDK.Notifications.Notification) { + for (let event of dataList) { + console.log("Notification ChannelExpiry: " + event.getChannelExpiry()); + console.log("Notification ResourceUri: " + event.getResourceUri()); + console.log("Notification ResourceId: " + event.getResourceId()); + console.log("Notification ResourceName: " + event.getResourceName()); + console.log("Notification ChannelId: " + event.getChannelId()); + } + } + } + else { + console.log(key + " : " + details.get(key)); + } + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Notifications.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + } + } + else if (responseObject instanceof ZOHOCRMSDK.Notifications.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await UpdateNotifications.initialize(); +await UpdateNotifications.updateNotifications(); \ No newline at end of file diff --git a/versions/3.0.0/samples/organization/getOrganization.js b/versions/3.0.0/samples/organization/getOrganization.js new file mode 100644 index 0000000..1b7bbb2 --- /dev/null +++ b/versions/3.0.0/samples/organization/getOrganization.js @@ -0,0 +1,97 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetOrganization{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Organization

+ * This method is used to get the organization data and print the response. + */ + static async getOrganization() { + let orgOperations = new ZOHOCRMSDK.Org.OrgOperations(); + //Call getOrganization method + let response = await orgOperations.getOrganization(); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Org.ResponseWrapper) { + let orgs = responseObject.getOrg(); + orgs.forEach(org => { + console.log("Organization Country: " + org.getCountry()); + let hierarchyPreferences = org.getHierarchyPreferences(); + if(hierarchyPreferences != null) { + console.log("Organization HierarchyPreferences Type: " + hierarchyPreferences.getType().getValue()); + } + console.log("Organization PhotoId: " + org.getPhotoId()); + console.log("Organization City: " + org.getCity()); + console.log("Organization Description: " + org.getDescription()); + console.log("Organization McStatus: " + org.getMcStatus().toString()); + console.log("Organization GappsEnabled: " + org.getGappsEnabled().toString()); + console.log("Organization DomainName: " + org.getDomainName()); + console.log("Organization TranslationEnabled: " + org.getTranslationEnabled().toString()); + console.log("Organization Street: " + org.getStreet()); + console.log("Organization Alias: " + org.getAlias()); + console.log("Organization Currency: " + org.getCurrency()); + console.log("Organization Id: " + org.getId()); + console.log("Organization State: " + org.getState()); + console.log("Organization Fax: " + org.getFax()); + console.log("Organization EmployeeCount: " + org.getEmployeeCount()); + console.log("Organization Zip: " + org.getZip()); + console.log("Organization Website: " + org.getWebsite()); + console.log("Organization CurrencySymbol: " + org.getCurrencySymbol()); + console.log("Organization Mobile: " + org.getMobile()); + console.log("Organization CurrencyLocale: " + org.getCurrencyLocale()); + console.log("Organization PrimaryZuid: " + org.getPrimaryZuid()); + console.log("Organization ZiaPortalId: " + org.getZiaPortalId()); + console.log("Organization TimeZone: " + org.getTimeZone().name); + console.log("Organization Zgid: " + org.getZgid()); + console.log("Organization CountryCode: " + org.getCountryCode()); + let licenseDetails = org.getLicenseDetails(); + if (licenseDetails != null) { + console.log("Organization LicenseDetails PaidExpiry: " + licenseDetails.getPaidExpiry()); + console.log("Organization LicenseDetails UsersLicensePurchased: " + licenseDetails.getUsersLicensePurchased().toString()); + console.log("Organization LicenseDetails TrialType: " + licenseDetails.getTrialType()); + console.log("Organization LicenseDetails TrialExpiry: " + licenseDetails.getTrialExpiry()); + console.log("Organization LicenseDetails Paid: " + licenseDetails.getPaid().toString()); + console.log("Organization LicenseDetails PaidType: " + licenseDetails.getPaidType()); + } + console.log("Organization Phone: " + org.getPhone()); + console.log("Organization CompanyName: " + org.getCompanyName()); + console.log("Organization PrivacySettings: " + org.getPrivacySettings().toString()); + console.log("Organization PrimaryEmail: " + org.getPrimaryEmail()); + console.log("Organization HipaaComplianceEnabled: " + org.getHipaaComplianceEnabled()); + console.log("Organization IsoCode: " + org.getIsoCode()); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Org.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetOrganization.initialize(); +await GetOrganization.getOrganization(); \ No newline at end of file diff --git a/versions/3.0.0/samples/organization/uploadOrganizationPhoto.js b/versions/3.0.0/samples/organization/uploadOrganizationPhoto.js new file mode 100644 index 0000000..4a35c66 --- /dev/null +++ b/versions/3.0.0/samples/organization/uploadOrganizationPhoto.js @@ -0,0 +1,75 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +import fs from "fs"; +class UploadOrganizationPhoto{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Upload Organization Photo

+ * This method is used to upload the brand logo or image of the organization and print the response. + * @param {String} absoluteFilePath The absolute file path of the file to be attached + */ + static async uploadOrganizationPhoto(absoluteFilePath) { + //example + //let absoluteFilePath = "/Users/user_name/Desktop/logo.png"; + let orgOperations = new ZOHOCRMSDK.Org.OrgOperations(); + let fileBodyWrapper = new ZOHOCRMSDK.Org.FileBodyWrapper(); + /** StreamWrapper can be initialized in any of the following ways */ + /** + * param 1 -> fileName + * param 2 -> Read Stream. + */ + let streamWrapper = new ZOHOCRMSDK.StreamWrapper(null, fs.createReadStream(absoluteFilePath)); + /** + * param 1 -> fileName + * param 2 -> Read Stream + * param 3 -> Absolute File Path of the file to be attached + */ + // let streamWrapper = new StreamWrapper(null, null, absoluteFilePath); + fileBodyWrapper.setFile(streamWrapper); + //Call uploadOrganizationPhoto method that takes FileBodyWrapper instance as parameter + let response = await orgOperations.uploadOrganizationPhoto(fileBodyWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Org.SuccessResponse) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + else if (responseObject instanceof ZOHOCRMSDK.Org.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await UploadOrganizationPhoto.initialize(); +let absoluteFilePath = "/Users/user_name/Desktop/logo.png"; +await UploadOrganizationPhoto.uploadOrganizationPhoto(absoluteFilePath); \ No newline at end of file diff --git a/versions/3.0.0/samples/pipe_line/createPipelines.js b/versions/3.0.0/samples/pipe_line/createPipelines.js new file mode 100644 index 0000000..08fa7af --- /dev/null +++ b/versions/3.0.0/samples/pipe_line/createPipelines.js @@ -0,0 +1,83 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class CreatePipelines{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

create Pipelines

+ * This method is used to create Pipelines + * @param {BigInt} layoutId The id of the Layout + */ + static async createPipelines(layoutId) { + let pipelineOperations = new ZOHOCRMSDK.Pipeline.PipelineOperations(layoutId); + let pipeline = new ZOHOCRMSDK.Pipeline.Pipeline(); + pipeline.setDisplayValue("Adfasfs23d3ew122"); + let pickList = new ZOHOCRMSDK.Pipeline.Maps(); + pickList.setSequenceNumber(1); + pickList.setId(34770616805n); + pickList.setDisplayValue("Closed Won"); + pipeline.setMaps([pickList]); + let body = new BodyWrapper(); + body.setPipeline([pipeline]); + //Call createPipelines method that takes BodyWrapper instance as parameter + let response = await pipelineOperations.createPipeline(body); + if (response != null) { + console.log("Status code " + response.getStatusCode()); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Pipeline.ActionWrapper) { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getPipeline(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Pipeline.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Pipeline.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (actionHandler instanceof ZOHOCRMSDK.Pipeline.APIException) { + console.log("Status: " + actionHandler.getStatus().getValue()); + console.log("Code: " + actionHandler.getCode().getValue()); + console.log("Details"); + let details = actionHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionHandler.getMessage()); + } + } + } +} +await CreatePipelines.initialize(); +let layoutId = 502111n; +await CreatePipelines.createPipelines(layoutId); \ No newline at end of file diff --git a/versions/3.0.0/samples/pipe_line/getPipeline.js b/versions/3.0.0/samples/pipe_line/getPipeline.js new file mode 100644 index 0000000..fa88bf7 --- /dev/null +++ b/versions/3.0.0/samples/pipe_line/getPipeline.js @@ -0,0 +1,82 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetPipeline{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Pipeline

+ * This method is used to get single Pipeline + * @param {BigInt} layoutId The id of the Layout + * @param {BigInt} pipelineId The id of the pipeline + * @returns + */ + static async getPipeline(layoutId, pipelineId) { + let pipelineOperations = new ZOHOCRMSDK.Pipeline.PipelineOperations(layoutId); + //Call getPipeline method + let response = await pipelineOperations.getPipeline(pipelineId); + if (response != null) { + console.log("Status code " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.Pipeline.BodyWrapper) { + let responseWrapper = responseHandler; + let pipelines = responseWrapper.getPipeline(); + pipelines.forEach(pipeline => { + console.log("Pipeline Id: " + pipeline.getId()); + console.log("Pipeline DisplayValue: " + pipeline.getDisplayValue()); + console.log("Pipeline Maps ActualValue: " + pipeline.getActualValue()); + console.log("Pipeline Default: " + pipeline.getDefault()); + console.log("Pipeline ChildAvailable : " + pipeline.getChildAvailable()); + let parent = pipeline.getParent(); + if (parent != null) { + console.log("Pipeline parent ID: " + parent.getId()); + } + let maps = pipeline.getMaps(); + if (maps != null) { + maps.forEach(map => { + console.log("Pipeline Maps ActualValue: " + map.getActualValue()); + console.log("PickListValue Delete" + map.getDelete()); + console.log("Pipeline Maps DisplayValue: " + map.getDisplayValue()); + let forecastCategory = map.getForecastCategory(); + if (forecastCategory != null) { + console.log("Pipeline Maps ForecastCategory Name: " + forecastCategory.getName()); + console.log("Pipeline Maps ForecastCategory Id: " + forecastCategory.getId()); + } + console.log("Pipeline Maps ForecastType: " + map.getForecastType()); + console.log("Pipeline Maps Id: " + map.getId()); + console.log("Pipeline Maps SequenceNumber: " + map.getSequenceNumber()); + }); + } + }); + } + else if (responseHandler instanceof ZOHOCRMSDK.Pipeline.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage()); + } + } + } +} +await GetPipeline.initialize(); +let pipelineId = 123456789n; +let layoutId = 4402480167n +await GetPipeline.getPipeline(layoutId,pipelineId); \ No newline at end of file diff --git a/versions/3.0.0/samples/pipe_line/getPipelines.js b/versions/3.0.0/samples/pipe_line/getPipelines.js new file mode 100644 index 0000000..c0f39d0 --- /dev/null +++ b/versions/3.0.0/samples/pipe_line/getPipelines.js @@ -0,0 +1,80 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetPipelines{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Pipelines

+ * This method is used to get Pipelines + * @param {BigInt} layoutId The id of the Layout + * @returns + */ + static async getPipelines(layoutId) { + let pipelineOperations = new ZOHOCRMSDK.Pipeline.PipelineOperations(layoutId); + //Call getPipelines method + let response = await pipelineOperations.getPipelines(); + if (response != null) { + console.log("Status code " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.Pipeline.BodyWrapper) { + let responseWrapper = responseHandler; + let pipelines = responseWrapper.getPipeline(); + pipelines.forEach(pipeline => { + console.log("Pipeline ID: " + pipeline.getId()); + console.log("Pipeline Default: " + pipeline.getDefault()); + console.log("Pipeline DisplayValue: " + pipeline.getDisplayValue()); + console.log("Pipeline ActualValue: " + pipeline.getActualValue()); + console.log("Pipeline ChildAvailable : " + pipeline.getChildAvailable()); + let parent = pipeline.getParent(); + if (parent != null) { + console.log("Pipeline parent ID: " + parent.getId()); + } + let maps = pipeline.getMaps(); + if (maps != null) { + maps.forEach(map => { + console.log("Pipeline Maps DisplayValue: " + map.getDisplayValue()); + console.log("Pipeline Maps SequenceNumber: " + map.getSequenceNumber()); + let forecastCategory = map.getForecastCategory(); + if (forecastCategory != null) { + console.log("Pipeline Maps ForecastCategory Name: " + forecastCategory.getName()); + console.log("Pipeline Maps ForecastCategory Id: " + forecastCategory.getId()); + } + console.log("Pipeline Maps ActualValue: " + map.getActualValue()); + console.log("Pipeline Maps Id: " + map.getId()); + console.log("Pipeline Maps ForecastType: " + map.getForecastType()); + console.log("PickListValue Delete" + map.getDelete()); + }); + } + }); + } + else if (responseHandler instanceof ZOHOCRMSDK.Pipeline.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage()); + } + } + } +} +await GetPipelines.initialize(); +let layoutId = 3100023n; +await GetPipelines.getPipelines(layoutId); \ No newline at end of file diff --git a/versions/3.0.0/samples/pipe_line/transferAndDelete.js b/versions/3.0.0/samples/pipe_line/transferAndDelete.js new file mode 100644 index 0000000..9164cdb --- /dev/null +++ b/versions/3.0.0/samples/pipe_line/transferAndDelete.js @@ -0,0 +1,85 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class TransferAndDelete{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

to Transfer And Delete

+ * This method is used to Transfer And Delete + * @param {BigInt} layoutId The id of the Layout + */ + static async transferAndDelete(layoutId) { + let pipelineOperations = new ZOHOCRMSDK.Pipeline.PipelineOperations(layoutId); + let transferAndDeleteWrapper = new ZOHOCRMSDK.Pipeline.TransferPipelineWrapper(); + let transferPipeLine = new ZOHOCRMSDK.Pipeline.TransferPipeline(); + let pipeline = new ZOHOCRMSDK.Pipeline.TPipeline(); + pipeline.setFrom(36523973712004n); + pipeline.setTo(36523973712004n); + await transferPipeLine.setPipeline(pipeline); + let stage = new ZOHOCRMSDK.Pipeline.Stages(); + stage.setFrom(36523976817n); + stage.setTo(36523976819n); + transferPipeLine.setStages([stage]); + transferAndDeleteWrapper.setTransferPipeline([transferPipeLine]); + //Call transferAndDelete method + let response = await pipelineOperations.transferPipelines(transferAndDeleteWrapper); + if (response != null) { + console.log("Status code " + response.getStatusCode()); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Pipeline.TransferPipelineActionWrapper) { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getTransferPipeline(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Pipeline.TransferPipelineSuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Pipeline.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (actionHandler instanceof ZOHOCRMSDK.Pipeline.APIException) { + console.log("Status: " + actionHandler.getStatus().getValue()); + console.log("Code: " + actionHandler.getCode().getValue()); + console.log("Details"); + let details = actionHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionHandler.getMessage()); + } + } + } +} +await TransferAndDelete.initialize(); +let layoutId = 300012n; +await TransferAndDelete.transferAndDelete(layoutId); \ No newline at end of file diff --git a/versions/3.0.0/samples/pipe_line/updatePipeline.js b/versions/3.0.0/samples/pipe_line/updatePipeline.js new file mode 100644 index 0000000..e1760e5 --- /dev/null +++ b/versions/3.0.0/samples/pipe_line/updatePipeline.js @@ -0,0 +1,84 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdatePipeline{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Pipeline

+ * This method is used to update Pipeline + * @param {BigInt} layoutId The id of the Layout + * @param {BigInt} pipelineId The id of the pipeline + */ + static async updatePipeline(layoutId, pipelineId) { + let pipelineOperations = new ZOHOCRMSDK.Pipeline.PipelineOperations(layoutId); + let pipeline = new ZOHOCRMSDK.Pipeline.Pipeline(); + pipeline.setDisplayValue("Qualification"); + let pickList = new ZOHOCRMSDK.Pipeline.Maps(); + pickList.setId(34770616801n); + pickList.setSequenceNumber(1); + pipeline.setMaps([pickList]); + let body = new BodyWrapper(); + body.setPipeline([pipeline]); + //Call updatePipeline method that takes BodyWrapper instance as parameter + let response = await pipelineOperations.updatePipeline(pipelineId, body); + if (response != null) { + console.log("Status code " + response.getStatusCode()); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Pipeline.ActionWrapper) { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getPipeline(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Pipeline.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Pipeline.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (actionHandler instanceof ZOHOCRMSDK.Pipeline.APIException) { + console.log("Status: " + actionHandler.getStatus().getValue()); + console.log("Code: " + actionHandler.getCode().getValue()); + console.log("Details"); + let details = actionHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionHandler.getMessage()); + } + } + } +} +await UpdatePipeline.initialize(); +let layoutId = 311220n; +let pipelineId = 490022n; +await UpdatePipeline.updatePipeline(layoutId,pipelineId); \ No newline at end of file diff --git a/versions/3.0.0/samples/pipe_line/updatePipelines.js b/versions/3.0.0/samples/pipe_line/updatePipelines.js new file mode 100644 index 0000000..26f58d6 --- /dev/null +++ b/versions/3.0.0/samples/pipe_line/updatePipelines.js @@ -0,0 +1,82 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdatePipelines{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Pipelines

+ * This method is used to update Pipelines + * @param {BigInt} layoutId The id of the Layout + */ + static async updatePipelines(layoutId) { + let pipelineOperations = new ZOHOCRMSDK.Pipeline.PipelineOperations(layoutId); + let pipeline = new ZOHOCRMSDK.Pipeline.Pipeline(); + pipeline.setId(347706112543n); + let pickList = new ZOHOCRMSDK.Pipeline.Maps(); + pickList.setId(34770616801n); + pickList.setSequenceNumber(1); + pipeline.setMaps([pickList]); + let body = new BodyWrapper(); + body.setPipeline([pipeline]); + //Call createPipelines method that takes BodyWrapper instance as parameter + let response = await pipelineOperations.updatePipelines(body); + if (response != null) { + console.log("Status code " + response.getStatusCode()); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Pipeline.ActionWrapper) { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getPipeline(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Pipeline.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Pipeline.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (actionHandler instanceof ZOHOCRMSDK.Pipeline.APIException) { + console.log("Status: " + actionHandler.getStatus().getValue()); + console.log("Code: " + actionHandler.getCode().getValue()); + console.log("Details"); + let details = actionHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionHandler.getMessage()); + } + } + } +} +await UpdatePipelines.initialize(); +let layoutId = 320012n; +await UpdatePipelines.updatePipelines(layoutId); \ No newline at end of file diff --git a/versions/3.0.0/samples/portalInvite/portalInvite.js b/versions/3.0.0/samples/portalInvite/portalInvite.js new file mode 100644 index 0000000..1fa1652 --- /dev/null +++ b/versions/3.0.0/samples/portalInvite/portalInvite.js @@ -0,0 +1,84 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class PortalInvite +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async portalInvite(recordId, module, userTypeId, type) + { + let portalInviteOperations = new ZOHOCRMSDK.InvitePortal.PortalInviteOperations(module); + let paraminstance = new ZOHOCRMSDK.ParameterMap(); + await paraminstance.add(ZOHOCRMSDK.InvitePortal.InviteUsersParam.TYPE, type); + await paraminstance.add(ZOHOCRMSDK.InvitePortal.InviteUsersParam.USER_TYPE_ID, userTypeId); + await paraminstance.add(ZOHOCRMSDK.InvitePortal.InviteUsersParam.LANGUAGE, "en_US"); + let response = await portalInviteOperations.inviteUsers(recordId, paraminstance); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode()); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.InvitePortal.ActionWrapper) { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getPortalInvite(); + if (actionResponses != null) { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.InvitePortal.SuccessResponse) { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.InvitePortal.APIException) { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } else if (actionHandler instanceof ZOHOCRMSDK.InvitePortal.APIException) { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let recordId = 4402481030088n; +let module = "Contacts"; +let userTypeId = 4402481304019n; +let type = "invite"; +await PortalInvite.initialize(); +await PortalInvite.portalInvite(recordId, module, userTypeId, type); \ No newline at end of file diff --git a/versions/3.0.0/samples/portals/createPortals.js b/versions/3.0.0/samples/portals/createPortals.js new file mode 100644 index 0000000..bc23f1a --- /dev/null +++ b/versions/3.0.0/samples/portals/createPortals.js @@ -0,0 +1,82 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreatePortals +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createPortals() + { + let portalsOperations = new ZOHOCRMSDK.Portals.PortalsOperations(); + let bodyWrapper = new ZOHOCRMSDK.Portals.BodyWrapper(); + let portals = []; + let portal = new ZOHOCRMSDK.Portals.Portals(); + portal.setName("PortalAPITest100"); + portals.push(portal); + bodyWrapper.setPortals(portals); + let response = portalsOperations.createPortal(bodyWrapper); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Portals.ActionWrapper) { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getPortals(); + if (actionResponses != null) { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Portals.SuccessResponse) { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.Portals.APIException) { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } else if (actionHandler instanceof ZOHOCRMSDK.Portals.APIException) { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await CreatePortals.initialize(); +await CreatePortals.createPortals(); \ No newline at end of file diff --git a/versions/3.0.0/samples/portals/getPortal.js b/versions/3.0.0/samples/portals/getPortal.js new file mode 100644 index 0000000..e4338de --- /dev/null +++ b/versions/3.0.0/samples/portals/getPortal.js @@ -0,0 +1,80 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetPortal +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getPortal(portalName) + { + let portalsOperations = new ZOHOCRMSDK.Portals.PortalsOperations(); + let response = await portalsOperations.getPortal(portalName); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + '\n'); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.Portals.ResponseWrapper) + { + let responseWrapper = responseHandler; + let portals = responseHandler.getPortals(); + if (portals != null) + { + portals.forEach(portal => { + if (portal instanceof ZOHOCRMSDK.Portals.Portals) + { + console.log("Portals CreatedTime : " + portal.getCreatedTime().toString() + "\n"); + console.log("Portals Modifiedtime : " + portal.getModifiedTime().toString() + "\n"); + let modifiedBy = portal.getModifiedBy(); + if (modifiedBy != null) + { + console.log("Portals Modified User-Id : " + modifiedBy.getId() + "\n"); + console.log("Portals Modified User-Name : " + modifiedBy.getName() + "\n"); + } + let createdBy = portal.getCreatedBy(); + if (createdBy != null) + { + console.log("Portals createdBy User-Id : " + createdBy.getId() + "\n"); + console.log("Portals createdBy User-Name : " + createdBy.getName() + "\n"); + } + console.log("Portals Zaid : " + portal.getZaid() + "\n"); + console.log("Portals Name : " + portal.getName() + "\n"); + console.log("Portals Active : " + portal.getActive() + "\n"); + } + }); + } + } + else if (responseHandler instanceof ZOHOCRMSDK.Portals.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let portalName = "PortalsAPITest101"; +await GetPortal.initialize(); +await GetPortal.getPortal(portalName); \ No newline at end of file diff --git a/versions/3.0.0/samples/portals/getPortals.js b/versions/3.0.0/samples/portals/getPortals.js new file mode 100644 index 0000000..b95483f --- /dev/null +++ b/versions/3.0.0/samples/portals/getPortals.js @@ -0,0 +1,79 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetPortals +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getPortals() + { + let portalsOperations = new ZOHOCRMSDK.Portals.PortalsOperations(); + let response = await portalsOperations.getPortals(); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + '\n'); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.Portals.ResponseWrapper) + { + let responseWrapper = responseHandler; + let portals = responseHandler.getPortals(); + if (portals != null) + { + portals.forEach(portal => { + if (portal instanceof ZOHOCRMSDK.Portals.Portals) + { + console.log("Portals CreatedTime : " + portal.getCreatedTime().toString() + "\n"); + console.log("Portals Modifiedtime : " + portal.getModifiedTime().toString() + "\n"); + let modifiedBy = portal.getModifiedBy(); + if (modifiedBy != null) + { + console.log("Portals Modified User-Id : " + modifiedBy.getId() + "\n"); + console.log("Portals Modified User-Name : " + modifiedBy.getName() + "\n"); + } + let createdBy = portal.getCreatedBy(); + if (createdBy != null) + { + console.log("Portals createdBy User-Id : " + createdBy.getId() + "\n"); + console.log("Portals createdBy User-Name : " + createdBy.getName() + "\n"); + } + console.log("Portals Zaid : " + portal.getZaid() + "\n"); + console.log("Portals Name : " + portal.getName() + "\n"); + console.log("Portals Active : " + portal.getActive() + "\n"); + } + }); + } + } + else if (responseHandler instanceof ZOHOCRMSDK.Portals.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await GetPortals.initialize(); +await GetPortals.getPortals(); \ No newline at end of file diff --git a/versions/3.0.0/samples/portals/updatePortal.js b/versions/3.0.0/samples/portals/updatePortal.js new file mode 100644 index 0000000..789b168 --- /dev/null +++ b/versions/3.0.0/samples/portals/updatePortal.js @@ -0,0 +1,83 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdatePortal +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updatePortal(portalName) + { + let portalsOperations = new ZOHOCRMSDK.Portals.PortalsOperations(); + let bodyWrapper = new ZOHOCRMSDK.Portals.BodyWrapper(); + let portals = []; + let portal = new ZOHOCRMSDK.Portals.Portals(); + portal.setName("PortalAPITest101"); + portals.push(portal); + bodyWrapper.setPortals(portals); + let response = portalsOperations.updatePortal(portalName, bodyWrapper); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Portals.ActionWrapper) { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getPortals(); + if (actionResponses != null) { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Portals.SuccessResponse) { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details: "); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + if (actionResponse instanceof ZOHOCRMSDK.Portals.APIException) { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } else if (actionHandler instanceof ZOHOCRMSDK.Portals.APIException) { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let portalName = "PortalSAPITest100"; +await UpdatePortal.initialize(); +await UpdatePortal.updatePortal(portalName); \ No newline at end of file diff --git a/versions/3.0.0/samples/portalusertype/getUserType.js b/versions/3.0.0/samples/portalusertype/getUserType.js new file mode 100644 index 0000000..60c81b8 --- /dev/null +++ b/versions/3.0.0/samples/portalusertype/getUserType.js @@ -0,0 +1,129 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetUserType +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getUserType(portalName, usertypeId) + { + let userTypeOperations = new ZOHOCRMSDK.PortalTypeUser.PortalUserTypeOperations(portalName); + let response = await userTypeOperations.getUserType(usertypeId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.PortalTypeUser.ResponseWrapper) { + let responseWrapper = responseHandler; + let userType = responseWrapper.getUserType(); + if (userType != null) + { + userType.forEach(userType1=> { + if (userType1 instanceof ZOHOCRMSDK.PortalTypeUser.UserType) + { + console.log("UserType Default : " + userType1.getDefault() + '\n'); + let personalityModule = userType1.getPersonalityModule(); + if (personalityModule != null) + { + console.log("UserType PersonalityModule-ID: " + personalityModule.getId() + "\n"); + console.log("UserType PersonalityModule-APIName: " + personalityModule.getAPIName() + "\n"); + console.log("UserType PersonalityModule-PluralLabel: " + personalityModule.getPluralLabel() + "\n"); + } + console.log("UserType Name : "+ userType1.getName() + "\n"); + console.log("UserType Active : "+ userType1.getActive() + "\n"); + console.log("UserType Id : "+ userType1.getId() + "\n"); + console.log("UserType NoOfUsers: " + userType1.getNoOfUsers() + "\n"); + let modules = userType1.getModules(); + if (modules != null) + { + modules.forEach(module => { + if (module instanceof ZOHOCRMSDK.PortalTypeUser.Modules) + { + console.log("UserType Modules PluralLabel: " + module.getPluralLabel() + "\n"); + console.log("UserType Modules SharedType: " + module.getSharedType().getValue() + "\n"); + console.log("UserType Modules APIName: " + module.getAPIName() + "\n"); + let permissions = module.getPermissions(); + if (permissions != null) + { + console.log("UserType Modules Permissions View: " + permissions.getView().getValue() + "\n"); + console.log("UserType Modules Permissions Edit: " + permissions.getEdit() + "\n"); + console.log("UserType Modules Permissions EditSharedRecords: " + permissions.getEditSharedRecords() + "\n"); + console.log("UserType Modules Permissions Create: " + permissions.getCreate() + "\n"); + console.log("UserType Modules Permissions Delete: " + permissions.getDelete() + "\n"); + } + console.log("UserType Modules Id : " + module.getId() + "\n"); + let filters = module.getFilters(); + if (filters != null) + { + filters.forEach(filter=>{ + console.log("UserType Modules filters APIName : " + filter.getAPIName() + "\n"); + console.log("UserType Modules filters DisplayLabel : " + filter.getDisplayLabel() + "\n"); + console.log("UserType Modules filters Id : " + filter.getId() + "\n"); + }); + } + let fields = module.getFields(); + if (fields != null) + { + fields.forEach(field=>{ + console.log("UserType Modules field APIName : " + field.getAPIName() + "\n"); + console.log("UserType Modules field ReadOnly : " + field.getReadOnly() + "\n"); + console.log("UserType Modules field Id : " + field.getId() + "\n"); + }); + } + let layouts = module.getLayouts(); + if (layouts != null) + { + layouts.forEach(layout=>{ + console.log("UserType Modules Layouts Name : " + layout.getName() + "\n"); + console.log("UserType Modules Layouts DisplayLabel : " + layout.getDisplayLabel() + "\n"); + console.log("UserType Modules Layouts Id : " + layout.getId() + "\n"); + }); + } + let view = module.getViews(); + if (view != null) + { + console.log("UserType Modules Views Name : " + view.getName() + "\n"); + console.log("UserType Modules Views DisplayLabel : " + view.getDisplayLabel() + "\n"); + console.log("UserType Modules Views Id : " + view.getId() + "\n"); + console.log("UserType Modules Permissions type : " + view.getType() + "\n"); + } + } + }); + } + } + }); + } + } + else if (responseHandler instanceof ZOHOCRMSDK.PortalTypeUser.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let portalName = "PortalsAPITest101"; +let userTypeId = "44024801304019"; +await GetUserType.initialize(); +await GetUserType.getUserType(portalName, userTypeId); \ No newline at end of file diff --git a/versions/3.0.0/samples/portalusertype/getUserTypes.js b/versions/3.0.0/samples/portalusertype/getUserTypes.js new file mode 100644 index 0000000..8e756fa --- /dev/null +++ b/versions/3.0.0/samples/portalusertype/getUserTypes.js @@ -0,0 +1,87 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetUserTypes +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getUserTypes(portalName) + { + let userTypeOperations = new ZOHOCRMSDK.PortalTypeUser.PortalUserTypeOperations(portalName); + let response = await userTypeOperations.getUserTypes(); + if (response != null) { + console.log("Status Code: " + response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.PortalTypeUser.ResponseWrapper) + { + let responseWrapper = responseHandler; + let userType = responseWrapper.getUserType(); + if (userType != null) + { + userType.forEach(userType1=>{ + if (userType1 instanceof ZOHOCRMSDK.PortalTypeUser.UserType) + { + console.log("UserType CreatedTime : " + userType1.getCreatedTime().toString() + "\n"); + console.log("UserType Default : " + userType1.getDefault() + "\n"); + console.log("UserType ModifiedTime : " + userType1.getModifiedTime().toString() + "\n"); + let personalityModule = userType1.getPersonalityModule(); + if (personalityModule != null) + { + console.log("UserType PersonalityModule-ID: " + personalityModule.getId() + "\n"); + console.log("UserType PersonalityModule-APIName: " + personalityModule.getAPIName() + "\n"); + console.log("UserType PersonalityModule-PluralLabel: " + personalityModule.getPluralLabel() + "\n"); + } + console.log("UserType Name : "+ userType1.getName() + "\n"); + let modifiedBy = userType1.getModifiedBy(); + if (modifiedBy != null) + { + console.log("UserType ModifiedBy User-ID : " + modifiedBy.getId() + "\n"); + console.log("UserType ModifiedBy User-Name : " + modifiedBy.getName() + "\n"); + } + console.log("UserType Active : "+ userType1.getActive() + "\n"); + console.log("UserType Id : "+ userType1.getId() + "\n"); + let createdBy = userType1.getCreatedBy(); + if (createdBy != null) + { + console.log("UserType CreatedBy User-ID: " + createdBy.getId() + "\n"); + console.log("UserType CreatedBy User-Name: " + createdBy.getName() + "\n"); + } + console.log("UserType NoOfUsers: " + userType1.getNoOfUsers() + "\n"); + } + }); + } + } + else if (responseHandler instanceof ZOHOCRMSDK.PortalTypeUser.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let portalName = "PortalsAPITest101"; +await GetUserTypes.initialize(); +await GetUserTypes.getUserTypes(portalName); \ No newline at end of file diff --git a/versions/3.0.0/samples/profiles/CloneProfiles.js b/versions/3.0.0/samples/profiles/CloneProfiles.js new file mode 100644 index 0000000..1028524 --- /dev/null +++ b/versions/3.0.0/samples/profiles/CloneProfiles.js @@ -0,0 +1,79 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CloneProfiles +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async cloneProfiles(profileId) + { + let profilesOperations = new ZOHOCRMSDK.Profiles.ProfilesOperations(); + let bodyWrapper = new ZOHOCRMSDK.Profiles.ProfileWrapper(); + let profiles = []; + let profile = new ZOHOCRMSDK.Profiles.Profile(); + profile.setName("Profile Name"); + profile.setDescription("description"); + profiles.push(profile); + bodyWrapper.setProfiles(profiles); + let response = await profilesOperations.cloneProfiles(profileId, bodyWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if(responseObject instanceof ZOHOCRMSDK.Profiles.ActionWrapper) { + let actionResponses = responseObject.getProfiles(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Profiles.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Profiles.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Profiles.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let profileId = 440248025063n; +await CloneProfiles.initialize(); +await CloneProfiles.cloneProfiles(profileId); \ No newline at end of file diff --git a/versions/3.0.0/samples/profiles/DeleteProfile.js b/versions/3.0.0/samples/profiles/DeleteProfile.js new file mode 100644 index 0000000..28df1aa --- /dev/null +++ b/versions/3.0.0/samples/profiles/DeleteProfile.js @@ -0,0 +1,57 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class DeleteProfile +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async deleteProfile(profileId, existingProfileId) + { + let profileOperations = new ZOHOCRMSDK.Profiles.ProfilesOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Profiles.DeleteProfileParam.TRANSFER_TO, existingProfileId); + let response = await profileOperations.deleteProfile(profileId, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Profiles.SuccessResponse) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } else if (responseObject instanceof ZOHOCRMSDK.Profiles.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let profileId = 44024800134n; +let existingProfileId = 4401325063n; +await DeleteProfile.initialize(); +await DeleteProfile.deleteProfile(profileId, existingProfileId); \ No newline at end of file diff --git a/versions/3.0.0/samples/profiles/UpdateProfile.js b/versions/3.0.0/samples/profiles/UpdateProfile.js new file mode 100644 index 0000000..1bb697e --- /dev/null +++ b/versions/3.0.0/samples/profiles/UpdateProfile.js @@ -0,0 +1,79 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateProfile +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateProfile(profileId) + { + let profilesOperations = new ZOHOCRMSDK.Profiles.ProfilesOperations(); + let bodyWrapper = new ZOHOCRMSDK.Profiles.ProfileWrapper(); + let profiles = []; + let profile = new ZOHOCRMSDK.Profiles.Profile(); + profile.setName("Profile123"); + profile.setDescription("description"); + profiles.push(profile); + bodyWrapper.setProfiles(profiles); + let response = await profilesOperations.updateProfile(profileId, bodyWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if(responseObject instanceof ZOHOCRMSDK.Profiles.ActionWrapper) { + let actionResponses = responseObject.getProfiles(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Profiles.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Profiles.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Profiles.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let profileId = 44024801325063n; +await UpdateProfile.initialize(); +await UpdateProfile.updateProfile(profileId); \ No newline at end of file diff --git a/versions/3.0.0/samples/profiles/getProfile.js b/versions/3.0.0/samples/profiles/getProfile.js new file mode 100644 index 0000000..b7773a3 --- /dev/null +++ b/versions/3.0.0/samples/profiles/getProfile.js @@ -0,0 +1,129 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetProfile{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Profile

+ * This method is used to get the details of any specific profile with ID. + * @param {BigInt} profileId The ID of the Profile to be obtained + */ + static async getProfile(profileId) { + //example + // let profileId = 26014n; + let profilesOperations = new ZOHOCRMSDK.Profiles.ProfilesOperations(); + //Call getProfile method that takes profileId as parameter + let response = await profilesOperations.getProfile(profileId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Profiles.ProfileWrapper) { + let profiles = responseObject.getProfiles(); + profiles.forEach(profile => { + console.log("Profile DisplayLabel: " + profile.getDisplayLabel()); + if (profile.getCreatedTime() != null) { + console.log("Profile CreatedTime: " + profile.getCreatedTime()); + } + if (profile.getModifiedTime() != null) { + console.log("Profile ModifiedTime: " + profile.getModifiedTime()); + } + console.log("Profile Custom: " + profile.getCustom()); + let permissionsDetails = profile.getPermissionsDetails(); + if (permissionsDetails != null) { + permissionsDetails.forEach(permissionsDetail => { + console.log("Profile PermissionDetail DisplayLabel: " + permissionsDetail.getDisplayLabel()); + console.log("Profile PermissionDetail Module: " + permissionsDetail.getModule()); + console.log("Profile PermissionDetail Name: " + permissionsDetail.getName()); + console.log("Profile PermissionDetail ID: " + permissionsDetail.getId()); + console.log("Profile PermissionDetail Enabled: " + permissionsDetail.getEnabled()); + }); + } + console.log("Profile Name: " + profile.getName()); + let modifiedBy = profile.getModifiedBy(); + if (modifiedBy != null) { + console.log("Profile Modified By User-ID: " + modifiedBy.getId()); + console.log("Profile Modified By User-Name: " + modifiedBy.getName()); + console.log("Profile Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("Profile Description: " + profile.getDescription()); + console.log("Profile ID: " + profile.getId()); + let createdBy = profile.getCreatedBy(); + if (createdBy != null) { + console.log("Profile Created By User-ID: " + createdBy.getId()); + console.log("Profile Created By User-Name: " + createdBy.getName()); + console.log("Profile Created By User-Email: " + createdBy.getEmail()); + } + let sections = profile.getSections(); + if (sections != null) { + for (let index = 0; index < sections.length; index++) { + let section = sections[index]; + console.log("Profile Section Name: " + section.getName()); + let categories = section.getCategories(); + categories.forEach(category => { + if (category instanceof ZOHOCRMSDK.Profiles.CategoryModule) + { + console.log("Profile Section Category DisplayLabel: " + category.getDisplayLabel()); + let categoryPermissionsDetails = category.getPermissionsDetails(); + if (categoryPermissionsDetails != null) { + categoryPermissionsDetails.forEach(permissionsDetailID => { + console.log("Profile Section Category permissionsDetailID: " + permissionsDetailID); + }); + } + console.log("Profile Section Category Module: " + category.getModule()); + console.log("Profile Section Category Name: " + category.getName()); + } + if (category instanceof ZOHOCRMSDK.Profiles.CategoryOthers) + { + console.log("Profile Section Category DisplayLabel: " + category.getDisplayLabel()); + let categoryPermissionsDetails = category.getPermissionsDetails(); + if (categoryPermissionsDetails != null) { + categoryPermissionsDetails.forEach(permissionsDetailID => { + console.log("Profile Section Category permissionsDetailID: " + permissionsDetailID); + }); + } + console.log("Profile Section Category Name: " + category.getName()); + } + }); + } + } + if (profile.getDelete() != null) { + console.log("Profile Delete: " + profile.getDelete().toString()); + } + if (profile.getDefault() != null) { + console.log("Profile Default: " + profile.getDefault().toString()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Profiles.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetProfile.initialize(); +let profileId = 440248025063n; +await GetProfile.getProfile(profileId); diff --git a/versions/3.0.0/samples/profiles/getProfiles.js b/versions/3.0.0/samples/profiles/getProfiles.js new file mode 100644 index 0000000..10330a2 --- /dev/null +++ b/versions/3.0.0/samples/profiles/getProfiles.js @@ -0,0 +1,79 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetProfiles{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Profiles

+ * This method is used to retrieve the profiles data through an API request and print the response. + */ + static async getProfiles() { + //To include If-Modified-Since header in the request, get the instance as follows + let profilesOperations = new ZOHOCRMSDK.Profiles.ProfilesOperations(); + //To not include If-Modified-Since header to the request, get the instance as follows + // profilesOperations = new ZOHOCRMSDK.Profiles.ProfilesOperations(null); + //Call getProfiles method + let response = await profilesOperations.getProfiles(); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Profiles.ProfileWrapper) { + let profiles = responseObject.getProfiles(); + profiles.forEach(profile => { + console.log("Profile DisplayLabel: " + profile.getDisplayLabel()); + if (profile.getCreatedTime() != null) { + console.log("Profile CreatedTime: " + profile.getCreatedTime()); + } + if (profile.getModifiedTime() != null) { + console.log("Profile ModifiedTime: " + profile.getModifiedTime()); + } + console.log("Profile Custom: " + profile.getCustom()); + console.log("Profile Name: " + profile.getName()); + let modifiedBy = profile.getModifiedBy(); + if (modifiedBy != null) { + console.log("Profile Modified By User-ID: " + modifiedBy.getId()); + console.log("Profile Modified By User-Name: " + modifiedBy.getName()); + console.log("Profile Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("Profile Description: " + profile.getDescription()); + console.log("Profile ID: " + profile.getId()); + let createdBy = profile.getCreatedBy(); + if (createdBy != null) { + console.log("Profile Created By User-ID: " + createdBy.getId()); + console.log("Profile Created By User-Name: " + createdBy.getName()); + console.log("Profile Created By User-Email: " + createdBy.getEmail()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Profiles.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetProfiles.initialize(); +await GetProfiles.getProfiles(); \ No newline at end of file diff --git a/versions/3.0.0/samples/query/query.js b/versions/3.0.0/samples/query/query.js new file mode 100644 index 0000000..2736ed9 --- /dev/null +++ b/versions/3.0.0/samples/query/query.js @@ -0,0 +1,109 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class Query { + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getRecords() { + let queryOperations = new ZOHOCRMSDK.Query.QueryOperations(); + let bodyWrapper = new ZOHOCRMSDK.Query.BodyWrapper(); + let selectQuery = "select Last_Name,Created_Time from Leads where Last_Name is not null limit 200"; + bodyWrapper.setSelectQuery(selectQuery); + //Call getRecords method that takes BodyWrapper instance as parameter + let response = await queryOperations.getRecords(bodyWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Query.ResponseWrapper) { + let records = responseObject.getData(); + for (let record of records) { + console.log("Record ID: " + record.getId()); + let createdBy = record.getCreatedBy(); + if (createdBy != null) { + console.log("Record Created By User-ID: " + createdBy.getId()); + console.log("Record Created By User-Name: " + createdBy.getName()); + console.log("Record Created By User-Email: " + createdBy.getEmail()); + } + console.log("Record CreatedTime: " + record.getCreatedTime()); + let modifiedBy = record.getModifiedBy(); + if (modifiedBy != null) { + console.log("Record Modified By User-ID: " + modifiedBy.getId()); + console.log("Record Modified By User-Name: " + modifiedBy.getName()); + console.log("Record Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("Record ModifiedTime: " + record.getModifiedTime()); + let tags = record.getTag(); + if (tags != null) { + tags.forEach(tag => { + console.log("Record Tag Name: " + tag.getName()); + console.log("Record Tag ID: " + tag.getId()); + }); + } + //To get particular field value + console.log("Record Field Value: " + record.getKeyValue("Last_Name"));// FieldApiName + console.log("Record KeyValues: "); + let keyValues = record.getKeyValues(); + let keyArray = Array.from(keyValues.keys()); + for (let keyName of keyArray) { + let value = keyValues.get(keyName); + if (Array.isArray(value)) { + console.log("Record keyName: " + keyName); + for (let data of value) { + if (data instanceof Map) { + for (let mapKey in data) { + console.log(mapKey + " : " + data.get(mapKey)); + } + } + else { + console.log(data); + } + } + } + else if (value instanceof Map) { + console.log("Record keyName: " + keyName); + for (let mapKey in value) { + console.log(mapKey + " : " + value.get(mapKey)); + } + } + else { + console.log("Record keyName: " + keyName + " - Value - " + value); + } + } + } + let info = responseObject.getInfo(); + if (info != null) { + if (info.getCount() != null) { + console.log("Record Info Count: " + info.getCount().toString()); + } + if (info.getMoreRecords() != null) { + console.log("Record Info MoreRecords: " + info.getMoreRecords().toString()); + } + } + } + else if (responseObject instanceof ZOHOCRMSDK.Query.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await Query.initialize(); +await Query.getRecords(); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/LeadConversionOptions.js b/versions/3.0.0/samples/records/LeadConversionOptions.js new file mode 100644 index 0000000..44b10f9 --- /dev/null +++ b/versions/3.0.0/samples/records/LeadConversionOptions.js @@ -0,0 +1,260 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class LeadConversionOptions +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async leadConversionOptions(recordId) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let moduleAPIName = "Leads"; + let response =await recordOperations.leadConversionOptions(recordId, moduleAPIName); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.Record.ConversionOptionsResponseWrapper) + { + let conversionOption = responseHandler.getConversionoptions(); + let module = conversionOption.getModulePreference(); + if (module != null) + { + console.log("ConversionOptions ModulePreference API-Name: " + module.getAPIName()); + console.log("ConversionOptions ModulePreference ID: " + module.getId()); + } + let contacts = conversionOption.getContacts(); + if (contacts != null) + { + contacts.forEach(contact => { + console.log("Record ID : " + contact.getId()); + console.log("Record keyValues : "); + Array.from(contact.getKeyValues().keys()).forEach(key => { + let keyName = key; + let value = (contact.getKeyValues()).get(key); + if (Array.isArray(value)) + { + console.log("Record KeyName : " + keyName); + let dataList = value; + dataList.forEach(data => { + if (data instanceof Map) + { + console.log("Record KeyName : " + keyName + " - Value : "); + Array.from(data.keys()).forEach(key => { + console.log(key + " : " + data.get(key)); + }); + } + else + { + console.log(data); + } + }); + } + else if (value instanceof Map) + { + console.log("Record KeyName : " + keyName + " - value :"); + Array.from(value.keys()).forEach(key => { + console.log(key + " : "+ value.get(key)); + }); + } + else + { + console.log("Record KeyName : " + keyName + " - Value : " + value); + } + }); + }); + } + let preferenceFieldMatchedValue = conversionOption.getPreferenceFieldMatchedValue(); + if (preferenceFieldMatchedValue != null) + { + let contactsPreferenceField = preferenceFieldMatchedValue.getContacts(); + if (contactsPreferenceField != null) + { + contactsPreferenceField.forEach(contact => { + console.log("Record ID: " + contact.getId()); + console.log("Record KeyValues: "); + Array.from(contact.getKeyValues().keys()).forEach(key => { + let keyName = key; + let value = contact.getKeyValues().get(key); + if (value instanceof Map) + { + console.log("Record KeyName : " + keyName + " - Value : "); + Array.from(value.keys()).forEach(key => { + console.log(key + " : " + value.get(key)); + }); + } + else + { + console.log("Record KeyName : " + keyName + " : Value : " + value); + } + }); + }); + } + let accountsPreferenceField = preferenceFieldMatchedValue.getAccounts(); + if (accountsPreferenceField != null) + { + accountsPreferenceField.forEach(account => { + console.log("Record ID: " + account.getId()); + console.log("Record KeyValues: "); + Array.from(account.getKeyValues().keys()).forEach(key => { + let keyName = key; + let value = account.getKeyValues().get(key); + if (value instanceof Map) + { + console.log("Record KeyName : " + keyName + " - Value : "); + Array.from(value.keys()).forEach(key => { + console.log(key + " : " + value.get(key)); + }); + } + else + { + console.log("Record KeyName : " + keyName + " : Value : " + value); + } + }); + }); + } + let dealsPreferenceField = preferenceFieldMatchedValue.getDeals(); + if (dealsPreferenceField != null) + { + dealsPreferenceField.forEach(deal => { + console.log("Record ID: " + deal.getId()); + console.log("Record KeyValues: "); + Array.from(deal.getKeyValues().keys()).forEach(key => { + let keyName = key; + let value = deal.getKeyValues().get(key); + if (value instanceof Map) + { + console.log("Record KeyName : " + keyName + " - Value : "); + Array.from(value.keys()).forEach(key => { + console.log(key + " : " + value.get(key)); + }); + } + else + { + console.log("Record KeyName : " + keyName + " : Value : " + value); + } + }); + }); + } + } + let accounts = conversionOption.getAccounts(); + if (accounts != null) + { + accounts.forEach(account => { + console.log("Record ID : " + account.getId()); + console.log("Record KeyValues : "); + Array.from(account.getKeyValues().keys()).forEach(key => { + let keyName = key; + let value = (account.getKeyValues()).get(key); + if (Array.isArray(value)) + { + console.log("Record KeyName : " + keyName); + let dataList = value; + dataList.forEach(data => { + if (data instanceof Map) + { + console.log("Record KeyName : " + keyName + " - Value : "); + Array.from(data.keys()).forEach(key => { + console.log(key + " : " + data.get(key)); + }); + } + else + { + console.log(data); + } + }); + } + else if (value instanceof Map) + { + console.log("Record KeyName : " + keyName + " - value :"); + Array.from(value.keys()).forEach(key => { + console.log(key + " : "+ value.get(key)); + }); + } + else + { + console.log("Record KeyName : " + keyName + " - Value : " + value); + } + }); + }); + } + let deals = conversionOption.getDeals(); + if (deals != null) + { + deals.forEach(deal => { + console.log("Record ID : " + deal.getId()); + console.log("Record KeyValues : "); + Array.from(deal.getKeyValues().keys()).forEach(key => { + let keyName = key; + let value = (deal.getKeyValues()).get(key); + if (Array.isArray(value)) + { + console.log("Record KeyName : " + keyName); + let dataList = value; + dataList.forEach(data => { + if (data instanceof Map) + { + console.log("Record KeyName : " + keyName + " - Value : "); + Array.from(data.keys()).forEach(key => { + console.log(key + " : " + data.get(key)); + }); + } + else + { + console.log(data); + } + }); + } + else if (value instanceof Map) + { + console.log("Record KeyName : " + keyName + " - value :"); + Array.from(value.keys()).forEach(key => { + console.log(key + " : "+ value.get(key)); + }); + } + else + { + console.log("Record KeyName : " + keyName + " - Value : " + value); + } + }); + }); + } + let modulesWithMultipleLayouts = conversionOption.getModulesWithMultipleLayouts(); + if (modulesWithMultipleLayouts != null) + { + modulesWithMultipleLayouts.forEach(module1 => { + console.log("ConversionOptions ModulesWithMultipleLayouts API-Name: " + module1.getAPIName()); + console.log("ConversionOptions ModulesWithMultipleLayouts ID: " + module1.getId()); + }); + } + } + else if (responseHandler instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage().getValue()); + } + } + } +} +let recordId = 44024774074n; +await LeadConversionOptions.initialize(); +await LeadConversionOptions.leadConversionOptions(recordId); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/assignTerritoriesToMultipleRecords.js b/versions/3.0.0/samples/records/assignTerritoriesToMultipleRecords.js new file mode 100644 index 0000000..d087d74 --- /dev/null +++ b/versions/3.0.0/samples/records/assignTerritoriesToMultipleRecords.js @@ -0,0 +1,88 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class AssignTerritoriesToMultipleRecords{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async assignTerritoriesToMultipleRecords(moduleAPIName) { + //API Name of the module to assignTerritoriesToMultipleRecords + //let moduleAPIName = "Leads"; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + //List of Record instances + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(44024804074n); + /* + * Call addKeyValue method that takes two arguments + * 1 . A string that is the Field's API Name + * 2 . Value + */ + let territory = new ZOHOCRMSDK.Record.Territory(); + territory.setId(440248390040n); + record1.addKeyValue("Territories", [territory]); + //Add Record instance to the list + records.push(record1); + request.setData(records); + //Call assignTerritoriesToMultipleRecords method that takes ModuleAPIName and BodyWrapper instance as parameter. + let response = await recordOperations.assignTerritoriesToMultipleRecords(moduleAPIName, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if(responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await AssignTerritoriesToMultipleRecords.initialize(); +let moduleAPIName = "leads"; +await AssignTerritoriesToMultipleRecords.assignTerritoriesToMultipleRecords(moduleAPIName); diff --git a/versions/3.0.0/samples/records/assignTerritoryToRecord.js b/versions/3.0.0/samples/records/assignTerritoryToRecord.js new file mode 100644 index 0000000..8201ec0 --- /dev/null +++ b/versions/3.0.0/samples/records/assignTerritoryToRecord.js @@ -0,0 +1,88 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class AssignTerritoryToRecord{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async assignTerritoryToRecord(moduleAPIName, recordId) { + //API Name of the module to assignTerritoryToRecord + //let moduleAPIName = "Leads"; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + //List of Record instances + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + /* + * Call addKeyValue method that takes two arguments + * 1 . A string that is the Field's API Name + * 2 . Value + */ + let territory = new ZOHOCRMSDK.Record.Territory(); + territory.setId(34770613051397n); + record1.addKeyValue("Territories", [territory]); + //Add Record instance to the list + records.push(record1); + request.setData(records); + //Call assignTerritoryToRecord method that takes ModuleAPIName, redcordId and BodyWrapper instance as parameter. + let response = await recordOperations.assignTerritoryToRecord(moduleAPIName, recordId, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await AssignTerritoryToRecord.initialize(); +let moduleAPIName ="Leads"; +let recordId = 400012300111n; +await AssignTerritoryToRecord.assignTerritoryToRecord(moduleAPIName,recordId); diff --git a/versions/3.0.0/samples/records/convertLead.js b/versions/3.0.0/samples/records/convertLead.js new file mode 100644 index 0000000..fa0a9ef --- /dev/null +++ b/versions/3.0.0/samples/records/convertLead.js @@ -0,0 +1,112 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class ConvertLead{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Convert Lead

+ * This method is used to Convert a Lead record and print the response. + * @param {BigInt} leadId The ID of the Lead to be converted. + */ + static async convertLead(leadId) { + //example + //let leadId = 02034003n; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.ConvertBodyWrapper(); + //Array to hold LeadConverter instances + let data = []; + let record = new ZOHOCRMSDK.Record.LeadConverter(); + record.setOverwrite(true); + record.setNotifyLeadOwner(true); + record.setNotifyNewEntityOwner(true); + let accounts = new ZOHOCRMSDK.Record.Record(); + accounts.setId(347706112263002n); + await record.setAccounts(accounts); + + let contacts = new ZOHOCRMSDK.Record.Record(); + contacts.setId(347706112263005n); + await record.setContacts(contacts); + + let minifieduser = new ZOHOCRMSDK.Users.MinifiedUser(); + minifieduser.setId(33423423421323n); + await record.setAssignTo(minifieduser); + let deals = new ZOHOCRMSDK.Record.Record(); + /* + * Call addFieldValue method that takes two arguments + * Import the "@zohocrm/nodejs-sdk-2.1/core/com/zoho/crm/api/record/field" file + * 1 . Call Field "." and choose the module from the displayed list and press "." and choose the field name from the displayed list. + * 2 . Value + */ + await deals.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.DEAL_NAME, "deal_name"); + await deals.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.DESCRIPTION, "deals description"); + await deals.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.CLOSING_DATE, new Date(2021, 2, 13)); + await deals.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.STAGE, new ZOHOCRMSDK.Choice("Closed Won")); + await deals.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.AMOUNT, 50.7); + deals.addKeyValue("Pipeline", new ZOHOCRMSDK.Choice("Qualification")); + /* + * Call addKeyValue method that takes two arguments + * 1 . A string that is the Field's API Name + * 2 . Value + */ + deals.addKeyValue("Custom_field", "Value"); + deals.addKeyValue("Custom_field_2", "value"); + await record.setDeals(deals); + //Add the instance to array + data.push(record); + request.setData(data); + //Call convertLead method that takes ConvertBodyWrapper instance and leadId as parameter + let response = await recordOperations.convertLead(leadId, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let convertActionResponses = responseObject.getData(); + convertActionResponses.forEach(convertActionResponse => { + if (convertActionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("LeadConvert Accounts ID: " + convertActionResponse.getAccounts()); + console.log("LeadConvert Contacts ID: " + convertActionResponse.getContacts()); + console.log("LeadConvert Deals ID: " + convertActionResponse.getDeals()); + } + else if (convertActionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + convertActionResponse.getStatus().getValue()); + console.log("Code: " + convertActionResponse.getCode().getValue()); + console.log("Details"); + let details = convertActionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + convertActionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await ConvertLead.initialize(); +let leadId = 4002300010088n +await ConvertLead.convertLead(leadId); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/createRecords.js b/versions/3.0.0/samples/records/createRecords.js new file mode 100644 index 0000000..d8628cf --- /dev/null +++ b/versions/3.0.0/samples/records/createRecords.js @@ -0,0 +1,259 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class CreateRecords{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } +// /** +// *

Create Records

+// * This method is used to create records of a module and print the response. +// * @param {String} moduleAPIName The API Name of the module to create records. +// */ + static async createRecords(moduleAPIName) { + + //example + //let moduleAPIName = "module_api_name"; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + //Array to hold Record instances + let recordsArray = []; + let record = new ZOHOCRMSDK.Record.Record(); + /* Value to Record's fields can be provided in any of the following ways */ + /* + * Call addFieldValue method that takes two arguments + * Import the "@zohocrm/nodejs-sdk-2.1/core/com/zoho/crm/api/record/field" file + * 1 . Call Field "." and choose the module from the displayed list and press "." and choose the field name from the displayed list. + * 2 . Value + */ + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LAST_NAME, "Node JS SDK"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.FIRST_NAME, "Node"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.COMPANY, "ZCRM"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.CITY, "City"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.ANNUAL_REVENUE, 1231.1); + + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.LAST_NAME, "NOde js SDK"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.FIRST_NAME, "Node"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.EMAIL,"abc@gmail.com"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.MOBILE, "1234221"); + record.addKeyValue("myfield","myvalue"); + /* + * Call addKeyValue method that takes two arguments + * 1 . A string that is the Field's API Name + * 2 . Value + */ + record.addKeyValue("Custom_field", "Value"); + record.addKeyValue("Custom_field_2", "value"); + record.addKeyValue("Date_1", new Date(2020, 10, 20)); + record.addKeyValue("Subject", "AutomatedSDK"); + let tax = new ZOHOCRMSDK.Record.Tax(); + tax.setValue("MyTax1134 - 15.0 %"); + record.addKeyValue("Tax", [tax]); + record.addKeyValue("Product_Name", "AutomatedSDK"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32196420ac6fbc01d10b0ac1e4808c9b3c"); + fileDetails.push(fileDetail); + fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c3257343887127572f1f052be51bf0ddc70"); + fileDetails.push(fileDetail); + fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c326025b541cb4566802a96faf5fa449638"); + fileDetails.push(fileDetail); + record.addKeyValue("File_Upload", fileDetails); + let recordOwner = new ZOHOCRMSDK.Users.Users(); + recordOwner.setEmail("abc@zoho.com"); + record.addKeyValue("Owner", recordOwner); + //Used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + record.addKeyValue("Data_Processing_Basis_Details", dataConsent); + /** Following methods are being used only by Inventory modules */ + let dealName = new ZOHOCRMSDK.Record.Record(); + await dealName.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.ID, 347706112416012n); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.DEAL_NAME, dealName); + let contactName = new ZOHOCRMSDK.Record.Record(); + await contactName.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.ID, 347706112263005n); + await contactName.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.CONTACT_NAME, contactName); + let accountName = new ZOHOCRMSDK.Record.Record(); + await accountName.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.ID, 44024800884001n); + accountName.addKeyValue("name", "automatedAccount"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.ACCOUNT_NAME, accountName); + record.addKeyValue("Discount", 10.5); + let inventoryLineItemArray = []; + let inventoryLineItem = new ZOHOCRMSDK.Record.Record(); + let lineItemProduct = new ZOHOCRMSDK.Record.LineItemProduct(); + lineItemProduct.setId(44024800954344n); + // lineItemProduct.addKeyValue("Products_External", "ProductExternal"); + inventoryLineItem.addKeyValue("Product_Name", lineItemProduct); + inventoryLineItem.addKeyValue("Quantity", 1); + inventoryLineItem.addKeyValue("Description", "productDescription"); + inventoryLineItem.addKeyValue("ListPrice", 10.0); + inventoryLineItem.addKeyValue("Discount", "5.%"); + let productLineTaxes = []; + let productLineTax = new ZOHOCRMSDK.Record.LineTax(); + productLineTax.setName("MyTax1134"); + productLineTax.setPercentage(20.0); + productLineTaxes.push(productLineTax); + inventoryLineItem.addKeyValue("Line_Tax", productLineTaxes); + inventoryLineItemArray.push(inventoryLineItem); + record.addKeyValue("Quoted_Items", inventoryLineItemArray); + record.addKeyValue("Invoiced_Items", inventoryLineItemArray); + record.addKeyValue("Purchase_Items", inventoryLineItemArray); + record.addKeyValue("Ordered_Items", inventoryLineItemArray); + let lineTaxes = []; + let lineTax = new ZOHOCRMSDK.Record.LineTax(); + lineTax.setName("MyTax1134"); + lineTax.setPercentage(20.0); + lineTaxes.push(lineTax); + record.addKeyValue("$line_tax", lineTaxes); + /** End Inventory **/ + /** Following methods are being used only by Activity modules */ + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.DESCRIPTION, "New Task"); + record.addKeyValue("Currency", new ZOHOCRMSDK.Choice("INR")); + let remindAt = new ZOHOCRMSDK.Record.RemindAt(); + remindAt.setAlarm("FREQ=NONE;ACTION=EMAILANDPOPUP;TRIGGER=DATE-TIME:2020-07-03T12:30:00+05:30"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.REMIND_AT, remindAt); + let whoId = new ZOHOCRMSDK.Record.Record(); + whoId.setId(347706112263005n); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.WHO_ID, whoId); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.STATUS, new ZOHOCRMSDK.Choice("Waiting for input")); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.DUE_DATE, new Date(2022, 10, 10)); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.PRIORITY, new ZOHOCRMSDK.Choice("High")); + let whatId = new ZOHOCRMSDK.Record.Record(); + whatId.setId(347706112263002n); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.WHAT_ID, whatId); + record.addKeyValue("$se_module", "Accounts"); + /** Recurring Activity can be provided in any activity module*/ + let recurringActivity = new ZOHOCRMSDK.Record.RecurringActivity(); + recurringActivity.setRrule("FREQ=DAILY;INTERVAL=10;UNTIL=2020-08-14;DTSTART=2020-07-03"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Events.RECURRING_ACTIVITY, recurringActivity); + // + /**Events**/ + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Events.DESCRIPTION, "My Event"); + let startDateTime = new Date('October 15, 2020 05:35:32'); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Events.START_DATETIME, startDateTime); + let participantsArray = []; + let participant = new ZOHOCRMSDK.Record.Participants(); + participant.setParticipant("test@gmail.com"); + participant.setType("email"); + participantsArray.push(participant); + participant = new ZOHOCRMSDK.Record.Participants(); + participant.setParticipant("347706112263005"); + participant.setType("contact"); + participantsArray.push(participant); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Events.PARTICIPANTS, participantsArray); + record.addKeyValue("send_notification", true); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Events.EVENT_TITLE, "New Automated Event"); + let endDateTime = new Date('November 15, 2020 05:35:32'); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Events.END_DATETIME, endDateTime); + let remindAt1 = new Date('October 15, 2020 04:35:32'); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Events.REMIND_AT, remindAt1); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Events.CHECK_IN_STATUS, "PLANNED"); + let whatId1 = new ZOHOCRMSDK.Record.Record(); + whatId1.setId(347706112419002n); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.WHAT_ID, whatId1); + record.addKeyValue("$se_module", "Leads"); + /** End Activity **/ + /** Following methods are being used only by Price_Books module */ + let pricingDetailsArray = []; + let pricingDetail = new ZOHOCRMSDK.Record.PricingDetails(); + pricingDetail.setFromRange(1.0); + pricingDetail.setToRange(5.0); + pricingDetail.setDiscount(2.0); + pricingDetailsArray.push(pricingDetail); + pricingDetail = new ZOHOCRMSDK.Record.PricingDetails(); + pricingDetail.addKeyValue("from_range", 6.0); + pricingDetail.addKeyValue("to_range", 11.0); + pricingDetail.addKeyValue("discount", 3.0); + pricingDetailsArray.push(pricingDetail); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Price_Books.PRICING_DETAILS, pricingDetailsArray); + record.addKeyValue("Email", "abc@zoho.com"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Price_Books.DESCRIPTION, "TEST"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Price_Books.PRICE_BOOK_NAME, "book_name"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Price_Books.PRICING_MODEL, new Choice("Flat")); + /** End of Price_Books */ + let tagsArray = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagsArray.push(tag); + record.setTag(tagsArray); + // //Add Record instance to the array + recordsArray.push(record); + request.setData(recordsArray); + let trigger = []; + + trigger.push("approval"); + + trigger.push("workflow"); + + trigger.push("blueprint"); + request.setTrigger(trigger); + let larId = "34096432157065"; + request.setLarId(larId); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // headerInstance.add(CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + //Call createRecords method that takes BodyWrapper instance and moduleAPIName as parameters + let response = await recordOperations.createRecords(moduleAPIName, request, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await CreateRecords.initialize(); +let moduleAPIName = "leads"; +await CreateRecords.createRecords("leads"); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/deletePhoto.js b/versions/3.0.0/samples/records/deletePhoto.js new file mode 100644 index 0000000..dfc76a2 --- /dev/null +++ b/versions/3.0.0/samples/records/deletePhoto.js @@ -0,0 +1,62 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeletePhoto{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + * This method is used to delete a photo from a record in a module. + * @param {String} moduleAPIName The API Name of the record's module + * @param {BigInt} recordId The ID of the record to delete photo + */ + static async deletePhoto(moduleAPIName, recordId) { + //example + //let moduleAPIName = "module_api_name"; + //let recordId = 005177002n; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + //Call deletePhoto method that takes moduleAPIName and recordId as parameter + let response = await recordOperations.deletePhoto(recordId, moduleAPIName); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await DeletePhoto.initialize(); +let moduleAPIName = "leads"; +let recordId = 440248082075n; +await DeletePhoto.deletePhoto(moduleAPIName,recordId); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/deleteRecord.js b/versions/3.0.0/samples/records/deleteRecord.js new file mode 100644 index 0000000..791a99b --- /dev/null +++ b/versions/3.0.0/samples/records/deleteRecord.js @@ -0,0 +1,85 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteRecord{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Delete Record

+ * This method is used to delete a single record of a module with ID and print the response. + * @param {String} moduleAPIName The API Name of the record's module. + * @param {BigInt} recordId The ID of the record to be deleted + */ + static async deleteRecord(moduleAPIName, recordId) { + //API Name of the module to delete record + //let moduleAPIName = "module_api_name"; + //let recordId = 77002n; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + //Possible parameters for Delete Record operation + await paramInstance.add(ZOHOCRMSDK.Record.DeleteRecordParam.WF_TRIGGER, true); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // headerInstance.add(DeleteRecordHeader.X_EXTERNAL, "Leads.External"); + //Call deleteRecord method that takes recordId, ModuleAPIName, paramInstance and headerInstance as parameter. + let response = await recordOperations.deleteRecord(recordId, moduleAPIName, paramInstance, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await DeleteRecord.initialize(); +let moduleAPIName = "leads"; +let recordId = 44024001371049n; +await DeleteRecord.deleteRecord(moduleAPIName,recordId); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/deleteRecordUsingExternalId.js b/versions/3.0.0/samples/records/deleteRecordUsingExternalId.js new file mode 100644 index 0000000..ca75fbd --- /dev/null +++ b/versions/3.0.0/samples/records/deleteRecordUsingExternalId.js @@ -0,0 +1,85 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteRecordUsingExternalId { + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Delete Record Using External Id

+ * This method is used to delete a single record of a module with ID and print the response. + * @param {String} moduleAPIName The API Name of the record's module. + * @param {String} externalFieldValue + */ + static async deleteRecordUsingExternalId(moduleAPIName, externalFieldValue) { + //API Name of the module to delete record + //let moduleAPIName = "module_api_name"; + //let externalFieldValue = "34770615177002"; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + //Possible parameters for Delete Record operation + await paramInstance.add(ZOHOCRMSDK.Record.DeleteRecordParam.WF_TRIGGER, true); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + await headerInstance.add(ZOHOCRMSDK.Record.DeleteRecordHeader.X_EXTERNAL, "Leads.External"); + //Call deleteRecordUsingExternalId method that takes recordId, ModuleAPIName, paramInstance and headerInstance as parameter. + let response = await recordOperations.deleteRecordUsingExternalId(externalFieldValue, moduleAPIName, paramInstance, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await DeleteRecordUsingExternalId.initialize(); +let moduleAPIName = "leads"; +let externalFieldValue = "external"; +await DeleteRecordUsingExternalId.deleteRecordUsingExternalId(moduleAPIName,externalFieldValue); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/deleteRecords.js b/versions/3.0.0/samples/records/deleteRecords.js new file mode 100644 index 0000000..f0e41c2 --- /dev/null +++ b/versions/3.0.0/samples/records/deleteRecords.js @@ -0,0 +1,88 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteRecords{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Delete Records

+ * This method is used to delete records of a module and print the response. + * @param {String} moduleAPIName The API Name of the module to delete records. + * @param {Array} recordIds The array of record IDs to be deleted + */ + static async deleteRecords(moduleAPIName, recordIds) { + //example + //let moduleAPIName = "module_api_name"; + // let recordIds = [3756050n, 3729017n, 3989009n]; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters for Delete Records operation */ + for (let recordId of recordIds) { + await paramInstance.add(ZOHOCRMSDK.Record.DeleteRecordsParam.IDS, recordId); + } + await paramInstance.add(ZOHOCRMSDK.Record.DeleteRecordsParam.WF_TRIGGER, true); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // headerInstance.add(DeleteRecordsHeader.X_EXTERNAL, "Leads.External"); + //Call deleteRecords method that takes paramInstance and moduleAPIName as parameter. + let response = await recordOperations.deleteRecords(moduleAPIName, paramInstance, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await DeleteRecords.initialize(); +let moduleAPIName = "leads"; +let recordIds = ["401100320010","401100320333","401100320245"]; +await DeleteRecords.deleteRecords(moduleAPIName,recordIds); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/getDeletedRecords.js b/versions/3.0.0/samples/records/getDeletedRecords.js new file mode 100644 index 0000000..999512a --- /dev/null +++ b/versions/3.0.0/samples/records/getDeletedRecords.js @@ -0,0 +1,95 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetDeletedRecords { + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Deleted Records

+ * This method is used to get the deleted records of a module and print the response. + * @param {String} moduleAPIName The API Name of the module to get the deleted records. + */ + static async getDeletedRecords(moduleAPIName) { + //example + //let moduleAPIName = "module_api_name"; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters for Get Deleted Records operation */ + //can be all/recycle/permanent + await paramInstance.add(ZOHOCRMSDK.Record.GetDeletedRecordsParam.TYPE, "permanent"); + await paramInstance.add(ZOHOCRMSDK.Record.GetDeletedRecordsParam.PAGE, 1); + await paramInstance.add(ZOHOCRMSDK.Record.GetDeletedRecordsParam.PER_PAGE, 200); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + /* Possible headers for Get Deleted Records operation */ + await headerInstance.add(ZOHOCRMSDK.Record.GetDeletedRecordsHeader.IF_MODIFIED_SINCE, new Date('January 15, 2020 10:35:32')); + //Call getDeletedRecords method that takes paramInstance, headerInstance and moduleAPIName as parameter + let response = await recordOperations.getDeletedRecords(moduleAPIName, paramInstance, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.DeletedRecordsWrapper) { + let deletedRecords = responseObject.getData(); + deletedRecords.forEach(deletedRecord => { + let deletedBy = deletedRecord.getDeletedBy(); + if (deletedBy != null) { + console.log("DeletedRecord Deleted By User-Name: " + deletedBy.getName()); + console.log("DeletedRecord Deleted By User-ID: " + deletedBy.getId()); + } + console.log("DeletedRecord ID: " + deletedRecord.getId()); + console.log("DeletedRecord DisplayName: " + deletedRecord.getDisplayName()); + console.log("DeletedRecord Type: " + deletedRecord.getType()); + let createdBy = deletedRecord.getCreatedBy(); + if (createdBy != null) { + console.log("DeletedRecord Created By User-Name: " + createdBy.getName()); + console.log("DeletedRecord Created By User-ID: " + createdBy.getId()); + } + console.log("DeletedRecord DeletedTime: " + deletedRecord.getDeletedTime()); + }); + let info = responseObject.getInfo(); + if (info != null) { + if (info.getPerPage() != null) { + console.log("Record Info PerPage: " + info.getPerPage().toString()); + } + if (info.getCount() != null) { + console.log("Record Info Count: " + info.getCount().toString()); + } + if (info.getPage() != null) { + console.log("Record Info Page: " + info.getPage().toString()); + } + if (info.getMoreRecords() != null) { + console.log("Record Info MoreRecords: " + info.getMoreRecords().toString()); + } + } + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetDeletedRecords.initialize(); +let moduleAPIName = "leads"; +await GetDeletedRecords.getDeletedRecords(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/getMassUpdateStatus.js b/versions/3.0.0/samples/records/getMassUpdateStatus.js new file mode 100644 index 0000000..5d2fab6 --- /dev/null +++ b/versions/3.0.0/samples/records/getMassUpdateStatus.js @@ -0,0 +1,81 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetMassUpdateStatus{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + * This method is used to get the status of the mass update job scheduled previously and print the response. + * @param {String} moduleAPIName The API Name of the module to obtain status of Mass Update. + * @param {String} jobId The ID of the job obtained from the response of Mass Update Records. + */ + static async getMassUpdateStatus(moduleAPIName, jobId) { + //example + //let moduleAPIName = "module_api_name"; + //let jobId = "77002"; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters for Get MassUpdate Status operation */ + await paramInstance.add(ZOHOCRMSDK.Record.GetMassUpdateStatusParam.JOB_ID, jobId); + //Call getMassUpdateStatus method that takes ParameterMap instance and moduleAPIName as parameter + let response = await recordOperations.getMassUpdateStatus(moduleAPIName, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.MassUpdateResponseWrapper) { + let massUpdateResponses = responseObject.getData(); + massUpdateResponses.forEach(massUpdateResponse => { + if (massUpdateResponse instanceof ZOHOCRMSDK.Record.MassUpdate) { + console.log("MassUpdate Status: " + massUpdateResponse.getStatus().getValue()); + console.log("MassUpdate FailedCount: " + massUpdateResponse.getFailedCount().toString()); + console.log("MassUpdate UpdatedCount: " + massUpdateResponse.getUpdatedCount().toString()); + console.log("MassUpdate NotUpdatedCount: " + massUpdateResponse.getNotUpdatedCount()); + console.log("MassUpdate TotalCount: " + massUpdateResponse.getTotalCount().toString()); + } + else if (massUpdateResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + massUpdateResponse.getStatus().getValue()); + console.log("Code: " + massUpdateResponse.getCode().getValue()); + console.log("Details"); + let details = massUpdateResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + massUpdateResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetMassUpdateStatus.initialize(); +let moduleAPIName = "leads"; +let jobId = "123344321222"; +await GetMassUpdateStatus.getMassUpdateStatus(moduleAPIName,jobId); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/getPhoto.js b/versions/3.0.0/samples/records/getPhoto.js new file mode 100644 index 0000000..d99a345 --- /dev/null +++ b/versions/3.0.0/samples/records/getPhoto.js @@ -0,0 +1,67 @@ +import path from "path"; +import fs from "fs"; +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetPhoto{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + * This method is used to download a photo associated with a module. + * @param {String} moduleAPIName The API Name of the record's module + * @param {BigInt} recordId The ID of the record + * @param {String} destinationFolder The absolute path of the destination folder to store the photo. + */ + static async getPhoto(moduleAPIName, recordId, destinationFolder) { + //example + // let moduleAPIName = "module_api_name"; + // let recordId = 5177002; + // let destinationFolder = "/Users/user-name/Documents"; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + //Call getPhoto method that takes moduleAPIName and recordId as parameters + let response = await recordOperations.getPhoto(recordId, moduleAPIName); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.FileBodyWrapper) { + let streamWrapper = responseObject.getFile(); + //Construct the file name by joining the destinationFolder and the name from StreamWrapper instance + let fileName = path.join(destinationFolder, streamWrapper.getName()); + let readStream = streamWrapper.getStream(); + //Write the stream to the destination file. + fs.writeFileSync(fileName, readStream); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetPhoto.initialize(); +let moduleAPIName ="leads"; +let recordId = 440248082075n; +let destinationFolder = "users/documents/file"; +await GetPhoto.getPhoto(moduleAPIName,recordId,destinationFolder); diff --git a/versions/3.0.0/samples/records/getRecord.js b/versions/3.0.0/samples/records/getRecord.js new file mode 100644 index 0000000..0671935 --- /dev/null +++ b/versions/3.0.0/samples/records/getRecord.js @@ -0,0 +1,307 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +import path from "path"; +import fs from "fs"; + +class GetRecord{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Record

+ * This method is used to get a single record of a module with ID and print the response. + * @param {String} moduleAPIName The API Name of the record's module. + * @param {BigInt} recordId The ID of the record to be obtained. + * @param {String} destinationFolder The absolute path of the destination folder to store the attachment + */ + static async getRecord(moduleAPIName, recordId, destinationFolder) { + //example + //let moduleAPIName = "module_api_name"; + //let recordId = 03276n; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters for Get Record operation*/ + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.APPROVED, "true"); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.CONVERTED, "false"); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.CVID, "34096430087501"); + let fieldsArray = ["id", "Company"]; + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.FIELDS, fieldsArray.toString()); + /* Month is zero-indexed. + 0 . January ..... 11 . December + */ + let startDateTime = new Date(2020, 7, 10, 10, 10, 10); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.STARTDATETIME, startDateTime); + let endDateTime = new Date(2020, 7, 10, 12, 12, 12); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.ENDDATETIME, endDateTime); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.TERRITORY_ID, "34096430505351"); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.INCLUDE_CHILD, "true"); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.UID, "34096430500741"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + /* Possible headers for Get Record operation*/ + await headerInstance.add(ZOHOCRMSDK.Record.GetRecordHeader.IF_MODIFIED_SINCE, new Date("2020-01-01T01:01:01+05:30")); + // headerInstance.add(GetRecordHeader.X_EXTERNAL, "Leads.External"); + //Call getRecord method that takes recordId, moduleAPIName, paramInstance and headerInstance as parameter + let response = await recordOperations.getRecord(recordId, moduleAPIName, paramInstance, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ResponseWrapper) { + let records = responseObject.getData(); + records.forEach(record => { + console.log("Record ID: " + record.getId()); + let createdBy = record.getCreatedBy(); + if (createdBy != null) { + console.log("Record Created By User-ID: " + createdBy.getId()); + console.log("Record Created By User-Name: " + createdBy.getName()); + console.log("Record Created By User-Email: " + createdBy.getEmail()); + } + console.log("Record CreatedTime: " + record.getCreatedTime()); + let modifiedBy = record.getModifiedBy(); + if (modifiedBy != null) { + console.log("Record Modified By User-ID: " + modifiedBy.getId()); + console.log("Record Modified By User-Name: " + modifiedBy.getName()); + console.log("Record Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("Record ModifiedTime: " + record.getModifiedTime()); + let tags = record.getTag(); + if (tags != null) { + tags.forEach(tag => { + console.log("Record Tag Name: " + tag.getName()); + console.log("Record Tag ID: " + tag.getId()); + }); + } + //To get particular field value + console.log("Record Field Value: " + record.getKeyValue("Last_Name"));// FieldApiName + console.log("Record KeyValues: "); + let keyValues = record.getKeyValues(); + let keyArray = Array.from(keyValues.keys()); + keyArray.forEach(keyName => { + let value = keyValues.get(keyName); + if (value != null) { + if (Array.isArray(value)) { + if (value.length > 0) { + if (value[0] instanceof ZOHOCRMSDK.Record.FileDetails) { + let fileDetails = value; + fileDetails.forEach(fileDetail => { + console.log("Record FileDetails FileIds: " + fileDetail.getFileIdS()); + console.log("Record FileDetails FileNameS: " + fileDetail.getFileNameS()); + console.log("Record FileDetails SizeS: " + fileDetail.getSizeS()); + console.log("Record FileDetails Id: " + fileDetail.getId()); + }); + } else if (value[0] instanceof ZOHOCRMSDK.Choice) { + let choiceArray = value; + console.log(keyName); + console.log("Values"); + choiceArray.forEach(eachChoice => { + console.log(eachChoice.getValue()); + }); + } else if (value[0] instanceof ZOHOCRMSDK.Tags.Tag) { + let tags1 = value; + tags1.forEach(tag => { + console.log("Record Tag Name: " + tag.getName()); + console.log("Record Tag ID: " + tag.getId()); + }); + } else if (value[0] instanceof ZOHOCRMSDK.Record.PricingDetails) { + let pricingDetails = value; + pricingDetails.forEach(pricingDetail => { + console.log("Record PricingDetails ToRange: " + pricingDetail.getToRange().toString()); + console.log("Record PricingDetails Discount: " + pricingDetail.getDiscount().toString()); + console.log("Record PricingDetails ID: " + pricingDetail.getId()); + console.log("Record PricingDetails FromRange: " + pricingDetail.getFromRange().toString()); + }); + } else if (value[0] instanceof ZOHOCRMSDK.Record.Participants) { + let participants = value; + participants.forEach(participant => { + console.log("Record Participants Name: " + participant.getName()); + console.log("Record Participants Invited: " + participant.getInvited().toString()); + console.log("Record Participants ID: " + participant.getId()); + console.log("Record Participants Type: " + participant.getType()); + console.log("Record Participants Participant: " + participant.getParticipant()); + console.log("Record Participants Status: " + participant.getStatus()); + }); + } else if (value[0] instanceof ZOHOCRMSDK.Record.Record) { + let recordArray = value; + recordArray.forEach(record1 => { + Array.from(record1.getKeyValues().keys()).forEach(key => { + console.log(key + ": " + JSON.stringify(record1.getKeyValues().get(key), (_, v) => typeof v === 'bigint' ? `${v}n` : v).replace(/"(-?\d+)n"/g, (_, a) => a)); + }); + }); + } else if (value[0] instanceof ZOHOCRMSDK.Record.LineTax) { + let lineTaxes = value; + lineTaxes.forEach(lineTax => { + console.log("Record ProductDetails LineTax Percentage: " + lineTax.getPercentage().toString()); + console.log("Record ProductDetails LineTax Name: " + lineTax.getName()); + console.log("Record ProductDetails LineTax Id: " + lineTax.getId()); + console.log("Record ProductDetails LineTax Value: " + lineTax.getValue().toString()); + }); + } else if (value[0] instanceof ZOHOCRMSDK.Record.Comment) { + let comments = value; + comments.forEach(comment => { + console.log("Record Comment CommentedBy: " + comment.getCommentedBy()); + console.log("Record Comment CommentedTime: " + comment.getCommentedTime().toString()); + console.log("Record Comment CommentContent: " + comment.getCommentContent()); + console.log("Record Comment Id: " + comment.getId()); + }); + } else if (value[0] instanceof ZOHOCRMSDK.Attachments.Attachment) { + let attachments = value; + attachments.forEach(attachment => { + console.log("Record Attachment ID: " + attachment.getId()); + let owner = attachment.getOwner(); + if (owner != null) { + console.log("Record Attachment Owner - Name: " + owner.getName()); + console.log("Record Attachment Owner ID: " + owner.getId()); + console.log("Record Attachment Owner Email: " + owner.getEmail()); + } + console.log("Record Attachment Modified Time: " + attachment.getModifiedTime().toString()); + console.log("Record Attachment File Name: " + attachment.getFileName()); + console.log("Record Attachment Created Time: " + attachment.getCreatedTime()); + console.log("Record Attachment File Size: " + attachment.getSize()); + let parentId = attachment.getParentId(); + if (parentId != null) { + console.log("Record Attachment parent record Name: " + parentId.getKeyValue("name")); + console.log("Record Attachment parent record ID: " + parentId.getId()); + } + console.log("Record Attachment is Editable: " + attachment.getEditable().toString()); + console.log("Record Attachment File ID: " + attachment.getFileId()); + console.log("Record Attachment File Type: " + attachment.getType()); + console.log("Record Attachment seModule: " + attachment.getSeModule()); + let modifiedBy1 = attachment.getModifiedBy(); + if (modifiedBy1 != null) { + console.log("Record Attachment Modified By User-Name: " + modifiedBy1.getName()); + console.log("Record Attachment Modified By User-ID: " + modifiedBy1.getId()); + console.log("Record Attachment Modified By User-Email: " + modifiedBy1.getEmail()); + } + console.log("Record Attachment State: " + attachment.getState()); + let createdBy1 = attachment.getCreatedBy(); + if (createdBy1 != null) { + console.log("Record Attachment Created By User-Name: " + createdBy1.getName()); + console.log("Record Attachment Created By User-ID: " + createdBy1.getId()); + console.log("Record Attachment Created By User-Email: " + createdBy1.getEmail()); + } + console.log("Record Attachment LinkUrl: " + attachment.getLinkUrl()); + }); + } else if (value[0] instanceof ZOHOCRMSDK.Record.ImageUpload) { + let imageUploads = value; + imageUploads.forEach(imageUpload => { + console.log("Record " + keyName + " Description: " + imageUpload.getDescriptionS()); + console.log("Record " + keyName + " File_Name: " + imageUpload.getFileNameS()); + console.log("Record " + keyName + " State: " + imageUpload.getStateS()); + console.log("Record " + keyName + " Size: " + imageUpload.getSizeS()); + console.log("Record " + keyName + " SequenceNumber: " + imageUpload.getSequenceNumberS()); + console.log("Record " + keyName + " Id: " + imageUpload.getId()); + console.log("Record " + keyName + " FileId: " + imageUpload.getFileIdS()); + }); + } else if (value[0] instanceof ZOHOCRMSDK.Record.Reminder) { + let reminders = value; + reminders.forEach(reminder => { + console.log("Reminder Period: " + reminder.getPeriod()); + console.log("Reminder Unit: " + reminder.getUnit()); + }); + } else { + console.log(keyName + ": " + value); + } + } + } else if (value instanceof ZOHOCRMSDK.Users.Users) { + console.log("Record " + keyName + " User-ID: " + value.getId()); + console.log("Record " + keyName + " User-Name: " + value.getName()); + console.log("Record " + keyName + " User-Email: " + value.getEmail()); + } else if (value instanceof ZOHOCRMSDK.Layouts.Layouts) { + console.log(keyName + " ID: " + value.getId()); + console.log(keyName + " Name: " + value.getName()); + } else if (value instanceof ZOHOCRMSDK.Record.Record) { + console.log(keyName + " Record ID: " + value.getId()); + console.log(keyName + " Record Name: " + value.getKeyValue("name")); + } else if (value instanceof ZOHOCRMSDK.Choice) { + console.log(keyName + ": " + value.getValue()); + } else if (value instanceof ZOHOCRMSDK.Record.RemindAt) { + console.log(keyName + ": " + value.getAlarm()); + } else if (value instanceof ZOHOCRMSDK.Record.RecurringActivity) { + console.log(keyName); + console.log("RRULE: " + value.getRrule()); + } else if (value instanceof ZOHOCRMSDK.Record.Consent) { + console.log("Record Consent ID: " + value.getId()); + let owner = value.getOwner(); + if (owner != null) { + console.log("Record Consent Owner Name: " + owner.getName()); + console.log("Record Consent Owner ID: " + owner.getId()); + console.log("Record Consent Owner Email: " + owner.getEmail()); + } + let consentCreatedBy = value.getCreatedBy(); + if (consentCreatedBy != null) { + console.log("Record Consent CreatedBy Name: " + consentCreatedBy.getName()); + console.log("Record Consent CreatedBy ID: " + consentCreatedBy.getId()); + console.log("Record Consent CreatedBy Email: " + consentCreatedBy.getEmail()); + } + let consentModifiedBy = value.getModifiedBy(); + if (consentModifiedBy != null) { + console.log("Record Consent ModifiedBy Name: " + consentModifiedBy.getName()); + console.log("Record Consent ModifiedBy ID: " + consentModifiedBy.getId()); + console.log("Record Consent ModifiedBy Email: " + consentModifiedBy.getEmail()); + } + console.log("Record Consent CreatedTime: " + value.getCreatedTime()); + console.log("Record Consent ModifiedTime: " + value.getModifiedTime()); + console.log("Record Consent ContactThroughEmail: " + value.getContactThroughEmail()); + console.log("Record Consent ContactThroughSocial: " + value.getContactThroughSocial()); + console.log("Record Consent ContactThroughSurvey: " + value.getContactThroughSurvey()); + console.log("Record Consent ContactThroughPhone: " + value.getContactThroughPhone()); + console.log("Record Consent MailSentTime: " + value.getMailSentTime().toString()); + console.log("Record Consent ConsentDate: " + value.getConsentDate().toString()); + console.log("Record Consent ConsentRemarks: " + value.getConsentRemarks()); + console.log("Record Consent ConsentThrough: " + value.getConsentThrough()); + console.log("Record Consent DataProcessingBasis: " + value.getDataProcessingBasis()); + //To get custom values + console.log("Record Consent Lawful Reason: " + value.getKeyValue("Lawful_Reason")); + } else if (value instanceof Map) { + console.log(keyName); + Array.from(value.keys()).forEach(key => { + console.log(key + ": " + value.get(key)); + }); + } else { + console.log(keyName + ": " + value); + } + } + }); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.FileBodyWrapper) { + let streamWrapper = responseObject.getFile(); + //Construct the file name by joining the destinationFolder and the name from StreamWrapper instance + let fileName = path.join(destinationFolder, streamWrapper.getName()); + let readStream = streamWrapper.getStream(); + //Write the stream to the destination file. + fs.writeFileSync(fileName, readStream); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetRecord.initialize(); +let moduleAPIName ="leads"; +let recordId = 440248074074n; +let destinationFolder = "users/documents/file"; +await GetRecord.getRecord(moduleAPIName,recordId,destinationFolder); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/getRecordCount.js b/versions/3.0.0/samples/records/getRecordCount.js new file mode 100644 index 0000000..9bcb601 --- /dev/null +++ b/versions/3.0.0/samples/records/getRecordCount.js @@ -0,0 +1,50 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetRecordCount{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getRecordCount() { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let moduleAPIName = "Leads"; + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Record.RecordCountParam.PHONE, "(990) -"); + let response = await recordOperations.recordCount(moduleAPIName, paramInstance); + if(response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let countHandler = response.getObject(); + if(countHandler instanceof ZOHOCRMSDK.Record.CountWrapper) { + let countWrapper = countHandler; + console.log("Record Count: " + countWrapper.getCount()); + } + else if(countHandler instanceof ZOHOCRMSDK.Record.APIException) + { + let exception = countHandler; + console.log("Status: " + exception.getStatus().getValue()); + console.log("Code: " + exception.getCode().getValue()); + console.log("Details: " ); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + exception.getMessage().getValue()); + } + } + } +} +await GetRecordCount.initialize(); +await GetRecordCount.getRecordCount(); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/getRecordUsingExternalId.js b/versions/3.0.0/samples/records/getRecordUsingExternalId.js new file mode 100644 index 0000000..c6b217d --- /dev/null +++ b/versions/3.0.0/samples/records/getRecordUsingExternalId.js @@ -0,0 +1,326 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +import path from "path"; +import fs from "fs"; +class GetRecordUsingExternalId { + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Record Using External Id

+ * This method is used to get a single record of a module with ID and print the response. + * @param {String} moduleAPIName The API Name of the record's module. + * @param {String} externalFieldValue + * @param {String} destinationFolder The absolute path of the destination folder to store the attachment + */ + static async getRecordUsingExternalId(moduleAPIName, externalFieldValue, destinationFolder) { + //example + //let moduleAPIName = "module_api_name"; + //let externalFieldValue = "34770616603276"; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters for Get Record operation*/ + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.APPROVED, "true"); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.CONVERTED, "false"); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.CVID, "34096430087501"); + let fieldsArray = ["id", "Company"]; + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.FIELDS, fieldsArray.toString()); + /* Month is zero-indexed. + 0 . January ..... 11 . December + */ + let startDateTime = new Date(2020, 7, 10, 10, 10, 10); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.STARTDATETIME, startDateTime); + let endDateTime = new Date(2020, 7, 10, 12, 12, 12); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.ENDDATETIME, endDateTime); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.TERRITORY_ID, "34096430505351"); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.INCLUDE_CHILD, "true"); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordParam.UID, "34096430500741"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + /* Possible headers for Get Record operation*/ + await headerInstance.add(ZOHOCRMSDK.Record.GetRecordHeader.IF_MODIFIED_SINCE, new Date("2020-01-01T01:01:01+05:30")); + await headerInstance.add(ZOHOCRMSDK.Record.GetRecordHeader.X_EXTERNAL, "Leads.External"); + //Call getRecordUsingExternalId method that takes externalFieldValue, moduleAPIName, paramInstance and headerInstance as parameter + let response = await recordOperations.getRecordUsingExternalId(externalFieldValue, moduleAPIName, paramInstance, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ResponseWrapper) { + let records = responseObject.getData(); + records.forEach(record => { + console.log("Record ID: " + record.getId()); + let createdBy = record.getCreatedBy(); + if (createdBy != null) { + console.log("Record Created By User-ID: " + createdBy.getId()); + console.log("Record Created By User-Name: " + createdBy.getName()); + console.log("Record Created By User-Email: " + createdBy.getEmail()); + } + console.log("Record CreatedTime: " + record.getCreatedTime()); + let modifiedBy = record.getModifiedBy(); + if (modifiedBy != null) { + console.log("Record Modified By User-ID: " + modifiedBy.getId()); + console.log("Record Modified By User-Name: " + modifiedBy.getName()); + console.log("Record Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("Record ModifiedTime: " + record.getModifiedTime()); + let tags = record.getTag(); + if (tags != null) { + tags.forEach(tag => { + console.log("Record Tag Name: " + tag.getName()); + console.log("Record Tag ID: " + tag.getId()); + }); + } + //To get particular field value + console.log("Record Field Value: " + record.getKeyValue("Last_Name"));// FieldApiName + console.log("Record KeyValues: "); + let keyValues = record.getKeyValues(); + let keyArray = Array.from(keyValues.keys()); + keyArray.forEach(keyName => { + let value = keyValues.get(keyName); + if (value != null) { + if (Array.isArray(value)) { + if (value.length > 0) { + if (value[0] instanceof ZOHOCRMSDK.Record.FileDetails) { + let fileDetails = value; + fileDetails.forEach(fileDetail => { + console.log("Record FileDetails FileIds: " + fileDetail.getFileIdS()); + console.log("Record FileDetails FileNameS: " + fileDetail.getFileNameS()); + console.log("Record FileDetails SizeS: " + fileDetail.getSizeS()); + console.log("Record FileDetails Id: " + fileDetail.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Choice) { + let choiceArray = value; + console.log(keyName); + console.log("Values"); + choiceArray.forEach(eachChoice => { + console.log(eachChoice.getValue()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Tags.Tag) { + let tags1 = value; + tags1.forEach(tag => { + console.log("Record Tag Name: " + tag.getName()); + console.log("Record Tag ID: " + tag.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.PricingDetails) { + let pricingDetails = value; + pricingDetails.forEach(pricingDetail => { + console.log("Record PricingDetails ToRange: " + pricingDetail.getToRange().toString()); + console.log("Record PricingDetails Discount: " + pricingDetail.getDiscount().toString()); + console.log("Record PricingDetails ID: " + pricingDetail.getId()); + console.log("Record PricingDetails FromRange: " + pricingDetail.getFromRange().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Participants) { + let participants = value; + participants.forEach(participant => { + console.log("Record Participants Name: " + participant.getName()); + console.log("Record Participants Invited: " + participant.getInvited().toString()); + console.log("Record Participants ID: " + participant.getId()); + console.log("Record Participants Type: " + participant.getType()); + console.log("Record Participants Participant: " + participant.getParticipant()); + console.log("Record Participants Status: " + participant.getStatus()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Record) { + let recordArray = value; + recordArray.forEach(record1 => { + Array.from(record1.getKeyValues().keys()).forEach(key => { + console.log(key + ": " + JSON.stringify(record1.getKeyValues().get(key), (_, v) => typeof v === 'bigint' ? `${v}n` : v).replace(/"(-?\d+)n"/g, (_, a) => a)); + }); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.LineTax) { + let lineTaxes = value; + lineTaxes.forEach(lineTax => { + console.log("Record ProductDetails LineTax Percentage: " + lineTax.getPercentage().toString()); + console.log("Record ProductDetails LineTax Name: " + lineTax.getName()); + console.log("Record ProductDetails LineTax Id: " + lineTax.getId()); + console.log("Record ProductDetails LineTax Value: " + lineTax.getValue().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Comment) { + let comments = value; + comments.forEach(comment => { + console.log("Record Comment CommentedBy: " + comment.getCommentedBy()); + console.log("Record Comment CommentedTime: " + comment.getCommentedTime().toString()); + console.log("Record Comment CommentContent: " + comment.getCommentContent()); + console.log("Record Comment Id: " + comment.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Attachments.Attachment) { + let attachments = value; + attachments.forEach(attachment => { + console.log("Record Attachment ID: " + attachment.getId()); + let owner = attachment.getOwner(); + if (owner != null) { + console.log("Record Attachment Owner - Name: " + owner.getName()); + console.log("Record Attachment Owner ID: " + owner.getId()); + console.log("Record Attachment Owner Email: " + owner.getEmail()); + } + console.log("Record Attachment Modified Time: " + attachment.getModifiedTime().toString()); + console.log("Record Attachment File Name: " + attachment.getFileName()); + console.log("Record Attachment Created Time: " + attachment.getCreatedTime()); + console.log("Record Attachment File Size: " + attachment.getSize()); + let parentId = attachment.getParentId(); + if (parentId != null) { + console.log("Record Attachment parent record Name: " + parentId.getKeyValue("name")); + console.log("Record Attachment parent record ID: " + parentId.getId()); + } + console.log("Record Attachment is Editable: " + attachment.getEditable().toString()); + console.log("Record Attachment File ID: " + attachment.getFileId()); + console.log("Record Attachment File Type: " + attachment.getType()); + console.log("Record Attachment seModule: " + attachment.getSeModule()); + let modifiedBy1 = attachment.getModifiedBy(); + if (modifiedBy1 != null) { + console.log("Record Attachment Modified By User-Name: " + modifiedBy1.getName()); + console.log("Record Attachment Modified By User-ID: " + modifiedBy1.getId()); + console.log("Record Attachment Modified By User-Email: " + modifiedBy1.getEmail()); + } + console.log("Record Attachment State: " + attachment.getState()); + let createdBy1 = attachment.getCreatedBy(); + if (createdBy1 != null) { + console.log("Record Attachment Created By User-Name: " + createdBy1.getName()); + console.log("Record Attachment Created By User-ID: " + createdBy1.getId()); + console.log("Record Attachment Created By User-Email: " + createdBy1.getEmail()); + } + console.log("Record Attachment LinkUrl: " + attachment.getLinkUrl()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.ImageUpload) { + let imageUploads = value; + imageUploads.forEach(imageUpload => { + console.log("Record " + keyName + " Description: " + imageUpload.getDescriptionS()); + console.log("Record " + keyName + " File_Name: " + imageUpload.getFileNameS()); + console.log("Record " + keyName + " State: " + imageUpload.getStateS()); + console.log("Record " + keyName + " Size: " + imageUpload.getSizeS()); + console.log("Record " + keyName + " SequenceNumber: " + imageUpload.getSequenceNumberS()); + console.log("Record " + keyName + " Id: " + imageUpload.getId()); + console.log("Record " + keyName + " FileId: " + imageUpload.getFileIdS()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Reminder) { + let reminders = value; + reminders.forEach(reminder => { + console.log("Reminder Period: " + reminder.getPeriod()); + console.log("Reminder Unit: " + reminder.getUnit()); + }); + } + else { + console.log(keyName + ": " + value); + } + } + } + else if (value instanceof ZOHOCRMSDK.Users.Users) { + console.log("Record " + keyName + " User-ID: " + value.getId()); + console.log("Record " + keyName + " User-Name: " + value.getName()); + console.log("Record " + keyName + " User-Email: " + value.getEmail()); + } + else if (value instanceof ZOHOCRMSDK.Layouts.Layouts) { + console.log(keyName + " ID: " + value.getId()); + console.log(keyName + " Name: " + value.getName()); + } + else if (value instanceof ZOHOCRMSDK.Record.Record) { + console.log(keyName + " Record ID: " + value.getId()); + console.log(keyName + " Record Name: " + value.getKeyValue("name")); + } + else if (value instanceof ZOHOCRMSDK.Choice) { + console.log(keyName + ": " + value.getValue()); + } + else if (value instanceof ZOHOCRMSDK.Record.RemindAt) { + console.log(keyName + ": " + value.getAlarm()); + } + else if (value instanceof ZOHOCRMSDK.Record.RecurringActivity) { + console.log(keyName); + console.log("RRULE: " + value.getRrule()); + } + else if (value instanceof ZOHOCRMSDK.Record.Consent) { + console.log("Record Consent ID: " + value.getId()); + let owner = value.getOwner(); + if (owner != null) { + console.log("Record Consent Owner Name: " + owner.getName()); + console.log("Record Consent Owner ID: " + owner.getId()); + console.log("Record Consent Owner Email: " + owner.getEmail()); + } + let consentCreatedBy = value.getCreatedBy(); + if (consentCreatedBy != null) { + console.log("Record Consent CreatedBy Name: " + consentCreatedBy.getName()); + console.log("Record Consent CreatedBy ID: " + consentCreatedBy.getId()); + console.log("Record Consent CreatedBy Email: " + consentCreatedBy.getEmail()); + } + let consentModifiedBy = value.getModifiedBy(); + if (consentModifiedBy != null) { + console.log("Record Consent ModifiedBy Name: " + consentModifiedBy.getName()); + console.log("Record Consent ModifiedBy ID: " + consentModifiedBy.getId()); + console.log("Record Consent ModifiedBy Email: " + consentModifiedBy.getEmail()); + } + console.log("Record Consent CreatedTime: " + value.getCreatedTime()); + console.log("Record Consent ModifiedTime: " + value.getModifiedTime()); + console.log("Record Consent ContactThroughEmail: " + value.getContactThroughEmail()); + console.log("Record Consent ContactThroughSocial: " + value.getContactThroughSocial()); + console.log("Record Consent ContactThroughSurvey: " + value.getContactThroughSurvey()); + console.log("Record Consent ContactThroughPhone: " + value.getContactThroughPhone()); + console.log("Record Consent MailSentTime: " + value.getMailSentTime().toString()); + console.log("Record Consent ConsentDate: " + value.getConsentDate().toString()); + console.log("Record Consent ConsentRemarks: " + value.getConsentRemarks()); + console.log("Record Consent ConsentThrough: " + value.getConsentThrough()); + console.log("Record Consent DataProcessingBasis: " + value.getDataProcessingBasis()); + //To get custom values + console.log("Record Consent Lawful Reason: " + value.getKeyValue("Lawful_Reason")); + } + else if (value instanceof Map) { + console.log(keyName); + Array.from(value.keys()).forEach(key => { + console.log(key + ": " + value.get(key)); + }); + } + else { + console.log(keyName + ": " + value); + } + } + }); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.FileBodyWrapper) { + let streamWrapper = responseObject.getFile(); + //Construct the file name by joining the destinationFolder and the name from StreamWrapper instance + let fileName = path.join(destinationFolder, streamWrapper.getName()); + let readStream = streamWrapper.getStream(); + //Write the stream to the destination file. + fs.writeFileSync(fileName, readStream); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetRecordUsingExternalId.initialize(); +let moduleAPIName = "leads"; +let externalFieldValue = "external"; +let destinationFolder = "users/documents/file"; +await GetRecordUsingExternalId.getRecordUsingExternalId(moduleAPIName,externalFieldValue,destinationFolder); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/getRecords.js b/versions/3.0.0/samples/records/getRecords.js new file mode 100644 index 0000000..2edd856 --- /dev/null +++ b/versions/3.0.0/samples/records/getRecords.js @@ -0,0 +1,323 @@ +import path from "path"; +import fs from "fs"; +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetRecords{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Records

+ * This method is used to get all the records of a module and print the response. + * @param {String} moduleAPIName The API Name of the module to fetch records + */ + static async getRecords(moduleAPIName) { + //example + //let moduleAPIName = "module_api_name"; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters for Get Records operation*/ + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordsParam.APPROVED, "both"); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordsParam.CONVERTED, "both"); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordsParam.CVID, "34770610087501"); + let ids = ["External121123456", "34770614352001n"]; + for (let id of ids) { + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordsParam.IDS, id); + } + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordsParam.UID, "34770615181008"); + let fieldNames = ["Company", "Email"]; + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordsParam.FIELDS, fieldNames.toString()); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordsParam.SORT_BY, "Email"); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordsParam.SORT_ORDER, "desc"); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordsParam.PAGE, 1); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordsParam.PER_PAGE, 1); + let startDateTime = new Date(2020, 1, 10, 10, 10, 10); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordsParam.STARTDATETIME, startDateTime); + let endDateTime = new Date(2020, 7, 10, 12, 12, 12); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordsParam.ENDDATETIME, endDateTime); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordsParam.TERRITORY_ID, "34096430505351"); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordsParam.INCLUDE_CHILD, "true"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + /* Possible headers for Get Record operation*/ + await headerInstance.add(ZOHOCRMSDK.Record.GetRecordsHeader.IF_MODIFIED_SINCE, new Date("2020-01-01T00:00:00+05:30")); + // headerInstance.add(GetRecordsHeader.X_EXTERNAL, "Leads.External"); + //Call getRecords method that takes moduleAPIName, paramInstance and headerInstance as parameters + let response = await recordOperations.getRecords(moduleAPIName, paramInstance, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ResponseWrapper) { + let records = responseObject.getData(); + records.forEach(record => { + console.log("Record ID: " + record.getId()); + let createdBy = record.getCreatedBy(); + if (createdBy != null) { + console.log("Record Created By User-ID: " + createdBy.getId()); + console.log("Record Created By User-Name: " + createdBy.getName()); + console.log("Record Created By User-Email: " + createdBy.getEmail()); + } + console.log("Record CreatedTime: " + record.getCreatedTime()); + let modifiedBy = record.getModifiedBy(); + if (modifiedBy != null) { + console.log("Record Modified By User-ID: " + modifiedBy.getId()); + console.log("Record Modified By User-Name: " + modifiedBy.getName()); + console.log("Record Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("Record ModifiedTime: " + record.getModifiedTime()); + let tags = record.getTag(); + if (tags != null) { + tags.forEach(tag => { + console.log("Record Tag Name: " + tag.getName()); + console.log("Record Tag ID: " + tag.getId()); + }); + } + //To get particular field value + console.log("Record Field Value: " + record.getKeyValue("Last_Name"));// FieldApiName + console.log("Record KeyValues: "); + let keyValues = record.getKeyValues(); + let keyArray = Array.from(keyValues.keys()); + keyArray.forEach(keyName => { + let value = keyValues.get(keyName); + if (value != null) { + if (Array.isArray(value)) { + if (value.length > 0) { + if (value[0] instanceof ZOHOCRMSDK.Record.FileDetails) { + let fileDetails = value; + fileDetails.forEach(fileDetail => { + console.log("Record FileDetails FileIds: " + fileDetail.getFileIdS()); + console.log("Record FileDetails FileNameS: " + fileDetail.getFileNameS()); + console.log("Record FileDetails SizeS: " + fileDetail.getSizeS()); + console.log("Record FileDetails Id: " + fileDetail.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Choice) { + let choiceArray = value; + console.log(keyName); + console.log("Values"); + choiceArray.forEach(eachChoice => { + console.log(eachChoice.getValue()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Tags.Tag) { + let tags1 = value; + tags1.forEach(tag => { + console.log("Record Tag Name: " + tag.getName()); + console.log("Record Tag ID: " + tag.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.PricingDetails) { + let pricingDetails = value; + pricingDetails.forEach(pricingDetail => { + console.log("Record PricingDetails ToRange: " + pricingDetail.getToRange().toString()); + console.log("Record PricingDetails Discount: " + pricingDetail.getDiscount().toString()); + console.log("Record PricingDetails ID: " + pricingDetail.getId()); + console.log("Record PricingDetails FromRange: " + pricingDetail.getFromRange().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Participants) { + let participants = value; + participants.forEach(participant => { + console.log("Record Participants Name: " + participant.getName()); + console.log("Record Participants Invited: " + participant.getInvited().toString()); + console.log("Record Participants ID: " + participant.getId()); + console.log("Record Participants Type: " + participant.getType()); + console.log("Record Participants Participant: " + participant.getParticipant()); + console.log("Record Participants Status: " + participant.getStatus()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Record) { + let recordArray = value; + recordArray.forEach(record1 => { + Array.from(record1.getKeyValues().keys()).forEach(key => { + console.log(key + ": " + record1.getKeyValues().get(key)); + }); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.LineTax) { + let lineTaxes = value; + lineTaxes.forEach(lineTax => { + console.log("Record ProductDetails LineTax Percentage: " + lineTax.getPercentage().toString()); + console.log("Record ProductDetails LineTax Name: " + lineTax.getName()); + console.log("Record ProductDetails LineTax Id: " + lineTax.getId()); + console.log("Record ProductDetails LineTax Value: " + lineTax.getValue().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Comment) { + let comments = value; + comments.forEach(comment => { + console.log("Record Comment CommentedBy: " + comment.getCommentedBy()); + console.log("Record Comment CommentedTime: " + comment.getCommentedTime().toString()); + console.log("Record Comment CommentContent: " + comment.getCommentContent()); + console.log("Record Comment Id: " + comment.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Attachments.Attachment) { + let attachments = value; + attachments.forEach(attachment => { + console.log("Record Attachment ID: " + attachment.getId()); + let owner = attachment.getOwner(); + if (owner != null) { + console.log("Record Attachment Owner - Name: " + owner.getName()); + console.log("Record Attachment Owner ID: " + owner.getId()); + console.log("Record Attachment Owner Email: " + owner.getEmail()); + } + console.log("Record Attachment Modified Time: " + attachment.getModifiedTime().toString()); + console.log("Record Attachment File Name: " + attachment.getFileName()); + console.log("Record Attachment Created Time: " + attachment.getCreatedTime()); + console.log("Record Attachment File Size: " + attachment.getSize()); + let parentId = attachment.getParentId(); + if (parentId != null) { + console.log("Record Attachment parent record Name: " + parentId.getKeyValue("name")); + console.log("Record Attachment parent record ID: " + parentId.getId()); + } + console.log("Record Attachment is Editable: " + attachment.getEditable().toString()); + console.log("Record Attachment File ID: " + attachment.getFileId()); + console.log("Record Attachment File Type: " + attachment.getType()); + console.log("Record Attachment seModule: " + attachment.getSeModule()); + let modifiedBy1 = attachment.getModifiedBy(); + if (modifiedBy1 != null) { + console.log("Record Attachment Modified By User-Name: " + modifiedBy1.getName()); + console.log("Record Attachment Modified By User-ID: " + modifiedBy1.getId()); + console.log("Record Attachment Modified By User-Email: " + modifiedBy1.getEmail()); + } + console.log("Record Attachment State: " + attachment.getState()); + let createdBy1 = attachment.getCreatedBy(); + if (createdBy1 != null) { + console.log("Record Attachment Created By User-Name: " + createdBy1.getName()); + console.log("Record Attachment Created By User-ID: " + createdBy1.getId()); + console.log("Record Attachment Created By User-Email: " + createdBy1.getEmail()); + } + console.log("Record Attachment LinkUrl: " + attachment.getLinkUrl()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.ImageUpload) { + let imageUploads = value; + imageUploads.forEach(imageUpload => { + console.log("Record " + keyName + " Description: " + imageUpload.getDescriptionS()); + console.log("Record " + keyName + " File_Name: " + imageUpload.getFileNameS()); + console.log("Record " + keyName + " State: " + imageUpload.getStateS()); + console.log("Record " + keyName + " Size: " + imageUpload.getSizeS()); + console.log("Record " + keyName + " SequenceNumber: " + imageUpload.getSequenceNumberS()); + console.log("Record " + keyName + " Id: " + imageUpload.getId()); + console.log("Record " + keyName + " FileId: " + imageUpload.getFileIdS()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Reminder) { + let reminders = value; + reminders.forEach(reminder => { + console.log("Reminder Period: " + reminder.getPeriod()); + console.log("Reminder Unit: " + reminder.getUnit()); + }); + } + else { + console.log(keyName + ": " + value); + } + } + } + else if (value instanceof ZOHOCRMSDK.Users.Users) { + console.log("Record " + keyName + " User-ID: " + value.getId()); + console.log("Record " + keyName + " User-Name: " + value.getName()); + console.log("Record " + keyName + " User-Email: " + value.getEmail()); + } + else if (value instanceof ZOHOCRMSDK.Layouts.Layouts) { + console.log(keyName + " ID: " + value.getId()); + console.log(keyName + " Name: " + value.getName()); + } + else if (value instanceof ZOHOCRMSDK.Record.Record) { + console.log(keyName + " Record ID: " + value.getId()); + console.log(keyName + " Record Name: " + value.getKeyValue("name")); + } + else if (value instanceof ZOHOCRMSDK.Choice) { + console.log(keyName + ": " + value.getValue()); + } + else if (value instanceof ZOHOCRMSDK.Record.RemindAt) { + console.log(keyName + ": " + value.getAlarm()); + } + else if (value instanceof ZOHOCRMSDK.Record.RecurringActivity) { + console.log(keyName); + console.log("RRULE: " + value.getRrule()); + } + else if (value instanceof ZOHOCRMSDK.Record.Consent) { + console.log("Record Consent ID: " + value.getId()); + let owner = value.getOwner(); + if (owner != null) { + console.log("Record Consent Owner Name: " + owner.getName()); + console.log("Record Consent Owner ID: " + owner.getId()); + console.log("Record Consent Owner Email: " + owner.getEmail()); + } + let consentCreatedBy = value.getCreatedBy(); + if (consentCreatedBy != null) { + console.log("Record Consent CreatedBy Name: " + consentCreatedBy.getName()); + console.log("Record Consent CreatedBy ID: " + consentCreatedBy.getId()); + console.log("Record Consent CreatedBy Email: " + consentCreatedBy.getEmail()); + } + let consentModifiedBy = value.getModifiedBy(); + if (consentModifiedBy != null) { + console.log("Record Consent ModifiedBy Name: " + consentModifiedBy.getName()); + console.log("Record Consent ModifiedBy ID: " + consentModifiedBy.getId()); + console.log("Record Consent ModifiedBy Email: " + consentModifiedBy.getEmail()); + } + console.log("Record Consent CreatedTime: " + value.getCreatedTime()); + console.log("Record Consent ModifiedTime: " + value.getModifiedTime()); + console.log("Record Consent ContactThroughEmail: " + value.getContactThroughEmail()); + console.log("Record Consent ContactThroughSocial: " + value.getContactThroughSocial()); + console.log("Record Consent ContactThroughSurvey: " + value.getContactThroughSurvey()); + console.log("Record Consent ContactThroughPhone: " + value.getContactThroughPhone()); + console.log("Record Consent MailSentTime: " + value.getMailSentTime().toString()); + console.log("Record Consent ConsentDate: " + value.getConsentDate().toString()); + console.log("Record Consent ConsentRemarks: " + value.getConsentRemarks()); + console.log("Record Consent ConsentThrough: " + value.getConsentThrough()); + console.log("Record Consent DataProcessingBasis: " + value.getDataProcessingBasis()); + //To get custom values + console.log("Record Consent Lawful Reason: " + value.getKeyValue("Lawful_Reason")); + } + else if (value instanceof Map) { + console.log(keyName); + Array.from(value.keys()).forEach(key => { + console.log(key + ": " + value.get(key)); + }); + } + else { + console.log(keyName + ": " + value); + } + } + }); + }); + let info = responseObject.getInfo(); + console.log("Record Info PerPage : " + info.getPerPage()); + console.log("Record Info Count : " + info.getCount()); + console.log("Record Info Page : " + info.getPage()); + console.log("Record Info MoreRecords : " + info.getMoreRecords()); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetRecords.initialize(); +let moduleAPIName = "leads"; +await GetRecords.getRecords(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/massUpdateRecords.js b/versions/3.0.0/samples/records/massUpdateRecords.js new file mode 100644 index 0000000..f90f6d5 --- /dev/null +++ b/versions/3.0.0/samples/records/massUpdateRecords.js @@ -0,0 +1,91 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class MassUpdateRecords{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + * This method is used to update the values of specific fields for multiple records and print the response. + * @param {String} moduleAPIName The API Name of the module to mass update records. + */ + static async massUpdateRecords(moduleAPIName) { + //example + //let moduleAPIName = "module_api_name"; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.MassUpdateBodyWrapper(); + //Array to hold Record instances + let recordsArray = []; + let record = new ZOHOCRMSDK.Record.Record(); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.CITY, "Chennai"); + //Add the record instance to array + recordsArray.push(record); + request.setData(recordsArray); + // request.setCvid("34096430087501"); + let ids = ["44024800074","440248082075"]; + request.setIds(ids); + request.setOverWrite(true); + // let territory = new ZOHOCRMSDK.Record.Territory(); + // territory.setId(34096430505351n); + // request.setTerritory(territory); + //Call massUpdateRecords method that takes MassUpdateBodyWrapper instance, ModuleAPIName as parameter. + let response = await recordOperations.massUpdateRecords(moduleAPIName, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.MassUpdateActionWrapper) { + let massUpdateActionResponses = responseObject.getData(); + massUpdateActionResponses.forEach(massUpdateActionResponse => { + if (massUpdateActionResponse instanceof ZOHOCRMSDK.Record.MassUpdateSuccessResponse) { + console.log("Status: " + massUpdateActionResponse.getStatus().getValue()); + console.log("Code: " + massUpdateActionResponse.getCode().getValue()); + console.log("Details"); + let details = massUpdateActionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + massUpdateActionResponse.getMessage().getValue()); + } + else if (massUpdateActionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + massUpdateActionResponse.getStatus().getValue()); + console.log("Code: " + massUpdateActionResponse.getCode().getValue()); + console.log("Details"); + let details = massUpdateActionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + massUpdateActionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await MassUpdateRecords.initialize(); +let moduleAPIName = "leads"; +await MassUpdateRecords.massUpdateRecords(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/removeTerritoriesFromMultipleRecords.js b/versions/3.0.0/samples/records/removeTerritoriesFromMultipleRecords.js new file mode 100644 index 0000000..fad6ee9 --- /dev/null +++ b/versions/3.0.0/samples/records/removeTerritoriesFromMultipleRecords.js @@ -0,0 +1,89 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class RemoveTerritoriesFromMultipleRecords{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async removeTerritoriesFromMultipleRecords(moduleAPIName) { + //example + //let moduleAPIName = "Leads"; + //let recordId = 34770615177002L; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + //List of Record instances + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(347706112107002n); + /* + * Call addKeyValue method that takes two arguments + * 1 . A string that is the Field's API Name + * 2 . Value + */ + let territory = new ZOHOCRMSDK.Record.Territory(); + territory.setId(34770613051397n); + record1.addKeyValue("Territories", [territory]); + //Add Record instance to the list + records.push(record1); + request.setData(records); + //Call removeTerritoriesFromMultipleRecords method that takes moduleAPIName and BodyWrapper instance as parameter + let response = await recordOperations.removeTerritoriesFromMultipleRecords(moduleAPIName, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await RemoveTerritoriesFromMultipleRecords.initialize(); +let moduleAPIName = "leads"; +await RemoveTerritoriesFromMultipleRecords.removeTerritoriesFromMultipleRecords(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/removeTerritoriesFromRecord.js b/versions/3.0.0/samples/records/removeTerritoriesFromRecord.js new file mode 100644 index 0000000..8d6d4dd --- /dev/null +++ b/versions/3.0.0/samples/records/removeTerritoriesFromRecord.js @@ -0,0 +1,89 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class RemoveTerritoriesFromRecord{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async removeTerritoriesFromRecord(moduleAPIName, id) { + //example + //let moduleAPIName = "Leads"; + //let recordId = 34770615177002L; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + //List of Record instances + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + /* + * Call addKeyValue method that takes two arguments + * 1 . A string that is the Field's API Name + * 2 . Value + */ + let territory = new ZOHOCRMSDK.Record.Territory(); + territory.setId(34770613051397n); + record1.addKeyValue("Territories", [territory]); + //Add Record instance to the list + records.push(record1); + request.setData(records); + //Call removeTerritoriesFromRecord method that takes moduleAPIName, recordId and BodyWrapper instance as parameter + let response = await recordOperations.removeTerritoriesFromRecord(moduleAPIName, id, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await RemoveTerritoriesFromRecord.initialize(); +let moduleAPIName = "leads"; +let recordId = 34770615177002n; +await RemoveTerritoriesFromRecord.removeTerritoriesFromRecord(moduleAPIName,recordId); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/searchRecords.js b/versions/3.0.0/samples/records/searchRecords.js new file mode 100644 index 0000000..0bf4686 --- /dev/null +++ b/versions/3.0.0/samples/records/searchRecords.js @@ -0,0 +1,294 @@ +import path from "path"; +import fs from "fs"; +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class SearchRecords{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Search Records

+ * This method is used to search records of a module and print the response. + * @param {String} moduleAPIName The API Name of the module to search records. + */ + static async searchRecords(moduleAPIName) { + //example + //let moduleAPIName = "module_api_name"; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters for Search Records operation */ + await paramInstance.add(ZOHOCRMSDK.Record.SearchRecordsParam.EMAIL, "user@zoho.com"); + await paramInstance.add(ZOHOCRMSDK.Record.SearchRecordsParam.PHONE, "234567890"); + await paramInstance.add(ZOHOCRMSDK.Record.SearchRecordsParam.WORD, "First Name Last Name"); + await paramInstance.add(ZOHOCRMSDK.Record.SearchRecordsParam.CONVERTED, "both"); + await paramInstance.add(ZOHOCRMSDK.Record.SearchRecordsParam.APPROVED, "both"); + await paramInstance.add(ZOHOCRMSDK.Record.SearchRecordsParam.PAGE, 1); + await paramInstance.add(ZOHOCRMSDK.Record.SearchRecordsParam.PER_PAGE, 2); + //Encoding must be done for parentheses or comma + await paramInstance.add(ZOHOCRMSDK.Record.SearchRecordsParam.CRITERIA, "((Last_Name:starts_with:Last Name) or (Company:starts_with:fasf\\(123\\) K))"); + // await paramInstance.add(SearchRecordsParam.CRITERIA, "(External:in:TestExternal123)"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // headerInstance.add(SearchRecordsHeader.X_EXTERNAL, "Leads.External"); + //Call searchRecords method that takes moduleAPIName, ParameterMap Instance and headerInstance as parameter + let response = await recordOperations.searchRecords(moduleAPIName, paramInstance, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ResponseWrapper) { + let records = responseObject.getData(); + records.forEach(record => { + console.log("Record ID: " + record.getId()); + let createdBy = record.getCreatedBy(); + if (createdBy != null) { + console.log("Record Created By User-ID: " + createdBy.getId()); + console.log("Record Created By User-Name: " + createdBy.getName()); + console.log("Record Created By User-Email: " + createdBy.getEmail()); + } + console.log("Record CreatedTime: " + record.getCreatedTime()); + let modifiedBy = record.getModifiedBy(); + if (modifiedBy != null) { + console.log("Record Modified By User-ID: " + modifiedBy.getId()); + console.log("Record Modified By User-Name: " + modifiedBy.getName()); + console.log("Record Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("Record ModifiedTime: " + record.getModifiedTime()); + let tags = record.getTag(); + if (tags != null) { + tags.forEach(tag => { + console.log("Record Tag Name: " + tag.getName()); + console.log("Record Tag ID: " + tag.getId()); + }); + } + //To get particular field value + console.log("Record Field Value: " + record.getKeyValue("Last_Name"));// FieldApiName + console.log("Record KeyValues: "); + let keyValues = record.getKeyValues(); + let keyArray = Array.from(keyValues.keys()); + keyArray.forEach(keyName => { + let value = keyValues.get(keyName); + if (value != null) { + if (Array.isArray(value)) { + if (value.length > 0) { + if (value[0] instanceof ZOHOCRMSDK.Record.FileDetails) { + let fileDetails = value; + fileDetails.forEach(fileDetail => { + console.log("Record FileDetails FileIds: " + fileDetail.getFileIdS()); + console.log("Record FileDetails FileNameS: " + fileDetail.getFileNameS()); + console.log("Record FileDetails SizeS: " + fileDetail.getSizeS()); + console.log("Record FileDetails Id: " + fileDetail.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Choice) { + let choiceArray = value; + console.log(keyName); + console.log("Values"); + choiceArray.forEach(eachChoice => { + console.log(eachChoice.getValue()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Tags.Tag) { + let tags1 = value; + tags1.forEach(tag => { + console.log("Record Tag Name: " + tag.getName()); + console.log("Record Tag ID: " + tag.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.PricingDetails) { + let pricingDetails = value; + pricingDetails.forEach(pricingDetail => { + console.log("Record PricingDetails ToRange: " + pricingDetail.getToRange().toString()); + console.log("Record PricingDetails Discount: " + pricingDetail.getDiscount().toString()); + console.log("Record PricingDetails ID: " + pricingDetail.getId()); + console.log("Record PricingDetails FromRange: " + pricingDetail.getFromRange().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Participants) { + let participants = value; + participants.forEach(participant => { + console.log("Record Participants Name: " + participant.getName()); + console.log("Record Participants Invited: " + participant.getInvited().toString()); + console.log("Record Participants ID: " + participant.getId()); + console.log("Record Participants Type: " + participant.getType()); + console.log("Record Participants Participant: " + participant.getParticipant()); + console.log("Record Participants Status: " + participant.getStatus()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Record) { + let recordArray = value; + recordArray.forEach(record1 => { + Array.from(record1.getKeyValues().keys()).forEach(key => { + console.log(key + ": " + record1.getKeyValues().get(key)); + }); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.LineTax) { + let lineTaxes = value; + lineTaxes.forEach(lineTax => { + console.log("Record ProductDetails LineTax Percentage: " + lineTax.getPercentage().toString()); + console.log("Record ProductDetails LineTax Name: " + lineTax.getName()); + console.log("Record ProductDetails LineTax Id: " + lineTax.getId()); + console.log("Record ProductDetails LineTax Value: " + lineTax.getValue().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Comment) { + let comments = value; + comments.forEach(comment => { + console.log("Record Comment CommentedBy: " + comment.getCommentedBy()); + console.log("Record Comment CommentedTime: " + comment.getCommentedTime().toString()); + console.log("Record Comment CommentContent: " + comment.getCommentContent()); + console.log("Record Comment Id: " + comment.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Attachments.Attachment) { + let attachments = value; + attachments.forEach(attachment => { + console.log("Record Attachment ID: " + attachment.getId()); + let owner = attachment.getOwner(); + if (owner != null) { + console.log("Record Attachment Owner - Name: " + owner.getName()); + console.log("Record Attachment Owner ID: " + owner.getId()); + console.log("Record Attachment Owner Email: " + owner.getEmail()); + } + console.log("Record Attachment Modified Time: " + attachment.getModifiedTime().toString()); + console.log("Record Attachment File Name: " + attachment.getFileName()); + console.log("Record Attachment Created Time: " + attachment.getCreatedTime()); + console.log("Record Attachment File Size: " + attachment.getSize()); + let parentId = attachment.getParentId(); + if (parentId != null) { + console.log("Record Attachment parent record Name: " + parentId.getKeyValue("name")); + console.log("Record Attachment parent record ID: " + parentId.getId()); + } + console.log("Record Attachment is Editable: " + attachment.getEditable().toString()); + console.log("Record Attachment File ID: " + attachment.getFileId()); + console.log("Record Attachment File Type: " + attachment.getType()); + console.log("Record Attachment seModule: " + attachment.getSeModule()); + let modifiedBy1 = attachment.getModifiedBy(); + if (modifiedBy1 != null) { + console.log("Record Attachment Modified By User-Name: " + modifiedBy1.getName()); + console.log("Record Attachment Modified By User-ID: " + modifiedBy1.getId()); + console.log("Record Attachment Modified By User-Email: " + modifiedBy1.getEmail()); + } + console.log("Record Attachment State: " + attachment.getState()); + let createdBy1 = attachment.getCreatedBy(); + if (createdBy1 != null) { + console.log("Record Attachment Created By User-Name: " + createdBy1.getName()); + console.log("Record Attachment Created By User-ID: " + createdBy1.getId()); + console.log("Record Attachment Created By User-Email: " + createdBy1.getEmail()); + } + console.log("Record Attachment LinkUrl: " + attachment.getLinkUrl()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Reminder) { + let reminders = value; + reminders.forEach(reminder => { + console.log("Reminder Period: " + reminder.getPeriod()); + console.log("Reminder Unit: " + reminder.getUnit()); + }); + } + else { + console.log(keyName + ": " + value); + } + } + } + else if (value instanceof ZOHOCRMSDK.Users.Users) { + console.log("Record " + keyName + " User-ID: " + value.getId()); + console.log("Record " + keyName + " User-Name: " + value.getName()); + console.log("Record " + keyName + " User-Email: " + value.getEmail()); + } + else if (value instanceof ZOHOCRMSDK.Layouts.Layouts) { + console.log(keyName + " ID: " + value.getId()); + console.log(keyName + " Name: " + value.getName()); + } + else if (value instanceof ZOHOCRMSDK.Record.Record) { + console.log(keyName + " Record ID: " + value.getId()); + console.log(keyName + " Record Name: " + value.getKeyValue("name")); + } + else if (value instanceof ZOHOCRMSDK.Choice) { + console.log(keyName + ": " + value.getValue()); + } + else if (value instanceof ZOHOCRMSDK.Record.RemindAt) { + console.log(keyName + ": " + value.getAlarm()); + } + else if (value instanceof ZOHOCRMSDK.Record.RecurringActivity) { + console.log(keyName); + console.log("RRULE: " + value.getRrule()); + } + else if (value instanceof ZOHOCRMSDK.Record.Consent) { + console.log("Record Consent ID: " + value.getId()); + let owner = value.getOwner(); + if (owner != null) { + console.log("Record Consent Owner Name: " + owner.getName()); + console.log("Record Consent Owner ID: " + owner.getId()); + console.log("Record Consent Owner Email: " + owner.getEmail()); + } + let consentCreatedBy = value.getCreatedBy(); + if (consentCreatedBy != null) { + console.log("Record Consent CreatedBy Name: " + consentCreatedBy.getName()); + console.log("Record Consent CreatedBy ID: " + consentCreatedBy.getId()); + console.log("Record Consent CreatedBy Email: " + consentCreatedBy.getEmail()); + } + let consentModifiedBy = value.getModifiedBy(); + if (consentModifiedBy != null) { + console.log("Record Consent ModifiedBy Name: " + consentModifiedBy.getName()); + console.log("Record Consent ModifiedBy ID: " + consentModifiedBy.getId()); + console.log("Record Consent ModifiedBy Email: " + consentModifiedBy.getEmail()); + } + console.log("Record Consent CreatedTime: " + value.getCreatedTime()); + console.log("Record Consent ModifiedTime: " + value.getModifiedTime()); + console.log("Record Consent ContactThroughEmail: " + value.getContactThroughEmail()); + console.log("Record Consent ContactThroughSocial: " + value.getContactThroughSocial()); + console.log("Record Consent ContactThroughSurvey: " + value.getContactThroughSurvey()); + console.log("Record Consent ContactThroughPhone: " + value.getContactThroughPhone()); + console.log("Record Consent MailSentTime: " + value.getMailSentTime().toString()); + console.log("Record Consent ConsentDate: " + value.getConsentDate().toString()); + console.log("Record Consent ConsentRemarks: " + value.getConsentRemarks()); + console.log("Record Consent ConsentThrough: " + value.getConsentThrough()); + console.log("Record Consent DataProcessingBasis: " + value.getDataProcessingBasis()); + //To get custom values + console.log("Record Consent Lawful Reason: " + value.getKeyValue("Lawful_Reason")); + } + else if (value instanceof Map) { + console.log(keyName); + Array.from(value.keys()).forEach(key => { + console.log(key + ": " + value.get(key)); + }); + } + else { + console.log(keyName + ": " + value); + } + } + }); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await SearchRecords.initialize(); +let moduleAPIName = "leads"; +await SearchRecords.searchRecords(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/updateRecord.js b/versions/3.0.0/samples/records/updateRecord.js new file mode 100644 index 0000000..f9b0323 --- /dev/null +++ b/versions/3.0.0/samples/records/updateRecord.js @@ -0,0 +1,229 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateRecord { + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Record

+ * This method is used to update a single record of a module with ID and print the response. + * @param {String} moduleAPIName The API Name of the record's module. + * @param {BigInt} recordId The ID of the record to be updated + */ + static async updateRecord(moduleAPIName, recordId) { + //API Name of the module to update record + //let moduleAPIName = "module_api_name"; + //let recordId = 177002n; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + //Array to hold Record instances + let recordsArray = []; + let record = new ZOHOCRMSDK.Record.Record(); + /* + * Call addFieldValue method that takes two arguments + * Import the "@zohocrm/nodejs-sdk-2.1/core/com/zoho/crm/api/record/field" file + * 1 . Call Field "." and choose the module from the displayed list and press "." and choose the field name from the displayed list. + * 2 . Value + */ + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.CITY, "city"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LAST_NAME, "Last Name"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.FIRST_NAME, "First Name"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LAST_NAME, "Last Name"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.COMPANY, "KKRNP"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.ANNUAL_REVENUE, 1232.1); + /* + * Call addKeyValue method that takes two arguments + * 1 . A string that is the Field's API Name + * 2 . Value + */ + record.addKeyValue("Custom_field", "Value"); + record.addKeyValue("Custom_field_2", "value"); + record.addKeyValue("Date_1", new Date(2017, 1, 13)); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32537b7c2400dadca8ff55f620c65357da"); + fileDetails.push(fileDetail); + fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca878a934519e6cdb2"); + fileDetails.push(fileDetail); + fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c323daf4780bfe0058133556f155795981f"); + fileDetails.push(fileDetail); + record.addKeyValue("File_Upload", fileDetails); + let recordOwner = new ZOHOCRMSDK.Users.User(); + recordOwner.setEmail("abc@zoho.com"); + record.addKeyValue("Owner", recordOwner); + //Used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + record.addKeyValue("Data_Processing_Basis_Details", dataConsent); + /** Following methods are being used only by Inventory modules */ + let dealName = new ZOHOCRMSDK.Record.Record(); + await dealName.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.ID, 347706112416012n); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.DEAL_NAME, dealName); + let contactName = new ZOHOCRMSDK.Record.Record(); + await contactName.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.ID, 347706112263005n); + await contactName.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.CONTACT_NAME, contactName); + let accountName = new ZOHOCRMSDK.Record.Record(); + // accountName.addFieldValue(RecordField.Accounts.ID, 34770619326021n); + accountName.addKeyValue("name", "automatedAccount"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.ACCOUNT_NAME, accountName); + record.addKeyValue("Discount", 10.5); + let inventoryLineItemArray = []; + let inventoryLineItem = new ZOHOCRMSDK.Record.Record(); + let lineItemProduct = new ZOHOCRMSDK.Record.LineItemProduct(); + lineItemProduct.setId(347706112402032n); + // lineItemProduct.addKeyValue("Products_External", "ProductExternal"); + inventoryLineItem.addKeyValue("Product_Name", lineItemProduct); + inventoryLineItem.addKeyValue("Quantity", 3); + inventoryLineItem.addKeyValue("Description", "productDescription"); + inventoryLineItem.addKeyValue("ListPrice", 10.0); + inventoryLineItem.addKeyValue("Discount", "5.%"); + let productLineTaxes = []; + let productLineTax = new ZOHOCRMSDK.Record.LineTax(); + productLineTax.setName("MyTax1134"); + productLineTax.setPercentage(20.0); + productLineTaxes.push(productLineTax); + inventoryLineItem.addKeyValue("Line_Tax", productLineTaxes); + inventoryLineItemArray.push(inventoryLineItem); + record.addKeyValue("Quoted_Items", inventoryLineItemArray); + let lineTaxes = []; + let lineTax = new ZOHOCRMSDK.Record.LineTax(); + lineTax.setName("MyTax1134"); + lineTax.setPercentage(20.0); + lineTaxes.push(lineTax); + record.addKeyValue("$line_tax", lineTaxes); + /** End Inventory **/ + + // for custom Fields + record.addKeyValue("External", "Value12345"); + record.addKeyValue("Longinteger", 123); + record.addKeyValue("CustomField", "custom_field"); + record.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record.addKeyValue("Date_1", new Date(2020, 10, 12)); + record.addKeyValue("Subject", "AutomatedSDK"); + record.addKeyValue("Product_Name", "Automated"); + let fileDetails1 = []; + let fileDetail1 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail1.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails1.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails2.push(fileDetail2); + record.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(44024804001n); + record.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(44024800774074n); + record.addKeyValue("Lookup_1", data); + //for Custom PicKList + record.addKeyValue("Pick", "true"); + //for Custom MultiPickList + record.addKeyValue("Multiselect", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(4402480054001n); + subform.addKeyValue("Userfield", user1); + let delete_record = new ZOHOCRMSDK.Record.Record(); + deleteFrom.setId(4402401573003n) + deleteFrom.addKeyValue("_delete", null); + subformList.push(delete_record); + subformList.push(subform); + record.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record3 = new ZOHOCRMSDK.Record.Record(); + record3.addKeyValue("id", 4402480393052n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record3); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 4401390054n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record.addKeyValue("MultiSelectLookup", multiSelectList); + + //Add Record instance to the array + recordsArray.push(record); + request.setData(recordsArray); + let trigger = []; + trigger.push("approval"); + trigger.push("workflow"); + trigger.push("blueprint"); + request.setTrigger(trigger); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // headerInstance.add(UpdateRecordHeader.X_EXTERNAL, "Leads.External"); + // headerInstance.add(UpdateRecordHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + //Call updateRecord method that takes recordId, ModuleAPIName, BodyWrapper instance and headerInstance as parameter. + let response = await recordOperations.updateRecord(recordId, moduleAPIName, request, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateRecord.initialize(); +let moduleAPIName = "leads"; +let recordId = 440248008057n; +await UpdateRecord.updateRecord(moduleAPIName,recordId); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/updateRecordUsingExternalId.js b/versions/3.0.0/samples/records/updateRecordUsingExternalId.js new file mode 100644 index 0000000..afc2134 --- /dev/null +++ b/versions/3.0.0/samples/records/updateRecordUsingExternalId.js @@ -0,0 +1,170 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateRecordUsingExternalId{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Record Using External Id

+ * This method is used to update a single record of a module with ID and print the response. + * @param {String} moduleAPIName The API Name of the record's module. + * @param {String} externalFieldValue + */ + static async updateRecordUsingExternalId(moduleAPIName, externalFieldValue) { + //API Name of the module to update record + //let moduleAPIName = "module_api_name"; + //let externalFieldValue = "34770615177002"; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + //Array to hold Record instances + let recordsArray = []; + let record = new ZOHOCRMSDK.Record.Record(); + /* + * Call addFieldValue method that takes two arguments + * Import the "@zohocrm/nodejs-sdk-2.1/core/com/zoho/crm/api/record/field" file + * 1 . Call Field "." and choose the module from the displayed list and press "." and choose the field name from the displayed list. + * 2 . Value + */ + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.CITY, "City"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LAST_NAME, "Last Name"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.FIRST_NAME, "First Name"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LAST_NAME, "Last Name"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.COMPANY, "KKRNP"); + /* + * Call addKeyValue method that takes two arguments + * 1 . A string that is the Field's API Name + * 2 . Value + */ + record.addKeyValue("Custom_field", "Value"); + record.addKeyValue("Custom_field_2", "value"); + record.addKeyValue("Date_1", new Date(2017, 1, 13)); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32537b7c2400dadca8ff55f620c65357da"); + fileDetails.push(fileDetail); + fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca878a934519e6cdb2"); + fileDetails.push(fileDetail); + fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c323daf4780bfe0058133556f155795981f"); + fileDetails.push(fileDetail); + // record.addKeyValue("File_Upload", fileDetails); + let recordOwner = new ZOHOCRMSDK.Users.Users(); + recordOwner.setEmail("abc@zoho.com"); + record.addKeyValue("Owner", recordOwner); + //Used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + record.addKeyValue("Data_Processing_Basis_Details", dataConsent); + /** Following methods are being used only by Inventory modules */ + let dealName = new ZOHOCRMSDK.Record.Record(); + await dealName.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.ID, 347706112416012n); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.DEAL_NAME, dealName); + let contactName = new ZOHOCRMSDK.Record.Record(); + await contactName.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.ID, 347706112263005n); + await contactName.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.CONTACT_NAME, contactName); + let accountName = new ZOHOCRMSDK.Record.Record(); + // accountName.addFieldValue(RecordField.Accounts.ID, 34770619326021n); + accountName.addKeyValue("name", "automatedAccount"); + await record.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.ACCOUNT_NAME, accountName); + record.addKeyValue("Discount", 10.5); + let inventoryLineItemArray = []; + let inventoryLineItem = new ZOHOCRMSDK.Record.Record(); + let lineItemProduct = new ZOHOCRMSDK.Record.LineItemProduct(); + lineItemProduct.setId(347706112402032n); + inventoryLineItem.addKeyValue("Product_Name", lineItemProduct); + inventoryLineItem.addKeyValue("Quantity", 3); + inventoryLineItem.addKeyValue("Description", "productDescription"); + inventoryLineItem.addKeyValue("ListPrice", 10.0); + inventoryLineItem.addKeyValue("Discount", "5.%"); + let productLineTaxes = []; + let productLineTax = new ZOHOCRMSDK.Record.LineTax(); + productLineTax.setName("MyTax2122"); + productLineTax.setPercentage(20.0); + productLineTaxes.push(productLineTax); + inventoryLineItem.addKeyValue("Line_Tax", productLineTaxes); + inventoryLineItemArray.push(inventoryLineItem); + record.addKeyValue("Quoted_Items", inventoryLineItemArray); + let lineTaxes = []; + let lineTax = new ZOHOCRMSDK.Record.LineTax(); + lineTax.setName("MyTax21122"); + lineTax.setPercentage(20.0); + lineTaxes.push(lineTax); + record.addKeyValue("$line_tax", lineTaxes); + /** End Inventory **/ + //Add Record instance to the array + recordsArray.push(record); + request.setData(recordsArray); + let trigger = []; + trigger.push("approval"); + trigger.push("workflow"); + trigger.push("blueprint"); + request.setTrigger(trigger); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + await headerInstance.add(ZOHOCRMSDK.Record.UpdateRecordHeader.X_EXTERNAL, "Leads.External"); + //Call updateRecordUsingExternalId method that takes externalFieldValue, ModuleAPIName, BodyWrapper instance and headerInstance as parameter. + let response = await recordOperations.updateRecordUsingExternalId(externalFieldValue, moduleAPIName, request, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateRecordUsingExternalId.initialize(); +let moduleAPIName = "leads"; +let externalFieldValue = "external"; +await UpdateRecordUsingExternalId.updateRecordUsingExternalId(moduleAPIName,externalFieldValue); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/updateRecords.js b/versions/3.0.0/samples/records/updateRecords.js new file mode 100644 index 0000000..61e9837 --- /dev/null +++ b/versions/3.0.0/samples/records/updateRecords.js @@ -0,0 +1,238 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateRecords{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Records

+ * This method is used to update the records of a module with ID and print the response. + * @param {String} moduleAPIName The API Name of the module to update records. + */ + static async updateRecords(moduleAPIName) { + //example + //let moduleAPIName = "module_api_name"; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + //Array to hold Record instances + let recordsArray = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + //ID of the record to be updated + record1.setId(440240983007n); + /* + * Call addFieldValue method that takes two arguments + * Import the "@zohocrm/nodejs-sdk-2.1/core/com/zoho/crm/api/record/field" file + * 1 . Call Field "." and choose the module from the displayed list and press "." and choose the field name from the displayed list. + * 2 . Value + */ + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LAST_NAME, "Node JS SDK"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.FIRST_NAME, "Node"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.COMPANY, "ZCRM"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.ANNUAL_REVENUE, 1231.1); + /* + * Call addKeyValue method that takes two arguments + * 1 . A string that is the Field's API Name + * 2 . Value + */ + record1.addKeyValue("Custom_field", "Custom val"); + + record1.addKeyValue("Custom_field_2", 10); + + //Used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + + dataConsent.setConsentRemarks("Approved."); + + dataConsent.setConsentThrough("Email"); + + dataConsent.setContactThroughEmail(true); + + dataConsent.setContactThroughSocial(false); + + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + + let recordOwner = new ZOHOCRMSDK.Users.User(); + + recordOwner.setEmail("abc@zoho.com"); + + record1.addKeyValue("Owner", recordOwner); + + /** Following methods are being used only by Inventory modules */ + + let dealName = new ZOHOCRMSDK.Record.Record(); + + await dealName.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.ID, 347706112416012n); + + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.DEAL_NAME, dealName); + + let contactName = new ZOHOCRMSDK.Record.Record(); + + await contactName.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.ID, 347706112263005n); + + await contactName.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.CONTACT_NAME, contactName); + + let accountName = new ZOHOCRMSDK.Record.Record(); + + // accountName.addFieldValue(RecordField.Accounts.ID, 34770619326021n); + + accountName.addKeyValue("name", "automatedAccount"); + + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.ACCOUNT_NAME, accountName); + + record1.addKeyValue("Discount", 10.5); + + let inventoryLineItemArray = []; + + let inventoryLineItem = new ZOHOCRMSDK.Record.Record(); + + let lineItemProduct = new ZOHOCRMSDK.Record.LineItemProduct(); + + lineItemProduct.setId(347706112402032n); + + // lineItemProduct.addKeyValue("Products_External", "ProductExternal"); + + inventoryLineItem.addKeyValue("Product_Name", lineItemProduct); + + inventoryLineItem.addKeyValue("Quantity", 3); + + inventoryLineItem.addKeyValue("Description", "productDescription"); + + inventoryLineItem.addKeyValue("ListPrice", 10.0); + + inventoryLineItem.addKeyValue("Discount", "5.%"); + + let productLineTaxes = []; + + let productLineTax = new ZOHOCRMSDK.Record.LineTax(); + + productLineTax.setName("MyTax1134"); + + productLineTax.setPercentage(20.0); + + productLineTaxes.push(productLineTax); + + inventoryLineItem.addKeyValue("Line_Tax", productLineTaxes); + + inventoryLineItemArray.push(inventoryLineItem); + + record1.addKeyValue("Quoted_Items", inventoryLineItemArray); + + let lineTaxes = []; + + let lineTax = new ZOHOCRMSDK.Record.LineTax(); + + lineTax.setName("MyTax1134"); + + lineTax.setPercentage(20.0); + + lineTaxes.push(lineTax); + + record1.addKeyValue("$line_tax", lineTaxes); + + /** End Inventory **/ + + recordsArray.push(record1); + + let record2 = new ZOHOCRMSDK.Record.Record(); + + //ID of the record to be updated + await record2.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.ID, 347706110152007n); + + /* + * Call addFieldValue method that takes two arguments + * 1 . Call Field "." and choose the module from the displayed list and press "." and choose the field name from the displayed list. + * 2 . Value + */ + await record2.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.CITY, "City"); + + await record2.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LAST_NAME, "Last Name"); + + await record2.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.FIRST_NAME, "First Name"); + + await record2.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.COMPANY, "KKRNP"); + + /* + * Call addKeyValue method that takes two arguments + * 1 . A string that is the Field's API Name + * 2 . Value + */ + record2.addKeyValue("Custom_field", "Value"); + + record2.addKeyValue("Custom_field_2", "value"); + //Add Record instance to the array + recordsArray.push(record2); + request.setData(recordsArray); + + // let trigger = []; + // + // trigger.push("approval"); + // + // trigger.push("workflow"); + // + // trigger.push("blueprint"); + // request.setTrigger(trigger); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.UpdateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + //Call updateRecords method that takes moduleAPIName, BodyWrapper instance and headerInstance as parameter. + let response = await recordOperations.updateRecords(moduleAPIName, request, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateRecords.initialize(); +let moduleAPIName = "leads"; +await UpdateRecords.updateRecords(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/uploadPhoto.js b/versions/3.0.0/samples/records/uploadPhoto.js new file mode 100644 index 0000000..cf14fa9 --- /dev/null +++ b/versions/3.0.0/samples/records/uploadPhoto.js @@ -0,0 +1,80 @@ +import fs from "fs"; +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UploadPhoto{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + * This method is used to attach a photo to a record. You must include the file in the request + * @param {String} moduleAPIName The API Name of the record's module + * @param {BigInt} recordId The ID of the record + * @param {String} absoluteFilePath The absolute file path of the file to be uploaded + */ + static async uploadPhoto(moduleAPIName, recordId, absoluteFilePath) { + //example + //let moduleAPIName = "module_api_name"; + //let recordId = 177002n; + //let absoluteFilePath = "/Users/user_name/Desktop/image.png"; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.FileBodyWrapper(); + /** StreamWrapper can be initialized in any of the following ways */ + /** + * param 1 . fileName + * param 2 . Read Stream. + */ + let streamWrapper = new ZOHOCRMSDK.StreamWrapper(null, fs.createReadStream(absoluteFilePath)); + /** + * param 1 . fileName + * param 2 . Read Stream + * param 3 . Absolute File Path of the file to be attached + */ + // let streamWrapper = new StreamWrapper(null, null, absoluteFilePath); + request.setFile(streamWrapper); + //Call uploadPhoto method that takes FileBodyWrapper instance, moduleAPIName and recordId as parameter + let response = await recordOperations.uploadPhoto(recordId, moduleAPIName, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UploadPhoto.initialize(); +let moduleAPIName = "leads"; +let recordId = 4402481182075n; +let absolutePath = "/users/Desktop/test.png"; +await UploadPhoto.uploadPhoto(moduleAPIName,recordId,absolutePath); \ No newline at end of file diff --git a/versions/3.0.0/samples/records/upsertRecords.js b/versions/3.0.0/samples/records/upsertRecords.js new file mode 100644 index 0000000..4e73a7a --- /dev/null +++ b/versions/3.0.0/samples/records/upsertRecords.js @@ -0,0 +1,133 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpsertRecords{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Upsert Records

+ * This method is used to Upsert records of a module and print the response. + * @param {String} moduleAPIName The API Name of the module to upsert records. + */ + static async upsertRecords(moduleAPIName) { + //example + //let moduleAPIName = "module_api_name"; + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + //Array to hold Record instances + let recordsArray = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + /* + * Call addFieldValue method that takes two arguments + * Import the "@zohocrm/nodejs-sdk-2.1/core/com/zoho/crm/api/record/field" file + * 1 . Call Field "." and choose the module from the displayed list and press "." and choose the field name from the displayed list. + * 2 . Value + */ + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LAST_NAME, "Node JS SDK"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.FIRST_NAME, "Node"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.COMPANY, "ZCRM"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.ANNUAL_REVENUE, 1231.1); + /* + * Call addKeyValue method that takes two arguments + * 1 . A string that is the Field's API Name + * 2 . Value + */ + record1.addKeyValue("Custom_field", "Custom val"); + // + record1.addKeyValue("Custom_field_2", 10); + // + // //Add the record to array + recordsArray.push(record1); + let record2 = new ZOHOCRMSDK.Record.Record(); + // + // /* + // * Call addFieldValue method that takes two arguments + // * 1 . Call Field "." and choose the module from the displayed list and press "." and choose the field name from the displayed list. + // * 2 . Value + // */ + await record2.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.CITY, "City"); + + await record2.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LAST_NAME, "Last Name"); + + await record2.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.FIRST_NAME, "First Name"); + + await record2.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.COMPANY, "KKRNP"); + + // /* + // * Call addKeyValue method that takes two arguments + // * 1 . A string that is the Field's API Name + // * 2 . Value + // */ + record2.addKeyValue("Custom_field", "Value"); + // + record2.addKeyValue("Custom_field_2", "value"); + // // Add the record to array + // recordsArray.push(record2); + request.setData(recordsArray); + // let duplicateCheckFields = ["City", "Last_Name", "First_Name"]; + // request.setDuplicateCheckFields(duplicateCheckFields); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + await headerInstance.add(ZOHOCRMSDK.Record.UpsertRecordsHeader.X_EXTERNAL, "Leads.External"); + //Call upsertRecords method that takes BodyWrapper instance and moduleAPIName as parameter. + let response = await recordOperations.upsertRecords(moduleAPIName, request, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpsertRecords.initialize(); +let moduleAPIName = "leads"; +await UpsertRecords.upsertRecords(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/related_lists/getRelatedList.js b/versions/3.0.0/samples/related_lists/getRelatedList.js new file mode 100644 index 0000000..8cf902d --- /dev/null +++ b/versions/3.0.0/samples/related_lists/getRelatedList.js @@ -0,0 +1,67 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetRelatedList{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getRelatedList(moduleAPIName, relatedListId, layoutId) { + //example + //let moduleAPIName = "module_api_name"; + // let relatedListId = 62003n; + let relatedListsOperations = new ZOHOCRMSDK.ListsRelated.RelatedListsOperations(layoutId); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.ListsRelated.GetRelatedListParam.MODULE, moduleAPIName); + //Call getRelatedList method which takes relatedListId as parameter + let response = await relatedListsOperations.getRelatedList(relatedListId, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.ListsRelated.ResponseWrapper) { + let relatedLists = responseObject.getRelatedLists(); + relatedLists.forEach(relatedList => { + console.log("RelatedList SequenceNumber: " + relatedList.getSequenceNumber()); + console.log("RelatedList DisplayLabel: " + relatedList.getDisplayLabel()); + console.log("RelatedList APIName: " + relatedList.getAPIName()); + console.log("RelatedList Module: " + relatedList.getModule()); + console.log("RelatedList Name: " + relatedList.getName()); + console.log("RelatedList Action: " + relatedList.getAction()); + console.log("RelatedList ID: " + relatedList.getId()); + console.log("RelatedList Href: " + relatedList.getHref()); + console.log("RelatedList Type: " + relatedList.getType()); + console.log("RelatedList Connectedmodule: " + relatedList.getConnectedmodule()); + console.log("RelatedList Linkingmodule: " + relatedList.getLinkingmodule()); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.ListsRelated.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetRelatedList.initialize(); +let moduleAPIName = "leads"; +let relatedListId = 4402480305317n +await GetRelatedList.getRelatedList(moduleAPIName,relatedListId); \ No newline at end of file diff --git a/versions/3.0.0/samples/related_lists/getRelatedLists.js b/versions/3.0.0/samples/related_lists/getRelatedLists.js new file mode 100644 index 0000000..e7dc28e --- /dev/null +++ b/versions/3.0.0/samples/related_lists/getRelatedLists.js @@ -0,0 +1,66 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetRelatedLists{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getRelatedLists(moduleAPIName, layoutId) { + //example + //let moduleAPIName = "module_api_name"; + let relatedListsOperations = new ZOHOCRMSDK.ListsRelated.RelatedListsOperations(layoutId); + let paraminstance = new ZOHOCRMSDK.ParameterMap(); + await paraminstance.add(ZOHOCRMSDK.ListsRelated.GetRelatedListsParam.MODULE, moduleAPIName); + //Call getRelatedLists method + let response = await relatedListsOperations.getRelatedLists(paraminstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.ListsRelated.ResponseWrapper) { + let relatedLists = responseObject.getRelatedLists(); + relatedLists.forEach(relatedList => { + console.log("RelatedList SequenceNumber: " + relatedList.getSequenceNumber()); + console.log("RelatedList DisplayLabel: " + relatedList.getDisplayLabel()); + console.log("RelatedList APIName: " + relatedList.getAPIName()); + console.log("RelatedList Module: " + relatedList.getModule()); + console.log("RelatedList Name: " + relatedList.getName()); + console.log("RelatedList Action: " + relatedList.getAction()); + console.log("RelatedList ID: " + relatedList.getId()); + console.log("RelatedList Href: " + relatedList.getHref()); + console.log("RelatedList Type: " + relatedList.getType()); + console.log("RelatedList Connectedmodule: " + relatedList.getConnectedmodule()); + console.log("RelatedList Linkingmodule: " + relatedList.getLinkingmodule()); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.ListsRelated.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetRelatedLists.initialize(); +let moduleAPIName = "leads"; +let layoutId = 44024800167n; +await GetRelatedLists.getRelatedLists(moduleAPIName, layoutId); \ No newline at end of file diff --git a/versions/3.0.0/samples/related_records/deLinkRecord.js b/versions/3.0.0/samples/related_records/deLinkRecord.js new file mode 100644 index 0000000..0188101 --- /dev/null +++ b/versions/3.0.0/samples/related_records/deLinkRecord.js @@ -0,0 +1,86 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeLinkRecord{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Delink Record

+ * This method is used to delete the association between modules and print the response.s + * @param {String} moduleAPIName The API Name of the module to delink related record. + * @param {BigInt} recordId The ID of the record + * @param {String} relatedListAPIName The API name of the related list. + * @param {BigInt} relatedListId The ID of the related record. + */ + static async deLinkRecord(moduleAPIName, recordId, relatedListAPIName, relatedListId) { + //example + // let moduleAPIName = "module_api_name"; + // let recordId = 798007n; + // let relatedModuleAPIName = "module_api_name"; + // let relatedListId = 70614994115; + let relatedRecordsOperations = new ZOHOCRMSDK.RecordsRelated.RelatedRecordsOperations(relatedListAPIName, moduleAPIName, null); + //Call delinkRecord method that takes relatedListId and recordId as parameter. + let response = await relatedRecordsOperations.delinkRecord(relatedListId, recordId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.RecordsRelated.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await DeLinkRecord.initialize(); +let moduleAPIName = "leads"; +let recordId = 440248074074n; +let relatedListAPIName = "notes"; +let relatedListId = 44024801395003n; +await DeLinkRecord.deLinkRecord(moduleAPIName,recordId,relatedListAPIName,relatedListId); diff --git a/versions/3.0.0/samples/related_records/deLinkRecords.js b/versions/3.0.0/samples/related_records/deLinkRecords.js new file mode 100644 index 0000000..26fcf94 --- /dev/null +++ b/versions/3.0.0/samples/related_records/deLinkRecords.js @@ -0,0 +1,91 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeLinkRecords{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Delink Records

+ * This method is used to delete the association between modules and print the response. + * @param {String} moduleAPIName The API Name of the module to delink related records. + * @param {BigInt} recordId The ID of the record + * @param {String} relatedListAPIName The API name of the related list + * @param {Array} relatedListIds The array of related record IDs. + */ + static async deLinkRecords(moduleAPIName, recordId, relatedListAPIName, relatedListIds) { + //example + // let moduleAPIName = "module_api_name"; + // let recordId = 0798007n; + // let relatedModuleAPIName = "module_api_name"; + // let relatedIds = [002414001n, 32414002n, 02414020n]; + let relatedRecordsOperations = new ZOHOCRMSDK.RecordsRelated.RelatedRecordsOperations(relatedListAPIName, moduleAPIName, null); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters of Delink Records operation */ + for (let relatedListId of relatedListIds) { + await paramInstance.add(ZOHOCRMSDK.RecordsRelated.DelinkRecordsParam.IDS, relatedListId); + } + //Call delinkRecords method that takes recordId and ParameterMap instance as parameter. + let response = await relatedRecordsOperations.delinkRecords(recordId, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.RecordsRelated.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await DeLinkRecords.initialize(); +let moduleAPIName = "leads"; +let recordId = 12343211n +let relatedListAPIName = "notes"; +let relatedListIds = [12321121n,12431231n]; +await DeLinkRecords.deLinkRecords(moduleAPIName,recordId,relatedListAPIName,relatedListIds); \ No newline at end of file diff --git a/versions/3.0.0/samples/related_records/deleteRelatedRecordUsingExternalId.js b/versions/3.0.0/samples/related_records/deleteRelatedRecordUsingExternalId.js new file mode 100644 index 0000000..c840ecc --- /dev/null +++ b/versions/3.0.0/samples/related_records/deleteRelatedRecordUsingExternalId.js @@ -0,0 +1,87 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteRelatedRecordUsingExternalId{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Delete Related Record Using External Id

+ * This method is used to delete the association between modules and print the response.s + * @param {String} moduleAPIName The API Name of the module to delink related record. + * @param {String} externalValue + * @param {String} relatedListAPIName The API name of the related list. + * @param {String} externalFieldValue + */ + static async deleteRelatedRecordUsingExternalId(moduleAPIName, externalValue, relatedListAPIName, externalFieldValue) { + //example + // let moduleAPIName = "module_api_name"; + // let externalValue = "798007"; + // let relatedModuleAPIName = "module_api_name"; + // let externalFieldValue = "70614994115"; + let xExternal = "Leads.External,Products.Products_External"; + let relatedRecordsOperations = new ZOHOCRMSDK.RecordsRelated.RelatedRecordsOperations(relatedListAPIName, moduleAPIName, xExternal); + //Call deleteRelatedRecordUsingExternalId method that takes externalFieldValue and externalValue as parameter. + let response = await relatedRecordsOperations.deleteRelatedRecordUsingExternalId(externalFieldValue, externalValue); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.RecordsRelated.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await DeleteRelatedRecordUsingExternalId.initialize(); +let moduleAPIName = "leads"; +let externalValue = "external"; +let relatedListAPIName = "noted"; +let externalFieldValue = "12345243"; +await DeleteRelatedRecordUsingExternalId.deleteRelatedRecordUsingExternalId(moduleAPIName,externalValue,relatedListAPIName,externalFieldValue); diff --git a/versions/3.0.0/samples/related_records/deleteRelatedRecordsUsingExternalId.js b/versions/3.0.0/samples/related_records/deleteRelatedRecordsUsingExternalId.js new file mode 100644 index 0000000..43751f4 --- /dev/null +++ b/versions/3.0.0/samples/related_records/deleteRelatedRecordsUsingExternalId.js @@ -0,0 +1,92 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteRelatedRecordsUsingExternalId{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Delete RelatedRecords Using External Id

+ * This method is used to delete the association between modules and print the response. + * @param {String} moduleAPIName The API Name of the module to delink related records. + * @param {String} externalValue The ID of the record + * @param {String} relatedListAPIName The API name of the related list + * @param {Array} relatedListIds The array of related record IDs. + */ + static async deleteRelatedRecordsUsingExternalId(moduleAPIName, externalValue, relatedListAPIName, relatedListIds) { + //example + // let moduleAPIName = "module_api_name"; + // let recordId = 0798007n; + // let relatedModuleAPIName = "module_api_name"; + // let relatedIds = [002414001n, 32414002n, 02414020n]; + let xExternal = "Leads.External,Products.Products_External"; + let relatedRecordsOperations = new ZOHOCRMSDK.RecordsRelated.RelatedRecordsOperations(relatedListAPIName, moduleAPIName, xExternal); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters of Delink Records operation */ + for (let relatedListId of relatedListIds) { + await paramInstance.add(ZOHOCRMSDK.RecordsRelated.DelinkRecordsParam.IDS, relatedListId); + } + //Call deleteRelatedRecordsUsingExternalId method that takes externalValue and ParameterMap instance as parameter. + let response = await relatedRecordsOperations.deleteRelatedRecordsUsingExternalId(externalValue, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.RecordsRelated.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await DeleteRelatedRecordsUsingExternalId.initialize(); +let moduleAPIName = "leads"; +let externalValue = "external"; +let relatedListAPIName = "notes"; +let relatedListIds = [1234n,2345n,3214n]; +await DeleteRelatedRecordsUsingExternalId.deleteRelatedRecordsUsingExternalId(moduleAPIName,externalValue,relatedListAPIName,relatedListIds); \ No newline at end of file diff --git a/versions/3.0.0/samples/related_records/getRelatedRecord.js b/versions/3.0.0/samples/related_records/getRelatedRecord.js new file mode 100644 index 0000000..258c04a --- /dev/null +++ b/versions/3.0.0/samples/related_records/getRelatedRecord.js @@ -0,0 +1,326 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +import path from "path"; +import fs from "fs"; +class GetRelatedRecord{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Related Record

+ * This method is used to get the single related list record and print the response. + * @param {String} moduleAPIName The API Name of the module to get related record. + * @param {BigInt} recordId The ID of the record to be get Related List. + * @param {String} relatedListAPIName The API name of the related list. + * @param {BigInt} relatedListId The ID of the related record. + * @param {String} destinationFolder The absolute path of the folder to store the obtained file + */ + static async getRelatedRecord(moduleAPIName, recordId, relatedListAPIName, relatedListId, destinationFolder) { + let relatedRecordsOperations = new ZOHOCRMSDK.RecordsRelated.RelatedRecordsOperations(relatedListAPIName, moduleAPIName, null); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.RecordsRelated.GetRelatedRecordParam.FIELDS, "Note_Content"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + /* Possible parameters for Get Related Record operation */ + await headerInstance.add(ZOHOCRMSDK.RecordsRelated.GetRelatedRecordHeader.IF_MODIFIED_SINCE, new Date('June 15, 2020 05:35:32')); + //Call getRelatedRecord method that takes relatedListId, recordId and headerInstance as parameter + let response = await relatedRecordsOperations.getRelatedRecord(relatedListId, recordId, paramInstance, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.ResponseWrapper) { + let records = responseObject.getData(); + records.forEach(record => { + console.log("RelatedRecord ID: " + record.getId()); + let createdBy = record.getCreatedBy(); + if (createdBy != null) { + console.log("RelatedRecord Created By User-ID: " + createdBy.getId()); + console.log("RelatedRecord Created By User-Name: " + createdBy.getName()); + console.log("RelatedRecord Created By User-Email: " + createdBy.getEmail()); + } + console.log("RelatedRecord CreatedTime: " + record.getCreatedTime()); + let modifiedBy = record.getModifiedBy(); + if (modifiedBy != null) { + console.log("RelatedRecord Modified By User-ID: " + modifiedBy.getId()); + console.log("RelatedRecord Modified By User-Name: " + modifiedBy.getName()); + console.log("RelatedRecord Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("RelatedRecord ModifiedTime: " + record.getModifiedTime()); + let tags = record.getTag(); + if (tags != null) { + tags.forEach(tag => { + console.log("RelatedRecord Tag Name: " + tag.getName()); + console.log("RelatedRecord Tag ID: " + tag.getId()); + }); + } + //To get particular field value + console.log("RelatedRecord Field Value: " + record.getKeyValue("Last_Name"));// FieldApiName + console.log("RelatedRecord KeyValues: "); + let keyValues = record.getKeyValues(); + let keyArray = Array.from(keyValues.keys()); + keyArray.forEach(keyName => { + let value = keyValues.get(keyName); + if (value != null) { + if (Array.isArray(value)) { + if (value.length > 0) { + if (value[0] instanceof ZOHOCRMSDK.Record.FileDetails) { + let fileDetails = value; + fileDetails.forEach(fileDetail => { + console.log("Record FileDetails FileIds: " + fileDetail.getFileIdS()); + console.log("Record FileDetails FileNameS: " + fileDetail.getFileNameS()); + console.log("Record FileDetails SizeS: " + fileDetail.getSizeS()); + console.log("Record FileDetails Id: " + fileDetail.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Tags.Tag) { + let tags = value; + tags.forEach(tag => { + console.log("RelatedRecord Tag Name: " + tag.getName()); + console.log("RelatedRecord Tag ID: " + tag.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.PricingDetails) { + let pricingDetails = value; + pricingDetails.forEach(pricingDetail => { + console.log("RelatedRecord PricingDetails ToRange: " + pricingDetail.getToRange().toString()); + console.log("RelatedRecord PricingDetails Discount: " + pricingDetail.getDiscount().toString()); + console.log("RelatedRecord PricingDetails ID: " + pricingDetail.getId()); + console.log("RelatedRecord PricingDetails FromRange: " + pricingDetail.getFromRange().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Participants) { + let participants = value; + participants.forEach(participant => { + console.log("Record Participants Name: " + participant.getName()); + console.log("Record Participants Invited: " + participant.getInvited().toString()); + console.log("Record Participants ID: " + participant.getId()); + console.log("Record Participants Type: " + participant.getType()); + console.log("Record Participants Participant: " + participant.getParticipant()); + console.log("Record Participants Status: " + participant.getStatus()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Record) { + let recordArray = value; + recordArray.forEach(record => { + Array.from(record.getKeyValues().keys()).forEach(key => { + console.log(key + ": " + record.getKeyValues().get(key)); + }); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.LineTax) { + let lineTaxes = value; + lineTaxes.forEach(lineTax => { + console.log("RelatedRecord ProductDetails LineTax Percentage: " + lineTax.getPercentage().toString()); + console.log("RelatedRecord ProductDetails LineTax Name: " + lineTax.getName()); + console.log("RelatedRecord ProductDetails LineTax Id: " + lineTax.getId()); + console.log("RelatedRecord ProductDetails LineTax Value: " + lineTax.getValue().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Choice) { + let choiceArray = value; + console.log(keyName); + console.log("Values"); + choiceArray.forEach(eachChoice => { + console.log(eachChoice.getValue()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.LineTax) { + let lineTaxes = value; + lineTaxes.forEach(lineTax => { + console.log("RelatedRecord ProductDetails LineTax Percentage: " + lineTax.getPercentage().toString()); + console.log("RelatedRecord ProductDetails LineTax Name: " + lineTax.getName()); + console.log("RelatedRecord ProductDetails LineTax Id: " + lineTax.getId()); + console.log("RelatedRecord ProductDetails LineTax Value: " + lineTax.getValue().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Reminder) { + let reminders = value; + reminders.forEach(reminder => { + console.log("Reminder Period: " + reminder.getPeriod()); + console.log("Reminder Unit: " + reminder.getUnit()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Comment) { + let comments = value; + comments.forEach(comment => { + console.log("Record Comment CommentedBy: " + comment.getCommentedBy()); + console.log("Record Comment CommentedTime: " + comment.getCommentedTime().toString()); + console.log("Record Comment CommentContent: " + comment.getCommentContent()); + console.log("Record Comment Id: " + comment.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.ImageUpload) + { + let imageUploads = value; + imageUploads.forEach(imageUpload=> { + console.log("Record Description: " + imageUpload.getDescriptionS()); + console.log("Record FileIds: " + imageUpload.getFileIdS()); + console.log("Record FileNameS: " + imageUpload.getFileNameS()); + console.log("Record PreviewIdS: " + imageUpload.getPreviewIdS()); + console.log("Record SizeS: " + imageUpload.getSizeS()); + console.log("Record States: " + imageUpload.getStateS()); + console.log("Record ID: " + imageUpload.getId()); + console.log("Record SequenceNumber: " + imageUpload.getSequenceNumberS()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Attachments.Attachment) + { + let attachments = value; + attachments.forEach(attachment=> + { + let owner = attachment.getOwner(); + if (owner != null) + { + console.log("Record Attachment Owner User-Name: " + owner.getName()); + console.log("Record Attachment Owner User-ID: " + owner.getId()); + console.log("Record Attachment Owner User-Email: " + owner.getEmail()); + } + console.log("Record Attachment Modified Time: " + attachment.getModifiedTime().toString()); + console.log("Record Attachment File Name: " + attachment.getFileName()); + console.log("Record Attachment Created Time: " + attachment.getCreatedTime().toString()); + console.log("Record Attachment File Size: " + attachment.getSize().toString()); + let parentId = attachment.getParentId(); + if (parentId != null) + { + console.log("Record Attachment parent record Name: " + parentId.getName()); + console.log("Record Attachment parent record ID: " + parentId.getId()); + } + console.log("Record Attachment is Editable: " + attachment.getEditable().toString()); + console.log("Record Attachment File ID: " + attachment.getFileId()); + console.log("Record Attachment File Type: " + attachment.getType()); + console.log("Record Attachment seModule: " + attachment.getSeModule()); + let modifiedBy = attachment.getModifiedBy(); + if (modifiedBy != null) + { + console.log("Record Attachment Modified By User-Name: " + modifiedBy.getName()); + console.log("Record Attachment Modified By User-ID: " + modifiedBy.getId()); + console.log("Record Attachment Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("Record Attachment State: " + attachment.getState()); + console.log("Record Attachment ID: " + attachment.getId()); + let createdBy = attachment.getCreatedBy(); + if (createdBy != null) + { + console.log("Record Attachment Created By User-Name: " + createdBy.getName()); + console.log("Record Attachment Created By User-ID: " + createdBy.getId()); + console.log("Record Attachment Created By User-Email: " + createdBy.getEmail()); + } + console.log("Record Attachment LinkUrl: " + attachment.getLinkUrl()); + }); + } + else { + console.log(keyName + ": " + value); + } + } + } + else if (value instanceof ZOHOCRMSDK.Layouts.Layouts) { + console.log(keyName + " ID: " + value.getId()); + console.log(keyName + " Name: " + value.getName()); + } + else if (value instanceof ZOHOCRMSDK.Users.Users) { + console.log("RelatedRecord " + keyName + " User-ID: " + value.getId()); + console.log("RelatedRecord " + keyName + " User-Name: " + value.getName()); + console.log("RelatedRecord " + keyName + " User-Email: " + value.getEmail()); + } + else if (value instanceof ZOHOCRMSDK.Choice) { + console.log(keyName + ": " + value.getValue()); + } + else if (value instanceof ZOHOCRMSDK.Record.RemindAt) { + console.log(keyName + ": " + value.getAlarm()); + } + else if (value instanceof ZOHOCRMSDK.Record.Record) { + console.log(keyName + " Record ID: " + value.getId()); + console.log(keyName + " Record Name: " + value.getKeyValue("name")); + } + else if (value instanceof ZOHOCRMSDK.Record.RecurringActivity) { + console.log(keyName); + console.log("RRULE: " + value.getRrule()); + } + else if (value instanceof ZOHOCRMSDK.Record.Consent) { + console.log("Record Consent ID: " + value.getId()); + let owner = value.getOwner(); + if (owner != null) { + console.log("Record Consent Owner Name: " + owner.getName()); + console.log("Record Consent Owner ID: " + owner.getId()); + console.log("Record Consent Owner Email: " + owner.getEmail()); + } + let consentCreatedBy = value.getCreatedBy(); + if (consentCreatedBy != null) { + console.log("Record Consent CreatedBy Name: " + consentCreatedBy.getName()); + console.log("Record Consent CreatedBy ID: " + consentCreatedBy.getId()); + console.log("Record Consent CreatedBy Email: " + consentCreatedBy.getEmail()); + } + let consentModifiedBy = value.getModifiedBy(); + if (consentModifiedBy != null) { + console.log("Record Consent ModifiedBy Name: " + consentModifiedBy.getName()); + console.log("Record Consent ModifiedBy ID: " + consentModifiedBy.getId()); + console.log("Record Consent ModifiedBy Email: " + consentModifiedBy.getEmail()); + } + console.log("Record Consent CreatedTime: " + value.getCreatedTime()); + console.log("Record Consent ModifiedTime: " + value.getModifiedTime()); + console.log("Record Consent ContactThroughEmail: " + value.getContactThroughEmail()); + console.log("Record Consent ContactThroughSocial: " + value.getContactThroughSocial()); + console.log("Record Consent ContactThroughSurvey: " + value.getContactThroughSurvey()); + console.log("Record Consent ContactThroughPhone: " + value.getContactThroughPhone()); + console.log("Record Consent MailSentTime: " + value.getMailSentTime().toString()); + console.log("Record Consent ConsentDate: " + value.getConsentDate().toString()); + console.log("Record Consent ConsentRemarks: " + value.getConsentRemarks()); + console.log("Record Consent ConsentThrough: " + value.getConsentThrough()); + console.log("Record Consent DataProcessingBasis: " + value.getDataProcessingBasis()); + //To get custom values + console.log("Record Consent Lawful Reason: " + value.getKeyValue("Lawful_Reason")); + } + else if (value instanceof Map) { + console.log(keyName); + Array.from(value.keys()).forEach(key => { + console.log(key + ": " + value.get(key)); + }); + } + else { + console.log(keyName + ": " + value); + } + } + }); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.FileBodyWrapper) { + let streamWrapper = responseObject.getFile(); + //Construct the file name by joining the destinationFolder and the name from StreamWrapper instance + let fileName = path.join(destinationFolder, streamWrapper.getName()); + let readStream = streamWrapper.getStream(); + //Write the stream to the destination file. + fs.writeFileSync(fileName, readStream); + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } +} +await GetRelatedRecord.initialize(); +let moduleAPIName = "leads"; +let recordId = 44024800774074n; +let relatedListAPIName = "notes"; +let relatedListId = 44024801395003n; +let destinationFolder = "users/documnets/file"; +await GetRelatedRecord.getRelatedRecord(moduleAPIName,recordId,relatedListAPIName,relatedListId,destinationFolder); \ No newline at end of file diff --git a/versions/3.0.0/samples/related_records/getRelatedRecordUsingExternalId.js b/versions/3.0.0/samples/related_records/getRelatedRecordUsingExternalId.js new file mode 100644 index 0000000..94d0665 --- /dev/null +++ b/versions/3.0.0/samples/related_records/getRelatedRecordUsingExternalId.js @@ -0,0 +1,272 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +import path from "path"; +import fs from "fs"; +class GetRelatedRecordUsingExternalId{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Related Record Using External Id

+ * This method is used to get the single related list record and print the response. + * @param {String} moduleAPIName The API Name of the module to get related record. + * @param {String} externalValue + * @param {String} relatedListAPIName The API name of the related list. + * @param {String} externalFieldValue + * @param {String} destinationFolder The absolute path of the folder to store the obtained file + */ + static async getRelatedRecordUsingExternalId(moduleAPIName, externalValue, relatedListAPIName, externalFieldValue, destinationFolder) { + //example + // let moduleAPIName = "module_api_name"; + // let externalValue = "798007"; + // let relatedModuleAPIName = "module_api_name"; + // let externalFieldValue = "414001"; + //let destinationFolder = "/Users/user/Desktop" + let xExternal = "Leads.External,Products.Products_External"; + let relatedRecordsOperations = new ZOHOCRMSDK.RecordsRelated.RelatedRecordsOperations(relatedListAPIName, moduleAPIName, xExternal); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + /* Possible parameters for Get Related Record operation */ + await headerInstance.add(ZOHOCRMSDK.RecordsRelated.GetRelatedRecordHeader.IF_MODIFIED_SINCE, new Date('June 15, 2020 05:35:32')); + //Call getRelatedRecord method that takes externalFieldValue, externalValue and headerInstance as parameter + let response = await relatedRecordsOperations.getRelatedRecordUsingExternalId(externalFieldValue, externalValue, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject instanceof ZOHOCRMSDK.RelatedRecords.ResponseWrapper) { + let records = responseObject.getData(); + records.forEach(record => { + console.log("RelatedRecord ID: " + record.getId()); + let createdBy = record.getCreatedBy(); + if (createdBy != null) { + console.log("RelatedRecord Created By User-ID: " + createdBy.getId()); + console.log("RelatedRecord Created By User-Name: " + createdBy.getName()); + console.log("RelatedRecord Created By User-Email: " + createdBy.getEmail()); + } + console.log("RelatedRecord CreatedTime: " + record.getCreatedTime()); + let modifiedBy = record.getModifiedBy(); + if (modifiedBy != null) { + console.log("RelatedRecord Modified By User-ID: " + modifiedBy.getId()); + console.log("RelatedRecord Modified By User-Name: " + modifiedBy.getName()); + console.log("RelatedRecord Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("RelatedRecord ModifiedTime: " + record.getModifiedTime()); + let tags = record.getTag(); + if (tags != null) { + tags.forEach(tag => { + console.log("RelatedRecord Tag Name: " + tag.getName()); + console.log("RelatedRecord Tag ID: " + tag.getId()); + }); + } + //To get particular field value + console.log("RelatedRecord Field Value: " + record.getKeyValue("Last_Name"));// FieldApiName + console.log("RelatedRecord KeyValues: "); + let keyValues = record.getKeyValues(); + let keyArray = Array.from(keyValues.keys()); + keyArray.forEach(keyName => { + let value = keyValues.get(keyName); + if (value != null) { + if (Array.isArray(value)) { + if (value.length > 0) { + if (value[0] instanceof ZOHOCRMSDK.Record.FileDetails) { + let fileDetails = value; + fileDetails.forEach(fileDetail => { + console.log("Record FileDetails FileIds: " + fileDetail.getFileIdS()); + console.log("Record FileDetails FileNameS: " + fileDetail.getFileNameS()); + console.log("Record FileDetails SizeS: " + fileDetail.getSizeS()); + console.log("Record FileDetails Id: " + fileDetail.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Tags.Tag) { + let tags = value; + tags.forEach(tag => { + console.log("RelatedRecord Tag Name: " + tag.getName()); + console.log("RelatedRecord Tag ID: " + tag.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.PricingDetails) { + let pricingDetails = value; + pricingDetails.forEach(pricingDetail => { + console.log("RelatedRecord PricingDetails ToRange: " + pricingDetail.getToRange().toString()); + console.log("RelatedRecord PricingDetails Discount: " + pricingDetail.getDiscount().toString()); + console.log("RelatedRecord PricingDetails ID: " + pricingDetail.getId()); + console.log("RelatedRecord PricingDetails FromRange: " + pricingDetail.getFromRange().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Participants) { + let participants = value; + participants.forEach(participant => { + console.log("Record Participants Name: " + participant.getName()); + console.log("Record Participants Invited: " + participant.getInvited().toString()); + console.log("Record Participants ID: " + participant.getId()); + console.log("Record Participants Type: " + participant.getType()); + console.log("Record Participants Participant: " + participant.getParticipant()); + console.log("Record Participants Status: " + participant.getStatus()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Record) { + let recordArray = value; + recordArray.forEach(record => { + Array.from(record.getKeyValues().keys()).forEach(key => { + console.log(key + ": " + record.getKeyValues().get(key)); + }); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.LineTax) { + let lineTaxes = value; + lineTaxes.forEach(lineTax => { + console.log("RelatedRecord ProductDetails LineTax Percentage: " + lineTax.getPercentage().toString()); + console.log("RelatedRecord ProductDetails LineTax Name: " + lineTax.getName()); + console.log("RelatedRecord ProductDetails LineTax Id: " + lineTax.getId()); + console.log("RelatedRecord ProductDetails LineTax Value: " + lineTax.getValue().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Choice) { + let choiceArray = value; + console.log(keyName); + console.log("Values"); + choiceArray.forEach(eachChoice => { + console.log(eachChoice.getValue()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.LineTax) { + let lineTaxes = value; + lineTaxes.forEach(lineTax => { + console.log("RelatedRecord ProductDetails LineTax Percentage: " + lineTax.getPercentage().toString()); + console.log("RelatedRecord ProductDetails LineTax Name: " + lineTax.getName()); + console.log("RelatedRecord ProductDetails LineTax Id: " + lineTax.getId()); + console.log("RelatedRecord ProductDetails LineTax Value: " + lineTax.getValue().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Reminder) { + let reminders = value; + reminders.forEach(reminder => { + console.log("Reminder Period: " + reminder.getPeriod()); + console.log("Reminder Unit: " + reminder.getUnit()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Comment) { + let comments = value; + comments.forEach(comment => { + console.log("Record Comment CommentedBy: " + comment.getCommentedBy()); + console.log("Record Comment CommentedTime: " + comment.getCommentedTime().toString()); + console.log("Record Comment CommentContent: " + comment.getCommentContent()); + console.log("Record Comment Id: " + comment.getId()); + }); + } + else { + console.log(keyName + ": " + value); + } + } + } + else if (value instanceof ZOHOCRMSDK.Layouts.Layouts) { + console.log(keyName + " ID: " + value.getId()); + console.log(keyName + " Name: " + value.getName()); + } + else if (value instanceof ZOHOCRMSDK.Users.Users) { + console.log("RelatedRecord " + keyName + " User-ID: " + value.getId()); + console.log("RelatedRecord " + keyName + " User-Name: " + value.getName()); + console.log("RelatedRecord " + keyName + " User-Email: " + value.getEmail()); + } + else if (value instanceof ZOHOCRMSDK.Choice) { + console.log(keyName + ": " + value.getValue()); + } + else if (value instanceof ZOHOCRMSDK.Record.RemindAt) { + console.log(keyName + ": " + value.getAlarm()); + } + else if (value instanceof ZOHOCRMSDK.Record.Record) { + console.log(keyName + " Record ID: " + value.getId()); + console.log(keyName + " Record Name: " + value.getKeyValue("name")); + } + else if (value instanceof ZOHOCRMSDK.Record.RecurringActivity) { + console.log(keyName); + console.log("RRULE: " + value.getRrule()); + } + else if (value instanceof ZOHOCRMSDK.Record.Consent) { + console.log("Record Consent ID: " + value.getId()); + let owner = value.getOwner(); + if (owner != null) { + console.log("Record Consent Owner Name: " + owner.getName()); + console.log("Record Consent Owner ID: " + owner.getId()); + console.log("Record Consent Owner Email: " + owner.getEmail()); + } + let consentCreatedBy = value.getCreatedBy(); + if (consentCreatedBy != null) { + console.log("Record Consent CreatedBy Name: " + consentCreatedBy.getName()); + console.log("Record Consent CreatedBy ID: " + consentCreatedBy.getId()); + console.log("Record Consent CreatedBy Email: " + consentCreatedBy.getEmail()); + } + let consentModifiedBy = value.getModifiedBy(); + if (consentModifiedBy != null) { + console.log("Record Consent ModifiedBy Name: " + consentModifiedBy.getName()); + console.log("Record Consent ModifiedBy ID: " + consentModifiedBy.getId()); + console.log("Record Consent ModifiedBy Email: " + consentModifiedBy.getEmail()); + } + console.log("Record Consent CreatedTime: " + value.getCreatedTime()); + console.log("Record Consent ModifiedTime: " + value.getModifiedTime()); + console.log("Record Consent ContactThroughEmail: " + value.getContactThroughEmail()); + console.log("Record Consent ContactThroughSocial: " + value.getContactThroughSocial()); + console.log("Record Consent ContactThroughSurvey: " + value.getContactThroughSurvey()); + console.log("Record Consent ContactThroughPhone: " + value.getContactThroughPhone()); + console.log("Record Consent MailSentTime: " + value.getMailSentTime().toString()); + console.log("Record Consent ConsentDate: " + value.getConsentDate().toString()); + console.log("Record Consent ConsentRemarks: " + value.getConsentRemarks()); + console.log("Record Consent ConsentThrough: " + value.getConsentThrough()); + console.log("Record Consent DataProcessingBasis: " + value.getDataProcessingBasis()); + //To get custom values + console.log("Record Consent Lawful Reason: " + value.getKeyValue("Lawful_Reason")); + } + else if (value instanceof Map) { + console.log(keyName); + Array.from(value.keys()).forEach(key => { + console.log(key + ": " + value.get(key)); + }); + } + else { + console.log(keyName + ": " + value); + } + } + }); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.FileBodyWrapper) { + let streamWrapper = responseObject.getFile(); + //Construct the file name by joining the destinationFolder and the name from StreamWrapper instance + let fileName = path.join(destinationFolder, streamWrapper.getName()); + let readStream = streamWrapper.getStream(); + //Write the stream to the destination file. + fs.writeFileSync(fileName, readStream); + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } +} +await GetRelatedRecordUsingExternalId.initialize(); +let moduleAPIName ="leads"; +let externalValue = "12321"; +let relatedListAPIName = "notes"; +let externalFieldValue = "23213"; +let destinationFolder = "users/documents/file"; +await GetRelatedRecordUsingExternalId.getRelatedRecordUsingExternalId(moduleAPIName,externalValue,relatedListAPIName,externalFieldValue,destinationFolder); \ No newline at end of file diff --git a/versions/3.0.0/samples/related_records/getRelatedRecords.js b/versions/3.0.0/samples/related_records/getRelatedRecords.js new file mode 100644 index 0000000..48d275b --- /dev/null +++ b/versions/3.0.0/samples/related_records/getRelatedRecords.js @@ -0,0 +1,334 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetRelatedRecords{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Related Records

+ * This method is used to get the related list records and print the response. + * @param {String} moduleAPIName The API Name of the module to get related records. + * @param {BigInt} recordId The ID of the record to be obtained. + * @param {String} relatedListAPIName The API name of the related list + */ + static async getRelatedRecords(moduleAPIName, recordId, relatedListAPIName) { + //example + //let moduleAPIName = "module_api_name"; + // let recordId = 798007n; + // let relatedListAPIName = "module_api_name"; + let relatedRecordsOperations = new ZOHOCRMSDK.RecordsRelated.RelatedRecordsOperations(relatedListAPIName, moduleAPIName, null); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters for Get Related Records operation */ + await paramInstance.add(ZOHOCRMSDK.RecordsRelated.GetRelatedRecordsParam.PAGE, 1); + await paramInstance.add(ZOHOCRMSDK.RecordsRelated.GetRelatedRecordsParam.PER_PAGE, 200); + await paramInstance.add(ZOHOCRMSDK.RecordsRelated.GetRelatedRecordsParam.FIELDS, "id"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + /* Possible headers for Get Related Records operation */ + await headerInstance.add(ZOHOCRMSDK.RecordsRelated.GetRelatedRecordsHeader.IF_MODIFIED_SINCE, new Date('October 15, 2019 05:35:32')); + //Call getRelatedRecords method that takes ParameterMap instance and HeaderMap instance as parameter + let response = await relatedRecordsOperations.getRelatedRecords(recordId, paramInstance, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.ResponseWrapper) { + let records = responseObject.getData(); + records.forEach(record => { + console.log("RelatedRecord ID: " + record.getId()); + let createdBy = record.getCreatedBy(); + if (createdBy != null) { + console.log("RelatedRecord Created By User-ID: " + createdBy.getId()); + console.log("RelatedRecord Created By User-Name: " + createdBy.getName()); + console.log("RelatedRecord Created By User-Email: " + createdBy.getEmail()); + } + console.log("RelatedRecord CreatedTime: " + record.getCreatedTime()); + let modifiedBy = record.getModifiedBy(); + if (modifiedBy != null) { + console.log("RelatedRecord Modified By User-ID: " + modifiedBy.getId()); + console.log("RelatedRecord Modified By User-Name: " + modifiedBy.getName()); + console.log("RelatedRecord Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("RelatedRecord ModifiedTime: " + record.getModifiedTime()); + let tags = record.getTag(); + if (tags != null) { + tags.forEach(tag => { + console.log("RelatedRecord Tag Name: " + tag.getName()); + console.log("RelatedRecord Tag ID: " + tag.getId()); + }); + } + //To get particular field value + console.log("RelatedRecord Field Value: " + record.getKeyValue("Last_Name"));// FieldApiName + console.log("RelatedRecord KeyValues: "); + let keyValues = record.getKeyValues(); + let keyArray = Array.from(keyValues.keys()); + keyArray.forEach(keyName => { + let value = keyValues.get(keyName); + if (value != null) { + if (Array.isArray(value)) { + if (value.length > 0) { + if (value[0] instanceof ZOHOCRMSDK.Record.FileDetails) { + let fileDetails = value; + fileDetails.forEach(fileDetail => { + console.log("Record FileDetails FileIds: " + fileDetail.getFileIdS()); + console.log("Record FileDetails FileNameS: " + fileDetail.getFileNameS()); + console.log("Record FileDetails SizeS: " + fileDetail.getSizeS()); + console.log("Record FileDetails Id: " + fileDetail.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Tags.Tag) { + let tags = value; + tags.forEach(tag => { + console.log("RelatedRecord Tag Name: " + tag.getName()); + console.log("RelatedRecord Tag ID: " + tag.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.PricingDetails) { + let pricingDetails = value; + pricingDetails.forEach(pricingDetail => { + console.log("RelatedRecord PricingDetails ToRange: " + pricingDetail.getToRange().toString()); + console.log("RelatedRecord PricingDetails Discount: " + pricingDetail.getDiscount().toString()); + console.log("RelatedRecord PricingDetails ID: " + pricingDetail.getId()); + console.log("RelatedRecord PricingDetails FromRange: " + pricingDetail.getFromRange().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Participants) { + let participants = value; + participants.forEach(participant => { + console.log("Record Participants Name: " + participant.getName()); + console.log("Record Participants Invited: " + participant.getInvited().toString()); + console.log("Record Participants ID: " + participant.getId()); + console.log("Record Participants Type: " + participant.getType()); + console.log("Record Participants Participant: " + participant.getParticipant()); + console.log("Record Participants Status: " + participant.getStatus()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Record) { + let recordArray = value; + recordArray.forEach(record => { + Array.from(record.getKeyValues().keys()).forEach(key => { + console.log(key + ": " + record.getKeyValues().get(key)); + }); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.LineTax) { + let lineTaxes = value; + lineTaxes.forEach(lineTax => { + console.log("RelatedRecord ProductDetails LineTax Percentage: " + lineTax.getPercentage().toString()); + console.log("RelatedRecord ProductDetails LineTax Name: " + lineTax.getName()); + console.log("RelatedRecord ProductDetails LineTax Id: " + lineTax.getId()); + console.log("RelatedRecord ProductDetails LineTax Value: " + lineTax.getValue().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Choice) { + let choiceArray = value; + console.log(keyName); + console.log("Values"); + choiceArray.forEach(eachChoice => { + console.log(eachChoice.getValue()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.LineTax) { + let lineTaxes = value; + lineTaxes.forEach(lineTax => { + console.log("RelatedRecord ProductDetails LineTax Percentage: " + lineTax.getPercentage().toString()); + console.log("RelatedRecord ProductDetails LineTax Name: " + lineTax.getName()); + console.log("RelatedRecord ProductDetails LineTax Id: " + lineTax.getId()); + console.log("RelatedRecord ProductDetails LineTax Value: " + lineTax.getValue().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Reminder) { + let reminders = value; + reminders.forEach(reminder => { + console.log("Reminder Period: " + reminder.getPeriod()); + console.log("Reminder Unit: " + reminder.getUnit()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Comment) { + let comments = value; + comments.forEach(comment => { + console.log("Record Comment CommentedBy: " + comment.getCommentedBy()); + console.log("Record Comment CommentedTime: " + comment.getCommentedTime().toString()); + console.log("Record Comment CommentContent: " + comment.getCommentContent()); + console.log("Record Comment Id: " + comment.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.ImageUpload) + { + let imageUploads = value; + imageUploads.forEach(imageUpload=> { + console.log("Record Description: " + imageUpload.getDescriptionS()); + console.log("Record FileIds: " + imageUpload.getFileIdS()); + console.log("Record FileNameS: " + imageUpload.getFileNameS()); + console.log("Record PreviewIdS: " + imageUpload.getPreviewIdS()); + console.log("Record SizeS: " + imageUpload.getSizeS()); + console.log("Record States: " + imageUpload.getStateS()); + console.log("Record ID: " + imageUpload.getId()); + console.log("Record SequenceNumber: " + imageUpload.getSequenceNumberS()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Attachments.Attachment) + { + let attachments = value; + attachments.forEach(attachment=> + { + let owner = attachment.getOwner(); + if (owner != null) + { + console.log("Record Attachment Owner User-Name: " + owner.getName()); + console.log("Record Attachment Owner User-ID: " + owner.getId()); + console.log("Record Attachment Owner User-Email: " + owner.getEmail()); + } + console.log("Record Attachment Modified Time: " + attachment.getModifiedTime().toString()); + console.log("Record Attachment File Name: " + attachment.getFileName()); + console.log("Record Attachment Created Time: " + attachment.getCreatedTime().toString()); + console.log("Record Attachment File Size: " + attachment.getSize().toString()); + let parentId = attachment.getParentId(); + if (parentId != null) + { + console.log("Record Attachment parent record Name: " + parentId.getName()); + console.log("Record Attachment parent record ID: " + parentId.getId()); + } + console.log("Record Attachment is Editable: " + attachment.getEditable().toString()); + console.log("Record Attachment File ID: " + attachment.getFileId()); + console.log("Record Attachment File Type: " + attachment.getType()); + console.log("Record Attachment seModule: " + attachment.getSeModule()); + let modifiedBy = attachment.getModifiedBy(); + if (modifiedBy != null) + { + console.log("Record Attachment Modified By User-Name: " + modifiedBy.getName()); + console.log("Record Attachment Modified By User-ID: " + modifiedBy.getId()); + console.log("Record Attachment Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("Record Attachment State: " + attachment.getState()); + console.log("Record Attachment ID: " + attachment.getId()); + let createdBy = attachment.getCreatedBy(); + if (createdBy != null) + { + console.log("Record Attachment Created By User-Name: " + createdBy.getName()); + console.log("Record Attachment Created By User-ID: " + createdBy.getId()); + console.log("Record Attachment Created By User-Email: " + createdBy.getEmail()); + } + console.log("Record Attachment LinkUrl: " + attachment.getLinkUrl()); + }); + } + else { + console.log(keyName + ": " + value); + } + } + } + else if (value instanceof ZOHOCRMSDK.Layouts.Layouts) { + console.log(keyName + " ID: " + value.getId()); + console.log(keyName + " Name: " + value.getName()); + } + else if (value instanceof ZOHOCRMSDK.Users.Users) { + console.log("RelatedRecord " + keyName + " User-ID: " + value.getId()); + console.log("RelatedRecord " + keyName + " User-Name: " + value.getName()); + console.log("RelatedRecord " + keyName + " User-Email: " + value.getEmail()); + } + else if (value instanceof ZOHOCRMSDK.Choice) { + console.log(keyName + ": " + value.getValue()); + } + else if (value instanceof ZOHOCRMSDK.Record.RemindAt) { + console.log(keyName + ": " + value.getAlarm()); + } + else if (value instanceof ZOHOCRMSDK.Record.Record) { + console.log(keyName + " Record ID: " + value.getId()); + console.log(keyName + " Record Name: " + value.getKeyValue("name")); + } + else if (value instanceof ZOHOCRMSDK.Record.RecurringActivity) { + console.log(keyName); + console.log("RRULE: " + value.getRrule()); + } + else if (value instanceof ZOHOCRMSDK.Record.Consent) { + console.log("Record Consent ID: " + value.getId()); + let owner = value.getOwner(); + if (owner != null) { + console.log("Record Consent Owner Name: " + owner.getName()); + console.log("Record Consent Owner ID: " + owner.getId()); + console.log("Record Consent Owner Email: " + owner.getEmail()); + } + let consentCreatedBy = value.getCreatedBy(); + if (consentCreatedBy != null) { + console.log("Record Consent CreatedBy Name: " + consentCreatedBy.getName()); + console.log("Record Consent CreatedBy ID: " + consentCreatedBy.getId()); + console.log("Record Consent CreatedBy Email: " + consentCreatedBy.getEmail()); + } + let consentModifiedBy = value.getModifiedBy(); + if (consentModifiedBy != null) { + console.log("Record Consent ModifiedBy Name: " + consentModifiedBy.getName()); + console.log("Record Consent ModifiedBy ID: " + consentModifiedBy.getId()); + console.log("Record Consent ModifiedBy Email: " + consentModifiedBy.getEmail()); + } + console.log("Record Consent CreatedTime: " + value.getCreatedTime()); + console.log("Record Consent ModifiedTime: " + value.getModifiedTime()); + console.log("Record Consent ContactThroughEmail: " + value.getContactThroughEmail()); + console.log("Record Consent ContactThroughSocial: " + value.getContactThroughSocial()); + console.log("Record Consent ContactThroughSurvey: " + value.getContactThroughSurvey()); + console.log("Record Consent ContactThroughPhone: " + value.getContactThroughPhone()); + console.log("Record Consent MailSentTime: " + value.getMailSentTime().toString()); + console.log("Record Consent ConsentDate: " + value.getConsentDate().toString()); + console.log("Record Consent ConsentRemarks: " + value.getConsentRemarks()); + console.log("Record Consent ConsentThrough: " + value.getConsentThrough()); + console.log("Record Consent DataProcessingBasis: " + value.getDataProcessingBasis()); + //To get custom values + console.log("Record Consent Lawful Reason: " + value.getKeyValue("Lawful_Reason")); + } + else if (value instanceof Map) { + console.log(keyName); + Array.from(value.keys()).forEach(key => { + console.log(key + ": " + value.get(key)); + }); + } + else { + console.log(keyName + ": " + value); + } + } + }); + }); + let info = responseObject.getInfo(); + if (info != null) { + if (info.getPerPage() != null) { + console.log("RelatedRecord Info PerPage: " + info.getPerPage().toString()); + } + if (info.getCount() != null) { + console.log("RelatedRecord Info Count: " + info.getCount().toString()); + } + if (info.getPage() != null) { + console.log("RelatedRecord Info Page: " + info.getPage().toString()); + } + if (info.getMoreRecords() != null) { + console.log("RelatedRecord Info MoreRecords: " + info.getMoreRecords().toString()); + } + } + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } +} +await GetRelatedRecords.initialize(); +let moduleAPIName = "leads"; +let recordId = 4402480074074n; +let relatedListAPIName = "notes"; +await GetRelatedRecords.getRelatedRecords(moduleAPIName,recordId,relatedListAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/related_records/getRelatedRecordsUsingExternalId.js b/versions/3.0.0/samples/related_records/getRelatedRecordsUsingExternalId.js new file mode 100644 index 0000000..4870955 --- /dev/null +++ b/versions/3.0.0/samples/related_records/getRelatedRecordsUsingExternalId.js @@ -0,0 +1,276 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetRelatedRecordsUsingExternalId{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Related Records Using External Id

+ * This method is used to get the related list records and print the response. + * @param {String} moduleAPIName The API Name of the module to get related records. + * @param {String} externalValue + * @param {String} relatedListAPIName The API name of the related list + */ + static async getRelatedRecordsUsingExternalId(moduleAPIName, externalValue, relatedListAPIName) { + //example + //let moduleAPIName = "module_api_name"; + // let recordId = 798007n; + // let relatedListAPIName = "module_api_name"; + let xExternal = "Leads.External"; + let relatedRecordsOperations = new ZOHOCRMSDK.RecordsRelated.RelatedRecordsOperations(relatedListAPIName, moduleAPIName, xExternal); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters for Get Related Records operation */ + await paramInstance.add(ZOHOCRMSDK.RecordsRelated.GetRelatedRecordsParam.PAGE, 1); + await paramInstance.add(ZOHOCRMSDK.RecordsRelated.GetRelatedRecordsParam.PER_PAGE, 200); + await paramInstance.add(ZOHOCRMSDK.RecordsRelated.GetRelatedRecordsParam.FIELDS, "id"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + /* Possible headers for Get Related Records operation */ + await headerInstance.add(ZOHOCRMSDK.RecordsRelated.GetRelatedRecordsHeader.IF_MODIFIED_SINCE, new Date('October 15, 2019 05:35:32')); + // Call getRelatedRecordsUsingExternalId method that takes externalValue, ParameterMap instance and HeaderMap instance as parameter + let response = await relatedRecordsOperations.getRelatedRecordsUsingExternalId(externalValue, paramInstance, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.ResponseWrapper) { + let records = responseObject.getData(); + records.forEach(record => { + console.log("RelatedRecord ID: " + record.getId()); + let createdBy = record.getCreatedBy(); + if (createdBy != null) { + console.log("RelatedRecord Created By User-ID: " + createdBy.getId()); + console.log("RelatedRecord Created By User-Name: " + createdBy.getName()); + console.log("RelatedRecord Created By User-Email: " + createdBy.getEmail()); + } + console.log("RelatedRecord CreatedTime: " + record.getCreatedTime()); + let modifiedBy = record.getModifiedBy(); + if (modifiedBy != null) { + console.log("RelatedRecord Modified By User-ID: " + modifiedBy.getId()); + console.log("RelatedRecord Modified By User-Name: " + modifiedBy.getName()); + console.log("RelatedRecord Modified By User-Email: " + modifiedBy.getEmail()); + } + console.log("RelatedRecord ModifiedTime: " + record.getModifiedTime()); + let tags = record.getTag(); + if (tags != null) { + tags.forEach(tag => { + console.log("RelatedRecord Tag Name: " + tag.getName()); + console.log("RelatedRecord Tag ID: " + tag.getId()); + }); + } + //To get particular field value + console.log("RelatedRecord Field Value: " + record.getKeyValue("Last_Name"));// FieldApiName + console.log("RelatedRecord KeyValues: "); + let keyValues = record.getKeyValues(); + let keyArray = Array.from(keyValues.keys()); + keyArray.forEach(keyName => { + let value = keyValues.get(keyName); + if (value != null) { + if (Array.isArray(value)) { + if (value.length > 0) { + if (value[0] instanceof ZOHOCRMSDK.Record.FileDetails) { + let fileDetails = value; + fileDetails.forEach(fileDetail => { + console.log("Record FileDetails FileIds: " + fileDetail.getFileIdS()); + console.log("Record FileDetails FileNameS: " + fileDetail.getFileNameS()); + console.log("Record FileDetails SizeS: " + fileDetail.getSizeS()); + console.log("Record FileDetails Id: " + fileDetail.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Tags.Tag) { + let tags = value; + tags.forEach(tag => { + console.log("RelatedRecord Tag Name: " + tag.getName()); + console.log("RelatedRecord Tag ID: " + tag.getId()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.PricingDetails) { + let pricingDetails = value; + pricingDetails.forEach(pricingDetail => { + console.log("RelatedRecord PricingDetails ToRange: " + pricingDetail.getToRange().toString()); + console.log("RelatedRecord PricingDetails Discount: " + pricingDetail.getDiscount().toString()); + console.log("RelatedRecord PricingDetails ID: " + pricingDetail.getId()); + console.log("RelatedRecord PricingDetails FromRange: " + pricingDetail.getFromRange().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Participants) { + let participants = value; + participants.forEach(participant => { + console.log("Record Participants Name: " + participant.getName()); + console.log("Record Participants Invited: " + participant.getInvited().toString()); + console.log("Record Participants ID: " + participant.getId()); + console.log("Record Participants Type: " + participant.getType()); + console.log("Record Participants Participant: " + participant.getParticipant()); + console.log("Record Participants Status: " + participant.getStatus()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Record) { + let recordArray = value; + recordArray.forEach(record => { + Array.from(record.getKeyValues().keys()).forEach(key => { + console.log(key + ": " + record.getKeyValues().get(key)); + }); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.LineTax) { + let lineTaxes = value; + lineTaxes.forEach(lineTax => { + console.log("RelatedRecord ProductDetails LineTax Percentage: " + lineTax.getPercentage().toString()); + console.log("RelatedRecord ProductDetails LineTax Name: " + lineTax.getName()); + console.log("RelatedRecord ProductDetails LineTax Id: " + lineTax.getId()); + console.log("RelatedRecord ProductDetails LineTax Value: " + lineTax.getValue().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Choice) { + let choiceArray = value; + console.log(keyName); + console.log("Values"); + choiceArray.forEach(eachChoice => { + console.log(eachChoice.getValue()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.LineTax) { + let lineTaxes = value; + lineTaxes.forEach(lineTax => { + console.log("RelatedRecord ProductDetails LineTax Percentage: " + lineTax.getPercentage().toString()); + console.log("RelatedRecord ProductDetails LineTax Name: " + lineTax.getName()); + console.log("RelatedRecord ProductDetails LineTax Id: " + lineTax.getId()); + console.log("RelatedRecord ProductDetails LineTax Value: " + lineTax.getValue().toString()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Reminder) { + let reminders = value; + reminders.forEach(reminder => { + console.log("Reminder Period: " + reminder.getPeriod()); + console.log("Reminder Unit: " + reminder.getUnit()); + }); + } + else if (value[0] instanceof ZOHOCRMSDK.Record.Comment) { + let comments = value; + comments.forEach(comment => { + console.log("Record Comment CommentedBy: " + comment.getCommentedBy()); + console.log("Record Comment CommentedTime: " + comment.getCommentedTime().toString()); + console.log("Record Comment CommentContent: " + comment.getCommentContent()); + console.log("Record Comment Id: " + comment.getId()); + }); + } + else { + console.log(keyName + ": " + value); + } + } + } + else if (value instanceof ZOHOCRMSDK.Layouts.Layouts) { + console.log(keyName + " ID: " + value.getId()); + console.log(keyName + " Name: " + value.getName()); + } + else if (value instanceof ZOHOCRMSDK.Users.Users) { + console.log("RelatedRecord " + keyName + " User-ID: " + value.getId()); + console.log("RelatedRecord " + keyName + " User-Name: " + value.getName()); + console.log("RelatedRecord " + keyName + " User-Email: " + value.getEmail()); + } + else if (value instanceof ZOHOCRMSDK.Choice) { + console.log(keyName + ": " + value.getValue()); + } + else if (value instanceof ZOHOCRMSDK.Record.RemindAt) { + console.log(keyName + ": " + value.getAlarm()); + } + else if (value instanceof ZOHOCRMSDK.Record.Record) { + console.log(keyName + " Record ID: " + value.getId()); + console.log(keyName + " Record Name: " + value.getKeyValue("name")); + } + else if (value instanceof ZOHOCRMSDK.Record.RecurringActivity) { + console.log(keyName); + console.log("RRULE: " + value.getRrule()); + } + else if (value instanceof ZOHOCRMSDK.Record.Consent) { + console.log("Record Consent ID: " + value.getId()); + let owner = value.getOwner(); + if (owner != null) { + console.log("Record Consent Owner Name: " + owner.getName()); + console.log("Record Consent Owner ID: " + owner.getId()); + console.log("Record Consent Owner Email: " + owner.getEmail()); + } + let consentCreatedBy = value.getCreatedBy(); + if (consentCreatedBy != null) { + console.log("Record Consent CreatedBy Name: " + consentCreatedBy.getName()); + console.log("Record Consent CreatedBy ID: " + consentCreatedBy.getId()); + console.log("Record Consent CreatedBy Email: " + consentCreatedBy.getEmail()); + } + let consentModifiedBy = value.getModifiedBy(); + if (consentModifiedBy != null) { + console.log("Record Consent ModifiedBy Name: " + consentModifiedBy.getName()); + console.log("Record Consent ModifiedBy ID: " + consentModifiedBy.getId()); + console.log("Record Consent ModifiedBy Email: " + consentModifiedBy.getEmail()); + } + console.log("Record Consent CreatedTime: " + value.getCreatedTime()); + console.log("Record Consent ModifiedTime: " + value.getModifiedTime()); + console.log("Record Consent ContactThroughEmail: " + value.getContactThroughEmail()); + console.log("Record Consent ContactThroughSocial: " + value.getContactThroughSocial()); + console.log("Record Consent ContactThroughSurvey: " + value.getContactThroughSurvey()); + console.log("Record Consent ContactThroughPhone: " + value.getContactThroughPhone()); + console.log("Record Consent MailSentTime: " + value.getMailSentTime().toString()); + console.log("Record Consent ConsentDate: " + value.getConsentDate().toString()); + console.log("Record Consent ConsentRemarks: " + value.getConsentRemarks()); + console.log("Record Consent ConsentThrough: " + value.getConsentThrough()); + console.log("Record Consent DataProcessingBasis: " + value.getDataProcessingBasis()); + //To get custom values + console.log("Record Consent Lawful Reason: " + value.getKeyValue("Lawful_Reason")); + } + else if (value instanceof Map) { + console.log(keyName); + Array.from(value.keys()).forEach(key => { + console.log(key + ": " + value.get(key)); + }); + } + else { + console.log(keyName + ": " + value); + } + } + }); + }); + let info = responseObject.getInfo(); + if (info != null) { + if (info.getPerPage() != null) { + console.log("RelatedRecord Info PerPage: " + info.getPerPage().toString()); + } + if (info.getCount() != null) { + console.log("RelatedRecord Info Count: " + info.getCount().toString()); + } + if (info.getPage() != null) { + console.log("RelatedRecord Info Page: " + info.getPage().toString()); + } + if (info.getMoreRecords() != null) { + console.log("RelatedRecord Info MoreRecords: " + info.getMoreRecords().toString()); + } + } + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } +} +await GetRelatedRecordsUsingExternalId.initialize(); +let moduleAPIName = "leads"; +let externalValue = "external"; +let relatedListAPIName ="notes"; +await GetRelatedRecordsUsingExternalId.getRelatedRecordsUsingExternalId(moduleAPIName,externalValue,relatedListAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/related_records/updateRelatedRecord.js b/versions/3.0.0/samples/related_records/updateRelatedRecord.js new file mode 100644 index 0000000..5d8dad1 --- /dev/null +++ b/versions/3.0.0/samples/related_records/updateRelatedRecord.js @@ -0,0 +1,99 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateRelatedRecord{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Related Record

+ * This method is used to update the relation between the records and print the response. + * @param {String} moduleAPIName The API Name of the module to get related record. + * @param {BigInt} recordId The ID of the record to be get Related List. + * @param {String} relatedListAPIName The API name of the related list. + * @param {BigInt} relatedListId The ID of the related record. + */ + static async updateRelatedRecord(moduleAPIName, recordId, relatedListAPIName, relatedListId) { + //example + // let moduleAPIName = "module_api_name"; + // let recordId = 30798007n; + // let relatedModuleAPIName = "module_api_name"; + // let relatedId = 314001n; + let relatedRecordsOperations = new ZOHOCRMSDK.RecordsRelated.RelatedRecordsOperations(relatedListAPIName, moduleAPIName); + let request = new ZOHOCRMSDK.RecordsRelated.BodyWrapper(); + //Array to hold Record instances + let recordsArray = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + /* + * Call addKeyValue method that takes two arguments + * 1 -> A string that is the Field's API Name + * 2 -> Value + */ + // record1.addKeyValue("Note_Content", "noted"); + //Add the record to array + recordsArray.push(record1); + request.setData(recordsArray); + //Call updateRelatedRecord method that takes relatedRecordId, recordId and BodyWrapper instance as parameter. + let response = await relatedRecordsOperations.updateRelatedRecord(relatedListId, recordId, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.RecordsRelated.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateRelatedRecord.initialize(); +let moduleAPIName = "leads"; +let recordId = 440248074074n; +let relatedListAPIName = "notes"; +let relatedListId =4402481395003n; +await UpdateRelatedRecord.updateRelatedRecord(moduleAPIName,recordId,relatedListAPIName,relatedListId); \ No newline at end of file diff --git a/versions/3.0.0/samples/related_records/updateRelatedRecordUsingExternalId.js b/versions/3.0.0/samples/related_records/updateRelatedRecordUsingExternalId.js new file mode 100644 index 0000000..32a915d --- /dev/null +++ b/versions/3.0.0/samples/related_records/updateRelatedRecordUsingExternalId.js @@ -0,0 +1,100 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateRelatedRecordUsingExternalId{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Related Record Using External Id

+ * This method is used to update the relation between the records and print the response. + * @param {String} moduleAPIName The API Name of the module to get related record. + * @param {String} externalValue + * @param {String} relatedListAPIName The API name of the related list. + * @param {String} externalFieldValue + */ + static async updateRelatedRecordUsingExternalId(moduleAPIName, externalValue, relatedListAPIName, externalFieldValue) { + //example + // let moduleAPIName = "module_api_name"; + // let externalValue = "30798007"; + // let relatedModuleAPIName = "module_api_name"; + // let externalFieldValue = "314001"; + let xExternal = "Leads.External,Products.Products_External"; + let relatedRecordsOperations = new ZOHOCRMSDK.RecordsRelated.RelatedRecordsOperations(relatedListAPIName, moduleAPIName, xExternal); + let request = new ZOHOCRMSDK.RecordsRelated.BodyWrapper(); + //Array to hold Record instances + let recordsArray = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + /* + * Call addKeyValue method that takes two arguments + * 1 -> A string that is the Field's API Name + * 2 -> Value + */ + record1.addKeyValue("list_price", 50.56); + //Add the record to array + recordsArray.push(record1); + request.setData(recordsArray); + //Call updateRelatedRecord method that takes relatedRecordId, recordId and BodyWrapper instance as parameter. + let response = await relatedRecordsOperations.updateRelatedRecordUsingExternalId(externalFieldValue, externalValue, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.RecordsRelated.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateRelatedRecordUsingExternalId.initialize(); +let moduleAPIName = "leads"; +let externalValue = "external"; +let relatedListAPIName = "notes"; +let externalFieldValue = "332421"; +await UpdateRelatedRecordUsingExternalId.updateRelatedRecordUsingExternalId(moduleAPIName,externalValue,relatedListAPIName,externalFieldValue); \ No newline at end of file diff --git a/versions/3.0.0/samples/related_records/updateRelatedRecords.js b/versions/3.0.0/samples/related_records/updateRelatedRecords.js new file mode 100644 index 0000000..e812e58 --- /dev/null +++ b/versions/3.0.0/samples/related_records/updateRelatedRecords.js @@ -0,0 +1,113 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateRelatedRecords{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Related Record

+ * This method is used to update the relation between the records and print the response. + * @param {String} moduleAPIName The API Name of the module to update related record. + * @param {BigInt} recordId The ID of the record to be update Related List. + * @param {String} relatedListAPIName The API name of the related list. + */ + static async updateRelatedRecords(moduleAPIName, recordId, relatedListAPIName) { + //example + //let moduleAPIName = "module_api_name"; + // let recordId = 007n; + // let relatedModuleAPIName = "module_api_name"; + let relatedRecordsOperations = new ZOHOCRMSDK.RecordsRelated.RelatedRecordsOperations(relatedListAPIName, moduleAPIName, null); + let request = new ZOHOCRMSDK.RecordsRelated.BodyWrapper(); + //Array to hold Record instances + let recordsArray = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + /* + * Call addKeyValue method that takes two arguments + * 1 -> A string that is the Field's API Name + * 2 -> Value + */ + // record1.addKeyValue("id", 34770614994113n); + // + // record1.addKeyValue("list_price", 50.56); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Notes.ID, 44024800984009n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Notes.NOTE_CONTENT, "updated"); + //Add Record instance to the array + recordsArray.push(record1); + // let record2 = new ZOHOCRMSDK.Record.Record(); + // + // /* + // * Call addKeyValue method that takes two arguments + // * 1 -> A string that is the Field's API Name + // * 2 -> Value + // */ + // record2.addKeyValue("id", 34096432414001n); + // + // record2.addKeyValue("list_price", 100.56); + // + // //Add Record instance to the array + // recordsArray.push(record2); + request.setData(recordsArray); + //Call updateRelatedRecords method that takes recordId and BodyWrapper instance + let response = await relatedRecordsOperations.updateRelatedRecords(recordId, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.RecordsRelated.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateRelatedRecords.initialize(); +let moduleAPIName = "leads"; +let recordId = 440248074074n; +let relatedListAPIName = "notes"; +await UpdateRelatedRecords.updateRelatedRecords(moduleAPIName,recordId,relatedListAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/related_records/updateRelatedRecordsUsingExternalId.js b/versions/3.0.0/samples/related_records/updateRelatedRecordsUsingExternalId.js new file mode 100644 index 0000000..3761fa6 --- /dev/null +++ b/versions/3.0.0/samples/related_records/updateRelatedRecordsUsingExternalId.js @@ -0,0 +1,109 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateRelatedRecordsUsingExternalId{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Related Records Using External Id

+ * This method is used to update the relation between the records and print the response. + * @param {String} moduleAPIName The API Name of the module to update related record. + * @param {String} externalValue + * @param {String} relatedListAPIName The API name of the related list. + */ + static async updateRelatedRecordsUsingExternalId(moduleAPIName, externalValue, relatedListAPIName) { + //example + //let moduleAPIName = "module_api_name"; + // let recordId = 007n; + // let relatedModuleAPIName = "module_api_name"; + let xExternal = "Leads.External,Products.Products_External"; + let relatedRecordsOperations = new ZOHOCRMSDK.RecordsRelated.RelatedRecordsOperations(relatedListAPIName, moduleAPIName, xExternal); + let request = new ZOHOCRMSDK.RecordsRelated.BodyWrapper(); + //Array to hold Record instances + let recordsArray = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + /* + * Call addKeyValue method that takes two arguments + * 1 -> A string that is the Field's API Name + * 2 -> Value + */ + record1.addKeyValue("id", 34770615917011n); + record1.addKeyValue("list_price", 50.56); + // record1.addKeyValue("Products_External", "Products_External"); + //Add Record instance to the array + recordsArray.push(record1); + let record2 = new ZOHOCRMSDK.Record.Record(); + /* + * Call addKeyValue method that takes two arguments + * 1 -> A string that is the Field's API Name + * 2 -> Value + */ + record2.addKeyValue("id", 34096432414001n); + record2.addKeyValue("list_price", 100.56); + //Add Record instance to the array + recordsArray.push(record2); + request.setData(recordsArray); + //Call updateRelatedRecordsUsingExternalId method that takes externalValue and BodyWrapper instance + let response = await relatedRecordsOperations.updateRelatedRecordsUsingExternalId(externalValue, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.RecordsRelated.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsRelated.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateRelatedRecordsUsingExternalId.initialize(); +let moduleAPIName = "leads"; +let externalValue = "external"; +let relatedListAPIName = "notes"; +await UpdateRelatedRecordsUsingExternalId.updateRelatedRecordsUsingExternalId(moduleAPIName,externalValue,relatedListAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/rescheduledhistory/AddAppointmentsRescheduledHistory.js b/versions/3.0.0/samples/rescheduledhistory/AddAppointmentsRescheduledHistory.js new file mode 100644 index 0000000..c6f4321 --- /dev/null +++ b/versions/3.0.0/samples/rescheduledhistory/AddAppointmentsRescheduledHistory.js @@ -0,0 +1,90 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class AddAppointmentsRescheduledHistory +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async addAppointmentRescheduledHistory() + { + let rescheduleHistoryOperations = new ZOHOCRMSDK.HistoryReschedule.RescheduleHistoryOperations(); + let request = new ZOHOCRMSDK.HistoryReschedule.BodyWrapper(); + let data = []; + let rescheduleHistory = new ZOHOCRMSDK.HistoryReschedule.RescheduleHistory(); + let appointmentName = new ZOHOCRMSDK.HistoryReschedule.AppointmentName(); + appointmentName.setName("test"); + appointmentName.setId(440248394031n); + await rescheduleHistory.setAppointmentName(appointmentName); + let rescheduledBy = new ZOHOCRMSDK.HistoryReschedule.User(); + rescheduledBy.setId(440248004001n); + // rescheduledBy.setName("userName"); + await rescheduleHistory.setRescheduledBy(rescheduledBy); + await rescheduleHistory.setRescheduledFrom(new Date('July 15, 2023 05:35:32')); + await rescheduleHistory.setRescheduledTo(new Date('July 15, 2023 06:35:32')); + await rescheduleHistory.setRescheduledTime(new Date()); + await rescheduleHistory.setRescheduleNote("Customer unavailable"); + await rescheduleHistory.setRescheduleReason("By Customer"); + data.push(rescheduleHistory); + request.setData(data); + let response = await rescheduleHistoryOperations.addAppointmentsRescheduledHistory(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.HistoryReschedule.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.HistoryReschedule.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.HistoryReschedule.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.HistoryReschedule.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await AddAppointmentsRescheduledHistory.initialize(); +await AddAppointmentsRescheduledHistory.addAppointmentRescheduledHistory(); \ No newline at end of file diff --git a/versions/3.0.0/samples/rescheduledhistory/DeleteAppointmentsRescheduledHistory.js b/versions/3.0.0/samples/rescheduledhistory/DeleteAppointmentsRescheduledHistory.js new file mode 100644 index 0000000..8b64f21 --- /dev/null +++ b/versions/3.0.0/samples/rescheduledhistory/DeleteAppointmentsRescheduledHistory.js @@ -0,0 +1,73 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class DeleteAppointmentsRescheduledHistory +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async deleteAppointmentsRescheduledHistory(id) + { + let rescheduleHistoryOperations = new ZOHOCRMSDK.HistoryReschedule.RescheduleHistoryOperations(); + let response = await rescheduleHistoryOperations.deleteAppointmentsRescheduledHistory(id); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.HistoryReschedule.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.HistoryReschedule.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.HistoryReschedule.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.HistoryReschedule.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let id = 4402480389012n; +await DeleteAppointmentsRescheduledHistory.initialize(); +await DeleteAppointmentsRescheduledHistory.deleteAppointmentsRescheduledHistory(id) \ No newline at end of file diff --git a/versions/3.0.0/samples/rescheduledhistory/GetAppointmentRescheduledHistory.js b/versions/3.0.0/samples/rescheduledhistory/GetAppointmentRescheduledHistory.js new file mode 100644 index 0000000..cdbbc12 --- /dev/null +++ b/versions/3.0.0/samples/rescheduledhistory/GetAppointmentRescheduledHistory.js @@ -0,0 +1,132 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetAppointmentRescheduledHistory +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getAppointmentRescheduledHistory(id) + { + let rescheduleHistoryOperations = new ZOHOCRMSDK.HistoryReschedule.RescheduleHistoryOperations(); + let parameterInstance = new ZOHOCRMSDK.ParameterMap(); + await parameterInstance.add(ZOHOCRMSDK.HistoryReschedule.GetAppointmentRescheduledHistoryParam.FIELDS, "id"); + let response = await rescheduleHistoryOperations.getAppointmentRescheduledHistory(id, parameterInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject instanceof ZOHOCRMSDK.HistoryReschedule.ResponseWrapper) + { + let data = responseObject.getData(); + if (data != null) + { + data.forEach(history => { + console.log("CurrencySymbol: " + history.getCurrencySymbol()); + console.log("reviewProcess: " + history.getReviewProcess()); + console.log("rescheduleReason: " + history.getRescheduleReason()); + console.log("sharingPermission: " + history.getSharingPermission()); + console.log("Name: " + history.getName()); + console.log("Review: " + history.getReview()); + console.log("State: " + history.getState()); + console.log("canvasId: " + history.getCanvasId()); + console.log("processFlow: " + history.getProcessFlow()); + console.log("Id: " + history.getId()); + console.log("ziaVisions: " + history.getZiaVisions()); + console.log("approved: " + history.getApproved()); + console.log("ziaVisions: " + history.getZiaVisions()); + console.log("editable: " + history.getEditable()); + console.log("orchestration: " + history.getOrchestration()); + console.log("inMerge: " + history.getInMerge()); + console.log("approvalState: " + history.getApprovalState()); + console.log("rescheduleNote: " + history.getRescheduleNote()); + console.log("rescheduledTo: " + history.getRescheduledTo()); + console.log("rescheduledTime: " + history.getRescheduledTime()); + console.log("rescheduledFrom: " + history.getRescheduledFrom()); + let appointmentName = history.getAppointmentName(); + if (appointmentName != null) + { + console.log("Appointment Name :"+ appointmentName.getName()); + console.log("Appointment Id : " + appointmentName.getId()); + } + let approval = history.getApproval(); + if (approval != null) + { + console.log("delegate : " + approval.getDelegate()); + console.log("approve : " + approval.getApprove()); + console.log("Reject : " + approval.getReject()); + console.log("resubmit : " + approval.getResubmit()); + } + let modifiedBy = history.getModifiedBy(); + if (modifiedBy != null) + { + console.log("modifiedBy : " + modifiedBy.getId()); + console.log("modifiedBy : " + modifiedBy.getName()); + console.log("modifiedBy : " + modifiedBy.getEmail()); + } + let rescheduledBy = history.getRescheduledBy(); + if (rescheduledBy != null) + { + console.log("rescheduledBy : " + rescheduledBy.getId()); + console.log("rescheduledBy : " + rescheduledBy.getName()); + console.log("rescheduledBy" + rescheduledBy.getEmail()); + } + let createdBy = history.getCreatedBy(); + if (createdBy != null) + { + console.log("createdBy : " + createdBy.getId()); + console.log("createdBy : " + createdBy.getName()); + console.log("createdBy : " + createdBy.getEmail()); + } + }); + } + let info = responseObject.getInfo(); + if (info != null) { + info.forEach(info1 => { + if (info1 != null) { + if (info1.getPerPage() != null) { + console.log("RelatedRecord Info PerPage: " + info1.getPerPage().toString()); + } + if (info1.getCount() != null) { + console.log("RelatedRecord Info Count: " + info1.getCount().toString()); + } + if (info1.getPage() != null) { + console.log("RelatedRecord Info Page: " + info1.getPage().toString()); + } + if (info1.getMoreRecords() != null) { + console.log("RelatedRecord Info MoreRecords: " + info1.getMoreRecords().toString()); + } + } + }); + } + } + else if (responseObject instanceof ZOHOCRMSDK.AppointmentPreference.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } +} +let id = 4402480009012n; +await GetAppointmentRescheduledHistory.initialize(); +await GetAppointmentRescheduledHistory.getAppointmentRescheduledHistory(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/rescheduledhistory/GetAppointmentsRescheduledHistory.js b/versions/3.0.0/samples/rescheduledhistory/GetAppointmentsRescheduledHistory.js new file mode 100644 index 0000000..95c58c7 --- /dev/null +++ b/versions/3.0.0/samples/rescheduledhistory/GetAppointmentsRescheduledHistory.js @@ -0,0 +1,134 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetAppointmentsRescheduledHistory +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getAppointmentsRescheduledHistory() + { + let rescheduleHistoryOperations = new ZOHOCRMSDK.HistoryReschedule.RescheduleHistoryOperations(); + let parameterInstance = new ZOHOCRMSDK.ParameterMap(); + await parameterInstance.add(ZOHOCRMSDK.HistoryReschedule.GetAppointmentsRescheduledHistoryParam.FIELDS, "id"); + let response = await rescheduleHistoryOperations.getAppointmentsRescheduledHistory(parameterInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject instanceof ZOHOCRMSDK.HistoryReschedule.ResponseWrapper) + { + let data = responseObject.getData(); + if (data != null) + { + data.forEach(history => { + console.log("CurrencySymbol: " + history.getCurrencySymbol()); + console.log("reviewProcess: " + history.getReviewProcess()); + console.log("rescheduleReason: " + history.getRescheduleReason()); + console.log("sharingPermission: " + history.getSharingPermission()); + console.log("Name: " + history.getName()); + console.log("Review: " + history.getReview()); + console.log("State: " + history.getState()); + console.log("canvasId: " + history.getCanvasId()); + console.log("processFlow: " + history.getProcessFlow()); + console.log("Id: " + history.getId()); + console.log("ziaVisions: " + history.getZiaVisions()); + console.log("approved: " + history.getApproved()); + console.log("ziaVisions: " + history.getZiaVisions()); + console.log("editable: " + history.getEditable()); + console.log("orchestration: " + history.getOrchestration()); + console.log("inMerge: " + history.getInMerge()); + console.log("approvalState: " + history.getApprovalState()); + console.log("rescheduleNote: " + history.getRescheduleNote()); + console.log("rescheduledTo: " + history.getRescheduledTo()); + console.log("rescheduledTime: " + history.getRescheduledTime()); + console.log("rescheduledFrom: " + history.getRescheduledFrom()); + let appointmentName = history.getAppointmentName(); + if (appointmentName != null) + { + console.log("Appointment Name :"+ appointmentName.getName()); + console.log("Appointment Id : " + appointmentName.getId()); + } + let approval = history.getApproval(); + if (approval != null) + { + console.log("delegate : " + approval.getDelegate()); + console.log("approve : " + approval.getApprove()); + console.log("Reject : " + approval.getReject()); + console.log("resubmit : " + approval.getResubmit()); + } + let modifiedBy = history.getModifiedBy(); + if (modifiedBy != null) + { + console.log("modifiedBy : " + modifiedBy.getId()); + console.log("modifiedBy : " + modifiedBy.getName()); + console.log("modifiedBy : " + modifiedBy.getEmail()); + } + let rescheduledBy = history.getRescheduledBy(); + if (rescheduledBy != null) + { + console.log("rescheduledBy : " + rescheduledBy.getId()); + console.log("rescheduledBy : " + rescheduledBy.getName()); + console.log("rescheduledBy" + rescheduledBy.getEmail()); + } + let createdBy = history.getCreatedBy(); + if (createdBy != null) + { + console.log("createdBy : " + createdBy.getId()); + console.log("createdBy : " + createdBy.getName()); + console.log("createdBy : " + createdBy.getEmail()); + } + }); + } + let info = responseObject.getInfo(); + info.forEach(info1=>{ + if (info1 != null) + { + if (info1.getPerPage() != null) + { + console.log("RelatedRecord Info PerPage: " + info1.getPerPage().toString()); + } + if (info1.getCount() != null) + { + console.log("RelatedRecord Info Count: " + info1.getCount().toString()); + } + if (info1.getPage() != null) + { + console.log("RelatedRecord Info Page: " + info1.getPage().toString()); + } + if (info1.getMoreRecords() != null) + { + console.log("RelatedRecord Info MoreRecords: " + info1.getMoreRecords().toString()); + } + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.HistoryReschedule.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } +} +await GetAppointmentsRescheduledHistory.initialize(); +await GetAppointmentsRescheduledHistory.getAppointmentsRescheduledHistory(); \ No newline at end of file diff --git a/versions/3.0.0/samples/rescheduledhistory/UpdateAppointmentRescheduledHistory.js b/versions/3.0.0/samples/rescheduledhistory/UpdateAppointmentRescheduledHistory.js new file mode 100644 index 0000000..760ffa9 --- /dev/null +++ b/versions/3.0.0/samples/rescheduledhistory/UpdateAppointmentRescheduledHistory.js @@ -0,0 +1,91 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateAppointmentRescheduledHistory +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateAppointmentRescheduledHistory(id) + { + let rescheduleHistoryOperations = new ZOHOCRMSDK.HistoryReschedule.RescheduleHistoryOperations(); + let request = new ZOHOCRMSDK.HistoryReschedule.BodyWrapper(); + let data = []; + let rescheduleHistory = new ZOHOCRMSDK.HistoryReschedule.RescheduleHistory(); + let appointmentName = new ZOHOCRMSDK.HistoryReschedule.AppointmentName(); + appointmentName.setName("test"); + appointmentName.setId(44024801394031n); + await rescheduleHistory.setAppointmentName(appointmentName); + let rescheduledBy = new ZOHOCRMSDK.HistoryReschedule.User(); + rescheduledBy.setId(4402480254001n); + rescheduledBy.setName("userName"); + await rescheduleHistory.setRescheduledBy(rescheduledBy); + await rescheduleHistory.setRescheduledFrom(new Date('November 16, 2023 05:35:32')); + await rescheduleHistory.setRescheduledTo(new Date('November 16, 2023 09:35:32')); + await rescheduleHistory.setRescheduledTime(new Date()); + await rescheduleHistory.setRescheduleNote("Customer not there"); + await rescheduleHistory.setRescheduleReason("By Customer"); + data.push(rescheduleHistory); + request.setData(data); + let response = await rescheduleHistoryOperations.updateAppointmentRescheduledHistory(id, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.HistoryReschedule.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.HistoryReschedule.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.HistoryReschedule.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.HistoryReschedule.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let id = 4402481389012n; +await UpdateAppointmentRescheduledHistory.initialize(); +await UpdateAppointmentRescheduledHistory.updateAppointmentRescheduledHistory(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/rescheduledhistory/UpdateAppointmentsRescheduledHistory.js b/versions/3.0.0/samples/rescheduledhistory/UpdateAppointmentsRescheduledHistory.js new file mode 100644 index 0000000..295e288 --- /dev/null +++ b/versions/3.0.0/samples/rescheduledhistory/UpdateAppointmentsRescheduledHistory.js @@ -0,0 +1,91 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateAppointmentsRescheduledHistory +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateAppointmentsRescheduledHistory() + { + let rescheduleHistoryOperations = new ZOHOCRMSDK.HistoryReschedule.RescheduleHistoryOperations(); + let request = new ZOHOCRMSDK.HistoryReschedule.BodyWrapper(); + let data = []; + let rescheduleHistory = new ZOHOCRMSDK.HistoryReschedule.RescheduleHistory(); + rescheduleHistory.setId(3214235234132n); + let appointmentName = new ZOHOCRMSDK.HistoryReschedule.AppointmentName(); + appointmentName.setName("Name"); + appointmentName.setId(323213423423n); + await rescheduleHistory.setAppointmentName(appointmentName); + let rescheduledBy = new ZOHOCRMSDK.HistoryReschedule.User(); + rescheduledBy.setId(324234235234232n); + rescheduledBy.setName("userName"); + await rescheduleHistory.setRescheduledBy(rescheduledBy); + await rescheduleHistory.setRescheduledTime(new Date('November 15, 2023 05:35:32')); + await rescheduleHistory.setRescheduledFrom(new Date('November 15, 2023 09:35:32')); + await rescheduleHistory.setRescheduledTo(new Date('November 15, 2023 11:35:32')); + await rescheduleHistory.setRescheduleNote("Customer unavailable"); + await rescheduleHistory.setRescheduleReason("By Customer"); + data.push(rescheduleHistory); + request.setData(data); + let response = await rescheduleHistoryOperations.updateAppointmentsRescheduledHistory(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.HistoryReschedule.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.HistoryReschedule.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.HistoryReschedule.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.HistoryReschedule.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateAppointmentsRescheduledHistory.initialize(); +await UpdateAppointmentsRescheduledHistory.updateAppointmentsRescheduledHistory(); \ No newline at end of file diff --git a/versions/3.0.0/samples/roles/CreateRoles.js b/versions/3.0.0/samples/roles/CreateRoles.js new file mode 100644 index 0000000..a48a2d6 --- /dev/null +++ b/versions/3.0.0/samples/roles/CreateRoles.js @@ -0,0 +1,82 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateRoles +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createRoles() + { + let rolesOperations = new ZOHOCRMSDK.Roles.RolesOperations(); + let bodyWrapper = new ZOHOCRMSDK.Roles.BodyWrapper(); + let roles = []; + let role = new ZOHOCRMSDK.Roles.Role(); + role.setName("Manager"); + let reportingTo = new ZOHOCRMSDK.Roles.ReportingTo(); + reportingTo.setId(44024800031151n); + await role.setReportingTo(reportingTo); + role.setDescription("Manage Resources"); + role.setShareWithPeers(false); + roles.push(role); + bodyWrapper.setRoles(roles); + let response = await rolesOperations.createRoles(bodyWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if(responseObject instanceof ZOHOCRMSDK.Roles.ActionWrapper) { + let actionResponses = responseObject.getRoles(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Roles.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Roles.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Roles.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await CreateRoles.initialize(); +await CreateRoles.createRoles(); \ No newline at end of file diff --git a/versions/3.0.0/samples/roles/DeletRole.js b/versions/3.0.0/samples/roles/DeletRole.js new file mode 100644 index 0000000..a4e8a2e --- /dev/null +++ b/versions/3.0.0/samples/roles/DeletRole.js @@ -0,0 +1,74 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class DeletRole +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async deleteRole(id) + { + let rolesOperations = new ZOHOCRMSDK.Roles.RolesOperations(); + let paraminstance = new ZOHOCRMSDK.ParameterMap(); + await paraminstance.add(ZOHOCRMSDK.Roles.DeleteRoleParam.TRANSFER_TO_ID, 440248031151n); + let response = await rolesOperations.deleterole(id, paraminstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if(responseObject instanceof ZOHOCRMSDK.Roles.ActionWrapper) { + let actionResponses = responseObject.getRoles(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Roles.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Roles.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Roles.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +let id = 4402480393012n; +await DeletRole.initialize(); +await DeletRole.deleteRole(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/roles/UpdateRole.js b/versions/3.0.0/samples/roles/UpdateRole.js new file mode 100644 index 0000000..4d19b23 --- /dev/null +++ b/versions/3.0.0/samples/roles/UpdateRole.js @@ -0,0 +1,83 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateRole +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateRole(id) + { + let rolesOperations = new ZOHOCRMSDK.Roles.RolesOperations(); + let bodyWrapper = new ZOHOCRMSDK.Roles.BodyWrapper(); + let roles = []; + let role = new ZOHOCRMSDK.Roles.Role(); + role.setName("SDk Manager"); + let reportingTo = new ZOHOCRMSDK.Roles.ReportingTo(); + reportingTo.setId(321324123231n); + await role.setReportingTo(reportingTo); + role.setDescription("Schedule and Manage Resources"); + role.setShareWithPeers(true); + roles.push(role); + bodyWrapper.setRoles(roles); + let response = await rolesOperations.updateRole(id, bodyWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if(responseObject instanceof ZOHOCRMSDK.Roles.ActionWrapper) { + let actionResponses = responseObject.getRoles(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Roles.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Roles.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Roles.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +let id = 4402480393012n; +await UpdateRole.initialize(); +await UpdateRole.updateRole(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/roles/UpdateRoles.js b/versions/3.0.0/samples/roles/UpdateRoles.js new file mode 100644 index 0000000..0bbe1b3 --- /dev/null +++ b/versions/3.0.0/samples/roles/UpdateRoles.js @@ -0,0 +1,83 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateRoles +{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateRoles() + { + let rolesOperations = new ZOHOCRMSDK.Roles.RolesOperations(); + let bodyWrapper = new ZOHOCRMSDK.Roles.BodyWrapper(); + let roles = []; + let role = new ZOHOCRMSDK.Roles.Role(); + role.setId(32323242n); + role.setName("SDk Manager"); + let reportingTo = new ZOHOCRMSDK.Roles.ReportingTo(); + reportingTo.setId(321324123231n); + await role.setReportingTo(reportingTo); + role.setDescription("Schedule and Manage Resources"); + role.setShareWithPeers(true); + roles.push(role); + bodyWrapper.setRoles(roles); + let response = rolesOperations.updateRoles(bodyWrapper); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if(responseObject instanceof ZOHOCRMSDK.Roles.ActionWrapper) { + let actionResponses = responseObject.getRoles(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Roles.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Roles.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Roles.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await UpdateRoles.initialize(); +await UpdateRoles.updateRoles(); \ No newline at end of file diff --git a/versions/3.0.0/samples/roles/getRole.js b/versions/3.0.0/samples/roles/getRole.js new file mode 100644 index 0000000..c33820a --- /dev/null +++ b/versions/3.0.0/samples/roles/getRole.js @@ -0,0 +1,73 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetRole{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Role

+ * This method is used to retrieve the data of single role through an API request and print the response. + * @param {BigInt} roleId The ID of the role to be obtained + */ + static async getRole(roleId) { + //example + //let roleId = 26005n; + let rolesOperations = new ZOHOCRMSDK.Roles.RolesOperations(); + //Call getRole method that takes roleId as parameter + let response = await rolesOperations.getRole(roleId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Roles.ResponseWrapper) { + let roles = responseObject.getRoles(); + roles.forEach(role => { + console.log("Role DisplayLabel: " + role.getDisplayLabel()); + let forecastManager = role.getForecastManager(); + if (forecastManager != null) { + console.log("Role Forecast Manager User-ID: " + forecastManager.getId()); + console.log("Role Forecast Manager User-Name: " + forecastManager.getName()); + } + console.log("Role ShareWithPeers: " + role.getShareWithPeers()); + console.log("Role Name: " + role.getName()); + console.log("Role Description: " + role.getDescription()); + console.log("Role ID: " + role.getId()); + let reportingTo = role.getReportingTo(); + if (reportingTo != null) { + console.log("Role ReportingTo User-ID: " + reportingTo.getId()); + console.log("Role ReportingTo User-Name: " + reportingTo.getName()); + } + console.log("Role AdminUser: " + role.getAdminUser()); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Roles.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetRole.initialize(); +let roleId = 440248093012n; +await GetRole.getRole(roleId); \ No newline at end of file diff --git a/versions/3.0.0/samples/roles/getRoles.js b/versions/3.0.0/samples/roles/getRoles.js new file mode 100644 index 0000000..9c6063f --- /dev/null +++ b/versions/3.0.0/samples/roles/getRoles.js @@ -0,0 +1,65 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetRoles{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getRoles() { + let rolesOperations = new ZOHOCRMSDK.Roles.RolesOperations(); + //Call getRoles method + let response = await rolesOperations.getRoles(); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Roles.ResponseWrapper) { + let roles = responseObject.getRoles(); + for (const role of roles) { + console.log("Role DisplayLabel: " + role.getDisplayLabel()); + let forecastManager = role.getForecastManager(); + if (forecastManager != null) { + console.log("Role Forecast Manager User-ID: " + forecastManager.getId()); + console.log("Role Forecast Manager User-Name: " + forecastManager.getName()); + } + console.log("Role ShareWithPeers: " + role.getShareWithPeers()); + console.log("Role Name: " + role.getName()); + console.log("Role Description: " + role.getDescription()); + console.log("Role ID: " + role.getId()); + let reportingTo = role.getReportingTo(); + if (reportingTo != null) { + console.log("Role ReportingTo User-ID: " + reportingTo.getId()); + console.log("Role ReportingTo User-Name: " + reportingTo.getName()); + } + console.log("Role AdminUser: " + role.getAdminUser()); + } + } + else if (responseObject instanceof ZOHOCRMSDK.Roles.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetRoles.initialize(); +await GetRoles.getRoles(); \ No newline at end of file diff --git a/versions/3.0.0/samples/scoring_rules/activateScoringRule.js b/versions/3.0.0/samples/scoring_rules/activateScoringRule.js new file mode 100644 index 0000000..3497d02 --- /dev/null +++ b/versions/3.0.0/samples/scoring_rules/activateScoringRule.js @@ -0,0 +1,79 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class ActivateScoringRule +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async activateScoringRule(id) + { + let scoringRulesOperations = new ZOHOCRMSDK.RulesScoring.ScoringRulesOperations(); + let response = await scoringRulesOperations.activateScoringRule(id); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) + { + if (responseObject instanceof ZOHOCRMSDK.RulesScoring.ActionWrapper) + { + let ScoringRules = responseObject.getScoringRules(); + ScoringRules.forEach(scoringRule =>{ + if (scoringRule instanceof ZOHOCRMSDK.RulesScoring.SuccessResponse) + { + console.log("Status: " + scoringRule.getStatus().getValue()); + console.log("Code: " + scoringRule.getCode().getValue()); + let details = scoringRule.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + scoringRule.getMessage().getValue()); + } + else if (scoringRule instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + scoringRule.getStatus().getValue()); + console.log("Code: " + scoringRule.getCode().getValue()); + let details = scoringRule.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + scoringRule.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + let details = responseObject.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let id = 440248001394064n; +await ActivateScoringRule.initialize(); +await ActivateScoringRule.activateScoringRule(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/scoring_rules/cloneScoringRule.js b/versions/3.0.0/samples/scoring_rules/cloneScoringRule.js new file mode 100644 index 0000000..dbd1ac9 --- /dev/null +++ b/versions/3.0.0/samples/scoring_rules/cloneScoringRule.js @@ -0,0 +1,79 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CloneScoringRule +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async cloneScoringRule(id) + { + let scoringRulesOperations = new ZOHOCRMSDK.RulesScoring.ScoringRulesOperations(); + let response = await scoringRulesOperations.cloneScoringRule(id); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) + { + if (responseObject instanceof ZOHOCRMSDK.RulesScoring.ActionWrapper) + { + let ScoringRules = responseObject.getScoringRules(); + ScoringRules.forEach(scoringRule=>{ + if (scoringRule instanceof ZOHOCRMSDK.RulesScoring.SuccessResponse) + { + console.log("Status: " + scoringRule.getStatus().getValue()); + console.log("Code: " + scoringRule.getCode().getValue()); + let details = scoringRule.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + scoringRule.getMessage().getValue()); + } + else if (scoringRule instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + scoringRule.getStatus().getValue()); + console.log("Code: " + scoringRule.getCode().getValue()); + let details = scoringRule.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + scoringRule.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + let details = responseObject.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let id = 3423001391014n; +await CloneScoringRule.initialize(); +await CloneScoringRule.cloneScoringRule(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/scoring_rules/createScoringRules.js b/versions/3.0.0/samples/scoring_rules/createScoringRules.js new file mode 100644 index 0000000..f52e1ca --- /dev/null +++ b/versions/3.0.0/samples/scoring_rules/createScoringRules.js @@ -0,0 +1,139 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateScoringRules +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createScoringRules() + { + let scoringRulesOperations = new ZOHOCRMSDK.RulesScoring.ScoringRulesOperations(); + let bodyWrapper = new ZOHOCRMSDK.RulesScoring.BodyWrapper(); + let scoringRules = [] + let scoringRule = new ZOHOCRMSDK.RulesScoring.ScoringRule(); + scoringRule.setName("Rule 11"); + scoringRule.setDescription("Rule for Module Leads"); + let module = new ZOHOCRMSDK.Modules.Modules(); + module.setAPIName("Leads"); + module.setId(4402480371049n); + await scoringRule.setModule(module); + let layout = new ZOHOCRMSDK.RulesScoring.Layout(); + layout.setAPIName("Standard"); + layout.setId(440248000167n); + await scoringRule.setLayout(layout); + scoringRule.setActive(true); + let fieldRules = []; + let fieldRule = new ZOHOCRMSDK.RulesScoring.FieldRule(); + fieldRule.setScore(5); + let criteria = new ZOHOCRMSDK.RulesScoring.Criteria(); + criteria.setGroupOperator("or"); + let group =[]; + let criteria1 = new ZOHOCRMSDK.RulesScoring.Criteria(); + let field1 = new ZOHOCRMSDK.RulesScoring.Field; + field1.setAPIName("Company"); + await criteria1.setField(field1); + criteria1.setComparator("equal"); + criteria1.setValue("Zoho"); + group.push(criteria1); + let criteria2 = new ZOHOCRMSDK.RulesScoring.Criteria(); + field1 = new ZOHOCRMSDK.RulesScoring.Field(); + field1.setAPIName("Designation"); + await criteria2.setField(field1); + criteria2.setComparator("equal"); + criteria2.setValue("review"); + group.push(criteria2); + let criteria3 = new ZOHOCRMSDK.RulesScoring.Criteria(); + field1 = new ZOHOCRMSDK.RulesScoring.Field(); + field1.setAPIName("Last_Name"); + await criteria3.setField(field1); + criteria3.setComparator("equal"); + criteria3.setValue("SDK"); + group.push(criteria3); + criteria.setGroup(group); + await fieldRule.setCriteria(criteria); + fieldRules.push(fieldRule); + scoringRule.setFieldRules(fieldRules); + let signalRules = []; + let signalRule = new ZOHOCRMSDK.RulesScoring.SignalRule(); + signalRule.setId("4836976111233"); + signalRule.setScore(10); + let signal = new ZOHOCRMSDK.RulesScoring.Signal(); + signal.setId(4876876112019n); + signal.setNamespace(new ZOHOCRMSDK.Choice("Email_Incoming__s")); + await signalRule.setSignal(signal); + signalRules.add(signalRule); + scoringRule.setSignalRules(signalRules); + scoringRules.push(scoringRule); + bodyWrapper.setScoringRules(scoringRules); + let response = await scoringRulesOperations.createScoringRules(bodyWrapper); + if (response != null) + { + // Get the status code from response + console.log("Status Code: " + response.getStatusCode()); + + let responseObject = response.getObject(); + + // Check if expected response is received + if (responseObject != null) + { + if(responseObject instanceof ZOHOCRMSDK.RulesScoring.ActionWrapper) + { + let scoringRules = responseObject.getScoringRules(); + scoringRules.forEach(scoringRule=>{ + if (scoringRule instanceof ZOHOCRMSDK.RulesScoring.SuccessResponse) + { + console.log("Status: " + scoringRule.getStatus().getValue()); + console.log("Code: " + scoringRule.getCode().getValue()); + console.log("Details: "); + let details = scoringRule.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + scoringRule.getMessage().getValue()); + } + else if (scoringRule instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + scoringRule.getStatus().getValue()); + console.log("Code: " + scoringRule.getCode().getValue()); + let details = scoringRule.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + scoringRule.getMessage().getValue()); + } + }) + } + else if (responseObject instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + let details = responseObject.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await CreateScoringRules.initialize(); +await CreateScoringRules.createScoringRules(); \ No newline at end of file diff --git a/versions/3.0.0/samples/scoring_rules/deactivateScoringRule.js b/versions/3.0.0/samples/scoring_rules/deactivateScoringRule.js new file mode 100644 index 0000000..1cfb23a --- /dev/null +++ b/versions/3.0.0/samples/scoring_rules/deactivateScoringRule.js @@ -0,0 +1,79 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class DeactivateScoringRule +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async deactivateScoringRule(id) + { + let scoringRulesOperations = new ZOHOCRMSDK.RulesScoring.ScoringRulesOperations(); + let response = await scoringRulesOperations.deactivateScoringRule(id); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) + { + if (responseObject instanceof ZOHOCRMSDK.RulesScoring.ActionWrapper) + { + let ScoringRules = responseObject.getScoringRules(); + ScoringRules.forEach(scoringRule=>{ + if (scoringRule instanceof ZOHOCRMSDK.RulesScoring.SuccessResponse) + { + console.log("Status: " + scoringRule.getStatus().getValue()); + console.log("Code: " + scoringRule.getCode().getValue()); + let details = scoringRule.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + scoringRule.getMessage().getValue()); + } + else if (scoringRule instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + scoringRule.getStatus().getValue()); + console.log("Code: " + scoringRule.getCode().getValue()); + let details = scoringRule.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + scoringRule.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + let details = responseObject.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let id = 440248001390011n; +await DeactivateScoringRule.initialize(); +await DeactivateScoringRule.deactivateScoringRule(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/scoring_rules/deleteScoringRule.js b/versions/3.0.0/samples/scoring_rules/deleteScoringRule.js new file mode 100644 index 0000000..f34e079 --- /dev/null +++ b/versions/3.0.0/samples/scoring_rules/deleteScoringRule.js @@ -0,0 +1,78 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteScoringRule +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async deleteScoringRule() + { + let scoringRulesOperations = new ZOHOCRMSDK.RulesScoring.ScoringRulesOperations(); + let response = await scoringRulesOperations.deleteScoringRule(id); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) + { + if (responseObject instanceof ZOHOCRMSDK.RulesScoring.ActionWrapper) + { + let ScoringRules = responseObject.getScoringRules(); + ScoringRules.forEach(scoringRule=>{ + if (scoringRule instanceof ZOHOCRMSDK.RulesScoring.SuccessResponse) + { + console.log("Status: " + scoringRule.getStatus().getValue()); + console.log("Code: " + scoringRule.getCode().getValue()); + let details = scoringRule.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + scoringRule.getMessage().getValue()); + } + else if (scoringRule instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + scoringRule.getStatus().getValue()); + console.log("Code: " + scoringRule.getCode().getValue()); + let details = scoringRule.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + scoringRule.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + let details = responseObject.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let id = 4402481390011n; +await DeleteScoringRule.initialize(); +await DeleteScoringRule.deleteScoringRule(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/scoring_rules/deleteScoringRules.js b/versions/3.0.0/samples/scoring_rules/deleteScoringRules.js new file mode 100644 index 0000000..daa0c55 --- /dev/null +++ b/versions/3.0.0/samples/scoring_rules/deleteScoringRules.js @@ -0,0 +1,81 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class DeleteScoringRules +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async deleteScoringRules() + { + let scoringRulesOperations = new ZOHOCRMSDK.RulesScoring.ScoringRulesOperations(); + + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.RulesScoring.DeleteScoringRulesParam.IDS, "31293800332004"); + let response = scoringRulesOperations.deleteScoringRules(paramInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) + { + if (responseObject instanceof ZOHOCRMSDK.RulesScoring.ActionWrapper) + { + let ScoringRules = responseObject.getScoringRules(); + ScoringRules.forEach(scoringRule=>{ + if (scoringRule instanceof ZOHOCRMSDK.RulesScoring.SuccessResponse) + { + console.log("Status: " + scoringRule.getStatus().getValue()); + console.log("Code: " + scoringRule.getCode().getValue()); + let details = scoringRule.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + scoringRule.getMessage().getValue()); + } + else if (scoringRule instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + scoringRule.getStatus().getValue()); + console.log("Code: " + scoringRule.getCode().getValue()); + let details = scoringRule.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + scoringRule.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + let details = responseObject.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await DeleteScoringRules.initialize(); +await DeleteScoringRules.deleteScoringRules(); \ No newline at end of file diff --git a/versions/3.0.0/samples/scoring_rules/getScoringRule.js b/versions/3.0.0/samples/scoring_rules/getScoringRule.js new file mode 100644 index 0000000..e49c2ab --- /dev/null +++ b/versions/3.0.0/samples/scoring_rules/getScoringRule.js @@ -0,0 +1,208 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetScoringRule +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getScoringRule(module, id) + { + let scoringRulesOperations = new ZOHOCRMSDK.RulesScoring.ScoringRulesOperations(); + + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + + let response = await scoringRulesOperations.getScoringRule(module, id,paramInstance); + + if(response!= null) + { + console.log("Status Code: " + response.getStatusCode()); + + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + + if (responseObject != null) + { + if (responseObject instanceof ZOHOCRMSDK.RulesScoring.ResponseWrapper) + { + let scoringRules = responseObject.getScoringRules(); + + scoringRules.forEach(scoringRule=>{ + + let layout = scoringRule.getLayout(); + + if(layout!=null) + { + console.log("ScoringRule Layout ID : " +layout.getId()); + + console.log("ScoringRule Layout APIName: " + layout.getAPIName()); + } + console.log("ScoringRule CreatedTime: " + scoringRule.getCreatedTime()); + + console.log("ScoringRule ModifiedTime: "+ scoringRule.getModifiedTime()); + + let fieldRules = scoringRule.getFieldRules(); + + fieldRules.forEach(fieldRule =>{ + + console.log("ScoringRule FieldRule Id :" + fieldRule.getId()); + + let criteria = fieldRule.getCriteria(); + + if (criteria != null) + { + GetScoringRule.printCriteria(criteria); + } + + console.log("ScoringRule FieldRule Id: " + fieldRule.getId()); + + }); + + let modules = scoringRule.getModule(); + + if (modules != null) + { + console.log("ScoringRule Module ID: " + modules.getId()); + + console.log("ScoringRule Module APIName: " + modules.getAPIName()); + } + + console.log("ScoringRule Name: " + scoringRule.getName()); + + let modifiedBy = scoringRule.getModifiedBy(); + + if (modifiedBy != null) + { + console.log("ScoringRule Modified By Name : " + modifiedBy.getName()); + + console.log("ScoringRule Modified By id : " + modifiedBy.getId()); + } + + console.log("ScoringRule Active: " + scoringRule.getActive()); + + console.log("ScoringRule Description: " + scoringRule.getDescription()); + + console.log("ScoringRule Id: " + scoringRule.getId()); + + let signalRules = scoringRule.getSignalRules(); + + if(signalRules != null) + { + + signalRules.forEach(SignalRule1=>{ + + console.log("ScoringRule SignalRule Score: " + SignalRule1.getScore()); + + console.log("ScoringRule SignalRule Id: " + SignalRule1.getId()); + + let signal = SignalRule1.getSignal(); + + if (signal != null) + { + console.log("ScoringRule SignalRule Signal Namespace: " + signal.getNamespace()); + + console.log("ScoringRule SignalRule Signal Id: " + signal.getId()); + } + }); + } + + let createdBy = scoringRule.getCreatedBy(); + + + if (createdBy != null) + { + console.log("ScoringRule Created By Name : " + createdBy.getName()); + + console.log("ScoringRule Created By id : " + createdBy.getId()); + } + }); + + let info = responseObject.getInfo(); + + if(info!= null) + { + if(info.getPerPage() != null) + { + console.log("Info PerPage: " + info.getPerPage().toString()); + } + if(info.getCount() != null) + { + console.log("Info Count: " + info.getCount().toString()); + } + if(info.getPage() != null) + { + console.log("Info Page: " + info.getPage()); + } + if(info.getMoreRecords() != null) + { + console.log("Info MoreRecords: " + info.getMoreRecords().toString()); + } + + } + } + + else if(responseObject instanceof ZOHOCRMSDK.ScoringRules.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + //Get the Code + console.log("Code: " + responseObject.getCode().getValue()); + + console.log("Details"); + + let details = responseObject.getDetails(); + + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } + static async printCriteria(criteria) + { + if(criteria.getComparator()!=null) + { + console.log("CustomView Criteria Comparator: " + criteria.getComparator()); + } + + if (criteria.getValue() != null) + { + console.log("CustomView Criteria Value: " + criteria.getValue().toString()); + } + + let criteriaGroup = criteria.getGroup(); + + if (criteriaGroup != null) + { + criteriaGroup.forEach(criteria1=>{ + + GetScoringRule.printCriteria(criteria1); + }); + } + + if (criteria.getGroupOperator() != null) + { + console.log("CustomView Criteria Group Operator: " + criteria.getGroupOperator().getValue()); + } + } +} +let module = "Leads"; +let id = 4402480001394064n; +await GetScoringRule.initialize(); +await GetScoringRule.getScoringRule(module, id); \ No newline at end of file diff --git a/versions/3.0.0/samples/scoring_rules/getScoringRules.js b/versions/3.0.0/samples/scoring_rules/getScoringRules.js new file mode 100644 index 0000000..5783801 --- /dev/null +++ b/versions/3.0.0/samples/scoring_rules/getScoringRules.js @@ -0,0 +1,156 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetScoringRules +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getScoringRules() + { + let scoringRulesOperations = new ZOHOCRMSDK.RulesScoring.ScoringRulesOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.RulesScoring.GetScoringRulesParam.MODULE, "Leads"); + let response = await scoringRulesOperations.getScoringRules(paramInstance); + if(response!= null) + { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) + { + if (responseObject instanceof ZOHOCRMSDK.RulesScoring.ResponseWrapper) + { + let scoringRules = responseObject.getScoringRules(); + scoringRules.forEach(scoringRule=>{ + let layout = scoringRule.getLayout(); + if(layout!=null) + { + console.log("ScoringRule Layout ID : " +layout.getId()); + console.log("ScoringRule Layout APIName: " + layout.getAPIName()); + } + console.log("ScoringRule CreatedTime: " + scoringRule.getCreatedTime()); + console.log("ScoringRule ModifiedTime: "+ scoringRule.getModifiedTime()); + let fieldRules = scoringRule.getFieldRules(); + fieldRules.forEach(fieldRule =>{ + console.log("ScoringRule FieldRule Id :" + fieldRule.getId()); + let criteria = fieldRule.getCriteria(); + if (criteria != null) + { + GetScoringRules.printCriteria(criteria); + } + console.log("ScoringRule FieldRule Id: " + fieldRule.getId()); + }); + let modules = scoringRule.getModule(); + if (modules != null) + { + console.log("ScoringRule Module ID: " + modules.getId()); + console.log("ScoringRule Module APIName: " + modules.getAPIName()); + } + console.log("ScoringRule Name: " + scoringRule.getName()); + let modifiedBy = scoringRule.getModifiedBy(); + if (modifiedBy != null) + { + console.log("ScoringRule Modified By Name : " + modifiedBy.getName()); + console.log("ScoringRule Modified By id : " + modifiedBy.getId()); + } + console.log("ScoringRule Active: " + scoringRule.getActive()); + console.log("ScoringRule Description: " + scoringRule.getDescription()); + console.log("ScoringRule Id: " + scoringRule.getId()); + let signalRules = scoringRule.getSignalRules(); + if(signalRules != null) + { + signalRules.forEach(SignalRule1=>{ + console.log("ScoringRule SignalRule Score: " + SignalRule1.getScore()); + console.log("ScoringRule SignalRule Id: " + SignalRule1.getId()); + let signal = signalRule1.getSignal(); + if (signal != null) + { + console.log("ScoringRule SignalRule Signal Namespace: " + signal.getNamespace()); + console.log("ScoringRule SignalRule Signal Id: " + signal.getId()); + } + }); + } + let createdBy = scoringRule.getCreatedBy(); + if (createdBy != null) + { + console.log("ScoringRule Created By Name : " + createdBy.getName()); + console.log("ScoringRule Created By id : " + createdBy.getId()); + } + }); + let info = responseObject.getInfo(); + + if(info!= null) + { + if(info.getPerPage() != null) + { + console.log("Info PerPage: " + info.getPerPage().toString()); + } + if(info.getCount() != null) + { + console.log("Info Count: " + info.getCount().toString()); + } + if(info.getPage() != null) + { + console.log("Info Page: " + info.getPage()); + } + if(info.getMoreRecords() != null) + { + console.log("Info MoreRecords: " + info.getMoreRecords().toString()); + } + } + } + else if(responseObject instanceof APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } + static async printCriteria(criteria) + { + if(criteria.getComparator()!=null) + { + console.log("CustomView Criteria Comparator: " + criteria.getComparator()); + } + if (criteria.getValue() != null) + { + console.log("CustomView Criteria Value: " + criteria.getValue().toString()); + } + let criteriaGroup = criteria.getGroup(); + if (criteriaGroup != null) + { + criteriaGroup.forEach(criteria1=>{ + GetScoringRules.printCriteria(criteria1); + }); + } + if (criteria.getGroupOperator() != null) + { + console.log("CustomView Criteria Group Operator: " + criteria.getGroupOperator().getValue()); + } + } +} +await GetScoringRules.initialize(); +await GetScoringRules.getScoringRules(); \ No newline at end of file diff --git a/versions/3.0.0/samples/scoring_rules/scoringRuleExecutionUsingLayoutId.js b/versions/3.0.0/samples/scoring_rules/scoringRuleExecutionUsingLayoutId.js new file mode 100644 index 0000000..4814a03 --- /dev/null +++ b/versions/3.0.0/samples/scoring_rules/scoringRuleExecutionUsingLayoutId.js @@ -0,0 +1,66 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class ScoringRuleExecutionUsingLayoutId +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async scoringRuleExecutionUsingLayoutId(moduleAPIName) + { + let scoringRulesOperations = new ZOHOCRMSDK.RulesScoring.ScoringRulesOperations(); + let bodyWrapper = new ZOHOCRMSDK.RulesScoring.LayoutRequestWrapper(); + let layout = new ZOHOCRMSDK.RulesScoring.Layout(); + layout.setId(440248000167n); + await bodyWrapper.setLayout(layout); + let response = await scoringRulesOperations.scoringRuleExecutionUsingLayoutId(moduleAPIName, bodyWrapper); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let actionResponse = response.getObject(); + if (actionResponse != null) + { + if (actionResponse instanceof ZOHOCRMSDK.RulesScoring.SuccessResponse) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + let details = actionResponse.getDetails(); + console.log("Details: "); + if (details != null) + { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + let details = actionResponse.getDetails(); + console.log("Details: "); + if (details != null) + { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "leads"; +await ScoringRuleExecutionUsingLayoutId.initialize(); +await ScoringRuleExecutionUsingLayoutId.scoringRuleExecutionUsingLayoutId(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/scoring_rules/scoringRuleExecutionUsingRuleIds.js b/versions/3.0.0/samples/scoring_rules/scoringRuleExecutionUsingRuleIds.js new file mode 100644 index 0000000..56ecbe0 --- /dev/null +++ b/versions/3.0.0/samples/scoring_rules/scoringRuleExecutionUsingRuleIds.js @@ -0,0 +1,84 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class ScoringRuleExecutionUsingRuleIds +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async scoringRuleExecutionUsingRuleIds(moduleAPIName) + { + let scoringRulesOperations = new ZOHOCRMSDK.RulesScoring.ScoringRulesOperations(); + let bodyWrapper = new ZOHOCRMSDK.RulesScoring.RoleRequestWrapper(); + let scoringRules =[]; + scoringRules.push("31293800325026"); + // scoringRules.add("347706114913001"); + bodyWrapper.setScoringRules(scoringRules); + let response = await scoringRulesOperations.scoringRuleExecutionUsingRuleIds(moduleAPIName, bodyWrapper); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) + { + if (responseObject instanceof ZOHOCRMSDK.RulesScoring.ActionWrapper) + { + let actionResponses = responseObject.getScoringRules(); + actionResponses.forEach(actionResponse=>{ + if (actionResponse instanceof ZOHOCRMSDK.RulesScoring.SuccessResponse) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + let details = actionResponse.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + let details = actionResponse.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + let details = responseObject.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "leads"; +await ScoringRuleExecutionUsingRuleIds.initialize(); +await ScoringRuleExecutionUsingRuleIds.scoringRuleExecutionUsingRuleIds(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/scoring_rules/updateScoringRule.js b/versions/3.0.0/samples/scoring_rules/updateScoringRule.js new file mode 100644 index 0000000..f6ca98a --- /dev/null +++ b/versions/3.0.0/samples/scoring_rules/updateScoringRule.js @@ -0,0 +1,138 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateScoringRule +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateScoringRule(id) + { + let scoringRulesOperations = new ZOHOCRMSDK.RulesScoring.ScoringRulesOperations(); + let bodyWrapper = new ZOHOCRMSDK.RulesScoring.BodyWrapper(); + let scoringRules = [] + let scoringRule = new ZOHOCRMSDK.RulesScoring.ScoringRule(); + scoringRule.setName("Rule 11"); + scoringRule.setDescription("Rule for Module Leads"); + let module = new ZOHOCRMSDK.Modules.Modules(); + module.setAPIName("Leads"); + module.setId(4402480001371049n); + await scoringRule.setModule(module); + let layout = new ZOHOCRMSDK.RulesScoring.Layout(); + layout.setAPIName("Standard"); + layout.setId(440248000167n); + await scoringRule.setLayout(layout); + scoringRule.setActive(true); + let fieldRules = []; + let fieldRule = new ZOHOCRMSDK.RulesScoring.FieldRule(); + fieldRule.setScore(5); + let criteria = new ZOHOCRMSDK.RulesScoring.Criteria(); + criteria.setGroupOperator("or"); + let group =[]; + let criteria1 = new ZOHOCRMSDK.RulesScoring.Criteria(); + let field1 = new ZOHOCRMSDK.RulesScoring.Field; + field1.setAPIName("Company"); + await criteria1.setField(field1); + criteria1.setComparator("equal"); + criteria1.setValue("Zoho"); + group.push(criteria1); + let criteria2 = new ZOHOCRMSDK.RulesScoring.Criteria(); + field1 = new ZOHOCRMSDK.RulesScoring.Field(); + field1.setAPIName("Designation"); + await criteria2.setField(field1); + criteria2.setComparator("equal"); + criteria2.setValue("review"); + group.push(criteria2); + let criteria3 = new ZOHOCRMSDK.RulesScoring.Criteria(); + field1 = new ZOHOCRMSDK.RulesScoring.Field(); + field1.setAPIName("Last_Name"); + await criteria3.setField(field1); + criteria3.setComparator("equal"); + criteria3.setValue("SDK"); + group.push(criteria3); + criteria.setGroup(group); + await fieldRule.setCriteria(criteria); + fieldRules.push(fieldRule); + scoringRule.setFieldRules(fieldRules); + let signalRules = []; + let signalRule = new ZOHOCRMSDK.RulesScoring.SignalRule(); + signalRule.setId("4836976111233"); + signalRule.setScore(10); + let signal = new ZOHOCRMSDK.RulesScoring.Signal(); + signal.setId(4876876112019n); + signal.setNamespace(new ZOHOCRMSDK.Choice("Email_Incoming__s")); + await signalRule.setSignal(signal); + signalRules.add(signalRule); + scoringRule.setSignalRules(signalRules); + scoringRules.push(scoringRule); + bodyWrapper.setScoringRules(scoringRules); + let response = scoringRulesOperations.updateScoringRule(id, bodyWrapper); + + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) + { + if (responseObject instanceof ZOHOCRMSDK.RulesScoring.ActionWrapper) + { + + let scoringRules = responseObject.getScoringRules(); + scoringRules.forEach(scoringRule=>{ + if (responseObject instanceof ZOHOCRMSDK.RulesScoring.SuccessResponse) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + let details = responseObject.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + else if (responseObject instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + let details = responseObject.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + let details = responseObject.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let id = 42300312321312321n; +await UpdateScoringRule.initialize(); +await UpdateScoringRule.updateScoringRule(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/scoring_rules/updateScoringRules.js b/versions/3.0.0/samples/scoring_rules/updateScoringRules.js new file mode 100644 index 0000000..b704e8e --- /dev/null +++ b/versions/3.0.0/samples/scoring_rules/updateScoringRules.js @@ -0,0 +1,140 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateScoringRules +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateScoringRules(id) + { + let scoringRulesOperations = new ZOHOCRMSDK.RulesScoring.ScoringRulesOperations(); + + let bodyWrapper = new ZOHOCRMSDK.RulesScoring.BodyWrapper(); + let scoringRules = [] + let scoringRule = new ZOHOCRMSDK.RulesScoring.ScoringRule(); + scoringRule.setName("Rule 11"); + scoringRule.setId("34234123232"); + scoringRule.setDescription("Rule for Module Leads"); + let module = new ZOHOCRMSDK.Modules.Modules(); + module.setAPIName("Leads"); + module.setId(4402480001371049n); + await scoringRule.setModule(module); + let layout = new ZOHOCRMSDK.RulesScoring.Layout(); + layout.setAPIName("Standard"); + layout.setId(440248000167n); + await scoringRule.setLayout(layout); + scoringRule.setActive(true); + let fieldRules = []; + let fieldRule = new ZOHOCRMSDK.RulesScoring.FieldRule(); + fieldRule.setScore(5); + let criteria = new ZOHOCRMSDK.RulesScoring.Criteria(); + criteria.setGroupOperator("or"); + let group =[]; + let criteria1 = new ZOHOCRMSDK.RulesScoring.Criteria(); + let field1 = new ZOHOCRMSDK.RulesScoring.Field; + field1.setAPIName("Company"); + await criteria1.setField(field1); + criteria1.setComparator("equal"); + criteria1.setValue("Zoho"); + group.push(criteria1); + let criteria2 = new ZOHOCRMSDK.RulesScoring.Criteria(); + field1 = new ZOHOCRMSDK.RulesScoring.Field(); + field1.setAPIName("Designation"); + await criteria2.setField(field1); + criteria2.setComparator("equal"); + criteria2.setValue("review"); + group.push(criteria2); + let criteria3 = new ZOHOCRMSDK.RulesScoring.Criteria(); + field1 = new ZOHOCRMSDK.RulesScoring.Field(); + field1.setAPIName("Last_Name"); + await criteria3.setField(field1); + criteria3.setComparator("equal"); + criteria3.setValue("SDK"); + group.push(criteria3); + criteria.setGroup(group); + await fieldRule.setCriteria(criteria); + fieldRules.push(fieldRule); + scoringRule.setFieldRules(fieldRules); + let signalRules = []; + let signalRule = new ZOHOCRMSDK.RulesScoring.SignalRule(); + signalRule.setId("4836976111233"); + signalRule.setScore(10); + let signal = new ZOHOCRMSDK.RulesScoring.Signal(); + signal.setId(4876876112019n); + signal.setNamespace(new ZOHOCRMSDK.Choice("Email_Incoming__s")); + await signalRule.setSignal(signal); + signalRules.add(signalRule); + scoringRule.setSignalRules(signalRules); + scoringRules.push(scoringRule); + bodyWrapper.setScoringRules(scoringRules); + + let response = scoringRulesOperations.updateScoringRules(bodyWrapper); + + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) + { + if (responseObject instanceof ZOHOCRMSDK.RulesScoring.ActionWrapper) + { + let scoringRules = responseObject.getScoringRules(); + scoringRules.forEach(scoringRule=>{ + if (responseObject instanceof ZOHOCRMSDK.RulesScoring.SuccessResponse) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + let details = responseObject.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + else if (responseObject instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + let details = responseObject.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RulesScoring.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + let details = responseObject.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let id = 42300312321312321n; +await UpdateScoringRules.initialize(); +await UpdateScoringRules.updateScoringRules(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/send_mail/sendMail.js b/versions/3.0.0/samples/send_mail/sendMail.js new file mode 100644 index 0000000..0ffee50 --- /dev/null +++ b/versions/3.0.0/samples/send_mail/sendMail.js @@ -0,0 +1,108 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class SendMail{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async sendMail(recordId, moduleAPIName) { + let sendMailOperations = new ZOHOCRMSDK.MailSend.SendMailOperations(recordId, moduleAPIName); + let mail = new ZOHOCRMSDK.MailSend.Data(); + let from = new ZOHOCRMSDK.MailSend.From(); + from.setUserName("userName1"); + from.setEmail("abc@gmail.com"); + await mail.setFrom(from); + let to = new ZOHOCRMSDK.MailSend.To(); + to.setUserName("userName2"); + to.setEmail("abc1@gmail.com"); + mail.setTo([to]); + let cc = new ZOHOCRMSDK.MailSend.To(); + cc.setUserName("username"); + cc.setEmail("abc@gmail.com"); + mail.setCc([cc]); + let bcc = new ZOHOCRMSDK.MailSend.To(); + bcc.setUserName("username1"); + bcc.setEmail("abc1@gmail.com"); + mail.setBcc([bcc]); + mail.setOrgEmail(false); + mail.setInReplyTo("2423rdsdreferfwd4e234qd35tfer65erwqxdfdesdef"); + mail.setScheduledTime(new Date(2023,11, 11, 10, 22, 23)); + let attachment = new ZOHOCRMSDK.Attachments.Attachment(); + attachment.setFileId("23242354dedfrfrer434124343232423434sdfrecrfedxwdzws"); + mail.setAttachments([attachment]); + mail.setSubject("Mail subject"); + mail.setContent("
Consent form link




REGARDS,

AZ
ADMIN
"); + mail.setConsentEmail(true); + mail.setMailFormat(new ZOHOCRMSDK.Choice("html")); + let template = new ZOHOCRMSDK.EmailTemplates.EmailTemplate(); + template.setId(440248627040n); + template.setSubject("testing the template"); + await mail.setTemplate(template); + let wrapper = new ZOHOCRMSDK.MailSend.BodyWrapper(); + wrapper.setData([mail]); + //Call sendMail method + let response = await sendMailOperations.sendMail(wrapper); + if (response != null) { + console.log("Status code " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.MailSend.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.MailSend.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.MailSend.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.MailSend.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await SendMail.initialize(); +let recordId = 440248774074n; +let moduleAPIName = "leads"; +await SendMail.sendMail(recordId,moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/servicepreferences/GetServicePreference.js b/versions/3.0.0/samples/servicepreferences/GetServicePreference.js new file mode 100644 index 0000000..be73f0f --- /dev/null +++ b/versions/3.0.0/samples/servicepreferences/GetServicePreference.js @@ -0,0 +1,53 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetServicePreference +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getServicePreference() + { + let servicePreferenceOperations = new ZOHOCRMSDK.PreferenceService.ServicePreferenceOperations(); + let response = await servicePreferenceOperations.getServicePreference(); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject instanceof ZOHOCRMSDK.PreferenceService.ResponseWrapper) + { + let servicePreference = responseObject.getServicePreferences(); + if (servicePreference != null) + { + console.log("JobSheetEnabled : " + servicePreference.getJobSheetEnabled()); + } + } + else if (responseObject instanceof ZOHOCRMSDK.PreferenceService.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } +} +await GetServicePreference.initialize(); +await GetServicePreference.getServicePreference(); \ No newline at end of file diff --git a/versions/3.0.0/samples/servicepreferences/UpdateServicePreference.js b/versions/3.0.0/samples/servicepreferences/UpdateServicePreference.js new file mode 100644 index 0000000..3a3cbfb --- /dev/null +++ b/versions/3.0.0/samples/servicepreferences/UpdateServicePreference.js @@ -0,0 +1,73 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateServicePreference +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateServicePreference() { + let servicePreferenceOperations = new ZOHOCRMSDK.PreferenceService.ServicePreferenceOperations(); + let request = new ZOHOCRMSDK.PreferenceService.BodyWrapper(); + let servicePreferences = new ZOHOCRMSDK.PreferenceService.ServicePreference(); + servicePreferences.setJobSheetEnabled(true); + await request.setServicePreferences(servicePreferences); + let response =await servicePreferenceOperations.updateServicePreference(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.PreferenceService.ActionWrapper) { + let actionResponse = actionHandler.getServicePreferences(); + if (actionResponse instanceof ZOHOCRMSDK.PreferenceService.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.PreferenceService.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + } else if (actionHandler instanceof ZOHOCRMSDK.PreferenceService.APIException) { + console.log("Status: " + actionHandler.getStatus().getValue()); + console.log("Code: " + actionHandler.getCode().getValue()); + console.log("Details"); + let details = actionHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionHandler.getMessage()); + } + } + } +} +await UpdateServicePreference.initialize(); +await UpdateServicePreference.updateServicePreference(); \ No newline at end of file diff --git a/versions/3.0.0/samples/share_records/getSharedRecordDetails.js b/versions/3.0.0/samples/share_records/getSharedRecordDetails.js new file mode 100644 index 0000000..cc092cd --- /dev/null +++ b/versions/3.0.0/samples/share_records/getSharedRecordDetails.js @@ -0,0 +1,97 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetSharedRecordDetails{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .grantToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Shared Record Details

+ * This method is used to get the details of a shared record and print the response. + * @param {String} moduleAPIName The API Name of the module to get shared record details. + * @param {BigInt} recordId The ID of the record to be obtain shared information + */ + static async getSharedRecordDetails(moduleAPIName, recordId) { + //example + //let moduleAPIName = "module_api_name"; + //let recordId = 2112011n; + let sharedRecordsOperations = new ZOHOCRMSDK.RecordsShare.ShareRecordsOperations(recordId, moduleAPIName); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters of Get Shared Record Details operation */ + await paramInstance.add(ZOHOCRMSDK.RecordsShare.GetSharedRecordDetailsParam.VIEW, "summary"); + // await paramInstance.add(ZOHOCRMSDK.RecordsShare.GetSharedRecordDetailsParam.SHAREDTO, "00302031"); + //Call getSharedRecordDetails method that takes ParameterMap instance as parameter + let response = await sharedRecordsOperations.getSharedRecordDetails(paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.RecordsShare.ResponseWrapper) { + let shareRecords = responseObject.getShare(); + shareRecords.forEach(shareRecord => { + console.log("ShareRecord ShareRelatedRecords: " + shareRecord.getShareRelatedRecords()); + let sharedThrough = shareRecord.getSharedThrough(); + if (sharedThrough != null) { + console.log("ShareRecord SharedThrough EntityName: " + sharedThrough.getEntityName()); + let module = sharedThrough.getModule(); + if (module != null) { + console.log("ShareRecord SharedThrough Module ID: " + module.getId()); + console.log("ShareRecord SharedThrough Module Name: " + module.getName()); + } + console.log("ShareRecord SharedThrough ID: " + sharedThrough.getId()); + } + console.log("ShareRecord SharedTime: " + shareRecord.getSharedTime()); + console.log("ShareRecord Permission: " + shareRecord.getPermission().getValue()); + let sharedBy = shareRecord.getSharedBy(); + if (sharedBy != null) { + console.log("ShareRecord SharedBy-ID: " + sharedBy.getId()); + console.log("ShareRecord SharedBy-FullName: " + sharedBy.getFullName()); + console.log("ShareRecord SharedBy-Zuid: " + sharedBy.getZuid()); + } + let user = shareRecord.getUser(); + if (user != null) { + console.log("ShareRecord User-ID: " + user.getId()); + console.log("ShareRecord User-FullName: " + user.getFullName()); + console.log("ShareRecord User-Zuid: " + user.getZuid()); + } + }); + let shareableUsers = responseObject.getShareableUser(); + if (shareableUsers != null) { + shareableUsers.forEach(shareableUser => { + console.log("Shareable User User-ID: " + shareableUser.getId()); + console.log("Shareable User User-FullName: " + shareableUser.getFullName()); + console.log("Shareable User User-Zuid: " + shareableUser.getZuid()); + }); + } + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsShare.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetSharedRecordDetails.initialize(); +let moduleAPIName = "Leads"; +let recordId = 440248774074n; +await GetSharedRecordDetails.getSharedRecordDetails(moduleAPIName,recordId); \ No newline at end of file diff --git a/versions/3.0.0/samples/share_records/revokeSharedRecord.js b/versions/3.0.0/samples/share_records/revokeSharedRecord.js new file mode 100644 index 0000000..ed2cb57 --- /dev/null +++ b/versions/3.0.0/samples/share_records/revokeSharedRecord.js @@ -0,0 +1,78 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class RevokeSharedRecord{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .grantToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Revoke Shared Record

+ * This method is used to revoke access to a shared record that was shared to users and print the response. + * @param {String} moduleAPIName The API Name of the module to revoke shared record. + * @param {BigInt} recordId The ID of the record + */ + static async revokeSharedRecord(moduleAPIName, recordId) { + //example + //let moduleAPIName = "module_api_name"; + // let recordId = 2112011n; + let shareRecordsOperations = new ZOHOCRMSDK.RecordsShare.ShareRecordsOperations(recordId, moduleAPIName); + //Call revokeSharedRecord method + let response = await shareRecordsOperations.revokeSharedRecord(); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.RecordsShare.DeleteActionWrapper) { + let deleteActionResponse = responseObject.getShare(); + if (deleteActionResponse instanceof ZOHOCRMSDK.RecordsShare.SuccessResponse) { + console.log("Status: " + deleteActionResponse.getStatus().getValue()); + console.log("Code: " + deleteActionResponse.getCode().getValue()); + console.log("Details"); + let details = deleteActionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + deleteActionResponse.getMessage().getValue()); + } + else if (deleteActionResponse instanceof ZOHOCRMSDK.RecordsShare.APIException) { + console.log("Status: " + deleteActionResponse.getStatus().getValue()); + console.log("Code: " + deleteActionResponse.getCode().getValue()); + console.log("Details"); + let details = deleteActionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + deleteActionResponse.getMessage().getValue()); + } + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsShare.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await RevokeSharedRecord.initialize(); +let moduleAPIName = "Leads"; +let recordId = 4402480074074n; +await RevokeSharedRecord.revokeSharedRecord(moduleAPIName,recordId); \ No newline at end of file diff --git a/versions/3.0.0/samples/share_records/shareRecord.js b/versions/3.0.0/samples/share_records/shareRecord.js new file mode 100644 index 0000000..8f93444 --- /dev/null +++ b/versions/3.0.0/samples/share_records/shareRecord.js @@ -0,0 +1,111 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class ShareRecord{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Share Record

+ * This method is used to share the record and print the response. + * @param {String} moduleAPIName The API Name of the module to share record. + * @param {BigInt} recordId The ID of the record to be shared + */ + static async shareRecord(moduleAPIName, recordId) { + //example + //let moduleAPIName = "module_api_name"; + // let recordId = 112011n; + let sharedRecordsOperations = new ZOHOCRMSDK.RecordsShare.ShareRecordsOperations(recordId, moduleAPIName); + let request = new ZOHOCRMSDK.RecordsShare.BodyWrapper(); + let shareList = []; + let share1 = new ZOHOCRMSDK.RecordsShare.ShareRecord(); + for (let i = 0; i < 9; i++) + { + share1 = new ZOHOCRMSDK.RecordsShare.ShareRecord(); + share1.setShareRelatedRecords(true); + share1.setPermission(new ZOHOCRMSDK.Choice("read_write")); + let user = new ZOHOCRMSDK.Users.Users(); + user.setId(3477061173021n); + await share1.setUser(user); + let sharedWith = new ZOHOCRMSDK.Users.Users(); + sharedWith.setId(34770615791024n); + sharedWith.addKeyValue("type", "users"); + await share1.setSharedWith(sharedWith); + share1.setType(new ZOHOCRMSDK.Choice("private")); + shareList.add(share1); + } + share1.setShareRelatedRecords(true); + share1.setPermission(new ZOHOCRMSDK.Choice("read_write")); + let user = new ZOHOCRMSDK.Users.Users(); + user.setId(4402480394086n); + await share1.setUser(user); + let sharedWith = new ZOHOCRMSDK.Users.Users(); + sharedWith.setId(44024801394107n); + sharedWith.addKeyValue("type", "roles"); + await share1.setSharedWith(sharedWith); + share1.setType(new ZOHOCRMSDK.Choice("private")); + shareList.push(share1); + request.setNotify(true); + request.setShare(shareList); + //Call shareRecord method that takes BodyWrapper instance as parameter + let response = await sharedRecordsOperations.shareRecord(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.RecordsShare.ActionWrapper) { + let actionResponses = responseObject.getShare(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.RecordsShare.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.RecordsShare.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsShare.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await ShareRecord.initialize(); +let moduleAPIName = "Leads"; +let recordId = 4402480774074n; +await ShareRecord.shareRecord(moduleAPIName,recordId); \ No newline at end of file diff --git a/versions/3.0.0/samples/share_records/updateSharePermissions.js b/versions/3.0.0/samples/share_records/updateSharePermissions.js new file mode 100644 index 0000000..5264cb0 --- /dev/null +++ b/versions/3.0.0/samples/share_records/updateSharePermissions.js @@ -0,0 +1,92 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateSharePermissions{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Share Permissions

+ * This method is used to update the sharing permissions of a record granted to users as Read-Write, Read-only, or grant full access. + * @param {String} moduleAPIName The API Name of the module to update share permissions. + * @param {BigInt} recordId The ID of the record + */ + static async updateSharePermissions(moduleAPIName, recordId) { + //example + //let moduleAPIName = "module_api_name"; + // let recordId = 12011n; + let sharedRecordsOperations = new ZOHOCRMSDK.RecordsShare.ShareRecordsOperations(recordId, moduleAPIName); + let request = new ZOHOCRMSDK.RecordsShare.BodyWrapper(); + //Array to hold ShareRecord instances + let shareRecordArray = []; + let shareRecord = new ZOHOCRMSDK.RecordsShare.ShareRecord(); + shareRecord.setPermission("full_access"); + shareRecord.setShareRelatedRecords(true); + let user = new ZOHOCRMSDK.Users.Users(); + user.setId(34770615791024n); + await shareRecord.setUser(user); + //Add the instance to array + shareRecordArray.push(shareRecord); + request.setShare(shareRecordArray); + //Call updateSharePermissions method that takes BodyWrapper instance as parameter + let response = await sharedRecordsOperations.updateSharePermissions(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.RecordsShare.ActionWrapper) { + let actionResponses = responseObject.getShare(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.RecordsShare.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.RecordsShare.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.RecordsShare.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateSharePermissions.initialize(); +let moduleAPIName = "leads"; +let recordId = 12121n; +await UpdateSharePermissions.updateSharePermissions(moduleAPIName,recordId); \ No newline at end of file diff --git a/versions/3.0.0/samples/shiftHours/createShiftHours.js b/versions/3.0.0/samples/shiftHours/createShiftHours.js new file mode 100644 index 0000000..e216e6b --- /dev/null +++ b/versions/3.0.0/samples/shiftHours/createShiftHours.js @@ -0,0 +1,166 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +import moment from "moment-timezone"; +class CreateShiftHours +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createShiftHours() + { + let shiftHoursOerations = new ZOHOCRMSDK.HoursShift.ShiftHoursOperations("4400020813"); + let request = new ZOHOCRMSDK.HoursShift.BodyWrapper(); + let shiftHours = []; + let shiftHour = new ZOHOCRMSDK.HoursShift.ShiftHours(); + await shiftHour.setTimezone(moment.tz.zone('Asia/Kolkata')); + shiftHour.setName("Shift hours"); + shiftHour.setSameAsEveryday(false); + let shiftDays = []; + shiftDays.push(new ZOHOCRMSDK.Choice("Monday")); + shiftDays.push(new ZOHOCRMSDK.Choice("Tuesday")); + shiftHour.setShiftDays(shiftDays); + // if Same_as_EveryDay is true + let dailyTiming = []; + dailyTiming.push("10:00"); + dailyTiming.push("19:00"); + shiftHour.setDailyTiming(dailyTiming); + // if same_as_everyday is false + let customTimings = []; + let customTiming = new ZOHOCRMSDK.HoursShift.ShiftCustomTiming(); + let shifttiming = []; + shifttiming.push("10:00"); + shifttiming.push("19:00"); + customTiming.setShiftTiming(shifttiming); + customTiming.setDays("Monday"); + customTimings.push(customTiming); + let customTiming1 = new ZOHOCRMSDK.HoursShift.ShiftCustomTiming(); + let shifttiming1 = []; + shifttiming1.push("10:00"); + shifttiming1.push("19:00"); + customTiming1.setShiftTiming(shifttiming1); + customTiming1.setDays("Tuesday"); + customTimings.push(customTiming1); + shiftHour.setCustomTiming(customTimings); + // + let breakHours = []; + let breakHour = new ZOHOCRMSDK.HoursShift.BreakHours(); + let breakDays = []; + breakDays.push(new ZOHOCRMSDK.Choice("Monday")); + breakDays.push(new ZOHOCRMSDK.Choice("Tuesday")); + breakHour.setBreakDays(breakDays); + // if same_as_everyDay is true + breakHour.setSameAsEveryday(true); + let dailyTimingForBreakHours = []; + dailyTimingForBreakHours.push("11:00"); + dailyTimingForBreakHours.push("11:00"); + breakHour.setDailyTiming(dailyTimingForBreakHours); + breakHours.push(breakHour); + shiftHour.setBreakHours(breakHours); + // if same_as_EveryDay is false + breakHour.setSameAsEveryday(false); + let customTimingForBreakHours = []; + let customTimingForBreakHour = new ZOHOCRMSDK.HoursShift.BreakCustomTiming(); + let breaktimings = []; + breaktimings.push("12:00"); + breaktimings.push("12:15"); + customTimingForBreakHour.setBreakTiming(breaktimings); + customTimingForBreakHour.setDays("Monday"); + customTimingForBreakHours.push(customTimingForBreakHour); + let customTimingForBreakHour1 = new ZOHOCRMSDK.HoursShift.BreakCustomTiming(); + let breaktimings1 = []; + breaktimings1.push("12:00"); + breaktimings1.push("12:15"); + customTimingForBreakHour1.setBreakTiming(breaktimings1); + customTimingForBreakHour1.setDays("Tuesday"); + customTimingForBreakHours.push(customTimingForBreakHour1); + breakHour.setCustomTiming(customTimingForBreakHours); + breakHours.push(breakHour); + shiftHour.setBreakHours(breakHours); + // + let users = []; + let user = new ZOHOCRMSDK.HoursShift.Users(); + user.setId(403424243242432n); + user.setEffectiveFrom(new Date(2020, 12, 12)); + users.push(user); + shiftHour.setUsers(users); + let holidays = []; + let holiday = new ZOHOCRMSDK.HoursShift.Holidays(); + holiday.setDate(new Date(2020, 12, 12)); + // holiday.setId(4043241233231233n); + holiday.setName("holi"); + holiday.setYear(2020); + holidays.push(holiday); + shiftHour.setHolidays(holidays); + shiftHours.push(shiftHour); + request.setShiftHours(shiftHours); + let response = await shiftHoursOerations.createShiftsHours(request); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.HoursShift.ActionWrapper) + { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getShiftHours(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.HoursShift.SuccessResponse) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.HoursShift.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() +"\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.HoursShift.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await CreateShiftHours.initialize(); +await CreateShiftHours.createShiftHours(); \ No newline at end of file diff --git a/versions/3.0.0/samples/shiftHours/deleteShiftHours.js b/versions/3.0.0/samples/shiftHours/deleteShiftHours.js new file mode 100644 index 0000000..3caa631 --- /dev/null +++ b/versions/3.0.0/samples/shiftHours/deleteShiftHours.js @@ -0,0 +1,82 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class DeleteShiftHours +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async deleteShiftHours(id){ + let shiftHoursOperations = new ZOHOCRMSDK.HoursShift.ShiftHoursOperations("440240020813"); + let response = await shiftHoursOperations.deleteShiftHour(id); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.HoursShift.ActionWrapper) + { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getShiftHours(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.HoursShift.SuccessResponse) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.HoursShift.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() +"\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.HoursShift.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let id = 440241411007n; +await DeleteShiftHours.initialize(); +await DeleteShiftHours.deleteShiftHours(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/shiftHours/getShiftHour.js b/versions/3.0.0/samples/shiftHours/getShiftHour.js new file mode 100644 index 0000000..2a7ecb7 --- /dev/null +++ b/versions/3.0.0/samples/shiftHours/getShiftHour.js @@ -0,0 +1,169 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetShiftHour +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getShiftHour(id) + { + let shiftHoursOperations = new ZOHOCRMSDK.HoursShift.ShiftHoursOperations("4402480020813"); + let response =await shiftHoursOperations.getShiftHour(id); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject instanceof ZOHOCRMSDK.HoursShift.ResponseWrapper) + { + let responseWrapper = responseObject; + let shiftcount = responseWrapper.getShiftCount(); + if (shiftcount != null) + { + console.log("Shift_Count : " + "\n"); + console.log("total_Shift_with_user : " + shiftcount.getTotalShiftWithUser() + "\n"); + console.log("total_Shift : " + shiftcount.getTotalShift() + "\n"); + } + let shiftHours = responseWrapper.getShiftHours(); + if (shiftHours != null) + { + shiftHours.forEach(shiftHour => { + console.log("name: " + shiftHour.getName() + "\n"); + console.log("same_as_everyday : " + shiftHour.getSameAsEveryday() + "\n"); + console.log("Users_count : " + shiftHour.getUsersCount() + "\n"); + console.log("timeZone : " + shiftHour.getTimezone().name + "\n"); + let shiftDays = shiftHour.getShiftDays(); + if (shiftDays != null) + { + console.log("ShiftDays : " +"\n"); + shiftDays.forEach(shiftDay => { + console.log(shiftDay + "\n"); + }); + } + let dailyTimings = shiftHour.getDailyTiming(); + if (dailyTimings != null) + { + console.log("DailyTiming : \n"); + dailyTimings.forEach(dailyTiming => { + console.log(dailyTiming + "\n"); + }); + } + let customTimings = shiftHour.getCustomTiming(); + if (customTimings != null) + { + console.log("Custom_Timing : \n"); + customTimings.forEach(customTiming => { + let shiftTiming = customTiming.getShiftTiming(); + console.log("shift_Timing : \n"); + shiftTiming.forEach(shifttimng => { + console.log(shifttimng + "\n"); + }); + console.log("days : " + customTiming.getDays().getValue() + "\n"); + }); + } + let holidays = shiftHour.getHolidays(); + if (holidays != null) + { + console.log("Holidays : \n"); + holidays.forEach(holiday => { + console.log("date: " + holiday.getDate().toString() + "\n"); + console.log("year: " + holiday.getYear().toString() + "\n"); + console.log("name: " + holiday.getName() + "\n"); + console.log("Id: " + holiday.getId() + "\n"); + }); + } + let users = shiftHour.getUsers(); + if (users != null) + { + console.log("Users : \n"); + users.forEach(user => { + console.log("User-Id : " + user.getId() + "\n"); + console.log("User-Name : " + user.getName() + "\n"); + console.log("User-Mail : " + user.getEmail() + "\n"); + let role = user.getRole(); + if (role != null) + { + if (role instanceof ZOHOCRMSDK.HoursShift.Role) + { + console.log("Role Name : " + role.getName() + "\n"); + console.log("Role ID : " + role.getId() + "\n"); + } + } + console.log("user-ZUID : " + user.getZuid() + "\n"); + console.log("effective_from : " + user.getEffectiveFrom() + "\n"); + }); + } + let breakHours = shiftHour.getBreakHours(); + if (breakHours != null) + { + breakHours.forEach(breakHour => { + console.log("BreakHour_Id: " + breakHour.getId() + "\n"); + console.log("same_as_Everyday: " + breakHour.getSameAsEveryday() + "\n"); + let breakDays = breakHour.getBreakDays(); + if (breakDays != null) + { + breakDays.forEach(breakDay => { + console.log("BreakDays: " + breakDay +"\n"); + }); + } + let dailyTimings = breakHour.getDailyTiming(); + if (dailyTimings != null) + { + dailyTimings.forEach(dailyTiming=>{ + console.log("daily_timing : " + dailyTiming + "\n"); + }); + } + let breakHoursCustomTimings = breakHour.getCustomTiming(); + if (breakHoursCustomTimings != null) + { + breakHoursCustomTimings.forEach(breakHoursCustomTiming => { + console.log("CustomTimin : \n"); + let breakTimings = breakHoursCustomTiming.getBreakTiming(); + if (breakTimings != null) + { + breakTimings.forEach(breakTiming => { + console.log("breakTiming : " + breakTiming + "\n"); + }); + console.log("days : " + breakHoursCustomTiming.getDays().getValue() + "\n"); + } + }); + } + }); + } + }); + } + } + else if (responseObject instanceof ZOHOCRMSDK.HoursShift.APIException) + { + let exception = responseObject; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let id = 4402480001413025n; +await GetShiftHour.initialize(); +await GetShiftHour.getShiftHour(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/shiftHours/getShiftHours.js b/versions/3.0.0/samples/shiftHours/getShiftHours.js new file mode 100644 index 0000000..ba501a4 --- /dev/null +++ b/versions/3.0.0/samples/shiftHours/getShiftHours.js @@ -0,0 +1,169 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetShiftHours +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getShiftHours() + { + let shiftHoursOperations = new ZOHOCRMSDK.HoursShift.ShiftHoursOperations("44024020813"); + let response = await shiftHoursOperations.getShiftHours(); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject instanceof ZOHOCRMSDK.HoursShift.ResponseWrapper) + { + let responseWrapper = responseObject; + let shiftcount = responseWrapper.getShiftCount(); + if (shiftcount != null) + { + console.log("Shift_Count : " + "\n"); + console.log("total_Shift_with_user : " + shiftcount.getTotalShiftWithUser() + "\n"); + console.log("total_Shift : " + shiftcount.getTotalShift() + "\n"); + } + let shiftHours = responseWrapper.getShiftHours(); + if (shiftHours != null) + { + shiftHours.forEach(shiftHour => { + console.log("name: " + shiftHour.getName() + "\n"); + console.log("same_as_everyday : " + shiftHour.getSameAsEveryday() + "\n"); + console.log("shiftHour ID : " + shiftHour.getId() + "\n"); + console.log("Users_count : " + shiftHour.getUsersCount() + "\n"); + console.log("timeZone : " + shiftHour.getTimezone().name + "\n"); + let shiftDays = shiftHour.getShiftDays(); + if (shiftDays != null) + { + console.log("ShiftDays : " +"\n"); + shiftDays.forEach(shiftDay => { + console.log(shiftDay + "\n"); + }); + } + let dailyTimings = shiftHour.getDailyTiming(); + if (dailyTimings != null) + { + console.log("DailyTiming : \n"); + dailyTimings.forEach(dailyTiming => { + console.log(dailyTiming + "\n"); + }); + } + let customTimings = shiftHour.getCustomTiming(); + if (customTimings != null) + { + console.log("Custom_Timing : \n"); + customTimings.forEach(customTiming => { + let shiftTiming = customTiming.getShiftTiming(); + console.log("shift_Timing : \n"); + shiftTiming.forEach(shifttimng => { + console.log(shifttimng + "\n"); + }); + console.log("days : " + customTiming.getDays().getValue() + "\n"); + }); + } + let holidays = shiftHour.getHolidays(); + if (holidays != null) + { + console.log("Holidays : \n"); + holidays.forEach(holiday => { + console.log("date: " + holiday.getDate().toString() + "\n"); + console.log("year: " + holiday.getYear().toString() + "\n"); + console.log("name: " + holiday.getName() + "\n"); + console.log("Id: " + holiday.getId() + "\n"); + }); + } + let users = shiftHour.getUsers(); + if (users != null) + { + console.log("Users : \n"); + users.forEach(user => { + console.log("User-Id : " + user.getId() + "\n"); + console.log("User-Name : " + user.getName() + "\n"); + console.log("User-Mail : " + user.getEmail() + "\n"); + let role = user.getRole(); + if (role != null) + { + if (role instanceof ZOHOCRMSDK.HoursShift.Role) + { + console.log("Role Name : " + role.getName() + "\n"); + console.log("Role ID : " + role.getId() + "\n"); + } + } + console.log("user-ZUID : " + user.getZuid() + "\n"); + console.log("effective_from : " + user.getEffectiveFrom() + "\n"); + }); + } + let breakHours = shiftHour.getBreakHours(); + if (breakHours != null) + { + breakHours.forEach(breakHour => { + console.log("BreakHour_Id: " + breakHour.getId() + "\n"); + console.log("same_as_Everyday: " + breakHour.getSameAsEveryday() + "\n"); + let breakDays = breakHour.getBreakDays(); + if (breakDays != null) + { + breakDays.forEach(breakDay => { + console.log("BreakDays: " + breakDay +"\n"); + }); + } + let dailyTimings = breakHour.getDailyTiming(); + if (dailyTimings != null) + { + dailyTimings.forEach(dailyTiming=>{ + console.log("daily_timing : " + dailyTiming + "\n"); + }); + } + let breakHoursCustomTimings = breakHour.getCustomTiming(); + if (breakHoursCustomTimings != null) + { + breakHoursCustomTimings.forEach(breakHoursCustomTiming => { + console.log("CustomTimin : \n"); + let breakTimings = breakHoursCustomTiming.getBreakTiming(); + if (breakTimings != null) + { + breakTimings.forEach(breakTiming => { + console.log("breakTiming : " + breakTiming + "\n"); + }); + console.log("days : " + breakHoursCustomTiming.getDays().getValue() + "\n"); + } + }); + } + }); + } + }); + } + } + else if (responseObject instanceof ZOHOCRMSDK.HoursShift.APIException) + { + let exception = responseObject; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await GetShiftHours.initialize(); +await GetShiftHours.getShiftHours(); \ No newline at end of file diff --git a/versions/3.0.0/samples/shiftHours/updateShiftHours.js b/versions/3.0.0/samples/shiftHours/updateShiftHours.js new file mode 100644 index 0000000..b08a9b5 --- /dev/null +++ b/versions/3.0.0/samples/shiftHours/updateShiftHours.js @@ -0,0 +1,154 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateShiftHours +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateShiftHours() + { + let shiftHoursOerations = new ZOHOCRMSDK.HoursShift.ShiftHoursOperations("4342342342343443"); + let request = new ZOHOCRMSDK.HoursShift.BodyWrapper(); + let shiftHours = []; + let shiftHour = new ZOHOCRMSDK.HoursShift.ShiftHours(); + shiftHour.setId(4042342334323n); + await shiftHour.setTimezone(moment.tz.zone('Asia/Kolkata')); + shiftHour.setName("Shift hours updated"); + shiftHour.setSameAsEveryday(true); + let dailyTimings = []; + dailyTimings.push("10:00"); + dailyTimings.push("19:00"); + shiftHour.setDailyTiming(dailyTimings); + // when same_as_everyday is false + let customTimings = []; + let customTiming = new ZOHOCRMSDK.HoursShift.ShiftCustomTiming(); + let shiftTiming = []; + shiftTiming.push("10:00"); + shiftTiming.push("19:00"); + customTiming.setShiftTiming(shiftTiming); + customTiming.setDays("Monday"); + customTimings.push(customTiming); + let customTiming1 = new ZOHOCRMSDK.HoursShift.ShiftCustomTiming(); + let shiftTiming1 = []; + shiftTiming1.push("10:00"); + shiftTiming1.push("19:00"); + customTiming1.setShiftTiming(shiftTiming1); + customTiming1.setDays("Monday"); + customTimings.push(customTiming1); + shiftHour.setCustomTiming(customTimings); + let users = []; + let user = new ZOHOCRMSDK.HoursShift.Users(); + user.setId(40423378721312n); + user.setEffectiveFrom(new Date(2020, 12, 12)); + users.push(user); + shiftHour.setUsers(users); + let holidays =[]; + let holiday = new ZOHOCRMSDK.HoursShift.Holidays(); + holiday.setDate(new Date(2020, 12, 12)); + holiday.setId(4232240323214n); + holiday.setName("Holiday Name"); + holiday.setYear(2020); + holidays.push(holiday); + shiftHour.setHolidays(holidays); + // + let breakHours = []; + let breakHour = new ZOHOCRMSDK.HoursShift.BreakHours(); + let breakDays = []; + breakDays.push(new ZOHOCRMSDK.Choice("Monday")); + breakHour.setBreakDays(breakDays); + // if same_as_everyDay is true + breakHour.setSameAsEveryday(true); + let dailyTimingForBreakHours = []; + dailyTimingForBreakHours.push("11:00"); + dailyTimingForBreakHours.push("11:00"); + breakHour.setDailyTiming(dailyTimingForBreakHours); + breakHours.push(breakHour); + shiftHour.setBreakHours(breakHours); + // if same_as_EveryDay is false + breakHour.setSameAsEveryday(false); + let customTimingForBreakHours = []; + let customTimingForBreakHour = new ZOHOCRMSDK.HoursShift.BreakCustomTiming(); + let breaktimings = []; + breaktimings.push("12:00"); + breaktimings.push("12:15"); + customTimingForBreakHour.setBreakTiming(breaktimings); + customTimingForBreakHour.setDays("Monday"); + customTimingForBreakHours.push(customTimingForBreakHour); + breakHour.setCustomTiming(customTimingForBreakHours); + breakHours.push(breakHour); + shiftHour.setBreakHours(breakHours); + // + shiftHours.push(shiftHour); + request.setShiftHours(shiftHours); + let response = shiftHoursOerations.updateShiftHours(request); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.HoursShift.ActionWrapper) + { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getShiftHours(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.HoursShift.SuccessResponse) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.HoursShift.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() +"\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.HoursShift.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await UpdateShiftHours.initialize(); +await UpdateShiftHours.updateShiftHours(); \ No newline at end of file diff --git a/versions/3.0.0/samples/tags/addTagsToMultipleRecords.js b/versions/3.0.0/samples/tags/addTagsToMultipleRecords.js new file mode 100644 index 0000000..388cce5 --- /dev/null +++ b/versions/3.0.0/samples/tags/addTagsToMultipleRecords.js @@ -0,0 +1,95 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class AddTagsToMultipleRecords{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Add Tags To Multiple Records

+ * This method is used to add tags to multiple records simultaneously and print the response. + * @param {String} moduleAPIName The API Name of the module to add tags. + * @param {Array} recordIds The array of the record IDs to add tags + */ + static async addTagsToMultipleRecords(moduleAPIName, recordIds) { + //example + // let moduleAPIName = "module_api_name"; + // let tagNames = ["addtag1,addtag12"]; + // let recordIds = [34023026n, 527003n, 344028n]; + //Get instance of TagsOperations Class + let tagsOperations = new ZOHOCRMSDK.Tags.TagsOperations(); + let request = new ZOHOCRMSDK.Tags.NewTagRequestWrapper(); + let tagList = []; + let tag1 = new ZOHOCRMSDK.Tags.Tag(); + tag1.setName("tagNam3e3e12345"); + tagList.push(tag1); + request.setTags(tagList); + request.setOverWrite(true); + request.setIds(recordIds); + request.setOverWrite(false); + //Get instance of ParameterMap Class + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Tags.AddTagsToMultipleRecordsParam.OVER_WRITE, "false"); + //Call addTagsToMultipleRecords method that takes ParameterMap instance and moduleAPIName as parameter + let response = await tagsOperations.addTagsToMultipleRecords(moduleAPIName, request, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + //Get object from response + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Tags.RecordActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Tags.RecordSuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await AddTagsToMultipleRecords.initialize(); +let moduleAPIName = "leads"; +let recordIds = ["440248074","440241371049"]; +await AddTagsToMultipleRecords.addTagsToMultipleRecords(moduleAPIName,recordIds); \ No newline at end of file diff --git a/versions/3.0.0/samples/tags/addTagsToRecord.js b/versions/3.0.0/samples/tags/addTagsToRecord.js new file mode 100644 index 0000000..73c0d3f --- /dev/null +++ b/versions/3.0.0/samples/tags/addTagsToRecord.js @@ -0,0 +1,92 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class AddTagsToRecord{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Add Tags To Record

+ * This method is used to add tags to a specific record and print the response. + * @param {String} moduleAPIName The API Name of the module to add tag. + * @param {BigInt} recordId The ID of the record to add tag + */ + static async addTagsToRecord(moduleAPIName, recordId) { + //example + // let moduleAPIName = "module_api_name"; + // let recordId = 2157023n; + // let tagNames = ["addtag1,addtag12"]; + //Get instance of TagsOperations Class + let tagsOperations = new ZOHOCRMSDK.Tags.TagsOperations(); + let request = new ZOHOCRMSDK.Tags.NewTagRequestWrapper(); + let tagList = []; + let tag1 = new ZOHOCRMSDK.Tags.Tag(); + tag1.setName("tagNam3e3e12345"); + tagList.push(tag1); + request.setTags(tagList); + request.setOverWrite(false); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Tags.AddTagsParam.OVER_WRITE, "false"); + //Call addTagsToRecord method that takes paramInstance, moduleAPIName and recordId as parameter + let response = await tagsOperations.addTags(recordId, moduleAPIName, request, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + //Get object from response + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Tags.RecordActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Tags.RecordSuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await AddTagsToRecord.initialize(); +let moduleAPIName = "leads"; +let recordId = 44024800774074n; +await AddTagsToRecord.addTagsToRecord(moduleAPIName,recordId); \ No newline at end of file diff --git a/versions/3.0.0/samples/tags/createTags.js b/versions/3.0.0/samples/tags/createTags.js new file mode 100644 index 0000000..730134a --- /dev/null +++ b/versions/3.0.0/samples/tags/createTags.js @@ -0,0 +1,87 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class CreateTags{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Create Tags

+ * This method is used to create new tags and print the response. + * @param {String} moduleAPIName The API Name of the module to create tags. + */ + static async createTags(moduleAPIName) { + //example + //let moduleAPIName = "module_api_name"; + //Get instance of TagsOperations Class + let tagsOperations = new ZOHOCRMSDK.Tags.TagsOperations(); + let request = new ZOHOCRMSDK.Tags.BodyWrapper(); + let tagList = []; + let tag1 = new ZOHOCRMSDK.Tags.Tag(); + tag1.setName("new Tag"); + tag1.setColorCode(new ZOHOCRMSDK.Choice("#F48435")); + tagList.push(tag1); + request.setTags(tagList); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Tags.CreateTagsParam.MODULE, moduleAPIName); + //Call createTags method that takes BodyWrapper instance and ParameterMap instance as parameter + let response = await tagsOperations.createTags(request, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Tags.ActionWrapper) { + let actionResponses = responseObject.getTags(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Tags.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await CreateTags.initialize(); +let moduleAPIName = "leads"; +await CreateTags.createTags(moduleAPIName); diff --git a/versions/3.0.0/samples/tags/deleteTag.js b/versions/3.0.0/samples/tags/deleteTag.js new file mode 100644 index 0000000..9cf4337 --- /dev/null +++ b/versions/3.0.0/samples/tags/deleteTag.js @@ -0,0 +1,78 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteTag{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Delete Tag

+ * This method is used to delete a tag from the module and print the response. + * @param {BigInt} tagId The ID of the tag to be deleted + */ + static async deleteTag(tagId) { + //example + //let tagId = 0661047n; + //Get instance of TagsOperations Class + let tagsOperations = new ZOHOCRMSDK.Tags.TagsOperations(); + //Call deleteTag method that takes tag id as parameter + let response = await tagsOperations.deleteTag(tagId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Tags.ActionWrapper) { + let actionResponses = responseObject.getTags(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Tags.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await DeleteTag.initialize(); +let tagId = 4402480391028n; +await DeleteTag.deleteTag(tagId); diff --git a/versions/3.0.0/samples/tags/getRecordCountForTag.js b/versions/3.0.0/samples/tags/getRecordCountForTag.js new file mode 100644 index 0000000..1276ca0 --- /dev/null +++ b/versions/3.0.0/samples/tags/getRecordCountForTag.js @@ -0,0 +1,57 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetRecordCountForTag{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Record Count For Tag

+ * This method is used to get the total number of records under a tag and print the response. + * @param {String} moduleAPIName The API Name of the module. + * @param {BigInt} tagId The ID of the tag to get the count + */ + static async getRecordCountForTag(moduleAPIName, tagId) { + //example + // let moduleAPIName = "module_api_name"; + // let tagId = 0661047n; + //Get instance of TagsOperations Class + let tagsOperations = new ZOHOCRMSDK.Tags.TagsOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Tags.GetRecordCountForTagParam.MODULE, moduleAPIName); + //Call getRecordCountForTag method that takes paramInstance and tagId as parameter + let response = await tagsOperations.getRecordCountForTag(tagId, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Tags.CountResponseWrapper) { + console.log("Tag Count: " + responseObject.getCount()); + } + else if (responseObject instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetRecordCountForTag.initialize(); +let moduleAPIName = "leads"; +let tagId = 4402480390002n; +await GetRecordCountForTag.getRecordCountForTag(moduleAPIName,tagId); \ No newline at end of file diff --git a/versions/3.0.0/samples/tags/getTags.js b/versions/3.0.0/samples/tags/getTags.js new file mode 100644 index 0000000..7758b86 --- /dev/null +++ b/versions/3.0.0/samples/tags/getTags.js @@ -0,0 +1,88 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetTags{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Tags

+ * This method is used to get all the tags in a module + * @param {String} moduleAPIName The API Name of the module to get tags. + */ + static async getTags(moduleAPIName) { + //example + //let moduleAPIName = "module_api_name"; + //Get instance of TagsOperations Class + let tagsOperations = new ZOHOCRMSDK.Tags.TagsOperations(); + //Get instance of ParameterMap Class + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters of Get Tags operation */ + await paramInstance.add(ZOHOCRMSDK.Tags.GetTagsParam.MODULE, moduleAPIName); + await paramInstance.add(ZOHOCRMSDK.Tags.GetTagsParam.MY_TAGS, "true"); + //Call getTags method that takes ParameterMap instance as parameter + let response = await tagsOperations.getTags(paramInstance); + if (response != null) { + //Get the status code from response + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + //Get object from response + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Tags.ResponseWrapper) { + let tags = responseObject.getTags(); + tags.forEach(tag => { + console.log("Tag CreatedTime: " + tag.getCreatedTime()); + console.log("Tag ModifiedTime: " + tag.getModifiedTime()); + console.log("Tag Name: " + tag.getName()); + let modifiedBy = tag.getModifiedBy(); + if (modifiedBy != null) { + console.log("Tag Modified By User-ID: " + modifiedBy.getId()); + console.log("Tag Modified By User-Name: " + modifiedBy.getName()); + } + console.log("Tag ID: " + tag.getId()); + let createdBy = tag.getCreatedBy(); + if (createdBy != null) { + console.log("Tag Created By User-ID: " + createdBy.getId()); + console.log("Tag Created By User-Name: " + createdBy.getName()); + } + }); + let info = responseObject.getInfo(); + if (info != null) { + if (info.getCount() != null) { + console.log("Tag Info Count: " + info.getCount().toString()); + } + if (info.getAllowedCount() != null) { + console.log("Tag Info AllowedCount: " + info.getAllowedCount().toString()); + } + } + } + else if (responseObject instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetTags.initialize(); +let moduleAPIName = "leads"; +await GetTags.getTags(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/tags/mergeTags.js b/versions/3.0.0/samples/tags/mergeTags.js new file mode 100644 index 0000000..b78cced --- /dev/null +++ b/versions/3.0.0/samples/tags/mergeTags.js @@ -0,0 +1,87 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class MergeTags{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Merge Tag

+ * This method is used to merge tags and put all the records under the two tags into a single tag and print the response. + * @param {BigInt} tagId The ID of the tag + * @param {String} conflictId The ID of the conflict tag. + */ + static async mergeTags(tagId, conflictId) { + //example + //let tagId = 30661047n; + //let conflictId = "3661026"; + //Get instance of TagsOperations Class + let tagsOperations = new ZOHOCRMSDK.Tags.TagsOperations(); + let request = new ZOHOCRMSDK.Tags.MergeWrapper(); + let tagsArray = []; + let conflictWrapper = new ZOHOCRMSDK.Tags.ConflictWrapper(); + conflictWrapper.setConflictId(conflictId); + tagsArray.push(conflictWrapper); + request.setTags(tagsArray); + //Call mergeTags method that takes MergeWrapper instance and tag id as parameter + let response = await tagsOperations.mergeTags(tagId, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Tags.ActionWrapper) { + let actionResponses = responseObject.getTags(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Tags.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await MergeTags.initialize(); +let tagId = 10002n; +let conflictId = "129902"; +await MergeTags.mergeTags(tagId,conflictId); diff --git a/versions/3.0.0/samples/tags/removeTagsFromMultipleRecords.js b/versions/3.0.0/samples/tags/removeTagsFromMultipleRecords.js new file mode 100644 index 0000000..1894f6f --- /dev/null +++ b/versions/3.0.0/samples/tags/removeTagsFromMultipleRecords.js @@ -0,0 +1,94 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class RemoveTagsFromMultipleRecords{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Remove Tags From Multiple Records

+ * This method is used to delete the tags associated with multiple records and print the response. + * @param {String} moduleAPIName The API Name of the module to remove tags. + * @param {Array} recordIds The array of record IDs to be remove tags. + */ + static async removeTagsFromMultipleRecords(moduleAPIName, recordIds) { + //example + // let moduleAPIName = "module_api_name"; + // let recordIds = [23026n, 27003n, 94028n]; + //Get instance of TagsOperations Class + let tagsOperations = new ZOHOCRMSDK.Tags.TagsOperations(); + let request = new ZOHOCRMSDK.Tags.ExistingTagRequestWrapper(); + let tagList = []; + let tag1 = new ZOHOCRMSDK.Tags.ExistingTag(); + tag1.setName("tagNam3e3e12345"); + tagList.push(tag1); + request.setTags(tagList); + request.setIds(recordIds); + //Get instance of ParameterMap Class + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters for Remove Tags from Multiple Records operation */ + for (let recordId of recordIds) { + await paramInstance.add(ZOHOCRMSDK.Tags.RemoveTagsFromMultipleRecordsParam.IDS, recordId); + } + //Call RemoveTagsFromMultipleRecordsParam method that takes ParameterMap instance, moduleAPIName as parameter + let response = await tagsOperations.removeTagsFromMultipleRecords(moduleAPIName, request, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Tags.RecordActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Tags.RecordSuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await RemoveTagsFromMultipleRecords.initialize(); +let moduleAPIName = "leads"; +let recordIds = ["4402480074074","44024801371049"]; +await RemoveTagsFromMultipleRecords.removeTagsFromMultipleRecords(moduleAPIName,recordIds); \ No newline at end of file diff --git a/versions/3.0.0/samples/tags/removeTagsFromRecord.js b/versions/3.0.0/samples/tags/removeTagsFromRecord.js new file mode 100644 index 0000000..7f63fbe --- /dev/null +++ b/versions/3.0.0/samples/tags/removeTagsFromRecord.js @@ -0,0 +1,88 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class RemoveTagsFromRecord{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Remove Tags From Record

+ * This method is used to delete the tags associated with a specific record and print the response. + * @param {String} moduleAPIName The API Name of the module to remove tags + * @param {BigInt} recordId The ID of the record to delete tags + */ + static async removeTagsFromRecord(moduleAPIName, recordId) { + //example + // let moduleAPIName = "module_api_name"; + // let recordId = 2157023n; + //Get instance of TagsOperations Class + let tagsOperations = new ZOHOCRMSDK.Tags.TagsOperations(); + let request = new ZOHOCRMSDK.Tags.ExistingTagRequestWrapper(); + let tagList = []; + let tag1 = new ZOHOCRMSDK.Tags.ExistingTag(); + tag1.setName("tagNam3e3e12345"); + tagList.add(tag1); + request.setTags(tagList); + //Call removeTagsFromRecord method that takes paramInstance, moduleAPIName and recordId as parameter + let response = await tagsOperations.removeTags(recordId, moduleAPIName, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + //Get object from response + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Tags.RecordActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Tags.RecordSuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await RemoveTagsFromRecord.initialize(); +let moduleAPIName = "leads"; +let recordId = 12121n; +await RemoveTagsFromRecord.removeTagsFromRecord(moduleAPIName,recordId); \ No newline at end of file diff --git a/versions/3.0.0/samples/tags/updateTag.js b/versions/3.0.0/samples/tags/updateTag.js new file mode 100644 index 0000000..ef4a057 --- /dev/null +++ b/versions/3.0.0/samples/tags/updateTag.js @@ -0,0 +1,90 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateTag{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Tag

+ * This method is used to update single tag and print the response. + * @param {String} moduleAPIName The API Name of the module to update tag. + * @param {String} tagId The ID of the tag to be updated + */ + static async updateTag(moduleAPIName, tagId) { + //example + // let moduleAPIName = "module_api_name"; + // let tagId = 661047n; + //Get instance of TagsOperations Class + let tagsOperations = new ZOHOCRMSDK.Tags.TagsOperations(); + let request = new ZOHOCRMSDK.Tags.BodyWrapper(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Tags.UpdateTagParam.MODULE, moduleAPIName); + let tagList = []; + let tag1 = new ZOHOCRMSDK.Tags.Tag(); + tag1.setName("node SDK"); + tag1.setColorCode(new ZOHOCRMSDK.Choice("#F48435")); + tagList.add(tag1); + request.setTags(tagList); + //Call updateTag method that takes BodyWrapper instance, ParameterMap instance and tagId as parameter + let response = await tagsOperations.updateTag(tagId, request, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Tags.ActionWrapper) { + let actionResponses = responseObject.getTags(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Tags.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateTag.initialize(); +let moduleAPIName = "leads"; +let tagId = "1212"; +await UpdateTag.updateTag(moduleAPIName,tagId); \ No newline at end of file diff --git a/versions/3.0.0/samples/tags/updateTags.js b/versions/3.0.0/samples/tags/updateTags.js new file mode 100644 index 0000000..5938e04 --- /dev/null +++ b/versions/3.0.0/samples/tags/updateTags.js @@ -0,0 +1,88 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateTags{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Tags

+ * This method is used to update multiple tags simultaneously and print the response. + * @param {String} moduleAPIName The API Name of the module to update tags + */ + static async updateTags(moduleAPIName) { + //example + //let moduleAPIName = "module_api_name"; + //Get instance of TagsOperations Class + let tagsOperations = new ZOHOCRMSDK.Tags.TagsOperations(); + let request = new ZOHOCRMSDK.Tags.BodyWrapper(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Tags.UpdateTagsParam.MODULE, moduleAPIName); + let tagList = []; + let tag1 = new ZOHOCRMSDK.Tags.Tag(); + tag1.setId(347706111665002n); + tag1.setName("tagNasdsdme123"); + tag1.setColorCode(new ZOHOCRMSDK.Choice("#F48435")); + tagList.add(tag1); + request.setTags(tagList); + //Call updateTags method that takes BodyWrapper instance and ParameterMap instance as parameter + let response = await tagsOperations.updateTags(request, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Tags.ActionWrapper) { + let actionResponses = responseObject.getTags(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Tags.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Tags.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateTags.initialize(); +let moduleAPIName = "leads"; +await UpdateTags.updateTags(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/taxes/getTax.js b/versions/3.0.0/samples/taxes/getTax.js new file mode 100644 index 0000000..b8bf434 --- /dev/null +++ b/versions/3.0.0/samples/taxes/getTax.js @@ -0,0 +1,67 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetTax{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Tax

+ * This method is used to get the Organization Tax with ID and print the response. + * @param {BigInt} taxId The ID of the tax to be obtained + */ + static async getTax(taxId) { + //example + //let taxId = 02317003n; + let taxesOperations = new ZOHOCRMSDK.Taxes.TaxesOperations(); + //Call getTax method that takes taxId as parameter + let response = await taxesOperations.getTax(taxId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Taxes.ResponseWrapper) { + let orgtax = responseObject.getOrgTaxes(); + let taxes = orgtax.getTaxes(); + taxes.forEach(tax => { + console.log("Tax DisplayLabel: " + tax.getDisplayLabel()); + console.log("Tax Name: " + tax.getName()); + console.log("Tax ID: " + tax.getId()); + console.log("Tax Value: " + tax.getValue().toString()); + }); + let preference = orgtax.getPreference(); + if (preference != null) { + console.log("Preference AutoPopulateTax: " + preference.getAutoPopulateTax().toString()); + console.log("Preference ModifyTaxRates: " + preference.getModifyTaxRates()); + } + } + else if (responseObject instanceof ZOHOCRMSDK.Taxes.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetTax.initialize(); +let taxId = 440248391043n; +await GetTax.getTax(taxId); diff --git a/versions/3.0.0/samples/taxes/getTaxes.js b/versions/3.0.0/samples/taxes/getTaxes.js new file mode 100644 index 0000000..97fb3b2 --- /dev/null +++ b/versions/3.0.0/samples/taxes/getTaxes.js @@ -0,0 +1,63 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetTaxes{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Taxes

+ * This method is used to get all the Organization Taxes and print the response. + */ + static async getTaxes() { + let taxesOperations = new ZOHOCRMSDK.Taxes.TaxesOperations(); + //Call getTaxes method + let response = await taxesOperations.getTaxes(); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Taxes.ResponseWrapper) { + let orgtax = responseObject.getOrgTaxes(); + let taxes = orgtax.getTaxes(); + taxes.forEach(tax => { + console.log("Tax DisplayLabel: " + tax.getDisplayLabel()); + console.log("Tax Name: " + tax.getName()); + console.log("Tax ID: " + tax.getId()); + console.log("Tax Value: " + tax.getValue().toString()); + }); + let preference = orgtax.getPreference(); + if (preference != null) { + console.log("Preference AutoPopulateTax: " + preference.getAutoPopulateTax().toString()); + console.log("Preference ModifyTaxRates: " + preference.getModifyTaxRates()); + } + } + else if (responseObject instanceof ZOHOCRMSDK.Taxes.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetTaxes.initialize(); +await GetTaxes.getTaxes(); \ No newline at end of file diff --git a/versions/3.0.0/samples/taxes/updateTaxes.js b/versions/3.0.0/samples/taxes/updateTaxes.js new file mode 100644 index 0000000..6e005f9 --- /dev/null +++ b/versions/3.0.0/samples/taxes/updateTaxes.js @@ -0,0 +1,87 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateTaxes{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Taxes

+ * This method is used to update Organization Taxes and print the response. + */ + static async updateTaxes() { + let taxesOperations = new ZOHOCRMSDK.Taxes.TaxesOperations(); + let request = new ZOHOCRMSDK.Taxes.BodyWrapper(); + let orgTax = new ZOHOCRMSDK.Taxes.OrgTax(); + let taxList = []; + let tax1 = new ZOHOCRMSDK.Taxes.Tax(); + tax1.setId(4402481389030n); + tax1.setName("sales_tax"); + tax1.setSequenceNumber(1); + tax1.setValue(20.00); +// tax1.setDelete(null); + taxList.push(tax1); + orgTax.setTaxes(taxList); + let preference = new ZOHOCRMSDK.Taxes.Preference(); + preference.setAutoPopulateTax(false); + preference.setModifyTaxRates(false); + await orgTax.setPreference(preference); + await request.setOrgTaxes(orgTax); + //Call updateTaxes method that takes BodyWrapper instance as parameter + let response = await taxesOperations.updateTaxes(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Taxes.ActionWrapper) { + let actionResponse = responseObject.getOrgTaxes(); + if (actionResponse instanceof ZOHOCRMSDK.Taxes.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Taxes.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + } + else if (responseObject instanceof ZOHOCRMSDK.Taxes.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateTaxes.initialize(); +await UpdateTaxes.updateTaxes(); diff --git a/versions/3.0.0/samples/territories/AssociatedUserCount.js b/versions/3.0.0/samples/territories/AssociatedUserCount.js new file mode 100644 index 0000000..85a68cd --- /dev/null +++ b/versions/3.0.0/samples/territories/AssociatedUserCount.js @@ -0,0 +1,79 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class AssociatedUserCount +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getassociateUserCount() + { + let territoriesOperations = new ZOHOCRMSDK.Territories.TerritoriesOperations(); + let response = await territoriesOperations.getAssociatedUserCount(); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject instanceof ZOHOCRMSDK.Territories.AssociatedUsersCountWrapper) + { + let territoryList = responseObject.getAssociatedUsersCount(); + territoryList.forEach(territoryCount => { + console.log("AssociatedUSersCount Name: " + territoryCount.getCount()); + let territory = territoryCount.getTerritory(); + if (territory != null) + { + console.log("AssociatedUsersCount Name" + territory.getName()); + console.log("AssociatedUsersCount ID" + territory.getId()); + console.log("AssociatedUsersCount Subordinates" + territory.getSubordinates()); + } + }); + let info = responseObject.getInfo(); + if (info != null) + { + if (info.getPerPage() != null) + { + console.log("Territory Info PerPage: " + info.getPerPage().toString()); + } + if (info.getCount() != null) + { + console.log("Territory Info Count: " + info.getCount().toString()); + } + if (info.getPage() != null) + { + console.log("Territory Info Page: " + info.getPage().toString()); + } + if (info.getMoreRecords() != null) + { + console.log("Territory Info MoreRecords: " + info.getMoreRecords().toString()); + } + } + } + else if (responseObject instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } +} +await AssociatedUserCount.initialize(); +await AssociatedUserCount.getassociateUserCount(); \ No newline at end of file diff --git a/versions/3.0.0/samples/territories/CreateTerritories.js b/versions/3.0.0/samples/territories/CreateTerritories.js new file mode 100644 index 0000000..6269b59 --- /dev/null +++ b/versions/3.0.0/samples/territories/CreateTerritories.js @@ -0,0 +1,111 @@ +import * as ZOHOCRMSDK from "../../../../../../../zohocrm-nodejs-sdk-5_0/lib/index.js"; + +class CreateTerritories +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createTerritories() + { + let territoriesOperations = new ZOHOCRMSDK.Territories.TerritoriesOperations(); + let request = new ZOHOCRMSDK.Territories.BodyWrapper(); + let territories = []; + let territory = new ZOHOCRMSDK.Territories.Territories(); + territory.setName("territoryName"); + let criteria = new ZOHOCRMSDK.Territories.Criteria(); + criteria.setComparator("equal"); + criteria.setValue("name"); + let field = new ZOHOCRMSDK.Territories.Field(); + field.setAPIName("Account_Name"); + field.setId(440248000605n); + await criteria.setField(field); + await territory.setAccountRuleCriteria(criteria); + let criteria1 = new ZOHOCRMSDK.Territories.Criteria(); + criteria1.setComparator("not_between"); + let value = []; + value.push("2023-08-10"); + value.push("2023-08-30"); + criteria1.setValue(value); + let field1 = new ZOHOCRMSDK.Territories.Field(); + field1.setAPIName("Closing_Date"); + field1.setId(423213231223411n); + await criteria1.setField(field1); + await territory.setDealRuleCriteria(criteria1); + territory.setDescription("description"); + territory.setPermissionType(new ZOHOCRMSDK.Choice("read_only")); + let reportingTo = new ZOHOCRMSDK.Territories.ReportingTo(); + reportingTo.setId(4402480305227n); + await territory.setReportingTo(reportingTo); + let manager = new ZOHOCRMSDK.Territories.Manager(); + manager.setId(44024801394119n); + await territory.setManager(manager); + territories.push(territory); + request.setTerritories(territories); + let response = await territoriesOperations.createTerritories(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Territories.ActionWrapper) + { + let actionResponses = actionHandler.getTerritories(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Territories.SuccessResponse) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } else if (actionResponse instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + actionHandler.getStatus().getValue()); + console.log("Code: " + actionHandler.getCode().getValue()); + console.log("Details"); + let details = actionHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionHandler.getMessage()); + } + } + } +} +await CreateTerritories.initialize(); +await CreateTerritories.createTerritories(); \ No newline at end of file diff --git a/versions/3.0.0/samples/territories/DeleteTerritories.js b/versions/3.0.0/samples/territories/DeleteTerritories.js new file mode 100644 index 0000000..889343c --- /dev/null +++ b/versions/3.0.0/samples/territories/DeleteTerritories.js @@ -0,0 +1,81 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class DeleteTerritories +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async deleteTerritories() + { + let territoriesOperations = new ZOHOCRMSDK.Territories.TerritoriesOperations(); + let paraminstance = new ZOHOCRMSDK.ParameterMap(); + await paraminstance.add(ZOHOCRMSDK.Territories.DeleteTerritoriesParam.IDS, 32324234232n); + await paraminstance.add(ZOHOCRMSDK.Territories.DeleteTerritoriesParam.DELETE_PREVIOUS_FORECASTS, false); + let response = await territoriesOperations.deleteTerritories(paraminstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Territories.ActionWrapper) + { + let actionResponses = actionHandler.getTerritories(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Territories.SuccessResponse) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } else if (actionResponse instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + actionHandler.getStatus().getValue()); + console.log("Code: " + actionHandler.getCode().getValue()); + console.log("Details"); + let details = actionHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionHandler.getMessage()); + } + } + } +} +await DeleteTerritories.initialize(); +await DeleteTerritories.deleteTerritories(); \ No newline at end of file diff --git a/versions/3.0.0/samples/territories/DeleteTerritory.js b/versions/3.0.0/samples/territories/DeleteTerritory.js new file mode 100644 index 0000000..bca728d --- /dev/null +++ b/versions/3.0.0/samples/territories/DeleteTerritory.js @@ -0,0 +1,81 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class DeleteTerritory +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async deleteTerritory(id) + { + let territoriesOperations = new ZOHOCRMSDK.Territories.TerritoriesOperations(); + let paraminstance = new ZOHOCRMSDK.ParameterMap(); + await paraminstance.add(ZOHOCRMSDK.Territories.DeleteTerritoriesParam.DELETE_PREVIOUS_FORECASTS, false); + let response = await territoriesOperations.deleteTerritory(id,paraminstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Territories.ActionWrapper) + { + let actionResponses = actionHandler.getTerritories(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Territories.SuccessResponse) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } else if (actionResponse instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + actionHandler.getStatus().getValue()); + console.log("Code: " + actionHandler.getCode().getValue()); + console.log("Details"); + let details = actionHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionHandler.getMessage()); + } + } + } +} +let id =44024801305235n; +await DeleteTerritory.initialize(); +await DeleteTerritory.deleteTerritory(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/territories/GetChildTerritory.js b/versions/3.0.0/samples/territories/GetChildTerritory.js new file mode 100644 index 0000000..b28e5a1 --- /dev/null +++ b/versions/3.0.0/samples/territories/GetChildTerritory.js @@ -0,0 +1,121 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetChildTerritory +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + + static async getChildTerritory(id) + { + let territoriesOperations = new ZOHOCRMSDK.Territories.TerritoriesOperations(); + let paraminstance = new ZOHOCRMSDK.ParameterMap(); + // await paraminstance.add(ZOHOCRMSDK.Territories.GetChildTerritoryParam.FILTERS, ""); + let response = await territoriesOperations.getChildTerritory(id, paraminstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.Territories.ResponseWrapper) + { + let territoriesList = responseHandler.getTerritories(); + for (const territory of territoriesList) { + console.log("Territory CreatedTime: " + territory.getCreatedTime()); + console.log("Territory ModifiedTime: " + territory.getModifiedTime()); + let manager = territory.getManager(); + if (manager != null) + { + console.log("Territory Manager User-Name: " + manager.getName()); + console.log("Territory Manager User-ID: " + manager.getId()); + } + let accountRuleCriteria = territory.getAccountRuleCriteria(); + if (accountRuleCriteria != null) + { + await GetChildTerritory.printCriteria(accountRuleCriteria); + } + let dealRuleCriteria = territory.getDealRuleCriteria(); + if (dealRuleCriteria != null) + { + await GetChildTerritory.printCriteria(dealRuleCriteria); + } + console.log("Territory Name : " + territory.getName()); + let modifiedBy = territory.getModifiedBy(); + if (modifiedBy != null) + { + console.log("Territory Modified By User-Name: " + modifiedBy.getName()); + console.log("Territory Modified By User-ID: " + modifiedBy.getId()); + } + console.log("Territory Description: " + territory.getDescription()); + console.log("Territory ID: " + territory.getId()); + let createdBy = territory.getCreatedBy(); + if (createdBy != null) + { + console.log("Territory Created By User-Name: " + createdBy.getName()); + console.log("Territory Created By User-ID: " + createdBy.getId()); + } + let reportingTo = territory.getReportingTo(); + if (reportingTo != null) + { + console.log("Territory reporting By Territory-Name: " + reportingTo.getName()); + console.log("Territory reporting By Territory-ID: " + reportingTo.getId()); + } + console.log("Territory permission type: " + territory.getPermissionType()); + } + } + else if (responseHandler instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage()); + } + } + } + static async printCriteria(criteria) + { + if (criteria.getComparator() != null) + { + console.log("CustomView Criteria Comparator: " + criteria.getComparator()); + } + if (criteria.getField() != null) + { + console.log("CustomView Criteria field name: " + criteria.getField().getAPIName()); + } + if (criteria.getValue() != null) + { + console.log("CustomView Criteria Value: " + criteria.getValue().toString()); + } + let criteriaGroup = criteria.getGroup(); + if (criteriaGroup != null) + { + for (const criteria1 of criteriaGroup) { + await self.printCriteria(criteria1); + } + } + if (criteria.getGroupOperator() != null) + { + console.log("CustomView Criteria Group Operator: " + criteria.getGroupOperator()); + } + } +} +let id = 4402481305120n; +await GetChildTerritory.initialize(); +await GetChildTerritory.getChildTerritory(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/territories/TransferAndDeleteTerritories.js b/versions/3.0.0/samples/territories/TransferAndDeleteTerritories.js new file mode 100644 index 0000000..3adba74 --- /dev/null +++ b/versions/3.0.0/samples/territories/TransferAndDeleteTerritories.js @@ -0,0 +1,86 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class TransferAndDeleteTerritories +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async transferAndDeleteTerritories() + { + let territoriesOperations = new ZOHOCRMSDK.Territories.TerritoriesOperations(); + let request = new ZOHOCRMSDK.Territories.TransferBodyWrapper(); + let territories = []; + let territory = new ZOHOCRMSDK.Territories.TransferTerritory(); + territory.setId(3243423234n); + territory.setTransferToId(32423423243n); + territory.setDeletePreviousForecasts(false); + territories.push(territory); + request.setTerritories(territories); + let response = await territoriesOperations.transferAndDeleteTerritories(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Territories.ActionWrapper) + { + let actionResponses = actionHandler.getTerritories(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Territories.SuccessResponse) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } else if (actionResponse instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + actionHandler.getStatus().getValue()); + console.log("Code: " + actionHandler.getCode().getValue()); + console.log("Details"); + let details = actionHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionHandler.getMessage()); + } + } + } +} +await TransferAndDeleteTerritories.initialize(); +await TransferAndDeleteTerritories.transferAndDeleteTerritories(); \ No newline at end of file diff --git a/versions/3.0.0/samples/territories/TransferAndDeleteTerritory.js b/versions/3.0.0/samples/territories/TransferAndDeleteTerritory.js new file mode 100644 index 0000000..45e318d --- /dev/null +++ b/versions/3.0.0/samples/territories/TransferAndDeleteTerritory.js @@ -0,0 +1,86 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class TransferAndDeleteTerritory +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async transferAndDeleteTerritorry(id) + { + let territoriesOperations = new ZOHOCRMSDK.Territories.TerritoriesOperations(); + let request = new ZOHOCRMSDK.Territories.TransferBodyWrapper(); + let territories = []; + let territory = new ZOHOCRMSDK.Territories.TransferTerritory(); + territory.setTransferToId(44024805235n); + territory.setDeletePreviousForecasts(false); + territories.push(territory); + request.setTerritories(territories); + let response = await territoriesOperations.transferAndDeleteTerritory(id, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Territories.ActionWrapper) + { + let actionResponses = actionHandler.getTerritories(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Territories.SuccessResponse) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } else if (actionResponse instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + actionHandler.getStatus().getValue()); + console.log("Code: " + actionHandler.getCode().getValue()); + console.log("Details"); + let details = actionHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionHandler.getMessage()); + } + } + } +} +let id = 4402481393030n; +await TransferAndDeleteTerritory.initialize(); +await TransferAndDeleteTerritory.transferAndDeleteTerritorry(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/territories/UpdateTerritories.js b/versions/3.0.0/samples/territories/UpdateTerritories.js new file mode 100644 index 0000000..d1dd31d --- /dev/null +++ b/versions/3.0.0/samples/territories/UpdateTerritories.js @@ -0,0 +1,112 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateTerritories +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateTerritories() + { + let territoriesOperations = new ZOHOCRMSDK.Territories.TerritoriesOperations(); + let request = new ZOHOCRMSDK.Territories.BodyWrapper(); + let territories = []; + let territory = new ZOHOCRMSDK.Territories.Territories(); + territory.setId(3242534523354n); + territory.setName("territoryName"); + let criteria = new ZOHOCRMSDK.Territories.Criteria(); + criteria.setComparator("equal"); + criteria.setValue("name"); + let field = new ZOHOCRMSDK.Territories.Field(); + field.setAPIName("Account_Name"); + field.setId(323423523123223n); + await criteria.setField(field); + await territory.setAccountRuleCriteria(criteria); + let criteria1 = new ZOHOCRMSDK.Territories.Criteria(); + criteria1.setComparator("not_between"); + let value = []; + value.push("2023-08-10"); + value.push("2023-08-30"); + criteria1.setValue(value); + let field1 = new ZOHOCRMSDK.Territories.Field(); + field1.setAPIName("Closing_Date"); + field1.setId(323213231223411n); + await criteria1.setField(field1); + await territory.setDealRuleCriteria(criteria1); + territory.setDescription("description"); + territory.setPermissionType(new ZOHOCRMSDK.Choice("read_only")); + let reportingTo = new ZOHOCRMSDK.Territories.ReportingTo(); + reportingTo.setId(440248001307n); + await territory.setReportingTo(reportingTo); + let manager = new ZOHOCRMSDK.Territories.Manager(); + manager.setId(440248025401n); + await territory.setManager(manager); + territories.add(territory); + request.setTerritories(territories); + let response = await territoriesOperations.updateTerritories(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Territories.ActionWrapper) + { + let actionResponses = actionHandler.getTerritories(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Territories.SuccessResponse) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + actionHandler.getStatus().getValue()); + console.log("Code: " + actionHandler.getCode().getValue()); + console.log("Details"); + let details = actionHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionHandler.getMessage()); + } + } + } +} +await UpdateTerritories.initialize(); +await UpdateTerritories.updateTerritories(); \ No newline at end of file diff --git a/versions/3.0.0/samples/territories/UpdateTerritory.js b/versions/3.0.0/samples/territories/UpdateTerritory.js new file mode 100644 index 0000000..a7a1f5e --- /dev/null +++ b/versions/3.0.0/samples/territories/UpdateTerritory.js @@ -0,0 +1,112 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateTerritory +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateTerritory(id) + { + let territoriesOperations = new ZOHOCRMSDK.Territories.TerritoriesOperations(); + let request = new ZOHOCRMSDK.Territories.BodyWrapper(); + let territories = []; + let territory = new ZOHOCRMSDK.Territories.Territories(); + territory.setName("territoryName"); + let criteria = new ZOHOCRMSDK.Territories.Criteria(); + criteria.setComparator("equal"); + criteria.setValue("name"); + let field = new ZOHOCRMSDK.Territories.Field(); + field.setAPIName("Account_Name"); + field.setId(323423523123223n); + await criteria.setField(field); + await territory.setAccountRuleCriteria(criteria); + let criteria1 = new ZOHOCRMSDK.Territories.Criteria(); + criteria1.setComparator("not_between"); + let value = []; + value.push("2023-08-10"); + value.push("2023-08-30"); + criteria1.setValue(value); + let field1 = new ZOHOCRMSDK.Territories.Field(); + field1.setAPIName("Closing_Date"); + field1.setId(323213231223411n); + await criteria1.setField(field1); + await territory.setDealRuleCriteria(criteria1); + territory.setDescription("description"); + territory.setPermissionType(new ZOHOCRMSDK.Choice("read_only")); + let reportingTo = new ZOHOCRMSDK.Territories.ReportingTo(); + reportingTo.setId(440248001307n); + await territory.setReportingTo(reportingTo); + let manager = new ZOHOCRMSDK.Territories.Manager(); + manager.setId(440248025401n); + await territory.setManager(manager); + territories.add(territory); + request.setTerritories(territories); + let response = await territoriesOperations.updateTerritory(id, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.Territories.ActionWrapper) + { + let actionResponses = actionHandler.getTerritories(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Territories.SuccessResponse) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + actionHandler.getStatus().getValue()); + console.log("Code: " + actionHandler.getCode().getValue()); + console.log("Details"); + let details = actionHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionHandler.getMessage()); + } + } + } +} +let id = 3214234133232n; +await UpdateTerritory.initialize(); +await UpdateTerritory.updateTerritory(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/territories/getTerritories.js b/versions/3.0.0/samples/territories/getTerritories.js new file mode 100644 index 0000000..f8a78e1 --- /dev/null +++ b/versions/3.0.0/samples/territories/getTerritories.js @@ -0,0 +1,114 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetTerritories{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Territories

+ * This method is used to get the list of territories enabled for your organization and print the response. + */ + static async getTerritories() { + let territoriesOperations = new ZOHOCRMSDK.Territories.TerritoriesOperations(); + //Call getTerritories method + let response = await territoriesOperations.getTerritories(); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Territories.ResponseWrapper) { + let territories = responseObject.getTerritories(); + territories.forEach(territory => { + console.log("Territory CreatedTime: " + territory.getCreatedTime()); + console.log("Territory PermissionType: " + territory.getPermissionType()); + console.log("Territory ModifiedTime: " + territory.getModifiedTime()); + let manager = territory.getManager(); + if (manager != null) { + console.log("Territory Manager User-Name: " + manager.getName()); + console.log("Territory Manager User-ID: " + manager.getId()); + } + let criteria = territory.getAccountRuleCriteria(); + if (criteria != null) { + this.printCriteria(criteria); + } + console.log("Territory Name: " + territory.getName()); + let modifiedBy = territory.getModifiedBy(); + if (modifiedBy != null) { + console.log("Territory Modified By User-Name: " + modifiedBy.getName()); + console.log("Territory Modified By User-ID: " + modifiedBy.getId()); + } + console.log("Territory Description: " + territory.getDescription()); + console.log("Territory ID: " + territory.getId()); + let reportingTo = territory.getReportingTo(); + if (reportingTo != null) { + console.log("Territory ReportingTo User-Name: " + reportingTo.getName()); + console.log("Territory ReportingTo User-ID: " + reportingTo.getId()); + } + let dealcriteria = territory.getDealRuleCriteria(); + if (dealcriteria != null) { + this.printCriteria(dealcriteria); + } + let createdBy = territory.getCreatedBy(); + if (createdBy != null) { + console.log("Territory Created By User-Name: " + createdBy.getName()); + console.log("Territory Created By User-ID: " + createdBy.getId()); + } + }); + let info = responseObject.getInfo(); + console.log("Territory Info PerPage : " + info.getPerPage()); + console.log("Territory Info Count : " + info.getCount()); + console.log("Territory Info Page : " + info.getPage()); + console.log("Territory Info MoreRecords : " + info.getMoreRecords()); + } + else if (responseObject instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } + static async printCriteria(criteria) { + let field = criteria.getField(); + if (field != null) { + console.log("Territory Query Criteria Field Id: " + field.getId()); + console.log("Territory Query Criteria Field APIName: " + field.getAPIName()); + } + if (criteria.getComparator() != null) { + console.log("Territory Criteria Comparator: " + criteria.getComparator()); + } + if (criteria.getValue() != null) { + console.log("Territory Criteria Value: " + criteria.getValue().toString()); + } + let criteriaGroup = criteria.getGroup(); + if (criteriaGroup != null) { + criteriaGroup.forEach(eachCriteria => { + this.printCriteria(eachCriteria); + }); + } + if (criteria.getGroupOperator() != null) { + console.log("Territory Criteria Group Operator: " + criteria.getGroupOperator().getValue()); + } + } +} +await GetTerritories.initialize(); +await GetTerritories.getTerritories(); \ No newline at end of file diff --git a/versions/3.0.0/samples/territories/getTerritory.js b/versions/3.0.0/samples/territories/getTerritory.js new file mode 100644 index 0000000..59ac050 --- /dev/null +++ b/versions/3.0.0/samples/territories/getTerritory.js @@ -0,0 +1,113 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetTerritory{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Territory

+ * This method is used to get the single territory and print the response. + * @param {BigInt} territoryId The ID of the Territory to be obtainted + */ + static async getTerritory(territoryId) { + //example + //let territoryId = 505351n; + let territoriesOperations = new ZOHOCRMSDK.Territories.TerritoriesOperations(); + //Call getTerritory method that takes territoryId as parameter + let response = await territoriesOperations.getTerritory(territoryId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Territories.ResponseWrapper) { + let territories = responseObject.getTerritories(); + territories.forEach(territory => { + console.log("Territory CreatedTime: " + territory.getCreatedTime()); + console.log("Territory PermissionType: " + territory.getPermissionType()); + console.log("Territory ModifiedTime: " + territory.getModifiedTime()); + let manager = territory.getManager(); + if (manager != null) { + console.log("Territory Manager User-Name: " + manager.getName()); + console.log("Territory Manager User-ID: " + manager.getId()); + } + let criteria = territory.getAccountRuleCriteria(); + if (criteria != null) { + this.printCriteria(criteria); + } + console.log("Territory Name: " + territory.getName()); + let modifiedBy = territory.getModifiedBy(); + if (modifiedBy != null) { + console.log("Territory Modified By User-Name: " + modifiedBy.getName()); + console.log("Territory Modified By User-ID: " + modifiedBy.getId()); + } + console.log("Territory Description: " + territory.getDescription()); + console.log("Territory ID: " + territory.getId()); + let reportingTo = territory.getReportingTo(); + if (reportingTo != null) { + console.log("Territory ReportingTo User-Name: " + reportingTo.getName()); + console.log("Territory ReportingTo User-ID: " + reportingTo.getId()); + } + let dealcriteria = territory.getDealRuleCriteria(); + if (dealcriteria != null) { + this.printCriteria(dealcriteria); + } + let createdBy = territory.getCreatedBy(); + if (createdBy != null) { + console.log("Territory Created By User-Name: " + createdBy.getName()); + console.log("Territory Created By User-ID: " + createdBy.getId()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Territories.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } + static async printCriteria(criteria) { + let field = criteria.getField(); + if (field != null) { + console.log("Territory Query Criteria Field Id: " + field.getId()); + console.log("Territory Query Criteria Field APIName: " + field.getAPIName()); + } + if (criteria.getComparator() != null) { + console.log("Territory Criteria Comparator: " + criteria.getComparator()); + } + if (criteria.getValue() != null) { + console.log("Territory Criteria Value: " + criteria.getValue().toString()); + } + let criteriaGroup = criteria.getGroup(); + if (criteriaGroup != null) { + criteriaGroup.forEach(eachCriteria => { + this.printCriteria(eachCriteria); + }); + } + if (criteria.getGroupOperator() != null) { + console.log("Territory Criteria Group Operator: " + criteria.getGroupOperator()); + } + } +} +await GetTerritory.initialize(); +let territoryId = 440241393030n; +await GetTerritory.getTerritory(territoryId); \ No newline at end of file diff --git a/versions/3.0.0/samples/territoryusers/DeassociateTerritoryUser.js b/versions/3.0.0/samples/territoryusers/DeassociateTerritoryUser.js new file mode 100644 index 0000000..4645a5c --- /dev/null +++ b/versions/3.0.0/samples/territoryusers/DeassociateTerritoryUser.js @@ -0,0 +1,80 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class DeassociateTerritoryUser +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async deAssociateTerritoryUser(user, territory) + { + let territoryUsersOperations = new ZOHOCRMSDK.TerritoryUsers.TerritoryUsersOperations(); + let response = await territoryUsersOperations.deassociateTerritoryUser(user, territory); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.TerritoryUsers.ActionWrapper) + { + let actionResponses = actionHandler.getUsers(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.TerritoryUsers.SuccessResponse) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } else if (actionResponse instanceof ZOHOCRMSDK.TerritoryUsers.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.TerritoryUsers.APIException) { + console.log("Status: " + actionHandler.getStatus().getValue()); + console.log("Code: " + actionHandler.getCode().getValue()); + console.log("Details"); + let details = actionHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionHandler.getMessage()); + } + } + } +} +let territory = 440241390040n; +let user = 440248054001n; +await DeassociateTerritoryUser.initialize(); +await DeassociateTerritoryUser.deAssociateTerritoryUser(user ,territory); \ No newline at end of file diff --git a/versions/3.0.0/samples/territoryusers/DeassociateTerritoryUsers.js b/versions/3.0.0/samples/territoryusers/DeassociateTerritoryUsers.js new file mode 100644 index 0000000..0b4065c --- /dev/null +++ b/versions/3.0.0/samples/territoryusers/DeassociateTerritoryUsers.js @@ -0,0 +1,79 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class DeassociateTerritoryUsers +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async deAssociateTerritoryUsers(territory) + { + let territoryUsersOperations = new ZOHOCRMSDK.TerritoryUsers.TerritoryUsersOperations(); + let response = territoryUsersOperations.deassociateTerritoryUsers(territory); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.TerritoryUsers.ActionWrapper) + { + let actionResponses = actionHandler.getUsers(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.TerritoryUsers.SuccessResponse) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } else if (actionResponse instanceof ZOHOCRMSDK.TerritoryUsers.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.TerritoryUsers.APIException) { + console.log("Status: " + actionHandler.getStatus().getValue()); + console.log("Code: " + actionHandler.getCode().getValue()); + console.log("Details"); + let details = actionHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionHandler.getMessage()); + } + } + } +} +let territory = 3242352354323; +await DeassociateTerritoryUsers.initialize(); +await DeassociateTerritoryUsers.deAssociateTerritoryUsers(territory); \ No newline at end of file diff --git a/versions/3.0.0/samples/territoryusers/GetTerritoryUser.js b/versions/3.0.0/samples/territoryusers/GetTerritoryUser.js new file mode 100644 index 0000000..e184e59 --- /dev/null +++ b/versions/3.0.0/samples/territoryusers/GetTerritoryUser.js @@ -0,0 +1,77 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetTerritoryUser +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getTerritoryUser(user, territory) + { + let territoryUsersOperations = new ZOHOCRMSDK.TerritoryUsers.TerritoryUsersOperations(); + let response = await territoryUsersOperations.getTerritoryUser(user, territory); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.TerritoryUsers.ResponseWrapper) + { + let users = responseHandler.getUsers(); + if (users != null) + { + users.forEach(user=> { + console.log("Territory user Id : " + user.getId()); + }); + } + let info = responseHandler.getInfo(); + if (info != null) + { + if (info.getPerPage() != null) + { + console.log("Territory Info PerPage: " + info.getPerPage().toString()); + } + if (info.getCount() != null) + { + console.log("Territory Info Count: " + info.getCount().toString()); + } + if (info.getPage() != null) + { + console.log("Territory Info Page: " + info.getPage().toString()); + } + if (info.getMoreRecords() != null) + { + console.log("Territory Info MoreRecords: " + info.getMoreRecords().toString()); + } + } + } + else if (responseHandler instanceof ZOHOCRMSDK.TerritoryUsers.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage()); + } + } + } +} +let user = 440248004119n; +let territory = 4402481390040n; +await GetTerritoryUser.initialize(); +await GetTerritoryUser.getTerritoryUser(user, territory); \ No newline at end of file diff --git a/versions/3.0.0/samples/territoryusers/GetTerritoryUsers.js b/versions/3.0.0/samples/territoryusers/GetTerritoryUsers.js new file mode 100644 index 0000000..8efc043 --- /dev/null +++ b/versions/3.0.0/samples/territoryusers/GetTerritoryUsers.js @@ -0,0 +1,76 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetTerritoryUsers +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getTerritoryUsers(territory) + { + let territoryUsersOperations = new ZOHOCRMSDK.TerritoryUsers.TerritoryUsersOperations(); + let response = await territoryUsersOperations.getTerritoryUsers(territory); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.TerritoryUsers.ResponseWrapper) + { + let users = responseHandler.getUsers(); + if (users != null) + { + users.forEach(user=> { + console.log("Territory user Id : " + user.getId()); + }); + } + let info = responseHandler.getInfo(); + if (info != null) + { + if (info.getPerPage() != null) + { + console.log("Territory Info PerPage: " + info.getPerPage().toString()); + } + if (info.getCount() != null) + { + console.log("Territory Info Count: " + info.getCount().toString()); + } + if (info.getPage() != null) + { + console.log("Territory Info Page: " + info.getPage().toString()); + } + if (info.getMoreRecords() != null) + { + console.log("Territory Info MoreRecords: " + info.getMoreRecords().toString()); + } + } + } + else if (responseHandler instanceof ZOHOCRMSDK.TerritoryUsers.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage()); + } + } + } +} +let territory = 4402480390040n; +await GetTerritoryUsers.initialize(); +await GetTerritoryUsers.getTerritoryUsers(territory); \ No newline at end of file diff --git a/versions/3.0.0/samples/territoryusers/UpdateTerritoryUser.js b/versions/3.0.0/samples/territoryusers/UpdateTerritoryUser.js new file mode 100644 index 0000000..c30d592 --- /dev/null +++ b/versions/3.0.0/samples/territoryusers/UpdateTerritoryUser.js @@ -0,0 +1,80 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateTerritoryUser +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateTerritoryUser(user, territory) + { + let territoryUsersOperations = new ZOHOCRMSDK.TerritoryUsers.TerritoryUsersOperations(); + let response = await territoryUsersOperations.updateTerritoryUser(user, territory); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.TerritoryUsers.ActionWrapper) + { + let actionResponses = actionHandler.getUsers(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.TerritoryUsers.SuccessResponse) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } else if (actionResponse instanceof ZOHOCRMSDK.TerritoryUsers.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.TerritoryUsers.APIException) { + console.log("Status: " + actionHandler.getStatus().getValue()); + console.log("Code: " + actionHandler.getCode().getValue()); + console.log("Details"); + let details = actionHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionHandler.getMessage()); + } + } + } +} +let territory = 440001390040n; +let user = 440248004001n; +await UpdateTerritoryUser.initialize(); +await UpdateTerritoryUser.updateTerritoryUser(user, territory); \ No newline at end of file diff --git a/versions/3.0.0/samples/territoryusers/UpdateTerritoryUsers.js b/versions/3.0.0/samples/territoryusers/UpdateTerritoryUsers.js new file mode 100644 index 0000000..c815ea0 --- /dev/null +++ b/versions/3.0.0/samples/territoryusers/UpdateTerritoryUsers.js @@ -0,0 +1,85 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateTerritoryUsers +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateTerritoryUsers(territory) + { + let territoryUsersOperations = new ZOHOCRMSDK.TerritoryUsers.TerritoryUsersOperations(); + let request = new ZOHOCRMSDK.TerritoryUsers.BodyWrapper(); + let users = []; + let user = new ZOHOCRMSDK.Users.Users(); + user.setId(324234344n); + users.push(user); + request.setUsers(users); + let response = territoryUsersOperations.updateTerritoryUsers(territory, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.TerritoryUsers.ActionWrapper) + { + let actionResponses = actionHandler.getUsers(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.TerritoryUsers.SuccessResponse) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } else if (actionResponse instanceof ZOHOCRMSDK.TerritoryUsers.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.TerritoryUsers.APIException) { + console.log("Status: " + actionHandler.getStatus().getValue()); + console.log("Code: " + actionHandler.getCode().getValue()); + console.log("Details"); + let details = actionHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionHandler.getMessage()); + } + } + } +} +let territory = 3214234234232n; +await UpdateTerritoryUsers.initialize(); +await UpdateTerritoryUsers.updateTerritoryUsers(territory); \ No newline at end of file diff --git a/versions/3.0.0/samples/threading/multi_thread.js b/versions/3.0.0/samples/threading/multi_thread.js new file mode 100644 index 0000000..e84cce7 --- /dev/null +++ b/versions/3.0.0/samples/threading/multi_thread.js @@ -0,0 +1,181 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class Record { + static async call() { + /* + * Create an instance of Logger Class that takes two parameters + * level -> Level of the log messages to be logged. Can be configured by typing Levels "." and choose any level from the list displayed. + * filePath -> Absolute file path, where messages need to be logged. + */ + let logger = new ZOHOCRMSDK.LogBuilder() + .level(ZOHOCRMSDK.Levels.INFO) + .filePath("/Users/Documents/file/final-logs.log") + .build(); + /* + * Configure the environment + * which is of the pattern Domain.Environment + * Available Domains: USDataCenter, EUDataCenter, INDataCenter, CNDataCenter, AUDataCenter + * Available Environments: PRODUCTION(), DEVELOPER(), SANDBOX() + */ + let environment1 = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + /* + * Create a Token instance + * clientId -> OAuth client id. + * clientSecret -> OAuth client secret. + * grantToken -> OAuth Grant Token. + * refreshToken -> OAuth Refresh Token token. + * redirectURL -> OAuth Redirect URL. + */ + let token1 = new ZOHOCRMSDK.OAuthBuilder() + .clientId("clientId") + .clientSecret("clientSecret") + // .grantToken("grantToken") + .refreshToken("refreshToken") + .redirectURL("https://www.zoho.com") + .build(); + /* + * Create an instance of TokenStore. + * 1 -> DataBase host name. Default "localhost" + * 2 -> DataBase name. Default "zohooauth" + * 3 -> DataBase user name. Default "root" + * 4 -> DataBase password. Default "" + * 5 -> DataBase port number. Default "3306" + */ + // let tokenstore = new ZOHOCRMSDK.DBBuilder().build(); + // + /* + * Create an instance of FileStore that takes absolute file path as parameter + */ + let tokenstore = new ZOHOCRMSDK.FileStore("/Users/Documents/file/nodejs_sdk_tokens.txt"); + /* + * A Boolean value to allow or prevent auto-refreshing of the modules' fields in the background. + * if true - all the modules' fields will be auto-refreshed in the background whenever there is any change. + * if false - the fields will not be auto-refreshed in the background. The user can manually delete the file(s) or the specific module's fields using methods from ModuleFieldsHandler + */ + let sdkConfig1 = new ZOHOCRMSDK.SDKConfigBuilder() + .autoRefreshFields(false) + .pickListValidation(true) + .build(); + /* + * The path containing the absolute directory path to store user specific JSON files containing module fields information. + */ + let resourcePath = "/Users/Documents/file"; + // let proxyBuilder = new ProxyBuilder().host().port() + /* + * Call the static initialize method of Initializer class that takes the following arguments + * user -> UserSignature instance + * environment -> Environment instance + * token -> Token instance + * store -> TokenStore instance + * SDKConfig -> SDKConfig instance + * resourcePath -> resourcePath + * logger -> Logger instance + */ + try { + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment1) + .token(token1) + .store(tokenstore) + .SDKConfig(sdkConfig1) + .resourcePath(resourcePath) + .logger(logger) + .initialize(); + } catch (error) { + console.log(error); + } + await Record.getRecords("Leads"); + // await Initializer.removeUserConfiguration(user1, environment1); + let environment2 = ZOHOCRMSDK.EUDataCenter.SANDBOX(); + let token2 = new ZOHOCRMSDK.OAuthBuilder() + .clientId("clientId") + .clientSecret("clientSecret") + .refreshToken("refreshToken") + .redirectURL("https://www.zoho.com") + .build(); + let sdkConfig2 = new ZOHOCRMSDK.SDKConfigBuilder().autoRefreshFields(false).pickListValidation(true).build(); + (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment2) + .token(token2) + .SDKConfig(sdkConfig2) + .switchUser(); + await Record.getRecords("Leads"); + } + static async getRecords(moduleAPIName) { + try { + //Get instance of RecordOperations Class + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Record.GetRecordsParam.APPROVED, "both"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + await headerInstance.add(ZOHOCRMSDK.Record.GetRecordsHeader.IF_MODIFIED_SINCE, new Date("2020-01-01T00:00:00+05:30")); + //Call getRecords method that takes paramInstance, headerInstance and moduleAPIName as parameters + let response = await recordOperations.getRecords(moduleAPIName, paramInstance, headerInstance); + if (response != null) { + //Get the status code from response + console.log("Status Code: " + response.statusCode); + if ([204, 304].includes(response.statusCode)) { + console.log(response.statusCode == 204 ? "No Content" : "Not Modified"); + return; + } + //Get the object from response + let responseObject = response.object; + if (responseObject != null) { + //Check if expected ResponseWrapper instance is received + if (responseObject instanceof ZOHOCRMSDK.Record.ResponseWrapper) { + //Get the array of obtained Record instances + let records = responseObject.getData(); + for (let index = 0; index < records.length; index++) { + let record = records[index]; + //Get the ID of each Record + console.log("Record ID: " + record.getId()); + //Get the createdBy User instance of each Record + let createdBy = record.getCreatedBy(); + //Check if createdBy is not null + if (createdBy != null) { + console.log("Record Created By User-ID: " + createdBy.getId()); + //Get the name of the createdBy User + console.log("Record Created By User-Name: " + createdBy.getName()); + //Get the Email of the createdBy User + console.log("Record Created By User-Email: " + createdBy.getEmail()); + } + //Get the CreatedTime of each Record + console.log("Record CreatedTime: " + record.getCreatedTime()); + //Get the modifiedBy User instance of each Record + let modifiedBy = record.getModifiedBy(); + //Check if modifiedBy is not null + if (modifiedBy != null) { + console.log("Record Modified By User-ID: " + modifiedBy.getId()); + //Get the name of the modifiedBy User + console.log("Record Modified By User-Name: " + modifiedBy.getName()); + //Get the Email of the modifiedBy User + console.log("Record Modified By User-Email: " + modifiedBy.getEmail()); + } + //Get the ModifiedTime of each Record + console.log("Record ModifiedTime: " + record.getModifiedTime()); + //Get the list of Tag instance each Record + let tags = record.getTag(); + //Check if tags is not null + if (tags != null) { + tags.forEach(tag => { + console.log("Record Tag Name: " + tag.getName()); + //Get the Id of each Tag + console.log("Record Tag ID: " + tag.getId()); + }); + } + //Get all the values + let keyValues = record.getKeyValues(); + let keyArray = Array.from(keyValues.keys()); + for (let keyIndex = 0; keyIndex < keyArray.length; keyIndex++) { + const keyName = keyArray[keyIndex]; + let value = keyValues.get(keyName); + console.log(keyName + " : " + value); + } + } + } + } + } + } catch (error) { + console.log(error); + } + } +} +Record.call(); diff --git a/versions/3.0.0/samples/timelines/GetTimelines.js b/versions/3.0.0/samples/timelines/GetTimelines.js new file mode 100644 index 0000000..a7be6cb --- /dev/null +++ b/versions/3.0.0/samples/timelines/GetTimelines.js @@ -0,0 +1,132 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetTimelines +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getTimelines(module, recordId) + { + let timelineOperations = new ZOHOCRMSDK.Timelines.TimelinesOperations(); + let paraminstance = new ZOHOCRMSDK.ParameterMap(); + let response = await timelineOperations.getTimelines(module, recordId, paraminstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.Timelines.ResponseWrapper) + { + let timelines = responseHandler.getTimeline(); + if (timelines != null) + { + timelines.forEach(timeline => { + let doneBy = timeline.getDoneBy(); + if (doneBy != null) + { + console.log("DoneBy Name: " + doneBy.getName()); + console.log("DoneBy Id: " + doneBy.getId()); + } + let relatedRecord = timeline.getRelatedRecord(); + if (relatedRecord != null) + { + console.log("RelatedRecord Id: " + relatedRecord.getId().toString()); + console.log("RelatedRecord Name: " + relatedRecord.getName()); + let module1 = relatedRecord.getModule(); + console.log("Module : "); + if (module1 != null) + { + console.log("RelatedRecord Module Name: " + module1.getName()); + console.log("RelatedRecord Module Id: " + module1.getId()); + } + } + let automationDetails = timeline.getAutomationDetails(); + if (automationDetails != null) + { + console.log("automationdetails type: " + automationDetails.getType()); + let rule = automationDetails.getRule(); + if (rule != null) + { + console.log("automationDetails Rule Name :" + rule.getName()); + console.log("automationDetails Rule Id :" + rule.getId()); + } + } + let record1 = timeline.getRecord(); + if (record1 != null) + { + console.log("Record Id: " + record1.getId()); + console.log("Record Name: " + record1.getName()); + let module2 = record1.getModule(); + console.log("Module : "); + if (module2 != null) + { + console.log("Record Module Name: " + module2.getAPIName()); + console.log("Record Module Id: " + module2.getId()); + } + } + console.log("auditedTime : " + timeline.getAuditedTime()); + console.log("action : " + timeline.getAction()); + console.log("Timeline Id: " + timeline.getId()); + console.log("source: " + timeline.getSource()); + console.log("extension: " + timeline.getExtension()); + console.log("Type:: " + timeline.getType()); + let fieldHistory = timeline.getFieldHistory(); + if (fieldHistory != null) { + fieldHistory.forEach(history=>{ + console.log("FieldHistory dataType: " + history.getDataType()); + console.log("FieldHistory enableColourCode: " + history.getEnableColourCode()); + console.log("FieldHistory fieldLabel: " + history.getFieldLabel()); + console.log("FieldHistory apiName: " + history.getAPIName()); + console.log("FieldHistory id: " + history.getId()); + let value = history.getValue(); + if (value != null) { + console.log("new :" + value.getNew()); + console.log("old :" + value.getOld()); + } + let pickListValues = history.getPickListValues(); + if (pickListValues != null) { + pickListValues.forEach(pickListValue=>{ + console.log("picklistvalue DisplayValue : " + pickListValue.getDisplayValue()); + console.log("picklistvalue sequenceNumber : " + pickListValue.getSequenceNumber()); + console.log("picklistvalue colourCode : " + pickListValue.getColourCode()); + console.log("picklistvalue actualValue : " + pickListValue.getActualValue()); + console.log("picklistvalue id : " + pickListValue.getId()); + console.log("picklistvalue type : " + pickListValue.getType()); + }); + } + }); + } + }); + } + } + else if (responseHandler instanceof ZOHOCRMSDK.Timelines.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage()); + } + } + } +} +let module = "Leads"; +let recordId = "4402318"; +await GetTimelines.initialize(); +await GetTimelines.getTimelines(module, recordId); \ No newline at end of file diff --git a/versions/3.0.0/samples/updaterecords/UpdateAccounts.js b/versions/3.0.0/samples/updaterecords/UpdateAccounts.js new file mode 100644 index 0000000..3409e21 --- /dev/null +++ b/versions/3.0.0/samples/updaterecords/UpdateAccounts.js @@ -0,0 +1,185 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateAccounts +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateAccounts(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(323242332332n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.ACCOUNT_NAME, 'New Account'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.PHONE, '12121212'); + record1.addKeyValue("Email", 'abc@gmail.com'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.FAX, 'Fax'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.ACCOUNT_SITE, 'www.domain.com'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.WEBSITE, 'website.com'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.ACCOUNT_NUMBER, 100001n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.EMPLOYEES, 10); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.SIC_CODE, 1213); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.ANNUAL_REVENUE, 1212.1); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.OWNERSHIP, new ZOHOCRMSDK.Choice("Private")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.ACCOUNT_TYPE, new ZOHOCRMSDK.Choice("Customer")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.INDUSTRY, new ZOHOCRMSDK.Choice("Real Estate")); + let parent_account = new ZOHOCRMSDK.Record.Record(); + parent_account.setId(440248001389082n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.PARENT_ACCOUNT, parent_account); + // Address Info + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.BILLING_CITY, 'billing_city'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.BILLING_STREET, 'billing_street'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.BILLING_CODE, 'billing_code'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.BILLING_COUNTRY, 'billing_Country'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.BILLING_STATE, 'billing_state'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.SHIPPING_CITY, 'Shipping_city'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.SHIPPING_STREET, 'Shipping_street'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.SHIPPING_CODE, 'Shipping_code'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.SHIPPING_COUNTRY, 'Shipping_Country'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.SHIPPING_STATE, 'shipping_state'); + // + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.DESCRIPTION, 'description'); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record3 = new ZOHOCRMSDK.Record.Record(); + record3.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record3); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + // can add update another record with same above mention fields + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.setId(3452320103n); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.updateRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Accounts"; +await UpdateAccounts.initialize(); +await UpdateAccounts.updateAccounts(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/updaterecords/UpdateCalls.js b/versions/3.0.0/samples/updaterecords/UpdateCalls.js new file mode 100644 index 0000000..1ca6cb0 --- /dev/null +++ b/versions/3.0.0/samples/updaterecords/UpdateCalls.js @@ -0,0 +1,193 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateCalls +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateCalls(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(34352323213n); + // Schedule a call + let whoId = new ZOHOCRMSDK.Record.Record(); + whoId.setId(440248001030088n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.WHO_ID, whoId); + let whatId = new ZOHOCRMSDK.Record.Record(); + whatId.setId(44024801389082n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.WHAT_ID, whatId); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_TYPE, new ZOHOCRMSDK.Choice("Outbound")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.OUTGOING_CALL_STATUS, new ZOHOCRMSDK.Choice("Scheduled")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_START_TIME, new Date(2023,8,2,11,3,6)); + let user = new ZOHOCRMSDK.Users.Users(); + user.setId(44024800254001n); + record1.addKeyValue("Call_Owner", user); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.SUBJECT, 'call Scheduled'); + // await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.REMINDER, new ZOHOCRMSDK.Choice("5 mins")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_PURPOSE, new ZOHOCRMSDK.Choice("Demo")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_AGENDA, 'agenda to make a call'); + record1.addKeyValue('$se_module', "Accounts"); + + // log a call + let whoId1 = new ZOHOCRMSDK.Record.Record(); + whoId1.setId(4402480030088n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.WHO_ID, whoId1); + let whatId1 = new ZOHOCRMSDK.Record.Record(); + whatId1.setId(44024801389082n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.WHAT_ID, whatId1); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_TYPE, new ZOHOCRMSDK.Choice("Outbound")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.SUBJECT, "Call"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_DURATION, "10:00"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.OUTGOING_CALL_STATUS, new ZOHOCRMSDK.Choice("Completed")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_START_TIME, new Date(2023,2,12, 11, 3, 6)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_PURPOSE, new ZOHOCRMSDK.Choice("Demo")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_AGENDA, "agenda to make call"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.CALL_RESULT, new ZOHOCRMSDK.Choice("Not interested")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Calls.DESCRIPTION, 'description'); + record1.addKeyValue('$se_module', "Accounts"); + // + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user2 = new ZOHOCRMSDK.Users.MinifiedUser(); + user2.setId(4323001232n); + record1.addKeyValue("User_1", user2); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + // can add update another record with same above mention fields + let secondRecord = new ZOHOCRMSDK.Record.Record(); + secondRecord.setId(3452320103n); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response =await recordOperations.updateRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Calls"; +await UpdateCalls.initialize(); +await UpdateCalls.updateCalls(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/updaterecords/UpdateCampaigns.js b/versions/3.0.0/samples/updaterecords/UpdateCampaigns.js new file mode 100644 index 0000000..9cd6e33 --- /dev/null +++ b/versions/3.0.0/samples/updaterecords/UpdateCampaigns.js @@ -0,0 +1,167 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateCampaigns +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateCampaigns(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(323312321n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.CAMPAIGN_NAME, "New Campaign"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.NUM_SENT, 10n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.START_DATE, new Date(2023, 8,12)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.END_DATE, new Date(2023, 8, 29)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.ACTUAL_COST, 100.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.EXPECTED_REVENUE, 120.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.TYPE, new ZOHOCRMSDK.Choice("Webinar")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.BUDGETED_COST, 110.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.EXPECTED_RESPONSE, 100n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.DESCRIPTION, "description"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Campaigns.STATUS, new ZOHOCRMSDK.Choice("Active")); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + // can add update another record with same above mention fields + let secondRecord = new ZOHOCRMSDK.Record.Record(); + secondRecord.setId(3452320103n); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.updateRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Campaigns"; +await UpdateCampaigns.initialize(); +await UpdateCampaigns.updateCampaigns(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/updaterecords/UpdateCases.js b/versions/3.0.0/samples/updaterecords/UpdateCases.js new file mode 100644 index 0000000..d2a195f --- /dev/null +++ b/versions/3.0.0/samples/updaterecords/UpdateCases.js @@ -0,0 +1,180 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateCases +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateCases(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(323234221323n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.SUBJECT, "New Case"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.TYPE, new ZOHOCRMSDK.Choice("Question")); + let productName = new ZOHOCRMSDK.Record.Record(); + productName.setId(403334342442n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.PRODUCT_NAME, productName); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.CASE_ORIGIN, new ZOHOCRMSDK.Choice("Email")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.STATUS, new ZOHOCRMSDK.Choice("On Hold")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.REPORTED_BY, "none"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.PHONE, "3200132001"); + let contactName = new ZOHOCRMSDK.Record.Record(); + contactName.setId(400234244232n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.RELATED_TO, contactName); + let accountName = new ZOHOCRMSDK.Record.Record(); + accountName.setId(4330242352342342n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.ACCOUNT_NAME, accountName); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.EMAIL, "abc@gmail.com"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.PRIORITY, new ZOHOCRMSDK.Choice("Low")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.CASE_REASON, new ZOHOCRMSDK.Choice("New problem")); + let dealName = new ZOHOCRMSDK.Record.Record(); + dealName.addKeyValue("id", 42334423425234n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.DEAL_NAME, dealName); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.DESCRIPTION, "description"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.INTERNAL_COMMENTS, "Comments"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Cases.SOLUTION, "solution for problem"); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + // can add update another record with same above mention fields + let secondRecord = new ZOHOCRMSDK.Record.Record(); + secondRecord.setId(3452320103n); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = recordOperations.updateRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Cases"; +await UpdateCases.initialize(); +await UpdateCases.updateCases(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/updaterecords/UpdateContacts.js b/versions/3.0.0/samples/updaterecords/UpdateContacts.js new file mode 100644 index 0000000..fd3b8af --- /dev/null +++ b/versions/3.0.0/samples/updaterecords/UpdateContacts.js @@ -0,0 +1,195 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateContacts +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateContacts(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(3443312423432n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.LAST_NAME, 'lastname'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.FIRST_NAME, 'firstname'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.EMAIL, 'abc@gmail.com'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.TITLE, 'title'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.PHONE, '1001001'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.DEPARTMENT, 'Department name'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.OTHER_PHONE, '20010021'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.HOME_PHONE, '300022222'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.MOBILE, '109109'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.FAX, 'fax'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.ASSISTANT, 'Assistant'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.DATE_OF_BIRTH, new Date(1999, 10,23)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.ASST_PHONE, ''); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.EMAIL_OPT_OUT, true); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.SKYPE_ID, 'sky_123'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.SECONDARY_EMAIL, 'abc1@gmail.com'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.TWITTER, 'twitter_55'); + let accountName = new ZOHOCRMSDK.Record.Record(); + accountName.setId(440248390054n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.ACCOUNT_NAME, accountName); + let vendorName = new ZOHOCRMSDK.Record.Record(); + vendorName.setId(4402480330038n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.VENDOR_NAME, vendorName); + let reportingTo = new ZOHOCRMSDK.Record.Record(); + reportingTo.setId(430900423424n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.REPORTING_TO, reportingTo); + // Address Info + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.MAILING_CITY, 'mailing_city'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.MAILING_COUNTRY, 'Mailing Country'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.MAILING_STATE, 'Mailing State'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.MAILING_STREET, 'Mailing Street'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.MAILING_ZIP, 'Mailing Zip'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.OTHER_CITY, 'Other city'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.OTHER_COUNTRY, 'other country'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.OTHER_STATE, 'other state'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.OTHER_STREET, 'other street'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.OTHER_ZIP, 'other zip'); + // + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.DESCRIPTION, 'description'); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + // can add update another record with same above mention fields + let secondRecord = new ZOHOCRMSDK.Record.Record(); + secondRecord.setId(3452320103n); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.updateRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Contacts"; +await UpdateContacts.initialize(); +await UpdateContacts.updateContacts(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/updaterecords/UpdateDeals.js b/versions/3.0.0/samples/updaterecords/UpdateDeals.js new file mode 100644 index 0000000..d7a273a --- /dev/null +++ b/versions/3.0.0/samples/updaterecords/UpdateDeals.js @@ -0,0 +1,175 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateDeals +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateDeals(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(323243223121n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.DEAL_NAME, 'New Deal'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.AMOUNT, 100.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.CLOSING_DATE, new Date(2023, 8, 8)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.STAGE, new ZOHOCRMSDK.Choice("Qualification")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.TYPE, new ZOHOCRMSDK.Choice("New Business")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.PROBABILITY, 10); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.NEXT_STEP, 'Next Step'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.EXPECTED_REVENUE, 120.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.LEAD_SOURCE, new ZOHOCRMSDK.Choice("Cold Call")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.DESCRIPTION, 'description'); + let accountName = new ZOHOCRMSDK.Record.Record(); + accountName.setId(440248090054n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.ACCOUNT_NAME, accountName); + let contactName = new ZOHOCRMSDK.Record.Record(); + contactName.setId(4402480393062n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.CONTACT_NAME, contactName); + let campaign_source = new ZOHOCRMSDK.Record.Record(); + campaign_source.setId(44024801393057n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.CAMPAIGN_SOURCE, campaign_source); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + // can add update another record with same above mention fields + let secondRecord = new ZOHOCRMSDK.Record.Record(); + secondRecord.setId(3452320103n); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.updateRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Deals"; +await UpdateDeals.initialize(); +await UpdateDeals.updateDeals(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/updaterecords/UpdateEvents.js b/versions/3.0.0/samples/updaterecords/UpdateEvents.js new file mode 100644 index 0000000..d6564af --- /dev/null +++ b/versions/3.0.0/samples/updaterecords/UpdateEvents.js @@ -0,0 +1,189 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateEvents +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateEvents(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(3432423221n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Events.DESCRIPTION, 'description'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Events.START_DATETIME, new Date(2023,9,9,11,32,33)); + let participants = []; + let participant1 = new ZOHOCRMSDK.Record.Participants(); + participant1.setEmail('abc@gmail.com'); + participant1.setType('email'); + participant1.setId(4402480254001n); + participants.push(participant1); + let participant2 = new ZOHOCRMSDK.Record.Participants(); + participant2.addKeyValue('participant', 4003423423434n); + participant2.addKeyValue('type', 'lead'); + participants.push(participant2); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Events.PARTICIPANTS, participants); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Events.ALL_DAY, true); + record1.addKeyValue('send_notification', true); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Events.EVENT_TITLE, 'New Automated Event'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Events.END_DATETIME, new Date(2023, 9, 10, 11, 30, 22)); + let reminderList = []; + let remindAt = new ZOHOCRMSDK.Record.Reminder(); + remindAt.setPeriod("minutes"); + remindAt.setUnit(15); + reminderList.push(remindAt); + let remindAt1 = new ZOHOCRMSDK.Record.Reminder(); + remindAt1.setPeriod("minutes"); + remindAt1.setUnit(15); + remindAt1.setTime("10:30"); + reminderList.push(remindAt1); + record1.addKeyValue('$se_module', 'leads'); + let whatId = new ZOHOCRMSDK.Record.Record(); + whatId = new ZOHOCRMSDK.Record.Record(); + whatId.setId(4300234243n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Events.WHAT_ID, whatId); + record1.addKeyValue('Currency', new ZOHOCRMSDK.Choice("USD")); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + // can add update another record with same above mention fields + let secondRecord = new ZOHOCRMSDK.Record.Record(); + secondRecord.setId(3452320103n); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.updateRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Events"; +await UpdateEvents.initialize(); +await UpdateEvents.updateEvents(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/updaterecords/UpdateInvoices.js b/versions/3.0.0/samples/updaterecords/UpdateInvoices.js new file mode 100644 index 0000000..6ef7078 --- /dev/null +++ b/versions/3.0.0/samples/updaterecords/UpdateInvoices.js @@ -0,0 +1,215 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateInvoices +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateInvoices(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(32323123223n); + let accountName = new ZOHOCRMSDK.Record.Record(); + accountName.setId(4402401390054n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.ACCOUNT_NAME, accountName); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.SUBJECT, "new Invoice"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.ADJUSTMENT, 10.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.INVOICE_DATE, new Date(2023, 9, 12)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.DUE_DATE, new Date(2023, 10, 12)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.SALES_COMMISSION, 20.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.PURCHASE_ORDER, "purchase_order"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.EXCISE_DUTY, 10.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.STATUS, new ZOHOCRMSDK.Choice("Created")); + let contactName = new ZOHOCRMSDK.Record.Record(); + contactName.setId(44024801393062n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.CONTACT_NAME, contactName); + let dealName = new ZOHOCRMSDK.Record.Record(); + dealName.setId(4402481393069n); + record1.addKeyValue("Deal_Name__s", dealName); + let salesOrder = new ZOHOCRMSDK.Record.Record(); + salesOrder.setId(44024801330025n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.SALES_ORDER, salesOrder); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.TERMS_AND_CONDITIONS, "details of terms and Conditions"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.DESCRIPTION, 'description'); + let inventoryLineItemList = []; + let inventoryLineItem = new ZOHOCRMSDK.Record.Record(); + let lineItemProduct = new ZOHOCRMSDK.Record.LineItemProduct(); + lineItemProduct.setId(44024324534n); + inventoryLineItem.addKeyValue("Description", "asd"); + inventoryLineItem.addKeyValue("Discount", "5"); + inventoryLineItem.addKeyValue("Quantity", 10.0); + inventoryLineItem.addKeyValue("List_price", 100.0); + inventoryLineItem.addKeyValue("Product_Name", lineItemProduct); + inventoryLineItem.addKeyValue("Product_Category_1", "hardware"); + let productLineTaxes = []; + let productLineTax = new ZOHOCRMSDK.Record.LineTax(); + productLineTax.setName("Vat"); + productLineTax.setValue(10.0); + productLineTax.setId(4402480020810n); + productLineTax.setPercentage(10.0); + productLineTaxes.push(productLineTax); + inventoryLineItem.addKeyValue("Line_Tax", productLineTaxes); + inventoryLineItemList.push(inventoryLineItem); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.INVOICED_ITEMS, inventoryLineItemList); + let lineTaxes = []; + let lineTax = new ZOHOCRMSDK.Record.LineTax(); + lineTax.setName("MyTax123"); + lineTax.setPercentage(20.0); + lineTaxes.push(lineTax); + record1.addKeyValue('line_tax', lineTaxes); + // Address INFO + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.BILLING_CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.BILLING_STATE, "state"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.BILLING_COUNTRY, "country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.BILLING_CODE, "code"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.BILLING_STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.SHIPPING_STATE, "state"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.SHIPPING_CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.SHIPPING_COUNTRY, "country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.SHIPPING_STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Invoices.SHIPPING_CODE, "code"); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + // can add update another record with same above mention fields + let secondRecord = new ZOHOCRMSDK.Record.Record(); + secondRecord.setId(3452320103n); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.updateRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Invoices"; +await UpdateInvoices.initialize(); +await UpdateInvoices.updateInvoices(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/updaterecords/UpdateLeads.js b/versions/3.0.0/samples/updaterecords/UpdateLeads.js new file mode 100644 index 0000000..b8b02a7 --- /dev/null +++ b/versions/3.0.0/samples/updaterecords/UpdateLeads.js @@ -0,0 +1,189 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateLeads +{ + + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateLeads(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(3442321323n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.COMPANY, "company"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LAST_NAME, "LastName"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.FIRST_NAME, "First_Name"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.ANNUAL_REVENUE, 100.1); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.EMAIL, "abc@gmail.com"); + record1.addKeyValue("Designation", "Title_Name"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.SECONDARY_EMAIL, "abc1@gmail.com"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.PHONE, "3003003330"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.FAX, "fax"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.MOBILE, "10101010"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.WEBSITE, "www.domain.com"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LEAD_STATUS, new ZOHOCRMSDK.Choice("Contacted")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LEAD_SOURCE, new ZOHOCRMSDK.Choice("Advertisement")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.NO_OF_EMPLOYEES, 10); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.INDUSTRY, new ZOHOCRMSDK.Choice("ERP")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.EMAIL_OPT_OUT, true); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.RATING, new ZOHOCRMSDK.Choice("Active")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.SKYPE_ID, "skype_id"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.TWITTER, "twitter55"); + // Address Info + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.STATE, "State"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.CITY, "City"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.COUNTRY, "Country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.ZIP_CODE, "zip_code"); + // + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.DESCRIPTION, "description"); + // used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("Longinteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(44024804001n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(44024800774074n); + record1.addKeyValue("Lookup_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", "true"); + //for Custom MultiPickList + record1.addKeyValue("Multiselect", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(4402480054001n); + subform.addKeyValue("Userfield", user1); + let delete_record = new ZOHOCRMSDK.Record.Record(); + deleteFrom.setId(4402401573003n) + deleteFrom.addKeyValue("_delete", null); + subformList.push(delete_record); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 4402480393052n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 4401390054n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectLookup", multiSelectList); + // + // can add update another record with same above mention fields + let secondRecord = new ZOHOCRMSDK.Record.Record(); + secondRecord.setId(3452320103n); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.updateRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "leads"; +await UpdateLeads.initialize(); +await UpdateLeads.updateLeads(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/updaterecords/UpdatePriceBooks.js b/versions/3.0.0/samples/updaterecords/UpdatePriceBooks.js new file mode 100644 index 0000000..c98a833 --- /dev/null +++ b/versions/3.0.0/samples/updaterecords/UpdatePriceBooks.js @@ -0,0 +1,172 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdatePriceBooks +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updatePriceBooks(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(32234234232n); + let pricingDetails =[]; + let pricingDetail1 = new ZOHOCRMSDK.Record.PricingDetails(); + pricingDetail1.setFromRange(1.0); + pricingDetail1.setToRange(5.0); + pricingDetail1.setDiscount(2.0); + pricingDetails.push(pricingDetail1); + let pricingDetail2 = new ZOHOCRMSDK.Record.PricingDetails(); + pricingDetail2.addKeyValue('from_range', 6.0); + pricingDetail2.addKeyValue('to_range', 11.0); + pricingDetail2.addKeyValue('discount', 3.0); + pricingDetails.push(pricingDetail2); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Price_Books.PRICING_DETAILS, pricingDetails); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Price_Books.DESCRIPTION, 'description'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Price_Books.PRICE_BOOK_NAME, 'bookName'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Price_Books.PRICING_MODEL, new ZOHOCRMSDK.Choice('Flat')); + record1.addKeyValue('Email', 'abc@gmail.com'); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + // can add update another record with same above mention fields + let secondRecord = new ZOHOCRMSDK.Record.Record(); + secondRecord.setId(3452320103n); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.updateRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Price_Books"; +await UpdatePriceBooks.initialize(); +await UpdatePriceBooks.updatePriceBooks(moduleAPIName); diff --git a/versions/3.0.0/samples/updaterecords/UpdateProducts.js b/versions/3.0.0/samples/updaterecords/UpdateProducts.js new file mode 100644 index 0000000..707602c --- /dev/null +++ b/versions/3.0.0/samples/updaterecords/UpdateProducts.js @@ -0,0 +1,186 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateProducts +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateProducts(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(3323232342323n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.PRODUCT_NAME, 'prod'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.PRODUCT_CODE, 'code123'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.PRODUCT_ACTIVE, true); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.PRODUCT_CATEGORY, new ZOHOCRMSDK.Choice('Hardware')); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.MANUFACTURER, new ZOHOCRMSDK.Choice('LexPon Inc.')); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.UNIT_PRICE, 100.1); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.COMMISSION_RATE, 12.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.USAGE_UNIT, new ZOHOCRMSDK.Choice('Box')); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.QTY_ORDERED, 100.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.QTY_IN_DEMAND, 120.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.QTY_IN_STOCK, 200.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.REORDER_LEVEL, 1.0); + let vendorName = new ZOHOCRMSDK.Record.Record(); + vendorName.setId(440248030038n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.VENDOR_NAME, vendorName); + let handler = new ZOHOCRMSDK.Users.Users(); + handler.setId(440248000254001n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.HANDLER, handler); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.SALES_END_DATE, new Date(2023, 9, 10)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.SALES_START_DATE, new Date(2023, 8, 10)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.SUPPORT_EXPIRY_DATE, new Date(2023, 10, 10)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.SUPPORT_START_DATE, new Date(2023, 8, 10)); + let taxes = []; + let line_tax = new ZOHOCRMSDK.Record.Tax(); + line_tax.setId(4402480020810n); + line_tax.setValue("10.0"); + taxes.push(line_tax); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.TAX, taxes); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.TAXABLE, true); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Products.DESCRIPTION, 'description'); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + // can add update another record with same above mention fields + let secondRecord = new ZOHOCRMSDK.Record.Record(); + secondRecord.setId(3452320103n); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.updateRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Products"; +await UpdateProducts.initialize(); +await UpdateProducts.updateProducts(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/updaterecords/UpdatePurchaseOrders.js b/versions/3.0.0/samples/updaterecords/UpdatePurchaseOrders.js new file mode 100644 index 0000000..ba63344 --- /dev/null +++ b/versions/3.0.0/samples/updaterecords/UpdatePurchaseOrders.js @@ -0,0 +1,210 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdatePurchaseOrders +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updatePurchaseOrders(module) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(342344545643432n); + let vendor = new ZOHOCRMSDK.Record.Record(); + await vendor.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.ID, 4402480330038n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.VENDOR_NAME, vendor); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.SUBJECT, "new order"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.ADJUSTMENT, 30.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.CARRIER, new ZOHOCRMSDK.Choice("FedEX")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.PO_DATE, new Date(2023, 9, 23)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.PO_NUMBER, "123123"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.EXCISE_DUTY, 25.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.TRACKING_NUMBER, "42231"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.SALES_COMMISSION, 43.32); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.REQUISITION_NO, null); + let contact_Name = new ZOHOCRMSDK.Record.Record(); + await contact_Name.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.ID, 44024801393062n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.CONTACT_NAME, contact_Name); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.DESCRIPTION, "description"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.TERMS_AND_CONDITIONS, "details of terms and condition"); + let inventoryLineItemList = []; + let inventoryLineItem = new ZOHOCRMSDK.Record.Record(); + let lineItemProduct = new ZOHOCRMSDK.Record.LineItemProduct(); + lineItemProduct.setId(4402480026058n); + inventoryLineItem.addKeyValue("Description", "asd"); + inventoryLineItem.addKeyValue("Discount", "5"); + inventoryLineItem.addKeyValue("Quantity", 10.0); + inventoryLineItem.addKeyValue("List_price", 100.0); + inventoryLineItem.addKeyValue("Product_Name", lineItemProduct); + inventoryLineItem.addKeyValue("Product_Category_1", "hardware"); + let productLineTaxes = []; + let productLineTax = new ZOHOCRMSDK.Record.LineTax(); + productLineTax.setName("Vat"); + productLineTax.setValue(10.0); + productLineTax.setId(440240020810n); + productLineTax.setPercentage(10.0); + productLineTaxes.push(productLineTax); + inventoryLineItem.addKeyValue("Line_Tax", productLineTaxes); + inventoryLineItemList.push(inventoryLineItem); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.PURCHASE_ITEMS, inventoryLineItemList); + let lineTaxes = []; + let lineTax = new ZOHOCRMSDK.Record.LineTax(); + lineTax.setName("MyTax123"); + lineTax.setPercentage(20.0); + lineTaxes.push(lineTax); + record1.addKeyValue('line_tax', lineTaxes); + // Address INFO + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.BILLING_CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.BILLING_STATE, "state"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.BILLING_COUNTRY, "country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.BILLING_CODE, "code"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.BILLING_STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.SHIPPING_STATE, "state"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.SHIPPING_CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.SHIPPING_COUNTRY, "country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.SHIPPING_STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Purchase_Orders.SHIPPING_CODE, "code"); + + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + // can add update another record with same above mention fields + let secondRecord = new ZOHOCRMSDK.Record.Record(); + secondRecord.setId(3452320103n); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.updateRecords(module, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdatePurchaseOrders.initialize(); +await UpdatePurchaseOrders.updatePurchaseOrders("Purchase_Orders"); \ No newline at end of file diff --git a/versions/3.0.0/samples/updaterecords/UpdateQuotes.js b/versions/3.0.0/samples/updaterecords/UpdateQuotes.js new file mode 100644 index 0000000..f33301d --- /dev/null +++ b/versions/3.0.0/samples/updaterecords/UpdateQuotes.js @@ -0,0 +1,212 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateQuotes +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateQuotes(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(32324342323n); + let accountName = new ZOHOCRMSDK.Record.Record(); + accountName.addKeyValue("name", "automated"); + await accountName.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.ID, 4402481393052n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.ACCOUNT_NAME, accountName); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.SUBJECT, "new quote"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.ADJUSTMENT, 10.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.VALID_TILL,new Date(2023, 12, 10)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.TEAM, "teamName"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.TERMS_AND_CONDITIONS, "details of terms and conditions"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.DESCRIPTION, "description"); + let dealName = new ZOHOCRMSDK.Record.Record(); + await dealName.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.ID, 44024801393069n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.DEAL_NAME, dealName); + let contactName = new ZOHOCRMSDK.Record.Record(); + await contactName.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.ID, 44024801393062n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.CONTACT_NAME, contactName); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.QUOTE_STAGE, new ZOHOCRMSDK.Choice("Draft")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.CARRIER, new ZOHOCRMSDK.Choice("FedEX")); + + let inventoryLineItemList = []; + let inventoryLineItem = new ZOHOCRMSDK.Record.Record(); + let lineItemProduct = new ZOHOCRMSDK.Record.LineItemProduct(); + lineItemProduct.setId(440248001326058n); + inventoryLineItem.addKeyValue("Description", "asd"); + inventoryLineItem.addKeyValue("Discount", "5"); + inventoryLineItem.addKeyValue("Quantity", 10.0); + inventoryLineItem.addKeyValue("List_price", 100.0); + inventoryLineItem.addKeyValue("Product_Name", lineItemProduct); + inventoryLineItem.addKeyValue("Product_Category_1", "hardware"); + let productLineTaxes = []; + let productLineTax = new ZOHOCRMSDK.Record.LineTax(); + productLineTax.setName("Vat"); + productLineTax.setValue(10.0); + productLineTax.setId(440248020810n); + productLineTax.setPercentage(10.0); + productLineTaxes.push(productLineTax); + inventoryLineItem.addKeyValue("Line_Tax", productLineTaxes); + inventoryLineItemList.push(inventoryLineItem); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.QUOTED_ITEMS, inventoryLineItemList); + let lineTaxes = []; + let lineTax = new ZOHOCRMSDK.Record.LineTax(); + lineTax.setName("MyTax123"); + lineTax.setPercentage(20.0); + lineTaxes.push(lineTax); + record1.addKeyValue('line_tax', lineTaxes); + // Address INFO + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.BILLING_CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.BILLING_STATE, "state"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.BILLING_COUNTRY, "country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.BILLING_CODE, "code"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.BILLING_STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.SHIPPING_STATE, "state"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.SHIPPING_CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.SHIPPING_COUNTRY, "country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.SHIPPING_STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.SHIPPING_CODE, "code"); + + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + // can add update another record with same above mention fields + let secondRecord = new ZOHOCRMSDK.Record.Record(); + secondRecord.setId(3452320103n); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.updateRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateQuotes.initialize(); +await UpdateQuotes.updateQuotes("Quotes"); \ No newline at end of file diff --git a/versions/3.0.0/samples/updaterecords/UpdateSalesOrders.js b/versions/3.0.0/samples/updaterecords/UpdateSalesOrders.js new file mode 100644 index 0000000..d63b8c1 --- /dev/null +++ b/versions/3.0.0/samples/updaterecords/UpdateSalesOrders.js @@ -0,0 +1,219 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateSalesOrders +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateSalesOrders(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(32234234213232n); + let account = new ZOHOCRMSDK.Record.Record(); +// account.addKeyValue("name", "automated"); + await account.addFieldValue(ZOHOCRMSDK.Record.Field.Accounts.ID, 44024801393052n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.ACCOUNT_NAME, account); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.SUBJECT, "new order"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.ADJUSTMENT, 10.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.DESCRIPTION, "description"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.TERMS_AND_CONDITIONS, "details of terms and conditions"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.CUSTOMER_NO, "123212211"); + let quoteName = new ZOHOCRMSDK.Record.Record(); + await quoteName.addFieldValue(ZOHOCRMSDK.Record.Field.Quotes.ID, 4402481392125n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.QUOTE_NAME, quoteName); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.PENDING, null); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.CARRIER, new ZOHOCRMSDK.Choice("FedEX")); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.SALES_COMMISSION, 40.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.PURCHASE_ORDER, null); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.EXCISE_DUTY, 30.0); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.STATUS, new ZOHOCRMSDK.Choice("Created")); + let deal_name = new ZOHOCRMSDK.Record.Record(); + await deal_name.addFieldValue(ZOHOCRMSDK.Record.Field.Deals.ID, 4402480393069n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.DEAL_NAME, deal_name); + let contact_name = new ZOHOCRMSDK.Record.Record(); + await contact_name.addFieldValue(ZOHOCRMSDK.Record.Field.Contacts.ID, 4402480001393062n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.CONTACT_NAME, contact_name); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.DUE_DATE, new Date(2023, 12, 21)); + + let inventoryLineItemList = []; + let inventoryLineItem = new ZOHOCRMSDK.Record.Record(); + let lineItemProduct = new ZOHOCRMSDK.Record.LineItemProduct(); + lineItemProduct.setId(44024801326058n); + inventoryLineItem.addKeyValue("Description", "asd"); + inventoryLineItem.addKeyValue("Discount", "5"); + inventoryLineItem.addKeyValue("Quantity", 10.0); + inventoryLineItem.addKeyValue("List_price", 100.0); + inventoryLineItem.addKeyValue("Product_Name", lineItemProduct); + inventoryLineItem.addKeyValue("Product_Category_1", "hardware"); + let productLineTaxes = []; + let productLineTax = new ZOHOCRMSDK.Record.LineTax(); + productLineTax.setName("Vat"); + productLineTax.setValue(10.0); + productLineTax.setId(4402480810n); + productLineTax.setPercentage(10.0); + productLineTaxes.push(productLineTax); + inventoryLineItem.addKeyValue("Line_Tax", productLineTaxes); + inventoryLineItemList.push(inventoryLineItem); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.ORDERED_ITEMS, inventoryLineItemList); + let lineTaxes = []; + let lineTax = new ZOHOCRMSDK.Record.LineTax(); + lineTax.setName("MyTax123"); + lineTax.setPercentage(20.0); + lineTaxes.push(lineTax); + record1.addKeyValue('line_tax', lineTaxes); + // Address INFO + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.BILLING_CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.BILLING_STATE, "state"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.BILLING_COUNTRY, "country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.BILLING_CODE, "code"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.BILLING_STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.SHIPPING_STATE, "state"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.SHIPPING_CITY, "city"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.SHIPPING_COUNTRY, "country"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.SHIPPING_STREET, "street"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Sales_Orders.SHIPPING_CODE, "code"); + + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + // can add update another record with same above mention fields + let secondRecord = new ZOHOCRMSDK.Record.Record(); + secondRecord.setId(3452320103n); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.updateRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateSalesOrders.initialize(); +await UpdateSalesOrders.updateSalesOrders("Sales_Orders"); \ No newline at end of file diff --git a/versions/3.0.0/samples/updaterecords/UpdateSolutions.js b/versions/3.0.0/samples/updaterecords/UpdateSolutions.js new file mode 100644 index 0000000..b407647 --- /dev/null +++ b/versions/3.0.0/samples/updaterecords/UpdateSolutions.js @@ -0,0 +1,166 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateSolutions +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateSolutions(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(321423423423n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Solutions.SOLUTION_TITLE, "new Solution"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Solutions.QUESTION, "question?"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Solutions.ANSWER, "answer."); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Solutions.STATUS, new ZOHOCRMSDK.Choice('Draft')); + let productName = new ZOHOCRMSDK.Record.Record(); + productName.setId(44024801391082n); + await productName.addFieldValue(ZOHOCRMSDK.Record.Field.Solutions.PRODUCT_NAME, productName); + let solutionOwner = new ZOHOCRMSDK.Users.Users(); + solutionOwner.setId(4402480254001n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Solutions.OWNER, solutionOwner); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + // can add update another record with same above mention fields + let secondRecord = new ZOHOCRMSDK.Record.Record(); + secondRecord.setId(3452320103n); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.updateRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Solutions"; +await UpdateSolutions.initialize(); +await UpdateSolutions.updateSolutions(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/updaterecords/UpdateTasks.js b/versions/3.0.0/samples/updaterecords/UpdateTasks.js new file mode 100644 index 0000000..fb5d785 --- /dev/null +++ b/versions/3.0.0/samples/updaterecords/UpdateTasks.js @@ -0,0 +1,177 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateTasks +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateTasks(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(323254342323n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.DESCRIPTION, 'description'); + record1.addKeyValue('Rupee', new ZOHOCRMSDK.Choice("INR")); + let remindAt = new ZOHOCRMSDK.Record.RemindAt(); + remindAt.setAlarm("ACTION=EMAIL;TRIGGER=-P1D;TRIGGER_TIME=22:52"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.REMIND_AT, remindAt); + let whoId = new ZOHOCRMSDK.Record.Record(); + whoId.setId(440248001393062n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.WHO_ID, whoId); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.STATUS, new ZOHOCRMSDK.Choice('Not Started')); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.PRIORITY, new ZOHOCRMSDK.Choice('Low')); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.DUE_DATE, new Date(2023, 10, 12)); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.SUBJECT, 'Email1'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.SEND_NOTIFICATION_EMAIL, false); + let whatId = new ZOHOCRMSDK.Record.Record(); + whatId.setId(4402480093052n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.WHAT_ID, whatId); + record1.addKeyValue('$se_module', "Accounts"); + // Recurring Activity can be provided in any activity Module + let recurringActivity = new ZOHOCRMSDK.Record.RecurringActivity(); + recurringActivity.setRrule("FREQ=DAILY;INTERVAL=1;DTSTART=2022-04-06;UNTIL=2022-04-12"); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Tasks.RECURRING_ACTIVITY, recurringActivity); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + // can add update another record with same above mention fields + let secondRecord = new ZOHOCRMSDK.Record.Record(); + secondRecord.setId(3452320103n); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.updateRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Tasks"; +await UpdateTasks.initialize(); +await UpdateTasks.updateTasks(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/updaterecords/UpdateVendors.js b/versions/3.0.0/samples/updaterecords/UpdateVendors.js new file mode 100644 index 0000000..0594629 --- /dev/null +++ b/versions/3.0.0/samples/updaterecords/UpdateVendors.js @@ -0,0 +1,168 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateVendors +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateVendors(moduleAPIName) + { + let recordOperations = new ZOHOCRMSDK.Record.RecordOperations(); + let request = new ZOHOCRMSDK.Record.BodyWrapper(); + let records = []; + let record1 = new ZOHOCRMSDK.Record.Record(); + record1.setId(323231232n); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.VENDOR_NAME, 'new vendor name'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.PHONE, '123321'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.EMAIL, 'abc@gmail.com'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.WEBSITE, null); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.GL_ACCOUNT, new ZOHOCRMSDK.Choice('Sales-Software')); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.CATEGORY, ''); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.CITY, 'city'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.COUNTRY, 'Country'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.STATE, 'State'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.STREET, 'street'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.ZIP_CODE, 'Zip123'); + await record1.addFieldValue(ZOHOCRMSDK.Record.Field.Vendors.DESCRIPTION, 'description'); + //used when GDPR is enabled + let dataConsent = new ZOHOCRMSDK.Record.Consent(); + dataConsent.setConsentRemarks("Approved."); + dataConsent.setConsentThrough("Email"); + dataConsent.setContactThroughEmail(true); + dataConsent.setContactThroughSocial(false); + dataConsent.setContactThroughPhone(true); + dataConsent.setContactThroughSurvey(true); + dataConsent.setConsentDate(new Date(2022, 10, 11)); + dataConsent.setDataProcessingBasis("Obtained"); + record1.addKeyValue("Data_Processing_Basis_Details", dataConsent); + // for custom Fields + record1.addKeyValue("External", "Value12345"); + record1.addKeyValue("LongInteger", 123); + record1.addKeyValue("CustomField", "custom_field"); + record1.addKeyValue("Datetime", new Date(2020, 12, 20, 10, 29, 33)); + record1.addKeyValue("Date_1", new Date(2020, 10, 12)); + record1.addKeyValue("Subject", "AutomatedSDK"); + record1.addKeyValue("Product_Name", "Automated"); + let fileDetails = []; + let fileDetail = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183"); + fileDetails.push(fileDetail); + let fileDetail2 = new ZOHOCRMSDK.Record.FileDetails(); + fileDetail2.setFileIdS("ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae2329ad87c6d90b0bd44183"); + fileDetails.push(fileDetail2); + record1.addKeyValue("file_Upload", fileDetails); + // for Custom User LookUp + let user = new ZOHOCRMSDK.Users.MinifiedUser(); + user.setId(4323001232n); + record1.addKeyValue("User_1", user); + // for Custom LookUp + let data = new ZOHOCRMSDK.Record.Record(); + data.setId(400034234234234n); + record1.addKeyValue("LookUp_1", data); + //for Custom PicKList + record1.addKeyValue("Pick", new ZOHOCRMSDK.Choice(true)); + //for Custom MultiPickList + record1.addKeyValue("MultiSelecr", [new ZOHOCRMSDK.Choice("Option 1"), new ZOHOCRMSDK.Choice("Option 2")]); + // for Subform + let subformList =[]; + let subform = new ZOHOCRMSDK.Record.Record(); + subform.addKeyValue("customfield", "customValue"); + let user1 = new ZOHOCRMSDK.Users.MinifiedUser(); + user1.setId(42393413434213n); + subform.addKeyValue("Userfield", user1); + subformList.push(subform); + record1.addKeyValue("Subform_2", subformList); + // for MultiSelectLookUp/custom MultiSelectLookUp + let multiSelectList = []; + let record = new ZOHOCRMSDK.Record.Record(); + record.addKeyValue("id", 43234234423434n); + let linkingRecord = new ZOHOCRMSDK.Record.Record(); + linkingRecord.addKeyValue("MultiSelectLookup", record); + multiSelectList.push(linkingRecord); + let record2 = new ZOHOCRMSDK.Record.Record(); + record2.addKeyValue("id", 43234234423434n); + let linkingRecord2= new ZOHOCRMSDK.Record.Record(); + linkingRecord2.addKeyValue("MultiSelectLookup", record2); + multiSelectList.push(linkingRecord2); + record1.addKeyValue("MultiSelectlookup", multiSelectList); + // + // can add update another record with same above mention fields + let secondRecord = new ZOHOCRMSDK.Record.Record(); + secondRecord.setId(3452320103n); + // + let tagList = []; + let tag = new ZOHOCRMSDK.Tags.Tag(); + tag.setName("Testtask"); + tagList.push(tag); + record1.setTag(tagList); + // add Record instance to List + records.push(record1); + request.setData(records); + let trigger = ["approval", "workflow", "blueprint"]; + request.setTrigger(trigger); + request.setLarId("4222222222224324"); + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + // await headerInstance.add(ZOHOCRMSDK.Record.CreateRecordsHeader.X_EXTERNAL, "Products.Products_External"); + let response = await recordOperations.updateRecords(moduleAPIName, request, headerInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Record.ActionWrapper) { + let actionResponses = responseObject.getData(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Record.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } else if (actionResponse instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } else if (responseObject instanceof ZOHOCRMSDK.Record.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let moduleAPIName = "Vendors"; +await UpdateVendors.initialize(); +await UpdateVendors.updateVendors(moduleAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/userGroups/GetAssociatedUsersCount.js b/versions/3.0.0/samples/userGroups/GetAssociatedUsersCount.js new file mode 100644 index 0000000..c25e773 --- /dev/null +++ b/versions/3.0.0/samples/userGroups/GetAssociatedUsersCount.js @@ -0,0 +1,78 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetAssociatedUsersCount +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getAssociateUsersCount() + { + let userGroupOperations = new ZOHOCRMSDK.GroupsUser.UserGroupsOperations(); + let response = await userGroupOperations.getAssociatedUsersCount(); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject instanceof ZOHOCRMSDK.GroupsUser.AssociatedUserCount) + { + let associatedUsersCount = responseObject.getAssociatedUsersCount(); + associatedUsersCount.forEach(associatedUser => { + console.log("AssociatedUSersCount Name : " + associatedUser.getCount()); + let userGroup = associatedUser.getUserGroup(); + if (userGroup != null) + { + console.log("AssociatedUsersCount Name " + userGroup.getName()); + console.log("AssociatedUsersCount ID " + userGroup.getId()); + } + }); + let info = responseObject.getInfo(); + if (info != null) + { + if (info.getPerPage() != null) + { + console.log("Territory Info PerPage: " + info.getPerPage().toString()); + } + if (info.getCount() != null) + { + console.log("Territory Info Count: " + info.getCount().toString()); + } + if (info.getPage() != null) + { + console.log("Territory Info Page: " + info.getPage().toString()); + } + if (info.getMoreRecords() != null) + { + console.log("Territory Info MoreRecords: " + info.getMoreRecords().toString()); + } + } + } + else if (responseObject instanceof ZOHOCRMSDK.GroupsUser.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } +} +await GetAssociatedUsersCount.initialize(); +await GetAssociatedUsersCount.getAssociateUsersCount(); \ No newline at end of file diff --git a/versions/3.0.0/samples/userGroups/GetAssociations.js b/versions/3.0.0/samples/userGroups/GetAssociations.js new file mode 100644 index 0000000..246863c --- /dev/null +++ b/versions/3.0.0/samples/userGroups/GetAssociations.js @@ -0,0 +1,73 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetAssociations +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getAssociations(groupId) + { + let userGroupOperations = new ZOHOCRMSDK.GroupsUser.UserGroupsOperations(); + let response = await userGroupOperations.getAssociations(groupId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.GroupsUser.AssociationWrapper) + { + let associations = responseHandler.getAssociations(); + if (associations != null) + { + associations.forEach(associationResponse =>{ + console.log("Associations Type : " + associationResponse.getType()); + let resource = associationResponse.getResource(); + if (resource != null) + { + console.log("Associations Resource Id : " + resource.getId()); + console.log("Associations Resource Name : " + resource.getName()); + } + let detail = associationResponse.getDetail(); + if (detail != null) + { + let module = detail.getModule(); + if (module != null) + { + console.log("Associations Module Id : " + module.getId()); + console.log("Associations Module Id : " + module.getAPIName()); + console.log("Associations Module Id : " + module.getModule()); + } + } + }); + } + } + else if (responseHandler instanceof ZOHOCRMSDK.GroupsUser.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage()); + } + } + } +} +let groupId = 44024801389042n; +await GetAssociations.initialize(); +await GetAssociations.getAssociations(groupId); \ No newline at end of file diff --git a/versions/3.0.0/samples/userGroups/createGroup.js b/versions/3.0.0/samples/userGroups/createGroup.js new file mode 100644 index 0000000..e3500f5 --- /dev/null +++ b/versions/3.0.0/samples/userGroups/createGroup.js @@ -0,0 +1,97 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateGroup +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async createGroup() + { + let userGroupOperations = new ZOHOCRMSDK.GroupsUser.UserGroupsOperations(); + let request = new ZOHOCRMSDK.GroupsUser.BodyWrapper(); + let userList = []; + let user1 = new ZOHOCRMSDK.GroupsUser.Groups(); + user1.setName("test1"); + user1.setDescription("my Group"); + let sources = []; + let source = new ZOHOCRMSDK.GroupsUser.Sources(); + source.setType(new ZOHOCRMSDK.Choice("users")); + let source1 = new ZOHOCRMSDK.GroupsUser.Source(); + source1.setId(440248394119n); + await source.setSource(source1); + sources.push(source); + user1.setSources(sources); + userList.push(user1); + request.setUserGroups(userList); + let response = await userGroupOperations.createGroups(request); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.GroupsUser.ActionWrapper) + { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getUserGroups(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.GroupsUser.SuccessResponse) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.GroupsUser.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() +"\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.GroupsUser.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await CreateGroup.initialize(); +await CreateGroup.createGroup(); diff --git a/versions/3.0.0/samples/userGroups/deleteGroup.js b/versions/3.0.0/samples/userGroups/deleteGroup.js new file mode 100644 index 0000000..d4de009 --- /dev/null +++ b/versions/3.0.0/samples/userGroups/deleteGroup.js @@ -0,0 +1,83 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class DeleteGroup +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async deleteGroup(groupId) + { + let userGroupOperations = new ZOHOCRMSDK.GroupsUser.UserGroupsOperations(); + let response = await userGroupOperations.deleteGroup(groupId); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.GroupsUser.ActionWrapper) + { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getUserGroups(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.GroupsUser.SuccessResponse) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.GroupsUser.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() +"\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.GroupsUser.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let groupID = 4402401389042n; +await DeleteGroup.initialize(); +await DeleteGroup.deleteGroup(groupID); \ No newline at end of file diff --git a/versions/3.0.0/samples/userGroups/getGroup.js b/versions/3.0.0/samples/userGroups/getGroup.js new file mode 100644 index 0000000..4c52a7b --- /dev/null +++ b/versions/3.0.0/samples/userGroups/getGroup.js @@ -0,0 +1,90 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetGroup +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getGroup(group) + { + let userGroupOperations = new ZOHOCRMSDK.GroupsUser.UserGroupsOperations(); + let response = await userGroupOperations.getGroup(group); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.GroupsUser.ResponseWrapper) + { + let responseWrapper = responseHandler; + let users = responseWrapper.getUserGroups(); + if (users != null) + { + users.forEach(user => { + let createdBy = user.getCreatedBy(); + if (createdBy != null) + { + console.log("UserGroups Created By User-Name: " + createdBy.getName() + "\n"); + console.log("UserGroups Created By User-Id: " + createdBy.getId() + "\n"); + } + let modifiedBy = user.getModifiedBy(); + if (modifiedBy != null) + { + console.log("UserGroups Modified By User-Name: " + createdBy.getName() + "\n"); + console.log("UserGroups Modified By User-Id: " + createdBy.getId() + "\n"); + } + console.log("User ModifiedTime : " + user.getModifiedTime() + "\n"); + console.log("User CreatedTime : " + user.getCreatedTime() + "\n"); + console.log("UserGroups Description : " + user.getDescription() + "\n"); + console.log("UserGroups Id : " + user.getId() + "\n"); + console.log("UserGroups Name : " + user.getName() + "\n"); + let sources = user.getSources(); + if (sources != null) + { + sources.forEach(source => { + console.log("UserGroups Sources Type :" + source.getType().getValue() + "\n"); + let source1 = source.getSource(); + if(source1 != null) + { + console.log("UserGroups Sources Id: " + source1.getId() + "\n"); + } + console.log("UserGroups Sources SubOrdinates: " + source.getSubordinates() + "\m"); + console.log("UserGroups Sources SubTerritories: " + source.getSubTerritories() + "\m"); + }); + } + }); + } + } + else if (responseHandler instanceof ZOHOCRMSDK.GroupsUser.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let group = 4402480389042n; +await GetGroup.initialize(); +await GetGroup.getGroup(group); \ No newline at end of file diff --git a/versions/3.0.0/samples/userGroups/getGroups.js b/versions/3.0.0/samples/userGroups/getGroups.js new file mode 100644 index 0000000..4d6a0b0 --- /dev/null +++ b/versions/3.0.0/samples/userGroups/getGroups.js @@ -0,0 +1,109 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetGroups +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getGroups() + { + let userGroupOperations = new ZOHOCRMSDK.GroupsUser.UserGroupsOperations(); + let response = await userGroupOperations.getGroups(); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.GroupsUser.ResponseWrapper) + { + let responseWrapper = responseHandler; + let users = responseWrapper.getUserGroups(); + if (users != null) + { + users.forEach(user => { + let createdBy = user.getCreatedBy(); + if (createdBy != null) + { + console.log("UserGroups Created By User-Name: " + createdBy.getName() + "\n"); + console.log("UserGroups Created By User-Id: " + createdBy.getId() + "\n"); + } + let modifiedBy = user.getModifiedBy(); + if (modifiedBy != null) + { + console.log("UserGroups Modified By User-Name: " + createdBy.getName() + "\n"); + console.log("UserGroups Modified By User-Id: " + createdBy.getId() + "\n"); + } + console.log("User ModifiedTime : " + user.getModifiedTime() + "\n"); + console.log("User CreatedTime : " + user.getCreatedTime() + "\n"); + console.log("UserGroups Description : " + user.getDescription() + "\n"); + console.log("User Id : " + user.getId() + "\n"); + console.log("User Name : " + user.getName() + "\n"); + let sources = user.getSources(); + if (sources != null) + { + sources.forEach(source => { + console.log("UserGroups Sources Type :" + source.getType().getValue() + "\n"); + let source1 = source.getSource(); + if(source1 != null) + { + console.log("UserGroups Sources Id: " + source1.getId() + "\n"); + } + console.log("UserGroups Sources SubOrdinates: " + source.getSubordinates() + "\m"); + console.log("UserGroups Sources SubTerritories: " + source.getSubTerritories() + "\m"); + }); + } + let info =responseWrapper.getInfo(); + if (info != null) + { + if (info.getPerPage() != null) + { + console.log("User Info PerPage: " + info.getPerPage() + "\n"); + } + if (info.getCount() != null) + { + console.log("User Info Count: " + info.getCount() + "\n"); + } + if (info.getPage() != null) + { + console.log("User Info Page: " + info.getPage() + "\n"); + } + if (info.getMoreRecords() != null) + { + console.log("User Info MoreRecords: " + info.getMoreRecords() + "\n"); + } + } + }); + } + } + else if (responseHandler instanceof ZOHOCRMSDK.GroupsUser.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await GetGroups.initialize(); +await GetGroups.getGroups(); \ No newline at end of file diff --git a/versions/3.0.0/samples/userGroups/getSources.js b/versions/3.0.0/samples/userGroups/getSources.js new file mode 100644 index 0000000..7c784ba --- /dev/null +++ b/versions/3.0.0/samples/userGroups/getSources.js @@ -0,0 +1,88 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetSources +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getSources(groupId) + { + let userGroupOperations = new ZOHOCRMSDK.GroupsUser.UserGroupsOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + let response = await userGroupOperations.getSources(groupId, paramInstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.GroupsUser.SourcesWrapper) + { + let responseWrapper = responseHandler; + let sources = responseWrapper.getSources(); + if (sources != null) + { + sources.forEach(source => { + let source1 = source.getSource(); + if (source1 != null) + { + console.log("Sources User_name : " + source1.getName() + "\n" ); + console.log("Sources User_Id : " + source1.getId() + "\n" ); + } + console.log("Sources Type: " + source.getType().getValue() + "\n"); + console.log("Sources Subordinates: " + source.getSubordinates() + "\n"); + }); + } + let info = responseWrapper.getInfo(); + if (info != null) + { + if (info.getPerPage() != null) + { + console.log("Sources Info PerPage: " + info.getPerPage() + "\n"); + } + if (info.getCount() != null) + { + console.log("Sources Info Count: " + info.getCount() + "\n"); + } + if (info.getPage() != null) + { + console.log("Sources Info Page: " + info.getPage() + "\n"); + } + if (info.getMoreRecords() != null) + { + console.log("Sources Info MoreRecords: " + info.getMoreRecords() + "\n"); + } + } + } + else if (responseHandler instanceof ZOHOCRMSDK.GroupsUser.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let groupId = 440248389042n; +await GetSources.initialize(); +await GetSources.getSources(groupId); \ No newline at end of file diff --git a/versions/3.0.0/samples/userGroups/getSourcesCount.js b/versions/3.0.0/samples/userGroups/getSourcesCount.js new file mode 100644 index 0000000..fd8ff4b --- /dev/null +++ b/versions/3.0.0/samples/userGroups/getSourcesCount.js @@ -0,0 +1,69 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetSourcesCount +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getSourcesCount(groupId) + { + let userGroupOperations = new ZOHOCRMSDK.GroupsUser.UserGroupsOperations(); + let response = await userGroupOperations.getSourcesCount(groupId); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.GroupsUser.SourcesCountWrapper) + { + let responseWrapper = responseHandler; + let sourcesCount = responseWrapper.getSourcesCount(); + if (sourcesCount != null) + { + sourcesCount.forEach(sourceCount => { + console.log("Sources Count Territories : " + sourceCount.getTerritories() + "\n"); + console.log("Sources Count Roles : " + sourceCount.getRoles() + "\n"); + console.log("Sources Count Groups : " + sourceCount.getGroups() + "\n"); + let users = sourceCount.getUsers(); + if (users != null) + { + console.log("Sources Users Inactive : " + users.getInactive() + "\n"); + console.log("Sources Users Deleted : " + users.getDeleted() + "\n"); + console.log("Sources Users Active : " + users.getActive() + "\n"); + } + }); + } + } + else if (responseHandler instanceof ZOHOCRMSDK.GroupsUser.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let groupId = 44024803242345; +await GetSourcesCount.initialize(); +await GetSourcesCount.getSourcesCount(groupId); \ No newline at end of file diff --git a/versions/3.0.0/samples/userGroups/updateGroup.js b/versions/3.0.0/samples/userGroups/updateGroup.js new file mode 100644 index 0000000..27482e7 --- /dev/null +++ b/versions/3.0.0/samples/userGroups/updateGroup.js @@ -0,0 +1,98 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateGroup +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateGroup(groupId) + { + let userGroupOperations = new ZOHOCRMSDK.GroupsUser.UserGroupsOperations(); + let request = new ZOHOCRMSDK.GroupsUser.BodyWrapper(); + let userList = []; + let user1 = new ZOHOCRMSDK.GroupsUser.Groups(); + user1.setName("test Group"); + user1.setDescription("my Group"); + let sources = []; + let source = new ZOHOCRMSDK.GroupsUser.Sources(); + source.setType(new ZOHOCRMSDK.Choice("users")); + let source1 = new ZOHOCRMSDK.GroupsUser.Source(); + source1.setId(4430034243421n); + await source.setSource(source1); + sources.push(source); + user1.setSources(sources); + userList.push(user1); + request.setUserGroups(userList); + let response = userGroupOperations.updateGroup(groupId, request); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.GroupsUser.ActionWrapper) + { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getUserGroups(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.GroupsUser.SuccessResponse) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.GroupsUser.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() +"\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.GroupsUser.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let groupId = 4300242324003n; +await UpdateGroup.initialize(); +await UpdateGroup.updateGroup(groupId); \ No newline at end of file diff --git a/versions/3.0.0/samples/userGroups/updateGroups.js b/versions/3.0.0/samples/userGroups/updateGroups.js new file mode 100644 index 0000000..82e6d9c --- /dev/null +++ b/versions/3.0.0/samples/userGroups/updateGroups.js @@ -0,0 +1,98 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateGroups +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async updateGroups() + { + let userGroupOperations = new ZOHOCRMSDK.GroupsUser.UserGroupsOperations(); + let request = new ZOHOCRMSDK.GroupsUser.BodyWrapper(); + let userList = []; + let user1 = new ZOHOCRMSDK.GroupsUser.Groups(); + user1.setId(3233242342342n) + user1.setName("test Group"); + user1.setDescription("my Group"); + let sources = []; + let source = new ZOHOCRMSDK.GroupsUser.Sources(); + source.setType(new ZOHOCRMSDK.Choice("users")); + let source1 = new ZOHOCRMSDK.GroupsUser.Source(); + source1.setId(4430034243421n); + await source.setSource(source1); + sources.push(source); + user1.setSources(sources); + userList.push(user1); + request.setUserGroups(userList); + let response = userGroupOperations.updateGroups(request); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.GroupsUser.ActionWrapper) + { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getUserGroups(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.GroupsUser.SuccessResponse) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.GroupsUser.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() +"\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.GroupsUser.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +await UpdateGroups.initialize(); +await UpdateGroups.updateGroups(); \ No newline at end of file diff --git a/versions/3.0.0/samples/users/GetAssociatedGroups.js b/versions/3.0.0/samples/users/GetAssociatedGroups.js new file mode 100644 index 0000000..c0284a1 --- /dev/null +++ b/versions/3.0.0/samples/users/GetAssociatedGroups.js @@ -0,0 +1,74 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetAssociatedGroups +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getAssociatedGroups(userId) + { + let usersOperations = new ZOHOCRMSDK.Users.UsersOperations(); + let response =await usersOperations.getAssociatedGroups(userId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.Users.AssociatedGroupsWrapper) + { + let userGroups = responseHandler.getUserGroups(); + if (userGroups != null) + { + userGroups.forEach(userGroup => { + console.log("AssociateGroup ID : " + userGroup.getId()); + console.log("AssociateGroup Name : " + userGroup.getName()); + console.log("AssociateGroup Description : " + userGroup.getDescription()); + console.log("AssociateGroup CreatedTime : " + userGroup.getCreatedTime()); + console.log("AssociateGroup ModifiedTime : " + userGroup.getModifiedTime()); + let createdBy = userGroup.getCreatedBy(); + if (createdBy != null) + { + console.log("AssociateGroup CreatedBy ID : " + createdBy.getId()); + console.log("AssociateGroup CreatedBy Name : " + createdBy.getName()); + console.log("AssociateGroup CreatedBy Email : " + createdBy.getEmail()); + } + let modifiedBy = userGroup.getModifiedBy(); + if (modifiedBy != null) + { + console.log("AssociateGroup modifiedBy ID : " + modifiedBy.getId()); + console.log("AssociateGroup modifiedBy Name : " + modifiedBy.getName()); + console.log("AssociateGroup modifiedBy Email : " + modifiedBy.getEmail()); + } + }); + } + } + else if (responseHandler instanceof ZOHOCRMSDK.Users.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage()); + } + } + } +} +let userId = 4402254001n; +await GetAssociatedGroups.initialize(); +await GetAssociatedGroups.getAssociatedGroups(userId) \ No newline at end of file diff --git a/versions/3.0.0/samples/users/createUser.js b/versions/3.0.0/samples/users/createUser.js new file mode 100644 index 0000000..4790723 --- /dev/null +++ b/versions/3.0.0/samples/users/createUser.js @@ -0,0 +1,88 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class CreateUser{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Create Users

+ * This method is used to add a user to your organization and print the response. + */ + static async createUser() { + let usersOperations = new ZOHOCRMSDK.Users.UsersOperations(); + let request = new ZOHOCRMSDK.Users.BodyWrapper(); + let userArray = []; + let user = new ZOHOCRMSDK.Users.Users(); + let role = new ZOHOCRMSDK.Users.Role(); + role.setId(44024808043n); + await user.setRole(role); + user.setCountryLocale("en_US"); + user.setFirstName("Test"); + user.setLastName("User"); + user.setEmail("abc@gmail.com"); + let profile = new ZOHOCRMSDK.Users.Profile(); + profile.setId(4402480031160n); + await user.setProfile(profile); + userArray.push(user); + request.setUsers(userArray); + //Call createUser method that takes RequestWrapper class instance as parameter + let response = await usersOperations.createUsers(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Users.ActionWrapper) { + let actionResponses = responseObject.getUsers(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Users.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Users.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Users.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await CreateUser.initialize(); +await CreateUser.createUser(); \ No newline at end of file diff --git a/versions/3.0.0/samples/users/deleteUser.js b/versions/3.0.0/samples/users/deleteUser.js new file mode 100644 index 0000000..6b17810 --- /dev/null +++ b/versions/3.0.0/samples/users/deleteUser.js @@ -0,0 +1,78 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteUser{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Delete User

+ * This method is used to delete a user from your organization and print the response. + * @param {BigInt} userId The ID of the User to be deleted + */ + static async deleteUser(userId) { + //example + //let userId = 302031n; + //Get instance of UsersOperations Class + let usersOperations = new ZOHOCRMSDK.Users.UsersOperations(); + //Call deleteUser method that takes userId as parameter + let response = await usersOperations.deleteUser(userId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Users.ActionWrapper) { + let actionResponses = responseObject.getUsers(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Users.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Users.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Users.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await DeleteUser.initialize(); +let userId = 44024892024n; +await DeleteUser.deleteUser(userId); \ No newline at end of file diff --git a/versions/3.0.0/samples/users/getUser.js b/versions/3.0.0/samples/users/getUser.js new file mode 100644 index 0000000..71db69d --- /dev/null +++ b/versions/3.0.0/samples/users/getUser.js @@ -0,0 +1,166 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetUser{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get User

+ * This method is used to get the details of any specific user. + * Specify the unique id of the user in your API request to get the data for that particular user. + * @param {BigInt} userId The ID of the User to be obtained + */ + static async getuser(userId) { + //example + //let userId = 302031n; + //Get instance of UsersOperations Class + let usersOperations = new ZOHOCRMSDK.Users.UsersOperations(); + //Get instance of HeaderMap Class + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + /* Possible parameters for Get User operation */ + await headerInstance.add(ZOHOCRMSDK.Users.GetUserHeader.IF_MODIFIED_SINCE, new Date("2019-12-12T12:12:12+05:30")); + //Call getUser method that takes headerInstance and userId as parameters + let response = await usersOperations.getUser(userId, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + //Get object from response + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Users.ResponseWrapper) { + let users = responseObject.getUsers(); + users.forEach(user => { + console.log("User Country: " + user.getCountry()); + let role = user.getRole(); + if (role != null) { + console.log("User Role Name: " + role.getName()); + console.log("User Role ID: " + role.getId()); + } + let customizeInfo = user.getCustomizeInfo(); + if (customizeInfo != null) { + if (customizeInfo.getNotesDesc() != null) { + console.log("User CustomizeInfo NotesDesc: " + customizeInfo.getNotesDesc().toString()); + } + if (customizeInfo.getShowRightPanel() != null) { + console.log("User CustomizeInfo ShowRightPanel: " + customizeInfo.getShowRightPanel().toString()); + } + if (customizeInfo.getBcView() != null) { + console.log("User CustomizeInfo BcView: " + customizeInfo.getBcView().toString()); + } + if (customizeInfo.getShowHome() != null) { + console.log("User CustomizeInfo ShowHome: " + customizeInfo.getShowHome().toString()); + } + if (customizeInfo.getShowDetailView() != null) { + console.log("User CustomizeInfo ShowDetailView: " + customizeInfo.getShowDetailView().toString()); + } + if (customizeInfo.getUnpinRecentItem() != null) { + console.log("User CustomizeInfo UnpinRecentItem: " + customizeInfo.getUnpinRecentItem().toString()); + } + } + console.log("User Signature: " + user.getSignature()); + console.log("User SortOrderPreference: " + user.getSortOrderPreference()); + console.log("User City: " + user.getCity()); + console.log("User Language: " + user.getLanguage()); + console.log("User Locale: " + user.getLocale()); + console.log("User Microsoft: " + user.getMicrosoft().toString()); + if (user.getPersonalAccount() != null) { + console.log("User PersonalAccount: " + user.getPersonalAccount().toString()); + } + console.log("User DefaultTabGroup: " + user.getDefaultTabGroup()); + console.log("User Isonline: " + user.getIsonline().toString()); + let modifiedBy = user.getModifiedBy(); + if (modifiedBy != null) { + console.log("User Modified By User-Name: " + modifiedBy.getName()); + console.log("User Modified By User-ID: " + modifiedBy.getId()); + } + console.log("User Street: " + user.getStreet()); + console.log("User Currency: " + user.getCurrency()); + console.log("User Alias: " + user.getAlias()); + let theme = user.getTheme(); + if (theme != null) { + let normalTab = theme.getNormalTab(); + if (normalTab != null) { + console.log("User Theme NormalTab FontColor: " + normalTab.getFontColor()); + console.log("User Theme NormalTab Name: " + normalTab.getBackground()); + } + let selectedTab = theme.getSelectedTab(); + if (selectedTab != null) { + console.log("User Theme SelectedTab FontColor: " + selectedTab.getFontColor()); + console.log("User Theme SelectedTab Name: " + selectedTab.getBackground()); + } + console.log("User Theme NewBackground: " + theme.getNewBackground()); + console.log("User Theme Background: " + theme.getBackground()); + console.log("User Theme Screen: " + theme.getScreen()); + console.log("User Theme Type: " + theme.getType()); + } + console.log("User ID: " + user.getId()); + console.log("User State: " + user.getState()); + console.log("User Fax: " + user.getFax()); + console.log("User CountryLocale: " + user.getCountryLocale()); + console.log("User SandboxDeveloper: " + user.getSandboxdeveloper()); + console.log("User FirstName: " + user.getFirstName()); + console.log("User Email: " + user.getEmail()); + let reportingTo = user.getReportingTo(); + if (reportingTo != null) { + console.log("User ReportingTo Name: " + reportingTo.getName()); + console.log("User ReportingTo ID: " + reportingTo.getId()); + } + console.log("User DecimalSeparator: " + user.getDecimalSeparator()); + console.log("User Zip: " + user.getZip()); + console.log("User CreatedTime: " + user.getCreatedTime()); + console.log("User Website: " + user.getWebsite()); + console.log("User ModifiedTime: " + user.getModifiedTime()); + console.log("User TimeFormat: " + user.getTimeFormat()); + console.log("User Offset: " + user.getOffset().toString()); + let profile = user.getProfile(); + if (profile != null) { + console.log("User Profile Name: " + profile.getName()); + console.log("User Profile ID: " + profile.getId()); + } + console.log("User Mobile: " + user.getMobile()); + console.log("User LastName: " + user.getLastName()); + console.log("User TimeZone: " + user.getTimeZone().name); + let createdBy = user.getCreatedBy(); + if (createdBy != null) { + console.log("User Created By User-Name: " + createdBy.getName()); + console.log("User Created By User-ID: " + createdBy.getId()); + } + console.log("User Zuid: " + user.getZuid()); + console.log("User Confirm: " + user.getConfirm().toString()); + console.log("User FullName: " + user.getFullName()); + console.log("User Phone: " + user.getPhone()); + console.log("User DOB: " + user.getDob()); + console.log("User DateFormat: " + user.getDateFormat()); + console.log("User Status: " + user.getStatus()); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Users.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetUser.initialize(); +let userId = 440248254001n; +await GetUser.getuser(userId); \ No newline at end of file diff --git a/versions/3.0.0/samples/users/getUsers.js b/versions/3.0.0/samples/users/getUsers.js new file mode 100644 index 0000000..6a6283c --- /dev/null +++ b/versions/3.0.0/samples/users/getUsers.js @@ -0,0 +1,181 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetUsers{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Users

+ * This method is used to retrieve the users data specified in the API request. + */ + static async getUsers() { + let usersOperations = new ZOHOCRMSDK.Users.UsersOperations(); + //Get instance of ParameterMap Class + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters for Get Users operation */ + await paramInstance.add(ZOHOCRMSDK.Users.GetUsersParam.TYPE, "ActiveUsers"); + await paramInstance.add(ZOHOCRMSDK.Users.GetUsersParam.PAGE, 1); + await paramInstance.add(ZOHOCRMSDK.Users.GetUsersParam.PER_PAGE, 200); + //Get instance of HeaderMap Class + let headerInstance = new ZOHOCRMSDK.HeaderMap(); + /* Possible headers for Get Users operation */ + await headerInstance.add(ZOHOCRMSDK.Users.GetUsersHeader.IF_MODIFIED_SINCE, new Date("2019-07-07T10:00:00+05:30")); + //Call getUsers method that takes ParameterMap instance and HeaderMap instance as parameters + let response = await usersOperations.getUsers(paramInstance, headerInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + //Get object from response + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Users.ResponseWrapper) { + let users = responseObject.getUsers(); + users.forEach(user => { + console.log("User Country: " + user.getCountry()); + let role = user.getRole(); + if (role != null) { + console.log("User Role Name: " + role.getName()); + console.log("User Role ID: " + role.getId()); + } + let customizeInfo = user.getCustomizeInfo(); + if (customizeInfo != null) { + if (customizeInfo.getNotesDesc() != null) { + console.log("User CustomizeInfo NotesDesc: " + customizeInfo.getNotesDesc().toString()); + } + if (customizeInfo.getShowRightPanel() != null) { + console.log("User CustomizeInfo ShowRightPanel: " + customizeInfo.getShowRightPanel().toString()); + } + if (customizeInfo.getBcView() != null) { + console.log("User CustomizeInfo BcView: " + customizeInfo.getBcView().toString()); + } + if (customizeInfo.getShowHome() != null) { + console.log("User CustomizeInfo ShowHome: " + customizeInfo.getShowHome().toString()); + } + if (customizeInfo.getShowDetailView() != null) { + console.log("User CustomizeInfo ShowDetailView: " + customizeInfo.getShowDetailView().toString()); + } + if (customizeInfo.getUnpinRecentItem() != null) { + console.log("User CustomizeInfo UnpinRecentItem: " + customizeInfo.getUnpinRecentItem().toString()); + } + } + console.log("User Signature: " + user.getSignature()); + console.log("User City: " + user.getCity()); + console.log("User SortOrderPreference: " + user.getSortOrderPreference()); + console.log("User Language: " + user.getLanguage()); + console.log("User Locale: " + user.getLocale()); + console.log("User Microsoft: " + user.getMicrosoft().toString()); + if (user.getPersonalAccount() != null) { + console.log("User PersonalAccount: " + user.getPersonalAccount().toString()); + } + console.log("User DefaultTabGroup: " + user.getDefaultTabGroup()); + console.log("User Isonline: " + user.getIsonline().toString()); + let modifiedBy = user.getModifiedBy(); + if (modifiedBy != null) { + console.log("User Modified By User-Name: " + modifiedBy.getName()); + console.log("User Modified By User-ID: " + modifiedBy.getId()); + } + console.log("User Street: " + user.getStreet()); + console.log("User Currency: " + user.getCurrency()); + console.log("User Alias: " + user.getAlias()); + let theme = user.getTheme(); + if (theme != null) { + let normalTab = theme.getNormalTab(); + if (normalTab != null) { + console.log("User Theme NormalTab FontColor: " + normalTab.getFontColor()); + console.log("User Theme NormalTab Name: " + normalTab.getBackground()); + } + let selectedTab = theme.getSelectedTab(); + if (selectedTab != null) { + console.log("User Theme SelectedTab FontColor: " + selectedTab.getFontColor()); + console.log("User Theme SelectedTab Name: " + selectedTab.getBackground()); + } + console.log("User Theme NewBackground: " + theme.getNewBackground()); + console.log("User Theme Background: " + theme.getBackground()); + console.log("User Theme Screen: " + theme.getScreen()); + console.log("User Theme Type: " + theme.getType()); + } + console.log("User ID: " + user.getId()); + console.log("User State: " + user.getState()); + console.log("User Fax: " + user.getFax()); + console.log("User CountryLocale: " + user.getCountryLocale()); + console.log("User SandboxDeveloper: " + user.getSandboxdeveloper()); + console.log("User FirstName: " + user.getFirstName()); + console.log("User Email: " + user.getEmail()); + let reportingTo = user.getReportingTo(); + if (reportingTo != null) { + console.log("User ReportingTo Name: " + reportingTo.getName()); + console.log("User ReportingTo ID: " + reportingTo.getId()); + } + console.log("User DecimalSeparator: " + user.getDecimalSeparator()); + console.log("User Zip: " + user.getZip()); + console.log("User CreatedTime: " + user.getCreatedTime()); + console.log("User Website: " + user.getWebsite()); + console.log("User ModifiedTime: " + user.getModifiedTime()); + console.log("User TimeFormat: " + user.getTimeFormat()); + console.log("User Offset: " + user.getOffset().toString()); + let profile = user.getProfile(); + if (profile != null) { + console.log("User Profile Name: " + profile.getName()); + console.log("User Profile ID: " + profile.getId()); + } + console.log("User Mobile: " + user.getMobile()); + console.log("User LastName: " + user.getLastName()); + console.log("User TimeZone: " + user.getTimeZone().name); + let createdBy = user.getCreatedBy(); + if (createdBy != null) { + console.log("User Created By User-Name: " + createdBy.getName()); + console.log("User Created By User-ID: " + createdBy.getId()); + } + console.log("User Zuid: " + user.getZuid()); + console.log("User Confirm: " + user.getConfirm().toString()); + console.log("User FullName: " + user.getFullName()); + console.log("User Phone: " + user.getPhone()); + console.log("User DOB: " + user.getDob()); + console.log("User DateFormat: " + user.getDateFormat()); + console.log("User Status: " + user.getStatus()); + }); + let info = responseObject.getInfo(); + if (info != null) { + if (info.getPerPage() != null) { + console.log("User Info PerPage: " + info.getPerPage().toString()); + } + if (info.getCount() != null) { + console.log("User Info Count: " + info.getCount().toString()); + } + if (info.getPage() != null) { + console.log("User Info Page: " + info.getPage().toString()); + } + if (info.getMoreRecords() != null) { + console.log("User Info MoreRecords: " + info.getMoreRecords().toString()); + } + } + } + else if (responseObject instanceof ZOHOCRMSDK.Users.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetUsers.initialize(); +await GetUsers.getUsers(); \ No newline at end of file diff --git a/versions/3.0.0/samples/users/updateUser.js b/versions/3.0.0/samples/users/updateUser.js new file mode 100644 index 0000000..74bf2fb --- /dev/null +++ b/versions/3.0.0/samples/users/updateUser.js @@ -0,0 +1,87 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateUser{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get User

+ * This method is used to update the details of any specific user. + * @param {BigInt} userId The ID of the User to be updated + */ + static async updateUser(userId) { + //example + //let userId = 302031n; + //Get instance of UsersOperations Class + let usersOperations = new ZOHOCRMSDK.Users.UsersOperations(); + let request = new ZOHOCRMSDK.Users.BodyWrapper(); + let userArray = []; + let user = new ZOHOCRMSDK.Users.Users(); + let role = new ZOHOCRMSDK.Users.Role(); + role.setId(34770610026008n); + await user.setRole(role); + user.setCountryLocale("en_US"); + userArray.push(user); + request.setUsers(userArray); + //Call updateUser method that takes BodyWrapper instance and userId as parameters + let response = await usersOperations.updateUser(userId, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Users.ActionWrapper) { + let actionResponses = responseObject.getUsers(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Users.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Users.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Users.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await UpdateUser.initialize(); +let userId = 30006n; +await UpdateUser.updateUser(userId); \ No newline at end of file diff --git a/versions/3.0.0/samples/users/updateUsers.js b/versions/3.0.0/samples/users/updateUsers.js new file mode 100644 index 0000000..e31fe90 --- /dev/null +++ b/versions/3.0.0/samples/users/updateUsers.js @@ -0,0 +1,90 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateUsers{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Users

+ * This method is used to update the details of multiple users of your organization and print the response. + */ + static async updateUsers() { + let usersOperations = new ZOHOCRMSDK.Users.UsersOperations(); + let request = new ZOHOCRMSDK.Users.BodyWrapper(); + let userArray = []; + let user = new ZOHOCRMSDK.Users.Users(); + user.setId(347706112592006n); + let role = new ZOHOCRMSDK.Users.Role(); + role.setId(34770610026008n); + await user.setRole(role); + user.setCountryLocale("en_US"); + userArray.push(user); + user = new ZOHOCRMSDK.Users.Users(); + user.setId(347706110182006n); + role = new ZOHOCRMSDK.Users.Role(); + role.setId(34770610026008n); + await user.setRole(role); + userArray.push(user); + request.setUsers(userArray); + //Call updateUsers method that takes BodyWrapper instance as parameter + let response = await usersOperations.updateUsers(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + //Get object from response + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Users.ActionWrapper) { + let actionResponses = responseObject.getUsers(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Users.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Users.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Users.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await UpdateUsers.initialize(); +await UpdateUsers.updateUsers(); \ No newline at end of file diff --git a/versions/3.0.0/samples/usersTerritories/associateTerritoriesToUser.js b/versions/3.0.0/samples/usersTerritories/associateTerritoriesToUser.js new file mode 100644 index 0000000..0f6acbb --- /dev/null +++ b/versions/3.0.0/samples/usersTerritories/associateTerritoriesToUser.js @@ -0,0 +1,89 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class AssociateTerritoriesToUser +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async associateTerritoriesToUser(userId) + { + let userTerritoriesOperations = new ZOHOCRMSDK.TerritoriesUsers.UsersTerritoriesOperations(); + let request = new ZOHOCRMSDK.TerritoriesUsers.BodyWrapper(); + let usersTerritoryList = []; + let territory = new ZOHOCRMSDK.TerritoriesUsers.Territory(); + territory.setId(4402480390040n); + usersTerritoryList.push(territory); + request.setTerritories(usersTerritoryList); + let response =await userTerritoriesOperations.associateTerritoriesToUser(userId, request); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.TerritoriesUsers.ActionWrapper) + { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getTerritories(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.TerritoriesUsers.SuccessResponse) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.TerritoriesUsers.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() +"\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.TerritoriesUsers.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let userId = 440248394324n; +await AssociateTerritoriesToUser.initialize(); +await AssociateTerritoriesToUser.associateTerritoriesToUser(userId); \ No newline at end of file diff --git a/versions/3.0.0/samples/usersTerritories/delinkAndTransferFromAllTerritories.js b/versions/3.0.0/samples/usersTerritories/delinkAndTransferFromAllTerritories.js new file mode 100644 index 0000000..76b5e1d --- /dev/null +++ b/versions/3.0.0/samples/usersTerritories/delinkAndTransferFromAllTerritories.js @@ -0,0 +1,92 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class DelinkAndTransferFromAllTerritories +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async delinkAndTransferFromAllTerritories(userId) + { + let userTerritoriesOperations = new ZOHOCRMSDK.TerritoriesUsers.UsersTerritoriesOperations(); + let request = new ZOHOCRMSDK.TerritoriesUsers.TransferWrapper(); + let usersTerritoryList = []; + let territory = new ZOHOCRMSDK.TerritoriesUsers.TransferAndDelink(); + territory.setId(44024801390040n); + let transferToUser = new ZOHOCRMSDK.TerritoriesUsers.TransferToUser(); + transferToUser.setId(4402480254001n); + await territory.setTransferToUser(transferToUser); + usersTerritoryList.push(territory); + request.setTransferAndDelink(usersTerritoryList); + let response = await userTerritoriesOperations.delinkAndTransferFromAllTerritories(userId, request); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.TerritoriesUsers.TransferActionWrapper) + { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getTransferAndDelink(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.TerritoriesUsers.SuccessResponse) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.TerritoriesUsers.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() +"\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.TerritoriesUsers.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let userId = 4402480394324n; +await DelinkAndTransferFromAllTerritories.initialize(); +await DelinkAndTransferFromAllTerritories.delinkAndTransferFromAllTerritories(userId); \ No newline at end of file diff --git a/versions/3.0.0/samples/usersTerritories/delinkAndTransferFromSpecificTerritory.js b/versions/3.0.0/samples/usersTerritories/delinkAndTransferFromSpecificTerritory.js new file mode 100644 index 0000000..4e6a997 --- /dev/null +++ b/versions/3.0.0/samples/usersTerritories/delinkAndTransferFromSpecificTerritory.js @@ -0,0 +1,92 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class DelinkAndTransferFromSpecificTerritory +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async delinkAndTransferFromSpecificTerritory(userId, territoryId) + { + let userTerritoriesOperations = new ZOHOCRMSDK.TerritoriesUsers.UsersTerritoriesOperations(); + let request = new ZOHOCRMSDK.TerritoriesUsers.TransferWrapper(); + let usersTerritoryList = []; + let territory = new ZOHOCRMSDK.TerritoriesUsers.TransferAndDelink(); + let transferToUser = new ZOHOCRMSDK.TerritoriesUsers.TransferToUser(); + transferToUser.setId(45300032123n); + await territory.setTransferToUser(transferToUser); + usersTerritoryList.push(territory); + request.setTransferAndDelink(usersTerritoryList); + let response = userTerritoriesOperations.delinkAndTransferFromSpecificTerritory(territoryId, userId, request); + if (response != null) + { + console.log("Status Code : " + response.getStatusCode() + "\n"); + let actionHandler = response.getObject(); + if (actionHandler instanceof ZOHOCRMSDK.TerritoriesUsers.TransferActionWrapper) + { + let actionWrapper = actionHandler; + let actionResponses = actionWrapper.getTransferAndDelink(); + if (actionResponses != null) + { + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.TerritoriesUsers.SuccessResponse) + { + let successResponse = actionResponse; + console.log("Status: " + successResponse.getStatus().getValue() + "\n"); + console.log("Code: " + successResponse.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = successResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + successResponse.getMessage() instanceof ZOHOCRMSDK.Choice ? successResponse.getMessage().getValue() : successResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.TerritoriesUsers.APIException) + { + let exception = actionResponse; + console.log("Status: " + exception.getStatus().getValue() +"\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + }); + } + } + else if (actionHandler instanceof ZOHOCRMSDK.TerritoriesUsers.APIException) + { + let exception = actionHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let userId = 43024823214341n; +let territoryId = 430342332423n; +await DelinkAndTransferFromSpecificTerritory.initialize(); +await DelinkAndTransferFromSpecificTerritory.delinkAndTransferFromSpecificTerritory(userId, territoryId); \ No newline at end of file diff --git a/versions/3.0.0/samples/usersTerritories/getSpecificTerritoryOfUser.js b/versions/3.0.0/samples/usersTerritories/getSpecificTerritoryOfUser.js new file mode 100644 index 0000000..8df4818 --- /dev/null +++ b/versions/3.0.0/samples/usersTerritories/getSpecificTerritoryOfUser.js @@ -0,0 +1,72 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetSpecificTerritoryOfUser +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getSpecificTerritroyOfUser(userId, territoryId) + { + let usersTerritoriesOperations = new ZOHOCRMSDK.TerritoriesUsers.UsersTerritoriesOperations(); + let response = await usersTerritoriesOperations.getTerritoryOfUser(territoryId, userId); + if (response != null) + { + console.log("Status Code: " +response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.TerritoriesUsers.ResponseWrapper) + { + let responseWrapper = responseHandler; + let userTerritory = responseWrapper.getTerritories(); + userTerritory.forEach(territory=>{ + console.log("User Territory Id: " + territory.getId() + "\n"); + let manager = territory.getManager(); + if (manager != null) + { + console.log("User Territory Manager Name: " + manager.getName() + "\n"); + console.log("User Territory Manager ID: " + manager.getId() + "\n"); + } + let reportingTo = territory.getReportingTo(); + if (reportingTo != null) + { + console.log("User Territory ReportingTo Name: " + reportingTo.getName() + "\n"); + console.log("User Territory ReportingTo ID: " + reportingTo.getId() + "\n"); + } + console.log("User Territory Name: " + territory.getName() + "\n"); + }); + } + else if (responseHandler instanceof ZOHOCRMSDK.TerritoriesUsers.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let userId = 44024800254001n; +let territoryId = 44024801305227n; +await GetSpecificTerritoryOfUser.initialize(); +await GetSpecificTerritoryOfUser.getSpecificTerritroyOfUser(userId, territoryId); \ No newline at end of file diff --git a/versions/3.0.0/samples/usersTerritories/getTerritoriesOfUser.js b/versions/3.0.0/samples/usersTerritories/getTerritoriesOfUser.js new file mode 100644 index 0000000..7b628fd --- /dev/null +++ b/versions/3.0.0/samples/usersTerritories/getTerritoriesOfUser.js @@ -0,0 +1,90 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetTerritoriesOfUser +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getTerritoriesOfUser(userId) + { + let usersTerritoriesOperations = new ZOHOCRMSDK.TerritoriesUsers.UsersTerritoriesOperations(); + let response =await usersTerritoriesOperations.getTerritoriesOfUser(userId); + if (response != null) + { + console.log("Status Code: " +response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.TerritoriesUsers.ResponseWrapper) + { + let responseWrapper = responseHandler; + let userTerritory = responseWrapper.getTerritories(); + userTerritory.forEach(territory=>{ + console.log("User Territory Id: " + territory.getId() + "\n"); + let manager = territory.getManager(); + if (manager != null) + { + console.log("User Territory Manager Name: " + manager.getName() + "\n"); + console.log("User Territory Manager ID: " + manager.getId() + "\n"); + } + let reportingTo = territory.getReportingTo(); + if (reportingTo != null) + { + console.log("User Territory ReportingTo Name: " + reportingTo.getName() + "\n"); + console.log("User Territory ReportingTo ID: " + reportingTo.getId() + "\n"); + } + }); + let info = responseWrapper.getInfo(); + if (info != null) + { + if (info.getPerPage() != null) + { + console.log("User Info PerPage: " + info.getPerPage() + "\n"); + } + if (info.getCount() != null) + { + console.log("User Info Count: " + info.getCount() + "\n"); + } + if (info.getPage() != null) + { + console.log("User Info Page: " + info.getPage() + "\n"); + } + if (info.getMoreRecords() != null) + { + console.log("User Info MoreRecords: " + info.getMoreRecords() + "\n"); + } + } + } + else if (responseHandler instanceof ZOHOCRMSDK.TerritoriesUsers.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let userId = 4402480254001n; +await GetTerritoriesOfUser.initialize(); +await GetTerritoriesOfUser.getTerritoriesOfUser(userId); \ No newline at end of file diff --git a/versions/3.0.0/samples/usersTerritories/validateBeforeTransfer.js b/versions/3.0.0/samples/usersTerritories/validateBeforeTransfer.js new file mode 100644 index 0000000..37da5dc --- /dev/null +++ b/versions/3.0.0/samples/usersTerritories/validateBeforeTransfer.js @@ -0,0 +1,72 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class ValidateBeforeTransfer +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async validateBeforeTransfer(userId, territoryId) + { + let usersTerritoriesOperations = new ZOHOCRMSDK.TerritoriesUsers.UsersTerritoriesOperations(); + let response= await usersTerritoriesOperations.validateBeforeTransfer(territoryId, userId); + if (response != null) + { + console.log("Status Code: " +response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.TerritoriesUsers.ValidationWrapper) + { + let responseWrapper = responseHandler; + let userTerritory = responseWrapper.getValidateBeforeTransfer(); + userTerritory.forEach(validation=>{ + if (validation instanceof ZOHOCRMSDK.TerritoriesUsers.BulkValidation) + { + console.log("User Territory Validation Alert : " + validation.getAlert() + "\n"); + console.log("User Territory Validation Assignment : " + validation.getAssignment() + "\n"); + console.log("User Territory Validation Criteria : " + validation.getCriteria() + "\n"); + console.log("User Territory Validation Name : " + validation.getName() + "\n"); + console.log("User Territory Validation Id : " + validation.getId() + "\n"); + } + else if (validation instanceof ZOHOCRMSDK.TerritoriesUsers.Validation) + { + console.log("User Territory ID: " + validation.getId() + "\n"); + console.log("User Territory Name: " + validation.getName() + "\n"); + console.log("User Territory Records: " + validation.getRecords() + "\n"); + } + }); + } + else if (responseHandler instanceof ZOHOCRMSDK.TerritoriesUsers.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let userId = 44024801394324n; +let territoryId = 440248390040n; +await ValidateBeforeTransfer.initialize(); +await ValidateBeforeTransfer.validateBeforeTransfer(userId, territoryId); \ No newline at end of file diff --git a/versions/3.0.0/samples/usersTerritories/validateBeforeTransferForAllTerritories.js b/versions/3.0.0/samples/usersTerritories/validateBeforeTransferForAllTerritories.js new file mode 100644 index 0000000..0b52031 --- /dev/null +++ b/versions/3.0.0/samples/usersTerritories/validateBeforeTransferForAllTerritories.js @@ -0,0 +1,71 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class ValidateBeforeTransferForAllTerritories +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async validateBeforeTransferForAllTerritories(userId) + { + let usersTerritoriesOperations = new ZOHOCRMSDK.TerritoriesUsers.UsersTerritoriesOperations(); + let response=await usersTerritoriesOperations.validateBeforeTransferForAllTerritories(userId); + if (response != null) + { + console.log("Status Code: " +response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.TerritoriesUsers.ValidationWrapper) + { + let responseWrapper = responseHandler; + let userTerritory = responseWrapper.getValidateBeforeTransfer(); + userTerritory.forEach(validation=>{ + if (validation instanceof ZOHOCRMSDK.TerritoriesUsers.BulkValidation) + { + console.log("User Territory Validation Alert : " + validation.getAlert() + "\n"); + console.log("User Territory Validation Assignment : " + validation.getAssignment() + "\n"); + console.log("User Territory Validation Criteria : " + validation.getCriteria() + "\n"); + console.log("User Territory Validation Name : " + validation.getName() + "\n"); + console.log("User Territory Validation Id : " + validation.getId() + "\n"); + } + else if (validation instanceof ZOHOCRMSDK.TerritoriesUsers.Validation) + { + console.log("User Territory ID: " + validation.getId() + "\n"); + console.log("User Territory Name: " + validation.getName() + "\n"); + console.log("User Territory records: " + validation.getRecords() + "\n"); + } + }); + } + else if (responseHandler instanceof ZOHOCRMSDK.TerritoriesUsers.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let userId = 44024801394324n; +await ValidateBeforeTransferForAllTerritories.initialize(); +await ValidateBeforeTransferForAllTerritories.validateBeforeTransferForAllTerritories(userId); \ No newline at end of file diff --git a/versions/3.0.0/samples/users_unavailability/UpdateUserUnavailability.js b/versions/3.0.0/samples/users_unavailability/UpdateUserUnavailability.js new file mode 100644 index 0000000..d3e3c73 --- /dev/null +++ b/versions/3.0.0/samples/users_unavailability/UpdateUserUnavailability.js @@ -0,0 +1,128 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateUserUnavailability +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + + static async updateUserUnavailability(id) + { + let usersOperations = new ZOHOCRMSDK.UnavailabilityUsers.UsersUnavailabilityOperations(); + + let request = new ZOHOCRMSDK.UnavailabilityUsers.BodyWrapper(); + + let userList = []; + + let user1 = new ZOHOCRMSDK.UnavailabilityUsers.UsersUnavailability(); + + user1.setComments("Unavailable"); + + let from = new Date('2023-08-15 04:30:00 UTC'); + + user1.setFrom(from); + + let to = new Date('2023-08-16 04:30:00 UTC'); + + user1.setTo(to); + + let user = new ZOHOCRMSDK.UnavailabilityUsers.User(); + + user.setId(44024800254001n); + + await user1.setUser(user); + + userList.push(user1); + + request.setUsersUnavailability(userList); + + let response = await usersOperations.updateUserUnavailability(id, request); + + if(response != null) + { + console.log("Status Code: " + response.getStatusCode()); + + let responseObject = response.getObject(); + + if(responseObject != null) + { + if(responseObject instanceof ZOHOCRMSDK.UnavailabilityUsers.ActionWrapper) + { + let actionResponses = responseObject.getUsersUnavailability(); + + actionResponses.forEach(actionResponse => { + + if (actionResponse instanceof ZOHOCRMSDK.UnavailabilityUsers.SuccessResponse) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + + console.log("Code: " + actionResponse.getCode().getValue()); + + console.log("Details"); + + let details = actionResponse.getDetails(); + + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + + console.log("Message: " + actionResponse.getMessage().getValue()); + } + + else if (actionResponse instanceof ZOHOCRMSDK.UnavailabilityUsers.APIException) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + + console.log("Code: " + actionResponse.getCode().getValue()); + + console.log("Details"); + + let details = actionResponse.getDetails(); + + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + + console.log("Message: " + actionResponse.getMessage().getValue()); + + } + }); + } + else if(responseObject instanceof ZOHOCRMSDK.UnavailabilityUsers.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + + console.log("Code: " + responseObject.getCode().getValue()); + + let details = responseObject.getDetails(); + + console.log("Details: "); + + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let id = "4402480001308076"; +await UpdateUserUnavailability.initialize(); +await UpdateUserUnavailability.updateUserUnavailability(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/users_unavailability/createUsersUnavailability.js b/versions/3.0.0/samples/users_unavailability/createUsersUnavailability.js new file mode 100644 index 0000000..90be4d8 --- /dev/null +++ b/versions/3.0.0/samples/users_unavailability/createUsersUnavailability.js @@ -0,0 +1,97 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class CreateUsersUnavailability +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .grantToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + + static async createUsersUnavailability() + { + let usersOperations = new ZOHOCRMSDK.UnavailabilityUsers.UsersUnavailabilityOperations(); + let request = new ZOHOCRMSDK.UnavailabilityUsers.BodyWrapper(); + let userList = []; + let user1 = new ZOHOCRMSDK.UnavailabilityUsers.UsersUnavailability(); + user1.setComments("Unavailable"); + let from = new Date(2023, 11, 12, 10, 12, 23 ); + user1.setFrom(from); + let to = new Date(2023, 11, 13, 10, 12, 23); + user1.setTo(to); + let user = new ZOHOCRMSDK.UnavailabilityUsers.User(); + user.setId(4402480254001n); + await user1.setUser(user); + userList.push(user1); + request.setUsersUnavailability(userList); + let response = await usersOperations.createUsersUnavailability(request); + if(response != null) + { + console.log("Status Code: " + response.getStatusCode()); + + let responseObject = response.getObject(); + + if(responseObject != null) + { + if(responseObject instanceof ZOHOCRMSDK.UnavailabilityUsers.ActionWrapper) + { + let actionResponses = responseObject.getUsersUnavailability(); + + actionResponses.forEach(actionResponse => { + + if (actionResponse instanceof ZOHOCRMSDK.UnavailabilityUsers.SuccessResponse) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + + else if (actionResponse instanceof ZOHOCRMSDK.UnavailabilityUsers.APIException) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if(responseObject instanceof ZOHOCRMSDK.UnavailabilityUsers.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + let details = responseObject.getDetails(); + console.log("Details: "); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await CreateUsersUnavailability.initialize(); +await CreateUsersUnavailability.createUsersUnavailability(); diff --git a/versions/3.0.0/samples/users_unavailability/deleteUsersUnavailabilityHour.js b/versions/3.0.0/samples/users_unavailability/deleteUsersUnavailabilityHour.js new file mode 100644 index 0000000..ce42cb2 --- /dev/null +++ b/versions/3.0.0/samples/users_unavailability/deleteUsersUnavailabilityHour.js @@ -0,0 +1,100 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteUsersUnavailabilityHour +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async deleteUsersUnavailabilityHour(id) + { + let usersOperations = new ZOHOCRMSDK.UnavailabilityUsers.UsersUnavailabilityOperations(); + + let response = await usersOperations.deleteUserUnavailabilityHour(id); + + if (response != null) + { + + console.log("Status Code: " + response.getStatusCode()); + + let responseObject = response.getObject(); + + if(responseObject instanceof ZOHOCRMSDK.UnavailabilityUsers.ActionWrapper) + { + let actionResponses = responseObject.getUsersUnavailability(); + + actionResponses.forEach(actionResponse => { + + if(actionResponse instanceof ZOHOCRMSDK.UnavailabilityUsers.SuccessResponse) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + + console.log("Code: " + actionResponse.getCode().getValue()); + + console.log("Details"); + + let details = actionResponse.getDetails(); + + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + + console.log("Message: " + actionResponse.getMessage().getValue()); + + } + else if (actionResponse instanceof ZOHOCRMSDK.UnavailabilityUsers.APIException) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + + console.log("Code: " + actionResponse.getCode().getValue()); + + console.log("Details"); + + let details = actionResponse.getDetails(); + + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + + console.log("Message: " + actionResponse.getMessage().getValue()); + + } + }); + + } + else if(responseObject instanceof ZOHOCRMSDK.UnavailabilityUsers.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + + console.log("Code: " + responseObject.getCode().getValue()); + + let details = responseObject.getDetails(); + + console.log("Details: "); + + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } +} +let id = "4402480001412001"; +await DeleteUsersUnavailabilityHour.initialize(); +await DeleteUsersUnavailabilityHour.deleteUsersUnavailabilityHour(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/users_unavailability/getUserUnavailability.js b/versions/3.0.0/samples/users_unavailability/getUserUnavailability.js new file mode 100644 index 0000000..4d26436 --- /dev/null +++ b/versions/3.0.0/samples/users_unavailability/getUserUnavailability.js @@ -0,0 +1,115 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetUserUnavailability { + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + + static async getUserUnavailabilityHours(id) + { + let usersUnavailabilityOperations = new ZOHOCRMSDK.UnavailabilityUsers.UsersUnavailabilityOperations(); + + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + + let response = await usersUnavailabilityOperations.getUserUnavailability(id, paramInstance); + + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + + if(responseObject != null) + { + if (responseObject instanceof ZOHOCRMSDK.UnavailabilityUsers.ResponseWrapper) + { + let users = responseObject.getUsersUnavailability(); + + users.forEach(usersUnavailability => { + + console.log("UsersUnavailability Comments: " + usersUnavailability.getComments()); + + console.log("UsersUnavailability From: " + usersUnavailability.getFrom()); + + console.log("UsersUnavailability Id: " + usersUnavailability.getId()); + + console.log("UsersUnavailability to: " + usersUnavailability.getTo()); + + let user = usersUnavailability.getUser(); + + if (user != null) + { + console.log("UsersUnavailability User-Name: " + user.getName()); + + console.log("UsersUnavailability User-Id: " + user.getId()); + + console.log("UsersUnavailability User-ZuId: " + user.getZuid()); + } + }); + + let info = responseObject.getInfo(); + + if (info != null) + { + if (info.getPerPage() != null) + { + console.log("User Info PerPage: " + info.getPerPage().toString()); + } + + if (info.getCount() != null) + { + console.log("User Info Count: " + info.getCount().toString()); + } + + if (info.getPage() != null) + { + console.log("User Info Page: " + info.getPage().toString()); + } + + if (info.getMoreRecords() != null) + { + console.log("User Info MoreRecords: " + info.getMoreRecords().toString()); + } + } + + } + else if(responseObject instanceof ZOHOCRMSDK.UnavailabilityUsers.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + + console.log("Code: " + responseObject.getCode().getValue()); + + let details = responseObject.getDetails(); + + console.log("Details: "); + + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let id ="4402480001411001"; +await GetUserUnavailability.initialize(); +await GetUserUnavailability.getUserUnavailabilityHours(id); \ No newline at end of file diff --git a/versions/3.0.0/samples/users_unavailability/getUsersUnavailability.js b/versions/3.0.0/samples/users_unavailability/getUsersUnavailability.js new file mode 100644 index 0000000..eb88fb4 --- /dev/null +++ b/versions/3.0.0/samples/users_unavailability/getUsersUnavailability.js @@ -0,0 +1,147 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetUsersUnavailability { + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getUsersUnavailabilityHours() + { + let usersOperations = new ZOHOCRMSDK.UnavailabilityUsers.UsersUnavailabilityOperations(); + + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + + await paramInstance.add(ZOHOCRMSDK.UnavailabilityUsers.GetUsersUnavailabilityParam.GROUP_IDS, "347706109,34770610912"); + + await paramInstance.add(ZOHOCRMSDK.UnavailabilityUsers.GetUsersUnavailabilityParam.INCLUDE_INNER_DETAILS, "56xxx8"); + + await paramInstance.add(ZOHOCRMSDK.UnavailabilityUsers.GetUsersUnavailabilityParam.ROLE_IDS, "3433706109,34037061091"); + + await paramInstance.add(ZOHOCRMSDK.UnavailabilityUsers.GetUsersUnavailabilityParam.TERRITORY_IDS, 31293800321221n); + + let filters = {}; + + filters.group_operator = 'or'; + + filters.group=[]; + + filters.group.push({}); + + filters.group[0].comparator='between' + + filters.group[0].field = { api_name: 'from'}; + + filters.group[0].value = [ '2021-09-18T19:00:00+05:30', '2021-09-19T19:00:00+05:30']; + + filters.group.push({}); + + filters.group[1].comparator = 'between'; + + filters.group[1]. field = {api_name: 'to'}; + + filters.group[1].value = ['2022-09-18T19:00:00+05:30','2021-09-19T19:00:00+05:30']; + + + await paramInstance.add(ZOHOCRMSDK.UnavailabilityUsers.GetUsersUnavailabilityParam.FILTERS, JSON.stringify(filters,null,4)); + + + let response = await usersOperations.getUsersUnavailability(paramInstance); + + if (response != null) + { + console.log("Status Code: " + response.getStatusCode()); + + if ([204, 304].includes(response.getStatusCode())) + { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + + if(responseObject != null) + { + if (responseObject instanceof ZOHOCRMSDK.UnavailabilityUsers.ResponseWrapper) + { + let users = responseObject.getUsersUnavailability(); + + users.forEach(usersUnavailability => { + + console.log("UsersUnavailability Comments: " + usersUnavailability.getComments()); + + console.log("UsersUnavailability From: " + usersUnavailability.getFrom()); + + console.log("UsersUnavailability Id: " + usersUnavailability.getId()); + + console.log("UsersUnavailability to: " + usersUnavailability.getTo()); + + let user = usersUnavailability.getUser(); + + if (user != null) + { + console.log("UsersUnavailability User-Name: " + user.getName()); + + console.log("UsersUnavailability User-Id: " + user.getId()); + + console.log("UsersUnavailability User-ZuId: " + user.getZuid()); + } + }); + + let info = responseObject.getInfo(); + + if (info != null) + { + if (info.getPerPage() != null) + { + console.log("User Info PerPage: " + info.getPerPage().toString()); + } + + if (info.getCount() != null) + { + console.log("User Info Count: " + info.getCount().toString()); + } + + if (info.getPage() != null) + { + console.log("User Info Page: " + info.getPage().toString()); + } + + if (info.getMoreRecords() != null) + { + console.log("User Info MoreRecords: " + info.getMoreRecords().toString()); + } + } + + } + else if(responseObject instanceof ZOHOCRMSDK.UnavailabilityUsers.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + + console.log("Code: " + responseObject.getCode().getValue()); + + let details = responseObject.getDetails(); + + console.log("Details: "); + + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetUsersUnavailability.initialize(); +await GetUsersUnavailability.getUsersUnavailabilityHours(); \ No newline at end of file diff --git a/versions/3.0.0/samples/users_unavailability/updateUsersUnavailabilities.js b/versions/3.0.0/samples/users_unavailability/updateUsersUnavailabilities.js new file mode 100644 index 0000000..e28ca8b --- /dev/null +++ b/versions/3.0.0/samples/users_unavailability/updateUsersUnavailabilities.js @@ -0,0 +1,129 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UpdateUsersUnavailabilities +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + + static async updateUsersUnavailabilityHours() + { + let usersOperations = new ZOHOCRMSDK.UnavailabilityUsers.UsersUnavailabilityOperations(); + + let request = new ZOHOCRMSDK.UnavailabilityUsers.BodyWrapper(); + + let userList = []; + + let user1 = new ZOHOCRMSDK.UnavailabilityUsers.UsersUnavailability(); + + user1.setComments("Unavailable"); + + user1.setId(31293800343001n); + + let from = new Date('2022-08-15 04:30:00 UTC'); + + user1.setFrom(from); + + let to = new Date('2022-08-16 04:30:00 UTC'); + + user1.setTo(to); + + let user = new ZOHOCRMSDK.UnavailabilityUsers.User(); + + user.setId(31293800232001n); + + await user1.setUser(user); + + userList.push(user1); + + request.setUsersUnavailability(userList); + + let response = await usersOperations.updateUsersUnavailabilites(request); + + if(response != null) + { + console.log("Status Code: " + response.getStatusCode()); + + let responseObject = response.getObject(); + + if(responseObject != null) + { + if(responseObject instanceof ZOHOCRMSDK.UnavailabilityUsers.ActionWrapper) + { + let actionResponses = responseObject.getUsersUnavailability(); + + actionResponses.forEach(actionResponse => { + + if (actionResponse instanceof ZOHOCRMSDK.UnavailabilityUsers.SuccessResponse) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + + console.log("Code: " + actionResponse.getCode().getValue()); + + console.log("Details"); + + let details = actionResponse.getDetails(); + + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + + console.log("Message: " + actionResponse.getMessage().getValue()); + } + + else if (actionResponse instanceof ZOHOCRMSDK.UnavailabilityUsers.APIException) + { + console.log("Status: " + actionResponse.getStatus().getValue()); + + console.log("Code: " + actionResponse.getCode().getValue()); + + console.log("Details"); + + let details = actionResponse.getDetails(); + + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + + console.log("Message: " + actionResponse.getMessage().getValue()); + + } + }); + } + else if(responseObject instanceof ZOHOCRMSDK.UnavailabilityUsers.APIException) + { + console.log("Status: " + responseObject.getStatus().getValue()); + + console.log("Code: " + responseObject.getCode().getValue()); + + let details = responseObject.getDetails(); + + console.log("Details: "); + + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UpdateUsersUnavailabilities.initialize(); +await UpdateUsersUnavailabilities.updateUsersUnavailabilityHours(); \ No newline at end of file diff --git a/versions/3.0.0/samples/userstransferanddelete/GetStatus.js b/versions/3.0.0/samples/userstransferanddelete/GetStatus.js new file mode 100644 index 0000000..e08098e --- /dev/null +++ b/versions/3.0.0/samples/userstransferanddelete/GetStatus.js @@ -0,0 +1,57 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetStatus +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getStatus() + { + let usersTransferDeleteOperation = new ZOHOCRMSDK.DeleteTransferUsers.UsersTransferDeleteOperations(); + let paraminstance = new ZOHOCRMSDK.ParameterMap(); + await paraminstance.add(ZOHOCRMSDK.DeleteTransferUsers.GetStatusParam.JOB_ID, 4402480392062n); + let response = await usersTransferDeleteOperation.getStatus(paraminstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.DeleteTransferUsers.ResponseWrapper) + { + let transferAndDelete = responseHandler.getTransferAndDelete(); + if (transferAndDelete != null) + { + transferAndDelete.forEach(status => { + console.log("TransferAndDelete Status : " + status.getStatus()); + }); + } + else if (responseHandler instanceof ZOHOCRMSDK.DeleteTransferUsers.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage()); + } + } + } + } +} +await GetStatus.initialize(); +await GetStatus.getStatus(); \ No newline at end of file diff --git a/versions/3.0.0/samples/userstransferanddelete/UserTransferAndDelete.js b/versions/3.0.0/samples/userstransferanddelete/UserTransferAndDelete.js new file mode 100644 index 0000000..7bed699 --- /dev/null +++ b/versions/3.0.0/samples/userstransferanddelete/UserTransferAndDelete.js @@ -0,0 +1,88 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UserTransferAndDelete +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async userTransferAndDelete(id) + { + let usersTransferDeleteOperations = new ZOHOCRMSDK.DeleteTransferUsers.UsersTransferDeleteOperations(); + let request = new ZOHOCRMSDK.DeleteTransferUsers.BodyWrapper(); + let transferAndDeletes = []; + let transferAndDelete = new ZOHOCRMSDK.DeleteTransferUsers.TransferAndDelete(); + let transfer = new ZOHOCRMSDK.DeleteTransferUsers.Transfer(); + transfer.setRecords(true); + transfer.setAssignment(true); + transfer.setCriteria(false); + transfer.setId(4402480254001n); + await transferAndDelete.setTransfer(transfer); + let moveSubordinate = new ZOHOCRMSDK.DeleteTransferUsers.MoveSubordinate(); + moveSubordinate.setId(323234872984342n); + await transferAndDelete.setMoveSubordinate(moveSubordinate); + transferAndDeletes.push(transferAndDelete); + request.setTransferAndDelete(transferAndDeletes); + let response = await usersTransferDeleteOperations.userTransferAndDelete(id, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + //Get object from response + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.DeleteTransferUsers.ActionWrapper) { + let actionResponses = responseObject.getTransferAndDelete(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.DeleteTransferUsers.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.DeleteTransferUsers.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.DeleteTransferUsers.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +let id = 440248394324n; +await UserTransferAndDelete.initialize(); +await UserTransferAndDelete.userTransferAndDelete(id) \ No newline at end of file diff --git a/versions/3.0.0/samples/userstransferanddelete/UsersTransferAndDelete.js b/versions/3.0.0/samples/userstransferanddelete/UsersTransferAndDelete.js new file mode 100644 index 0000000..a504d33 --- /dev/null +++ b/versions/3.0.0/samples/userstransferanddelete/UsersTransferAndDelete.js @@ -0,0 +1,87 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class UsersTransferAndDelete +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async usersTransferAndDelete() + { + let usersTransferDeleteOperations = new ZOHOCRMSDK.DeleteTransferUsers.UsersTransferDeleteOperations(); + let request = new ZOHOCRMSDK.DeleteTransferUsers.BodyWrapper(); + let transferAndDeletes = []; + let transferAndDelete = new ZOHOCRMSDK.DeleteTransferUsers.TransferAndDelete(); + transferAndDelete.setId(3242345234243n); + let transfer = new ZOHOCRMSDK.DeleteTransferUsers.Transfer(); + transfer.setRecords(true); + transfer.setAssignment(true); + transfer.setCriteria(false); + transfer.setId(34349178323n); + await transferAndDelete.setTransfer(transfer); + let moveSubordinate = new ZOHOCRMSDK.DeleteTransferUsers.MoveSubordinate(); + moveSubordinate.setId(323234872984342n); + await transferAndDelete.setMoveSubordinate(moveSubordinate); + transferAndDeletes.add(transferAndDelete); + request.setTransferAndDelete(transferAndDeletes); + let response = usersTransferDeleteOperations.usersTransferAndDelete(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.DeleteTransferUsers.ActionWrapper) { + let actionResponses = responseObject.getTransferAndDelete(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.DeleteTransferUsers.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + else if (actionResponse instanceof ZOHOCRMSDK.DeleteTransferUsers.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage().getValue()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.DeleteTransferUsers.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await UsersTransferAndDelete.initialize(); +await UsersTransferAndDelete.usersTransferAndDelete() \ No newline at end of file diff --git a/versions/3.0.0/samples/usertypeusers/getUsersOfUserType.js b/versions/3.0.0/samples/usertypeusers/getUsersOfUserType.js new file mode 100644 index 0000000..036c716 --- /dev/null +++ b/versions/3.0.0/samples/usertypeusers/getUsersOfUserType.js @@ -0,0 +1,93 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; + +class GetUsersOfUserType +{ + static async initialize() + { + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token = (new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxx") + .refreshToken("1000.xxxx.xxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getUsersOfUserType(portalName, userTypeId) + { + let userTypeUsersOperations = new ZOHOCRMSDK.TypeUserUsers.UserTypeUsersOperations(); + let paraminstance = new ZOHOCRMSDK.ParameterMap(); + await paraminstance.add(ZOHOCRMSDK.TypeUserUsers.GetUsersofUserTypeParam.TYPE, "AllUsers"); + let response = await userTypeUsersOperations.getUsersOfUserType(userTypeId, portalName, paraminstance); + if (response != null) + { + console.log("Status Code: " + response.getStatusCode() + "\n"); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.TypeUserUsers.ResponseWrapper) + { + let responseWrapper = responseHandler; + let users = responseWrapper.getUsers(); + if (users != null) + { + users.forEach(user=>{ + if (user instanceof ZOHOCRMSDK.TypeUserUsers.Users) + { + console.log("Users PersonalityId: " + user.getPersonalityId() + "\n"); + console.log("Users Confirm: " + user.getConfirm() + "\n"); + console.log("Users StatusReasonS: " + user.getStatusReasonS() + "\n"); + console.log("Users InvitedTime: " + user.getInvitedTime().toString() + "\n"); + console.log("Users Module: " + user.getModule() + "\n"); + console.log("Users Name: " + user.getName() + "\n"); + console.log("Users Active: " + user.getActive() + "\n"); + console.log("Users Email: " + user.getEmail() + "\n"); + } + }); + } + let info = responseWrapper.getInfo(); + if (info != null) + { + if (info.getPerPage() != null) + { + console.log("User Info PerPage: " + info.getPerPage() + "\n"); + } + if (info.getCount() != null) + { + console.log("User Info Count: " + info.getCount() + "\n"); + } + if (info.getPage() != null) + { + console.log("User Info Page: " + info.getPage() + "\n"); + } + if (info.getMoreRecords() != null) + { + console.log("User Info MoreRecords: " + info.getMoreRecords() + "\n"); + } + } + } + else if (responseHandler instanceof ZOHOCRMSDK.TypeUserUsers.APIException) + { + let exception = responseHandler; + console.log("Status: " + exception.getStatus().getValue() + "\n"); + console.log("Code: " + exception.getCode().getValue() + "\n"); + console.log("Details \n"); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key) + "\n"); + }); + } + console.log("Message: " + exception.getMessage() instanceof ZOHOCRMSDK.Choice ? exception.getMessage().getValue() : exception.getMessage()); + } + } + } +} +let portalName = "PortalAPITest101"; +let usertypeId = 4402481304019n; +await GetUsersOfUserType.initialize(); +await GetUsersOfUserType.getUsersOfUserType(portalName, usertypeId); \ No newline at end of file diff --git a/versions/3.0.0/samples/variable_groups/getVariableGroupByAPIName.js b/versions/3.0.0/samples/variable_groups/getVariableGroupByAPIName.js new file mode 100644 index 0000000..23bd069 --- /dev/null +++ b/versions/3.0.0/samples/variable_groups/getVariableGroupByAPIName.js @@ -0,0 +1,64 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetVariableGroupByAPIName{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Variable Group By APIName

+ * This method is used to get the details of any variable group with group API name and print the response. + * @param {String} variableGroupAPIName The API Name of the VariableGroup to be obtained + */ + static async getVariableGroupByAPIName(variableGroupAPIName) { + //example + //let variableGroupAPIName = "General"; + //Get instance of VariableGroupsOperations Class + let variableGroupsOperations = new ZOHOCRMSDK.GroupsVariable.VariableGroupsOperations(); + //Call getVariableGroupByAPIName method that takes variableGroupAPIName as parameter + let response = await variableGroupsOperations.getVariableGroupByAPIName(variableGroupAPIName); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + //Get object from response + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.GroupsVariable.ResponseWrapper) { + let variableGroups = responseObject.getVariableGroups(); + variableGroups.forEach(variableGroup => { + console.log("VariableGroup DisplayLabel: " + variableGroup.getDisplayLabel()); + console.log("VariableGroup APIName: " + variableGroup.getAPIName()); + console.log("VariableGroup Name: " + variableGroup.getName()); + console.log("VariableGroup Description: " + variableGroup.getDescription()); + console.log("VariableGroup ID: " + variableGroup.getId()); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.GroupsVariable.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetVariableGroupByAPIName.initialize(); +let variableGroupAPIName = "General"; +await GetVariableGroupByAPIName.getVariableGroupByAPIName(variableGroupAPIName); \ No newline at end of file diff --git a/versions/3.0.0/samples/variable_groups/getVariableGroupById.js b/versions/3.0.0/samples/variable_groups/getVariableGroupById.js new file mode 100644 index 0000000..c08e2c6 --- /dev/null +++ b/versions/3.0.0/samples/variable_groups/getVariableGroupById.js @@ -0,0 +1,64 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetVariableGroupById{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Variable Group By Id

+ * This method is used to get the details of any variable group with group id and print the response. + * @param {String} variableGroupId The ID of the VariableGroup to be obtained + */ + static async getVariableGroupById(variableGroupId) { + //example + //let variableGroupId = 75023n; + //Get instance of VariableGroupsOperations Class + let variableGroupsOperations = new ZOHOCRMSDK.GroupsVariable.VariableGroupsOperations(); + //Call getVariableGroupById method that takes variableGroupId as parameter + let response = await variableGroupsOperations.getVariableGroupById(variableGroupId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + //Get object from response + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.GroupsVariable.ResponseWrapper) { + let variableGroups = responseObject.getVariableGroups(); + variableGroups.forEach(variableGroup => { + console.log("VariableGroup DisplayLabel: " + variableGroup.getDisplayLabel()); + console.log("VariableGroup APIName: " + variableGroup.getAPIName()); + console.log("VariableGroup Name: " + variableGroup.getName()); + console.log("VariableGroup Description: " + variableGroup.getDescription()); + console.log("VariableGroup ID: " + variableGroup.getId()); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.GroupsVariable.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetVariableGroupById.initialize(); +let variableGroupId = "44024800345005"; +await GetVariableGroupById.getVariableGroupById(variableGroupId); \ No newline at end of file diff --git a/versions/3.0.0/samples/variable_groups/getVariableGroups.js b/versions/3.0.0/samples/variable_groups/getVariableGroups.js new file mode 100644 index 0000000..c7a9599 --- /dev/null +++ b/versions/3.0.0/samples/variable_groups/getVariableGroups.js @@ -0,0 +1,59 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetVariableGroups{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Variable Groups

+ * This method is used to get the details of all the variable groups and print the response. + */ + static async getVariableGroups() { + let variableGroupsOperations = new ZOHOCRMSDK.GroupsVariable.VariableGroupsOperations(); + //Call getVariableGroups method + let response = await variableGroupsOperations.getVariableGroups(); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + //Get object from response + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.GroupsVariable.ResponseWrapper) { + let variableGroups = responseObject.getVariableGroups(); + variableGroups.forEach(variableGroup => { + console.log("VariableGroup DisplayLabel: " + variableGroup.getDisplayLabel()); + console.log("VariableGroup APIName: " + variableGroup.getAPIName()); + console.log("VariableGroup Name: " + variableGroup.getName()); + console.log("VariableGroup Description: " + variableGroup.getDescription()); + console.log("VariableGroup ID: " + variableGroup.getId()); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.GroupsVariable.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage().getValue()); + } + } + } + } +} +await GetVariableGroups.initialize(); +await GetVariableGroups.getVariableGroups(); diff --git a/versions/3.0.0/samples/variables/createVariables.js b/versions/3.0.0/samples/variables/createVariables.js new file mode 100644 index 0000000..205f0ad --- /dev/null +++ b/versions/3.0.0/samples/variables/createVariables.js @@ -0,0 +1,96 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class CreateVariables{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Create Variables

+ * This method is used to create variables and print the response. + */ + static async createVariables() { + let variablesOperations = new ZOHOCRMSDK.Variables.VariablesOperations(); + let request = new ZOHOCRMSDK.Variables.BodyWrapper(); + let variableArray = []; + let variable1 = new ZOHOCRMSDK.Variables.Variable(); + variable1.setName("Variable55123"); + variable1.setAPIName("Variable55123"); + let variableGroup = new ZOHOCRMSDK.Variables.VariableGroup(); + variableGroup.setName("General"); + await variable1.setVariableGroup(variableGroup); + variable1.setType(new ZOHOCRMSDK.Choice("integer")); + variable1.setValue("55"); + variable1.setDescription("This denotes variable 5 description"); + variableArray.push(variable1); + variable1 = new ZOHOCRMSDK.Variables.Variable(); + variable1.setName("Variable551234"); + variable1.setAPIName("Variable551234"); + variableGroup = new ZOHOCRMSDK.GroupsVariable.VariableGroup(); + variableGroup.setName("General"); + await variable1.setVariableGroup(variableGroup); + variable1.setType(new ZOHOCRMSDK.Choice("text")); + variable1.setValue("Hello"); + variable1.setDescription("This denotes variable 6 description"); + variableArray.push(variable1); + request.setVariables(variableArray); + //Call createVariables method that takes BodyWrapper instance as parameter + let response = await variablesOperations.createvariable(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Variables.ActionWrapper) { + let actionResponses = responseObject.getVariables(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Variables.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Variables.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Variables.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await CreateVariables.initialize(); +await CreateVariables.createVariables(); \ No newline at end of file diff --git a/versions/3.0.0/samples/variables/deleteVariable.js b/versions/3.0.0/samples/variables/deleteVariable.js new file mode 100644 index 0000000..f6fe0ed --- /dev/null +++ b/versions/3.0.0/samples/variables/deleteVariable.js @@ -0,0 +1,79 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteVariable{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Delete Variable

+ * This method is used to delete details of a specific variable in CRM and print the response. + * @param {BigInt} variableId The ID of the Variable to be deleted + */ + static async deleteVariable(variableId) { + //example + //let variableId = 2275025n; + //Get instance of VariablesOperations Class + let variablesOperations = new ZOHOCRMSDK.Variables.VariablesOperations(); + //Call deleteVariable method that takes variableId as parameter + let response = await variablesOperations.deleteVariable(variableId); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + //Get object from response + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Variables.ActionWrapper) { + let actionResponses = responseObject.getVariables(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Variables.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Variables.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Variables.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await DeleteVariable.initialize(); +let variableId = 4402480389066n; +await DeleteVariable.deleteVariable(variableId); \ No newline at end of file diff --git a/versions/3.0.0/samples/variables/deleteVariables.js b/versions/3.0.0/samples/variables/deleteVariables.js new file mode 100644 index 0000000..cb491ba --- /dev/null +++ b/versions/3.0.0/samples/variables/deleteVariables.js @@ -0,0 +1,81 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class DeleteVariables{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Delete Variables

+ * This method is used to delete details of multiple variables in CRM simultaneously and print the response. + * @param {Array} variableIds The array of Variable IDs to be deleted + */ + static async deleteVariables(variableIds) { + //example + //let variableIds = [302275025n, 340975035n]; + //Get instance of VariablesOperations Class + let variablesOperations = new ZOHOCRMSDK.Variables.VariablesOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + for (let variableId of variableIds) { + await paramInstance.add(ZOHOCRMSDK.Variables.DeleteVariablesParam.IDS, variableId); + } + let response = await variablesOperations.deleteVariables(paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Variables.ActionWrapper) { + let actionResponses = responseObject.getVariables(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Variables.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Variables.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Variables.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await DeleteVariables.initialize(); +let variableIds = [200032n,332022n]; +await DeleteVariables.deleteVariables(variableIds); \ No newline at end of file diff --git a/versions/3.0.0/samples/variables/getVariableById.js b/versions/3.0.0/samples/variables/getVariableById.js new file mode 100644 index 0000000..5246528 --- /dev/null +++ b/versions/3.0.0/samples/variables/getVariableById.js @@ -0,0 +1,71 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetVariableById{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Variable By Id

+ * This method is used to get the details of any specific variable. + * Specify the unique ID of the variable in your API request to get the data for that particular variable group. + * @param {BigInt} variableId The ID of the Variable to be obtained + */ + static async getVariableById(variableId) { + let variablesOperations = new ZOHOCRMSDK.Variables.VariablesOperations(); + //Get instance of ParameterMap Class + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters of Get Variable By ID operation */ + await paramInstance.add(ZOHOCRMSDK.Variables.GetVariableByIDParam.GROUP, "440248345005"); + //Call getVariableByGroupId method that takes paramInstance and variableId as parameter + let response = await variablesOperations.getVariableById(variableId, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Variables.ResponseWrapper) { + let variables = responseObject.getVariables(); + variables.forEach(variable => { + console.log("Variable ID: " + variable.getId()); + console.log("Variable APIName: " + variable.getAPIName()); + console.log("Variable Name: " + variable.getName()); + console.log("Variable Description: " + variable.getDescription()); + console.log("Variable Type: " + variable.getType()); + let variableGroup = variable.getVariableGroup(); + if (variableGroup != null) { + console.log("Variable VariableGroup APIName: " + variableGroup.getAPIName()); + console.log("Variable VariableGroup ID: " + variableGroup.getId()); + } + console.log("Variable Value: " + variable.getValue()); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Variables.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetVariableById.initialize(); +let variableId = 440248089066n; +await GetVariableById.getVariableById(variableId); \ No newline at end of file diff --git a/versions/3.0.0/samples/variables/getVariableForAPIName.js b/versions/3.0.0/samples/variables/getVariableForAPIName.js new file mode 100644 index 0000000..a097854 --- /dev/null +++ b/versions/3.0.0/samples/variables/getVariableForAPIName.js @@ -0,0 +1,74 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetVariableForAPIName{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Variable for API Name

+ * This method is used to get the details of any specific variable. + * Specify the unique name of the variable in your API request to get the data for that particular variable group. + * @param {String} variableName The API name of the Variable to be obtained + */ + static async getVariableForAPIName(variableName) { + //example + //let variableName = "Variable55"; + //Get instance of VariablesOperations Class + let variablesOperations = new ZOHOCRMSDK.Variables.VariablesOperations(); + //Get instance of ParameterMap Class + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters for Get Variable for API Name operation */ + await paramInstance.add(ZOHOCRMSDK.Variables.GetVariableByAPINameParam.GROUP, "General"); + //Call getVariableForGroupAPIName method that takes ParameterMap instance and variableName as parameter + let response = await variablesOperations.getVariableByApiname(variableName, paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Variables.ResponseWrapper) { + let variables = responseObject.getVariables(); + variables.forEach(variable => { + console.log("Variable ID: " + variable.getId()); + console.log("Variable APIName: " + variable.getAPIName()); + console.log("Variable Name: " + variable.getName()); + console.log("Variable Description: " + variable.getDescription()); + console.log("Variable Type: " + variable.getType()); + let variableGroup = variable.getVariableGroup(); + if (variableGroup != null) { + console.log("Variable VariableGroup APIName: " + variableGroup.getAPIName()); + console.log("Variable VariableGroup ID: " + variableGroup.getId()); + } + console.log("Variable Value: " + variable.getValue()); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Variables.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetVariableForAPIName.initialize(); +let variableName = "Variable523"; +await GetVariableForAPIName.getVariableForAPIName(variableName); \ No newline at end of file diff --git a/versions/3.0.0/samples/variables/getVariables.js b/versions/3.0.0/samples/variables/getVariables.js new file mode 100644 index 0000000..8119351 --- /dev/null +++ b/versions/3.0.0/samples/variables/getVariables.js @@ -0,0 +1,70 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetVariables{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Get Variables

+ * This method is used to retrieve all the available variables through an API request and print the response. + */ + static async getVariables() { + let variablesOperations = new ZOHOCRMSDK.Variables.VariablesOperations(); + //Get instance of ParameterMap Class + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + /* Possible parameters of Get Variables operation */ + await paramInstance.add(ZOHOCRMSDK.Variables.GetVariablesParam.GROUP, "General"); + //Call getVariables method that takes ParameterMap instance as parameter + let response = await variablesOperations.getVariables(paramInstance); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + //Get object from response + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Variables.ResponseWrapper) { + let variables = responseObject.getVariables(); + variables.forEach(variable => { + console.log("Variable ID: " + variable.getId()); + console.log("Variable Source: " + variable.getSource()); + console.log("Variable APIName: " + variable.getAPIName()); + console.log("Variable Name: " + variable.getName()); + console.log("Variable Description: " + variable.getDescription()); + console.log("Variable Type: " + variable.getType()); + let variableGroup = variable.getVariableGroup(); + if (variableGroup != null) { + console.log("Variable VariableGroup APIName: " + variableGroup.getAPIName()); + console.log("Variable VariableGroup ID: " + variableGroup.getId()); + } + console.log("Variable Value: " + variable.getValue()); + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Variables.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await GetVariables.initialize(); +await GetVariables.getVariables(); \ No newline at end of file diff --git a/versions/3.0.0/samples/variables/updateVariableByAPIName.js b/versions/3.0.0/samples/variables/updateVariableByAPIName.js new file mode 100644 index 0000000..936ba0a --- /dev/null +++ b/versions/3.0.0/samples/variables/updateVariableByAPIName.js @@ -0,0 +1,84 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateVariableByAPIName{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Variable by API Name

+ * This method is used to update details of a specific variable in CRM and print the response. + * @param {String} variableName The name of the Variable to be updated + */ + static async updateVariableByAPIName(variableName) { + //example + //let variableName = "Variable55"; + //Get instance of VariablesOperations Class + let variablesOperations = new ZOHOCRMSDK.Variables.VariablesOperations(); + let request = new ZOHOCRMSDK.Variables.BodyWrapper(); + let variableArray = []; + let variable1 = new ZOHOCRMSDK.Variables.Variable(); + variable1.setDescription("Test update Variable By APIName"); + variableArray.push(variable1); + request.setVariables(variableArray); + //Call updateVariableByAPIName method that takes BodyWrapper instance and variableName as parameter + let response = await variablesOperations.updateVariableByApiname(variableName, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Variables.ActionWrapper) { + let actionResponses = responseObject.getVariables(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Variables.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Variables.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Variables.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await UpdateVariableByAPIName.initialize(); +let variableName = "Variabl5123"; +await UpdateVariableByAPIName.updateVariableByAPIName(variableName); \ No newline at end of file diff --git a/versions/3.0.0/samples/variables/updateVariableById.js b/versions/3.0.0/samples/variables/updateVariableById.js new file mode 100644 index 0000000..f6ba6f1 --- /dev/null +++ b/versions/3.0.0/samples/variables/updateVariableById.js @@ -0,0 +1,84 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateVariableById{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Variable By Id

+ * This method is used to update details of a specific variable in CRM and print the response. + * @param {BigInt} variableId The ID of the Variable to be updated + */ + static async updateVariableById(variableId) { + //example + //let variableId = 2275025n; + //Get instance of VariablesOperations Class + let variablesOperations = new ZOHOCRMSDK.Variables.VariablesOperations(); + let request = new ZOHOCRMSDK.Variables.BodyWrapper(); + let variableArray = []; + let variable1 = new ZOHOCRMSDK.Variables.Variable(); + variable1.setAPIName("TestAPIName"); + variableArray.push(variable1); + request.setVariables(variableArray); + //Call updateVariableById method that takes BodyWrapper instance and variableId as parameter + let response = await variablesOperations.updateVariableById(variableId, request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Variables.ActionWrapper) { + let actionResponses = responseObject.getVariables(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Variables.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Variables.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Variables.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await UpdateVariableById.initialize(); +let variableId = 300032n; +await UpdateVariableById.updateVariableById(variableId); \ No newline at end of file diff --git a/versions/3.0.0/samples/variables/updateVariables.js b/versions/3.0.0/samples/variables/updateVariables.js new file mode 100644 index 0000000..b6c7eb2 --- /dev/null +++ b/versions/3.0.0/samples/variables/updateVariables.js @@ -0,0 +1,88 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class UpdateVariables{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + /** + *

Update Variables

+ * This method is used to update details of variables in CRM and print the response. + */ + static async updateVariables() { + let variablesOperations = new ZOHOCRMSDK.Variables.VariablesOperations(); + let request = new ZOHOCRMSDK.Variables.BodyWrapper(); + let variableArray = []; + let variable1 = new ZOHOCRMSDK.Variables.Variable(); + variable1.setId(347706112581011n); + variable1.setValue("4763"); + variableArray.push(variable1); + variable1 = new ZOHOCRMSDK.Variables.Variable(); + variable1.setId(34096432275035n); + variable1.setDescription("This is a new description"); + variableArray.push(variable1); + variable1 = new ZOHOCRMSDK.Variables.Variable(); + variable1.setId(34096432275035n); + variable1.setAPIName("NewAPI"); + variableArray.push(variable1); + request.setVariables(variableArray); + //Call updateVariables method that takes BodyWrapper class instance as parameter + let response = await variablesOperations.updateVariables(request); + if (response != null) { + console.log("Status Code: " + response.getStatusCode()); + let responseObject = response.getObject(); + if (responseObject != null) { + if (responseObject instanceof ZOHOCRMSDK.Variables.ActionWrapper) { + let actionResponses = responseObject.getVariables(); + actionResponses.forEach(actionResponse => { + if (actionResponse instanceof ZOHOCRMSDK.Variables.SuccessResponse) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + else if (actionResponse instanceof ZOHOCRMSDK.Variables.APIException) { + console.log("Status: " + actionResponse.getStatus().getValue()); + console.log("Code: " + actionResponse.getCode().getValue()); + console.log("Details"); + let details = actionResponse.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + actionResponse.getMessage()); + } + }); + } + else if (responseObject instanceof ZOHOCRMSDK.Variables.APIException) { + console.log("Status: " + responseObject.getStatus().getValue()); + console.log("Code: " + responseObject.getCode().getValue()); + console.log("Details"); + let details = responseObject.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseObject.getMessage()); + } + } + } + } +} +await UpdateVariables.initialize(); +await UpdateVariables.updateVariables(); \ No newline at end of file diff --git a/versions/3.0.0/samples/wizards/getWizardById.js b/versions/3.0.0/samples/wizards/getWizardById.js new file mode 100644 index 0000000..f305dc1 --- /dev/null +++ b/versions/3.0.0/samples/wizards/getWizardById.js @@ -0,0 +1,205 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetWizardById{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getWizardById(wizardId, layoutId) { + let wizardsOperations = new ZOHOCRMSDK.Wizards.WizardsOperations(); + let paramInstance = new ZOHOCRMSDK.ParameterMap(); + await paramInstance.add(ZOHOCRMSDK.Wizards.GetWizardbyIDParam.LAYOUT_ID, layoutId); + //Call getWizardById method that takes wizardId as parameter + let response = await wizardsOperations.getWizardById(wizardId, paramInstance); + if (response != null) { + console.log("Status code " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + //Get object from response + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.Wizards.ResponseWrapper) { + let responseWrapper = responseHandler; + let wizards = responseWrapper.getWizards(); + wizards.forEach(wizard => { + console.log("Wizard CreatedTime: " + wizard.getCreatedTime()); + console.log("Wizard ModifiedTime: " + wizard.getModifiedTime()); + let module = wizard.getModule(); + if (module != null) { + console.log("Wizard Module APIName: " + module.getAPIName()); + console.log("Wizard Module Id: " + module.getId()); + } + console.log("Wizard Name: " + wizard.getName()); + let modifiedBy = wizard.getModifiedBy(); + if (modifiedBy != null) { + console.log("Wizard Modified By User-Name: " + modifiedBy.getName()); + console.log("Wizard Modified By User-ID: " + modifiedBy.getId()); + } + let profiles = wizard.getProfiles(); + if (profiles != null) { + profiles.forEach(profile => { + console.log("Wizard Profile Name: " + profile.getName()); + console.log("Wizard Profile ID: " + profile.getId()); + }); + } + console.log("Wizard Active: " + wizard.getActive()); + let containers = wizard.getContainers(); + if (containers != null) { + containers.forEach(container => { + let layout = container.getLayout(); + if (layout != null) { + console.log("Wizard Container Layout Name: " + layout.getName()); + console.log("Wizard Container Layout ID: " + layout.getId()); + } + let chartData = container.getChartData(); + if (chartData != null) { + let nodes = chartData.getNodes(); + if (nodes != null) { + nodes.forEach(async node => { + console.log("Wizard Container ChartData Node PosY: " + node.getPosY()); + console.log("Wizard Container ChartData Node PosX: " + node.getPosX()); + console.log("Wizard Container ChartData Node StartNode: " + node.getStartNode()); + let screen = await node.getScreen(); + if (screen != null) { + console.log("Wizard Container ChartData Node Screen DisplayLabel: " + screen.getDisplayLabel()); + console.log("Wizard Container ChartData Node Screen ID: " + screen.getId()); + } + }); + } + let connections = chartData.getConnections(); + if (connections != null) { + connections.forEach(async connection => { + let sourceButton = connection.getSourceButton(); + if (sourceButton != null) { + await this.printButton(sourceButton); + } + let targetScreen = connection.getTargetScreen(); + if (targetScreen != null) { + await this.printScreen(targetScreen); + } + }); + } + console.log("Wizard Container ChartData CanvasWidth: " + chartData.getCanvasWidth()); + console.log("Wizard Container ChartData CanvasHeight: " + chartData.getCanvasHeight()); + } + let screens = container.getScreens(); + if (screens != null) { + screens.forEach(async screen => { + await this.printScreen(screen); + }); + } + console.log("Wizard Container ID: " + container.getId()); + }); + } + console.log("Wizard ID: " + wizard.getId()); + let createdBy = wizard.getCreatedBy(); + if (createdBy != null) { + console.log("Wizard Created By User-Name: " + createdBy.getName()); + console.log("Wizard Created By User-ID: " + createdBy.getId()); + } + }); + } + else if (responseHandler instanceof ZOHOCRMSDK.Wizards.APIException) { + console.log("Status: " + responseHandler.getStatus().getValue()); + console.log("Code: " + responseHandler.getCode().getValue()); + console.log("Details"); + let details = responseHandler.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: " + responseHandler.getMessage().getValue()); + } + } + } + static async printScreen(screen) { + console.log("Screen Id: " + screen.getId()); + console.log("Screen DisplayLabel: " + screen.getDisplayLabel()); + let segments = screen.getSegments(); + if (segments != null) { + for (const segment of segments) { + await this.printSegment(segment); + } + } + } + static async printSegment(segment) { + console.log("Segment Id: " + segment.getId()); + console.log("Segment SequenceNumber: " + segment.getSequenceNumber()); + console.log("Segment DisplayLabel: " + segment.getDisplayLabel()); + console.log("Segment Type: " + segment.getType()); + console.log("Segment ColumnCount: " + segment.getColumnCount()); + let fields = segment.getFields(); + if (fields != null) { + fields.forEach(field => { + console.log("Segment Field SequenceNumber: " + field.getSequenceNumber()); + console.log("Segment Field APIName: " + field.getAPIName()); + console.log("Segment Field Id: " + field.getId()); + }); + } + let buttons = segment.getButtons(); + if (buttons != null) { + for (const button of buttons) { + if (button != null) { + await this.printButton(button); + } + } + } + } + static async printButton(button) { + console.log("Button Id: " + button.getId()); + console.log("Button SequenceNumber: " + button.getSequenceNumber()); + console.log("Button DisplayLabel: " + button.getDisplayLabel()); + let criteria = button.getCriteria(); + if (criteria != null) { + await this.printCriteria(criteria); + } + let targetScreen = button.getTargetScreen(); + if (targetScreen != null) { + console.log("Button TargetScreen DisplayLabel: " + targetScreen.getDisplayLabel()); + console.log("Button TargetScreen Id: " + targetScreen.getId()); + } + console.log("Button Type: " + button.getType()); + console.log("Button Color: " + button.getColor()); + console.log("Button Shape: " + button.getShape()); + console.log("Button BackgroundColor: " + button.getBackgroundColor()); + console.log("Button Visibility: " + button.getVisibility()); + let transition = button.getTransition(); + if (transition != null) { + console.log("Button Transition Name: " + transition.getName()); + console.log("Button Transition Id: " + transition.getId()); + } + } + static async printCriteria(criteria) { + if (criteria.getComparator() != null) { + console.log("Criteria Comparator: " + criteria.getComparator().getValue()); + } + let field = criteria.getField(); + if (field != null) { + console.log("Criteria Field: " + field.getAPIName()); + console.log("Criteria Field: " + field.getId()); + } + console.log("Criteria Value: " + criteria.getValue()); + let criteriaGroup = criteria.getGroup(); + if (criteriaGroup != null) { + for (const criteria1 of criteriaGroup) { + await this.printCriteria(criteria1); + } + } + if (criteria.getGroupOperator() != null) { + console.log("Criteria Group Operator: " + criteria.getGroupOperator().getValue()); + } + } +} +await GetWizardById.initialize(); +let wizardId = 400068n; +let layoutId = 300943n; +await GetWizardById.getWizardById(wizardId,layoutId); \ No newline at end of file diff --git a/versions/3.0.0/samples/wizards/getWizards.js b/versions/3.0.0/samples/wizards/getWizards.js new file mode 100644 index 0000000..66e541f --- /dev/null +++ b/versions/3.0.0/samples/wizards/getWizards.js @@ -0,0 +1,86 @@ +import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-5.0"; +class GetWizards{ + static async initialize(){ + let environment = ZOHOCRMSDK.USDataCenter.PRODUCTION(); + let token =(new ZOHOCRMSDK.OAuthBuilder()) + .clientId("1000.xxxx") + .clientSecret("xxxxxx") + .refreshToken("1000.xxxxx.xxxxx") + .build(); + await (await new ZOHOCRMSDK.InitializeBuilder()) + .environment(environment) + .token(token) + .initialize(); + } + static async getWizards() { + let wizardsOperations = new ZOHOCRMSDK.Wizards.WizardsOperations(); + let response = await wizardsOperations.getWizards(); + if (response != null) { + console.log("Status code " + response.getStatusCode()); + if ([204, 304].includes(response.getStatusCode())) { + console.log(response.getStatusCode() == 204 ? "No Content" : "Not Modified"); + return; + } + let responseHandler = response.getObject(); + if (responseHandler instanceof ZOHOCRMSDK.Wizards.ResponseWrapper) { + let responseWrapper = responseHandler; + let wizards = responseWrapper.getWizards(); + wizards.forEach(wizard => { + console.log("Wizard CreatedTime: " + wizard.getCreatedTime()); + console.log("Wizard ModifiedTime: " + wizard.getModifiedTime()); + let module = wizard.getModule(); + if (module != null) { + console.log("Wizard Module APIName: " + module.getAPIName()); + console.log("Wizard Module Id: " + module.getId()); + } + console.log("Wizard Name: " + wizard.getName()); + let modifiedBy = wizard.getModifiedBy(); + if (modifiedBy != null) { + console.log("Wizard Modified By User-Name: " + modifiedBy.getName()); + console.log("Wizard Modified By User-ID: " + modifiedBy.getId()); + } + let profiles = wizard.getProfiles(); + if (profiles != null) { + profiles.forEach(profile => { + console.log("Wizard Profile Name: " + profile.getName()); + console.log("Wizard Profile ID: " + profile.getId()); + }); + } + console.log("Wizard Active: " + wizard.getActive()); + let containers = wizard.getContainers(); + if (containers != null) { + containers.forEach(container => { + let layout = container.getLayout(); + if (layout != null) { + console.log("Wizard Container Layout Name: " + layout.getName()); + console.log("Wizard Container Layout ID: " + layout.getId()); + } + console.log("Wizard Container ID: " + container.getId()); + }); + } + console.log("Wizard ID: " + wizard.getId()); + let createdBy = wizard.getCreatedBy(); + if (createdBy != null) { + console.log("Wizard Created By User-Name: " + createdBy.getName()); + console.log("Wizard Created By User-ID: " + createdBy.getId()); + } + }); + } + else if (responseHandler instanceof ZOHOCRMSDK.Wizards.APIException) { + let exception = responseHandler; + console.log("Status: ".exception.getStatus().getValue()); + console.log("Code: ".exception.getCode().getValue()); + console.log("Details: "); + let details = exception.getDetails(); + if (details != null) { + Array.from(details.keys()).forEach(key => { + console.log(key + ": " + details.get(key)); + }); + } + console.log("Message: ".exception.getMessage().getValue()); + } + } + } +} +await GetWizards.initialize(); +await GetWizards.getWizards(); \ No newline at end of file