agentbase-web-sdk 2.9.0 → 2.12.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.
Files changed (34) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/sdk.js +2456 -664
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +2456 -665
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +2456 -664
  7. package/package.json +3 -3
  8. package/types/enums/data-api-catalog-data-source-database-type.d.ts +6 -0
  9. package/types/enums/data-api-catalog-data-source-visibility-source.d.ts +7 -0
  10. package/types/enums/data-api-catalog-database-availability.d.ts +5 -0
  11. package/types/enums/data-api-catalog-database-classification.d.ts +4 -0
  12. package/types/enums/data-api-catalog-database-status.d.ts +4 -0
  13. package/types/enums/data-api-catalog-database-visibility-source.d.ts +7 -0
  14. package/types/enums/data-api-filter-logic.d.ts +4 -0
  15. package/types/enums/data-api-owned-binding-principal-type.d.ts +4 -0
  16. package/types/enums/data-api-owned-binding-status.d.ts +4 -0
  17. package/types/enums/memory-pipeline-run-result-status.d.ts +4 -0
  18. package/types/enums/memory-pipeline-run-scenario.d.ts +6 -0
  19. package/types/enums/memory-pipeline-run-status.d.ts +6 -0
  20. package/types/enums/method.d.ts +9 -0
  21. package/types/enums/path-match.d.ts +4 -0
  22. package/types/enums/scenario.d.ts +6 -0
  23. package/types/enums/scene.d.ts +4 -0
  24. package/types/enums/status.d.ts +7 -1
  25. package/types/enums/timezone.d.ts +1 -0
  26. package/types/index.d.ts +19 -2
  27. package/types/models.d.ts +798 -4
  28. package/types/services/account.d.ts +85 -2
  29. package/types/services/ai-gateway.d.ts +90 -0
  30. package/types/services/data-api.d.ts +257 -0
  31. package/types/services/functions.d.ts +35 -7
  32. package/types/services/knowledge-bases.d.ts +186 -2
  33. package/types/services/llm-gateway.d.ts +8 -1
  34. package/types/services/memory.d.ts +600 -19
@@ -2,6 +2,7 @@ import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
3
  import { AuthenticatorType } from '../enums/authenticator-type';
4
4
  import { AuthenticationFactor } from '../enums/authentication-factor';
5
+ import { Scene } from '../enums/scene';
5
6
  import { OAuthProvider } from '../enums/o-auth-provider';
