zcatalyst-cli 1.18.0-beta.1 → 1.18.0-beta.11

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 (138) hide show
  1. package/docs/command_needs/rc.toml +8 -8
  2. package/docs/commands/ds/import.toml +5 -5
  3. package/docs/commands/zest/generate/index.toml +4 -0
  4. package/docs/serve/server/lib/appsail/index.toml +22 -1
  5. package/lib/authentication/login.js +8 -4
  6. package/lib/code-deck.js +7 -7
  7. package/lib/command_needs/rc.js +7 -7
  8. package/lib/commands/appsail/add.js +2 -2
  9. package/lib/commands/client/setup.js +1 -1
  10. package/lib/commands/codelib/install.js +6 -2
  11. package/lib/commands/ds/import.js +37 -21
  12. package/lib/commands/event/generate/index.js +14 -2
  13. package/lib/commands/functions/add.js +1 -1
  14. package/lib/commands/functions/setup.js +1 -1
  15. package/lib/commands/iac/export.js +5 -1
  16. package/lib/commands/iac/import.js +4 -1
  17. package/lib/commands/index.js +1 -0
  18. package/lib/commands/init.js +8 -1
  19. package/lib/commands/zest/generate/index.js +304 -0
  20. package/lib/deploy/features/appsail/index.js +25 -10
  21. package/lib/endpoints/index.js +17 -3
  22. package/lib/endpoints/lib/ds-bulk.js +1 -0
  23. package/lib/endpoints/lib/stratus.js +63 -0
  24. package/lib/endpoints/lib/tunnel.js +18 -0
  25. package/lib/endpoints/lib/zest.js +124 -0
  26. package/lib/event_generate/stratus.js +52 -0
  27. package/lib/fn-utils/lib/common.js +6 -1
  28. package/lib/iac/status/deploy.js +1 -5
  29. package/lib/init/features/appsail/index.js +34 -27
  30. package/lib/init/features/project.js +6 -15
  31. package/lib/internal/api.js +14 -6
  32. package/lib/internal/command.js +1 -1
  33. package/lib/prompt/index.js +5 -2
  34. package/lib/prompt/types/file-path.js +1 -1
  35. package/lib/prompt/types/search-box.js +281 -0
  36. package/lib/serve/features/appsail.js +1 -1
  37. package/lib/serve/server/index.js +44 -14
  38. package/lib/serve/server/lib/appsail/index.js +73 -13
  39. package/lib/serve/server/lib/appsail/start.js +9 -1
  40. package/lib/serve/server/lib/java/aio_server/lib/catalyst-cli-java-runtime-1.0.0.jar +0 -0
  41. package/lib/serve/server/lib/java/aio_server/lib/{catalyst-function-sdk-1.0.0.jar → catalyst-function-sdk-1.1.0.jar} +0 -0
  42. package/lib/serve/server/lib/java/aio_server/lib/catalyst-java-runtime-1.0.0.jar +0 -0
  43. package/lib/serve/server/lib/java/index.js +1 -1
  44. package/lib/serve/server/lib/master/appsail.js +3 -3
  45. package/lib/serve/server/lib/master/unknown-req-proxy.js +5 -2
  46. package/lib/serve/server/lib/master/utils.js +27 -15
  47. package/lib/serve/server/lib/node/index.js +1 -1
  48. package/lib/serve/server/lib/node/server/package-lock.json +12 -0
  49. package/lib/serve/server/lib/python/index.js +1 -1
  50. package/lib/shell/dependencies/http-functions.js +1 -1
  51. package/lib/shell/dependencies/invoker/bio/java/lib/{catalyst-function-sdk-1.0.0.jar → catalyst-function-sdk-1.1.0.jar} +0 -0
  52. package/lib/shell/dependencies/invoker/cron/java/JavacronInvoker.java +1 -1
  53. package/lib/shell/dependencies/invoker/cron/java/lib/{catalyst-function-sdk-1.0.0.jar → catalyst-function-sdk-1.1.0.jar} +0 -0
  54. package/lib/shell/dependencies/invoker/event/java/lib/{catalyst-function-sdk-1.0.0.jar → catalyst-function-sdk-1.1.0.jar} +0 -0
  55. package/lib/shell/dependencies/invoker/integ/java/JavaintegInvoker.java +15 -0
  56. package/lib/shell/dependencies/invoker/integ/java/lib/catalyst-function-sdk-1.1.0.jar +0 -0
  57. package/lib/shell/dependencies/invoker/integ/node.mjs +13 -0
  58. package/lib/shell/dependencies/invoker/job/java/JavajobInvoker.java +15 -1
  59. package/lib/shell/dependencies/invoker/job/java/lib/catalyst-function-sdk-1.1.0.jar +0 -0
  60. package/lib/shell/dependencies/local-function.js +24 -23
  61. package/lib/shell/dependencies/tunnel-server.js +52 -23
  62. package/lib/shell/index.js +22 -28
  63. package/lib/util_modules/config/lib/appsail.js +10 -8
  64. package/lib/util_modules/constants/lib/cliq-handlers.js +18 -10
  65. package/lib/util_modules/constants/lib/dc-type.js +8 -0
  66. package/lib/util_modules/constants/lib/event-action.js +1 -0
  67. package/lib/util_modules/constants/lib/event-source.js +1 -0
  68. package/lib/util_modules/constants/lib/placeholders.js +2 -1
  69. package/lib/util_modules/constants/lib/scopes.js +14 -3
  70. package/lib/util_modules/constants/lib/urls.js +8 -0
  71. package/lib/util_modules/fs/lib/async.js +7 -2
  72. package/package.json +4 -2
  73. package/templates/event/integ/cliq/bot/action_handler.json +13 -4
  74. package/templates/event/integ/cliq/bot/call_handler.json +41 -0
  75. package/templates/event/integ/cliq/bot/context_handler.json +11 -3
  76. package/templates/event/integ/cliq/bot/incomingwebhook_handler.json +11 -3
  77. package/templates/event/integ/cliq/bot/mention_handler.json +12 -4
  78. package/templates/event/integ/cliq/bot/message_handler.json +13 -4
  79. package/templates/event/integ/cliq/bot/participation_handler.json +13 -3
  80. package/templates/event/integ/cliq/bot/welcome_handler.json +12 -8
  81. package/templates/event/integ/cliq/command/execution_handler.json +12 -3
  82. package/templates/event/integ/cliq/command/suggestion_handler.json +18 -4
  83. package/templates/event/integ/cliq/{installation → extension}/installation_handler.json +13 -4
  84. package/templates/event/integ/cliq/{installation → extension}/installation_validator.json +13 -5
  85. package/templates/event/integ/cliq/extension/uninstallation_handler.json +37 -0
  86. package/templates/event/integ/cliq/function/button_handler.json +13 -5
  87. package/templates/event/integ/cliq/function/form_change_handler.json +9 -3
  88. package/templates/event/integ/cliq/function/form_handler.json +11 -3
  89. package/templates/event/integ/cliq/function/form_values_handler.json +9 -3
  90. package/templates/event/integ/cliq/function/form_view_handler.json +26 -0
  91. package/templates/event/integ/cliq/function/widget_button_handler.json +14 -5
  92. package/templates/event/integ/cliq/link_preview/action_handler.json +54 -0
  93. package/templates/event/integ/cliq/link_preview/after_send_handler.json +47 -0
  94. package/templates/event/integ/cliq/link_preview/menu_handler.json +47 -0
  95. package/templates/event/integ/cliq/link_preview/preview_handler.json +47 -0
  96. package/templates/event/integ/cliq/messageaction/execution_handler.json +11 -3
  97. package/templates/event/integ/cliq/widget/view_handler.json +12 -4
  98. package/templates/init/client/react/react_js/template/src/index.js +3 -3
  99. package/templates/init/client/react/react_ts/template/src/index.tsx +3 -3
  100. package/templates/init/client/react/react_ts/template.json +3 -3
  101. package/templates/init/functions/java/integ/cliq/com/handlers/BotHandler.java +29 -23
  102. package/templates/init/functions/java/integ/cliq/com/handlers/CommandHandler.java +14 -17
  103. package/templates/init/functions/java/integ/cliq/com/handlers/ExtensionHandler.java +41 -0
  104. package/templates/init/functions/java/integ/cliq/com/handlers/FunctionHandler.java +74 -22
  105. package/templates/init/functions/java/integ/cliq/com/handlers/LinkPreviewHandler.java +108 -0
  106. package/templates/init/functions/java/integ/cliq/com/handlers/MessageActionHandler.java +6 -8
  107. package/templates/init/functions/java/integ/cliq/sample.java +10 -0
  108. package/templates/init/functions/java/job/sample.java +1 -1
  109. package/templates/init/functions/node/aio/sample.js +7 -0
  110. package/templates/init/functions/node/bio/sample.js +5 -0
  111. package/templates/init/functions/node/bio/types/basicio.d.ts +57 -0
  112. package/templates/init/functions/node/cron/sample.js +5 -0
  113. package/templates/init/functions/node/cron/types/cron.d.ts +64 -0
  114. package/templates/init/functions/node/event/sample.js +11 -8
  115. package/templates/init/functions/node/event/types/event.d.ts +82 -0
  116. package/templates/init/functions/node/integ/cliq/handlers/bot-handler.js +4 -0
  117. package/templates/init/functions/node/integ/cliq/handlers/command-handler.js +3 -5
  118. package/templates/init/functions/node/integ/cliq/handlers/{installation-validator.js → extension-handler.js} +20 -3
  119. package/templates/init/functions/node/integ/cliq/handlers/function-handler.js +42 -0
  120. package/templates/init/functions/node/integ/cliq/handlers/link-preview-handler.js +73 -0
  121. package/templates/init/functions/node/job/sample.js +0 -1
  122. package/templates/init/functions/node/job/types/job.d.ts +0 -4
  123. package/templates/init/functions/python/integ/cliq/handlers/bot_handler.py +13 -3
  124. package/templates/init/functions/python/integ/cliq/handlers/command_handler.py +7 -7
  125. package/templates/init/functions/python/integ/cliq/handlers/extension_handler.py +25 -0
  126. package/templates/init/functions/python/integ/cliq/handlers/function_handler.py +54 -10
  127. package/templates/init/functions/python/integ/cliq/handlers/link_preview_handler.py +76 -0
  128. package/templates/init/functions/python/integ/cliq/handlers/widget_handler.py +10 -9
  129. package/templates/init/functions/python/integ/cliq/sample.py +2 -2
  130. package/templates/init/functions/python/job/sample.py +0 -1
  131. package/templates/init.txt +2 -1
  132. package/lib/shell/dependencies/invoker/integ/java/lib/catalyst-function-sdk-1.0.0.jar +0 -0
  133. package/lib/shell/dependencies/invoker/job/java/lib/catalyst-function-sdk-1.0.0.jar +0 -0
  134. package/templates/init/functions/java/integ/cliq/com/handlers/InstallationHandler.java +0 -20
  135. package/templates/init/functions/java/integ/cliq/com/handlers/InstallationValidator.java +0 -22
  136. package/templates/init/functions/node/integ/cliq/handlers/installation-handler.js +0 -15
  137. package/templates/init/functions/python/integ/cliq/handlers/installation_handler.py +0 -12
  138. package/templates/init/functions/python/integ/cliq/handlers/installation_validator.py +0 -16
