@dereekb/zoho 13.11.13 → 13.11.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/cli/index.js +5 -5
  2. package/cli/package.json +7 -7
  3. package/index.cjs.js +569 -503
  4. package/index.esm.js +569 -503
  5. package/nestjs/index.cjs.js +248 -255
  6. package/nestjs/index.esm.js +248 -255
  7. package/nestjs/package.json +5 -5
  8. package/nestjs/src/lib/accounts/accounts.config.d.ts +1 -1
  9. package/nestjs/src/lib/accounts/accounts.service.d.ts +11 -11
  10. package/nestjs/src/lib/crm/crm.api.d.ts +31 -31
  11. package/nestjs/src/lib/crm/crm.config.d.ts +1 -1
  12. package/nestjs/src/lib/crm/crm.module.d.ts +12 -13
  13. package/nestjs/src/lib/desk/desk.api.d.ts +48 -48
  14. package/nestjs/src/lib/desk/desk.config.d.ts +2 -1
  15. package/nestjs/src/lib/desk/desk.module.d.ts +6 -6
  16. package/nestjs/src/lib/recruit/recruit.api.d.ts +35 -35
  17. package/nestjs/src/lib/recruit/recruit.config.d.ts +1 -1
  18. package/nestjs/src/lib/recruit/recruit.module.d.ts +12 -13
  19. package/nestjs/src/lib/sign/sign.api.d.ts +16 -16
  20. package/nestjs/src/lib/sign/sign.module.d.ts +12 -13
  21. package/nestjs/src/lib/sign/webhook/webhook.zoho.sign.d.ts +2 -2
  22. package/nestjs/src/lib/sign/webhook/webhook.zoho.sign.module.d.ts +3 -3
  23. package/nestjs/src/lib/sign/webhook/webhook.zoho.sign.verify.d.ts +2 -2
  24. package/nestjs/src/lib/zoho.config.d.ts +2 -1
  25. package/package.json +8 -8
  26. package/src/lib/accounts/accounts.api.d.ts +10 -10
  27. package/src/lib/accounts/accounts.config.d.ts +2 -2
  28. package/src/lib/accounts/accounts.d.ts +3 -2
  29. package/src/lib/accounts/accounts.error.api.d.ts +5 -5
  30. package/src/lib/accounts/accounts.factory.d.ts +8 -6
  31. package/src/lib/crm/crm.api.d.ts +87 -81
  32. package/src/lib/crm/crm.api.notes.d.ts +11 -10
  33. package/src/lib/crm/crm.api.tags.d.ts +16 -14
  34. package/src/lib/crm/crm.config.d.ts +2 -2
  35. package/src/lib/crm/crm.d.ts +2 -2
  36. package/src/lib/crm/crm.error.api.d.ts +10 -10
  37. package/src/lib/crm/crm.factory.d.ts +3 -2
  38. package/src/lib/crm/crm.notes.d.ts +2 -2
  39. package/src/lib/desk/desk.agent.d.ts +2 -2
  40. package/src/lib/desk/desk.api.activities.d.ts +5 -4
  41. package/src/lib/desk/desk.api.agents.d.ts +11 -10
  42. package/src/lib/desk/desk.api.attachments.d.ts +4 -4
  43. package/src/lib/desk/desk.api.comments.d.ts +8 -8
  44. package/src/lib/desk/desk.api.contacts.d.ts +9 -8
  45. package/src/lib/desk/desk.api.departments.d.ts +4 -4
  46. package/src/lib/desk/desk.api.followers.d.ts +6 -6
  47. package/src/lib/desk/desk.api.page.d.ts +6 -5
  48. package/src/lib/desk/desk.api.tags.d.ts +10 -10
  49. package/src/lib/desk/desk.api.threads.d.ts +7 -6
  50. package/src/lib/desk/desk.api.tickets.d.ts +23 -21
  51. package/src/lib/desk/desk.api.time.d.ts +10 -10
  52. package/src/lib/desk/desk.config.d.ts +2 -2
  53. package/src/lib/desk/desk.error.api.d.ts +5 -5
  54. package/src/lib/desk/desk.factory.d.ts +3 -2
  55. package/src/lib/desk/desk.limit.d.ts +3 -3
  56. package/src/lib/desk/desk.ticket.d.ts +4 -4
  57. package/src/lib/recruit/recruit.api.candidates.d.ts +15 -13
  58. package/src/lib/recruit/recruit.api.d.ts +85 -80
  59. package/src/lib/recruit/recruit.api.notes.d.ts +11 -10
  60. package/src/lib/recruit/recruit.api.tags.d.ts +19 -18
  61. package/src/lib/recruit/recruit.config.d.ts +2 -2
  62. package/src/lib/recruit/recruit.d.ts +2 -2
  63. package/src/lib/recruit/recruit.error.api.d.ts +10 -10
  64. package/src/lib/recruit/recruit.factory.d.ts +3 -2
  65. package/src/lib/recruit/recruit.notes.d.ts +2 -2
  66. package/src/lib/shared/criteria.d.ts +5 -5
  67. package/src/lib/shared/criteria.util.d.ts +2 -2
  68. package/src/lib/sign/sign.api.d.ts +47 -46
  69. package/src/lib/sign/sign.api.page.d.ts +6 -5
  70. package/src/lib/sign/sign.config.d.ts +2 -2
  71. package/src/lib/sign/sign.d.ts +4 -4
  72. package/src/lib/sign/sign.error.api.d.ts +5 -5
  73. package/src/lib/sign/sign.factory.d.ts +3 -2
  74. package/src/lib/zoho.api.page.d.ts +5 -4
  75. package/src/lib/zoho.error.api.d.ts +17 -14
  76. package/src/lib/zoho.limit.d.ts +6 -5
  77. package/src/lib/zoho.type.d.ts +1 -1
@@ -123,8 +123,10 @@ export type ZohoCrmInsertRecordFunction = ZohoCrmCreateRecordLikeFunction;
123
123
  *
124
124
  * Maximum of {@link ZOHO_CRM_CRUD_FUNCTION_MAX_RECORDS_LIMIT} records per call.
125
125
  *