6
7
  export declare class Account {
7
8
  client: Client;
@@ -561,6 +562,84 @@ export declare class Account {
561
562
  * @deprecated Use the object parameter style method for a better developer experience.
562
563
  */
563
564
  updatePhone<Preferences extends Models.Preferences = Models.DefaultPreferences>(phone: string, password: string): Promise<Models.User<Preferences>>;
565
+ /**
566
+ * Change the account phone number. Requires an authenticated session, the account password when one is set, and an `accountChange` phone challenge verifying ownership of the new phone number. Sessions are invalidated according to the project `auths.invalidateSessions` setting, keeping the current session active.
567
+ *
568
+ * @param {string} params.newPhone - New phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
569
+ * @param {string} params.challengeId - Phone challenge identifier created for the new phone number with scene `accountChange`.
570
+ * @param {string} params.code - Verification code delivered to the new phone number.
571
+ * @param {string} params.password - Current account password. Required only when the account has a password set.
572
+ * @throws {AgentbaseException}
573
+ * @returns {Promise<Models.Account<Preferences>>}
574
+ */
575
+ changePhone<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
576
+ newPhone: string;
577
+ challengeId: string;
578
+ code: string;
579
+ password?: string;
580
+ }): Promise<Models.Account<Preferences>>;
581
+ /**
582
+ * Change the account phone number. Requires an authenticated session, the account password when one is set, and an `accountChange` phone challenge verifying ownership of the new phone number. Sessions are invalidated according to the project `auths.invalidateSessions` setting, keeping the current session active.
583
+ *
584
+ * @param {string} newPhone - New phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
585
+ * @param {string} challengeId - Phone challenge identifier created for the new phone number with scene `accountChange`.
586
+ * @param {string} code - Verification code delivered to the new phone number.
587
+ * @param {string} password - Current account password. Required only when the account has a password set.
588
+ * @throws {AgentbaseException}
589
+ * @returns {Promise<Models.Account<Preferences>>}
590
+ * @deprecated Use the object parameter style method for a better developer experience.
591
+ */
592
+ changePhone<Preferences extends Models.Preferences = Models.DefaultPreferences>(newPhone: string, challengeId: string, code: string, password?: string): Promise<Models.Account<Preferences>>;
593
+ /**
594
+ * Send a project-scoped phone challenge to a mainland China mobile number (+86).
595
+ *
596
+ * @param {string} params.phone - Phone number in +86 mainland China mobile format.
597
+ * @param {string} params.userId - Unique Id for a new account. Use `ID.unique()` or omit it to generate a random ID.
598
+ * @param {Scene} params.scene - Challenge scene: `verify` or `accountChange`.
599
+ * @throws {AgentbaseException}
600
+ * @returns {Promise<{}>}
601
+ */
602
+ sendPhoneCode(params: {
603
+ phone: string;
604
+ userId?: string;
605
+ scene?: Scene;
606
+ }): Promise<{}>;
607
+ /**
608
+ * Send a project-scoped phone challenge to a mainland China mobile number (+86).
609
+ *
610
+ * @param {string} phone - Phone number in +86 mainland China mobile format.
611
+ * @param {string} userId - Unique Id for a new account. Use `ID.unique()` or omit it to generate a random ID.
612
+ * @param {Scene} scene - Challenge scene: `verify` or `accountChange`.
613
+ * @throws {AgentbaseException}
614
+ * @returns {Promise<{}>}
615
+ * @deprecated Use the object parameter style method for a better developer experience.
616
+ */
617
+ sendPhoneCode(phone: string, userId?: string, scene?: Scene): Promise<{}>;
618
+ /**
619
+ * Verify a project-scoped phone challenge and create a session.
620
+ *
621
+ * @param {string} params.challengeId - Phone challenge identifier.
622
+ * @param {string} params.phone - Phone number.
623
+ * @param {string} params.code - Verification code.
624
+ * @throws {AgentbaseException}
625
+ * @returns {Promise<Models.Session>}
626
+ */
627
+ verifyPhone(params: {
628
+ challengeId: string;
629
+ phone: string;
630
+ code: string;
631
+ }): Promise<Models.Session>;
632
+ /**
633
+ * Verify a project-scoped phone challenge and create a session.
634
+ *
635
+ * @param {string} challengeId - Phone challenge identifier.
636
+ * @param {string} phone - Phone number.
637
+ * @param {string} code - Verification code.
638
+ * @throws {AgentbaseException}
639
+ * @returns {Promise<Models.Session>}
640
+ * @deprecated Use the object parameter style method for a better developer experience.
641
+ */
642
+ verifyPhone(challengeId: string, phone: string, code: string): Promise<Models.Session>;
564
643
  /**
565
644
  * Get the preferences as a key-value object for the currently logged in user.
566
645
  *
@@ -934,7 +1013,8 @@ export declare class Account {
934
1013
  */
935
1014
  deleteSession(sessionId: string): Promise<{}>;
936
1015
  /**
937
- * Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.
1016
+ * Block the currently logged in user account in an application project. The user record is retained, and access remains blocked until an authorized project administrator restores the status through the Users API. Console platform accounts cannot disable themselves through this endpoint; requests authenticated as a Console account return HTTP 403 with type `general_access_forbidden` without changing the account status or clearing its session cookies. To completely delete a project user, use the Users API instead.
1017
+ *
938
1018
  *
939
1019
  * @throws {AgentbaseException}
940
1020
  * @returns {Promise<Models.User<Preferences>>}
@@ -1114,12 +1194,14 @@ export declare class Account {
1114
1194
  *
1115
1195
  * @param {string} params.userId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.
1116
1196
  * @param {string} params.phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
1197
+ * @param {Scene} params.scene - Challenge scene. Use `verify` for login and ownership verification, or `accountChange` to verify a new phone number while changing the account phone. The `accountChange` scene requires an authenticated session and an enabled phone SMS provider for the scene.
1117
1198
  * @throws {AgentbaseException}
1118
1199
  * @returns {Promise<Models.Token>}
1119
1200
  */
1120
1201
  createPhoneToken(params: {
1121
1202
  userId: string;
1122
1203
  phone: string;
1204
+ scene?: Scene;
1123
1205
  }): Promise<Models.Token>;
1124
1206
  /**
1125
1207
  * Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token]([HOSTNAME]/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.
@@ -1128,11 +1210,12 @@ export declare class Account {
1128
1210
  *
1129
1211
  * @param {string} userId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.
1130
1212
  * @param {string} phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
1213
+ * @param {Scene} scene - Challenge scene. Use `verify` for login and ownership verification, or `accountChange` to verify a new phone number while changing the account phone. The `accountChange` scene requires an authenticated session and an enabled phone SMS provider for the scene.
1131
1214
  * @throws {AgentbaseException}
1132
1215
  * @returns {Promise<Models.Token>}
1133
1216
  * @deprecated Use the object parameter style method for a better developer experience.
1134
1217
  */
