win-portal-auth-sdk 1.2.1 → 1.3.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 CHANGED
@@ -129,6 +129,15 @@ await authClient.user.delete(userId);
129
129
  const health = await authClient.health.check();
130
130
  const isValid = await authClient.health.validateApiKey();
131
131
 
132
+ // License Information
133
+ const licenseResponse = await authClient.license.getInfo();
134
+ if (licenseResponse.data.success && licenseResponse.data.data) {
135
+ const license = licenseResponse.data.data;
136
+ console.log('License:', license.name);
137
+ console.log('Expires:', license.expires_at);
138
+ console.log('Modules:', license.module_codes);
139
+ }
140
+
132
141
  // LINE Messaging
133
142
  await authClient.line.sendTextMessage({
134
143
  userId: 'user-123',
@@ -244,7 +253,7 @@ export class UsersController {
244
253
 
245
254
  For complete documentation, examples, and advanced usage:
246
255
 
247
- **[View Full Middleware Guide →](./docs/MIDDLEWARE_USAGE.md)**
256
+ **[View Full Middleware Guide →](./docs/middleware/usage.md)**
248
257
 
249
258
  Includes:
250
259
 
@@ -333,13 +342,20 @@ const client = new AuthClient({
333
342
  - `line.sendNotification({ userId, title, message, type?, action_url?, priority? })` - Send formatted notification
334
343
  - `line.checkMessagingAvailability(userId)` - Check if user can receive LINE messages
335
344
 
336
- > 📖 **[LINE Messaging Guide →](./docs/line-messaging.md)** - Complete documentation with examples
345
+ > 📖 **[LINE Messaging Guide →](./docs/features/line-messaging.md)** - Complete documentation with examples
337
346
 
338
347
  **Health & Validation:**
339
348
 
340
349
  - `health.check()` - Check API health
341
350
  - `health.validateApiKey()` - Validate if API key is still active
342
351
 
352
+ **License Management:**
353
+
354
+ - `license.getInfo()` - Get current application license information (requires API Key)
355
+ - Returns license details including `module_codes`, `expires_at`, `is_expired`, etc.
356
+ - Automatically uses application from API key context
357
+ - No need to provide application code or ID
358
+
343
359
  #### Utility Methods
344
360
 
345
361
  - `setToken(token, type?)` - Set authentication token
@@ -464,13 +480,16 @@ try {
464
480
 
465
481
  📚 **[Complete Documentation →](./docs/README.md)**
466
482
 
467
- - [Frontend Examples](./docs/FRONTEND_EXAMPLES.md) - Next.js, React usage
468
- - [Middleware Guide](./docs/MIDDLEWARE_USAGE.md) - Express & NestJS
469
- - [Type Safety Guide](./TYPE_SAFETY.md) - Express type augmentation 🆕
470
- - [Type Names Guide](./TYPE_NAMES.md) - SDK-friendly type names 🆕
471
- - [Code Examples](./EXAMPLE.md) - Real-world usage examples 🆕
472
- - [Thai Documentation](./docs/USAGE_TH.md) - คู่มือภาษาไทย
473
- - [Publishing Guide](./docs/NPM_PUBLISH_GUIDE.md) - How to publish updates
483
+ - [API Functions Reference](./docs/api/functions.md) - สรุปฟังก์ชันทั้งหมดที่ SDK รองรับ 🆕
484
+ - [Frontend Examples](./docs/guides/frontend-examples.md) - Next.js, React usage
485
+ - [Middleware Guide](./docs/middleware/usage.md) - Express & NestJS
486
+ - [Type Safety Guide](./docs/middleware/type-safety.md) - Express type augmentation 🆕
487
+ - [Type Names Guide](./docs/guides/type-names.md) - SDK-friendly type names 🆕
488
+ - [Next.js Guide](./docs/guides/nextjs.md) - คู่มือ Next.js ภาษาไทย
489
+ - [OAuth Next.js Guide](./docs/guides/oauth-nextjs.md) - คู่มือ OAuth กับ Next.js
490
+ - [NestJS Guide](./docs/guides/nestjs.md) - คู่มือ NestJS
491
+ - [Thai Documentation](./docs/guides/getting-started.md) - คู่มือภาษาไทย
492
+ - [Publishing Guide](./docs/development/publish.md) - How to publish updates
474
493
 
475
494
  ## License
476
495
 
@@ -28,9 +28,33 @@ export declare class AuthAPI {
28
28
  */
29
29
  profile(): Promise<User>;
30
30
  /**
31
- * Refresh access token
31
+ * Refresh access token using session (for web portal)
32
+ * Uses current session to refresh access token
32
33
  */
33
34
  refresh(refresh_token: string): Promise<AuthTokens>;
35
+ /**
36
+ * Refresh access token using refresh token (for mobile apps and long-lived sessions)
37
+ * This endpoint uses refresh token flow and supports token rotation
38
+ *
39
+ * @example
40
+ * ```typescript
41
+ * const session = await authClient.auth.refreshWithToken(refreshToken, {
42
+ * ip_address: '192.168.1.1',
43
+ * user_agent: 'MyApp/1.0',
44
+ * device_id: 'device-123'
45
+ * });
46
+ * authClient.setToken(session.access_token);
47
+ * if (session.refresh_token) {
48
+ * // Store new refresh token if rotated
49
+ * tokenManager.setRefreshToken(session.refresh_token);
50
+ * }
51
+ * ```
52
+ */
53
+ refreshWithToken(refreshToken: string, options?: {
54
+ ip_address?: string;
55
+ user_agent?: string;
56
+ device_id?: string;
57
+ }): Promise<AuthSession>;
34
58
  /**
35
59
  * Setup TOTP for user account
36
60
  * Returns QR code and backup codes
@@ -1 +1 @@
1
- {"version":3,"file":"auth.api.d.ts","sourceRoot":"","sources":["../../../src/client/api/auth.api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAoB,WAAW,EAAE,IAAI,EAAuB,UAAU,EAAe,MAAM,aAAa,CAAC;AAEhH,qBAAa,OAAO;IACN,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAEtC;;OAEG;IACG,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAMlE;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAK5C;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAK9B;;OAEG;IACG,OAAO,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAUzD;;;OAGG;IACG,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAC7C,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IAcF;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,MAAM,GAAG,SAAS,EACzB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,WAAW,CAAC;IASvB;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC;IAKnD;;;OAGG;IACG,yBAAyB,IAAI,OAAO,CAAC;QACzC,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CASH"}
@@ -38,13 +38,42 @@ class AuthAPI {
38
38
  return response.data.data;
39
39
  }
40
40
  /**
41
- * Refresh access token
41
+ * Refresh access token using session (for web portal)
42
+ * Uses current session to refresh access token
42
43
  */
43
44
  async refresh(refresh_token) {
44
45
  const payload = { refresh_token };
45
46
  const response = await this.client.post('/auth/refresh', payload);
46
47
  return response.data.data;
47
48
  }
49
+ /**
50
+ * Refresh access token using refresh token (for mobile apps and long-lived sessions)
51
+ * This endpoint uses refresh token flow and supports token rotation
52
+ *
53
+ * @example
54
+ * ```typescript
55
+ * const session = await authClient.auth.refreshWithToken(refreshToken, {
56
+ * ip_address: '192.168.1.1',
57
+ * user_agent: 'MyApp/1.0',
58
+ * device_id: 'device-123'
59
+ * });
60
+ * authClient.setToken(session.access_token);
61
+ * if (session.refresh_token) {
62
+ * // Store new refresh token if rotated
63
+ * tokenManager.setRefreshToken(session.refresh_token);
64
+ * }
65
+ * ```
66
+ */
67
+ async refreshWithToken(refreshToken, options) {
68
+ const payload = {
69
+ refresh_token: refreshToken,
70
+ ...(options?.ip_address && { ip_address: options.ip_address }),
71
+ ...(options?.user_agent && { user_agent: options.user_agent }),
72
+ ...(options?.device_id && { device_id: options.device_id }),
73
+ };
74
+ const response = await this.client.post('/auth/refresh-token', payload);
75
+ return response.data.data;
76
+ }
48
77
  // ==========================================
49
78
  // TOTP (Two-Factor Authentication) Methods
50
79
  // ==========================================
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { AuthClient } from '../auth-client';
3
2
  import { File, FileUpdateData, FileSearchParams } from '../../types';
4
3
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"files.api.d.ts","sourceRoot":"","sources":["../../../src/client/api/files.api.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,gBAAgB,EAAe,MAAM,aAAa,CAAC;AAElF;;;;GAIG;AACH,qBAAa,QAAQ;IACP,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAEtC;;;OAGG;IACG,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAS/C;;;OAGG;IACG,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxC;;;;OAIG;IACH,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAKjC;;;OAGG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAKnE;;;OAGG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAKtD;;;OAGG;IACG,MAAM,CAAC,YAAY,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC;QACrD,IAAI,EAAE,IAAI,EAAE,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IAYF;;;OAGG;IACG,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC;CAMrF"}
1
+ {"version":3,"file":"files.api.d.ts","sourceRoot":"","sources":["../../../src/client/api/files.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,gBAAgB,EAAe,MAAM,aAAa,CAAC;AAElF;;;;GAIG;AACH,qBAAa,QAAQ;IACP,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAEtC;;;OAGG;IACG,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAS/C;;;OAGG;IACG,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxC;;;;OAIG;IACH,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAKjC;;;OAGG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAKnE;;;OAGG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAKtD;;;OAGG;IACG,MAAM,CAAC,YAAY,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC;QACrD,IAAI,EAAE,IAAI,EAAE,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IAYF;;;OAGG;IACG,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC;CAMrF"}
@@ -8,6 +8,8 @@ export { HealthAPI } from './health.api';
8
8
  export { SystemConfigAPI } from './system-config.api';
9
9
  export { FilesAPI } from './files.api';
10
10
  export { EventLogApi } from './event-log.api';
11
+ export { LicenseAPI } from './license.api';
12
+ export type { ApplicationLicenseResponse } from './license.api';
11
13
  export { OAuthAPI } from './oauth.api';
12
14
  export type { OAuthConfig, AuthorizationUrlOptions, TokenResponse, UserInfo, DiscoveryDocument } from './oauth.api';
13
15
  export { generatePKCE, generateState } from './oauth.api';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/api/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,YAAY,EAAE,WAAW,EAAE,uBAAuB,EAAE,aAAa,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACpH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,YAAY,EACV,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,iCAAiC,GAClC,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/api/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,YAAY,EAAE,WAAW,EAAE,uBAAuB,EAAE,aAAa,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACpH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,YAAY,EACV,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,iCAAiC,GAClC,MAAM,YAAY,CAAC"}
@@ -5,7 +5,7 @@
5
5
  * Central export point for all API namespaces
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.LineAPI = exports.generateState = exports.generatePKCE = exports.OAuthAPI = exports.EventLogApi = exports.FilesAPI = exports.SystemConfigAPI = exports.HealthAPI = exports.AuthAPI = void 0;
8
+ exports.LineAPI = exports.generateState = exports.generatePKCE = exports.OAuthAPI = exports.LicenseAPI = exports.EventLogApi = exports.FilesAPI = exports.SystemConfigAPI = exports.HealthAPI = exports.AuthAPI = void 0;
9
9
  var auth_api_1 = require("./auth.api");
10
10
  Object.defineProperty(exports, "AuthAPI", { enumerable: true, get: function () { return auth_api_1.AuthAPI; } });
11
11
  var health_api_1 = require("./health.api");
@@ -16,6 +16,8 @@ var files_api_1 = require("./files.api");
16
16
  Object.defineProperty(exports, "FilesAPI", { enumerable: true, get: function () { return files_api_1.FilesAPI; } });
17
17
  var event_log_api_1 = require("./event-log.api");
18
18
  Object.defineProperty(exports, "EventLogApi", { enumerable: true, get: function () { return event_log_api_1.EventLogApi; } });
19
+ var license_api_1 = require("./license.api");
20
+ Object.defineProperty(exports, "LicenseAPI", { enumerable: true, get: function () { return license_api_1.LicenseAPI; } });
19
21
  var oauth_api_1 = require("./oauth.api");
20
22
  Object.defineProperty(exports, "OAuthAPI", { enumerable: true, get: function () { return oauth_api_1.OAuthAPI; } });
21
23
  var oauth_api_2 = require("./oauth.api");
@@ -0,0 +1,74 @@
1
+ /**
2
+ * License API
3
+ *
4
+ * API สำหรับดึงข้อมูล License ของ Application
5
+ * ใช้ API Key authentication เท่านั้น
6
+ */
7
+ import { AxiosResponse } from 'axios';
8
+ import { AuthClient } from '../auth-client';
9
+ import { ApiResponse } from '../../types';
10
+ /**
11
+ * Application License Response
12
+ *
13
+ * @description License information returned from the API
14
+ * Includes all license fields plus computed fields like expiration status
15
+ */
16
+ export interface ApplicationLicenseResponse {
17
+ id: string;
18
+ application_id: string;
19
+ name: string;
20
+ license_key?: string;
21
+ description?: string;
22
+ file_id?: string;
23
+ expires_at?: string;
24
+ is_active: boolean;
25
+ status: string;
26
+ created_at: string;
27
+ updated_at: string;
28
+ created_by?: string;
29
+ updated_by?: string;
30
+ file_url?: string;
31
+ file_name?: string;
32
+ file_size?: number;
33
+ is_expired?: boolean;
34
+ days_until_expiry?: number;
35
+ module_codes?: string[];
36
+ }
37
+ /**
38
+ * License API Namespace
39
+ *
40
+ * @example
41
+ * ```typescript
42
+ * const client = new AuthClient({ apiKey: '...', baseURL: '...' });
43
+ * const license = await client.license.getInfo();
44
+ * ```
45
+ */
46
+ export declare class LicenseAPI {
47
+ private client;
48
+ constructor(client: AuthClient);
49
+ /**
50
+ * ดึงข้อมูล License ของตัวเองโดยใช้ API Key
51
+ * GET /applications/licenses/info
52
+ *
53
+ * สำหรับ SDK ที่ส่ง X-API-Key header มาอยู่แล้ว
54
+ * ไม่ต้องส่ง application code หรือ application_id
55
+ * ดึงข้อมูลจาก API key โดยอัตโนมัติ
56
+ *
57
+ * ⚠️ ต้องมี API Key เท่านั้น - ไม่มี API Key จะไม่สามารถดึงข้อมูลได้
58
+ *
59
+ * @returns License information หรือ null ถ้าไม่มี active license
60
+ *
61
+ * @example
62
+ * ```typescript
63
+ * const response = await client.license.getInfo();
64
+ * if (response.data.success && response.data.data) {
65
+ * const license = response.data.data;
66
+ * console.log('License:', license.name);
67
+ * console.log('Expires:', license.expires_at);
68
+ * console.log('Modules:', license.module_codes);
69
+ * }
70
+ * ```
71
+ */
72
+ getInfo(): Promise<AxiosResponse<ApiResponse<ApplicationLicenseResponse | null>>>;
73
+ }
74
+ //# sourceMappingURL=license.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"license.api.d.ts","sourceRoot":"","sources":["../../../src/client/api/license.api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,qBAAa,UAAU;IACT,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAEtC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACG,OAAO,IAAI,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,0BAA0B,GAAG,IAAI,CAAC,CAAC,CAAC;CAGxF"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /**
3
+ * License API
4
+ *
5
+ * API สำหรับดึงข้อมูล License ของ Application
6
+ * ใช้ API Key authentication เท่านั้น
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.LicenseAPI = void 0;
10
+ /**
11
+ * License API Namespace
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * const client = new AuthClient({ apiKey: '...', baseURL: '...' });
16
+ * const license = await client.license.getInfo();
17
+ * ```
18
+ */
19
+ class LicenseAPI {
20
+ constructor(client) {
21
+ this.client = client;
22
+ }
23
+ /**
24
+ * ดึงข้อมูล License ของตัวเองโดยใช้ API Key
25
+ * GET /applications/licenses/info
26
+ *
27
+ * สำหรับ SDK ที่ส่ง X-API-Key header มาอยู่แล้ว
28
+ * ไม่ต้องส่ง application code หรือ application_id
29
+ * ดึงข้อมูลจาก API key โดยอัตโนมัติ
30
+ *
31
+ * ⚠️ ต้องมี API Key เท่านั้น - ไม่มี API Key จะไม่สามารถดึงข้อมูลได้
32
+ *
33
+ * @returns License information หรือ null ถ้าไม่มี active license
34
+ *
35
+ * @example
36
+ * ```typescript
37
+ * const response = await client.license.getInfo();
38
+ * if (response.data.success && response.data.data) {
39
+ * const license = response.data.data;
40
+ * console.log('License:', license.name);
41
+ * console.log('Expires:', license.expires_at);
42
+ * console.log('Modules:', license.module_codes);
43
+ * }
44
+ * ```
45
+ */
46
+ async getInfo() {
47
+ return this.client.get('/applications/licenses/info');
48
+ }
49
+ }
50
+ exports.LicenseAPI = LicenseAPI;
@@ -1,5 +1,5 @@
1
1
  import { AuthClient } from '../auth-client';
2
- import { SystemConfig, SystemConfigByCategory } from '../../types';
2
+ import { SystemConfig, SystemConfigByCategory, SecurityJwtConfig, SessionManagementConfig } from '../../types';
3
3
  /**
4
4
  * System Config API
5
5
  * Methods for retrieving system configurations
@@ -23,5 +23,15 @@ export declare class SystemConfigAPI {
23
23
  * ดึง security configs ทั้งหมด (convenience method)
24
24
  */
25
25
  security(): Promise<SystemConfigByCategory>;
26
+ /**
27
+ * GET /system-configs/categories/security/jwt
28
+ * ดึง JWT configuration (convenience method)
29
+ */
30
+ getSecurityJwtConfig(): Promise<SecurityJwtConfig>;
31
+ /**
32
+ * GET /system-configs/categories/security/session-management
33
+ * ดึง Session Management configuration (convenience method)
34
+ */
35
+ getSessionManagement(): Promise<SessionManagementConfig>;
26
36
  }
27
37
  //# sourceMappingURL=system-config.api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"system-config.api.d.ts","sourceRoot":"","sources":["../../../src/client/api/system-config.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAe,MAAM,aAAa,CAAC;AAEhF;;;;GAIG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAEtC;;;OAGG;IACG,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAOtE;;;OAGG;IACG,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAK/E;;;OAGG;IACG,QAAQ,IAAI,OAAO,CAAC,sBAAsB,CAAC;CAGlD"}
1
+ {"version":3,"file":"system-config.api.d.ts","sourceRoot":"","sources":["../../../src/client/api/system-config.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,uBAAuB,EAAe,MAAM,aAAa,CAAC;AAE5H;;;;GAIG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAEtC;;;OAGG;IACG,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAOtE;;;OAGG;IACG,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAK/E;;;OAGG;IACG,QAAQ,IAAI,OAAO,CAAC,sBAAsB,CAAC;IAIjD;;;OAGG;IACG,oBAAoB,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAKxD;;;OAGG;IACG,oBAAoB,IAAI,OAAO,CAAC,uBAAuB,CAAC;CAS/D"}
@@ -33,5 +33,26 @@ class SystemConfigAPI {
33
33
  async security() {
34
34
  return this.getByCategory('security');
35
35
  }
36
+ /**
37
+ * GET /system-configs/categories/security/jwt
38
+ * ดึง JWT configuration (convenience method)
39
+ */
40
+ async getSecurityJwtConfig() {
41
+ const config = await this.getByCategoryAndKey('security', 'jwt');
42
+ return config.value;
43
+ }
44
+ /**
45
+ * GET /system-configs/categories/security/session-management
46
+ * ดึง Session Management configuration (convenience method)
47
+ */
48
+ async getSessionManagement() {
49
+ const securityConfigs = await this.security();
50
+ // Key ใน database เป็น session_management (snake_case)
51
+ const sessionManagement = securityConfigs['session_management'] || securityConfigs['session-management'];
52
+ if (!sessionManagement) {
53
+ throw new Error('Session management configuration not found');
54
+ }
55
+ return sessionManagement;
56
+ }
36
57
  }
37
58
  exports.SystemConfigAPI = SystemConfigAPI;
@@ -7,18 +7,90 @@
7
7
  */
8
8
  import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
9
9
  import { AuthSdkConfig } from '../types';
10
- import { AuthAPI, HealthAPI, SystemConfigAPI, FilesAPI, EventLogApi, OAuthAPI, OAuthConfig, LineAPI } from './api';
10
+ import { AuthAPI, HealthAPI, SystemConfigAPI, FilesAPI, EventLogApi, LicenseAPI, OAuthAPI, OAuthConfig, LineAPI } from './api';
11
+ export interface RefreshTokenCallbacks {
12
+ /**
13
+ * Get refresh token from storage
14
+ */
15
+ getRefreshToken: () => string | null | Promise<string | null>;
16
+ /**
17
+ * Save refresh token to storage
18
+ */
19
+ setRefreshToken: (token: string) => void | Promise<void>;
20
+ /**
21
+ * Clear refresh token from storage
22
+ */
23
+ clearRefreshToken?: () => void | Promise<void>;
24
+ /**
25
+ * Optional: Callback when refresh fails (for logout handling)
26
+ */
27
+ onRefreshFailure?: () => void | Promise<void>;
28
+ }
29
+ export interface SessionExpirationCallbacks {
30
+ /**
31
+ * Callback เมื่อ session ใกล้หมดอายุ (ตาม warning_minutes จาก config)
32
+ * @param remainingMinutes - จำนวนนาทีที่เหลือก่อน session หมดอายุ
33
+ * @param expirationType - ประเภทการหมดอายุ: 'inactivity' หรือ 'lifetime'
34
+ */
35
+ onSessionExpiring?: (remainingMinutes: number, expirationType: 'inactivity' | 'lifetime') => void | Promise<void>;
36
+ /**
37
+ * Callback เมื่อ session หมดอายุแล้ว
38
+ */
39
+ onSessionExpired?: () => void | Promise<void>;
40
+ }
41
+ export interface SessionExpirationOptions {
42
+ /**
43
+ * Callbacks สำหรับ session expiration events
44
+ */
45
+ callbacks: SessionExpirationCallbacks;
46
+ /**
47
+ * Optional: ตรวจสอบ session expiration อัตโนมัติทุก N วินาที (default: 30)
48
+ */
49
+ checkIntervalSeconds?: number;
50
+ }
51
+ export interface AutomaticRefreshOptions {
52
+ /**
53
+ * Storage key for refresh token (SDK will manage localStorage automatically)
54
+ * If provided, SDK will handle localStorage operations automatically
55
+ */
56
+ refreshTokenKey?: string;
57
+ /**
58
+ * Custom callbacks (use if you need custom storage or want to override default behavior)
59
+ * If refreshTokenKey is provided, these will be ignored
60
+ */
61
+ callbacks?: RefreshTokenCallbacks;
62
+ /**
63
+ * Optional: Callback when refresh fails (for logout handling)
64
+ * This will be called even if refreshTokenKey is provided
65
+ */
66
+ onRefreshFailure?: () => void | Promise<void>;
67
+ }
11
68
  export declare class AuthClient {
12
69
  private client;
13
70
  private apiKey;
14
71
  private apiKeyHeader;
15
72
  private token;
16
73
  private authType;
74
+ private refreshTokenCallbacks;
75
+ private jwtConfigPromise;
76
+ private refreshThresholdMinutes;
77
+ private automaticRefreshEnabled;
78
+ private lastRefreshAttempt;
79
+ private refreshPromise;
80
+ private readonly REFRESH_COOLDOWN_MS;
81
+ private sessionExpirationCallbacks;
82
+ private sessionManagementConfig;
83
+ private sessionManagementConfigPromise;
84
+ private sessionExpirationCheckInterval;
85
+ private sessionExpirationCheckIntervalSeconds;
86
+ private lastWarningTime;
87
+ private readonly WARNING_COOLDOWN_MS;
17
88
  readonly auth: AuthAPI;
18
89
  readonly health: HealthAPI;
19
90
  readonly systemConfig: SystemConfigAPI;
20
91
  readonly files: FilesAPI;
21
92
  readonly eventLog: EventLogApi;
93
+ readonly license: LicenseAPI;
22
94
  readonly line: LineAPI;
23
95
  oauth?: OAuthAPI;
24
96
  constructor(config: AuthSdkConfig);
@@ -104,5 +176,115 @@ export declare class AuthClient {
104
176
  * Get axios instance for advanced usage
105
177
  */
106
178
  getAxiosInstance(): AxiosInstance;
179
+ /**
180
+ * Enable automatic token refresh
181
+ * Call this after user is authenticated to enable automatic refresh
182
+ *
183
+ * @param options - Options for automatic refresh
184
+ *
185
+ * @example
186
+ * ```typescript
187
+ * // Simple: SDK manages localStorage automatically
188
+ * await authClient.enableAutomaticRefresh({
189
+ * refreshTokenKey: 'refresh_token',
190
+ * onRefreshFailure: () => window.location.href = '/login'
191
+ * });
192
+ *
193
+ * // Advanced: Custom callbacks
194
+ * await authClient.enableAutomaticRefresh({
195
+ * callbacks: {
196
+ * getRefreshToken: () => customStorage.get('refresh_token'),
197
+ * setRefreshToken: (token) => customStorage.set('refresh_token', token),
198
+ * clearRefreshToken: () => customStorage.remove('refresh_token'),
199
+ * onRefreshFailure: () => window.location.href = '/login'
200
+ * }
201
+ * });
202
+ * ```
203
+ */
204
+ enableAutomaticRefresh(options: AutomaticRefreshOptions): Promise<void>;
205
+ /**
206
+ * Disable automatic token refresh
207
+ */
208
+ disableAutomaticRefresh(): void;
209
+ /**
210
+ * Load JWT config from API
211
+ */
212
+ private loadJwtConfig;
213
+ /**
214
+ * Perform JWT config load
215
+ */
216
+ private performJwtConfigLoad;
217
+ /**
218
+ * Perform token refresh
219
+ */
220
+ private performRefresh;
221
+ /**
222
+ * Execute refresh token request
223
+ */
224
+ private doRefresh;
225
+ /**
226
+ * Reload JWT config (for when config changes)
227
+ */
228
+ reloadJwtConfig(): Promise<void>;
229
+ /**
230
+ * Enable session expiration monitoring
231
+ * จะตรวจสอบ session expiration ตาม config จาก settings/sessions และเรียก callback เมื่อใกล้หมดอายุ
232
+ *
233
+ * @param options - Options for session expiration monitoring
234
+ *
235
+ * @example
236
+ * ```typescript
237
+ * await authClient.enableSessionExpirationMonitoring({
238
+ * callbacks: {
239
+ * onSessionExpiring: (remainingMinutes, expirationType) => {
240
+ * console.log(`Session will expire in ${remainingMinutes} minutes (${expirationType})`);
241
+ * // แสดง notification หรือ dialog
242
+ * },
243
+ * onSessionExpired: () => {
244
+ * console.log('Session expired');
245
+ * // Redirect to login
246
+ * }
247
+ * },
248
+ * checkIntervalSeconds: 30 // ตรวจสอบทุก 30 วินาที
249
+ * });
250
+ * ```
251
+ */
252
+ enableSessionExpirationMonitoring(options: SessionExpirationOptions): Promise<void>;
253
+ /**
254
+ * Disable session expiration monitoring
255
+ */
256
+ disableSessionExpirationMonitoring(): void;
257
+ /**
258
+ * Load session management config from API
259
+ */
260
+ private loadSessionManagementConfig;
261
+ /**
262
+ * Perform session management config load
263
+ */
264
+ private performSessionManagementConfigLoad;
265
+ /**
266
+ * Start session expiration monitoring interval
267
+ */
268
+ private startSessionExpirationMonitoring;
269
+ /**
270
+ * Stop session expiration monitoring interval
271
+ */
272
+ private stopSessionExpirationMonitoring;
273
+ /**
274
+ * Check session expiration and trigger callbacks if needed
275
+ *
276
+ * Note: ใช้ token expiration time เป็นตัวประมาณ session expiration
277
+ * เพราะเราไม่มี session creation time หรือ last activity time ใน SDK
278
+ * Token expiration จะถูก refresh อัตโนมัติเมื่อมีการใช้งาน (extend_on_activity)
279
+ */
280
+ private checkSessionExpiration;
281
+ /**
282
+ * Trigger expiring warning callback with cooldown
283
+ */
284
+ private triggerExpiringWarning;
285
+ /**
286
+ * Reload session management config (for when config changes)
287
+ */
288
+ reloadSessionManagementConfig(): Promise<void>;
107
289
  }
108
290
  //# sourceMappingURL=auth-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth-client.d.ts","sourceRoot":"","sources":["../../src/client/auth-client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAc,EAAE,aAAa,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEnH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,QAAQ,CAAwC;IAGxD,SAAgB,IAAI,EAAE,OAAO,CAAC;IAC9B,SAAgB,MAAM,EAAE,SAAS,CAAC;IAClC,SAAgB,YAAY,EAAE,eAAe,CAAC;IAC9C,SAAgB,KAAK,EAAE,QAAQ,CAAC;IAChC,SAAgB,QAAQ,EAAE,WAAW,CAAC;IACtC,SAAgB,IAAI,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,QAAQ,CAAC;gBAEZ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