@agnocon/piece-bigin-by-zoho 0.1.6

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 (157) hide show
  1. package/LICENSE.MIT-AP +24 -0
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +72 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/lib/actions/create-call.d.ts +16 -0
  7. package/dist/lib/actions/create-call.d.ts.map +1 -0
  8. package/dist/lib/actions/create-call.js +162 -0
  9. package/dist/lib/actions/create-call.js.map +1 -0
  10. package/dist/lib/actions/create-company.d.ts +14 -0
  11. package/dist/lib/actions/create-company.d.ts.map +1 -0
  12. package/dist/lib/actions/create-company.js +108 -0
  13. package/dist/lib/actions/create-company.js.map +1 -0
  14. package/dist/lib/actions/create-contact.d.ts +18 -0
  15. package/dist/lib/actions/create-contact.d.ts.map +1 -0
  16. package/dist/lib/actions/create-contact.js +130 -0
  17. package/dist/lib/actions/create-contact.js.map +1 -0
  18. package/dist/lib/actions/create-event.d.ts +18 -0
  19. package/dist/lib/actions/create-event.d.ts.map +1 -0
  20. package/dist/lib/actions/create-event.js +360 -0
  21. package/dist/lib/actions/create-event.js.map +1 -0
  22. package/dist/lib/actions/create-pipeline-record.d.ts +16 -0
  23. package/dist/lib/actions/create-pipeline-record.d.ts.map +1 -0
  24. package/dist/lib/actions/create-pipeline-record.js +219 -0
  25. package/dist/lib/actions/create-pipeline-record.js.map +1 -0
  26. package/dist/lib/actions/create-task.d.ts +16 -0
  27. package/dist/lib/actions/create-task.d.ts.map +1 -0
  28. package/dist/lib/actions/create-task.js +380 -0
  29. package/dist/lib/actions/create-task.js.map +1 -0
  30. package/dist/lib/actions/search-company-record.d.ts +5 -0
  31. package/dist/lib/actions/search-company-record.d.ts.map +1 -0
  32. package/dist/lib/actions/search-company-record.js +58 -0
  33. package/dist/lib/actions/search-company-record.js.map +1 -0
  34. package/dist/lib/actions/search-contact-record.d.ts +5 -0
  35. package/dist/lib/actions/search-contact-record.d.ts.map +1 -0
  36. package/dist/lib/actions/search-contact-record.js +82 -0
  37. package/dist/lib/actions/search-contact-record.js.map +1 -0
  38. package/dist/lib/actions/search-pipeline-records.d.ts +5 -0
  39. package/dist/lib/actions/search-pipeline-records.d.ts.map +1 -0
  40. package/dist/lib/actions/search-pipeline-records.js +53 -0
  41. package/dist/lib/actions/search-pipeline-records.js.map +1 -0
  42. package/dist/lib/actions/search-product.d.ts +5 -0
  43. package/dist/lib/actions/search-product.d.ts.map +1 -0
  44. package/dist/lib/actions/search-product.js +60 -0
  45. package/dist/lib/actions/search-product.js.map +1 -0
  46. package/dist/lib/actions/search-user.d.ts +7 -0
  47. package/dist/lib/actions/search-user.d.ts.map +1 -0
  48. package/dist/lib/actions/search-user.js +75 -0
  49. package/dist/lib/actions/search-user.js.map +1 -0
  50. package/dist/lib/actions/update-company.d.ts +7 -0
  51. package/dist/lib/actions/update-company.d.ts.map +1 -0
  52. package/dist/lib/actions/update-company.js +224 -0
  53. package/dist/lib/actions/update-company.js.map +1 -0
  54. package/dist/lib/actions/update-contact.d.ts +7 -0
  55. package/dist/lib/actions/update-contact.d.ts.map +1 -0
  56. package/dist/lib/actions/update-contact.js +248 -0
  57. package/dist/lib/actions/update-contact.js.map +1 -0
  58. package/dist/lib/actions/update-event.d.ts +13 -0
  59. package/dist/lib/actions/update-event.d.ts.map +1 -0
  60. package/dist/lib/actions/update-event.js +466 -0
  61. package/dist/lib/actions/update-event.js.map +1 -0
  62. package/dist/lib/actions/update-pipeline-record.d.ts +14 -0
  63. package/dist/lib/actions/update-pipeline-record.d.ts.map +1 -0
  64. package/dist/lib/actions/update-pipeline-record.js +205 -0
  65. package/dist/lib/actions/update-pipeline-record.js.map +1 -0
  66. package/dist/lib/actions/update-task.d.ts +13 -0
  67. package/dist/lib/actions/update-task.d.ts.map +1 -0
  68. package/dist/lib/actions/update-task.js +449 -0
  69. package/dist/lib/actions/update-task.js.map +1 -0
  70. package/dist/lib/auth.d.ts +2 -0
  71. package/dist/lib/auth.d.ts.map +1 -0
  72. package/dist/lib/auth.js +59 -0
  73. package/dist/lib/auth.js.map +1 -0
  74. package/dist/lib/common/constants.d.ts +23 -0
  75. package/dist/lib/common/constants.d.ts.map +1 -0
  76. package/dist/lib/common/constants.js +72 -0
  77. package/dist/lib/common/constants.js.map +1 -0
  78. package/dist/lib/common/helpers.d.ts +11 -0
  79. package/dist/lib/common/helpers.d.ts.map +1 -0
  80. package/dist/lib/common/helpers.js +40 -0
  81. package/dist/lib/common/helpers.js.map +1 -0
  82. package/dist/lib/common/props.d.ts +10 -0
  83. package/dist/lib/common/props.d.ts.map +1 -0
  84. package/dist/lib/common/props.js +217 -0
  85. package/dist/lib/common/props.js.map +1 -0
  86. package/dist/lib/common/request.d.ts +35 -0
  87. package/dist/lib/common/request.d.ts.map +1 -0
  88. package/dist/lib/common/request.js +226 -0
  89. package/dist/lib/common/request.js.map +1 -0
  90. package/dist/lib/triggers/company-updated.d.ts +3 -0
  91. package/dist/lib/triggers/company-updated.d.ts.map +1 -0
  92. package/dist/lib/triggers/company-updated.js +66 -0
  93. package/dist/lib/triggers/company-updated.js.map +1 -0
  94. package/dist/lib/triggers/contact-updated.d.ts +3 -0
  95. package/dist/lib/triggers/contact-updated.d.ts.map +1 -0
  96. package/dist/lib/triggers/contact-updated.js +66 -0
  97. package/dist/lib/triggers/contact-updated.js.map +1 -0
  98. package/dist/lib/triggers/new-call-created.d.ts +3 -0
  99. package/dist/lib/triggers/new-call-created.d.ts.map +1 -0
  100. package/dist/lib/triggers/new-call-created.js +66 -0
  101. package/dist/lib/triggers/new-call-created.js.map +1 -0
  102. package/dist/lib/triggers/new-company-created.d.ts +3 -0
  103. package/dist/lib/triggers/new-company-created.d.ts.map +1 -0
  104. package/dist/lib/triggers/new-company-created.js +66 -0
  105. package/dist/lib/triggers/new-company-created.js.map +1 -0
  106. package/dist/lib/triggers/new-contact-created.d.ts +3 -0
  107. package/dist/lib/triggers/new-contact-created.d.ts.map +1 -0
  108. package/dist/lib/triggers/new-contact-created.js +75 -0
  109. package/dist/lib/triggers/new-contact-created.js.map +1 -0
  110. package/dist/lib/triggers/new-event-created.d.ts +3 -0
  111. package/dist/lib/triggers/new-event-created.d.ts.map +1 -0
  112. package/dist/lib/triggers/new-event-created.js +66 -0
  113. package/dist/lib/triggers/new-event-created.js.map +1 -0
  114. package/dist/lib/triggers/new-pipeline-record.d.ts +3 -0
  115. package/dist/lib/triggers/new-pipeline-record.d.ts.map +1 -0
  116. package/dist/lib/triggers/new-pipeline-record.js +66 -0
  117. package/dist/lib/triggers/new-pipeline-record.js.map +1 -0
  118. package/dist/lib/triggers/new-task-created.d.ts +3 -0
  119. package/dist/lib/triggers/new-task-created.d.ts.map +1 -0
  120. package/dist/lib/triggers/new-task-created.js +66 -0
  121. package/dist/lib/triggers/new-task-created.js.map +1 -0
  122. package/dist/lib/triggers/pipeline-record-updated.d.ts +3 -0
  123. package/dist/lib/triggers/pipeline-record-updated.d.ts.map +1 -0
  124. package/dist/lib/triggers/pipeline-record-updated.js +66 -0
  125. package/dist/lib/triggers/pipeline-record-updated.js.map +1 -0
  126. package/package.json +46 -0
  127. package/src/index.ts +72 -0
  128. package/src/lib/actions/create-call.ts +168 -0
  129. package/src/lib/actions/create-company.ts +124 -0
  130. package/src/lib/actions/create-contact.ts +151 -0
  131. package/src/lib/actions/create-event.ts +399 -0
  132. package/src/lib/actions/create-pipeline-record.ts +255 -0
  133. package/src/lib/actions/create-task.ts +426 -0
  134. package/src/lib/actions/search-company-record.ts +57 -0
  135. package/src/lib/actions/search-contact-record.ts +79 -0
  136. package/src/lib/actions/search-pipeline-records.ts +52 -0
  137. package/src/lib/actions/search-product.ts +60 -0
  138. package/src/lib/actions/search-user.ts +70 -0
  139. package/src/lib/actions/update-company.ts +235 -0
  140. package/src/lib/actions/update-contact.ts +261 -0
  141. package/src/lib/actions/update-event.ts +528 -0
  142. package/src/lib/actions/update-pipeline-record.ts +235 -0
  143. package/src/lib/actions/update-task.ts +499 -0
  144. package/src/lib/auth.ts +57 -0
  145. package/src/lib/common/constants.ts +68 -0
  146. package/src/lib/common/helpers.ts +46 -0
  147. package/src/lib/common/props.ts +270 -0
  148. package/src/lib/common/request.ts +285 -0
  149. package/src/lib/triggers/company-updated.ts +69 -0
  150. package/src/lib/triggers/contact-updated.ts +65 -0
  151. package/src/lib/triggers/new-call-created.ts +69 -0
  152. package/src/lib/triggers/new-company-created.ts +69 -0
  153. package/src/lib/triggers/new-contact-created.ts +75 -0
  154. package/src/lib/triggers/new-event-created.ts +69 -0
  155. package/src/lib/triggers/new-pipeline-record.ts +69 -0
  156. package/src/lib/triggers/new-task-created.ts +69 -0
  157. package/src/lib/triggers/pipeline-record-updated.ts +69 -0
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchPipelineRecord = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/bigin-by-zoho/src/lib/actions/search-pipeline-records.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const auth_1 = require("../auth");
8
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
9
+ const request_1 = require("../common/request");
10
+ exports.searchPipelineRecord = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.biginAuth,
12
+ name: 'searchPipelineRecord',
13
+ displayName: 'Search Pipeline Record',
14
+ description: 'Searches deals by name via criteria or word',
15
+ audience: 'both',
16
+ aiMetadata: { description: 'Searches pipeline records (deals) in Bigin CRM and returns matches. Choose between Criteria mode (matches the Deal Name with equals or starts-with) and Word mode (a free-text word search across the module). Use to find a deal by name before referencing or updating it. Idempotent: read-only, repeating the search returns the same matches.', idempotent: true },
17
+ props: {
18
+ mode: pieces_framework_1.Property.StaticDropdown({
19
+ displayName: 'Search Mode',
20
+ required: true,
21
+ defaultValue: 'criteria',
22
+ options: {
23
+ options: [
24
+ { label: 'Criteria (Deal Name)', value: 'criteria' },
25
+ { label: 'Word', value: 'word' },
26
+ ],
27
+ },
28
+ }),
29
+ dealName: pieces_framework_1.Property.ShortText({
30
+ displayName: 'Search Term',
31
+ description: 'Deal Name (criteria) or word',
32
+ required: true,
33
+ }),
34
+ },
35
+ run(_a) {
36
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
37
+ const { dealName, mode } = propsValue;
38
+ const { access_token, data } = auth;
39
+ const api_domain = data['api_domain'];
40
+ try {
41
+ const response = yield request_1.biginApiService.searchRecords(access_token, api_domain, 'Pipelines', mode === 'word' ? { key: 'word', value: dealName } : { key: 'criteria', value: `(Deal_Name:equals:${dealName})OR(Deal_Name:starts_with:${dealName})` });
42
+ return {
43
+ message: 'Pipeline record search completed successfully',
44
+ data: response.data,
45
+ };
46
+ }
47
+ catch (error) {
48
+ throw new Error(`Error searching pipeline record: ${error.message}`);
49
+ }
50
+ });
51
+ },
52
+ });
53
+ //# sourceMappingURL=search-pipeline-records.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-pipeline-records.js","sourceRoot":"","sources":["../../../src/lib/actions/search-pipeline-records.ts"],"names":[],"mappings":";;;;AAAA,uHAAuH;AACvH,qEAAqE;AACrE,kCAAoC;AACpC,gEAAmE;AACnE,+CAAoD;AAEvC,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,gBAAS;IACf,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,wBAAwB;IACrC,WAAW,EAAE,6CAA6C;IAC1D,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,oVAAoV,EAAE,UAAU,EAAE,IAAI,EAAE;IACnY,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC5B,WAAW,EAAE,aAAa;YAC1B,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,UAAU;YACxB,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,sBAAsB,EAAE,KAAK,EAAE,UAAU,EAAE;oBACpD,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;iBACjC;aACF;SACF,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,8BAA8B;YAC3C,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC;YAEtC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;YACpC,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC;YAEtC,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,yBAAe,CAAC,aAAa,CAClD,YAAY,EACZ,UAAU,EACV,WAAW,EACX,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,qBAAqB,QAAQ,6BAA6B,QAAQ,GAAG,EAAE,CACvJ,CAAC;gBAEF,OAAO;oBACL,OAAO,EAAE,+CAA+C;oBACxD,IAAI,EAAE,QAAQ,CAAC,IAAI;iBACpB,CAAC;YACJ,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,MAAM,IAAI,KAAK,CAAC,oCAAoC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACvE,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const searchProductRecord: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {
2
+ mode: import("@agnocon/pieces-framework").StaticDropdownProperty<string, true>;
3
+ searchTerm: import("@agnocon/pieces-framework").ShortTextProperty<true>;
4
+ }>;
5
+ //# sourceMappingURL=search-product.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-product.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/search-product.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,mBAAmB;;;EAuD9B,CAAC"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchProductRecord = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/bigin-by-zoho/src/lib/actions/search-product.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const auth_1 = require("../auth");
8
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
9
+ const request_1 = require("../common/request");
10
+ exports.searchProductRecord = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.biginAuth,
12
+ name: 'searchProductRecord',
13
+ displayName: 'Search Product Record',
14
+ description: 'Searches products by name/code via criteria or word',
15
+ audience: 'both',
16
+ aiMetadata: { description: 'Searches product records in Bigin CRM and returns matches. Choose between Criteria mode (matches Product Name or Product Code with equals or starts-with) and Word mode (a free-text word search across the module). Use to find a product by name or code before associating it with a deal. Idempotent: read-only, repeating the search returns the same matches.', idempotent: true },
17
+ props: {
18
+ mode: pieces_framework_1.Property.StaticDropdown({
19
+ displayName: 'Search Mode',
20
+ required: true,
21
+ defaultValue: 'criteria',
22
+ options: {
23
+ options: [
24
+ { label: 'Criteria (name/code)', value: 'criteria' },
25
+ { label: 'Word', value: 'word' },
26
+ ],
27
+ },
28
+ }),
29
+ searchTerm: pieces_framework_1.Property.ShortText({
30
+ displayName: 'Search Term',
31
+ description: 'Product name/code (criteria) or word',
32
+ required: true,
33
+ }),
34
+ },
35
+ run(_a) {
36
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
37
+ const { searchTerm, mode } = propsValue;
38
+ const { access_token, data } = auth;
39
+ const api_domain = data['api_domain'];
40
+ const criteriaValue = ['Product_Name', 'Product_Code']
41
+ .flatMap((key) => [
42
+ `${key}:equals:${searchTerm}`,
43
+ `${key}:starts_with:${searchTerm}`,
44
+ ])
45
+ .map((condition) => `(${condition})`)
46
+ .join('OR');
47
+ try {
48
+ const response = yield request_1.biginApiService.searchRecords(access_token, api_domain, 'Products', mode === 'word' ? { key: 'word', value: searchTerm } : { key: 'criteria', value: criteriaValue });
49
+ return {
50
+ message: 'Product record search completed successfully',
51
+ data: response.data,
52
+ };
53
+ }
54
+ catch (error) {
55
+ throw new Error(`Error searching product record: ${error.message}`);
56
+ }
57
+ });
58
+ },
59
+ });
60
+ //# sourceMappingURL=search-product.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-product.js","sourceRoot":"","sources":["../../../src/lib/actions/search-product.ts"],"names":[],"mappings":";;;;AAAA,8GAA8G;AAC9G,qEAAqE;AACrE,kCAAoC;AACpC,gEAAmE;AACnE,+CAAoD;AAEvC,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,gBAAS;IACf,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,uBAAuB;IACpC,WAAW,EAAE,qDAAqD;IAClE,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,qWAAqW,EAAE,UAAU,EAAE,IAAI,EAAE;IACpZ,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC5B,WAAW,EAAE,aAAa;YAC1B,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,UAAU;YACxB,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,sBAAsB,EAAE,KAAK,EAAE,UAAU,EAAE;oBACpD,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;iBACjC;a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,7 @@
1
+ export declare const searchUser: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {
2
+ email: import("@agnocon/pieces-framework").ShortTextProperty<true>;
3
+ type: import("@agnocon/pieces-framework").StaticDropdownProperty<string, false>;
4
+ page: import("@agnocon/pieces-framework").NumberProperty<false>;
5
+ per_page: import("@agnocon/pieces-framework").NumberProperty<false>;
6
+ }>;
7
+ //# sourceMappingURL=search-user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-user.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/search-user.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU;;;;;EA+DrB,CAAC"}
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchUser = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/bigin-by-zoho/src/lib/actions/search-user.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const auth_1 = require("../auth");
8
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
9
+ const request_1 = require("../common/request");
10
+ exports.searchUser = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.biginAuth,
12
+ name: 'searchUser',
13
+ displayName: 'Search User',
14
+ description: 'Locate users by email.',
15
+ audience: 'both',
16
+ aiMetadata: { description: 'Finds Bigin CRM org users whose email contains the given term (case-insensitive substring match), filtering client-side over the user list; an optional user-type filter (e.g. active, admin, current user) and pagination narrow the fetched set. Use to resolve a user id for assigning records as owner. Idempotent: read-only, repeating the search returns the same matches.', idempotent: true },
17
+ props: {
18
+ email: pieces_framework_1.Property.ShortText({
19
+ displayName: 'Email',
20
+ description: 'User email address (full or partial, case-insensitive match)',
21
+ required: true,
22
+ }),
23
+ type: pieces_framework_1.Property.StaticDropdown({
24
+ displayName: 'User Type (optional)',
25
+ required: false,
26
+ options: {
27
+ options: [
28
+ { label: 'All Users', value: 'AllUsers' },
29
+ { label: 'Active Users', value: 'ActiveUsers' },
30
+ { label: 'Deactive Users', value: 'DeactiveUsers' },
31
+ { label: 'Confirmed Users', value: 'ConfirmedUsers' },
32
+ { label: 'Not Confirmed Users', value: 'NotConfirmedUsers' },
33
+ { label: 'Deleted Users', value: 'DeletedUsers' },
34
+ { label: 'Active Confirmed Users', value: 'ActiveConfirmedUsers' },
35
+ { label: 'Admin Users', value: 'AdminUsers' },
36
+ { label: 'Active Confirmed Admins', value: 'ActiveConfirmedAdmins' },
37
+ { label: 'Current User', value: 'CurrentUser' },
38
+ ],
39
+ },
40
+ }),
41
+ page: pieces_framework_1.Property.Number({
42
+ displayName: 'Page',
43
+ required: false,
44
+ description: 'Page index (default 1)',
45
+ }),
46
+ per_page: pieces_framework_1.Property.Number({
47
+ displayName: 'Per Page',
48
+ required: false,
49
+ description: 'Records per page (max 200, default 200)',
50
+ }),
51
+ },
52
+ run(_a) {
53
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
54
+ const { access_token, data } = auth;
55
+ const api_domain = data['api_domain'];
56
+ const emailTerm = String(propsValue.email || '').toLowerCase();
57
+ const params = {};
58
+ if (propsValue.type)
59
+ params.type = propsValue.type;
60
+ if (propsValue.page)
61
+ params.page = Number(propsValue.page);
62
+ if (propsValue.per_page)
63
+ params.per_page = Number(propsValue.per_page);
64
+ const resp = yield request_1.biginApiService.fetchUsers(access_token, api_domain, params);
65
+ const users = Array.isArray(resp.users) ? resp.users : [];
66
+ const filtered = users.filter((u) => String(u.email || '').toLowerCase().includes(emailTerm));
67
+ return {
68
+ message: 'User search completed successfully',
69
+ count: filtered.length,
70
+ data: filtered,
71
+ };
72
+ });
73
+ },
74
+ });
75
+ //# sourceMappingURL=search-user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-user.js","sourceRoot":"","sources":["../../../src/lib/actions/search-user.ts"],"names":[],"mappings":";;;;AAAA,2GAA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EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;YAEnG,OAAO;gBACL,OAAO,EAAE,oCAAoC;gBAC7C,KAAK,EAAE,QAAQ,CAAC,MAAM;gBACtB,IAAI,EAAE,QAAQ;aACf,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const updateCompany: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {
2
+ companyId: import("@agnocon/pieces-framework").DropdownProperty<any, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
3
+ owner: import("@agnocon/pieces-framework").DropdownProperty<unknown, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
4
+ companyDetails: import("@agnocon/pieces-framework").DynamicProperties<true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
5
+ tag: import("@agnocon/pieces-framework").MultiSelectDropdownProperty<unknown, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
6
+ }>;
7
+ //# sourceMappingURL=update-company.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-company.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/update-company.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,aAAa;;;;;EAgOxB,CAAC"}
@@ -0,0 +1,224 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateCompany = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/bigin-by-zoho/src/lib/actions/update-company.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const auth_1 = require("../auth");
8
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
9
+ const props_1 = require("../common/props");
10
+ const request_1 = require("../common/request");
11
+ const helpers_1 = require("../common/helpers");
12
+ exports.updateCompany = (0, pieces_framework_1.createAction)({
13
+ auth: auth_1.biginAuth,
14
+ name: 'updateCompany',
15
+ displayName: 'Update Company',
16
+ description: 'Updates an existing Company and prepopulates its fields for editing.',
17
+ audience: 'both',
18
+ aiMetadata: { description: 'Updates an existing company (account) record in Bigin CRM, identified by selecting the company; its current fields are prepopulated and any you set are overwritten (owner, tags, billing address, and module-defined fields). Use to modify an organization that already exists. Idempotent: re-sending the same field values leaves the record in the same state.', idempotent: true },
19
+ props: {
20
+ companyId: pieces_framework_1.Property.Dropdown({
21
+ auth: auth_1.biginAuth,
22
+ displayName: 'Select Company',
23
+ description: 'Choose a company to update',
24
+ required: true,
25
+ refreshers: ['auth'],
26
+ options: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
27
+ if (!context.auth)
28
+ return (0, helpers_1.handleDropdownError)('Please connect your account first');
29
+ const response = yield request_1.biginApiService.fetchCompanies(context.auth.access_token, context.auth.data['api_domain']);
30
+ return {
31
+ options: response.data.map((company) => ({
32
+ label: company.Account_Name,
33
+ value: JSON.stringify(company),
34
+ })),
35
+ };
36
+ }),
37
+ }),
38
+ owner: props_1.usersDropdown,
39
+ companyDetails: pieces_framework_1.Property.DynamicProperties({
40
+ auth: auth_1.biginAuth,
41
+ displayName: 'Company Details',
42
+ description: 'These fields will be prepopulated with company data',
43
+ refreshers: ['companyId', 'auth'],
44
+ required: true,
45
+ props: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ companyId, auth }) {
46
+ var _b, _c, _d;
47
+ if (!companyId)
48
+ return {};
49
+ const company = JSON.parse(companyId);
50
+ const { access_token, data } = auth;
51
+ const api_domain = data['api_domain'];
52
+ const [fieldsResp, usersResp] = yield Promise.all([
53
+ request_1.biginApiService.fetchModuleFields(access_token, api_domain, 'Accounts'),
54
+ request_1.biginApiService.fetchUsers(access_token, api_domain),
55
+ ]);
56
+ const usersOptions = (usersResp.users || []).map((u) => {
57
+ var _a, _b;
58
+ return ({
59
+ label: `${(_a = u.first_name) !== null && _a !== void 0 ? _a : ''} ${(_b = u.last_name) !== null && _b !== void 0 ? _b : ''}`.trim(),
60
+ value: u.id,
61
+ });
62
+ });
63
+ const props = {};
64
+ const fields = (fieldsResp.fields || []);
65
+ for (const f of fields) {
66
+ const apiName = f.api_name;
67
+ if (f.read_only || f.field_read_only)
68
+ continue;
69
+ if (!f.view_type || f.view_type.edit !== true)
70
+ continue;
71
+ if (apiName === 'Tag' || apiName === 'id')
72
+ continue;
73
+ let defaultValue = (_b = company[apiName]) !== null && _b !== void 0 ? _b : undefined;
74
+ if (apiName === 'Owner')
75
+ defaultValue = (_c = company.Owner) === null || _c === void 0 ? void 0 : _c.id;
76
+ switch ((_d = f.data_type) === null || _d === void 0 ? void 0 : _d.toLowerCase()) {
77
+ case 'picklist': {
78
+ const options = (f.pick_list_values || []).map((pl) => ({
79
+ label: pl.display_value,
80
+ value: pl.actual_value,
81
+ }));
82
+ props[apiName] = pieces_framework_1.Property.StaticDropdown({
83
+ displayName: f.display_label || f.field_label || apiName,
84
+ description: f.tooltip || undefined,
85
+ required: false,
86
+ defaultValue,
87
+ options: { options },
88
+ });
89
+ break;
90
+ }
91
+ case 'multiselectpicklist': {
92
+ const options = (f.pick_list_values || []).map((pl) => ({
93
+ label: pl.display_value,
94
+ value: pl.actual_value,
95
+ }));
96
+ props[apiName] = pieces_framework_1.Property.StaticMultiSelectDropdown({
97
+ displayName: f.display_label || f.field_label || apiName,
98
+ description: f.tooltip || undefined,
99
+ required: false,
100
+ defaultValue,
101
+ options: { options },
102
+ });
103
+ break;
104
+ }
105
+ case 'boolean': {
106
+ props[apiName] = pieces_framework_1.Property.Checkbox({
107
+ displayName: f.display_label || f.field_label || apiName,
108
+ description: f.tooltip || undefined,
109
+ required: false,
110
+ defaultValue: Boolean(defaultValue),
111
+ });
112
+ break;
113
+ }
114
+ case 'date': {
115
+ props[apiName] = pieces_framework_1.Property.ShortText({
116
+ displayName: f.display_label || f.field_label || apiName,
117
+ description: f.tooltip || undefined,
118
+ required: false,
119
+ defaultValue,
120
+ });
121
+ break;
122
+ }
123
+ case 'datetime': {
124
+ props[apiName] = pieces_framework_1.Property.DateTime({
125
+ displayName: f.display_label || f.field_label || apiName,
126
+ description: f.tooltip || undefined,
127
+ required: false,
128
+ defaultValue,
129
+ });
130
+ break;
131
+ }
132
+ case 'integer':
133
+ case 'long':
134
+ case 'double':
135
+ case 'decimal':
136
+ case 'currency':
137
+ case 'percent': {
138
+ props[apiName] = pieces_framework_1.Property.Number({
139
+ displayName: f.display_label || f.field_label || apiName,
140
+ description: f.tooltip || undefined,
141
+ required: false,
142
+ defaultValue,
143
+ });
144
+ break;
145
+ }
146
+ default: {
147
+ if (apiName === 'Owner') {
148
+ props[apiName] = pieces_framework_1.Property.StaticDropdown({
149
+ displayName: 'Owner',
150
+ description: f.tooltip || undefined,
151
+ required: false,
152
+ defaultValue,
153
+ options: { options: usersOptions },
154
+ });
155
+ break;
156
+ }
157
+ if (apiName === 'Description') {
158
+ props[apiName] = pieces_framework_1.Property.LongText({
159
+ displayName: 'Description',
160
+ description: f.tooltip || undefined,
161
+ required: false,
162
+ defaultValue,
163
+ });
164
+ break;
165
+ }
166
+ props[apiName] = pieces_framework_1.Property.ShortText({
167
+ displayName: f.display_label || f.field_label || apiName,
168
+ description: f.tooltip || undefined,
169
+ required: false,
170
+ defaultValue: typeof defaultValue === 'string' ? defaultValue : undefined,
171
+ });
172
+ }
173
+ }
174
+ }
175
+ return props;
176
+ }),
177
+ }),
178
+ tag: (0, props_1.tagsDropdown)('Accounts'),
179
+ },
180
+ run(context) {
181
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
182
+ try {
183
+ const company = JSON.parse(context.propsValue.companyId);
184
+ const companyId = company.id;
185
+ const updates = context.propsValue.companyDetails;
186
+ const body = { id: companyId };
187
+ for (const [apiName, value] of Object.entries(updates || {})) {
188
+ if (value === undefined ||
189
+ value === null ||
190
+ (typeof value === 'string' && value.trim() === '')) {
191
+ continue;
192
+ }
193
+ if (apiName === 'Owner') {
194
+ body['Owner'] = { id: value };
195
+ }
196
+ else if (apiName === 'Tag') {
197
+ body['Tag'] = value.map((t) => ({ name: t }));
198
+ }
199
+ else {
200
+ body[apiName] = value;
201
+ }
202
+ }
203
+ if (context.propsValue.owner) {
204
+ body['Owner'] = { id: context.propsValue.owner };
205
+ }
206
+ if (context.propsValue.tag &&
207
+ Array.isArray(context.propsValue.tag) &&
208
+ context.propsValue.tag.length > 0) {
209
+ body['Tag'] = context.propsValue.tag.map((t) => ({ name: t }));
210
+ }
211
+ const response = yield request_1.biginApiService.updateCompany(context.auth.access_token, context.auth.api_domain, { data: [body] });
212
+ return {
213
+ message: 'Company updated successfully',
214
+ data: response.data[0],
215
+ };
216
+ }
217
+ catch (error) {
218
+ console.error('Error updating company:', error);
219
+ throw new Error(error);
220
+ }
221
+ });
222
+ },
223
+ });
224
+ //# sourceMappingURL=update-company.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-company.js","sourceRoot":"","sources":["../../../src/lib/actions/update-company.ts"],"names":[],"mappings":";;;;AAAA,8GAA8G;AAC9G,qEAAqE;AACrE,kCAAoC;AACpC,gEAImC;AACnC,2CAA8D;AAC9D,+CAAoD;AACpD,+CAAwD;AAE3C,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,gBAAS;IACf,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EACT,sEAAsE;IACxE,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,qWAAqW,EAAE,UAAU,EAAE,IAAI,EAAE;IACpZ,KAAK,EAAE;QACL,SAAS,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC3B,IAAI,EAAE,gBAAS;YACf,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,4BAA4B;YACzC,QAAQ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,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;gBACtE,CAAC;gBAED,MAAM,QAAQ,GAAG,MAAM,yBAAe,CAAC,aAAa,CAClD,OAAO,CAAC,IAAI,CAAC,YAAY,EACxB,OAAO,CAAC,IAAY,CAAC,UAAU,EAChC,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,CACjB,CAAC;gBAEF,OAAO;oBACL,OAAO,EAAE,8BAA8B;oBACvC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;iBACvB,CAAC;YACJ,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;gBAChD,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const updateContact: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {
2
+ contactId: import("@agnocon/pieces-framework").DropdownProperty<any, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
3
+ contactDetails: import("@agnocon/pieces-framework").DynamicProperties<true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
4
+ accountName: import("@agnocon/pieces-framework").DropdownProperty<unknown, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
5
+ tag: import("@agnocon/pieces-framework").MultiSelectDropdownProperty<unknown, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
6
+ }>;
7
+ //# sourceMappingURL=update-contact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-contact.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/update-contact.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,aAAa;;;;;EAyPxB,CAAC"}