1135
- createPhoneToken(userId: string, phone: string): Promise<Models.Token>;
1218
+ createPhoneToken(userId: string, phone: string, scene?: Scene): Promise<Models.Token>;
1136
1219
  /**
1137
1220
  *
1138
1221
  * @throws {AgentbaseException}
@@ -3,6 +3,70 @@ import { Status } from '../enums/status';
3
3
  export declare class AiGateway {
4
4
  client: Client;
5
5
  constructor(client: Client);
6
+ /**
7
+ * Manage unified AI Gateway control-plane resources.
8
+ *
9
+ * @throws {AgentbaseException}
10
+ * @returns {Promise<{}>}
11
+ */
12
+ listApprovalRequests(): Promise<{}>;
13
+ /**
14
+ * Manage unified AI Gateway control-plane resources.
15
+ *
16
+ * @param {string} params.id - id path parameter.
17
+ * @throws {AgentbaseException}
18
+ * @returns {Promise<{}>}
19
+ */
20
+ getApprovalRequest(params: {
21
+ id: string;
22
+ }): Promise<{}>;
23
+ /**
24
+ * Manage unified AI Gateway control-plane resources.
25
+ *
26
+ * @param {string} id - id path parameter.
27
+ * @throws {AgentbaseException}
28
+ * @returns {Promise<{}>}
29
+ * @deprecated Use the object parameter style method for a better developer experience.
30
+ */
31
+ getApprovalRequest(id: string): Promise<{}>;
32
+ /**
33
+ * Manage unified AI Gateway control-plane resources.
34
+ *
35
+ * @param {string} params.id - id path parameter.
36
+ * @throws {AgentbaseException}
37
+ * @returns {Promise<{}>}
38
+ */
39
+ approveApprovalRequest(params: {
40
+ id: string;
41
+ }): Promise<{}>;
42
+ /**
43
+ * Manage unified AI Gateway control-plane resources.
44
+ *
45
+ * @param {string} id - id path parameter.
46
+ * @throws {AgentbaseException}
47
+ * @returns {Promise<{}>}
48
+ * @deprecated Use the object parameter style method for a better developer experience.
49
+ */
50
+ approveApprovalRequest(id: string): Promise<{}>;
51
+ /**
52
+ * Manage unified AI Gateway control-plane resources.
53
+ *
54
+ * @param {string} params.id - id path parameter.
55
+ * @throws {AgentbaseException}
56
+ * @returns {Promise<{}>}
57
+ */
58
+ rejectApprovalRequest(params: {
59
+ id: string;
60
+ }): Promise<{}>;
61
+ /**
62
+ * Manage unified AI Gateway control-plane resources.
63
+ *
64
+ * @param {string} id - id path parameter.
65
+ * @throws {AgentbaseException}
66
+ * @returns {Promise<{}>}
67
+ * @deprecated Use the object parameter style method for a better developer experience.
68
+ */
69
+ rejectApprovalRequest(id: string): Promise<{}>;
6
70
  /**
7
71
  * Manage unified AI Gateway control-plane resources.
8
72
  *
@@ -60,6 +124,18 @@ export declare class AiGateway {
60
124
  * @deprecated Use the object parameter style method for a better developer experience.
61
125
  */
62
126
  getSnapshotStatus(gatewayId: string): Promise<{}>;
127
+ /**
128
+ * 读取当前 Shared V2 项目的 Tool Gateway 初始化状态。请求为 `GET /v1/ai-gateway/initialization-status`,无请求参数。调用方需要项目访问权限和 `aiGateway.read` scope。
129
+ *
130
+ * 成功时返回 HTTP 200。`{"status":"ready"}` 表示控制面已确认现有项目表就绪,可沿用原配置重新启用服务。`{"status":"uninitialized"}` 表示项目表尚未就绪,包括尚未建表或迁移标记为 dirty。此查询只读,不会调用模型、建表或开启服务。
131
+ *
132
+ * 缺少 `aiGateway.read` 的项目 API Key 会收到 HTTP 401(`general_unauthorized_scope`)。服务被禁用时,非特权调用方也可能先收到 HTTP 403(`general_service_disabled`)。控制面读取存储发生异常或 Core 无法连接控制面时会返回服务端错误,例如 HTTP 500。此时状态未知,调用方应显示错误并允许重试查询。
133
+ *
134
+ *
135
+ * @throws {AgentbaseException}
136
+ * @returns {Promise<{}>}
137
+ */
138
+ getInitializationStatus(): Promise<{}>;
63
139
  /**
64
140
  * Manage unified AI Gateway control-plane resources.
65
141
  *
@@ -795,4 +871,18 @@ export declare class AiGateway {
795
871
  * @deprecated Use the object parameter style method for a better developer experience.
796
872
  */
