timeback 0.1.1 → 0.1.2
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 +61 -0
- package/dist/index.d.ts +20 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -1
- package/dist/server/adapters/express.d.ts +9 -5
- package/dist/server/adapters/express.d.ts.map +1 -1
- package/dist/server/adapters/express.js +19 -3
- package/dist/server/adapters/native.d.ts +5 -3
- package/dist/server/adapters/native.d.ts.map +1 -1
- package/dist/server/adapters/native.js +11 -3
- package/dist/server/adapters/nextjs.d.ts +5 -3
- package/dist/server/adapters/nextjs.d.ts.map +1 -1
- package/dist/server/adapters/nextjs.js +11 -3
- package/dist/server/adapters/nuxt.d.ts +6 -4
- package/dist/server/adapters/nuxt.d.ts.map +1 -1
- package/dist/server/adapters/nuxt.js +16 -6
- package/dist/server/adapters/solid-start.d.ts +5 -3
- package/dist/server/adapters/solid-start.d.ts.map +1 -1
- package/dist/server/adapters/solid-start.js +16 -6
- package/dist/server/adapters/svelte-kit.d.ts +5 -3
- package/dist/server/adapters/svelte-kit.d.ts.map +1 -1
- package/dist/server/adapters/svelte-kit.js +16 -6
- package/dist/server/adapters/tanstack-start.d.ts +5 -3
- package/dist/server/adapters/tanstack-start.d.ts.map +1 -1
- package/dist/server/adapters/tanstack-start.js +11 -3
- package/dist/server/adapters/types.d.ts +25 -11
- package/dist/server/adapters/types.d.ts.map +1 -1
- package/dist/server/adapters/utils.d.ts +24 -5
- package/dist/server/adapters/utils.d.ts.map +1 -1
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/timeback.d.ts +39 -2
- package/dist/server/timeback.d.ts.map +1 -1
- package/dist/server/types.d.ts +37 -0
- package/dist/server/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,6 +19,7 @@ TypeScript SDK for integrating Timeback into your application. Provides server-s
|
|
|
19
19
|
- [Svelte](#svelte)
|
|
20
20
|
- [Solid](#solid)
|
|
21
21
|
- [Identity Modes](#identity-modes)
|
|
22
|
+
- [Identity-Only Integration](#identity-only-integration)
|
|
22
23
|
- [Activity Tracking](#activity-tracking)
|
|
23
24
|
|
|
24
25
|
## Installation
|
|
@@ -356,6 +357,66 @@ identity: {
|
|
|
356
357
|
}
|
|
357
358
|
```
|
|
358
359
|
|
|
360
|
+
## Identity-Only Integration
|
|
361
|
+
|
|
362
|
+
If you only need Timeback SSO authentication without activity tracking or Timeback API integration, use `createIdentityServer()`. This is a lightweight alternative that:
|
|
363
|
+
|
|
364
|
+
- Does not require Timeback API credentials
|
|
365
|
+
- Does not require `timeback.config.ts`
|
|
366
|
+
- Only exposes identity routes (sign-in, callback, sign-out)
|
|
367
|
+
|
|
368
|
+
### Server Setup
|
|
369
|
+
|
|
370
|
+
```typescript
|
|
371
|
+
// lib/timeback.ts
|
|
372
|
+
import { createIdentityServer } from 'timeback'
|
|
373
|
+
|
|
374
|
+
export const timeback = createIdentityServer({
|
|
375
|
+
env: 'production',
|
|
376
|
+
identity: {
|
|
377
|
+
mode: 'sso',
|
|
378
|
+
clientId: process.env.AWS_COGNITO_CLIENT_ID!,
|
|
379
|
+
clientSecret: process.env.AWS_COGNITO_CLIENT_SECRET!,
|
|
380
|
+
onCallbackSuccess: async ({ user, tokens, redirect }) => {
|
|
381
|
+
// Create your own session, then redirect
|
|
382
|
+
await createSession(user)
|
|
383
|
+
return redirect('/')
|
|
384
|
+
},
|
|
385
|
+
onCallbackError: ({ error, redirect }) => {
|
|
386
|
+
console.error('SSO Error:', error)
|
|
387
|
+
return redirect('/login?error=sso_failed')
|
|
388
|
+
},
|
|
389
|
+
getUser: req => getSessionFromRequest(req),
|
|
390
|
+
},
|
|
391
|
+
})
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### Next.js
|
|
395
|
+
|
|
396
|
+
```typescript
|
|
397
|
+
// app/api/timeback/[...timeback]/route.ts
|
|
398
|
+
import { toNextjsHandler } from 'timeback/nextjs'
|
|
399
|
+
|
|
400
|
+
import { timeback } from '@/lib/timeback'
|
|
401
|
+
|
|
402
|
+
export const { GET, POST } = toNextjsHandler(timeback)
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
### Express
|
|
406
|
+
|
|
407
|
+
```typescript
|
|
408
|
+
// server.ts
|
|
409
|
+
import express from 'express'
|
|
410
|
+
import { toExpressMiddleware } from 'timeback/express'
|
|
411
|
+
|
|
412
|
+
import { timeback } from './lib/timeback'
|
|
413
|
+
|
|
414
|
+
const app = express()
|
|
415
|
+
app.use('/api/timeback', toExpressMiddleware(timeback))
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
All other framework adapters (Nuxt, SvelteKit, SolidStart, TanStack Start) work identically with identity-only instances.
|
|
419
|
+
|
|
359
420
|
## Activity Tracking
|
|
360
421
|
|
|
361
422
|
Activities track time spent on learning content:
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Server-side exports for the Timeback SDK.
|
|
5
5
|
*
|
|
6
|
-
* @example
|
|
6
|
+
* @example Full SDK (activity tracking + identity)
|
|
7
7
|
* ```typescript
|
|
8
8
|
* import { createServer } from 'timeback'
|
|
9
9
|
*
|
|
@@ -23,8 +23,25 @@
|
|
|
23
23
|
* },
|
|
24
24
|
* })
|
|
25
25
|
* ```
|
|
26
|
+
*
|
|
27
|
+
* @example Identity-only (SSO without activity tracking)
|
|
28
|
+
* ```typescript
|
|
29
|
+
* import { createIdentityServer } from 'timeback'
|
|
30
|
+
*
|
|
31
|
+
* export const timeback = createIdentityServer({
|
|
32
|
+
* env: 'production',
|
|
33
|
+
* identity: {
|
|
34
|
+
* mode: 'sso',
|
|
35
|
+
* clientId: process.env.AWS_COGNITO_CLIENT_ID!,
|
|
36
|
+
* clientSecret: process.env.AWS_COGNITO_CLIENT_SECRET!,
|
|
37
|
+
* onCallbackSuccess: ({ user, redirect }) => redirect('/'),
|
|
38
|
+
* onCallbackError: ({ error, redirect }) => redirect('/?error=sso_failed'),
|
|
39
|
+
* getUser: (req) => getSession(req),
|
|
40
|
+
* },
|
|
41
|
+
* })
|
|
42
|
+
* ```
|
|
26
43
|
*/
|
|
27
|
-
export { createServer } from './server';
|
|
28
|
-
export type { ApiCredentials, CustomIdentityConfig, Environment, IdentityConfig, SsoIdentityConfig, TimebackConfig, TimebackInstance, BuildStateContext, CallbackSuccessContext, CallbackErrorContext, OIDCTokens, OIDCUserInfo, } from './server';
|
|
44
|
+
export { createServer, createIdentityServer } from './server';
|
|
45
|
+
export type { ApiCredentials, CustomIdentityConfig, Environment, IdentityConfig, SsoIdentityConfig, TimebackConfig, TimebackInstance, IdentityOnlyConfig, IdentityOnlyInstance, IdentityOnlyHandlers, BuildStateContext, CallbackSuccessContext, CallbackErrorContext, OIDCTokens, OIDCUserInfo, } from './server';
|
|
29
46
|
export type { TimebackUser, ActivityParams, ActivityMetrics } from './shared/types';
|
|
30
47
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAC7D,YAAY,EACX,cAAc,EACd,oBAAoB,EACpB,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,UAAU,EACV,YAAY,GACZ,MAAM,UAAU,CAAA;AAEjB,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1374,6 +1374,19 @@ async function createServer(config2) {
|
|
|
1374
1374
|
}
|
|
1375
1375
|
};
|
|
1376
1376
|
}
|
|
1377
|
+
function createIdentityServer(config2) {
|
|
1378
|
+
const identity = createIdentityHandlers({
|
|
1379
|
+
env: config2.env,
|
|
1380
|
+
identity: config2.identity
|
|
1381
|
+
});
|
|
1382
|
+
return {
|
|
1383
|
+
config: config2,
|
|
1384
|
+
handle: {
|
|
1385
|
+
identity
|
|
1386
|
+
}
|
|
1387
|
+
};
|
|
1388
|
+
}
|
|
1377
1389
|
export {
|
|
1378
|
-
createServer
|
|
1390
|
+
createServer,
|
|
1391
|
+
createIdentityServer
|
|
1379
1392
|
};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Uses minimal generic interfaces that work with any framework implementing
|
|
8
8
|
* the Express middleware pattern.
|
|
9
9
|
*/
|
|
10
|
-
import type { ExpressLikeHandler, ExpressLikeRouter
|
|
10
|
+
import type { AnyTimebackInput, ExpressLikeHandler, ExpressLikeRouter } from './types';
|
|
11
11
|
/**
|
|
12
12
|
* Convert Timeback instance to Express middleware.
|
|
13
13
|
*
|
|
@@ -15,7 +15,9 @@ import type { ExpressLikeHandler, ExpressLikeRouter, TimebackInput } from './typ
|
|
|
15
15
|
* - `toExpressMiddleware(timeback)`
|
|
16
16
|
* - `toExpressMiddleware(timeback.handle)`
|
|
17
17
|
*
|
|
18
|
-
*
|
|
18
|
+
* Also accepts identity-only instances from `createIdentityServer()`.
|
|
19
|
+
*
|
|
20
|
+
* @param input - Timeback instance or handlers (full or identity-only)
|
|
19
21
|
* @returns Express middleware function
|
|
20
22
|
*
|
|
21
23
|
* @example
|
|
@@ -32,7 +34,7 @@ import type { ExpressLikeHandler, ExpressLikeRouter, TimebackInput } from './typ
|
|
|
32
34
|
* app.listen(3000)
|
|
33
35
|
* ```
|
|
34
36
|
*/
|
|
35
|
-
export declare function toExpressMiddleware(input:
|
|
37
|
+
export declare function toExpressMiddleware(input: AnyTimebackInput): ExpressLikeHandler;
|
|
36
38
|
/**
|
|
37
39
|
* Mount Timeback routes on an Express router.
|
|
38
40
|
*
|
|
@@ -40,7 +42,9 @@ export declare function toExpressMiddleware(input: TimebackInput): ExpressLikeHa
|
|
|
40
42
|
* - `mountExpressRoutes(timeback, router)`
|
|
41
43
|
* - `mountExpressRoutes(timeback.handle, router)`
|
|
42
44
|
*
|
|
43
|
-
*
|
|
45
|
+
* Also accepts identity-only instances from `createIdentityServer()`.
|
|
46
|
+
*
|
|
47
|
+
* @param input - Timeback instance or handlers (full or identity-only)
|
|
44
48
|
* @param router - Express router to mount routes on
|
|
45
49
|
*
|
|
46
50
|
* @example
|
|
@@ -58,5 +62,5 @@ export declare function toExpressMiddleware(input: TimebackInput): ExpressLikeHa
|
|
|
58
62
|
* app.listen(3000)
|
|
59
63
|
* ```
|
|
60
64
|
*/
|
|
61
|
-
export declare function mountExpressRoutes(input:
|
|
65
|
+
export declare function mountExpressRoutes(input: AnyTimebackInput, router: ExpressLikeRouter): void;
|
|
62
66
|
//# sourceMappingURL=express.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"express.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/express.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,KAAK,EACX,kBAAkB,EAIlB,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"express.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/express.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,KAAK,EACX,gBAAgB,EAChB,kBAAkB,EAIlB,iBAAiB,EACjB,MAAM,SAAS,CAAA;AA6FhB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,GAAG,kBAAkB,CAqD/E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAyD3F"}
|
|
@@ -470,6 +470,12 @@ function decodeBase64Url(encoded) {
|
|
|
470
470
|
function getHandlers(input) {
|
|
471
471
|
return "handle" in input ? input.handle : input;
|
|
472
472
|
}
|
|
473
|
+
function hasActivityHandler(handlers) {
|
|
474
|
+
return "activity" in handlers;
|
|
475
|
+
}
|
|
476
|
+
function hasUserHandler(handlers) {
|
|
477
|
+
return "user" in handlers;
|
|
478
|
+
}
|
|
473
479
|
|
|
474
480
|
// src/server/adapters/express.ts
|
|
475
481
|
function toWebRequest(req) {
|
|
@@ -525,8 +531,13 @@ function toExpressMiddleware(input) {
|
|
|
525
531
|
return Promise.resolve(handle.identity.signOut());
|
|
526
532
|
}
|
|
527
533
|
}
|
|
528
|
-
if (
|
|
529
|
-
if (path.endsWith(ROUTES.
|
|
534
|
+
if (hasUserHandler(handle)) {
|
|
535
|
+
if (req.method === "GET" && path.endsWith(ROUTES.USER.ME)) {
|
|
536
|
+
return handle.user.me(webReq);
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
if (hasActivityHandler(handle)) {
|
|
540
|
+
if (req.method === "POST" && path.endsWith(ROUTES.ACTIVITY)) {
|
|
530
541
|
return handle.activity(webReq);
|
|
531
542
|
}
|
|
532
543
|
}
|
|
@@ -557,7 +568,12 @@ function mountExpressRoutes(input, router) {
|
|
|
557
568
|
router.get(ROUTES.IDENTITY.SIGNIN, createHandler((req) => handle.identity.signIn(req)));
|
|
558
569
|
router.get(ROUTES.IDENTITY.CALLBACK, createHandler((req) => handle.identity.callback(req)));
|
|
559
570
|
router.get(ROUTES.IDENTITY.SIGNOUT, createHandler(() => handle.identity.signOut()));
|
|
560
|
-
|
|
571
|
+
if (hasUserHandler(handle)) {
|
|
572
|
+
router.get(ROUTES.USER.ME, createHandler((req) => handle.user.me(req)));
|
|
573
|
+
}
|
|
574
|
+
if (hasActivityHandler(handle)) {
|
|
575
|
+
router.post(ROUTES.ACTIVITY, createHandler((req) => handle.activity(req)));
|
|
576
|
+
}
|
|
561
577
|
}
|
|
562
578
|
export {
|
|
563
579
|
toExpressMiddleware,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Universal handler for any runtime that supports the Web Fetch API:
|
|
5
5
|
* Bun, Deno, Cloudflare Workers, Hono, etc.
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
7
|
+
import type { AnyTimebackInput, NativeHandlerOptions } from './types';
|
|
8
8
|
/**
|
|
9
9
|
* Create a native Fetch API handler.
|
|
10
10
|
*
|
|
@@ -15,7 +15,9 @@ import type { NativeHandlerOptions, TimebackInput } from './types';
|
|
|
15
15
|
* - `toNativeHandler(timeback)`
|
|
16
16
|
* - `toNativeHandler(timeback.handle)`
|
|
17
17
|
*
|
|
18
|
-
*
|
|
18
|
+
* Also accepts identity-only instances from `createIdentityServer()`.
|
|
19
|
+
*
|
|
20
|
+
* @param input - Timeback instance or handlers (full or identity-only)
|
|
19
21
|
* @returns Universal request handler
|
|
20
22
|
*
|
|
21
23
|
* @example
|
|
@@ -41,5 +43,5 @@ import type { NativeHandlerOptions, TimebackInput } from './types';
|
|
|
41
43
|
* Deno.serve(handler)
|
|
42
44
|
* ```
|
|
43
45
|
*/
|
|
44
|
-
export declare function toNativeHandler(input:
|
|
46
|
+
export declare function toNativeHandler(input: AnyTimebackInput | NativeHandlerOptions): (req: Request) => Promise<Response>;
|
|
45
47
|
//# sourceMappingURL=native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/native.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/native.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAYrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,eAAe,CAC9B,KAAK,EAAE,gBAAgB,GAAG,oBAAoB,GAC5C,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CA2CrC"}
|
|
@@ -470,6 +470,12 @@ function decodeBase64Url(encoded) {
|
|
|
470
470
|
function getHandlers(input) {
|
|
471
471
|
return "handle" in input ? input.handle : input;
|
|
472
472
|
}
|
|
473
|
+
function hasActivityHandler(handlers) {
|
|
474
|
+
return "activity" in handlers;
|
|
475
|
+
}
|
|
476
|
+
function hasUserHandler(handlers) {
|
|
477
|
+
return "user" in handlers;
|
|
478
|
+
}
|
|
473
479
|
|
|
474
480
|
// src/server/adapters/native.ts
|
|
475
481
|
function isNativeHandlerOptions(v) {
|
|
@@ -492,12 +498,14 @@ function toNativeHandler(input) {
|
|
|
492
498
|
if (path.endsWith(ROUTES.IDENTITY.SIGNOUT)) {
|
|
493
499
|
return Promise.resolve(handle.identity.signOut());
|
|
494
500
|
}
|
|
495
|
-
|
|
501
|
+
}
|
|
502
|
+
if (hasUserHandler(handle)) {
|
|
503
|
+
if (method === "GET" && path.endsWith(ROUTES.USER.ME)) {
|
|
496
504
|
return handle.user.me(req);
|
|
497
505
|
}
|
|
498
506
|
}
|
|
499
|
-
if (
|
|
500
|
-
if (path.endsWith(ROUTES.ACTIVITY)) {
|
|
507
|
+
if (hasActivityHandler(handle)) {
|
|
508
|
+
if (method === "POST" && path.endsWith(ROUTES.ACTIVITY)) {
|
|
501
509
|
return handle.activity(req);
|
|
502
510
|
}
|
|
503
511
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Adapts Timeback handlers for Next.js App Router.
|
|
5
5
|
*/
|
|
6
|
-
import type {
|
|
6
|
+
import type { AnyTimebackInput, NextjsHandlers } from './types';
|
|
7
7
|
/**
|
|
8
8
|
* Convert Timeback instance to Next.js App Router handlers.
|
|
9
9
|
*
|
|
@@ -14,7 +14,9 @@ import type { NextjsHandlers, TimebackInput } from './types';
|
|
|
14
14
|
* - `toNextjsHandler(timeback)`
|
|
15
15
|
* - `toNextjsHandler(timeback.handle)`
|
|
16
16
|
*
|
|
17
|
-
*
|
|
17
|
+
* Also accepts identity-only instances from `createIdentityServer()`.
|
|
18
|
+
*
|
|
19
|
+
* @param input - Timeback instance or handlers (full or identity-only)
|
|
18
20
|
* @returns Object with HTTP method handlers for Next.js App Router
|
|
19
21
|
*
|
|
20
22
|
* @example
|
|
@@ -26,5 +28,5 @@ import type { NextjsHandlers, TimebackInput } from './types';
|
|
|
26
28
|
* export const { GET, POST } = toNextjsHandler(timeback)
|
|
27
29
|
* ```
|
|
28
30
|
*/
|
|
29
|
-
export declare function toNextjsHandler(input:
|
|
31
|
+
export declare function toNextjsHandler(input: AnyTimebackInput): NextjsHandlers;
|
|
30
32
|
//# sourceMappingURL=nextjs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/nextjs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"nextjs.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/nextjs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE/D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,GAAG,cAAc,CAUvE"}
|
|
@@ -470,6 +470,12 @@ function decodeBase64Url(encoded) {
|
|
|
470
470
|
function getHandlers(input) {
|
|
471
471
|
return "handle" in input ? input.handle : input;
|
|
472
472
|
}
|
|
473
|
+
function hasActivityHandler(handlers) {
|
|
474
|
+
return "activity" in handlers;
|
|
475
|
+
}
|
|
476
|
+
function hasUserHandler(handlers) {
|
|
477
|
+
return "user" in handlers;
|
|
478
|
+
}
|
|
473
479
|
|
|
474
480
|
// src/server/adapters/native.ts
|
|
475
481
|
function isNativeHandlerOptions(v) {
|
|
@@ -492,12 +498,14 @@ function toNativeHandler(input) {
|
|
|
492
498
|
if (path.endsWith(ROUTES.IDENTITY.SIGNOUT)) {
|
|
493
499
|
return Promise.resolve(handle.identity.signOut());
|
|
494
500
|
}
|
|
495
|
-
|
|
501
|
+
}
|
|
502
|
+
if (hasUserHandler(handle)) {
|
|
503
|
+
if (method === "GET" && path.endsWith(ROUTES.USER.ME)) {
|
|
496
504
|
return handle.user.me(req);
|
|
497
505
|
}
|
|
498
506
|
}
|
|
499
|
-
if (
|
|
500
|
-
if (path.endsWith(ROUTES.ACTIVITY)) {
|
|
507
|
+
if (hasActivityHandler(handle)) {
|
|
508
|
+
if (method === "POST" && path.endsWith(ROUTES.ACTIVITY)) {
|
|
501
509
|
return handle.activity(req);
|
|
502
510
|
}
|
|
503
511
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* This adapter does NOT import h3 or nuxt - it uses minimal interfaces
|
|
8
8
|
* that are compatible with H3's event structure.
|
|
9
9
|
*/
|
|
10
|
-
import type { NuxtHandlerOptions, NuxtHandlers, NuxtLikeEvent
|
|
10
|
+
import type { AnyTimebackInput, NuxtHandlerOptions, NuxtHandlers, NuxtLikeEvent } from './types';
|
|
11
11
|
/**
|
|
12
12
|
* Nuxt server middleware handler for Timeback.
|
|
13
13
|
*
|
|
@@ -68,7 +68,9 @@ export declare function nuxtHandler<TEvent extends NuxtLikeEvent>(options: NuxtH
|
|
|
68
68
|
* - `toNuxtHandler(timeback)`
|
|
69
69
|
* - `toNuxtHandler(timeback.handle)`
|
|
70
70
|
*
|
|
71
|
-
*
|
|
71
|
+
* Also accepts identity-only instances from `createIdentityServer()`.
|
|
72
|
+
*
|
|
73
|
+
* @param input - Timeback instance or handlers (full or identity-only), or options object
|
|
72
74
|
* @returns Object with HTTP method handlers for Nuxt
|
|
73
75
|
*
|
|
74
76
|
* @example
|
|
@@ -89,8 +91,8 @@ export declare function nuxtHandler<TEvent extends NuxtLikeEvent>(options: NuxtH
|
|
|
89
91
|
* })
|
|
90
92
|
* ```
|
|
91
93
|
*/
|
|
92
|
-
export declare function toNuxtHandler(input:
|
|
93
|
-
timeback:
|
|
94
|
+
export declare function toNuxtHandler(input: AnyTimebackInput | {
|
|
95
|
+
timeback: AnyTimebackInput;
|
|
94
96
|
callbackPath?: string;
|
|
95
97
|
}): NuxtHandlers;
|
|
96
98
|
//# sourceMappingURL=nuxt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nuxt.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/nuxt.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"nuxt.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/nuxt.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,KAAK,EACX,gBAAgB,EAEhB,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,MAAM,SAAS,CAAA;AAsNhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAsB,WAAW,CAAC,MAAM,SAAS,aAAa,EAC7D,OAAO,EAAE,kBAAkB,CAAC,MAAM,CAAC,GACjC,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CA+C/B;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,aAAa,CAC5B,KAAK,EAAE,gBAAgB,GAAG;IAAE,QAAQ,EAAE,gBAAgB,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7E,YAAY,CAyDd"}
|
|
@@ -470,6 +470,12 @@ function decodeBase64Url(encoded) {
|
|
|
470
470
|
function getHandlers(input) {
|
|
471
471
|
return "handle" in input ? input.handle : input;
|
|
472
472
|
}
|
|
473
|
+
function hasActivityHandler(handlers) {
|
|
474
|
+
return "activity" in handlers;
|
|
475
|
+
}
|
|
476
|
+
function hasUserHandler(handlers) {
|
|
477
|
+
return "user" in handlers;
|
|
478
|
+
}
|
|
473
479
|
|
|
474
480
|
// src/server/adapters/nuxt.ts
|
|
475
481
|
function bufferNodeBody(req) {
|
|
@@ -597,13 +603,15 @@ async function nuxtHandler(options) {
|
|
|
597
603
|
if (path.endsWith(ROUTES.IDENTITY.SIGNOUT)) {
|
|
598
604
|
return handle.identity.signOut();
|
|
599
605
|
}
|
|
600
|
-
|
|
606
|
+
}
|
|
607
|
+
if (hasUserHandler(handle)) {
|
|
608
|
+
if (method === "GET" && path.endsWith(ROUTES.USER.ME)) {
|
|
601
609
|
const request = await toWebRequest(event);
|
|
602
610
|
return handle.user.me(request);
|
|
603
611
|
}
|
|
604
612
|
}
|
|
605
|
-
if (
|
|
606
|
-
if (path.endsWith(ROUTES.ACTIVITY)) {
|
|
613
|
+
if (hasActivityHandler(handle)) {
|
|
614
|
+
if (method === "POST" && path.endsWith(ROUTES.ACTIVITY)) {
|
|
607
615
|
const request = await toWebRequest(event);
|
|
608
616
|
return handle.activity(request);
|
|
609
617
|
}
|
|
@@ -633,13 +641,15 @@ function toNuxtHandler(input) {
|
|
|
633
641
|
if (path.endsWith(ROUTES.IDENTITY.SIGNOUT)) {
|
|
634
642
|
return handle.identity.signOut();
|
|
635
643
|
}
|
|
636
|
-
|
|
644
|
+
}
|
|
645
|
+
if (hasUserHandler(handle)) {
|
|
646
|
+
if (method === "GET" && path.endsWith(ROUTES.USER.ME)) {
|
|
637
647
|
const request = await toWebRequest(event);
|
|
638
648
|
return handle.user.me(request);
|
|
639
649
|
}
|
|
640
650
|
}
|
|
641
|
-
if (
|
|
642
|
-
if (path.endsWith(ROUTES.ACTIVITY)) {
|
|
651
|
+
if (hasActivityHandler(handle)) {
|
|
652
|
+
if (method === "POST" && path.endsWith(ROUTES.ACTIVITY)) {
|
|
643
653
|
const request = await toWebRequest(event);
|
|
644
654
|
return handle.activity(request);
|
|
645
655
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Adapts Timeback handlers for SolidStart.
|
|
5
5
|
* Uses file-based API routes with SolidStart's APIEvent.
|
|
6
6
|
*/
|
|
7
|
-
import type { SolidStartHandlerOptions, SolidStartHandlers
|
|
7
|
+
import type { AnyTimebackInput, SolidStartHandlerOptions, SolidStartHandlers } from './types';
|
|
8
8
|
/**
|
|
9
9
|
* Convert Timeback instance to SolidStart route handlers.
|
|
10
10
|
*
|
|
@@ -15,7 +15,9 @@ import type { SolidStartHandlerOptions, SolidStartHandlers, TimebackInput } from
|
|
|
15
15
|
* - `toSolidStartHandler(timeback)`
|
|
16
16
|
* - `toSolidStartHandler(timeback.handle)`
|
|
17
17
|
*
|
|
18
|
-
*
|
|
18
|
+
* Also accepts identity-only instances from `createIdentityServer()`.
|
|
19
|
+
*
|
|
20
|
+
* @param input - Timeback instance or handlers (full or identity-only)
|
|
19
21
|
* @returns Object with HTTP method handlers for SolidStart
|
|
20
22
|
*
|
|
21
23
|
* @example
|
|
@@ -27,7 +29,7 @@ import type { SolidStartHandlerOptions, SolidStartHandlers, TimebackInput } from
|
|
|
27
29
|
* export const { GET, POST } = toSolidStartHandler(timeback)
|
|
28
30
|
* ```
|
|
29
31
|
*/
|
|
30
|
-
export declare function toSolidStartHandler(input:
|
|
32
|
+
export declare function toSolidStartHandler(input: AnyTimebackInput): SolidStartHandlers;
|
|
31
33
|
/**
|
|
32
34
|
* SolidStart middleware handler for Timeback.
|
|
33
35
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solid-start.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/solid-start.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"solid-start.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/solid-start.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAM7F;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,GAAG,kBAAkB,CA4C/E;AA2BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,iBAAiB,CAChC,OAAO,EAAE,wBAAwB,GAC/B,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,SAAS,CA+C1C"}
|
|
@@ -470,6 +470,12 @@ function decodeBase64Url(encoded) {
|
|
|
470
470
|
function getHandlers(input) {
|
|
471
471
|
return "handle" in input ? input.handle : input;
|
|
472
472
|
}
|
|
473
|
+
function hasActivityHandler(handlers) {
|
|
474
|
+
return "activity" in handlers;
|
|
475
|
+
}
|
|
476
|
+
function hasUserHandler(handlers) {
|
|
477
|
+
return "user" in handlers;
|
|
478
|
+
}
|
|
473
479
|
|
|
474
480
|
// src/server/adapters/solid-start.ts
|
|
475
481
|
function toSolidStartHandler(input) {
|
|
@@ -488,12 +494,14 @@ function toSolidStartHandler(input) {
|
|
|
488
494
|
if (path.endsWith(ROUTES.IDENTITY.SIGNOUT)) {
|
|
489
495
|
return handle.identity.signOut();
|
|
490
496
|
}
|
|
491
|
-
|
|
497
|
+
}
|
|
498
|
+
if (hasUserHandler(handle)) {
|
|
499
|
+
if (method === "GET" && path.endsWith(ROUTES.USER.ME)) {
|
|
492
500
|
return handle.user.me(event.request);
|
|
493
501
|
}
|
|
494
502
|
}
|
|
495
|
-
if (
|
|
496
|
-
if (path.endsWith(ROUTES.ACTIVITY)) {
|
|
503
|
+
if (hasActivityHandler(handle)) {
|
|
504
|
+
if (method === "POST" && path.endsWith(ROUTES.ACTIVITY)) {
|
|
497
505
|
return handle.activity(event.request);
|
|
498
506
|
}
|
|
499
507
|
}
|
|
@@ -534,12 +542,14 @@ function solidStartHandler(options) {
|
|
|
534
542
|
if (path.endsWith(ROUTES.IDENTITY.SIGNOUT)) {
|
|
535
543
|
return handle.identity.signOut();
|
|
536
544
|
}
|
|
537
|
-
|
|
545
|
+
}
|
|
546
|
+
if (hasUserHandler(handle)) {
|
|
547
|
+
if (method === "GET" && path.endsWith(ROUTES.USER.ME)) {
|
|
538
548
|
return handle.user.me(request);
|
|
539
549
|
}
|
|
540
550
|
}
|
|
541
|
-
if (
|
|
542
|
-
if (path.endsWith(ROUTES.ACTIVITY)) {
|
|
551
|
+
if (hasActivityHandler(handle)) {
|
|
552
|
+
if (method === "POST" && path.endsWith(ROUTES.ACTIVITY)) {
|
|
543
553
|
return handle.activity(request);
|
|
544
554
|
}
|
|
545
555
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Adapts Timeback handlers for SvelteKit.
|
|
5
5
|
* Supports both hooks-based (recommended) and route-based approaches.
|
|
6
6
|
*/
|
|
7
|
-
import type { SvelteKitHandlerOptions, SvelteKitHandlers, SvelteKitRequestEvent
|
|
7
|
+
import type { AnyTimebackInput, SvelteKitHandlerOptions, SvelteKitHandlers, SvelteKitRequestEvent } from './types';
|
|
8
8
|
/**
|
|
9
9
|
* SvelteKit server hook handler for Timeback.
|
|
10
10
|
*
|
|
@@ -66,7 +66,9 @@ export declare function svelteKitHandler<TEvent extends SvelteKitRequestEvent>(o
|
|
|
66
66
|
* - `toSvelteKitHandler(timeback)`
|
|
67
67
|
* - `toSvelteKitHandler(timeback.handle)`
|
|
68
68
|
*
|
|
69
|
-
*
|
|
69
|
+
* Also accepts identity-only instances from `createIdentityServer()`.
|
|
70
|
+
*
|
|
71
|
+
* @param input - Timeback instance or handlers (full or identity-only)
|
|
70
72
|
* @returns Object with HTTP method handlers for SvelteKit
|
|
71
73
|
*
|
|
72
74
|
* @example
|
|
@@ -78,5 +80,5 @@ export declare function svelteKitHandler<TEvent extends SvelteKitRequestEvent>(o
|
|
|
78
80
|
* export const { GET, POST } = toSvelteKitHandler(timeback)
|
|
79
81
|
* ```
|
|
80
82
|
*/
|
|
81
|
-
export declare function toSvelteKitHandler(input:
|
|
83
|
+
export declare function toSvelteKitHandler(input: AnyTimebackInput): SvelteKitHandlers;
|
|
82
84
|
//# sourceMappingURL=svelte-kit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svelte-kit.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/svelte-kit.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EACX,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EAErB,
|
|
1
|
+
{"version":3,"file":"svelte-kit.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/svelte-kit.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EACX,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EAErB,MAAM,SAAS,CAAA;AA2BhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,SAAS,qBAAqB,EAC1E,OAAO,EAAE,uBAAuB,CAAC,MAAM,CAAC,GACtC,OAAO,CAAC,QAAQ,CAAC,CA8EnB;AAMD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,gBAAgB,GAAG,iBAAiB,CAgB7E"}
|
|
@@ -470,6 +470,12 @@ function decodeBase64Url(encoded) {
|
|
|
470
470
|
function getHandlers(input) {
|
|
471
471
|
return "handle" in input ? input.handle : input;
|
|
472
472
|
}
|
|
473
|
+
function hasActivityHandler(handlers) {
|
|
474
|
+
return "activity" in handlers;
|
|
475
|
+
}
|
|
476
|
+
function hasUserHandler(handlers) {
|
|
477
|
+
return "user" in handlers;
|
|
478
|
+
}
|
|
473
479
|
|
|
474
480
|
// src/server/adapters/native.ts
|
|
475
481
|
function isNativeHandlerOptions(v) {
|
|
@@ -492,12 +498,14 @@ function toNativeHandler(input) {
|
|
|
492
498
|
if (path.endsWith(ROUTES.IDENTITY.SIGNOUT)) {
|
|
493
499
|
return Promise.resolve(handle.identity.signOut());
|
|
494
500
|
}
|
|
495
|
-
|
|
501
|
+
}
|
|
502
|
+
if (hasUserHandler(handle)) {
|
|
503
|
+
if (method === "GET" && path.endsWith(ROUTES.USER.ME)) {
|
|
496
504
|
return handle.user.me(req);
|
|
497
505
|
}
|
|
498
506
|
}
|
|
499
|
-
if (
|
|
500
|
-
if (path.endsWith(ROUTES.ACTIVITY)) {
|
|
507
|
+
if (hasActivityHandler(handle)) {
|
|
508
|
+
if (method === "POST" && path.endsWith(ROUTES.ACTIVITY)) {
|
|
501
509
|
return handle.activity(req);
|
|
502
510
|
}
|
|
503
511
|
}
|
|
@@ -542,12 +550,14 @@ async function svelteKitHandler(options) {
|
|
|
542
550
|
if (path.endsWith(ROUTES.IDENTITY.SIGNOUT)) {
|
|
543
551
|
return handle.identity.signOut();
|
|
544
552
|
}
|
|
545
|
-
|
|
553
|
+
}
|
|
554
|
+
if (hasUserHandler(handle)) {
|
|
555
|
+
if (method === "GET" && path.endsWith(ROUTES.USER.ME)) {
|
|
546
556
|
return await handle.user.me(request);
|
|
547
557
|
}
|
|
548
558
|
}
|
|
549
|
-
if (
|
|
550
|
-
if (path.endsWith(ROUTES.ACTIVITY)) {
|
|
559
|
+
if (hasActivityHandler(handle)) {
|
|
560
|
+
if (method === "POST" && path.endsWith(ROUTES.ACTIVITY)) {
|
|
551
561
|
return await handle.activity(request);
|
|
552
562
|
}
|
|
553
563
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Adapts Timeback handlers for TanStack Start.
|
|
5
5
|
* Uses file-based API routes with TanStack's createFileRoute.
|
|
6
6
|
*/
|
|
7
|
-
import type { TanStackStartHandlerOptions, TanStackStartHandlers
|
|
7
|
+
import type { AnyTimebackInput, TanStackStartHandlerOptions, TanStackStartHandlers } from './types';
|
|
8
8
|
/**
|
|
9
9
|
* Convert Timeback instance to TanStack Start route handlers.
|
|
10
10
|
*
|
|
@@ -15,7 +15,9 @@ import type { TanStackStartHandlerOptions, TanStackStartHandlers, TimebackInput
|
|
|
15
15
|
* - `toTanStackStartHandler(timeback)`
|
|
16
16
|
* - `toTanStackStartHandler(timeback.handle)`
|
|
17
17
|
*
|
|
18
|
-
*
|
|
18
|
+
* Also accepts identity-only instances from `createIdentityServer()`.
|
|
19
|
+
*
|
|
20
|
+
* @param input - Timeback instance or handlers (full or identity-only), or options object
|
|
19
21
|
* @returns Object with HTTP method handlers for TanStack Start
|
|
20
22
|
*
|
|
21
23
|
* @example
|
|
@@ -32,7 +34,7 @@ import type { TanStackStartHandlerOptions, TanStackStartHandlers, TimebackInput
|
|
|
32
34
|
* })
|
|
33
35
|
* ```
|
|
34
36
|
*/
|
|
35
|
-
export declare function toTanStackStartHandler(input:
|
|
37
|
+
export declare function toTanStackStartHandler(input: AnyTimebackInput | TanStackStartHandlerOptions): TanStackStartHandlers;
|
|
36
38
|
/**
|
|
37
39
|
* Alias for toTanStackStartHandler for consistency with other adapters.
|
|
38
40
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tanstack-start.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/tanstack-start.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"tanstack-start.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/tanstack-start.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EACX,gBAAgB,EAEhB,2BAA2B,EAC3B,qBAAqB,EACrB,MAAM,SAAS,CAAA;AAMhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,gBAAgB,GAAG,2BAA2B,GACnD,qBAAqB,CAkDvB;AAcD;;GAEG;AACH,eAAO,MAAM,oBAAoB,+BAAyB,CAAA"}
|
|
@@ -470,6 +470,12 @@ function decodeBase64Url(encoded) {
|
|
|
470
470
|
function getHandlers(input) {
|
|
471
471
|
return "handle" in input ? input.handle : input;
|
|
472
472
|
}
|
|
473
|
+
function hasActivityHandler(handlers) {
|
|
474
|
+
return "activity" in handlers;
|
|
475
|
+
}
|
|
476
|
+
function hasUserHandler(handlers) {
|
|
477
|
+
return "user" in handlers;
|
|
478
|
+
}
|
|
473
479
|
|
|
474
480
|
// src/server/adapters/tanstack-start.ts
|
|
475
481
|
function toTanStackStartHandler(input) {
|
|
@@ -493,12 +499,14 @@ function toTanStackStartHandler(input) {
|
|
|
493
499
|
if (path.endsWith(ROUTES.IDENTITY.SIGNOUT)) {
|
|
494
500
|
return handle.identity.signOut();
|
|
495
501
|
}
|
|
496
|
-
|
|
502
|
+
}
|
|
503
|
+
if (hasUserHandler(handle)) {
|
|
504
|
+
if (method === "GET" && path.endsWith(ROUTES.USER.ME)) {
|
|
497
505
|
return handle.user.me(event.request);
|
|
498
506
|
}
|
|
499
507
|
}
|
|
500
|
-
if (
|
|
501
|
-
if (path.endsWith(ROUTES.ACTIVITY)) {
|
|
508
|
+
if (hasActivityHandler(handle)) {
|
|
509
|
+
if (method === "POST" && path.endsWith(ROUTES.ACTIVITY)) {
|
|
502
510
|
return handle.activity(event.request);
|
|
503
511
|
}
|
|
504
512
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Public type definitions for server framework adapters.
|
|
5
5
|
*/
|
|
6
|
-
import type { Handlers, TimebackInstance } from '../types';
|
|
6
|
+
import type { Handlers, IdentityOnlyHandlers, IdentityOnlyInstance, TimebackInstance } from '../types';
|
|
7
7
|
/**
|
|
8
8
|
* Flexible input that accepts either a TimebackInstance or just the handlers.
|
|
9
9
|
*
|
|
@@ -12,6 +12,20 @@ import type { Handlers, TimebackInstance } from '../types';
|
|
|
12
12
|
* - `toNextjsHandler(timeback.handle)`
|
|
13
13
|
*/
|
|
14
14
|
export type TimebackInput = TimebackInstance | Handlers;
|
|
15
|
+
/**
|
|
16
|
+
* Flexible input that accepts either an IdentityOnlyInstance or just the handlers.
|
|
17
|
+
*
|
|
18
|
+
* Allows both:
|
|
19
|
+
* - `toNextjsHandler(timeback)`
|
|
20
|
+
* - `toNextjsHandler(timeback.handle)`
|
|
21
|
+
*/
|
|
22
|
+
export type IdentityOnlyInput = IdentityOnlyInstance | IdentityOnlyHandlers;
|
|
23
|
+
/**
|
|
24
|
+
* Union of all valid inputs for adapters.
|
|
25
|
+
*
|
|
26
|
+
* Adapters accept either full Timeback instances or identity-only instances.
|
|
27
|
+
*/
|
|
28
|
+
export type AnyTimebackInput = TimebackInput | IdentityOnlyInput;
|
|
15
29
|
/**
|
|
16
30
|
* Next.js route handlers.
|
|
17
31
|
*/
|
|
@@ -69,8 +83,8 @@ export type ExpressLikeHandler = (req: ExpressLikeRequest, res: ExpressLikeRespo
|
|
|
69
83
|
* Options for the native handler.
|
|
70
84
|
*/
|
|
71
85
|
export interface NativeHandlerOptions {
|
|
72
|
-
/** Timeback instance or handlers */
|
|
73
|
-
timeback:
|
|
86
|
+
/** Timeback instance or handlers (full or identity-only) */
|
|
87
|
+
timeback: AnyTimebackInput;
|
|
74
88
|
/**
|
|
75
89
|
* Custom callback path for OAuth redirect.
|
|
76
90
|
*
|
|
@@ -96,8 +110,8 @@ export interface SvelteKitRequestEvent {
|
|
|
96
110
|
* Uses generics to properly type the resolve function with the actual SvelteKit event type.
|
|
97
111
|
*/
|
|
98
112
|
export interface SvelteKitHandlerOptions<TEvent extends SvelteKitRequestEvent = SvelteKitRequestEvent> {
|
|
99
|
-
/** Timeback instance or handlers */
|
|
100
|
-
timeback:
|
|
113
|
+
/** Timeback instance or handlers (full or identity-only) */
|
|
114
|
+
timeback: AnyTimebackInput;
|
|
101
115
|
/** SvelteKit request event */
|
|
102
116
|
event: TEvent;
|
|
103
117
|
/** SvelteKit resolve function */
|
|
@@ -145,8 +159,8 @@ export interface SolidStartEvent {
|
|
|
145
159
|
* Options for the SolidStart middleware handler.
|
|
146
160
|
*/
|
|
147
161
|
export interface SolidStartHandlerOptions {
|
|
148
|
-
/** Timeback instance or handlers */
|
|
149
|
-
timeback:
|
|
162
|
+
/** Timeback instance or handlers (full or identity-only) */
|
|
163
|
+
timeback: AnyTimebackInput;
|
|
150
164
|
/** SolidStart event containing the request */
|
|
151
165
|
event: SolidStartEvent;
|
|
152
166
|
/** Base path for Timeback routes (default: '/api/timeback') */
|
|
@@ -204,8 +218,8 @@ export interface TanStackStartHandlers {
|
|
|
204
218
|
* Options for the TanStack Start handler.
|
|
205
219
|
*/
|
|
206
220
|
export interface TanStackStartHandlerOptions {
|
|
207
|
-
/** Timeback instance or handlers */
|
|
208
|
-
timeback:
|
|
221
|
+
/** Timeback instance or handlers (full or identity-only) */
|
|
222
|
+
timeback: AnyTimebackInput;
|
|
209
223
|
/** Custom callback path for OAuth (if different from default) */
|
|
210
224
|
callbackPath?: string;
|
|
211
225
|
}
|
|
@@ -244,8 +258,8 @@ export interface NuxtLikeEvent {
|
|
|
244
258
|
* Options for the Nuxt middleware handler.
|
|
245
259
|
*/
|
|
246
260
|
export interface NuxtHandlerOptions<TEvent extends NuxtLikeEvent = NuxtLikeEvent> {
|
|
247
|
-
/** Timeback instance or handlers */
|
|
248
|
-
timeback:
|
|
261
|
+
/** Timeback instance or handlers (full or identity-only) */
|
|
262
|
+
timeback: AnyTimebackInput;
|
|
249
263
|
/** Nuxt/H3 event */
|
|
250
264
|
event: TEvent;
|
|
251
265
|
/** Base path for Timeback routes (default: '/api/timeback') */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK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I,CAAC,EAAE,MAAM,CAAA;CACb;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,MAAM,SAAS,aAAa,GAAG,aAAa;IAC/E,4DAA4D;IAC5D,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;AAEvF;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B,GAAG,EAAE,kBAAkB,CAAA;IACvB,IAAI,EAAE,kBAAkB,CAAA;IACxB,GAAG,EAAE,kBAAkB,CAAA;IACvB,MAAM,EAAE,kBAAkB,CAAA;IAC1B,KAAK,EAAE,kBAAkB,CAAA;CACzB"}
|
|
@@ -3,13 +3,32 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Shared utilities for server framework adapters.
|
|
5
5
|
*/
|
|
6
|
-
import type { Handlers } from '../types';
|
|
7
|
-
import type {
|
|
6
|
+
import type { Handlers, IdentityOnlyHandlers } from '../types';
|
|
7
|
+
import type { AnyTimebackInput } from './types';
|
|
8
|
+
/**
|
|
9
|
+
* Union of handler types returned by getHandlers.
|
|
10
|
+
*/
|
|
11
|
+
type AnyHandlers = Handlers | IdentityOnlyHandlers;
|
|
8
12
|
/**
|
|
9
13
|
* Extract handlers from flexible input.
|
|
10
14
|
*
|
|
11
|
-
* @param input - TimebackInstance or
|
|
12
|
-
* @returns Handlers object
|
|
15
|
+
* @param input - TimebackInstance, IdentityOnlyInstance, or their handlers
|
|
16
|
+
* @returns Handlers object (full or identity-only)
|
|
17
|
+
*/
|
|
18
|
+
export declare function getHandlers(input: AnyTimebackInput): AnyHandlers;
|
|
19
|
+
/**
|
|
20
|
+
* Check if handlers include activity tracking (full SDK).
|
|
21
|
+
*
|
|
22
|
+
* @param handlers - Handlers to check
|
|
23
|
+
* @returns True if handlers include activity tracking
|
|
24
|
+
*/
|
|
25
|
+
export declare function hasActivityHandler(handlers: AnyHandlers): handlers is Handlers;
|
|
26
|
+
/**
|
|
27
|
+
* Check if handlers include user handlers (full SDK).
|
|
28
|
+
*
|
|
29
|
+
* @param handlers - Handlers to check
|
|
30
|
+
* @returns True if handlers include user handlers
|
|
13
31
|
*/
|
|
14
|
-
export declare function
|
|
32
|
+
export declare function hasUserHandler(handlers: AnyHandlers): handlers is Handlers;
|
|
33
|
+
export {};
|
|
15
34
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C;;GAEG;AACH,KAAK,WAAW,GAAG,QAAQ,GAAG,oBAAoB,CAAA;AAElD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,WAAW,CAEhE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,WAAW,GAAG,QAAQ,IAAI,QAAQ,CAE9E;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,WAAW,GAAG,QAAQ,IAAI,QAAQ,CAE1E"}
|
package/dist/server/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Server-side exports for the Timeback SDK.
|
|
5
5
|
*/
|
|
6
|
-
export { createServer } from './timeback';
|
|
7
|
-
export type { TimebackConfig, TimebackInstance, Environment, ApiCredentials, IdentityConfig, SsoIdentityConfig, CustomIdentityConfig, Handlers, BuildStateContext, CallbackSuccessContext, CallbackErrorContext, OIDCTokens, OIDCUserInfo, } from './types';
|
|
6
|
+
export { createServer, createIdentityServer } from './timeback';
|
|
7
|
+
export type { TimebackConfig, TimebackInstance, Environment, ApiCredentials, IdentityConfig, SsoIdentityConfig, CustomIdentityConfig, Handlers, IdentityOnlyConfig, IdentityOnlyInstance, IdentityOnlyHandlers, BuildStateContext, CallbackSuccessContext, CallbackErrorContext, OIDCTokens, OIDCUserInfo, } from './types';
|
|
8
8
|
export type { CallbackSuccessContext as IdentityCallbackSuccess } from './types';
|
|
9
9
|
export type { CallbackErrorContext as IdentityCallbackError } from './types';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAC/D,YAAY,EAEX,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,QAAQ,EAER,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EAEpB,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,UAAU,EACV,YAAY,GACZ,MAAM,SAAS,CAAA;AAEhB,YAAY,EAAE,sBAAsB,IAAI,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAChF,YAAY,EAAE,oBAAoB,IAAI,qBAAqB,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Timeback Server SDK
|
|
3
3
|
*
|
|
4
|
-
* Factory
|
|
4
|
+
* Factory functions to create Timeback server instances.
|
|
5
5
|
*/
|
|
6
|
-
import type { TimebackConfig, TimebackInstance } from './types';
|
|
6
|
+
import type { IdentityOnlyConfig, IdentityOnlyInstance, TimebackConfig, TimebackInstance } from './types';
|
|
7
7
|
/**
|
|
8
8
|
* Create a Timeback server instance.
|
|
9
9
|
*
|
|
@@ -45,4 +45,41 @@ import type { TimebackConfig, TimebackInstance } from './types';
|
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
47
|
export declare function createServer(config: TimebackConfig): Promise<TimebackInstance>;
|
|
48
|
+
/**
|
|
49
|
+
* Create an identity-only Timeback server instance.
|
|
50
|
+
*
|
|
51
|
+
* Use this when you only need SSO authentication without activity tracking
|
|
52
|
+
* or Timeback API integration. Does not require `timeback.config.ts`.
|
|
53
|
+
*
|
|
54
|
+
* @param config - Identity-only configuration
|
|
55
|
+
* @returns Identity-only instance with SSO handlers
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* import { createIdentityServer } from 'timeback'
|
|
60
|
+
* import { toNextjsHandler } from 'timeback/nextjs'
|
|
61
|
+
*
|
|
62
|
+
* const timeback = createIdentityServer({
|
|
63
|
+
* env: 'production',
|
|
64
|
+
* identity: {
|
|
65
|
+
* mode: 'sso',
|
|
66
|
+
* clientId: process.env.AWS_COGNITO_CLIENT_ID!,
|
|
67
|
+
* clientSecret: process.env.AWS_COGNITO_CLIENT_SECRET!,
|
|
68
|
+
* onCallbackSuccess: ({ user, redirect }) => {
|
|
69
|
+
* // Set session, then redirect
|
|
70
|
+
* return redirect('/')
|
|
71
|
+
* },
|
|
72
|
+
* onCallbackError: ({ error, redirect }) => {
|
|
73
|
+
* console.error('SSO Error:', error)
|
|
74
|
+
* return redirect('/?error=sso_failed')
|
|
75
|
+
* },
|
|
76
|
+
* getUser: (req) => getSession(req),
|
|
77
|
+
* },
|
|
78
|
+
* })
|
|
79
|
+
*
|
|
80
|
+
* // For Next.js App Router
|
|
81
|
+
* export const { GET, POST } = toNextjsHandler(timeback)
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
export declare function createIdentityServer<TState = unknown>(config: IdentityOnlyConfig<TState>): IdentityOnlyInstance<TState>;
|
|
48
85
|
//# sourceMappingURL=timeback.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeback.d.ts","sourceRoot":"","sources":["../../src/server/timeback.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"timeback.d.ts","sourceRoot":"","sources":["../../src/server/timeback.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAEX,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,MAAM,SAAS,CAAA;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAwCpF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,GAAG,OAAO,EACpD,MAAM,EAAE,kBAAkB,CAAC,MAAM,CAAC,GAChC,oBAAoB,CAAC,MAAM,CAAC,CAY9B"}
|
package/dist/server/types.d.ts
CHANGED
|
@@ -297,4 +297,41 @@ export interface TimebackInstance<TState = unknown> {
|
|
|
297
297
|
/** Request handlers */
|
|
298
298
|
handle: Handlers;
|
|
299
299
|
}
|
|
300
|
+
/**
|
|
301
|
+
* Identity-only configuration.
|
|
302
|
+
*
|
|
303
|
+
* Use this when you only need SSO authentication without activity tracking
|
|
304
|
+
* or Timeback API integration.
|
|
305
|
+
*/
|
|
306
|
+
export interface IdentityOnlyConfig<TState = unknown> {
|
|
307
|
+
/** Environment */
|
|
308
|
+
env: Environment;
|
|
309
|
+
/** Identity configuration (SSO mode required for identity-only) */
|
|
310
|
+
identity: SsoIdentityConfig<TState>;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Identity-only handlers.
|
|
314
|
+
*/
|
|
315
|
+
export interface IdentityOnlyHandlers {
|
|
316
|
+
/** Identity-related handlers */
|
|
317
|
+
identity: {
|
|
318
|
+
/** Initiate sign-in */
|
|
319
|
+
signIn: (req: Request) => Promise<Response>;
|
|
320
|
+
/** Handle OAuth callback */
|
|
321
|
+
callback: (req: Request) => Promise<Response>;
|
|
322
|
+
/** Sign out user */
|
|
323
|
+
signOut: () => Response;
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Identity-only SDK instance.
|
|
328
|
+
*
|
|
329
|
+
* Returned by `createIdentityServer()` for SSO-only integrations.
|
|
330
|
+
*/
|
|
331
|
+
export interface IdentityOnlyInstance<TState = unknown> {
|
|
332
|
+
/** Configuration */
|
|
333
|
+
config: IdentityOnlyConfig<TState>;
|
|
334
|
+
/** Request handlers (identity only) */
|
|
335
|
+
handle: IdentityOnlyHandlers;
|
|
336
|
+
}
|
|
300
337
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/server/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEnD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,YAAY,CAAA;AAE5D;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,QAAQ,EAAE,MA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