mini-interactions-core 0.1.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.
@@ -0,0 +1,10 @@
1
+ interface InteractionContextOptions {
2
+ applicationId: string;
3
+ }
4
+ declare class InteractionContext {
5
+ readonly applicationId: string;
6
+ constructor(options: InteractionContextOptions);
7
+ }
8
+ type InteractionHandler = (request: Request) => Response | Promise<Response>;
9
+
10
+ export { InteractionContext, type InteractionContextOptions, type InteractionHandler };
package/dist/index.js ADDED
@@ -0,0 +1,14 @@
1
+ // src/index.ts
2
+ var InteractionContext = class {
3
+ applicationId;
4
+ constructor(options) {
5
+ if (options.applicationId.trim().length === 0) {
6
+ throw new TypeError("applicationId must not be empty");
7
+ }
8
+ this.applicationId = options.applicationId;
9
+ }
10
+ };
11
+
12
+ export { InteractionContext };
13
+ //# sourceMappingURL=index.js.map
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";AAIO,IAAM,qBAAN,MAAyB;AAAA,EACd,aAAA;AAAA,EAET,YAAY,OAAA,EAAoC;AACrD,IAAA,IAAI,OAAA,CAAQ,aAAA,CAAc,IAAA,EAAK,CAAE,WAAW,CAAA,EAAG;AAC7C,MAAA,MAAM,IAAI,UAAU,iCAAiC,CAAA;AAAA,IACvD;AACA,IAAA,IAAA,CAAK,gBAAgB,OAAA,CAAQ,aAAA;AAAA,EAC/B;AACF","file":"index.js","sourcesContent":["export interface InteractionContextOptions {\n applicationId: string;\n}\n\nexport class InteractionContext {\n public readonly applicationId: string;\n\n public constructor(options: InteractionContextOptions) {\n if (options.applicationId.trim().length === 0) {\n throw new TypeError(\"applicationId must not be empty\");\n }\n this.applicationId = options.applicationId;\n }\n}\n\nexport type InteractionHandler = (request: Request) => Response | Promise<Response>;\n"]}
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "mini-interactions-core",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "sideEffects": false,
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ },
14
+ "./package.json": "./package.json"
15
+ },
16
+ "scripts": {
17
+ "build": "tsup",
18
+ "dev": "tsup --watch",
19
+ "typecheck": "tsc --noEmit",
20
+ "test": "vitest run",
21
+ "clean": "rm -rf dist"
22
+ }
23
+ }