@seeka-labs/cli-apps 3.6.2 → 3.6.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.
- package/README.md +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/init-template/app/browser/package.json +1 -1
- package/dist/init-template/app/lib/package.json +1 -1
- package/dist/init-template/app/lib/src/validation/index.ts +13 -13
- package/dist/init-template/app/server-azurefunc/package.json +1 -1
- package/dist/init-template/app/server-azurefunc/src/app/models/index.ts +12 -12
- package/dist/init-template/app/server-azurefunc/src/app/services/activites.ts +8 -8
- package/dist/init-template/app/server-azurefunc/src/functions/seekaAppWebhook.ts +3 -1
- package/dist/init-template/app/ui/.env +7 -0
- package/dist/init-template/app/ui/package.json +1 -1
- package/package.json +2 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type {Logger} from "winston";
|
|
2
|
-
import {ExampleAppAppInstallSettings} from "../models";
|
|
3
|
-
|
|
4
|
-
// TODO: Use Zod
|
|
5
|
-
export const validateInstallationSettings = async (installSettings: ExampleAppAppInstallSettings, logger: Logger): Promise<string | null> => {
|
|
6
|
-
// Returning an error message string here will block the installation request or settings update request by the user installing the app
|
|
7
|
-
|
|
8
|
-
if(!installSettings) return null;
|
|
9
|
-
|
|
10
|
-
if(installSettings.exampleInstallSetting2 && installSettings.exampleInstallSetting2 < 2) return 'Example install setting 2 must be greater than 2';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return null;
|
|
1
|
+
import type {Logger} from "winston";
|
|
2
|
+
import {ExampleAppAppInstallSettings} from "../models";
|
|
3
|
+
|
|
4
|
+
// TODO: Use Zod
|
|
5
|
+
export const validateInstallationSettings = async (installSettings: ExampleAppAppInstallSettings, logger: Logger): Promise<string | null> => {
|
|
6
|
+
// Returning an error message string here will block the installation request or settings update request by the user installing the app
|
|
7
|
+
|
|
8
|
+
if(!installSettings) return null;
|
|
9
|
+
|
|
10
|
+
if(installSettings.exampleInstallSetting2 && installSettings.exampleInstallSetting2 < 2) return 'Example install setting 2 must be greater than 2';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
return null;
|
|
14
14
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import {SeekaActivityAcceptedWebhookContent} from "@seeka-labs/sdk-apps-server";
|
|
3
|
-
import { BackgroundJobRequestContext } from "@seeka-labs/sdk-apps-server-host";
|
|
4
|
-
|
|
5
|
-
export type TrackExampleAppActivityQueueItem = BackgroundJobRequestContext<TrackSeekaExampleAppActivityPayload> & {
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export type TrackSeekaExampleAppActivityPayload = {
|
|
10
|
-
seekaActivity: SeekaActivityAcceptedWebhookContent
|
|
11
|
-
}
|
|
12
|
-
|
|
1
|
+
|
|
2
|
+
import {SeekaActivityAcceptedWebhookContent} from "@seeka-labs/sdk-apps-server";
|
|
3
|
+
import { BackgroundJobRequestContext } from "@seeka-labs/sdk-apps-server-host";
|
|
4
|
+
|
|
5
|
+
export type TrackExampleAppActivityQueueItem = BackgroundJobRequestContext<TrackSeekaExampleAppActivityPayload> & {
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type TrackSeekaExampleAppActivityPayload = {
|
|
10
|
+
seekaActivity: SeekaActivityAcceptedWebhookContent
|
|
11
|
+
}
|
|
12
|
+
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {Logger} from "winston";
|
|
3
|
-
import {TrackSeekaExampleAppActivityPayload} from "../models";
|
|
4
|
-
import {SeekaAppInstallContext} from "@seeka-labs/sdk-apps-core";
|
|
5
|
-
|
|
6
|
-
export const sendActivityToAnotherSoftware = async (payload: TrackSeekaExampleAppActivityPayload, installation: SeekaAppInstallContext<any>, causationId: string, correlationId: string, logger: Logger): Promise<void> => {
|
|
7
|
-
// Anything
|
|
8
|
-
}
|
|
1
|
+
|
|
2
|
+
import {Logger} from "winston";
|
|
3
|
+
import {TrackSeekaExampleAppActivityPayload} from "../models";
|
|
4
|
+
import {SeekaAppInstallContext} from "@seeka-labs/sdk-apps-core";
|
|
5
|
+
|
|
6
|
+
export const sendActivityToAnotherSoftware = async (payload: TrackSeekaExampleAppActivityPayload, installation: SeekaAppInstallContext<any>, causationId: string, correlationId: string, logger: Logger): Promise<void> => {
|
|
7
|
+
// Anything
|
|
8
|
+
}
|
|
@@ -20,6 +20,7 @@ import { validateInstallationSettings, ExampleAppAppBrowserSdkPluginConfig, Exam
|
|
|
20
20
|
import type {Logger} from 'winston';
|
|
21
21
|
import {queueNames, triggerBackgroundJob} from '../app/jobs';
|
|
22
22
|
import {TrackExampleAppActivityQueueItem} from "../app/models";
|
|
23
|
+
import path from "path";
|
|
23
24
|
|
|
24
25
|
app.http('seekaAppWebhook', {
|
|
25
26
|
methods: ['POST'],
|
|
@@ -126,7 +127,8 @@ export async function seekaAppWebhook(req: HttpRequest, context: InvocationConte
|
|
|
126
127
|
browserPluginAppSetting1: installation.installationState?.installationSettings?.browserPluginAppSetting1
|
|
127
128
|
}
|
|
128
129
|
} as ExampleAppAppBrowserSdkPluginConfig;
|
|
129
|
-
const
|
|
130
|
+
const browserPluginBasePath = path.resolve(`./dist/src/browser`);
|
|
131
|
+
const plugin = await getSeekaBrowserPlugin<ExampleAppAppBrowserSdkPluginConfig>('ExampleAppAppConvergeSdkPlugin', browserPluginBasePath, pluginConfig, logger);
|
|
130
132
|
|
|
131
133
|
logger.profile('http.seeka.webhook.app')
|
|
132
134
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seeka-labs/cli-apps",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.6",
|
|
4
4
|
"description": "Seeka - Apps CLI",
|
|
5
5
|
"author": "SEEKA <platform@seeka.co>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"ts-jest": "^29",
|
|
60
60
|
"typescript": "^5"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "d7ed2fb93ef6c1cd1d8ee0646b9aa38cee484e32"
|
|
63
63
|
}
|