@nu-art/slack-frontend 0.401.8 → 0.500.0
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/ModuleFE_Slack.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Module } from '@nu-art/ts-common';
|
|
2
|
-
import {
|
|
3
|
-
import { ApiStruct_Slack } from '@nu-art/slack-shared';
|
|
2
|
+
import { API_Slack } from '@nu-art/slack-shared';
|
|
4
3
|
export declare class ModuleFE_Slack_Class extends Module<any, any> {
|
|
5
|
-
readonly vv1: ApiDefCaller<ApiStruct_Slack>['vv1'];
|
|
6
4
|
constructor();
|
|
5
|
+
postMessage(body: API_Slack['postMessage']['Body']): Promise<API_Slack['postMessage']['Response']>;
|
|
6
|
+
postStructuredMessage(body: API_Slack['postStructuredMessage']['Body']): Promise<API_Slack['postStructuredMessage']['Response']>;
|
|
7
|
+
postFiles(body: API_Slack['postFiles']['Body']): Promise<API_Slack['postFiles']['Response']>;
|
|
8
|
+
sendFEMessage(body: API_Slack['sendFEMessage']['Body']): Promise<API_Slack['sendFEMessage']['Response']>;
|
|
7
9
|
}
|
|
8
10
|
export declare const ModuleFE_Slack: ModuleFE_Slack_Class;
|
package/ModuleFE_Slack.js
CHANGED
|
@@ -1,16 +1,81 @@
|
|
|
1
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
2
|
+
var useValue = arguments.length > 2;
|
|
3
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
4
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
5
|
+
}
|
|
6
|
+
return useValue ? value : void 0;
|
|
7
|
+
};
|
|
8
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
9
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
10
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
11
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
12
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
13
|
+
var _, done = false;
|
|
14
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
15
|
+
var context = {};
|
|
16
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
17
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
18
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
19
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
20
|
+
if (kind === "accessor") {
|
|
21
|
+
if (result === void 0) continue;
|
|
22
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
23
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
24
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
25
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
26
|
+
}
|
|
27
|
+
else if (_ = accept(result)) {
|
|
28
|
+
if (kind === "field") initializers.unshift(_);
|
|
29
|
+
else descriptor[key] = _;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
33
|
+
done = true;
|
|
34
|
+
};
|
|
1
35
|
import { Module } from '@nu-art/ts-common';
|
|
36
|
+
import { ApiCaller } from '@nu-art/http-client';
|
|
2
37
|
import { ApiDef_Slack } from '@nu-art/slack-shared';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
38
|
+
let ModuleFE_Slack_Class = (() => {
|
|
39
|
+
let _classSuper = Module;
|
|
40
|
+
let _instanceExtraInitializers = [];
|
|
41
|
+
let _postMessage_decorators;
|
|
42
|
+
let _postStructuredMessage_decorators;
|
|
43
|
+
let _postFiles_decorators;
|
|
44
|
+
let _sendFEMessage_decorators;
|
|
45
|
+
return class ModuleFE_Slack_Class extends _classSuper {
|
|
46
|
+
static {
|
|
47
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
48
|
+
_postMessage_decorators = [ApiCaller(ApiDef_Slack.postMessage)];
|
|
49
|
+
_postStructuredMessage_decorators = [ApiCaller(ApiDef_Slack.postStructuredMessage)];
|
|
50
|
+
_postFiles_decorators = [ApiCaller(ApiDef_Slack.postFiles)];
|
|
51
|
+
_sendFEMessage_decorators = [ApiCaller(ApiDef_Slack.sendFEMessage)];
|
|
52
|
+
__esDecorate(this, null, _postMessage_decorators, { kind: "method", name: "postMessage", static: false, private: false, access: { has: obj => "postMessage" in obj, get: obj => obj.postMessage }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
53
|
+
__esDecorate(this, null, _postStructuredMessage_decorators, { kind: "method", name: "postStructuredMessage", static: false, private: false, access: { has: obj => "postStructuredMessage" in obj, get: obj => obj.postStructuredMessage }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
54
|
+
__esDecorate(this, null, _postFiles_decorators, { kind: "method", name: "postFiles", static: false, private: false, access: { has: obj => "postFiles" in obj, get: obj => obj.postFiles }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
55
|
+
__esDecorate(this, null, _sendFEMessage_decorators, { kind: "method", name: "sendFEMessage", static: false, private: false, access: { has: obj => "sendFEMessage" in obj, get: obj => obj.sendFEMessage }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
56
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
57
|
+
}
|
|
58
|
+
constructor() {
|
|
59
|
+
super();
|
|
60
|
+
__runInitializers(this, _instanceExtraInitializers);
|
|
61
|
+
}
|
|
62
|
+
async postMessage(body) {
|
|
63
|
+
void body;
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
async postStructuredMessage(body) {
|
|
67
|
+
void body;
|
|
68
|
+
return undefined;
|
|
69
|
+
}
|
|
70
|
+
async postFiles(body) {
|
|
71
|
+
void body;
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
async sendFEMessage(body) {
|
|
75
|
+
void body;
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
})();
|
|
80
|
+
export { ModuleFE_Slack_Class };
|
|
16
81
|
export const ModuleFE_Slack = new ModuleFE_Slack_Class();
|
package/SlackBuilderFE.js
CHANGED
|
@@ -8,11 +8,11 @@ export class SlackBuilderFE extends BaseSlackBuilder {
|
|
|
8
8
|
super(channel);
|
|
9
9
|
}
|
|
10
10
|
send = async () => {
|
|
11
|
-
await ModuleFE_Slack.
|
|
11
|
+
await ModuleFE_Slack.sendFEMessage({
|
|
12
12
|
channel: this.channel,
|
|
13
13
|
messageBlocks: this.blocks,
|
|
14
14
|
messageReplies: this.replies,
|
|
15
|
-
})
|
|
15
|
+
});
|
|
16
16
|
};
|
|
17
17
|
sendMessage = undefined;
|
|
18
18
|
sendFiles = undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AppToolsScreen
|
|
1
|
+
import { AppToolsScreen } from '@nu-art/thunder-ui-modules';
|
|
2
|
+
import { ComponentSync } from '@nu-art/thunder-widgets';
|
|
2
3
|
export declare class ATS_SlackMessageBuilder extends ComponentSync {
|
|
3
4
|
private readonly testChannel;
|
|
4
5
|
static screen: AppToolsScreen;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Button, ComponentSync } from '@nu-art/
|
|
2
|
+
import { Button, ComponentSync } from '@nu-art/thunder-widgets';
|
|
3
3
|
import { SlackBuilderFE } from '../../SlackBuilderFE.js';
|
|
4
4
|
import { generateHex, ServerErrorSeverity } from '@nu-art/ts-common';
|
|
5
5
|
export class ATS_SlackMessageBuilder extends ComponentSync {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nu-art/slack-frontend",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.500.0",
|
|
4
4
|
"description": "Storm - Express & Typescript based backend framework Frontend",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"TacB0sS",
|
|
@@ -31,10 +31,8 @@
|
|
|
31
31
|
"build": "tsc"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@nu-art/slack-shared": "0.
|
|
35
|
-
"@nu-art/
|
|
36
|
-
"@nu-art/thunderstorm-shared": "0.401.8",
|
|
37
|
-
"@nu-art/ts-common": "0.401.8",
|
|
34
|
+
"@nu-art/slack-shared": "0.500.0",
|
|
35
|
+
"@nu-art/ts-common": "0.500.0",
|
|
38
36
|
"@slack/web-api": "7.13.0",
|
|
39
37
|
"firebase": "^11.9.0",
|
|
40
38
|
"firebase-admin": "13.4.0",
|
|
@@ -43,7 +41,10 @@
|
|
|
43
41
|
"moment": "^2.29.4",
|
|
44
42
|
"react": "^18.0.0",
|
|
45
43
|
"react-dom": "^18.0.0",
|
|
46
|
-
"react-router-dom": "^6.9.0"
|
|
44
|
+
"react-router-dom": "^6.9.0",
|
|
45
|
+
"@nu-art/http-client": "{{THUNDERSTORM_VERSION}}",
|
|
46
|
+
"@nu-art/thunder-widgets": "{{THUNDERSTORM_VERSION}}",
|
|
47
|
+
"@nu-art/thunder-ui-modules": "{{THUNDERSTORM_VERSION}}"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
50
|
"@types/react": "^18.0.0",
|