@desplega.ai/slack-mock 0.2.0 → 0.4.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/README.md +19 -2
- package/dist/cli.js +2 -2
- package/dist/index-xs37gskt.js +156 -0
- package/dist/{index-6c88z809.js → index-y82vvfa1.js} +257 -45
- package/dist/index.js +2 -2
- package/dist/screenshot.js +1 -1
- package/dist/server.d.ts +11 -4
- package/dist/store.d.ts +2 -0
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
- package/src/render/index.ts +270 -45
- package/src/screenshot.ts +116 -1
- package/src/server.ts +29 -6
- package/src/store.ts +4 -0
- package/src/types.ts +2 -0
- package/dist/index-v2hesj4s.js +0 -52
package/dist/server.d.ts
CHANGED
|
@@ -60,9 +60,10 @@ export interface SlackMockOptions extends StoreOptions {
|
|
|
60
60
|
*/
|
|
61
61
|
publicUi?: boolean;
|
|
62
62
|
/**
|
|
63
|
-
* "user:password" that may
|
|
64
|
-
* (`GET /mock/presenter`). With `publicUi` the HTML
|
|
65
|
-
* can drive a public-read workspace without the
|
|
63
|
+
* "user:password" that may post messages (`POST /mock/messages`), mutate reactions
|
|
64
|
+
* (`POST /mock/reactions`), and check its role (`GET /mock/presenter`). With `publicUi` the HTML
|
|
65
|
+
* composer shows a sign-in for it, so a presenter can drive a public-read workspace without the
|
|
66
|
+
* admin credential. `adminAuth` always implies it.
|
|
66
67
|
*/
|
|
67
68
|
presenterAuth?: string;
|
|
68
69
|
log?: boolean | ((msg: string) => void);
|
|
@@ -133,7 +134,7 @@ export declare class SlackMock {
|
|
|
133
134
|
/** Base URL for links generated while serving `req`: publicUrl, else the request's own host. */
|
|
134
135
|
private publicBase;
|
|
135
136
|
private authorizedAdmin;
|
|
136
|
-
/** `presenterAuth` (or `adminAuth`) may post messages and read its role
|
|
137
|
+
/** `presenterAuth` (or `adminAuth`) may post messages, mutate reactions, and read its role. */
|
|
137
138
|
private authorizedPresenter;
|
|
138
139
|
/** Visitors can read the UI but posting needs a credential: the composer shows a sign-in. */
|
|
139
140
|
private get writeGated();
|
|
@@ -210,6 +211,12 @@ export declare class SlackMock {
|
|
|
210
211
|
name: string;
|
|
211
212
|
user?: string;
|
|
212
213
|
}): Promise<void>;
|
|
214
|
+
removeReaction(input: {
|
|
215
|
+
channel: string;
|
|
216
|
+
ts: string;
|
|
217
|
+
name: string;
|
|
218
|
+
user?: string;
|
|
219
|
+
}): Promise<void>;
|
|
213
220
|
private issueResponseUrl;
|
|
214
221
|
private issueTriggerId;
|
|
215
222
|
/** A human runs a slash command. Resolves with the app's ack payload and any message it produced. */
|
package/dist/store.d.ts
CHANGED
package/dist/types.d.ts
CHANGED