797
873
  testToolConnection(id: string): Promise<{}>;
874
+ /**
875
+ * Manage unified AI Gateway control-plane resources.
876
+ *
877
+ * @throws {AgentbaseException}
878
+ * @returns {Promise<{}>}
879
+ */
880
+ listToolEmbeddings(): Promise<{}>;
881
+ /**
882
+ * Manage unified AI Gateway control-plane resources.
883
+ *
884
+ * @throws {AgentbaseException}
885
+ * @returns {Promise<{}>}
886
+ */
887
+ createToolEmbeddings(): Promise<{}>;
798
888
  }
@@ -0,0 +1,257 @@
1
+ import { Client } from '../client';
2
+ import type { Models } from '../models';
3
+ export declare class DataApi {
4
+ client: Client;
5
+ constructor(client: Client);
6
+ /**
7
+ * List data sources visible through the selected Binding.
8
+ *
9
+ * @param {number} params.accessBindingId - accessBindingId.
10
+ * @throws {AgentbaseException}
11
+ * @returns {Promise<Models.DataApiCatalogDataSourceList>}
12
+ */
13
+ listBindingDataSources(params: {
14
+ accessBindingId: number;
15
+ }): Promise<Models.DataApiCatalogDataSourceList>;
16
+ /**
17
+ * List data sources visible through the selected Binding.
18
+ *
19
+ * @param {number} accessBindingId - accessBindingId.
20
+ * @throws {AgentbaseException}
21
+ * @returns {Promise<Models.DataApiCatalogDataSourceList>}
22
+ * @deprecated Use the object parameter style method for a better developer experience.
23
+ */
24
+ listBindingDataSources(accessBindingId: number): Promise<Models.DataApiCatalogDataSourceList>;
25
+ /**
26
+ * List databases visible through the selected Binding.
27
+ *
28
+ * @param {number} params.accessBindingId - accessBindingId.
29
+ * @param {number} params.dataSourceId - dataSourceId.
30
+ * @throws {AgentbaseException}
31
+ * @returns {Promise<Models.DataApiCatalogDatabaseList>}
32
+ */
33
+ listBindingDatabases(params: {
34
+ accessBindingId: number;
35
+ dataSourceId: number;
36
+ }): Promise<Models.DataApiCatalogDatabaseList>;
37
+ /**
38
+ * List databases visible through the selected Binding.
39
+ *
40
+ * @param {number} accessBindingId - accessBindingId.
41
+ * @param {number} dataSourceId - dataSourceId.
42
+ * @throws {AgentbaseException}
43
+ * @returns {Promise<Models.DataApiCatalogDatabaseList>}
44
+ * @deprecated Use the object parameter style method for a better developer experience.
45
+ */
46
+ listBindingDatabases(accessBindingId: number, dataSourceId: number): Promise<Models.DataApiCatalogDatabaseList>;
47
+ /**
48
+ * List tables visible through the selected Binding.
49
+ *
50
+ * @param {number} params.accessBindingId - accessBindingId.
51
+ * @param {number} params.dataSourceId - dataSourceId.
52
+ * @param {number} params.databaseId - databaseId.
53
+ * @throws {AgentbaseException}
54
+ * @returns {Promise<Models.DataApiCatalogTableList>}
55
+ */
56
+ listBindingTables(params: {
57
+ accessBindingId: number;
58
+ dataSourceId: number;
59
+ databaseId: number;
60
+ }): Promise<Models.DataApiCatalogTableList>;
61
+ /**
62
+ * List tables visible through the selected Binding.
63
+ *
64
+ * @param {number} accessBindingId - accessBindingId.
65
+ * @param {number} dataSourceId - dataSourceId.
66
+ * @param {number} databaseId - databaseId.
67
+ * @throws {AgentbaseException}
68
+ * @returns {Promise<Models.DataApiCatalogTableList>}
69
+ * @deprecated Use the object parameter style method for a better developer experience.
70
+ */
71
+ listBindingTables(accessBindingId: number, dataSourceId: number, databaseId: number): Promise<Models.DataApiCatalogTableList>;
72
+ /**
73
+ * Get table metadata and constraints of the selected Binding.
74
+ *
75
+ * @param {number} params.accessBindingId - accessBindingId.
76
+ * @param {number} params.dataSourceId - dataSourceId.
77
+ * @param {number} params.databaseId - databaseId.
78
+ * @param {string} params.tableName - tableName.
79
+ * @throws {AgentbaseException}
80
+ * @returns {Promise<Models.DataApiRouteCatalogTableDetail>}
81
+ */
82
+ getBindingTable(params: {
83
+ accessBindingId: number;
84
+ dataSourceId: number;
85
+ databaseId: number;
86
+ tableName: string;
87
+ }): Promise<Models.DataApiRouteCatalogTableDetail>;
88
+ /**
89
+ * Get table metadata and constraints of the selected Binding.
90
+ *
91
+ * @param {number} accessBindingId - accessBindingId.
92
+ * @param {number} dataSourceId - dataSourceId.
93
+ * @param {number} databaseId - databaseId.
94
+ * @param {string} tableName - tableName.
95
+ * @throws {AgentbaseException}
96
+ * @returns {Promise<Models.DataApiRouteCatalogTableDetail>}
97
+ * @deprecated Use the object parameter style method for a better developer experience.
98
+ */
99
+ getBindingTable(accessBindingId: number, dataSourceId: number, databaseId: number, tableName: string): Promise<Models.DataApiRouteCatalogTableDetail>;
100
+ /**
101
+ * Execute read-only Native SQL through the selected Data API binding.
102
+ *
103
+ * @param {number} params.accessBindingId - Data API binding ID.
104
+ * @param {string} params.sql - Read-only SQL statement.
105
+ * @throws {AgentbaseException}
106
+ * @returns {Promise<Models.DataApiNativeSqlResult>}
107
+ */
108
+ executeNativeSql(params: {
109
+ accessBindingId: number;
110
+ sql: string;
111
+ }): Promise<Models.DataApiNativeSqlResult>;
112
+ /**
113
+ * Execute read-only Native SQL through the selected Data API binding.
114
+ *
115
+ * @param {number} accessBindingId - Data API binding ID.
116
+ * @param {string} sql - Read-only SQL statement.
117
+ * @throws {AgentbaseException}
118
+ * @returns {Promise<Models.DataApiNativeSqlResult>}
119
+ * @deprecated Use the object parameter style method for a better developer experience.
120
+ */
121
+ executeNativeSql(accessBindingId: number, sql: string): Promise<Models.DataApiNativeSqlResult>;
122
+ /**
123
+ * Query read-only aggregates through the selected Data API binding.
124
+ *
125
+ * @param {number} params.accessBindingId - Data API binding ID.
126
+ * @param {number} params.databaseId - Metadata database stable ID.
127
+ * @param {string} params.tableName - Metadata table name.
128
+ * @param {Models.DataApiRestAggregatesQuery} params.query - Bounded aggregate query.
129
+ * @throws {AgentbaseException}
130
+ * @returns {Promise<Models.DataApiRestResult>}
131
+ */
132
+ executeRestAggregates(params: {
133
+ accessBindingId: number;
134
+ databaseId: number;
135
+ tableName: string;
136
+ query: Models.DataApiRestAggregatesQuery;
137
+ }): Promise<Models.DataApiRestResult>;
138
+ /**
139
+ * Query read-only aggregates through the selected Data API binding.
140
+ *
141
+ * @param {number} accessBindingId - Data API binding ID.
142
+ * @param {number} databaseId - Metadata database stable ID.
143
+ * @param {string} tableName - Metadata table name.
144
+ * @param {Models.DataApiRestAggregatesQuery} query - Bounded aggregate query.
145
+ * @throws {AgentbaseException}
146
+ * @returns {Promise<Models.DataApiRestResult>}
147
+ * @deprecated Use the object parameter style method for a better developer experience.
148
+ */
149
+ executeRestAggregates(accessBindingId: number, databaseId: number, tableName: string, query: Models.DataApiRestAggregatesQuery): Promise<Models.DataApiRestResult>;
150
+ /**
151
+ * Query read-only rows through the selected Data API binding.
152
+ *
153
+ * @param {number} params.accessBindingId - Data API binding ID.
154
+ * @param {number} params.databaseId - Metadata database stable ID.
155
+ * @param {string} params.tableName - Metadata table name.
156
+ * @param {Models.DataApiRestRowsQuery} params.query - Bounded row query.
157
+ * @throws {AgentbaseException}
158
+ * @returns {Promise<Models.DataApiRestResult>}
159
+ */
160
+ executeRestRows(params: {
161
+ accessBindingId: number;
162
+ databaseId: number;
163
+ tableName: string;
164
+ query: Models.DataApiRestRowsQuery;
165
+ }): Promise<Models.DataApiRestResult>;
166
+ /**
167
+ * Query read-only rows through the selected Data API binding.
168
+ *
169
+ * @param {number} accessBindingId - Data API binding ID.
170
+ * @param {number} databaseId - Metadata database stable ID.
171
+ * @param {string} tableName - Metadata table name.
172
+ * @param {Models.DataApiRestRowsQuery} query - Bounded row query.
173
+ * @throws {AgentbaseException}
174
+ * @returns {Promise<Models.DataApiRestResult>}
175
+ * @deprecated Use the object parameter style method for a better developer experience.
176
+ */
177
+ executeRestRows(accessBindingId: number, databaseId: number, tableName: string, query: Models.DataApiRestRowsQuery): Promise<Models.DataApiRestResult>;
178
+ /**
179
+ * List non-deleted Data API bindings owned by the current authenticated principal.
180
+ *
181
+ * @param {string} params.cursor - Opaque pagination cursor.
182
+ * @param {number} params.limit - Maximum number of bindings.
183
+ * @throws {AgentbaseException}
184
+ * @returns {Promise<Models.DataApiOwnedBindingList>}
185
+ */
186
+ listMyBindings(params?: {
187
+ cursor?: string;
188
+ limit?: number;
189
+ }): Promise<Models.DataApiOwnedBindingList>;
190
+ /**
191
+ * List non-deleted Data API bindings owned by the current authenticated principal.
192
+ *
193
+ * @param {string} cursor - Opaque pagination cursor.
194
+ * @param {number} limit - Maximum number of bindings.
195
+ * @throws {AgentbaseException}
196
+ * @returns {Promise<Models.DataApiOwnedBindingList>}
197
+ * @deprecated Use the object parameter style method for a better developer experience.
198
+ */
199
+ listMyBindings(cursor?: string, limit?: number): Promise<Models.DataApiOwnedBindingList>;
200
+ /**
201
+ * Get one non-deleted Data API binding owned by the current authenticated principal.
202
+ *
203
+ * @param {number} params.accessBindingId - Data API binding ID.
204
+ * @throws {AgentbaseException}
205
+ * @returns {Promise<Models.DataApiOwnedBinding>}
206
+ */
207
+ getMyBinding(params: {
208
+ accessBindingId: number;
209
+ }): Promise<Models.DataApiOwnedBinding>;
210
+ /**
211
+ * Get one non-deleted Data API binding owned by the current authenticated principal.
212
+ *
213
+ * @param {number} accessBindingId - Data API binding ID.
214
+ * @throws {AgentbaseException}
215
+ * @returns {Promise<Models.DataApiOwnedBinding>}
216
+ * @deprecated Use the object parameter style method for a better developer experience.
217
+ */
218
+ getMyBinding(accessBindingId: number): Promise<Models.DataApiOwnedBinding>;
219
+ /**
220
+ * Return JSON data without an Agentbase session. Send a single token query parameter, or Authorization: Bearer with no query parameters. REST only.
221
+ *
222
+ * @param {string} params.queryId - Fixed query UUID.
223
+ * @throws {AgentbaseException}
224
+ * @returns {Promise<Models.DataApiNativeSqlResult>}
225
+ */
226
+ executeFixedQueryLink(params: {
227
+ queryId: string;
228
+ }): Promise<Models.DataApiNativeSqlResult>;
229
+ /**
230
+ * Return JSON data without an Agentbase session. Send a single token query parameter, or Authorization: Bearer with no query parameters. REST only.
231
+ *
232
+ * @param {string} queryId - Fixed query UUID.
233
+ * @throws {AgentbaseException}
234
+ * @returns {Promise<Models.DataApiNativeSqlResult>}
235
+ * @deprecated Use the object parameter style method for a better developer experience.
236
+ */
237
+ executeFixedQueryLink(queryId: string): Promise<Models.DataApiNativeSqlResult>;
238
+ /**
239
+ * Return JSON data without an Agentbase session. Send Authorization: Bearer with the fixed query credential and an empty JSON object. REST only.
240
+ *
241
+ * @param {string} params.queryId - Fixed query UUID.
242
+ * @throws {AgentbaseException}
243
+ * @returns {Promise<Models.DataApiNativeSqlResult>}
244
+ */
245
+ executeFixedQuery(params: {
246
+ queryId: string;
247
+ }): Promise<Models.DataApiNativeSqlResult>;
248
+ /**
249
+ * Return JSON data without an Agentbase session. Send Authorization: Bearer with the fixed query credential and an empty JSON object. REST only.
250
+ *
251
+ * @param {string} queryId - Fixed query UUID.
252
+ * @throws {AgentbaseException}
253
+ * @returns {Promise<Models.DataApiNativeSqlResult>}
254
+ * @deprecated Use the object parameter style method for a better developer experience.
255
+ */
256
+ executeFixedQuery(queryId: string): Promise<Models.DataApiNativeSqlResult>;
257
+ }
@@ -1,5 +1,7 @@
1
1
  import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
