@azure/ai-projects 1.0.0-alpha.20250505.4 → 1.0.0-alpha.20250512.4
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/browser/aiProjectClient.d.ts +8 -0
- package/dist/browser/aiProjectClient.d.ts.map +1 -1
- package/dist/browser/aiProjectClient.js +15 -0
- package/dist/browser/aiProjectClient.js.map +1 -1
- package/dist/browser/api/aiProjectContext.d.ts +4 -0
- package/dist/browser/api/aiProjectContext.d.ts.map +1 -1
- package/dist/browser/api/aiProjectContext.js +1 -1
- package/dist/browser/api/aiProjectContext.js.map +1 -1
- package/dist/browser/api/connections/index.d.ts +1 -1
- package/dist/browser/api/connections/index.d.ts.map +1 -1
- package/dist/browser/api/connections/index.js +1 -1
- package/dist/browser/api/connections/index.js.map +1 -1
- package/dist/browser/api/connections/operations.d.ts +11 -1
- package/dist/browser/api/connections/operations.d.ts.map +1 -1
- package/dist/browser/api/connections/operations.js +40 -0
- package/dist/browser/api/connections/operations.js.map +1 -1
- package/dist/browser/classic/connections/index.d.ts +3 -1
- package/dist/browser/classic/connections/index.d.ts.map +1 -1
- package/dist/browser/classic/connections/index.js +2 -1
- package/dist/browser/classic/connections/index.js.map +1 -1
- package/dist/browser/constants.d.ts +9 -0
- package/dist/browser/constants.d.ts.map +1 -0
- package/dist/browser/constants.js +11 -0
- package/dist/browser/constants.js.map +1 -0
- package/dist/commonjs/aiProjectClient.d.ts +8 -0
- package/dist/commonjs/aiProjectClient.d.ts.map +1 -1
- package/dist/commonjs/aiProjectClient.js +15 -0
- package/dist/commonjs/aiProjectClient.js.map +1 -1
- package/dist/commonjs/api/aiProjectContext.d.ts +4 -0
- package/dist/commonjs/api/aiProjectContext.d.ts.map +1 -1
- package/dist/commonjs/api/aiProjectContext.js +1 -1
- package/dist/commonjs/api/aiProjectContext.js.map +1 -1
- package/dist/commonjs/api/connections/index.d.ts +1 -1
- package/dist/commonjs/api/connections/index.d.ts.map +1 -1
- package/dist/commonjs/api/connections/index.js +2 -1
- package/dist/commonjs/api/connections/index.js.map +1 -1
- package/dist/commonjs/api/connections/operations.d.ts +11 -1
- package/dist/commonjs/api/connections/operations.d.ts.map +1 -1
- package/dist/commonjs/api/connections/operations.js +41 -0
- package/dist/commonjs/api/connections/operations.js.map +1 -1
- package/dist/commonjs/classic/connections/index.d.ts +3 -1
- package/dist/commonjs/classic/connections/index.d.ts.map +1 -1
- package/dist/commonjs/classic/connections/index.js +1 -0
- package/dist/commonjs/classic/connections/index.js.map +1 -1
- package/dist/commonjs/constants.d.ts +9 -0
- package/dist/commonjs/constants.d.ts.map +1 -0
- package/dist/commonjs/constants.js +14 -0
- package/dist/commonjs/constants.js.map +1 -0
- package/dist/esm/aiProjectClient.d.ts +8 -0
- package/dist/esm/aiProjectClient.d.ts.map +1 -1
- package/dist/esm/aiProjectClient.js +15 -0
- package/dist/esm/aiProjectClient.js.map +1 -1
- package/dist/esm/api/aiProjectContext.d.ts +4 -0
- package/dist/esm/api/aiProjectContext.d.ts.map +1 -1
- package/dist/esm/api/aiProjectContext.js +1 -1
- package/dist/esm/api/aiProjectContext.js.map +1 -1
- package/dist/esm/api/connections/index.d.ts +1 -1
- package/dist/esm/api/connections/index.d.ts.map +1 -1
- package/dist/esm/api/connections/index.js +1 -1
- package/dist/esm/api/connections/index.js.map +1 -1
- package/dist/esm/api/connections/operations.d.ts +11 -1
- package/dist/esm/api/connections/operations.d.ts.map +1 -1
- package/dist/esm/api/connections/operations.js +40 -0
- package/dist/esm/api/connections/operations.js.map +1 -1
- package/dist/esm/classic/connections/index.d.ts +3 -1
- package/dist/esm/classic/connections/index.d.ts.map +1 -1
- package/dist/esm/classic/connections/index.js +2 -1
- package/dist/esm/classic/connections/index.js.map +1 -1
- package/dist/esm/constants.d.ts +9 -0
- package/dist/esm/constants.d.ts.map +1 -0
- package/dist/esm/constants.js +11 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/react-native/aiProjectClient.d.ts +8 -0
- package/dist/react-native/aiProjectClient.d.ts.map +1 -1
- package/dist/react-native/aiProjectClient.js +15 -0
- package/dist/react-native/aiProjectClient.js.map +1 -1
- package/dist/react-native/api/aiProjectContext.d.ts +4 -0
- package/dist/react-native/api/aiProjectContext.d.ts.map +1 -1
- package/dist/react-native/api/aiProjectContext.js +1 -1
- package/dist/react-native/api/aiProjectContext.js.map +1 -1
- package/dist/react-native/api/connections/index.d.ts +1 -1
- package/dist/react-native/api/connections/index.d.ts.map +1 -1
- package/dist/react-native/api/connections/index.js +1 -1
- package/dist/react-native/api/connections/index.js.map +1 -1
- package/dist/react-native/api/connections/operations.d.ts +11 -1
- package/dist/react-native/api/connections/operations.d.ts.map +1 -1
- package/dist/react-native/api/connections/operations.js +40 -0
- package/dist/react-native/api/connections/operations.js.map +1 -1
- package/dist/react-native/classic/connections/index.d.ts +3 -1
- package/dist/react-native/classic/connections/index.d.ts.map +1 -1
- package/dist/react-native/classic/connections/index.js +2 -1
- package/dist/react-native/classic/connections/index.js.map +1 -1
- package/dist/react-native/constants.d.ts +9 -0
- package/dist/react-native/constants.d.ts.map +1 -0
- package/dist/react-native/constants.js +11 -0
- package/dist/react-native/constants.js.map +1 -0
- package/package.json +16 -20
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
import { list, getWithCredentials, get } from "../../api/connections/operations.js";
|
|
3
|
+
import { list, getWithCredentials, get, getDefault } from "../../api/connections/operations.js";
|
|
4
4
|
function _getConnections(context) {
|
|
5
5
|
return {
|
|
6
6
|
list: (options) => list(context, options),
|
|
7
7
|
getWithCredentials: (name, options) => getWithCredentials(context, name, options),
|
|
8
8
|
get: (name, includeCredentials, options) => get(context, name, includeCredentials, options),
|
|
9
|
+
getDefault: (connectionType, includeCredentials) => getDefault(context, connectionType, includeCredentials),
|
|
9
10
|
};
|
|
10
11
|
}
|
|
11
12
|
export function _getConnectionsOperations(context) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/connections/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/connections/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAsBhG,SAAS,eAAe,CAAC,OAAyB;IAChD,OAAO;QACL,IAAI,EAAE,CAAC,OAAuC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;QACzE,kBAAkB,EAAE,CAAC,IAAY,EAAE,OAAqD,EAAE,EAAE,CAC1F,kBAAkB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC;QAC5C,GAAG,EAAE,CAAC,IAAY,EAAE,kBAA4B,EAAE,OAAsC,EAAE,EAAE,CAC1F,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC;QACjD,UAAU,EAAE,CAAC,cAA8B,EAAE,kBAA4B,EAAE,EAAE,CAC3E,UAAU,CAAC,OAAO,EAAE,cAAc,EAAE,kBAAkB,CAAC;KAC1D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,OAAyB;IACjE,yBACK,eAAe,CAAC,OAAO,CAAC,EAC3B;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AIProjectContext } from \"../../api/aiProjectContext.js\";\nimport { Connection, ConnectionType } from \"../../models/models.js\";\nimport {\n ConnectionsListOptionalParams,\n ConnectionsGetWithCredentialsOptionalParams,\n ConnectionsGetOptionalParams,\n} from \"../../api/connections/options.js\";\nimport { list, getWithCredentials, get, getDefault } from \"../../api/connections/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a Connections operations. */\nexport interface ConnectionsOperations {\n /** List all connections in the project, without populating connection credentials */\n list: (options?: ConnectionsListOptionalParams) => PagedAsyncIterableIterator<Connection>;\n /** Get a connection by name, with its connection credentials */\n getWithCredentials: (\n name: string,\n options?: ConnectionsGetWithCredentialsOptionalParams,\n ) => Promise<Connection>;\n /** Get a connection by name, without populating connection credentials */\n get: (\n name: string,\n includeCredentials?: boolean,\n options?: ConnectionsGetOptionalParams,\n ) => Promise<Connection>;\n /** Get the default connection for the project */\n getDefault: (connectionType: ConnectionType, includeCredentials?: boolean) => Promise<Connection>;\n}\n\nfunction _getConnections(context: AIProjectContext) {\n return {\n list: (options?: ConnectionsListOptionalParams) => list(context, options),\n getWithCredentials: (name: string, options?: ConnectionsGetWithCredentialsOptionalParams) =>\n getWithCredentials(context, name, options),\n get: (name: string, includeCredentials?: boolean, options?: ConnectionsGetOptionalParams) =>\n get(context, name, includeCredentials, options),\n getDefault: (connectionType: ConnectionType, includeCredentials?: boolean) =>\n getDefault(context, connectionType, includeCredentials),\n };\n}\n\nexport function _getConnectionsOperations(context: AIProjectContext): ConnectionsOperations {\n return {\n ..._getConnections(context),\n };\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Current version of the `@azure/ai-projects` package.
|
|
3
|
+
*/
|
|
4
|
+
export declare const SDK_VERSION = "1.0.0-beta.5";
|
|
5
|
+
/**
|
|
6
|
+
* The package name of the `@azure/ai-projects` package.
|
|
7
|
+
*/
|
|
8
|
+
export declare const PACKAGE_NAME = "@azure/ai-projects";
|
|
9
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,WAAW,iBAAiB,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,YAAY,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
/**
|
|
4
|
+
* Current version of the `@azure/ai-projects` package.
|
|
5
|
+
*/
|
|
6
|
+
export const SDK_VERSION = `1.0.0-beta.5`;
|
|
7
|
+
/**
|
|
8
|
+
* The package name of the `@azure/ai-projects` package.
|
|
9
|
+
*/
|
|
10
|
+
export const PACKAGE_NAME = "@azure/ai-projects";
|
|
11
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,cAAc,CAAC;AAE1C;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,oBAAoB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the `@azure/ai-projects` package.\n */\nexport const SDK_VERSION = `1.0.0-beta.5`;\n\n/**\n * The package name of the `@azure/ai-projects` package.\n */\nexport const PACKAGE_NAME = \"@azure/ai-projects\";\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AgentsClient } from "@azure/ai-agents";
|
|
1
2
|
import { AIProjectClientOptionalParams } from "./api/index.js";
|
|
2
3
|
import { RedTeamsOperations } from "./classic/redTeams/index.js";
|
|
3
4
|
import { DeploymentsOperations } from "./classic/deployments/index.js";
|
|
@@ -33,6 +34,7 @@ export declare class AIProjectClient {
|
|
|
33
34
|
private _client;
|
|
34
35
|
private _endpoint;
|
|
35
36
|
private _credential;
|
|
37
|
+
private _agents;
|
|
36
38
|
/** The pipeline used by this client to make requests */
|
|
37
39
|
readonly pipeline: Pipeline;
|
|
38
40
|
constructor(endpointParam: string, credential: TokenCredential, options?: AIProjectClientOptionalParams);
|
|
@@ -71,5 +73,11 @@ export declare class AIProjectClient {
|
|
|
71
73
|
* @param options - The parameter for all optional parameters
|
|
72
74
|
*/
|
|
73
75
|
static fromEndpoint(endpoint: string, credential: TokenCredential, options?: AIProjectClientOptionalParams): AIProjectClient;
|
|
76
|
+
/**
|
|
77
|
+
* Get the AgentsClient associated with this AIProjectClient.
|
|
78
|
+
*
|
|
79
|
+
* @returns The AgentsClient associated with this AIProjectClient
|
|
80
|
+
*/
|
|
81
|
+
get agents(): AgentsClient;
|
|
74
82
|
}
|
|
75
83
|
//# sourceMappingURL=aiProjectClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aiProjectClient.d.ts","sourceRoot":"","sources":["../../src/aiProjectClient.ts"],"names":[],"mappings":"AAIA,OAAO,EAAqC,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;AAClG,OAAO,EAAE,kBAAkB,EAA0B,MAAM,6BAA6B,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAA6B,MAAM,gCAAgC,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAyB,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAA0B,MAAM,6BAA6B,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAA6B,MAAM,gCAAgC,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAA6B,MAAM,gCAAgC,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAA2B,MAAM,8BAA8B,CAAC;AAC5F,OAAO,EACL,mBAAmB,EAGnB,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,6BAA6B,EAAE,MAAM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,yCAAyC;IACzC,SAAgB,SAAS,EAAE,mBAAmB,CAAC;IAC/C,yCAAyC;IACzC,SAAgB,SAAS,EAAE,mBAAmB,CAAC;IAC/C,kDAAkD;IAClD,SAAgB,eAAe,EAAE,mBAAmB,CAAC;IAErD;;;OAGG;IACI,cAAc,IAAI,MAAM;IAI/B;;;OAGG;IACI,aAAa,IAAI,eAAe;IAIvC;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CACjB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,6BAAkC,GAC1C,eAAe;IAIlB;;;;OAIG;IAEH,IAAW,MAAM,IAAI,YAAY,CAOhC;CACF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
/* eslint-disable tsdoc/syntax */
|
|
4
|
+
import { AgentsClient } from "@azure/ai-agents";
|
|
4
5
|
import { createAIProject } from "./api/index.js";
|
|
5
6
|
import { _getRedTeamsOperations } from "./classic/redTeams/index.js";
|
|
6
7
|
import { _getDeploymentsOperations } from "./classic/deployments/index.js";
|
|
@@ -73,5 +74,19 @@ export class AIProjectClient {
|
|
|
73
74
|
static fromEndpoint(endpoint, credential, options = {}) {
|
|
74
75
|
return new AIProjectClient(endpoint, credential, options);
|
|
75
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Get the AgentsClient associated with this AIProjectClient.
|
|
79
|
+
*
|
|
80
|
+
* @returns The AgentsClient associated with this AIProjectClient
|
|
81
|
+
*/
|
|
82
|
+
// eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients
|
|
83
|
+
get agents() {
|
|
84
|
+
if (!this._agents) {
|
|
85
|
+
this._agents = new AgentsClient(this._endpoint, this._credential, {
|
|
86
|
+
userAgentOptions: this._client.getUserAgent(),
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return this._agents;
|
|
90
|
+
}
|
|
76
91
|
}
|
|
77
92
|
//# sourceMappingURL=aiProjectClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aiProjectClient.js","sourceRoot":"","sources":["../../src/aiProjectClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iCAAiC;AAEjC,OAAO,EAAE,eAAe,EAAmD,MAAM,gBAAgB,CAAC;AAClG,OAAO,EAAsB,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACzF,OAAO,EAAyB,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAClG,OAAO,EAAqB,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAsB,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACzF,OAAO,EAAyB,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAClG,OAAO,EAAyB,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAClG,OAAO,EAAuB,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5F,OAAO,EAEL,uBAAuB,EACvB,eAAe,GAEhB,MAAM,8BAA8B,CAAC;AAMtC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,OAAO,eAAe;
|
|
1
|
+
{"version":3,"file":"aiProjectClient.js","sourceRoot":"","sources":["../../src/aiProjectClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iCAAiC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAmD,MAAM,gBAAgB,CAAC;AAClG,OAAO,EAAsB,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACzF,OAAO,EAAyB,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAClG,OAAO,EAAqB,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAsB,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACzF,OAAO,EAAyB,yBAAyB,EAAE,MAAM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CAAC;QAC3D,IAAI,CAAC,SAAS,GAAG,uBAAuB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QACzE,IAAI,CAAC,SAAS,GAAG,uBAAuB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC3D,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;IAqBD;;;OAGG;IACI,cAAc;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;;OAGG;IACI,aAAa;QAClB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CACjB,QAAgB,EAChB,UAA2B,EAC3B,UAAyC,EAAE;QAE3C,OAAO,IAAI,eAAe,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED;;;;OAIG;IACH,iEAAiE;IACjE,IAAW,MAAM;QACf,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,IAAI,CAAC,OAAO,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,EAAE;gBAChE,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;aAC9C,CAAC,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/* eslint-disable tsdoc/syntax */\n\nimport { AgentsClient } from \"@azure/ai-agents\";\nimport { createAIProject, AIProjectContext, AIProjectClientOptionalParams } from \"./api/index.js\";\nimport { RedTeamsOperations, _getRedTeamsOperations } from \"./classic/redTeams/index.js\";\nimport { DeploymentsOperations, _getDeploymentsOperations } from \"./classic/deployments/index.js\";\nimport { IndexesOperations, _getIndexesOperations } from \"./classic/indexes/index.js\";\nimport { DatasetsOperations, _getDatasetsOperations } from \"./classic/datasets/index.js\";\nimport { EvaluationsOperations, _getEvaluationsOperations } from \"./classic/evaluations/index.js\";\nimport { ConnectionsOperations, _getConnectionsOperations } from \"./classic/connections/index.js\";\nimport { InferenceOperations, _getInferenceOperations } from \"./classic/inference/index.js\";\nimport {\n TelemetryOperations,\n _getTelemetryOperations,\n enableTelemetry,\n EnableTelemetryType,\n} from \"./classic/telemetry/index.js\";\nimport type { Pipeline } from \"@azure/core-rest-pipeline\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport { AIProjectClientOptionalParams } from \"./api/aiProjectContext.js\";\n\n/**\n * The main client for the AIProjectClient service. It provides access to the various operations available in the service.\n * @class AIProjectClient\n * @extends {AIProjectContext}\n * @description The main client for the AIProjectClient\n * @constructor\n * @param {string} endpoint - The endpoint to use\n * @param {TokenCredential} credential - The credential to use\n * @param {AIProjectClientOptionalParams} [options] - Optional parameters for the client.\n * @property {RedTeamsOperations} redTeams - The operation groups for redTeams\n * @property {DeploymentsOperations} deployments - The operation groups for deployments\n * @property {IndexesOperations} indexes - The operation groups for indexes\n * @property {DatasetsOperations} datasets - The operation groups for datasets\n * @property {EvaluationsOperations} evaluations - The operation groups for evaluations\n * @property {ConnectionsOperations} connections - The operation groups for connections\n * @property {InferenceOperations} inference - The operation groups for inference\n * @property {TelemetryOperations} telemetry - The operation groups for telemetry\n * @property {EnableTelemetryType} enableTelemetry - The operation groups for enabling telemetry\n */\nexport class AIProjectClient {\n private _client: AIProjectContext;\n private _endpoint: string;\n private _credential: TokenCredential;\n private _agents: AgentsClient | undefined;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n constructor(\n endpointParam: string,\n credential: TokenCredential,\n options: AIProjectClientOptionalParams = {},\n ) {\n this._endpoint = endpointParam;\n this._credential = credential;\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createAIProject(endpointParam, credential, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.redTeams = _getRedTeamsOperations(this._client);\n this.deployments = _getDeploymentsOperations(this._client);\n this.indexes = _getIndexesOperations(this._client);\n this.datasets = _getDatasetsOperations(this._client);\n this.evaluations = _getEvaluationsOperations(this._client);\n this.connections = _getConnectionsOperations(this._client);\n this.inference = _getInferenceOperations(this._client, this.connections);\n this.telemetry = _getTelemetryOperations(this.connections);\n this.enableTelemetry = enableTelemetry;\n }\n\n /** The operation groups for redTeams */\n public readonly redTeams: RedTeamsOperations;\n /** The operation groups for deployments */\n public readonly deployments: DeploymentsOperations;\n /** The operation groups for indexes */\n public readonly indexes: IndexesOperations;\n /** The operation groups for datasets */\n public readonly datasets: DatasetsOperations;\n /** The operation groups for evaluations */\n public readonly evaluations: EvaluationsOperations;\n /** The operation groups for connections */\n public readonly connections: ConnectionsOperations;\n /** The operation groups for inference */\n public readonly inference: InferenceOperations;\n /** The operation groups for telemetry */\n public readonly telemetry: TelemetryOperations;\n /** The operation groups for enabling telemetry */\n public readonly enableTelemetry: EnableTelemetryType;\n\n /**\n * gets the endpoint of the client\n * @returns the endpoint of the client\n */\n public getEndpointUrl(): string {\n return this._endpoint;\n }\n\n /**\n * gets the credential of the client\n * @returns the credential of the client\n */\n public getCredential(): TokenCredential {\n return this._credential;\n }\n\n /**\n * Creates a new instance of AzureAIProjectClient\n * @param endpoint - The endpoint to use\n * @param credential - The credential to use\n * @param options - The parameter for all optional parameters\n */\n static fromEndpoint(\n endpoint: string,\n credential: TokenCredential,\n options: AIProjectClientOptionalParams = {},\n ): AIProjectClient {\n return new AIProjectClient(endpoint, credential, options);\n }\n\n /**\n * Get the AgentsClient associated with this AIProjectClient.\n *\n * @returns The AgentsClient associated with this AIProjectClient\n */\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients\n public get agents(): AgentsClient {\n if (!this._agents) {\n this._agents = new AgentsClient(this._endpoint, this._credential, {\n userAgentOptions: this._client.getUserAgent(),\n });\n }\n return this._agents;\n }\n}\n"]}
|
|
@@ -6,6 +6,10 @@ export interface AIProjectContext extends Client {
|
|
|
6
6
|
apiVersion: string;
|
|
7
7
|
/** The endpoint URL used to construct AIProjectClient. */
|
|
8
8
|
getEndpointUrl(): string;
|
|
9
|
+
/** The user agent string used to construct AIProjectClient. */
|
|
10
|
+
getUserAgent(): {
|
|
11
|
+
userAgentPrefix: string;
|
|
12
|
+
};
|
|
9
13
|
/** The credential used to construct AIProjectClient. */
|
|
10
14
|
getCredential(): TokenCredential;
|
|
11
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aiProjectContext.d.ts","sourceRoot":"","sources":["../../../src/api/aiProjectContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAa,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,WAAW,gBAAiB,SAAQ,MAAM;IAC9C,iDAAiD;IACjD,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,cAAc,IAAI,MAAM,CAAC;IACzB,wDAAwD;IACxD,aAAa,IAAI,eAAe,CAAC;CAClC;AAED,0CAA0C;AAC1C,MAAM,WAAW,6BAA8B,SAAQ,aAAa;IAClE,iDAAiD;IACjD,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,eAAe,CAC7B,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,6BAAkC,GAC1C,gBAAgB,
|
|
1
|
+
{"version":3,"file":"aiProjectContext.d.ts","sourceRoot":"","sources":["../../../src/api/aiProjectContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAa,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,WAAW,gBAAiB,SAAQ,MAAM;IAC9C,iDAAiD;IACjD,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,cAAc,IAAI,MAAM,CAAC;IACzB,+DAA+D;IAC/D,YAAY,IAAI;QAAE,eAAe,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,wDAAwD;IACxD,aAAa,IAAI,eAAe,CAAC;CAClC;AAED,0CAA0C;AAC1C,MAAM,WAAW,6BAA8B,SAAQ,aAAa;IAClE,iDAAiD;IACjD,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,eAAe,CAC7B,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,6BAAkC,GAC1C,gBAAgB,CA0ClB"}
|
|
@@ -33,6 +33,6 @@ export function createAIProject(endpointParam, credential, options = {}) {
|
|
|
33
33
|
return next(req);
|
|
34
34
|
},
|
|
35
35
|
});
|
|
36
|
-
return Object.assign(Object.assign({}, clientContext), { apiVersion, getEndpointUrl: () => endpointUrl, getCredential: () => credential });
|
|
36
|
+
return Object.assign(Object.assign({}, clientContext), { apiVersion, getEndpointUrl: () => endpointUrl, getUserAgent: () => ({ userAgentPrefix }), getCredential: () => credential });
|
|
37
37
|
}
|
|
38
38
|
//# sourceMappingURL=aiProjectContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aiProjectContext.js","sourceRoot":"","sources":["../../../src/api/aiProjectContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAyB,SAAS,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"aiProjectContext.js","sourceRoot":"","sources":["../../../src/api/aiProjectContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OA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AC;IAC9D,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC/B,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,MAAM,iBAAiB,GAAG,MAAA,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,mCAAI,UAAU,CAAC;YAC5E,8BAA8B;YAC9B,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;YACvC,yBAAyB;YACzB,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,QAAQ,EAAE,GACzB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,iBAAiB,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,gCACF,aAAa,KAChB,UAAU,EACV,cAAc,EAAE,GAAG,EAAE,CAAC,WAAW,EACjC,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,EACzC,aAAa,EAAE,GAAG,EAAE,CAAC,UAAU,GACZ,CAAC;AACxB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport { Client, ClientOptions, getClient } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport interface AIProjectContext extends Client {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion: string;\n /** The endpoint URL used to construct AIProjectClient. */\n getEndpointUrl(): string;\n /** The user agent string used to construct AIProjectClient. */\n getUserAgent(): { userAgentPrefix: string };\n /** The credential used to construct AIProjectClient. */\n getCredential(): TokenCredential;\n}\n\n/** Optional parameters for the client. */\nexport interface AIProjectClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\nexport function createAIProject(\n endpointParam: string,\n credential: TokenCredential,\n options: AIProjectClientOptionalParams = {},\n): AIProjectContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? String(endpointParam);\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-ai-projects/1.0.0-beta.6`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://cognitiveservices.azure.com/.default\"],\n apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? \"Ocp-Apim-Subscription-Key\",\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2025-05-15-preview\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n const defaultApiVersion = url.searchParams.get(\"api-version\") ?? apiVersion;\n // remove api-version from url\n url.searchParams.delete(\"api-version\");\n // add api-version to url\n req.url = `${url.toString()}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${defaultApiVersion}`;\n return next(req);\n },\n });\n return {\n ...clientContext,\n apiVersion,\n getEndpointUrl: () => endpointUrl,\n getUserAgent: () => ({ userAgentPrefix }),\n getCredential: () => credential,\n } as AIProjectContext;\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { list, getWithCredentials, get } from "./operations.js";
|
|
1
|
+
export { list, getWithCredentials, get, getDefault } from "./operations.js";
|
|
2
2
|
export { ConnectionsListOptionalParams, ConnectionsGetWithCredentialsOptionalParams, ConnectionsGetOptionalParams, } from "./options.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/connections/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/connections/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EACL,6BAA6B,EAC7B,2CAA2C,EAC3C,4BAA4B,GAC7B,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/connections/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { list, getWithCredentials, get } from \"./operations.js\";\nexport {\n ConnectionsListOptionalParams,\n ConnectionsGetWithCredentialsOptionalParams,\n ConnectionsGetOptionalParams,\n} from \"./options.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/connections/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { list, getWithCredentials, get, getDefault } from \"./operations.js\";\nexport {\n ConnectionsListOptionalParams,\n ConnectionsGetWithCredentialsOptionalParams,\n ConnectionsGetOptionalParams,\n} from \"./options.js\";\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AIProjectContext as Client } from "../index.js";
|
|
2
|
-
import { Connection, _PagedConnection } from "../../models/models.js";
|
|
2
|
+
import { Connection, _PagedConnection, ConnectionType } from "../../models/models.js";
|
|
3
3
|
import { ConnectionsListOptionalParams, ConnectionsGetWithCredentialsOptionalParams, ConnectionsGetOptionalParams } from "./options.js";
|
|
4
4
|
import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
|
|
5
5
|
import { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client";
|
|
@@ -15,4 +15,14 @@ export declare function _getSend(context: Client, name: string, options?: Connec
|
|
|
15
15
|
export declare function _getDeserialize(result: PathUncheckedResponse): Promise<Connection>;
|
|
16
16
|
/** Get a connection by name, without populating connection credentials */
|
|
17
17
|
export declare function get(context: Client, name: string, includeCredentials?: boolean, options?: ConnectionsGetOptionalParams): Promise<Connection>;
|
|
18
|
+
/**
|
|
19
|
+
* Get the default connection for a given connection type.
|
|
20
|
+
*
|
|
21
|
+
* @param context - The AIProjectContext client
|
|
22
|
+
* @param connectionType - The type of the connection. Required.
|
|
23
|
+
* @param includeCredentials - Whether to include credentials in the response. Default is false.
|
|
24
|
+
* @returns A Connection object
|
|
25
|
+
* @throws Error if no default connection is found for the given type.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getDefault(context: Client, connectionType: ConnectionType, includeCredentials?: boolean): Promise<Connection>;
|
|
18
28
|
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../src/api/connections/operations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EACL,UAAU,EAEV,gBAAgB,
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../src/api/connections/operations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EACL,UAAU,EAEV,gBAAgB,EAEhB,cAAc,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,6BAA6B,EAC7B,2CAA2C,EAC3C,4BAA4B,EAC7B,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,0BAA0B,EAE3B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EAGtB,MAAM,yBAAyB,CAAC;AAEjC,wBAAgB,SAAS,CACvB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,6BAAsD,GAC9D,gBAAgB,CAyBlB;AAED,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAO/F;AAED,qFAAqF;AACrF,wBAAgB,IAAI,CAClB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,6BAAsD,GAC9D,0BAA0B,CAAC,UAAU,CAAC,CAQxC;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,2CAAoE,GAC5E,gBAAgB,CAqBlB;AAED,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,UAAU,CAAC,CAOrB;AAED,gEAAgE;AAChE,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,2CAAoE,GAC5E,OAAO,CAAC,UAAU,CAAC,CAGrB;AAED,wBAAgB,QAAQ,CACtB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,4BAAqD,GAC7D,gBAAgB,CAqBlB;AAED,wBAAsB,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,CAOxF;AAED,0EAA0E;AAC1E,wBAAsB,GAAG,CACvB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,kBAAkB,CAAC,EAAE,OAAO,EAC5B,OAAO,GAAE,4BAAqD,GAC7D,OAAO,CAAC,UAAU,CAAC,CAMrB;AAED;;;;;;;;GAQG;AACH,wBAAsB,UAAU,CAC9B,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,cAAc,EAC9B,kBAAkB,GAAE,OAAe,GAClC,OAAO,CAAC,UAAU,CAAC,CAmBrB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
+
import { __asyncValues } from "tslib";
|
|
3
4
|
import { connectionDeserializer, _pagedConnectionDeserializer, } from "../../models/models.js";
|
|
4
5
|
import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
|
|
5
6
|
import { buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js";
|
|
@@ -82,4 +83,43 @@ export async function get(context, name, includeCredentials, options = { request
|
|
|
82
83
|
const result = await _getSend(context, name, options);
|
|
83
84
|
return _getDeserialize(result);
|
|
84
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Get the default connection for a given connection type.
|
|
88
|
+
*
|
|
89
|
+
* @param context - The AIProjectContext client
|
|
90
|
+
* @param connectionType - The type of the connection. Required.
|
|
91
|
+
* @param includeCredentials - Whether to include credentials in the response. Default is false.
|
|
92
|
+
* @returns A Connection object
|
|
93
|
+
* @throws Error if no default connection is found for the given type.
|
|
94
|
+
*/
|
|
95
|
+
export async function getDefault(context, connectionType, includeCredentials = false) {
|
|
96
|
+
var _a, e_1, _b, _c;
|
|
97
|
+
const listOptions = {
|
|
98
|
+
connectionType,
|
|
99
|
+
defaultConnection: true,
|
|
100
|
+
};
|
|
101
|
+
// Use the list function to find default connections of the specified type
|
|
102
|
+
const connections = list(context, listOptions);
|
|
103
|
+
try {
|
|
104
|
+
// Find the first default connection
|
|
105
|
+
for (var _d = true, connections_1 = __asyncValues(connections), connections_1_1; connections_1_1 = await connections_1.next(), _a = connections_1_1.done, !_a; _d = true) {
|
|
106
|
+
_c = connections_1_1.value;
|
|
107
|
+
_d = false;
|
|
108
|
+
const connection = _c;
|
|
109
|
+
if (includeCredentials) {
|
|
110
|
+
// If credentials are requested, get the connection with credentials
|
|
111
|
+
return getWithCredentials(context, connection.name);
|
|
112
|
+
}
|
|
113
|
+
return connection;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
117
|
+
finally {
|
|
118
|
+
try {
|
|
119
|
+
if (!_d && !_a && (_b = connections_1.return)) await _b.call(connections_1);
|
|
120
|
+
}
|
|
121
|
+
finally { if (e_1) throw e_1.error; }
|
|
122
|
+
}
|
|
123
|
+
throw new Error(`No default connection found for type: ${connectionType}.`);
|
|
124
|
+
}
|
|
85
125
|
//# sourceMappingURL=operations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/connections/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAEL,sBAAsB,EAEtB,4BAA4B,GAC7B,MAAM,wBAAwB,CAAC;AAMhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CAA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CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,eAAe,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,sBAAsB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC7C,CAAC;AAED,0EAA0E;AAC1E,MAAM,CAAC,KAAK,UAAU,GAAG,CACvB,OAAe,EACf,IAAY,EACZ,kBAA4B,EAC5B,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,IAAI,kBAAkB,EAAE,CAAC;QACvB,OAAO,kBAAkB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACtD,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AIProjectContext as Client } from \"../index.js\";\nimport {\n Connection,\n connectionDeserializer,\n _PagedConnection,\n _pagedConnectionDeserializer,\n} from \"../../models/models.js\";\nimport {\n ConnectionsListOptionalParams,\n ConnectionsGetWithCredentialsOptionalParams,\n ConnectionsGetOptionalParams,\n} from \"./options.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\n\nexport function _listSend(\n context: Client,\n options: ConnectionsListOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/connections{?api-version,connectionType,defaultConnection,top,skip,maxpagesize}\",\n {\n \"api-version\": context.apiVersion,\n connectionType: options?.connectionType,\n defaultConnection: options?.defaultConnection,\n top: options?.top,\n skip: options?.skip,\n maxpagesize: options?.maxpagesize,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n ...(options?.clientRequestId !== undefined\n ? { \"x-ms-client-request-id\": options?.clientRequestId }\n : {}),\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listDeserialize(result: PathUncheckedResponse): Promise<_PagedConnection> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return _pagedConnectionDeserializer(result.body);\n}\n\n/** List all connections in the project, without populating connection credentials */\nexport function list(\n context: Client,\n options: ConnectionsListOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<Connection> {\n return buildPagedAsyncIterator(\n context,\n () => _listSend(context, options),\n _listDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _getWithCredentialsSend(\n context: Client,\n name: string,\n options: ConnectionsGetWithCredentialsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/connections/{name}/getConnectionWithCredentials{?api-version}\",\n {\n name: name,\n \"api-version\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n headers: {\n ...(options?.clientRequestId !== undefined\n ? { \"x-ms-client-request-id\": options?.clientRequestId }\n : {}),\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getWithCredentialsDeserialize(\n result: PathUncheckedResponse,\n): Promise<Connection> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return connectionDeserializer(result.body);\n}\n\n/** Get a connection by name, with its connection credentials */\nexport async function getWithCredentials(\n context: Client,\n name: string,\n options: ConnectionsGetWithCredentialsOptionalParams = { requestOptions: {} },\n): Promise<Connection> {\n const result = await _getWithCredentialsSend(context, name, options);\n return _getWithCredentialsDeserialize(result);\n}\n\nexport function _getSend(\n context: Client,\n name: string,\n options: ConnectionsGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/connections/{name}{?api-version}\",\n {\n name: name,\n \"api-version\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n ...(options?.clientRequestId !== undefined\n ? { \"x-ms-client-request-id\": options?.clientRequestId }\n : {}),\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeserialize(result: PathUncheckedResponse): Promise<Connection> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return connectionDeserializer(result.body);\n}\n\n/** Get a connection by name, without populating connection credentials */\nexport async function get(\n context: Client,\n name: string,\n includeCredentials?: boolean,\n options: ConnectionsGetOptionalParams = { requestOptions: {} },\n): Promise<Connection> {\n if (includeCredentials) {\n return getWithCredentials(context, name, options);\n }\n const result = await _getSend(context, name, options);\n return _getDeserialize(result);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/connections/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EAEL,sBAAsB,EAEtB,4BAA4B,GAE7B,MAAM,wBAAwB,CAAC;AAMhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CAAC;AAEjC,MAAM,UAAU,SAAS,CACvB,OAAe,EACf,UAAyC,EAAE,cAAc,EAAE,EAAE,EAAE;;IAE/D,MAAM,IAAI,GAAG,iBAAiB,CAC5B,kFAAkF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AAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC7C,CAAC;AAED,0EAA0E;AAC1E,MAAM,CAAC,KAAK,UAAU,GAAG,CACvB,OAAe,EACf,IAAY,EACZ,kBAA4B,EAC5B,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,IAAI,kBAAkB,EAAE,CAAC;QACvB,OAAO,kBAAkB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACtD,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,OAAe,EACf,cAA8B,EAC9B,qBAA8B,KAAK;;IAEnC,MAAM,WAAW,GAAG;QAClB,cAAc;QACd,iBAAiB,EAAE,IAAI;KACxB,CAAC;IAEF,0EAA0E;IAC1E,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;;QAE/C,oCAAoC;QACpC,KAA+B,eAAA,gBAAA,cAAA,WAAW,CAAA,iBAAA,2FAAE,CAAC;YAAd,2BAAW;YAAX,WAAW;YAA/B,MAAM,UAAU,KAAA,CAAA;YACzB,IAAI,kBAAkB,EAAE,CAAC;gBACvB,oEAAoE;gBACpE,OAAO,kBAAkB,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;YACtD,CAAC;YACD,OAAO,UAAU,CAAC;QACpB,CAAC;;;;;;;;;IAED,MAAM,IAAI,KAAK,CAAC,yCAAyC,cAAc,GAAG,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AIProjectContext as Client } from \"../index.js\";\nimport {\n Connection,\n connectionDeserializer,\n _PagedConnection,\n _pagedConnectionDeserializer,\n ConnectionType,\n} from \"../../models/models.js\";\nimport {\n ConnectionsListOptionalParams,\n ConnectionsGetWithCredentialsOptionalParams,\n ConnectionsGetOptionalParams,\n} from \"./options.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\n\nexport function _listSend(\n context: Client,\n options: ConnectionsListOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/connections{?api-version,connectionType,defaultConnection,top,skip,maxpagesize}\",\n {\n \"api-version\": context.apiVersion,\n connectionType: options?.connectionType,\n defaultConnection: options?.defaultConnection,\n top: options?.top,\n skip: options?.skip,\n maxpagesize: options?.maxpagesize,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n ...(options?.clientRequestId !== undefined\n ? { \"x-ms-client-request-id\": options?.clientRequestId }\n : {}),\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listDeserialize(result: PathUncheckedResponse): Promise<_PagedConnection> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return _pagedConnectionDeserializer(result.body);\n}\n\n/** List all connections in the project, without populating connection credentials */\nexport function list(\n context: Client,\n options: ConnectionsListOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<Connection> {\n return buildPagedAsyncIterator(\n context,\n () => _listSend(context, options),\n _listDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _getWithCredentialsSend(\n context: Client,\n name: string,\n options: ConnectionsGetWithCredentialsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/connections/{name}/getConnectionWithCredentials{?api-version}\",\n {\n name: name,\n \"api-version\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n headers: {\n ...(options?.clientRequestId !== undefined\n ? { \"x-ms-client-request-id\": options?.clientRequestId }\n : {}),\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getWithCredentialsDeserialize(\n result: PathUncheckedResponse,\n): Promise<Connection> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return connectionDeserializer(result.body);\n}\n\n/** Get a connection by name, with its connection credentials */\nexport async function getWithCredentials(\n context: Client,\n name: string,\n options: ConnectionsGetWithCredentialsOptionalParams = { requestOptions: {} },\n): Promise<Connection> {\n const result = await _getWithCredentialsSend(context, name, options);\n return _getWithCredentialsDeserialize(result);\n}\n\nexport function _getSend(\n context: Client,\n name: string,\n options: ConnectionsGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/connections/{name}{?api-version}\",\n {\n name: name,\n \"api-version\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n ...(options?.clientRequestId !== undefined\n ? { \"x-ms-client-request-id\": options?.clientRequestId }\n : {}),\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeserialize(result: PathUncheckedResponse): Promise<Connection> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return connectionDeserializer(result.body);\n}\n\n/** Get a connection by name, without populating connection credentials */\nexport async function get(\n context: Client,\n name: string,\n includeCredentials?: boolean,\n options: ConnectionsGetOptionalParams = { requestOptions: {} },\n): Promise<Connection> {\n if (includeCredentials) {\n return getWithCredentials(context, name, options);\n }\n const result = await _getSend(context, name, options);\n return _getDeserialize(result);\n}\n\n/**\n * Get the default connection for a given connection type.\n *\n * @param context - The AIProjectContext client\n * @param connectionType - The type of the connection. Required.\n * @param includeCredentials - Whether to include credentials in the response. Default is false.\n * @returns A Connection object\n * @throws Error if no default connection is found for the given type.\n */\nexport async function getDefault(\n context: Client,\n connectionType: ConnectionType,\n includeCredentials: boolean = false,\n): Promise<Connection> {\n const listOptions = {\n connectionType,\n defaultConnection: true,\n };\n\n // Use the list function to find default connections of the specified type\n const connections = list(context, listOptions);\n\n // Find the first default connection\n for await (const connection of connections) {\n if (includeCredentials) {\n // If credentials are requested, get the connection with credentials\n return getWithCredentials(context, connection.name);\n }\n return connection;\n }\n\n throw new Error(`No default connection found for type: ${connectionType}.`);\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AIProjectContext } from "../../api/aiProjectContext.js";
|
|
2
|
-
import { Connection } from "../../models/models.js";
|
|
2
|
+
import { Connection, ConnectionType } from "../../models/models.js";
|
|
3
3
|
import { ConnectionsListOptionalParams, ConnectionsGetWithCredentialsOptionalParams, ConnectionsGetOptionalParams } from "../../api/connections/options.js";
|
|
4
4
|
import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
|
|
5
5
|
/** Interface representing a Connections operations. */
|
|
@@ -10,6 +10,8 @@ export interface ConnectionsOperations {
|
|
|
10
10
|
getWithCredentials: (name: string, options?: ConnectionsGetWithCredentialsOptionalParams) => Promise<Connection>;
|
|
11
11
|
/** Get a connection by name, without populating connection credentials */
|
|
12
12
|
get: (name: string, includeCredentials?: boolean, options?: ConnectionsGetOptionalParams) => Promise<Connection>;
|
|
13
|
+
/** Get the default connection for the project */
|
|
14
|
+
getDefault: (connectionType: ConnectionType, includeCredentials?: boolean) => Promise<Connection>;
|
|
13
15
|
}
|
|
14
16
|
export declare function _getConnectionsOperations(context: AIProjectContext): ConnectionsOperations;
|
|
15
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/classic/connections/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/classic/connections/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EACL,6BAA6B,EAC7B,2CAA2C,EAC3C,4BAA4B,EAC7B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAEnF,uDAAuD;AACvD,MAAM,WAAW,qBAAqB;IACpC,qFAAqF;IACrF,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,6BAA6B,KAAK,0BAA0B,CAAC,UAAU,CAAC,CAAC;IAC1F,gEAAgE;IAChE,kBAAkB,EAAE,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,2CAA2C,KAClD,OAAO,CAAC,UAAU,CAAC,CAAC;IACzB,0EAA0E;IAC1E,GAAG,EAAE,CACH,IAAI,EAAE,MAAM,EACZ,kBAAkB,CAAC,EAAE,OAAO,EAC5B,OAAO,CAAC,EAAE,4BAA4B,KACnC,OAAO,CAAC,UAAU,CAAC,CAAC;IACzB,iDAAiD;IACjD,UAAU,EAAE,CAAC,cAAc,EAAE,cAAc,EAAE,kBAAkB,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;CACnG;AAcD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,gBAAgB,GAAG,qBAAqB,CAI1F"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
import { list, getWithCredentials, get } from "../../api/connections/operations.js";
|
|
3
|
+
import { list, getWithCredentials, get, getDefault } from "../../api/connections/operations.js";
|
|
4
4
|
function _getConnections(context) {
|
|
5
5
|
return {
|
|
6
6
|
list: (options) => list(context, options),
|
|
7
7
|
getWithCredentials: (name, options) => getWithCredentials(context, name, options),
|
|
8
8
|
get: (name, includeCredentials, options) => get(context, name, includeCredentials, options),
|
|
9
|
+
getDefault: (connectionType, includeCredentials) => getDefault(context, connectionType, includeCredentials),
|
|
9
10
|
};
|
|
10
11
|
}
|
|
11
12
|
export function _getConnectionsOperations(context) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/connections/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/connections/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAsBhG,SAAS,eAAe,CAAC,OAAyB;IAChD,OAAO;QACL,IAAI,EAAE,CAAC,OAAuC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;QACzE,kBAAkB,EAAE,CAAC,IAAY,EAAE,OAAqD,EAAE,EAAE,CAC1F,kBAAkB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC;QAC5C,GAAG,EAAE,CAAC,IAAY,EAAE,kBAA4B,EAAE,OAAsC,EAAE,EAAE,CAC1F,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC;QACjD,UAAU,EAAE,CAAC,cAA8B,EAAE,kBAA4B,EAAE,EAAE,CAC3E,UAAU,CAAC,OAAO,EAAE,cAAc,EAAE,kBAAkB,CAAC;KAC1D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,OAAyB;IACjE,yBACK,eAAe,CAAC,OAAO,CAAC,EAC3B;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AIProjectContext } from \"../../api/aiProjectContext.js\";\nimport { Connection, ConnectionType } from \"../../models/models.js\";\nimport {\n ConnectionsListOptionalParams,\n ConnectionsGetWithCredentialsOptionalParams,\n ConnectionsGetOptionalParams,\n} from \"../../api/connections/options.js\";\nimport { list, getWithCredentials, get, getDefault } from \"../../api/connections/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a Connections operations. */\nexport interface ConnectionsOperations {\n /** List all connections in the project, without populating connection credentials */\n list: (options?: ConnectionsListOptionalParams) => PagedAsyncIterableIterator<Connection>;\n /** Get a connection by name, with its connection credentials */\n getWithCredentials: (\n name: string,\n options?: ConnectionsGetWithCredentialsOptionalParams,\n ) => Promise<Connection>;\n /** Get a connection by name, without populating connection credentials */\n get: (\n name: string,\n includeCredentials?: boolean,\n options?: ConnectionsGetOptionalParams,\n ) => Promise<Connection>;\n /** Get the default connection for the project */\n getDefault: (connectionType: ConnectionType, includeCredentials?: boolean) => Promise<Connection>;\n}\n\nfunction _getConnections(context: AIProjectContext) {\n return {\n list: (options?: ConnectionsListOptionalParams) => list(context, options),\n getWithCredentials: (name: string, options?: ConnectionsGetWithCredentialsOptionalParams) =>\n getWithCredentials(context, name, options),\n get: (name: string, includeCredentials?: boolean, options?: ConnectionsGetOptionalParams) =>\n get(context, name, includeCredentials, options),\n getDefault: (connectionType: ConnectionType, includeCredentials?: boolean) =>\n getDefault(context, connectionType, includeCredentials),\n };\n}\n\nexport function _getConnectionsOperations(context: AIProjectContext): ConnectionsOperations {\n return {\n ..._getConnections(context),\n };\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Current version of the `@azure/ai-projects` package.
|
|
3
|
+
*/
|
|
4
|
+
export declare const SDK_VERSION = "1.0.0-beta.5";
|
|
5
|
+
/**
|
|
6
|
+
* The package name of the `@azure/ai-projects` package.
|
|
7
|
+
*/
|
|
8
|
+
export declare const PACKAGE_NAME = "@azure/ai-projects";
|
|
9
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,WAAW,iBAAiB,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,YAAY,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
/**
|
|
4
|
+
* Current version of the `@azure/ai-projects` package.
|
|
5
|
+
*/
|
|
6
|
+
export const SDK_VERSION = `1.0.0-beta.5`;
|
|
7
|
+
/**
|
|
8
|
+
* The package name of the `@azure/ai-projects` package.
|
|
9
|
+
*/
|
|
10
|
+
export const PACKAGE_NAME = "@azure/ai-projects";
|
|
11
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,cAAc,CAAC;AAE1C;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,oBAAoB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the `@azure/ai-projects` package.\n */\nexport const SDK_VERSION = `1.0.0-beta.5`;\n\n/**\n * The package name of the `@azure/ai-projects` package.\n */\nexport const PACKAGE_NAME = \"@azure/ai-projects\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/ai-projects",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.20250512.4",
|
|
4
4
|
"description": "A generated SDK for ProjectsClient.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -58,18 +58,19 @@
|
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
+
"@azure/ai-agents": "1.0.0-alpha.20250507.2",
|
|
61
62
|
"@azure-rest/core-client": "^2.1.0",
|
|
62
63
|
"@azure-rest/ai-inference": ">=1.0.0-alpha <1.0.0-alphb",
|
|
63
64
|
"@azure/abort-controller": "^2.1.2",
|
|
64
65
|
"@azure/core-auth": "^1.6.0",
|
|
65
|
-
"@azure/core-rest-pipeline": "^1.5.0",
|
|
66
|
-
"@azure/core-util": "^1.9.0",
|
|
67
|
-
"@azure/logger": "^1.1.4",
|
|
68
66
|
"@azure/core-lro": "^3.0.0",
|
|
69
|
-
"tslib": "^2.6.2",
|
|
70
67
|
"@azure/core-paging": "^1.5.0",
|
|
68
|
+
"@azure/core-rest-pipeline": "^1.5.0",
|
|
71
69
|
"@azure/core-sse": "^2.1.3",
|
|
72
70
|
"@azure/core-tracing": "^1.2.0",
|
|
71
|
+
"@azure/core-util": "^1.9.0",
|
|
72
|
+
"@azure/logger": "^1.1.4",
|
|
73
|
+
"tslib": "^2.6.2",
|
|
73
74
|
"@azure/storage-blob": "^12.26.0",
|
|
74
75
|
"openai": "^4.84.1",
|
|
75
76
|
"@traceloop/instrumentation-openai": "0.13.0",
|
|
@@ -83,11 +84,12 @@
|
|
|
83
84
|
"@opentelemetry/exporter-logs-otlp-grpc": "^0.200.0"
|
|
84
85
|
},
|
|
85
86
|
"devDependencies": {
|
|
87
|
+
"@azure/ai-agents": "1.0.0-alpha.20250507.2",
|
|
86
88
|
"@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
|
|
87
89
|
"@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
|
|
88
90
|
"@azure/identity": "^4.3.0",
|
|
89
91
|
"@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.7",
|
|
90
|
-
"@azure/monitor-opentelemetry-exporter": "
|
|
92
|
+
"@azure/monitor-opentelemetry-exporter": ">=1.0.0-alpha <1.0.0-alphb",
|
|
91
93
|
"@azure/storage-blob": "^12.26.0",
|
|
92
94
|
"@azure-tools/test-credential": "^2.0.0",
|
|
93
95
|
"@azure-tools/test-recorder": ">=4.1.0-alpha <4.1.0-alphb",
|
|
@@ -101,12 +103,12 @@
|
|
|
101
103
|
"@opentelemetry/api-logs": "^0.200.0",
|
|
102
104
|
"@opentelemetry/sdk-logs": "^0.200.0",
|
|
103
105
|
"@opentelemetry/exporter-logs-otlp-grpc": "^0.200.0",
|
|
106
|
+
"tslib": "^2.6.2",
|
|
107
|
+
"@types/node": "^18.0.0",
|
|
104
108
|
"@vitest/browser": "^3.0.9",
|
|
105
109
|
"@vitest/coverage-istanbul": "^3.0.9",
|
|
106
|
-
"@types/node": "^18.0.0",
|
|
107
110
|
"dotenv": "^16.0.0",
|
|
108
111
|
"eslint": "^9.9.0",
|
|
109
|
-
"prettier": "^3.2.5",
|
|
110
112
|
"playwright": "^1.41.2",
|
|
111
113
|
"typescript": "~5.8.2",
|
|
112
114
|
"vitest": "^3.0.9"
|
|
@@ -114,7 +116,6 @@
|
|
|
114
116
|
"scripts": {
|
|
115
117
|
"build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
|
|
116
118
|
"build:samples": "echo skipped",
|
|
117
|
-
"build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test",
|
|
118
119
|
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"samples-dev/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ",
|
|
119
120
|
"clean": "dev-tool run vendored rimraf --glob dist dist-* test-dist temp types *.tgz *.log",
|
|
120
121
|
"copy:yaml": "copy tsp-location.yaml .\\src\\generated\\tsp-location.yaml",
|
|
@@ -122,21 +123,16 @@
|
|
|
122
123
|
"extract-api": "dev-tool run vendored rimraf review && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
|
|
123
124
|
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"samples-dev/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ",
|
|
124
125
|
"generate": "dev-tool run vendored rimraf ./src/generated && dev-tool run vendored mkdirp ./src/generated && npm run copy:yaml && npm run tsp:update && dev-tool run vendored rimraf ./src/generated/test && dev-tool run vendored rimraf ./src/generated/tsp-location.yaml",
|
|
125
|
-
"
|
|
126
|
-
"integration-test:browser": "npm run unit-test:browser --no-test-proxy",
|
|
127
|
-
"integration-test:node": "npm run unit-test:node --no-test-proxy",
|
|
126
|
+
"generate-samples": "dev-tool samples publish -f",
|
|
128
127
|
"lint": "eslint package.json api-extractor.json src test",
|
|
129
128
|
"lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
|
|
130
129
|
"pack": "npm pack 2>&1",
|
|
131
|
-
"test": "npm run
|
|
132
|
-
"test:browser": "
|
|
133
|
-
"test:node": "
|
|
130
|
+
"test": "npm run test:node && npm run test:browser",
|
|
131
|
+
"test:browser": "dev-tool run build-test && dev-tool run test:vitest --browser",
|
|
132
|
+
"test:node": "dev-tool run test:vitest",
|
|
133
|
+
"test:node:esm": "dev-tool run test:vitest --esm --no-test-proxy",
|
|
134
134
|
"tsp:update": "tsp-client update -o ./src/generated",
|
|
135
|
-
"
|
|
136
|
-
"unit-test:browser": "npm run build:test && dev-tool run test:vitest --browser",
|
|
137
|
-
"unit-test:node": "dev-tool run test:vitest",
|
|
138
|
-
"update-snippets": "dev-tool run update-snippets",
|
|
139
|
-
"generate-samples": "dev-tool samples publish -f"
|
|
135
|
+
"update-snippets": "dev-tool run update-snippets"
|
|
140
136
|
},
|
|
141
137
|
"exports": {
|
|
142
138
|
"./package.json": "./package.json",
|