126
- * @param context - Authenticated Zoho CRM context providing fetch and rate limiting
127
- * @returns Function that inserts records into the specified module
126
+ * @param context - Authenticated Zoho CRM context providing fetch and rate limiting.
127
+ * @returns Function that inserts records into the specified module.
128
+ *
129
+ * @see https://www.zoho.com/crm/developer-guide/apiv2/insert-records.html
128
130
  *
129
131
  * @example
130
132
  * ```typescript
@@ -145,8 +147,6 @@ export type ZohoCrmInsertRecordFunction = ZohoCrmCreateRecordLikeFunction;
145
147
  * ]
146
148
  * });
147
149
  * ```
148
- *
149
- * @see https://www.zoho.com/crm/developer-guide/apiv2/insert-records.html
150
150
  */
151
151
  export declare function zohoCrmInsertRecord(context: ZohoCrmContext): ZohoCrmInsertRecordFunction;
152
152
  /**
@@ -163,8 +163,10 @@ export type ZohoCrmUpsertRecordFunction = ZohoCrmUpsertRecordLikeFunction;
163
163
  *
164
164
  * Maximum of {@link ZOHO_CRM_CRUD_FUNCTION_MAX_RECORDS_LIMIT} records per call.
165
165
  *
166
- * @param context - Authenticated Zoho CRM context providing fetch and rate limiting
167
- * @returns Function that upserts records in the specified module
166
+ * @param context - Authenticated Zoho CRM context providing fetch and rate limiting.
167
+ * @returns Function that upserts records in the specified module.
168
+ *
169
+ * @see https://www.zoho.com/crm/developer-guide/apiv2/upsert-records.html
168
170
  *
169
171
  * @example
170
172
  * ```typescript
@@ -191,8 +193,6 @@ export type ZohoCrmUpsertRecordFunction = ZohoCrmUpsertRecordLikeFunction;
191
193
  * ]
192
194
  * });
193
195
  * ```
194
- *
195
- * @see https://www.zoho.com/crm/developer-guide/apiv2/upsert-records.html
196
196
  */
197
197
  export declare function zohoCrmUpsertRecord(context: ZohoCrmContext): ZohoCrmUpsertRecordFunction;
198
198
  /**
@@ -208,8 +208,10 @@ export type ZohoCrmUpdateRecordFunction = ZohoCrmUpdateRecordLikeFunction;
208
208
  *
209
209
  * Maximum of {@link ZOHO_CRM_CRUD_FUNCTION_MAX_RECORDS_LIMIT} records per call.
210
210
  *
211
- * @param context - Authenticated Zoho CRM context providing fetch and rate limiting
212
- * @returns Function that updates records in the specified module
211
+ * @param context - Authenticated Zoho CRM context providing fetch and rate limiting.
212
+ * @returns Function that updates records in the specified module.
213
+ *
214
+ * @see https://www.zoho.com/crm/developer-guide/apiv2/update-records.html
213
215
  *
214
216
  * @example
215
217
  * ```typescript
@@ -230,8 +232,6 @@ export type ZohoCrmUpdateRecordFunction = ZohoCrmUpdateRecordLikeFunction;
230
232
  * ]
231
233
  * });
232
234
  * ```
233
- *
234
- * @see https://www.zoho.com/crm/developer-guide/apiv2/update-records.html
235
235
  */
236
236
  export declare function zohoCrmUpdateRecord(context: ZohoCrmContext): ZohoCrmUpdateRecordFunction;
237
237
  /**
@@ -274,8 +274,10 @@ export type ZohoCrmDeleteRecordResult = ZohoCrmChangeObjectResponseSuccessEntry[
274
274
  * an optional `wf_trigger` flag to execute workflow rules on deletion. Returns
275
275
  * a response with separated success and error entries.
276
276
  *
277
- * @param context - Authenticated Zoho CRM context providing fetch and rate limiting
278
- * @returns Function that deletes records from the specified module
277
+ * @param context - Authenticated Zoho CRM context providing fetch and rate limiting.
278
+ * @returns Function that deletes records from the specified module.
279
+ *
280
+ * @see https://www.zoho.com/crm/developer-guide/apiv2/delete-records.html
279
281
  *
280
282
  * @example
281
283
  * ```typescript
@@ -286,8 +288,6 @@ export type ZohoCrmDeleteRecordResult = ZohoCrmChangeObjectResponseSuccessEntry[
286
288
  * ids: contactId
287
289
  * });
288
290
  * ```
289
- *
290
- * @see https://www.zoho.com/crm/developer-guide/apiv2/delete-records.html
291
291
  */
292
292
  export declare function zohoCrmDeleteRecord(context: ZohoCrmContext): ZohoCrmDeleteRecordFunction;
293
293
  /**
@@ -315,8 +315,10 @@ export type ZohoCrmGetRecordByIdFunction = <T = ZohoCrmRecord>(input: ZohoCrmGet
315
315
  * unwrapped from the standard data array, returning the record directly.
316
316
  * Throws if the record is not found.
317
317
  *
318
- * @param context - Authenticated Zoho CRM context providing fetch and rate limiting
319
- * @returns Function that retrieves a record by module name and ID
318
+ * @param context - Authenticated Zoho CRM context providing fetch and rate limiting.
319
+ * @returns Function that retrieves a record by module name and ID.
320
+ *
321
+ * @see https://www.zoho.com/crm/developer-guide/apiv2/get-records.html
320
322
  *
321
323
  * @example
322
324
  * ```typescript
@@ -327,8 +329,6 @@ export type ZohoCrmGetRecordByIdFunction = <T = ZohoCrmRecord>(input: ZohoCrmGet
327
329
  * id: contactId
328
330
  * });
329
331
  * ```
330
- *
331
- * @see https://www.zoho.com/crm/developer-guide/apiv2/get-records.html
332
332
  */
333
333
  export declare function zohoCrmGetRecordById(context: ZohoCrmContext): ZohoCrmGetRecordByIdFunction;