@@ -1,20 +0,0 @@
1
- //$Id$
2
- package com.handlers;
3
-
4
- import com.zc.cliq.enums.STATUS;
5
- import com.zc.cliq.objects.InstallationResponse;
6
- import com.zc.cliq.requests.InstallationRequest;
7
-
8
- public class InstallationHandler implements com.zc.cliq.interfaces.InstallationHandler {
9
- @Override
10
- public InstallationResponse handleInstallation(InstallationRequest req) throws Exception {
11
- InstallationResponse resp = InstallationResponse.getInstance();
12
- /*
13
- * // Logic for installation post handling {
14
- *
15
- * }
16
- */
17
- resp.setStatus(STATUS.SUCCESS);
18
- return resp;
19
- }
20
- }
@@ -1,22 +0,0 @@
1
- //$Id$
2
- package com.handlers;
3
-
4
- import com.zc.cliq.enums.EXTENSION_TYPE;
5
- import com.zc.cliq.enums.STATUS;
6
- import com.zc.cliq.objects.InstallationResponse;
7
- import com.zc.cliq.requests.InstallationRequest;
8
-
9
- public class InstallationValidator implements com.zc.cliq.interfaces.InstallationValidator {
10
- @Override
11
- public InstallationResponse validateInstallation(InstallationRequest req) throws Exception {
12
- InstallationResponse resp = InstallationResponse.getInstance();
13
- if (req.getUser().getFirstName().equals("**INVALID_USER**") && req.getAppInfo().getType().equals(EXTENSION_TYPE.UPGRADE)) {
14
- resp.setStatus(STATUS.FAILURE);
15
- resp.setTitle("Update not allowed !");
16
- resp.setMessage("Sorry. Update not allowed for the current app. Please contact admin.");
17
- } else {
18
- resp.setStatus(STATUS.SUCCESS);
19
- }
20
- return resp;
21
- }
22
- }
@@ -1,15 +0,0 @@
1
- 'use strict';
2
- import Cliq from 'zcatalyst-integ-cliq';
3
- const installationHandler = Cliq.installationHandler();
4
-
5
- installationHandler.handleInstallation(async (req, res) => {
6
- /*
7
- // Logic for installation post handling
8
- *{
9
- *
10
- *}
11
- */
12
-
13
- res.status = 200;
14
- return res;
15
- });
@@ -1,12 +0,0 @@
1
- from zcatalyst_cliq.installation_handler import (
2
- handle_installation,
3
- InstallationRequest,
4
- InstallationResponse
5
- )
6
-
7
-
8
- @handle_installation
9
- def installation_handler(req: InstallationRequest, res: InstallationResponse, *args):
10
- '''Logic for installation post handling'''
11
- res.status = 200
12
- return res
@@ -1,16 +0,0 @@
1
- from zcatalyst_cliq.installation_validator import (
2
- validate_installation,
3
- InstallationRequest,
4
- InstallationResponse
5
- )
6
-
7
-
8
- @validate_installation
9
- def validate_installation(req: InstallationRequest, res: InstallationResponse, *args):
10
- if req.user.first_name == '**INVALID_USER**' and req.app_info.type == 'upgrade':
11
- res.status = 400
12
- res.title = 'Update not allowed !'
13
- res.message = 'Sorry. Update not allowed for the current app. Please contact admin.'
14
- else:
15
- res.status = 200
16
- return res