+ import { PathMatch } from '../enums/path-match';
4
+ import { Method } from '../enums/method';
3
5
  import { ExecutionMethod } from '../enums/execution-method';
4
6
  export declare class Functions {
5
7
  client: Client;
@@ -11,6 +13,9 @@ export declare class Functions {
11
13
  * @param {number} params.limit - Maximum number of execution paths to return.
12
14
  * @param {number} params.offset - Number of execution paths to skip.
13
15
  * @param {boolean} params.total - When set to false, the total count returned will be 0.
16
+ * @param {string} params.xpath - Execution request path or regular expression. Empty means all paths.
17
+ * @param {PathMatch} params.pathMatch - Path matching mode: exact or regex. Regex patterns have no delimiters.
18
+ * @param {Method} params.method - HTTP method to filter. Empty means all methods.
14
19
  * @throws {AgentbaseException}
15
20
  * @returns {Promise<Models.ExecutionPathList>}
16
21
  */
@@ -19,6 +24,9 @@ export declare class Functions {
19
24
  limit?: number;
20
25
  offset?: number;
21
26
  total?: boolean;
27
+ xpath?: string;
28
+ pathMatch?: PathMatch;
29
+ method?: Method;
22
30
  }): Promise<Models.ExecutionPathList>;
23
31
  /**
24
32
  * Get a paginated list of distinct request paths from the current user function executions.
@@ -27,18 +35,23 @@ export declare class Functions {
27
35
  * @param {number} limit - Maximum number of execution paths to return.
28
36
  * @param {number} offset - Number of execution paths to skip.
29
37
  * @param {boolean} total - When set to false, the total count returned will be 0.
38
+ * @param {string} xpath - Execution request path or regular expression. Empty means all paths.
39
+ * @param {PathMatch} pathMatch - Path matching mode: exact or regex. Regex patterns have no delimiters.
40
+ * @param {Method} method - HTTP method to filter. Empty means all methods.
30
41
  * @throws {AgentbaseException}
31
42
  * @returns {Promise<Models.ExecutionPathList>}
32
43
  * @deprecated Use the object parameter style method for a better developer experience.
33
44
  */
34
- listExecutionPaths(functionId: string, limit?: number, offset?: number, total?: boolean): Promise<Models.ExecutionPathList>;
45
+ listExecutionPaths(functionId: string, limit?: number, offset?: number, total?: boolean, xpath?: string, pathMatch?: PathMatch, method?: Method): Promise<Models.ExecutionPathList>;
35
46
  /**
36
- * Get a paginated list of function executions whose request path exactly matches the given path.
47
+ * Get a paginated list of function executions matching the given request path and optional HTTP method.
37
48
  *
38
49
  * @param {string} params.functionId - Function ID.
39
- * @param {string} params.xpath - Exact execution request path to match.
50
+ * @param {string} params.xpath - Execution request path or regular expression to match.
40
51
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. Maximum of 100 queries are allowed, each 4096 characters long.
41
52
  * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
53
+ * @param {PathMatch} params.pathMatch - Path matching mode: exact or regex. Regex patterns have no delimiters.
54
+ * @param {Method} params.method - HTTP method to filter. Empty means all methods.
42
55
  * @throws {AgentbaseException}
43
56
  * @returns {Promise<Models.ExecutionList>}
44
57
  */
@@ -47,25 +60,32 @@ export declare class Functions {
47
60
  xpath: string;
48
61
  queries?: string[];
49
62
  total?: boolean;
63
+ pathMatch?: PathMatch;
64
+ method?: Method;
50
65
  }): Promise<Models.ExecutionList>;