334
334
  export interface ZohoCrmGetRecordsPageFilter extends ZohoPageFilter {
@@ -355,8 +355,10 @@ export type ZohoCrmGetRecordsFunction = <T = ZohoCrmRecord>(input: ZohoCrmGetRec
355
355
  * selection, sorting, custom view filtering, territory filtering, and
356
356
  * conversion/approval status filters via {@link ZohoCrmGetRecordsInput}.
357
357
  *
358
- * @param context - Authenticated Zoho CRM context providing fetch and rate limiting
359
- * @returns Function that retrieves paginated records from a module
358
+ * @param context - Authenticated Zoho CRM context providing fetch and rate limiting.
359
+ * @returns Function that retrieves paginated records from a module.
360
+ *
361
+ * @see https://www.zoho.com/crm/developer-guide/apiv2/get-records.html
360
362
  *
361
363
  * @example
362
364
  * ```typescript
@@ -368,8 +370,6 @@ export type ZohoCrmGetRecordsFunction = <T = ZohoCrmRecord>(input: ZohoCrmGetRec
368
370
  * per_page: 10
369
371
  * });
370
372
  * ```
371
- *
372
- * @see https://www.zoho.com/crm/developer-guide/apiv2/get-records.html
373
373
  */
374
374
  export declare function zohoCrmGetRecords(context: ZohoCrmContext): ZohoCrmGetRecordsFunction;
375
375
  /**
@@ -394,9 +394,11 @@ export type ZohoCrmSearchRecordsFunction = <T = ZohoCrmRecord>(input: ZohoCrmSea
394
394
  * At least one search parameter must be provided. Returns a paginated result,
395
395
  * defaulting to an empty data array when no matches are found.
396
396
  *
397
- * @param context - Authenticated Zoho CRM context providing fetch and rate limiting
398
- * @returns Function that searches records in the specified module
399
- * @throws {Error} If none of `criteria`, `email`, `phone`, `cvid`, or `word` are provided
397
+ * @param context - Authenticated Zoho CRM context providing fetch and rate limiting.
398
+ * @returns Function that searches records in the specified module.
399
+ * @throws {Error} If none of `criteria`, `email`, `phone`, `cvid`, or `word` are provided.
400
+ *
401
+ * @see https://www.zoho.com/crm/developer-guide/apiv2/search-records.html
400
402
  *
401
403
  * @example
402
404
  * ```typescript
@@ -415,8 +417,6 @@ export type ZohoCrmSearchRecordsFunction = <T = ZohoCrmRecord>(input: ZohoCrmSea
415
417
  * word: 'engineer'
416
418
  * });
417
419
  * ```
418
- *
419
- * @see https://www.zoho.com/crm/developer-guide/apiv2/search-records.html
420
420
  */
421
421
  export declare function zohoCrmSearchRecords(context: ZohoCrmContext): ZohoCrmSearchRecordsFunction;
422
422
  /**
@@ -429,8 +429,8 @@ export type ZohoCrmSearchRecordsPageFactory = <T = ZohoCrmRecord>(input: ZohoCrm
429
429
  * Returns a page factory that automatically handles Zoho CRM's pagination,
430
430
  * making it easy to iterate through all search results across multiple pages.
431
431
  *
432
- * @param context - Authenticated Zoho CRM context providing fetch and rate limiting
433
- * @returns Page factory for iterating over search results
432
+ * @param context - Authenticated Zoho CRM context providing fetch and rate limiting.
433
+ * @returns Page factory for iterating over search results.
434
434
  *
435
435
  * @example
436
436
  * ```typescript
@@ -445,6 +445,7 @@ export type ZohoCrmSearchRecordsPageFactory = <T = ZohoCrmRecord>(input: ZohoCrm
445
445
  * const firstPage = await fetchPage.fetchNext();
446
446
  * const secondPage = await firstPage.fetchNext();
447
447
  * ```
448
+ *
448
449
  * @__NO_SIDE_EFFECTS__
449
450
  */
450
451
  export declare function zohoCrmSearchRecordsPageFactory(context: ZohoCrmContext): ZohoCrmSearchRecordsPageFactory;
@@ -487,8 +488,10 @@ export type ZohoCrmGetRelatedRecordsFunction<T = ZohoCrmRecord> = (input: ZohoCr
487
488
  * target module and empty-result behavior. By default, returns an empty page
488
489
  * result instead of null when no records are found.
489
490
  *
490
- * @param context - Authenticated Zoho CRM context providing fetch and rate limiting
491
- * @returns Factory that creates typed related-records retrieval functions
491
+ * @param context - Authenticated Zoho CRM context providing fetch and rate limiting.
492
+ * @returns Factory that creates typed related-records retrieval functions.
493
+ *
494
+ * @see https://www.zoho.com/crm/developer-guide/apiv2/get-related-records.html
492
495
  *
493
496
  * @example
494
497
  * ```typescript
@@ -505,7 +508,6 @@ export type ZohoCrmGetRelatedRecordsFunction<T = ZohoCrmRecord> = (input: ZohoCr
505
508
  * });
506
509
  * ```
507
510
  *
508
- * @see https://www.zoho.com/crm/developer-guide/apiv2/get-related-records.html
509
511
  * @__NO_SIDE_EFFECTS__
510
512
  */
511
513
  export declare function zohoCrmGetRelatedRecordsFunctionFactory(context: ZohoCrmContext): ZohoCrmGetRelatedRecordsFunctionFactory;
@@ -540,8 +542,10 @@ export type ZohoCrmGetEmailsForRecordRawApiResponse = Omit<ZohoCrmGetEmailsForRe
540
542
  * which returns email data under an `Emails` key instead of the standard `data` key.
541
543
  * Returns a paginated result of {@link ZohoCrmRecordEmailMetadata} entries.
542
544
  *
543
- * @param context - Authenticated Zoho CRM context providing fetch and rate limiting
544
- * @returns Function that retrieves emails for a record
545
+ * @param context - Authenticated Zoho CRM context providing fetch and rate limiting.
546
+ * @returns Function that retrieves emails for a record.
547
+ *
548
+ * @see https://www.zoho.com/crm/developer/docs/api/v8/get-email-rel-list.html
545
549
  *
546
550
  * @example
547
551
  * ```typescript
@@ -552,8 +556,6 @@ export type ZohoCrmGetEmailsForRecordRawApiResponse = Omit<ZohoCrmGetEmailsForRe
552
556
  * module: 'Contacts'
553
557
  * });
554
558
  * ```
555
- *
556
- * @see https://www.zoho.com/crm/developer/docs/api/v8/get-email-rel-list.html
557
559
  */
558
560
  export declare function zohoCrmGetEmailsForRecord(context: ZohoCrmContext): ZohoCrmGetEmailsForRecordFunction;
559
561
  /**
@@ -567,8 +569,10 @@ export type ZohoCrmGetEmailsForRecordPageFactory = FetchPageFactory<ZohoCrmGetEm
567
569
  * multiple pages. Wraps {@link zohoCrmGetEmailsForRecord} with automatic
568
570
  * pagination handling via {@link zohoFetchPageFactory}.
569
571
  *
570
- * @param context - Authenticated Zoho CRM context providing fetch and rate limiting
571
- * @returns Page factory for iterating over record emails
572
+ * @param context - Authenticated Zoho CRM context providing fetch and rate limiting.
573
+ * @returns Page factory for iterating over record emails.
574
+ *
575
+ * @see https://www.zoho.com/crm/developer/docs/api/v8/get-email-rel-list.html
572
576
  *
573
577
  * @example
574
578
  * ```typescript
@@ -587,7 +591,6 @@ export type ZohoCrmGetEmailsForRecordPageFactory = FetchPageFactory<ZohoCrmGetEm
587
591
  * }
588
592
  * ```
589
593
  *
590
- * @see https://www.zoho.com/crm/developer/docs/api/v8/get-email-rel-list.html
591
594
  * @__NO_SIDE_EFFECTS__
592
595
  */
593
596
  export declare function zohoCrmGetEmailsForRecordPageFactory(context: ZohoCrmContext): ZohoCrmGetEmailsForRecordPageFactory;
@@ -612,8 +615,10 @@ export type ZohoCrmGetAttachmentsForRecordFunction = (input: ZohoCrmGetAttachmen
612
615
  * and category information. When no attachments exist for the record, the result
613
616
  * contains an empty data array rather than null.
614
617
  *
615
- * @param context - Authenticated Zoho CRM context providing fetch and rate limiting
616
- * @returns Function that retrieves attachments for a record
618
+ * @param context - Authenticated Zoho CRM context providing fetch and rate limiting.
619
+ * @returns Function that retrieves attachments for a record.
620
+ *
621
+ * @see https://www.zoho.com/crm/developer-guide/apiv2/get-related-records.html
617
622
  *
618
623
  * @example
619
624
  * ```typescript
@@ -625,8 +630,6 @@ export type ZohoCrmGetAttachmentsForRecordFunction = (input: ZohoCrmGetAttachmen
625
630
  * fields: 'File_Name,Size,Created_Time'
626
631
  * });
627
632
  * ```
628
- *
629
- * @see https://www.zoho.com/crm/developer-guide/apiv2/get-related-records.html
630
633
  */
631
634
  export declare function zohoCrmGetAttachmentsForRecord(context: ZohoCrmContext): ZohoCrmGetAttachmentsForRecordFunction;
632
635
  /**
@@ -640,8 +643,10 @@ export type ZohoCrmGetAttachmentsForRecordPageFactory = FetchPageFactory<ZohoCrm
640
643
  * across multiple pages. Wraps {@link zohoCrmGetAttachmentsForRecord} with
641
644
  * automatic pagination handling via {@link zohoFetchPageFactory}.
642
645
  *
643
- * @param context - Authenticated Zoho CRM context providing fetch and rate limiting
644
- * @returns Page factory for iterating over record attachments
646
+ * @param context - Authenticated Zoho CRM context providing fetch and rate limiting.
647
+ * @returns Page factory for iterating over record attachments.
648
+ *
649
+ * @see https://www.zoho.com/crm/developer-guide/apiv2/get-related-records.html
645
650
  *
646
651
  * @example
647
652
  * ```typescript
@@ -661,7 +666,6 @@ export type ZohoCrmGetAttachmentsForRecordPageFactory = FetchPageFactory<ZohoCrm
661
666
  * }
662
667
  * ```
663
668
  *
664
- * @see https://www.zoho.com/crm/developer-guide/apiv2/get-related-records.html
665
669
  * @__NO_SIDE_EFFECTS__
666
670
  */
667
671
  export declare function zohoCrmGetAttachmentsForRecordPageFactory(context: ZohoCrmContext): ZohoCrmGetAttachmentsForRecordPageFactory;
@@ -700,9 +704,11 @@ export type ZohoCrmUploadAttachmentForRecordFunction = (input: ZohoCrmUploadAtta
700
704
  * multipart/form-data. An attachment category must be specified by ID or name.
701
705
  * Maximum file size is {@link ZOHO_CRM_ATTACHMENT_MAX_SIZE} (20MB).
702
706
  *
703
- * @param context - Authenticated Zoho CRM context providing fetch and rate limiting
704
- * @returns Function that uploads an attachment to a record
705
- * @throws {Error} If neither `attachmentCategoryId` nor `attachmentCategoryName` is provided
707
+ * @param context - Authenticated Zoho CRM context providing fetch and rate limiting.
708
+ * @returns Function that uploads an attachment to a record.
709
+ * @throws {Error} If neither `attachmentCategoryId` nor `attachmentCategoryName` is provided.
710
+ *
711
+ * @see https://www.zoho.com/crm/developer/docs/api/v2.1/upload-attachment.html
706
712
  *
707
713
  * @example
708
714
  * ```typescript
@@ -715,8 +721,6 @@ export type ZohoCrmUploadAttachmentForRecordFunction = (input: ZohoCrmUploadAtta
715
721
  * attachmentCategoryName: 'Resume'
716
722
  * });
717
723
  * ```
718
- *
719
- * @see https://www.zoho.com/crm/developer/docs/api/v2.1/upload-attachment.html
720
724
  */
721
725
  export declare function zohoCrmUploadAttachmentForRecord(context: ZohoCrmContext): ZohoCrmUploadAttachmentForRecordFunction;
722
726
  export interface ZohoCrmDownloadAttachmentForRecordRequest extends ZohoCrmGetRecordByIdInput {
@@ -731,8 +735,10 @@ export type ZohoCrmDownloadAttachmentForRecordFunction = (input: ZohoCrmDownload
731
735
  * {@link FetchFileResponse} containing the file data and metadata extracted
732
736
  * from the response headers.
733
737
  *
734
- * @param context - Authenticated Zoho CRM context providing fetch and rate limiting
735
- * @returns Function that downloads an attachment by record and attachment ID
738
+ * @param context - Authenticated Zoho CRM context providing fetch and rate limiting.
739
+ * @returns Function that downloads an attachment by record and attachment ID.
740
+ *
741
+ * @see https://www.zoho.com/crm/developer-guide/apiv2/download-attachments.html
736
742
  *
737
743
  * @example
738
744
  * ```typescript
@@ -744,8 +750,6 @@ export type ZohoCrmDownloadAttachmentForRecordFunction = (input: ZohoCrmDownload
744
750
  * attachment_id: attachmentId
745
751
  * });
746
752
  * ```
747
- *
748
- * @see https://www.zoho.com/crm/developer-guide/apiv2/download-attachments.html
749
753
  */
750
754
  export declare function zohoCrmDownloadAttachmentForRecord(context: ZohoCrmContext): ZohoCrmDownloadAttachmentForRecordFunction;
751
755
  export interface ZohoCrmDeleteAttachmentFromRecordRequest extends ZohoCrmGetRecordByIdInput {
@@ -759,8 +763,10 @@ export type ZohoCrmDeleteAttachmentFromRecordFunction = (input: ZohoCrmDeleteAtt
759
763
  * Deletes a specific attachment from a record by its attachment ID.
760
764
  * Returns the raw {@link Response}.
761
765
  *
762
- * @param context - Authenticated Zoho CRM context providing fetch and rate limiting
763
- * @returns Function that deletes an attachment by record and attachment ID
766
+ * @param context - Authenticated Zoho CRM context providing fetch and rate limiting.
767
+ * @returns Function that deletes an attachment by record and attachment ID.
768
+ *
769
+ * @see https://www.zoho.com/crm/developer-guide/apiv2/delete-attachments.html
764
770
  *
765
771
  * @example
766
772
  * ```typescript
@@ -772,8 +778,6 @@ export type ZohoCrmDeleteAttachmentFromRecordFunction = (input: ZohoCrmDeleteAtt
772
778
  * attachment_id: attachmentId
773
779
  * });
774
780
  * ```
775
- *
776
- * @see https://www.zoho.com/crm/developer-guide/apiv2/delete-attachments.html
777
781
  */
778
782
  export declare function zohoCrmDeleteAttachmentFromRecord(context: ZohoCrmContext): ZohoCrmDeleteAttachmentFromRecordFunction;
779
783
  export type ZohoCrmExecuteRestApiFunctionRequest = ZohoCrmExecuteRestApiFunctionNormalRequest | ZohoCrmExecuteRestApiFunctionApiSpecificRequest;
@@ -836,9 +840,9 @@ export type ZohoCrmExecuteRestApiFunctionFunction = (input: ZohoCrmExecuteRestAp
836
840
  * - There is no documentation for ZohoCrm specifically, but it seems to behave the same way
837
841
  * - You will need the following scopes: ZohoCrm.functions.execute.READ,ZohoCrm.functions.execute.CREATE
838
842
  *
839
- * @param context - Authenticated Zoho CRM context providing fetch and rate limiting
840
- * @returns Function that executes serverless functions via the REST API
841
- * @throws {ZohoCrmExecuteRestApiFunctionError} If the function execution fails
843
+ * @param context - Authenticated Zoho CRM context providing fetch and rate limiting.
844
+ * @returns Function that executes serverless functions via the REST API.
845
+ * @throws {ZohoCrmExecuteRestApiFunctionError} If the function execution fails.
842
846
  *
843
847
  * @example
844
848
  * ```typescript
@@ -860,33 +864,30 @@ export type ZohoCrmExecuteRestApiFunctionFunction = (input: ZohoCrmExecuteRestAp
860
864
  * apiUrl: 'production'
861
865
  * });
862
866
  * ```
867
+ *
863
868
  * @__NO_SIDE_EFFECTS__
864
869
  */
865
870
  export declare function zohoCrmExecuteRestApiFunction(context: ZohoCrmContext): ZohoCrmExecuteRestApiFunctionFunction;
866
871
  /**
867
872
  * Builds URL search params from the input objects, omitting the `module` key since it is used in the URL path rather than as a query parameter.
868
873
  *
869
- * @param input - One or more objects to convert into URL search parameters
870
- * @returns URL search params string with the `module` key excluded
874
+ * @param input - One or more objects to convert into URL search parameters.
875
+ * @returns URL search params string with the `module` key excluded.
871
876
  */
872
877
  export declare function zohoCrmUrlSearchParamsMinusModule(...input: Maybe<object | Record<string, string | number>>[]): URLSearchParams;
873
878
  /**
874
879
  * Builds URL search params from the input objects, omitting both `id` and `module` keys since they are used in the URL path.
875
880
  *
876
- * @param input - One or more objects to convert into URL search parameters
877
- * @returns URL search params string with `id` and `module` keys excluded
881
+ * @param input - One or more objects to convert into URL search parameters.
882
+ * @returns URL search params string with `id` and `module` keys excluded.
878
883
  */
879
884
  export declare function zohoCrmUrlSearchParamsMinusIdAndModule(...input: Maybe<object | Record<string, string | number>>[]): URLSearchParams;
880
- /**
881
- * @deprecated use makeUrlSearchParams instead.
882
- */
883
- export declare const zohoCrmUrlSearchParams: typeof makeUrlSearchParams;
884
885
  /**
885
886
  * Constructs the standard FetchJsonInput used by CRM API calls, pairing the HTTP method with an optional body.
886
887
  *
887
- * @param method - HTTP method to use for the request
888
- * @param body - Optional request body to include
889
- * @returns Configured fetch input for the Zoho CRM API call
888
+ * @param method - HTTP method to use for the request.
889
+ * @param body - Optional request body to include.
890
+ * @returns Configured fetch input for the Zoho CRM API call.
890
891
  */
891
892
  export declare function zohoCrmApiFetchJsonInput(method: string, body?: Maybe<FetchJsonBody>): FetchJsonInput;
892
893
  /**
@@ -894,8 +895,9 @@ export declare function zohoCrmApiFetchJsonInput(method: string, body?: Maybe<Fe
894
895
  *
895
896
  * Use to catch errors from functions that return ZohoCrmChangeObjectLikeResponse and pass the result to zohoCrmChangeObjectLikeResponseSuccessAndErrorPairs.
896
897
  *
897
- * @param e - The error to catch and potentially convert
898
- * @returns The error data array wrapped as a change object response
898
+ * @param e - The error to catch and potentially convert.
899
+ * @returns The error data array wrapped as a change object response.
900
+ * @throws Re-throws `e` when it is not a {@link ZohoServerFetchResponseDataArrayError}.
899
901
  */
900
902
  export declare function zohoCrmCatchZohoCrmChangeObjectLikeResponseError<R extends ZohoCrmChangeObjectLikeResponse<any>>(e: unknown): R;
901
903
  export type ZohoCrmChangeObjectLikeResponse<T extends ZohoCrmChangeObjectLikeResponseEntry = ZohoCrmChangeObjectLikeResponseEntry> = ZohoDataArrayResultRef<T>;
@@ -920,8 +922,8 @@ export type ZohoCrmChangeObjectLikeResponseSuccessAndErrorPairs<T extends ZohoCr
920
922
  * Used internally by {@link zohoCrmDeleteRecord} and similar functions to provide
921
923
  * convenient access to separated success/error results.
922
924
  *
923
- * @param response - Raw change operation response containing mixed success/error entries
924
- * @returns The response augmented with pre-separated `successItems` and `errorItems` arrays
925
+ * @param response - Raw change operation response containing mixed success/error entries.
926
+ * @returns The response augmented with pre-separated `successItems` and `errorItems` arrays.
925
927
  *
926
928
  * @example
927
929
  * ```typescript
@@ -964,9 +966,9 @@ export interface ZohoCrmMultiRecordResultItem {
964
966
  * Used internally by {@link updateRecordLikeFunction} to pair input data with API outcomes
965
967
  * for insert, update, and upsert operations.
966
968
  *
967
- * @param input - Array of input records that were submitted to the API
969
+ * @param input - Array of input records that were submitted to the API.
968
970
  * @param results - Array of per-record results returned by the API, positionally aligned with `input`
969
- * @returns Object with `successItems` and `errorItems`, each containing paired `{ input, result }` entries
971
+ * @returns Object with `successItems` and `errorItems`, each containing paired `{ input, result }` entries.
970
972
  */
971
973
  export declare function zohoCrmMultiRecordResult<I, OS extends ZohoCrmMultiRecordResultItem, OE extends ZohoCrmMultiRecordResultItem>(input: I[], results: (OS | OE)[]): ZohoCrmMultiRecordResult<I, OS, OE>;
972
974
  export interface ZohoCrmMultiRecordResultEntry<I, O> {
@@ -979,6 +981,10 @@ export interface ZohoCrmMultiRecordResultEntry<I, O> {
979
981
  */
980
982
  readonly result: O;
981
983
  }
984
+ /**
985
+ * @deprecated use makeUrlSearchParams instead.
986
+ */
987
+ export declare const zohoCrmUrlSearchParams: typeof makeUrlSearchParams;
982
988
  /**
983
989
  * @deprecated use ZohoCrmGetRelatedRecordsPageFilter instead.
984
990
  */
@@ -29,8 +29,8 @@ export type ZohoCrmCreateNotesFunction = (input: ZohoCrmCreateNotesRequest) => P
29
29
  *
30
30
  * For creating notes associated with a specific record, prefer {@link zohoCrmCreateNotesForRecord} which handles parent binding automatically.
31
31
  *
32
- * @param context - Authenticated Zoho CRM context for making API calls
33
- * @returns Function that creates notes in the CRM Notes module
32
+ * @param context - Authenticated Zoho CRM context for making API calls.
33
+ * @returns Function that creates notes in the CRM Notes module.
34
34
  */
35
35
  export declare function zohoCrmCreateNotes(context: ZohoCrmContext): (input: ZohoCrmCreateNotesRequest) => Promise<ZohoCrmMultiRecordResult<NewZohoCrmNoteData, ZohoCrmChangeObjectResponseSuccessEntry<import("./crm").ZohoCrmChangeObjectDetails>, ZohoCrmChangeObjectResponseErrorEntry>>;
36
36
  /**
@@ -51,8 +51,8 @@ export type ZohoCrmDeleteNotesFunction = (input: ZohoCrmDeleteNotesRequest) => P
51
51
  /**
52
52
  * Deletes one or more notes from the CRM Notes module by their IDs.
53
53
  *
54
- * @param context - Authenticated Zoho CRM context for making API calls
55
- * @returns Function that deletes notes by their IDs
54
+ * @param context - Authenticated Zoho CRM context for making API calls.
55
+ * @returns Function that deletes notes by their IDs.
56
56
  */
57
57
  export declare function zohoCrmDeleteNotes(context: ZohoCrmContext): (input: ZohoCrmDeleteNotesRequest) => Promise<ZohoCrmMultiRecordResult<string, ZohoCrmChangeObjectResponseSuccessEntry<import("./crm").ZohoCrmChangeObjectDetails>, ZohoCrmChangeObjectResponseErrorEntry>>;
58
58
  /**
@@ -67,16 +67,17 @@ export type ZohoCrmGetNotesForRecordFunction = (input: ZohoCrmGetNotesForRecordR
67
67
  /**
68
68
  * Retrieves paginated notes associated with a specific CRM record using the related records API.
69
69
  *
70
- * @param context - Authenticated Zoho CRM context for making API calls
71
- * @returns Function that retrieves notes for a specific record
70
+ * @param context - Authenticated Zoho CRM context for making API calls.
71
+ * @returns Function that retrieves notes for a specific record.
72
72
  */
73
73
  export declare function zohoCrmGetNotesForRecord(context: ZohoCrmContext): ZohoCrmGetNotesForRecordFunction;
74
74
  export type ZohoCrmGetNotesForRecordPageFactory = FetchPageFactory<ZohoCrmGetNotesForRecordRequest, ZohoCrmGetNotesForRecordResponse>;
75
75
  /**
76
76
  * Creates a page factory for iterating through all notes for a record across multiple pages.
77
77
  *
78
- * @param context - Authenticated Zoho CRM context for making API calls
79
- * @returns Page factory for paginating through notes for a record
78
+ * @param context - Authenticated Zoho CRM context for making API calls.
79
+ * @returns Page factory for paginating through notes for a record.
80
+ *
80
81
  * @__NO_SIDE_EFFECTS__
81
82
  */
82
83
  export declare function zohoCrmGetNotesForRecordPageFactory(context: ZohoCrmContext): ZohoCrmGetNotesForRecordPageFactory;
@@ -93,7 +94,7 @@ export type ZohoCrmCreateNotesForRecordFunction = (input: ZohoCrmCreateNotesForR
93
94
  *
94
95
  * https://www.zoho.com/crm/developer/docs/api/v8/create-notes.html
95
96
  *
96
- * @param context - Authenticated Zoho CRM context for making API calls
97
- * @returns Function that creates notes bound to a specific record
97
+ * @param context - Authenticated Zoho CRM context for making API calls.
98
+ * @returns Function that creates notes bound to a specific record.
98
99
  */
99
100
  export declare function zohoCrmCreateNotesForRecord(context: ZohoCrmContext): ZohoCrmCreateNotesForRecordFunction;
@@ -32,8 +32,8 @@ export type ZohoCrmCreateTagsFunction = (input: ZohoCrmCreateTagsRequest) => Pro
32
32
  /**
33
33
  * Creates one or more tags for a CRM module. Duplicate tag errors are separated from other errors in the result to simplify idempotent workflows.
34
34
  *
35
- * @param context - Authenticated Zoho CRM context for making API calls
36
- * @returns Function that creates tags for a module
35
+ * @param context - Authenticated Zoho CRM context for making API calls.
36
+ * @returns Function that creates tags for a module.
37
37
  */
38
38
  export declare function zohoCrmCreateTagsForModule(context: ZohoCrmContext): (input: ZohoCrmCreateTagsRequest) => Promise<{
39
39
  errorItems: ZohoCrmMultiRecordResultEntry<ZohoCrmCreateTagData, ZohoCrmChangeObjectResponseErrorEntry>[];
@@ -70,8 +70,8 @@ export type ZohoCrmDeleteTagFunction = (input: ZohoCrmDeleteTagRequest) => Promi
70
70
  *
71
71
  * https://www.zoho.com/crm/developer/docs/api/v8/delete-tag.html
72
72
  *
73
- * @param context - Authenticated Zoho CRM context for making API calls
74
- * @returns Function that deletes a tag by ID
73
+ * @param context - Authenticated Zoho CRM context for making API calls.
74
+ * @returns Function that deletes a tag by ID.
75
75
  */
76
76
  export declare function zohoCrmDeleteTag(context: ZohoCrmContext): ZohoCrmDeleteTagFunction;
77
77
  /**
@@ -96,16 +96,17 @@ export type ZohoCrmGetTagsFunction = (input: ZohoCrmGetTagsRequest) => Promise<Z
96
96
  *
97
97
  * https://www.zoho.com/crm/developer-guide/apiv2/get-tag-list.html
98
98
  *
99
- * @param context - Authenticated Zoho CRM context for making API calls
100
- * @returns Function that retrieves tags for a module
99
+ * @param context - Authenticated Zoho CRM context for making API calls.
100
+ * @returns Function that retrieves tags for a module.
101
101
  */
102
102
  export declare function zohoCrmGetTagsForModule(context: ZohoCrmContext): ZohoCrmGetTagsFunction;
103
103
  export type ZohoCrmGetTagsForModulePageFactory = (input: ZohoCrmGetTagsRequest, options?: Maybe<FetchPageFactoryOptions<ZohoCrmGetTagsRequest, ZohoCrmGetTagsResult>>) => FetchPage<ZohoCrmGetTagsRequest, ZohoCrmGetTagsResult>;
104
104
  /**
105
105
  * Creates a page factory for iterating through all tags in a module across multiple pages.
106
106
  *
107
- * @param context - Authenticated Zoho CRM context for making API calls
108
- * @returns Page factory for paginating through tags in a module
107
+ * @param context - Authenticated Zoho CRM context for making API calls.
108
+ * @returns Page factory for paginating through tags in a module.
109
+ *
109
110
  * @__NO_SIDE_EFFECTS__
110
111
  */
111
112
  export declare function zohoCrmGetTagsForModulePageFactory(context: ZohoCrmContext): ZohoCrmGetTagsForModulePageFactory;
@@ -172,15 +173,16 @@ export type ZohoCrmAddTagsToRecordsFunction = (input: ZohoCrmAddTagsToRecordsReq
172
173
  *
173
174
  * https://www.zoho.com/crm/developer-guide/apiv2/add-tags.html
174
175
  *
175
- * @param context - Authenticated Zoho CRM context for making API calls
176
- * @returns Function that adds tags to records
176
+ * @param context - Authenticated Zoho CRM context for making API calls.
177
+ * @returns Function that adds tags to records.
177
178
  */
178
179
  export declare function zohoCrmAddTagsToRecords(context: ZohoCrmContext): ZohoCrmAddTagsToRecordsFunction;
179
180
  /**
180
181
  * Builds the request body for the add/remove tags endpoints, merging `tag_names` into `tags` and enforcing the max ID limit.
181
182
  *
182
- * @param input - The add/remove tags request containing tag names, tag objects, and record IDs
183
- * @returns The formatted request body with merged tags and record IDs
183
+ * @param input - The add/remove tags request containing tag names, tag objects, and record IDs.
184
+ * @returns The formatted request body with merged tags and record IDs.
185
+ * @throws {Error} When `input.ids` exceeds {@link ZOHO_CRM_ADD_TAGS_TO_RECORDS_MAX_IDS_ALLOWED}.
184
186
  */
185
187
  export declare function zohoCrmAddTagsToRecordsRequestBody(input: ZohoCrmAddTagsToRecordsRequest): {
186
188
  tags: (ZohoCrmTagData & {
@@ -227,7 +229,7 @@ export type ZohoCrmRemoveTagsFromRecordsFunction = (input: ZohoCrmRemoveTagsFrom
227
229
  *
228
230
  * https://www.zoho.com/crm/developer-guide/apiv2/remove-tags.html
229
231
  *
230
- * @param context - Authenticated Zoho CRM context for making API calls
231
- * @returns Function that removes tags from records
232
+ * @param context - Authenticated Zoho CRM context for making API calls.
233
+ * @returns Function that removes tags from records.
232
234
  */
233
235
  export declare function zohoCrmRemoveTagsFromRecords(context: ZohoCrmContext): ZohoCrmRemoveTagsFromRecordsFunction;
@@ -22,8 +22,8 @@ export type ZohoCrmConfigApiUrlInput = ZohoCrmApiUrlKey | ZohoCrmApiUrl;
22
22
  /**
23
23
  * Resolves a CRM API URL input to its full base URL. Well-known keys ('sandbox', 'production') map to their respective Zoho CRM endpoints; custom URLs pass through unchanged.
24
24
  *
25
- * @param input - A well-known environment key or a custom CRM API URL
26
- * @returns The resolved full Zoho CRM API base URL
25
+ * @param input - A well-known environment key or a custom CRM API URL.
26
+ * @returns The resolved full Zoho CRM API base URL.
27
27
  */
28
28
  export declare function zohoCrmConfigApiUrl(input: ZohoCrmConfigApiUrlInput): ZohoApiUrl;
29
29
  /**
@@ -1,4 +1,4 @@
1
- import { type CommaSeparatedString, type EmailAddress, type ISO8601DateString, type Maybe, type UniqueModelWithId, type WebsiteUrl } from '@dereekb/util';
1
+ import { type CommaSeparatedString, type EmailAddress, type ISO8601DateString, type SuggestedString, type Maybe, type UniqueModelWithId, type WebsiteUrl } from '@dereekb/util';
2
2
  /**
3
3
  * Zoho CRM module name.
4
4
  *
@@ -203,7 +203,7 @@ export interface ZohoCrmRecordEmailMetadata {
203
203
  */
204
204
  status: ZohoCrmRecordEmailMetadataStatus[];
205
205
  }
206
- export type ZohoCrmRecordEmailMetadataStatusType = 'sent' | (string & {});
206
+ export type ZohoCrmRecordEmailMetadataStatusType = SuggestedString<'sent'>;
207
207
  export interface ZohoCrmRecordEmailMetadataStatus {
208
208
  type: ZohoCrmRecordEmailMetadataStatusType;
209
209
  }
@@ -67,16 +67,16 @@ export declare class ZohoCrmRecordCrudNoMatchingRecordError extends ZohoCrmRecor
67
67
  /**
68
68
  * Maps a Zoho CRM server error to the appropriate typed {@link ZohoCrmRecordCrudError} subclass based on the error code and affected field.
69
69
  *
70
- * @param error - The server error data containing the error code and field details
71
- * @returns The appropriate typed CRM CRUD error instance
70
+ * @param error - The server error data containing the error code and field details.
71
+ * @returns The appropriate typed CRM CRUD error instance.
72
72
  */
73
73
  export declare function zohoCrmRecordCrudError(error: ZohoServerErrorDataWithDetails): ZohoCrmRecordCrudError;
74
74
  /**
75
75
  * Returns an assertion function that throws {@link ZohoCrmRecordNoContentError} when a data array result is empty or null, typically indicating a missing record.
76
76
  *
77
- * @param moduleName - Optional CRM module name for the error context
78
- * @param recordId - Optional record ID for the error context
79
- * @returns Assertion function that throws if the data array is empty
77
+ * @param moduleName - Optional CRM module name for the error context.
78
+ * @param recordId - Optional record ID for the error context.
79
+ * @returns Assertion function that throws if the data array is empty.
80
80
  */
81
81
  export declare function assertZohoCrmRecordDataArrayResultHasContent<T>(moduleName?: ZohoCrmModuleName, recordId?: ZohoCrmRecordId): <R extends ZohoDataArrayResultRef<T>>(x: R) => R;
82
82
  /**
@@ -86,16 +86,16 @@ export declare const logZohoCrmErrorToConsole: import("..").LogZohoServerErrorFu
86
86
  /**
87
87
  * Parses a fetch response error into a typed Zoho CRM server error by extracting and interpreting the JSON error body.
88
88
  *
89
- * @param responseError - The fetch response error to parse
90
- * @returns The parsed Zoho server error, or undefined if the response could not be parsed
89
+ * @param responseError - The fetch response error to parse.
90
+ * @returns The parsed Zoho server error, or undefined if the response could not be parsed.
91
91
  */
92
92
  export declare function parseZohoCrmError(responseError: FetchResponseError): Promise<ParsedZohoServerError>;
93
93
  /**
94
94
  * Parses a Zoho CRM error response body into a typed error. Delegates to CRM-specific error code handling before falling back to the generic Zoho error parser.
95
95
  *
96
- * @param errorResponseData - The raw error response data from the Zoho CRM API
97
- * @param responseError - The original fetch response error for context
98
- * @returns The parsed Zoho server error, or undefined if the error could not be classified
96
+ * @param errorResponseData - The raw error response data from the Zoho CRM API.
97
+ * @param responseError - The original fetch response error for context.
98
+ * @returns The parsed Zoho server error, or undefined if the error could not be classified.
99
99
  */
100
100
  export declare function parseZohoCrmServerErrorResponseData(errorResponseData: ZohoServerErrorResponseData | ZohoServerErrorResponseDataArrayRef, responseError: FetchResponseError): ParsedZohoServerError;
101
101
  /**
@@ -38,8 +38,8 @@ export type ZohoCrmFactory = (config: ZohoCrmConfig) => ZohoCrm;
38
38
  * Each client handles OAuth token refresh on {@link ZohoInvalidTokenError}, rate limiting,
39
39
  * and Zoho CRM's non-standard error responses (200 status with error body).
40
40
  *
41
- * @param factoryConfig - Configuration providing account credentials and optional overrides
42
- * @returns A factory function that creates authenticated Zoho CRM clients
41
+ * @param factoryConfig - Configuration providing account credentials and optional overrides.
42
+ * @returns A factory function that creates authenticated Zoho CRM clients.
43
43
  *
44
44
  * @example
45
45
  * ```typescript
@@ -54,6 +54,7 @@ export type ZohoCrmFactory = (config: ZohoCrmConfig) => ZohoCrm;
54
54
  * // Use the CRM context for API calls:
55
55
  * const { crmContext } = zohoCrm;
56
56
  * ```
57
+ *
57
58
  * @__NO_SIDE_EFFECTS__
58
59
  */
59
60
  export declare function zohoCrmFactory(factoryConfig: ZohoCrmFactoryConfig): ZohoCrmFactory;