@goflowstate/widget-sdk 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.
- package/README.md +104 -0
- package/dist/canvas-widget-sdk.js +477 -0
- package/dist/canvas-widget-sdk.js.map +7 -0
- package/dist/db.test.d.ts +2 -0
- package/dist/db.test.d.ts.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +453 -0
- package/dist/index.mjs.map +7 -0
- package/dist/sdk.d.ts +95 -0
- package/dist/sdk.d.ts.map +1 -0
- package/dist/sdk.focus.test.d.ts +2 -0
- package/dist/sdk.focus.test.d.ts.map +1 -0
- package/dist/service.d.ts +8 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.test.d.ts +2 -0
- package/dist/service.test.d.ts.map +1 -0
- package/dist/types.d.ts +182 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +40 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/** The visual lifecycle state of a widget on the canvas. */
|
|
2
|
+
export type WidgetDisplayState = 'collapsed' | 'expanding' | 'expanded' | 'collapsing';
|
|
3
|
+
/** Authenticated user information passed to the widget by the canvas host. */
|
|
4
|
+
export interface UserContext {
|
|
5
|
+
/** The user's unique identifier. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** The user's display name, or null if not set. */
|
|
8
|
+
displayName: string | null;
|
|
9
|
+
}
|
|
10
|
+
/** The result of a consent request for a named data scope. */
|
|
11
|
+
export interface ConsentResult {
|
|
12
|
+
/** The scope that was requested. */
|
|
13
|
+
scope: string;
|
|
14
|
+
/** Whether the user granted or denied consent. */
|
|
15
|
+
granted: boolean;
|
|
16
|
+
/** Opaque token the widget can pass to the API to prove consent was granted. */
|
|
17
|
+
grantToken?: string;
|
|
18
|
+
/** Seconds until the grant token expires. */
|
|
19
|
+
expiresIn?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface DbRecord<T = Record<string, unknown>> {
|
|
22
|
+
id: string;
|
|
23
|
+
data: T;
|
|
24
|
+
ownerUserId: string;
|
|
25
|
+
createdAt: string;
|
|
26
|
+
updatedAt: string;
|
|
27
|
+
}
|
|
28
|
+
export interface DbListOptions {
|
|
29
|
+
limit?: number;
|
|
30
|
+
cursor?: string;
|
|
31
|
+
sort?: 'createdAt:asc' | 'createdAt:desc';
|
|
32
|
+
mine?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface DbCollection {
|
|
35
|
+
create(data: Record<string, unknown>): Promise<DbRecord>;
|
|
36
|
+
get(id: string): Promise<DbRecord>;
|
|
37
|
+
list(opts?: DbListOptions): Promise<DbRecord[]>;
|
|
38
|
+
update(id: string, patch: Record<string, unknown>): Promise<DbRecord>;
|
|
39
|
+
delete(id: string): Promise<void>;
|
|
40
|
+
}
|
|
41
|
+
export interface DbAPI {
|
|
42
|
+
collection(name: string): DbCollection;
|
|
43
|
+
}
|
|
44
|
+
/** Persistent key-value storage API scoped to this widget installation. */
|
|
45
|
+
export interface StorageAPI {
|
|
46
|
+
/** Retrieve a value by key; resolves with undefined if the key does not exist. */
|
|
47
|
+
get(key: string): Promise<unknown>;
|
|
48
|
+
/** Store a value under the given key. */
|
|
49
|
+
set(key: string, value: unknown): Promise<void>;
|
|
50
|
+
/** Remove a key from storage. */
|
|
51
|
+
delete(key: string): Promise<void>;
|
|
52
|
+
}
|
|
53
|
+
/** Widget settings API — reads and writes the configuration persisted by the canvas host. */
|
|
54
|
+
export interface SettingsAPI {
|
|
55
|
+
/** Returns a shallow copy of the current settings object. */
|
|
56
|
+
get(): Record<string, unknown>;
|
|
57
|
+
/** Merges new values into the current settings and persists them via the canvas host. */
|
|
58
|
+
set(settings: Record<string, unknown>): void;
|
|
59
|
+
/**
|
|
60
|
+
* Subscribe to settings changes made on another of the user's devices.
|
|
61
|
+
* The handler receives the full new settings object. Returns an unsubscribe function.
|
|
62
|
+
*/
|
|
63
|
+
onRemoteChange(cb: (settings: Record<string, unknown>) => void): () => void;
|
|
64
|
+
}
|
|
65
|
+
/** The public interface of an initialized SDK instance returned by {@link CanvasWidget.init}. */
|
|
66
|
+
export interface CanvasWidgetSDK {
|
|
67
|
+
/** The unique identifier for this widget instance on the canvas. */
|
|
68
|
+
readonly widgetId: string;
|
|
69
|
+
/** The current display state of the widget. */
|
|
70
|
+
readonly state: WidgetDisplayState;
|
|
71
|
+
/** Subscribe to display state changes; returns an unsubscribe function. */
|
|
72
|
+
onStateChange(cb: (state: WidgetDisplayState) => void): () => void;
|
|
73
|
+
/** Ask the canvas host to expand this widget into its modal view. */
|
|
74
|
+
requestExpand(): void;
|
|
75
|
+
/** Ask the canvas host to collapse this widget back to its tile view. */
|
|
76
|
+
requestCollapse(): void;
|
|
77
|
+
/** Broadcast an event on the given topic to all subscribed widgets on the canvas. */
|
|
78
|
+
emit(topic: string, payload: unknown): void;
|
|
79
|
+
/** Subscribe to events on the given topic; returns an unsubscribe function. */
|
|
80
|
+
subscribe(topic: string, cb: (event: WidgetEvent) => void): () => void;
|
|
81
|
+
/** Send a structured log entry to the canvas host for centralized debugging. */
|
|
82
|
+
log(level: 'info' | 'warn' | 'error', message: string, data?: unknown): void;
|
|
83
|
+
/** The authenticated user context, or null when user data access has not been granted. */
|
|
84
|
+
readonly user: UserContext | null;
|
|
85
|
+
/** Request user consent for a named data scope; resolves with the consent decision. */
|
|
86
|
+
requestConsent(scope: string, reason: string): Promise<ConsentResult>;
|
|
87
|
+
/** Return the cached JWT for authenticating requests to external APIs. Pass forceRefresh=true to bypass the cache. */
|
|
88
|
+
getJwt(forceRefresh?: boolean): Promise<string>;
|
|
89
|
+
/** Persistent key-value storage scoped to this widget installation. */
|
|
90
|
+
storage: StorageAPI;
|
|
91
|
+
/** Ad-hoc collections/records backend scoped to the canvas/room. */
|
|
92
|
+
db: DbAPI;
|
|
93
|
+
/** Widget configuration settings persisted by the canvas host. */
|
|
94
|
+
settings: SettingsAPI;
|
|
95
|
+
/** Display a toast notification in the canvas host UI. */
|
|
96
|
+
notify(message: string, opts?: {
|
|
97
|
+
level?: string;
|
|
98
|
+
duration?: number;
|
|
99
|
+
}): Promise<void>;
|
|
100
|
+
/** Authenticated HTTP client scoped to this widget's declared service URL. Present only when manifest.service.url is set. */
|
|
101
|
+
service?: WidgetServiceClient;
|
|
102
|
+
}
|
|
103
|
+
/** An event received from another widget or the canvas host via the event bus. */
|
|
104
|
+
export interface WidgetEvent {
|
|
105
|
+
/** The topic this event was emitted on. */
|
|
106
|
+
topic: string;
|
|
107
|
+
/** Arbitrary event payload. */
|
|
108
|
+
payload: unknown;
|
|
109
|
+
/** Unix timestamp (ms) when the event was emitted. */
|
|
110
|
+
emittedAt: number;
|
|
111
|
+
}
|
|
112
|
+
/** Initialization payload delivered by the canvas host in the INIT message. */
|
|
113
|
+
export interface InitPayload {
|
|
114
|
+
widgetId: string;
|
|
115
|
+
installationId: string;
|
|
116
|
+
state: WidgetDisplayState;
|
|
117
|
+
hmacSecret: string | null;
|
|
118
|
+
widgetApiUrl: string | null;
|
|
119
|
+
/** Short-lived access token for authenticated widget-api requests */
|
|
120
|
+
widgetApiToken?: string | null;
|
|
121
|
+
/** Base URL for the widget's declared service (from manifest.service.url). Null when not declared. */
|
|
122
|
+
serviceUrl: string | null;
|
|
123
|
+
user: UserContext | null;
|
|
124
|
+
settings: Record<string, unknown> | null;
|
|
125
|
+
}
|
|
126
|
+
/** Payload delivered when the widget's display state changes. */
|
|
127
|
+
export interface StateChangePayload {
|
|
128
|
+
state: WidgetDisplayState;
|
|
129
|
+
previousState: WidgetDisplayState;
|
|
130
|
+
}
|
|
131
|
+
/** Payload delivered when a cross-widget event is broadcast on a subscribed topic. */
|
|
132
|
+
export interface EventBroadcastPayload {
|
|
133
|
+
topic: string;
|
|
134
|
+
payload: unknown;
|
|
135
|
+
emittedAt: number;
|
|
136
|
+
}
|
|
137
|
+
/** Payload delivered in response to a consent request. */
|
|
138
|
+
export interface ConsentResultPayload {
|
|
139
|
+
scope: string;
|
|
140
|
+
granted: boolean;
|
|
141
|
+
grantToken?: string;
|
|
142
|
+
expiresIn?: number;
|
|
143
|
+
}
|
|
144
|
+
export interface WidgetManifestDisplay {
|
|
145
|
+
expandPreset?: 'collapsed-only' | 'all' | 'portable' | 'immersive';
|
|
146
|
+
allowedModes?: Array<'right' | 'left' | 'bottom' | 'float' | 'fullscreen'>;
|
|
147
|
+
defaultMode?: 'right' | 'left' | 'bottom' | 'float' | 'fullscreen';
|
|
148
|
+
defaultSize?: {
|
|
149
|
+
width: number;
|
|
150
|
+
height: number;
|
|
151
|
+
};
|
|
152
|
+
minSize?: {
|
|
153
|
+
width: number;
|
|
154
|
+
height: number;
|
|
155
|
+
};
|
|
156
|
+
maxSize?: {
|
|
157
|
+
width: number;
|
|
158
|
+
height: number;
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
export interface WidgetManifestServiceScope {
|
|
162
|
+
name: string;
|
|
163
|
+
reason: string;
|
|
164
|
+
}
|
|
165
|
+
export interface WidgetManifestServiceBlock {
|
|
166
|
+
url: string;
|
|
167
|
+
jwksOverride?: string | null;
|
|
168
|
+
scopes: WidgetManifestServiceScope[];
|
|
169
|
+
events?: {
|
|
170
|
+
in?: string[];
|
|
171
|
+
out?: string[];
|
|
172
|
+
};
|
|
173
|
+
rateLimit?: {
|
|
174
|
+
perSecond?: number;
|
|
175
|
+
perMinute?: number;
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
export interface WidgetServiceClient {
|
|
179
|
+
/** Joins `path` against `manifest.service.url`, attaches Bearer JWT, returns parsed JSON. */
|
|
180
|
+
fetch<T = unknown>(path: string, init?: RequestInit): Promise<T>;
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAMA,4DAA4D;AAC5D,MAAM,MAAM,kBAAkB,GAAG,WAA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AM,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7C;AAMD,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,0BAA0B;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,0BAA0B,EAAE,CAAC;IACrC,MAAM,CAAC,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAC3C,SAAS,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACxD;AAED,MAAM,WAAW,mBAAmB;IAClC,6FAA6F;IAC7F,KAAK,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAClE"}
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@goflowstate/widget-sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "SDK for building Flowstate Canvas widgets",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/canvas-widget-sdk.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.mjs",
|
|
16
|
+
"default": "./dist/canvas-widget-sdk.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "node build.mjs",
|
|
21
|
+
"clean": "rm -rf dist",
|
|
22
|
+
"prepublishOnly": "node build.mjs",
|
|
23
|
+
"test": "vitest run",
|
|
24
|
+
"test:watch": "vitest"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"esbuild": "^0.24.0",
|
|
31
|
+
"jsdom": "^28.1.0",
|
|
32
|
+
"typescript": "^5.3.3",
|
|
33
|
+
"vitest": "^4.0.18"
|
|
34
|
+
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://github.com/starteryllp/goflowstate-sdk.git"
|
|
38
|
+
},
|
|
39
|
+
"license": "MIT"
|
|
40
|
+
}
|