@amaster.ai/client 1.1.64 → 1.1.66

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/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AuthClient } from '@amaster.ai/auth-client';
2
- export { LoginParams, LoginResponse, OAuthProvider, Permission, RegisterParams, Role, Session, User } from '@amaster.ai/auth-client';
2
+ export { DepartmentPosition, LoginParams, LoginResponse, OAuthProvider, Permission, RegisterParams, Role, Session, User } from '@amaster.ai/auth-client';
3
3
  import { EntityClient } from '@amaster.ai/entity-client';
4
4
  export { EntityGetParams, EntityListResponse, EntityQueryParams, EntityUpdateWhereParams, EntityUpdateWhereResponse, FilterGroup, FilterItem, FilterOperator } from '@amaster.ai/entity-client';
5
5
  import { BpmClient } from '@amaster.ai/bpm-client';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AuthClient } from '@amaster.ai/auth-client';
2
- export { LoginParams, LoginResponse, OAuthProvider, Permission, RegisterParams, Role, Session, User } from '@amaster.ai/auth-client';
2
+ export { DepartmentPosition, LoginParams, LoginResponse, OAuthProvider, Permission, RegisterParams, Role, Session, User } from '@amaster.ai/auth-client';
3
3
  import { EntityClient } from '@amaster.ai/entity-client';
4
4
  export { EntityGetParams, EntityListResponse, EntityQueryParams, EntityUpdateWhereParams, EntityUpdateWhereResponse, FilterGroup, FilterItem, FilterOperator } from '@amaster.ai/entity-client';
5
5
  import { BpmClient } from '@amaster.ai/bpm-client';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amaster.ai/client",
3
- "version": "1.1.64",
3
+ "version": "1.1.66",
4
4
  "description": "Unified API client for Amaster platform - All services in one package",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -72,16 +72,16 @@
72
72
  "registry": "https://registry.npmjs.org/"
73
73
  },
74
74
  "dependencies": {
75
- "@amaster.ai/asr-client": "1.1.64",
76
- "@amaster.ai/auth-client": "1.1.64",
77
- "@amaster.ai/bpm-client": "1.1.64",
78
- "@amaster.ai/copilot-client": "1.1.64",
79
- "@amaster.ai/entity-client": "1.1.64",
80
- "@amaster.ai/function-client": "1.1.64",
81
- "@amaster.ai/http-client": "1.1.64",
82
- "@amaster.ai/s3-client": "1.1.64",
83
- "@amaster.ai/tts-client": "1.1.64",
84
- "@amaster.ai/workflow-client": "1.1.64"
75
+ "@amaster.ai/asr-client": "1.1.66",
76
+ "@amaster.ai/bpm-client": "1.1.66",
77
+ "@amaster.ai/auth-client": "1.1.66",
78
+ "@amaster.ai/copilot-client": "1.1.66",
79
+ "@amaster.ai/entity-client": "1.1.66",
80
+ "@amaster.ai/http-client": "1.1.66",
81
+ "@amaster.ai/tts-client": "1.1.66",
82
+ "@amaster.ai/workflow-client": "1.1.66",
83
+ "@amaster.ai/function-client": "1.1.66",
84
+ "@amaster.ai/s3-client": "1.1.66"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "axios": "^1.11.0"
@@ -0,0 +1,9 @@
1
+ import { expectTypeOf } from 'vitest';
2
+ import type { AmasterClient, ClientResult } from '../index';
3
+ import type { LoginResponse } from '../auth/password-auth';
4
+
5
+ declare const client: AmasterClient;
6
+ expectTypeOf(client.auth.miniPhoneLogin({ detail: { code: 'phone-code' } }))
7
+ .toEqualTypeOf<Promise<ClientResult<LoginResponse>>>();
8
+ expectTypeOf(client.auth.miniPhoneLogin('phone-code'))
9
+ .toEqualTypeOf<Promise<ClientResult<LoginResponse>>>();
@@ -71,6 +71,12 @@ describe('Type Tests', () => {
71
71
  });
72
72
 
73
73
  describe('AmasterClient', () => {
74
+ it('accepts WeCom H5 login through the public client types', () => {
75
+ expectTypeOf<'wecom'>().toMatchTypeOf<
76
+ Parameters<AmasterClient['auth']['loginWithOAuth']>[0]
77
+ >();
78
+ });
79
+
74
80
  it('should have all service modules', () => {
75
81
  expectTypeOf<AmasterClient>().toHaveProperty('auth');
76
82
  expectTypeOf<AmasterClient>().toHaveProperty('entity');
@@ -93,6 +99,7 @@ describe('Type Tests', () => {
93
99
  it('should expose the current auth client methods', () => {
94
100
  expectTypeOf<AmasterClient['auth']>().toHaveProperty('miniGetPhone');
95
101
  expectTypeOf<AmasterClient['auth']>().toHaveProperty('miniLogin');
102
+ expectTypeOf<AmasterClient['auth']>().toHaveProperty('miniPhoneLogin');
96
103
  expectTypeOf<AmasterClient['auth']>().toHaveProperty('getMiniProgramPhoneNumber');
97
104
  expectTypeOf<AmasterClient['auth']>().toHaveProperty('loginWithMiniProgram');
98
105
  expectTypeOf<AmasterClient['auth']>().toHaveProperty('loginWithFeishu');
@@ -23,7 +23,9 @@ export type OAuthProvider =
23
23
  /** @deprecated Legacy mini-program provider marker kept for compatibility */
24
24
  | 'wechat_mini'
25
25
  | 'platform'
26
- | 'feishu';
26
+ | 'feishu'
27
+ /** Enterprise WeChat in-client H5 OAuth (not browser QR login). */
28
+ | 'wecom';
27
29
 
28
30
  export interface FeishuPublicConfig {
29
31
  enabled: boolean;
@@ -193,6 +195,9 @@ export interface OAuthAPI {
193
195
  code: string | MiniProgramPhoneParams
194
196
  ): Promise<ClientResult<MiniProgramPhoneResponse>>;
195
197
 
198
+ /** WeChat phone authorization login; no prior session or wx.login required. */
199
+ miniPhoneLogin(input: MiniGetPhoneParams): Promise<ClientResult<LoginResponse>>;
200
+
196
201
  /**
197
202
  * Unified Mini Program phone binding entry
198
203
  *