51
66
  /**
52
- * Get a paginated list of function executions whose request path exactly matches the given path.
67
+ * Get a paginated list of function executions matching the given request path and optional HTTP method.
53
68
  *
54
69
  * @param {string} functionId - Function ID.
55
- * @param {string} xpath - Exact execution request path to match.
70
+ * @param {string} xpath - Execution request path or regular expression to match.
56
71
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. Maximum of 100 queries are allowed, each 4096 characters long.
57
72
  * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
73
+ * @param {PathMatch} pathMatch - Path matching mode: exact or regex. Regex patterns have no delimiters.
74
+ * @param {Method} method - HTTP method to filter. Empty means all methods.
58
75
  * @throws {AgentbaseException}
59
76
  * @returns {Promise<Models.ExecutionList>}
60
77
  * @deprecated Use the object parameter style method for a better developer experience.
61
78
  */
62
- listExecutionsByPath(functionId: string, xpath: string, queries?: string[], total?: boolean): Promise<Models.ExecutionList>;
79
+ listExecutionsByPath(functionId: string, xpath: string, queries?: string[], total?: boolean, pathMatch?: PathMatch, method?: Method): Promise<Models.ExecutionList>;
63
80
  /**
64
81
  * Get a list of all the current user function execution logs. You can use the query params to filter your results.
65
82
  *
66
83
  * @param {string} params.functionId - Function ID.
67
84
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries]([HOSTNAME]/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
68
85
  * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
86
+ * @param {string} params.xpath - Execution request path or regular expression. Empty means all paths.
87
+ * @param {PathMatch} params.pathMatch - Path matching mode: exact or regex. Regex patterns have no delimiters.
88
+ * @param {Method} params.method - HTTP method to filter. Empty means all methods.
69
89
  * @throws {AgentbaseException}
70
90
  * @returns {Promise<Models.ExecutionList>}
71
91
  */
