@nu-art/slack-shared 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/apis.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ApiDefResolver, BodyApi } from '@nu-art/thunderstorm-shared';
1
+ import { ApiDefResolver, BodyApi } from '@nu-art/api-types';
2
2
  import { PreSendSlackStructuredMessage } from './types.js';
3
3
  import { SlackBlock, ThreadPointer } from './base-slack-builder/index.js';
4
4
  import { WebAPICallResult } from '@slack/web-api';
@@ -31,12 +31,10 @@ export type SendUIMessage = {
31
31
  };
32
32
  response: void;
33
33
  };
34
- export type ApiStruct_Slack = {
35
- vv1: {
36
- postMessage: BodyApi<void, Request_PostMessage>;
37
- postStructuredMessage: BodyApi<PostStructuredMessage['response'], PostStructuredMessage['request']>;
38
- sendFEMessage: BodyApi<SendUIMessage['response'], SendUIMessage['request']>;
39
- postFiles: BodyApi<PostFiles['response'], PostFiles['request']>;
40
- };
34
+ export type API_Slack = {
35
+ postMessage: BodyApi<void, Request_PostMessage>;
36
+ postStructuredMessage: BodyApi<PostStructuredMessage['response'], PostStructuredMessage['request']>;
37
+ sendFEMessage: BodyApi<SendUIMessage['response'], SendUIMessage['request']>;
38
+ postFiles: BodyApi<PostFiles['response'], PostFiles['request']>;
41
39
  };
42
- export declare const ApiDef_Slack: ApiDefResolver<ApiStruct_Slack>;
40
+ export declare const ApiDef_Slack: ApiDefResolver<API_Slack>;
package/apis.js CHANGED
@@ -1,9 +1,7 @@
1
- import { HttpMethod } from '@nu-art/thunderstorm-shared';
1
+ import { HttpMethod } from '@nu-art/api-types';
2
2
  export const ApiDef_Slack = {
3
- vv1: {
4
- postMessage: { method: HttpMethod.POST, path: 'v1/slack/post-message' },
5
- postStructuredMessage: { method: HttpMethod.POST, path: 'v1/slack/post-structured-message' },
6
- sendFEMessage: { method: HttpMethod.POST, path: 'v1/slack/send-fe-message' },
7
- postFiles: { method: HttpMethod.POST, path: 'v1/slack/post-files' },
8
- }
3
+ postMessage: { method: HttpMethod.POST, path: 'v1/slack/post-message' },
4
+ postStructuredMessage: { method: HttpMethod.POST, path: 'v1/slack/post-structured-message' },
5
+ sendFEMessage: { method: HttpMethod.POST, path: 'v1/slack/send-fe-message' },
6
+ postFiles: { method: HttpMethod.POST, path: 'v1/slack/post-files' },
9
7
  };
@@ -22,7 +22,6 @@ export class BaseSlackBuilder extends Logger {
22
22
  if (blocks)
23
23
  this.blocks = blocks;
24
24
  }
25
- // ######################## Static Templates ########################
26
25
  /** Static template function
27
26
  * For error reporting get slack emoji unicode for each severity level
28
27
  * @param severity Severity level from the severity enum
@@ -96,7 +95,6 @@ export class BaseSlackBuilder extends Logger {
96
95
  static ExceptionNotificationText = (exception) => {
97
96
  return `*${exception.exceptionType}* - ${exception.message}`;
98
97
  };
99
- // ######################## Message builder logic ########################
100
98
  /**
101
99
  * Add files to send in the slack message, accepts both single and multiple files at once
102
100
  * @param files List or a single file to send
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nu-art/slack-shared",
3
- "version": "0.401.8",
3
+ "version": "0.500.0",
4
4
  "description": "Storm - Express & Typescript based backend framework Shared",
5
5
  "keywords": [
6
6
  "TacB0sS",
@@ -31,8 +31,7 @@
31
31
  "build": "tsc"
32
32
  },
33
33
  "dependencies": {
34
- "@nu-art/ts-common": "0.401.8",
35
- "@nu-art/thunderstorm-shared": "0.401.8",
34
+ "@nu-art/ts-common": "0.500.0",
36
35
  "react": "^18.0.0",
37
36
  "react-dom": "^18.0.0",
38
37
  "react-router-dom": "^6.9.0",
@@ -41,7 +40,8 @@
41
40
  "firebase-admin": "13.4.0",
42
41
  "firebase-functions": "6.3.2",
43
42
  "google-auth-library": "^10.0.0",
44
- "moment": "^2.29.4"
43
+ "moment": "^2.29.4",
44
+ "@nu-art/api-types": "{{THUNDERSTORM_VERSION}}"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/react": "^18.0.0",