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.
- package/docs/command_needs/rc.toml +8 -8
- package/docs/commands/ds/import.toml +5 -5
- package/docs/commands/zest/generate/index.toml +4 -0
- package/docs/serve/server/lib/appsail/index.toml +22 -1
- package/lib/authentication/login.js +8 -4
- package/lib/code-deck.js +7 -7
- package/lib/command_needs/rc.js +7 -7
- package/lib/commands/appsail/add.js +2 -2
- package/lib/commands/client/setup.js +1 -1
- package/lib/commands/codelib/install.js +6 -2
- package/lib/commands/ds/import.js +37 -21
- package/lib/commands/event/generate/index.js +14 -2
- package/lib/commands/functions/add.js +1 -1
- package/lib/commands/functions/setup.js +1 -1
- package/lib/commands/iac/export.js +5 -1
- package/lib/commands/iac/import.js +4 -1
- package/lib/commands/index.js +1 -0
- package/lib/commands/init.js +8 -1
- package/lib/commands/zest/generate/index.js +304 -0
- package/lib/deploy/features/appsail/index.js +25 -10
- package/lib/endpoints/index.js +17 -3
- package/lib/endpoints/lib/ds-bulk.js +1 -0
- package/lib/endpoints/lib/stratus.js +63 -0
- package/lib/endpoints/lib/tunnel.js +18 -0
- package/lib/endpoints/lib/zest.js +124 -0
- package/lib/event_generate/stratus.js +52 -0
- package/lib/fn-utils/lib/common.js +6 -1
- package/lib/iac/status/deploy.js +1 -5
- package/lib/init/features/appsail/index.js +34 -27
- package/lib/init/features/project.js +6 -15
- package/lib/internal/api.js +14 -6
- package/lib/internal/command.js +1 -1
- package/lib/prompt/index.js +5 -2
- package/lib/prompt/types/file-path.js +1 -1
- package/lib/prompt/types/search-box.js +281 -0
- package/lib/serve/features/appsail.js +1 -1
- package/lib/serve/server/index.js +44 -14
- package/lib/serve/server/lib/appsail/index.js +73 -13
- package/lib/serve/server/lib/appsail/start.js +9 -1
- package/lib/serve/server/lib/java/aio_server/lib/catalyst-cli-java-runtime-1.0.0.jar +0 -0
- 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
- package/lib/serve/server/lib/java/aio_server/lib/catalyst-java-runtime-1.0.0.jar +0 -0
- package/lib/serve/server/lib/java/index.js +1 -1
- package/lib/serve/server/lib/master/appsail.js +3 -3
- package/lib/serve/server/lib/master/unknown-req-proxy.js +5 -2
- package/lib/serve/server/lib/master/utils.js +27 -15
- package/lib/serve/server/lib/node/index.js +1 -1
- package/lib/serve/server/lib/node/server/package-lock.json +12 -0
- package/lib/serve/server/lib/python/index.js +1 -1
- package/lib/shell/dependencies/http-functions.js +1 -1
- package/lib/shell/dependencies/invoker/bio/java/lib/{catalyst-function-sdk-1.0.0.jar → catalyst-function-sdk-1.1.0.jar} +0 -0
- package/lib/shell/dependencies/invoker/cron/java/JavacronInvoker.java +1 -1
- package/lib/shell/dependencies/invoker/cron/java/lib/{catalyst-function-sdk-1.0.0.jar → catalyst-function-sdk-1.1.0.jar} +0 -0
- package/lib/shell/dependencies/invoker/event/java/lib/{catalyst-function-sdk-1.0.0.jar → catalyst-function-sdk-1.1.0.jar} +0 -0
- package/lib/shell/dependencies/invoker/integ/java/JavaintegInvoker.java +15 -0
- package/lib/shell/dependencies/invoker/integ/java/lib/catalyst-function-sdk-1.1.0.jar +0 -0
- package/lib/shell/dependencies/invoker/integ/node.mjs +13 -0
- package/lib/shell/dependencies/invoker/job/java/JavajobInvoker.java +15 -1
- package/lib/shell/dependencies/invoker/job/java/lib/catalyst-function-sdk-1.1.0.jar +0 -0
- package/lib/shell/dependencies/local-function.js +24 -23
- package/lib/shell/dependencies/tunnel-server.js +52 -23
- package/lib/shell/index.js +22 -28
- package/lib/util_modules/config/lib/appsail.js +10 -8
- package/lib/util_modules/constants/lib/cliq-handlers.js +18 -10
- package/lib/util_modules/constants/lib/dc-type.js +8 -0
- package/lib/util_modules/constants/lib/event-action.js +1 -0
- package/lib/util_modules/constants/lib/event-source.js +1 -0
- package/lib/util_modules/constants/lib/placeholders.js +2 -1
- package/lib/util_modules/constants/lib/scopes.js +14 -3
- package/lib/util_modules/constants/lib/urls.js +8 -0
- package/lib/util_modules/fs/lib/async.js +7 -2
- package/package.json +4 -2
- package/templates/event/integ/cliq/bot/action_handler.json +13 -4
- package/templates/event/integ/cliq/bot/call_handler.json +41 -0
- package/templates/event/integ/cliq/bot/context_handler.json +11 -3
- package/templates/event/integ/cliq/bot/incomingwebhook_handler.json +11 -3
- package/templates/event/integ/cliq/bot/mention_handler.json +12 -4
- package/templates/event/integ/cliq/bot/message_handler.json +13 -4
- package/templates/event/integ/cliq/bot/participation_handler.json +13 -3
- package/templates/event/integ/cliq/bot/welcome_handler.json +12 -8
- package/templates/event/integ/cliq/command/execution_handler.json +12 -3
- package/templates/event/integ/cliq/command/suggestion_handler.json +18 -4
- package/templates/event/integ/cliq/{installation → extension}/installation_handler.json +13 -4
- package/templates/event/integ/cliq/{installation → extension}/installation_validator.json +13 -5
- package/templates/event/integ/cliq/extension/uninstallation_handler.json +37 -0
- package/templates/event/integ/cliq/function/button_handler.json +13 -5
- package/templates/event/integ/cliq/function/form_change_handler.json +9 -3
- package/templates/event/integ/cliq/function/form_handler.json +11 -3
- package/templates/event/integ/cliq/function/form_values_handler.json +9 -3
- package/templates/event/integ/cliq/function/form_view_handler.json +26 -0
- package/templates/event/integ/cliq/function/widget_button_handler.json +14 -5
- package/templates/event/integ/cliq/link_preview/action_handler.json +54 -0
- package/templates/event/integ/cliq/link_preview/after_send_handler.json +47 -0
- package/templates/event/integ/cliq/link_preview/menu_handler.json +47 -0
- package/templates/event/integ/cliq/link_preview/preview_handler.json +47 -0
- package/templates/event/integ/cliq/messageaction/execution_handler.json +11 -3
- package/templates/event/integ/cliq/widget/view_handler.json +12 -4
- package/templates/init/client/react/react_js/template/src/index.js +3 -3
- package/templates/init/client/react/react_ts/template/src/index.tsx +3 -3
- package/templates/init/client/react/react_ts/template.json +3 -3
- package/templates/init/functions/java/integ/cliq/com/handlers/BotHandler.java +29 -23
- package/templates/init/functions/java/integ/cliq/com/handlers/CommandHandler.java +14 -17
- package/templates/init/functions/java/integ/cliq/com/handlers/ExtensionHandler.java +41 -0
- package/templates/init/functions/java/integ/cliq/com/handlers/FunctionHandler.java +74 -22
- package/templates/init/functions/java/integ/cliq/com/handlers/LinkPreviewHandler.java +108 -0
- package/templates/init/functions/java/integ/cliq/com/handlers/MessageActionHandler.java +6 -8
- package/templates/init/functions/java/integ/cliq/sample.java +10 -0
- package/templates/init/functions/java/job/sample.java +1 -1
- package/templates/init/functions/node/aio/sample.js +7 -0
- package/templates/init/functions/node/bio/sample.js +5 -0
- package/templates/init/functions/node/bio/types/basicio.d.ts +57 -0
- package/templates/init/functions/node/cron/sample.js +5 -0
- package/templates/init/functions/node/cron/types/cron.d.ts +64 -0
- package/templates/init/functions/node/event/sample.js +11 -8
- package/templates/init/functions/node/event/types/event.d.ts +82 -0
- package/templates/init/functions/node/integ/cliq/handlers/bot-handler.js +4 -0
- package/templates/init/functions/node/integ/cliq/handlers/command-handler.js +3 -5
- package/templates/init/functions/node/integ/cliq/handlers/{installation-validator.js → extension-handler.js} +20 -3
- package/templates/init/functions/node/integ/cliq/handlers/function-handler.js +42 -0
- package/templates/init/functions/node/integ/cliq/handlers/link-preview-handler.js +73 -0
- package/templates/init/functions/node/job/sample.js +0 -1
- package/templates/init/functions/node/job/types/job.d.ts +0 -4
- package/templates/init/functions/python/integ/cliq/handlers/bot_handler.py +13 -3
- package/templates/init/functions/python/integ/cliq/handlers/command_handler.py +7 -7
- package/templates/init/functions/python/integ/cliq/handlers/extension_handler.py +25 -0
- package/templates/init/functions/python/integ/cliq/handlers/function_handler.py +54 -10
- package/templates/init/functions/python/integ/cliq/handlers/link_preview_handler.py +76 -0
- package/templates/init/functions/python/integ/cliq/handlers/widget_handler.py +10 -9
- package/templates/init/functions/python/integ/cliq/sample.py +2 -2
- package/templates/init/functions/python/job/sample.py +0 -1
- package/templates/init.txt +2 -1
- package/lib/shell/dependencies/invoker/integ/java/lib/catalyst-function-sdk-1.0.0.jar +0 -0
- package/lib/shell/dependencies/invoker/job/java/lib/catalyst-function-sdk-1.0.0.jar +0 -0
- package/templates/init/functions/java/integ/cliq/com/handlers/InstallationHandler.java +0 -20
- package/templates/init/functions/java/integ/cliq/com/handlers/InstallationValidator.java +0 -22
- package/templates/init/functions/node/integ/cliq/handlers/installation-handler.js +0 -15
- package/templates/init/functions/python/integ/cliq/handlers/installation_handler.py +0 -12
- 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
|