@@ -73,6 +93,9 @@ export declare class Functions {
73
93
  functionId: string;
74
94
  queries?: string[];
75
95
  total?: boolean;
96
+ xpath?: string;
97
+ pathMatch?: PathMatch;
98
+ method?: Method;
76
99
  }): Promise<Models.ExecutionList>;
77
100
  /**
78
101
  * Get a list of all the current user function execution logs. You can use the query params to filter your results.
@@ -80,13 +103,17 @@ export declare class Functions {
80
103
  * @param {string} functionId - Function ID.
81
104
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries]([HOSTNAME]/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
82
105
  * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
106
+ * @param {string} xpath - Execution request path or regular expression. Empty means all paths.
107
+ * @param {PathMatch} pathMatch - Path matching mode: exact or regex. Regex patterns have no delimiters.
108
+ * @param {Method} method - HTTP method to filter. Empty means all methods.
83
109
  * @throws {AgentbaseException}
84
110
  * @returns {Promise<Models.ExecutionList>}
85
111
  * @deprecated Use the object parameter style method for a better developer experience.
86
112
  */
87
- listExecutions(functionId: string, queries?: string[], total?: boolean): Promise<Models.ExecutionList>;
113
+ listExecutions(functionId: string, queries?: string[], total?: boolean, xpath?: string, pathMatch?: PathMatch, method?: Method): Promise<Models.ExecutionList>;
88
114
  /**
89
115
  * Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
116
+ * The /project/{projectId}/executions alias selects the project from the URL independently of params. The /executions/params namespace accepts GET, POST, PUT, PATCH, DELETE, HEAD and non-preflight OPTIONS, forwarding the raw body, Content-Type, method and business path/query synchronously without injecting metadata fields. Both execution endpoints can return the business response when the function sends X-Function-Response-Passthrough: true; otherwise the Execution model is returned. Async and scheduled executions always return the Execution model.
90
117
  *
91
118
  * @param {string} params.functionId - Function ID.
92
119
  * @param {string} params.body - HTTP body of execution. Default value is empty string.
@@ -109,6 +136,7 @@ export declare class Functions {
109
136
  }): Promise<Models.Execution>;
110
137
  /**
111
138
  * Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
139
+ * The /project/{projectId}/executions alias selects the project from the URL independently of params. The /executions/params namespace accepts GET, POST, PUT, PATCH, DELETE, HEAD and non-preflight OPTIONS, forwarding the raw body, Content-Type, method and business path/query synchronously without injecting metadata fields. Both execution endpoints can return the business response when the function sends X-Function-Response-Passthrough: true; otherwise the Execution model is returned. Async and scheduled executions always return the Execution model.
112
140
  *
113
141
  * @param {string} functionId - Function ID.
114
142
  * @param {string} body - HTTP body of execution. Default value is empty string.