@azure/ai-projects 2.0.0-beta.1 → 2.0.0-beta.3

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 (211) hide show
  1. package/README.md +799 -20
  2. package/dist/browser/aiProjectClient.d.ts +4 -0
  3. package/dist/browser/aiProjectClient.d.ts.map +1 -1
  4. package/dist/browser/aiProjectClient.js +12 -1
  5. package/dist/browser/aiProjectClient.js.map +1 -1
  6. package/dist/browser/api/aiProjectContext.js +1 -1
  7. package/dist/browser/api/aiProjectContext.js.map +1 -1
  8. package/dist/browser/api/memoryStores/index.d.ts +1 -0
  9. package/dist/browser/api/memoryStores/index.d.ts.map +1 -1
  10. package/dist/browser/api/memoryStores/index.js.map +1 -1
  11. package/dist/browser/api/memoryStores/memoryStoreUpdateMemoriesPoller.d.ts +43 -0
  12. package/dist/browser/api/memoryStores/memoryStoreUpdateMemoriesPoller.d.ts.map +1 -0
  13. package/dist/browser/api/memoryStores/memoryStoreUpdateMemoriesPoller.js +160 -0
  14. package/dist/browser/api/memoryStores/memoryStoreUpdateMemoriesPoller.js.map +1 -0
  15. package/dist/browser/api/memoryStores/operations.d.ts +3 -4
  16. package/dist/browser/api/memoryStores/operations.d.ts.map +1 -1
  17. package/dist/browser/api/memoryStores/operations.js +3 -16
  18. package/dist/browser/api/memoryStores/operations.js.map +1 -1
  19. package/dist/browser/api/telemetry/index.d.ts +2 -0
  20. package/dist/browser/api/telemetry/index.d.ts.map +1 -0
  21. package/dist/browser/api/telemetry/index.js +4 -0
  22. package/dist/browser/api/telemetry/index.js.map +1 -0
  23. package/dist/browser/api/telemetry/operations.d.ts +22 -0
  24. package/dist/browser/api/telemetry/operations.d.ts.map +1 -0
  25. package/dist/browser/api/telemetry/operations.js +55 -0
  26. package/dist/browser/api/telemetry/operations.js.map +1 -0
  27. package/dist/browser/classic/index.d.ts +1 -0
  28. package/dist/browser/classic/index.d.ts.map +1 -1
  29. package/dist/browser/classic/index.js.map +1 -1
  30. package/dist/browser/classic/memoryStores/index.d.ts +3 -3
  31. package/dist/browser/classic/memoryStores/index.d.ts.map +1 -1
  32. package/dist/browser/classic/memoryStores/index.js.map +1 -1
  33. package/dist/browser/classic/telemetry/index.d.ts +8 -0
  34. package/dist/browser/classic/telemetry/index.d.ts.map +1 -0
  35. package/dist/browser/classic/telemetry/index.js +13 -0
  36. package/dist/browser/classic/telemetry/index.js.map +1 -0
  37. package/dist/browser/constants.d.ts +1 -1
  38. package/dist/browser/constants.js +1 -1
  39. package/dist/browser/constants.js.map +1 -1
  40. package/dist/browser/getCustomFetch-browser.d.mts.map +1 -0
  41. package/dist/browser/getCustomFetch-browser.mjs.map +1 -0
  42. package/dist/browser/getCustomFetch.d.ts +13 -0
  43. package/dist/browser/getCustomFetch.js +40 -0
  44. package/dist/browser/index.d.ts +2 -1
  45. package/dist/browser/index.d.ts.map +1 -1
  46. package/dist/browser/index.js.map +1 -1
  47. package/dist/browser/models/models.d.ts +10 -10
  48. package/dist/browser/models/models.d.ts.map +1 -1
  49. package/dist/browser/models/models.js +1 -1
  50. package/dist/browser/models/models.js.map +1 -1
  51. package/dist/browser/restorePollerHelpers.d.ts.map +1 -1
  52. package/dist/browser/restorePollerHelpers.js +12 -4
  53. package/dist/browser/restorePollerHelpers.js.map +1 -1
  54. package/dist/commonjs/aiProjectClient.d.ts +4 -0
  55. package/dist/commonjs/aiProjectClient.d.ts.map +1 -1
  56. package/dist/commonjs/aiProjectClient.js +16 -5
  57. package/dist/commonjs/aiProjectClient.js.map +1 -1
  58. package/dist/commonjs/api/aiProjectContext.js +1 -1
  59. package/dist/commonjs/api/aiProjectContext.js.map +1 -1
  60. package/dist/commonjs/api/memoryStores/index.d.ts +1 -0
  61. package/dist/commonjs/api/memoryStores/index.d.ts.map +1 -1
  62. package/dist/commonjs/api/memoryStores/index.js.map +1 -1
  63. package/dist/commonjs/api/memoryStores/memoryStoreUpdateMemoriesPoller.d.ts +43 -0
  64. package/dist/commonjs/api/memoryStores/memoryStoreUpdateMemoriesPoller.d.ts.map +1 -0
  65. package/dist/commonjs/api/memoryStores/memoryStoreUpdateMemoriesPoller.js +163 -0
  66. package/dist/commonjs/api/memoryStores/memoryStoreUpdateMemoriesPoller.js.map +1 -0
  67. package/dist/commonjs/api/memoryStores/operations.d.ts +3 -4
  68. package/dist/commonjs/api/memoryStores/operations.d.ts.map +1 -1
  69. package/dist/commonjs/api/memoryStores/operations.js +2 -16
  70. package/dist/commonjs/api/memoryStores/operations.js.map +1 -1
  71. package/dist/commonjs/api/telemetry/index.d.ts +2 -0
  72. package/dist/commonjs/api/telemetry/index.d.ts.map +1 -0
  73. package/dist/commonjs/api/telemetry/index.js +8 -0
  74. package/dist/commonjs/api/telemetry/index.js.map +1 -0
  75. package/dist/commonjs/api/telemetry/operations.d.ts +22 -0
  76. package/dist/commonjs/api/telemetry/operations.d.ts.map +1 -0
  77. package/dist/commonjs/api/telemetry/operations.js +58 -0
  78. package/dist/commonjs/api/telemetry/operations.js.map +1 -0
  79. package/dist/commonjs/classic/index.d.ts +1 -0
  80. package/dist/commonjs/classic/index.d.ts.map +1 -1
  81. package/dist/commonjs/classic/index.js.map +1 -1
  82. package/dist/commonjs/classic/memoryStores/index.d.ts +3 -3
  83. package/dist/commonjs/classic/memoryStores/index.d.ts.map +1 -1
  84. package/dist/commonjs/classic/memoryStores/index.js.map +1 -1
  85. package/dist/commonjs/classic/telemetry/index.d.ts +8 -0
  86. package/dist/commonjs/classic/telemetry/index.d.ts.map +1 -0
  87. package/dist/commonjs/classic/telemetry/index.js +16 -0
  88. package/dist/commonjs/classic/telemetry/index.js.map +1 -0
  89. package/dist/commonjs/constants.d.ts +1 -1
  90. package/dist/commonjs/constants.js +1 -1
  91. package/dist/commonjs/constants.js.map +1 -1
  92. package/dist/commonjs/getCustomFetch.d.ts +13 -0
  93. package/dist/commonjs/getCustomFetch.d.ts.map +1 -0
  94. package/dist/commonjs/getCustomFetch.js +45 -0
  95. package/dist/commonjs/getCustomFetch.js.map +1 -0
  96. package/dist/commonjs/index.d.ts +2 -1
  97. package/dist/commonjs/index.d.ts.map +1 -1
  98. package/dist/commonjs/index.js.map +1 -1
  99. package/dist/commonjs/models/models.d.ts +10 -10
  100. package/dist/commonjs/models/models.d.ts.map +1 -1
  101. package/dist/commonjs/models/models.js +1 -1
  102. package/dist/commonjs/models/models.js.map +1 -1
  103. package/dist/commonjs/restorePollerHelpers.d.ts.map +1 -1
  104. package/dist/commonjs/restorePollerHelpers.js +12 -4
  105. package/dist/commonjs/restorePollerHelpers.js.map +1 -1
  106. package/dist/commonjs/tsdoc-metadata.json +1 -1
  107. package/dist/esm/aiProjectClient.d.ts +4 -0
  108. package/dist/esm/aiProjectClient.d.ts.map +1 -1
  109. package/dist/esm/aiProjectClient.js +12 -1
  110. package/dist/esm/aiProjectClient.js.map +1 -1
  111. package/dist/esm/api/aiProjectContext.js +1 -1
  112. package/dist/esm/api/aiProjectContext.js.map +1 -1
  113. package/dist/esm/api/memoryStores/index.d.ts +1 -0
  114. package/dist/esm/api/memoryStores/index.d.ts.map +1 -1
  115. package/dist/esm/api/memoryStores/index.js.map +1 -1
  116. package/dist/esm/api/memoryStores/memoryStoreUpdateMemoriesPoller.d.ts +43 -0
  117. package/dist/esm/api/memoryStores/memoryStoreUpdateMemoriesPoller.d.ts.map +1 -0
  118. package/dist/esm/api/memoryStores/memoryStoreUpdateMemoriesPoller.js +160 -0
  119. package/dist/esm/api/memoryStores/memoryStoreUpdateMemoriesPoller.js.map +1 -0
  120. package/dist/esm/api/memoryStores/operations.d.ts +3 -4
  121. package/dist/esm/api/memoryStores/operations.d.ts.map +1 -1
  122. package/dist/esm/api/memoryStores/operations.js +3 -16
  123. package/dist/esm/api/memoryStores/operations.js.map +1 -1
  124. package/dist/esm/api/telemetry/index.d.ts +2 -0
  125. package/dist/esm/api/telemetry/index.d.ts.map +1 -0
  126. package/dist/esm/api/telemetry/index.js +4 -0
  127. package/dist/esm/api/telemetry/index.js.map +1 -0
  128. package/dist/esm/api/telemetry/operations.d.ts +22 -0
  129. package/dist/esm/api/telemetry/operations.d.ts.map +1 -0
  130. package/dist/esm/api/telemetry/operations.js +55 -0
  131. package/dist/esm/api/telemetry/operations.js.map +1 -0
  132. package/dist/esm/classic/index.d.ts +1 -0
  133. package/dist/esm/classic/index.d.ts.map +1 -1
  134. package/dist/esm/classic/index.js.map +1 -1
  135. package/dist/esm/classic/memoryStores/index.d.ts +3 -3
  136. package/dist/esm/classic/memoryStores/index.d.ts.map +1 -1
  137. package/dist/esm/classic/memoryStores/index.js.map +1 -1
  138. package/dist/esm/classic/telemetry/index.d.ts +8 -0
  139. package/dist/esm/classic/telemetry/index.d.ts.map +1 -0
  140. package/dist/esm/classic/telemetry/index.js +13 -0
  141. package/dist/esm/classic/telemetry/index.js.map +1 -0
  142. package/dist/esm/constants.d.ts +1 -1
  143. package/dist/esm/constants.js +1 -1
  144. package/dist/esm/constants.js.map +1 -1
  145. package/dist/esm/getCustomFetch.d.ts +13 -0
  146. package/dist/esm/getCustomFetch.d.ts.map +1 -0
  147. package/dist/esm/getCustomFetch.js +42 -0
  148. package/dist/esm/getCustomFetch.js.map +1 -0
  149. package/dist/esm/index.d.ts +2 -1
  150. package/dist/esm/index.d.ts.map +1 -1
  151. package/dist/esm/index.js.map +1 -1
  152. package/dist/esm/models/models.d.ts +10 -10
  153. package/dist/esm/models/models.d.ts.map +1 -1
  154. package/dist/esm/models/models.js +1 -1
  155. package/dist/esm/models/models.js.map +1 -1
  156. package/dist/esm/restorePollerHelpers.d.ts.map +1 -1
  157. package/dist/esm/restorePollerHelpers.js +12 -4
  158. package/dist/esm/restorePollerHelpers.js.map +1 -1
  159. package/dist/react-native/aiProjectClient.d.ts +4 -0
  160. package/dist/react-native/aiProjectClient.d.ts.map +1 -1
  161. package/dist/react-native/aiProjectClient.js +12 -1
  162. package/dist/react-native/aiProjectClient.js.map +1 -1
  163. package/dist/react-native/api/aiProjectContext.js +1 -1
  164. package/dist/react-native/api/aiProjectContext.js.map +1 -1
  165. package/dist/react-native/api/memoryStores/index.d.ts +1 -0
  166. package/dist/react-native/api/memoryStores/index.d.ts.map +1 -1
  167. package/dist/react-native/api/memoryStores/index.js.map +1 -1
  168. package/dist/react-native/api/memoryStores/memoryStoreUpdateMemoriesPoller.d.ts +43 -0
  169. package/dist/react-native/api/memoryStores/memoryStoreUpdateMemoriesPoller.d.ts.map +1 -0
  170. package/dist/react-native/api/memoryStores/memoryStoreUpdateMemoriesPoller.js +160 -0
  171. package/dist/react-native/api/memoryStores/memoryStoreUpdateMemoriesPoller.js.map +1 -0
  172. package/dist/react-native/api/memoryStores/operations.d.ts +3 -4
  173. package/dist/react-native/api/memoryStores/operations.d.ts.map +1 -1
  174. package/dist/react-native/api/memoryStores/operations.js +3 -16
  175. package/dist/react-native/api/memoryStores/operations.js.map +1 -1
  176. package/dist/react-native/api/telemetry/index.d.ts +2 -0
  177. package/dist/react-native/api/telemetry/index.d.ts.map +1 -0
  178. package/dist/react-native/api/telemetry/index.js +4 -0
  179. package/dist/react-native/api/telemetry/index.js.map +1 -0
  180. package/dist/react-native/api/telemetry/operations.d.ts +22 -0
  181. package/dist/react-native/api/telemetry/operations.d.ts.map +1 -0
  182. package/dist/react-native/api/telemetry/operations.js +55 -0
  183. package/dist/react-native/api/telemetry/operations.js.map +1 -0
  184. package/dist/react-native/classic/index.d.ts +1 -0
  185. package/dist/react-native/classic/index.d.ts.map +1 -1
  186. package/dist/react-native/classic/index.js.map +1 -1
  187. package/dist/react-native/classic/memoryStores/index.d.ts +3 -3
  188. package/dist/react-native/classic/memoryStores/index.d.ts.map +1 -1
  189. package/dist/react-native/classic/memoryStores/index.js.map +1 -1
  190. package/dist/react-native/classic/telemetry/index.d.ts +8 -0
  191. package/dist/react-native/classic/telemetry/index.d.ts.map +1 -0
  192. package/dist/react-native/classic/telemetry/index.js +13 -0
  193. package/dist/react-native/classic/telemetry/index.js.map +1 -0
  194. package/dist/react-native/constants.d.ts +1 -1
  195. package/dist/react-native/constants.js +1 -1
  196. package/dist/react-native/constants.js.map +1 -1
  197. package/dist/react-native/getCustomFetch.d.ts +13 -0
  198. package/dist/react-native/getCustomFetch.d.ts.map +1 -0
  199. package/dist/react-native/getCustomFetch.js +42 -0
  200. package/dist/react-native/getCustomFetch.js.map +1 -0
  201. package/dist/react-native/index.d.ts +2 -1
  202. package/dist/react-native/index.d.ts.map +1 -1
  203. package/dist/react-native/index.js.map +1 -1
  204. package/dist/react-native/models/models.d.ts +10 -10
  205. package/dist/react-native/models/models.d.ts.map +1 -1
  206. package/dist/react-native/models/models.js +1 -1
  207. package/dist/react-native/models/models.js.map +1 -1
  208. package/dist/react-native/restorePollerHelpers.d.ts.map +1 -1
  209. package/dist/react-native/restorePollerHelpers.js +12 -4
  210. package/dist/react-native/restorePollerHelpers.js.map +1 -1
  211. package/package.json +17 -10
@@ -1 +1 @@
1
- {"version":3,"file":"restorePollerHelpers.d.ts","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,UAAU,EACV,cAAc,EAGf,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,MAAM,WAAW,oBAAoB,CACnC,OAAO,EACP,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,CAC/D,SAAQ,gBAAgB;IACxB,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,qDAAqD;IACrD,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC/D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,SAAS,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C,GACtC,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CA2C9C"}
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import { _updateMemoriesDeserialize } from "./api/memoryStores/operations.js";
3
+ import { createMemoryStoreUpdateMemoriesPoller } from "./api/memoryStores/memoryStoreUpdateMemoriesPoller.js";
4
4
  import { getLongRunningPoller } from "./static-helpers/pollingHelpers.js";
5
5
  import { deserializeState, } from "@azure/core-lro";
6
6
  /**
@@ -15,8 +15,16 @@ export function restorePoller(client, serializedState, sourceOperation, options)
15
15
  throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`);
16
16
  }
17
17
  const resourceLocationConfig = metadata?.["resourceLocationConfig"];
18
- const { deserializer, expectedStatuses = [] } = getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};
19
- const deserializeHelper = options?.processResponseBody ?? deserializer;
18
+ const helper = getDeserializationHelper(initialRequestUrl, requestMethod);
19
+ if (helper?.kind === "memoryUpdate") {
20
+ return createMemoryStoreUpdateMemoriesPoller(client["_client"] ?? client, helper.expectedStatuses ?? ["202", "200"], undefined, {
21
+ updateIntervalInMs: options?.updateIntervalInMs,
22
+ abortSignal: options?.abortSignal,
23
+ restoreFrom: serializedState,
24
+ });
25
+ }
26
+ const deserializeHelper = options?.processResponseBody ?? helper?.deserializer;
27
+ const expectedStatuses = helper?.expectedStatuses ?? [];
20
28
  if (!deserializeHelper) {
21
29
  throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`);
22
30
  }
@@ -30,7 +38,7 @@ export function restorePoller(client, serializedState, sourceOperation, options)
30
38
  }
31
39
  const deserializeMap = {
32
40
  "POST /memory_stores/{name}:update_memories": {
33
- deserializer: _updateMemoriesDeserialize,
41
+ kind: "memoryUpdate",
34
42
  expectedStatuses: ["202", "200"],
35
43
  },
36
44
  };
@@ -1 +1 @@
1
-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AE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;gBACjF,MAAM,KAAK,GAAG,cAAc,CAAC,CAAC,CAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAC/C,GAAG,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;gBAClC,4DAA4D;gBAC5D,qDAAqD;gBACrD,eAAe;gBACf,6BAA6B;gBAC7B,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAC1E,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CACnB,CAAC;gBAEF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AIProjectClient } from \"./aiProjectClient.js\";\nimport { _updateMemoriesDeserialize } from \"./api/memoryStores/operations.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n PollerLike,\n OperationState,\n deserializeState,\n ResourceLocationConfig,\n} from \"@azure/core-lro\";\n\n/**\n * Options for restoring a poller.\n */\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: AIProjectClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n | ResourceLocationConfig\n | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n },\n );\n}\n\ninterface DeserializationHelper {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n deserializer: Function;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"POST /memory_stores/{name}:update_memories\": {\n deserializer: _updateMemoriesDeserialize,\n expectedStatuses: [\"202\", \"200\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
1
+ {"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,qCAAqC,EAAE,MAAM,uDAAuD,CAAC;AAC9G,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAG1E,OAAO,EAGL,gBAAgB,GAEjB,MAAM,iBAAiB,CAAC;AAmBzB;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,MAAuB,EACvB,eAAuB,EACvB,eAAiF,EACjF,OAAuC;IAEvC,MAAM,YAAY,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC;IACpE,IAAI,CAAC,iBAAiB,IAAI,CAAC,aAAa,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CACb,6BAA6B,eAAe,wBAAwB,eAAe,EAAE,IAAI,EAAE,CAC5F,CAAC;IACJ,CAAC;IACD,MAAM,sBAAsB,GAAG,QAAQ,EAAE,CAAC,wBAAwB,CAErD,CAAC;IACd,MAAM,MAAM,GAAG,wBAAwB,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;IAC1E,IAAI,MAAM,EAAE,IAAI,KAAK,cAAc,EAAE,CAAC;QACpC,OAAO,qCAAqC,CACzC,MAAc,CAAC,SAAS,CAAC,IAAI,MAAM,EACpC,MAAM,CAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,EACzC,SAAS,EACT;YACE,kBAAkB,EAAE,OAAO,EAAE,kB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AC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AIProjectClient } from \"./aiProjectClient.js\";\nimport { createMemoryStoreUpdateMemoriesPoller } from \"./api/memoryStores/memoryStoreUpdateMemoriesPoller.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n PollerLike,\n OperationState,\n deserializeState,\n ResourceLocationConfig,\n} from \"@azure/core-lro\";\n\n/**\n * Options for restoring a poller.\n */\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: AIProjectClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n | ResourceLocationConfig\n | undefined;\n const helper = getDeserializationHelper(initialRequestUrl, requestMethod);\n if (helper?.kind === \"memoryUpdate\") {\n return createMemoryStoreUpdateMemoriesPoller(\n (client as any)[\"_client\"] ?? client,\n helper.expectedStatuses ?? [\"202\", \"200\"],\n undefined,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n restoreFrom: serializedState,\n },\n ) as unknown as PollerLike<OperationState<TResult>, TResult>;\n }\n const deserializeHelper = options?.processResponseBody ?? helper?.deserializer;\n const expectedStatuses = helper?.expectedStatuses ?? [];\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n },\n );\n}\n\ninterface DeserializationHelper {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n deserializer?: Function;\n expectedStatuses?: string[];\n kind?: \"memoryUpdate\";\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"POST /memory_stores/{name}:update_memories\": {\n kind: \"memoryUpdate\",\n expectedStatuses: [\"202\", \"200\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -10,6 +10,7 @@ import { EvaluatorsOperations } from "./classic/evaluators/index.js";
10
10
  import { IndexesOperations } from "./classic/indexes/index.js";
11
11
  import { InsightsOperations } from "./classic/insights/index.js";
12
12
  import { MemoryStoresOperations } from "./classic/memoryStores/index.js";
13
+ import { TelemetryOperations } from "./classic/telemetry/index.js";
13
14
  import { RedTeamsOperations } from "./classic/redTeams/index.js";
14
15
  import { SchedulesOperations } from "./classic/schedules/index.js";
15
16
  import { TokenCredential } from "@azure/core-auth";
@@ -30,6 +31,7 @@ export { AIProjectClientOptionalParams } from "./api/aiProjectContext.js";
30
31
  * @property {ConnectionsOperations} connections - The operation groups for connections
31
32
  * @property {MemoryStoresOperations} memoryStores - The operation groups for memoryStores
32
33
  * @property {AgentsOperations} agents - The operation groups for agents
34
+ * @property {TelemetryOperations} telemetry - The operation groups for telemetry
33
35
  * @property {getEndpointUrl} getEndpointUrl - gets the endpoint of the client
34
36
  * @property {getOpenAIClient} getOpenAIClient - gets the OpenAI client
35
37
  */
@@ -64,6 +66,8 @@ export declare class AIProjectClient {
64
66
  readonly memoryStores: MemoryStoresOperations;
65
67
  /** The operation groups for agents */
66
68
  readonly agents: AgentsOperations;
69
+ /** The operation groups for telemetry */
70
+ readonly telemetry: TelemetryOperations;
67
71
  /**
68
72
  * gets the OpenAI client
69
73
  * @returns the OpenAI client
@@ -1 +1 @@
1
- {"version":3,"file":"aiProjectClient.d.ts","sourceRoot":"","sources":["../../src/aiProjectClient.ts"],"names":[],"mappings":"AAIA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAqC,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;AAClG,OAAO,EAAE,gBAAgB,EAAwB,MAAM,2BAA2B,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAA6B,MAAM,gCAAgC,CAAC;AAClG,OAAO,EAAE,kBAAkB,EAA0B,MAAM,6BAA6B,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAA6B,MAAM,gCAAgC,CAAC;AAClG,OAAO,EACL,yBAAyB,EAE1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,8BAA8B,EAE/B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAA4B,MAAM,+BAA+B,CAAC;AAC/F,OAAO,EAAE,iBAAiB,EAAy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IAC1B,OAAO,CAAC,qBAAqB,CAAmB;IAChD,OAAO,CAAC,iBAAiB,CAAmB;IAC5C,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,QAAQ,CAAgC;gBAG9C,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,6BAAkC;IAqC7C,yCAAyC;IACzC,SAAgB,SAAS,EAAE,mBAAmB,CAAC;IAC/C,wCAAwC;IACxC,SAAgB,QAAQ,EAAE,kBAAkB,CAAC;IAC7C,0CAA0C;IAC1C,SAAgB,UAAU,EAAE,oBAAoB,CAAC;IACjD,oDAAoD;IACpD,SAAgB,oBAAoB,EAAE,8BAA8B,CAAC;IACrE,+CAA+C;IAC/C,SAAgB,eAAe,EAAE,yBAAyB,CAAC;IAC3D,wCAAwC;IACxC,SAAgB,QAAQ,EAAE,kBAAkB,CAAC;IAC7C,2CAA2C;IAC3C,SAAgB,WAAW,EAAE,qBAAqB,CAAC;IACnD,uCAAuC;IACvC,SAAgB,OAAO,EAAE,iBAAiB,CAAC;IAC3C,wCAAwC;IACxC,SAAgB,QAAQ,EAAE,kBAAkB,CAAC;IAC7C,2CAA2C;IAC3C,SAAgB,WAAW,EAAE,qBAAqB,CAAC;IACnD,4CAA4C;IAC5C,SAAgB,YAAY,EAAE,sBAAsB,CAAC;IACrD,sCAAsC;IACtC,SAAgB,MAAM,EAAE,gBAAgB,CAAC;IACzC,yCAAyC;IACzC,SAAgB,SAAS,EAAE,mBAAmB,CAAC;IAC/C;;;OAGG;IACU,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC;IAsB/C;;;OAGG;IACH,IAAW,QAAQ,IAAI,MAAM,CAE5B;CACF"}
@@ -18,9 +18,11 @@ const index_js_8 = require("./classic/evaluators/index.js");
18
18
  const index_js_9 = require("./classic/indexes/index.js");
19
19
  const index_js_10 = require("./classic/insights/index.js");
20
20
  const index_js_11 = require("./classic/memoryStores/index.js");
21
- const index_js_12 = require("./classic/redTeams/index.js");
22
- const index_js_13 = require("./classic/schedules/index.js");
21
+ const index_js_12 = require("./classic/telemetry/index.js");
22
+ const index_js_13 = require("./classic/redTeams/index.js");
23
+ const index_js_14 = require("./classic/schedules/index.js");
23
24
  const overwriteOpenAIClient_js_1 = require("./overwriteOpenAIClient.js");
25
+ const getCustomFetch_js_1 = require("./getCustomFetch.js");
24
26
  /**
25
27
  * The main client for the AIProjectClient service. It provides access to the various operations available in the service.
26
28
  * @class AIProjectClient
@@ -37,6 +39,7 @@ const overwriteOpenAIClient_js_1 = require("./overwriteOpenAIClient.js");
37
39
  * @property {ConnectionsOperations} connections - The operation groups for connections
38
40
  * @property {MemoryStoresOperations} memoryStores - The operation groups for memoryStores
39
41
  * @property {AgentsOperations} agents - The operation groups for agents
42
+ * @property {TelemetryOperations} telemetry - The operation groups for telemetry
40
43
  * @property {getEndpointUrl} getEndpointUrl - gets the endpoint of the client
41
44
  * @property {getOpenAIClient} getOpenAIClient - gets the OpenAI client
42
45
  */
@@ -59,25 +62,26 @@ class AIProjectClient {
59
62
  userAgentOptions: { userAgentPrefix },
60
63
  credentials: {
61
64
  ...options.credentials,
62
- scopes: ["https://cognitiveservices.azure.com/.default"],
65
+ scopes: ["https://ai.azure.com/.default"],
63
66
  },
64
67
  });
65
68
  this._azureScopeClient = (0, index_js_1.createAIProject)(endpoint, credential, {
66
69
  ...options,
67
70
  userAgentOptions: { userAgentPrefix },
68
71
  });
69
- this.schedules = (0, index_js_13._getSchedulesOperations)(this._cognitiveScopeClient);
72
+ this.schedules = (0, index_js_14._getSchedulesOperations)(this._cognitiveScopeClient);
70
73
  this.insights = (0, index_js_10._getInsightsOperations)(this._cognitiveScopeClient);
71
74
  this.evaluators = (0, index_js_8._getEvaluatorsOperations)(this._cognitiveScopeClient);
72
75
  this.evaluationTaxonomies = (0, index_js_7._getEvaluationTaxonomiesOperations)(this._cognitiveScopeClient);
73
76
  this.evaluationRules = (0, index_js_6._getEvaluationRulesOperations)(this._cognitiveScopeClient);
74
- this.redTeams = (0, index_js_12._getRedTeamsOperations)(this._cognitiveScopeClient);
77
+ this.redTeams = (0, index_js_13._getRedTeamsOperations)(this._cognitiveScopeClient);
75
78
  this.deployments = (0, index_js_5._getDeploymentsOperations)(this._azureScopeClient);
76
79
  this.indexes = (0, index_js_9._getIndexesOperations)(this._azureScopeClient);
77
80
  this.datasets = (0, index_js_4._getDatasetsOperations)(this._azureScopeClient, this._options);
78
81
  this.connections = (0, index_js_3._getConnectionsOperations)(this._azureScopeClient);
79
82
  this.memoryStores = (0, index_js_11._getMemoryStoresOperations)(this._cognitiveScopeClient);
80
83
  this.agents = (0, index_js_2._getAgentsOperations)(this._azureScopeClient);
84
+ this.telemetry = (0, index_js_12._getTelemetryOperations)(this.connections);
81
85
  }
82
86
  /** The operation groups for schedules */
83
87
  schedules;
@@ -103,6 +107,8 @@ class AIProjectClient {
103
107
  memoryStores;
104
108
  /** The operation groups for agents */
105
109
  agents;
110
+ /** The operation groups for telemetry */
111
+ telemetry;
106
112
  /**
107
113
  * gets the OpenAI client
108
114
  * @returns the OpenAI client
@@ -110,11 +116,16 @@ class AIProjectClient {
110
116
  async getOpenAIClient() {
111
117
  const scope = "https://ai.azure.com/.default";
112
118
  const azureADTokenProvider = await (0, identity_1.getBearerTokenProvider)(this._credential, scope);
119
+ let customFetch;
120
+ if (this._options.additionalPolicies?.find((policy) => policy.policy.name === "recording policy")) {
121
+ customFetch = (0, getCustomFetch_js_1.getCustomFetch)(this._azureScopeClient.pipeline, this._options.httpClient);
122
+ }
113
123
  const openAIOptions = {
114
124
  apiKey: azureADTokenProvider,
115
125
  baseURL: `${this._endpoint}/openai`,
116
126
  defaultQuery: { "api-version": this._options?.apiVersion || "2025-11-15-preview" },
117
127
  dangerouslyAllowBrowser: true,
128
+ fetch: customFetch,
118
129
  };
119
130
  const openaiClient = new openai_1.default(openAIOptions);
120
131
  return (0, overwriteOpenAIClient_js_1.overwriteOpenAIClient)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ACpC,oBAAoB,CAAiC;IACrE,+CAA+C;IAC/B,eAAe,CAA4B;IAC3D,wCAAwC;IACxB,QAAQ,CAAqB;IAC7C,2CAA2C;IAC3B,WAAW,CAAwB;IACnD,uCAAuC;IACvB,OAAO,CAAoB;IAC3C,wCAAwC;IACxB,QAAQ,CAAqB;IAC7C,2CAA2C;IAC3B,WAAW,CAAwB;IACnD,4CAA4C;IAC5B,YAAY,CAAyB;IACrD,sCAAsC;IACtB,MAAM,CAAmB;IACzC;;;OAGG;IACI,KAAK,CAAC,eAAe;QAC1B,MAAM,KAAK,GAAG,+BAA+B,CAAC;QAC9C,MAAM,oBAAoB,GAAG,MAAM,IAAA,iCAAsB,EAAC,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QAEnF,MAAM,aAAa,GAA4C;YAC7D,MAAM,EAAE,oBAAoB;YAC5B,OAAO,EAAE,GAAG,IAAI,CAAC,SAAS,SAAS;YACnC,YAAY,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,QAAQ,EAAE,UAAU,IAAI,oBAAoB,EAAE;YAClF,uBAAuB,EAAE,IAAI;SAC9B,CAAC;QAEF,MAAM,YAAY,GAAG,IAAI,gBAAM,CAAC,aAAa,CAAC,CAAC;QAC/C,OAAO,IAAA,gDAAqB,EAAC,YAAY,CAAC,CAAC;IAC7C,CAAC;IACD;;;OAGG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;CACF;AA/FD,0CA+FC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/* eslint-disable tsdoc/syntax */\n\nimport OpenAI from \"openai\";\nimport { getBearerTokenProvider } from \"@azure/identity\";\nimport { createAIProject, AIProjectContext, AIProjectClientOptionalParams } from \"./api/index.js\";\nimport { AgentsOperations, _getAgentsOperations } from \"./classic/agents/index.js\";\nimport { ConnectionsOperations, _getConnectionsOperations } from \"./classic/connections/index.js\";\nimport { DatasetsOperations, _getDatasetsOperations } from \"./classic/datasets/index.js\";\nimport { DeploymentsOperations, _getDeploymentsOperations } from \"./classic/deployments/index.js\";\nimport {\n EvaluationRulesOperations,\n _getEvaluationRulesOperations,\n} from \"./classic/evaluationRules/index.js\";\nimport {\n EvaluationTaxonomiesOperations,\n _getEvaluationTaxonomiesOperations,\n} from \"./classic/evaluationTaxonomies/index.js\";\nimport { EvaluatorsOperations, _getEvaluatorsOperations } from \"./classic/evaluators/index.js\";\nimport { IndexesOperations, _getIndexesOperations } from \"./classic/indexes/index.js\";\nimport { InsightsOperations, _getInsightsOperations } from \"./classic/insights/index.js\";\nimport {\n MemoryStoresOperations,\n _getMemoryStoresOperations,\n} from \"./classic/memoryStores/index.js\";\nimport { RedTeamsOperations, _getRedTeamsOperations } from \"./classic/redTeams/index.js\";\nimport { SchedulesOperations, _getSchedulesOperations } from \"./classic/schedules/index.js\";\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { overwriteOpenAIClient } from \"./overwriteOpenAIClient.js\";\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 {ConnectionsOperations} connections - The operation groups for connections\n * @property {MemoryStoresOperations} memoryStores - The operation groups for memoryStores\n * @property {AgentsOperations} agents - The operation groups for agents\n * @property {getEndpointUrl} getEndpointUrl - gets the endpoint of the client\n * @property {getOpenAIClient} getOpenAIClient - gets the OpenAI client\n */\nexport class AIProjectClient {\n private _cognitiveScopeClient: AIProjectContext;\n private _azureScopeClient: AIProjectContext;\n private _endpoint: string;\n private _credential: TokenCredential;\n private _options: AIProjectClientOptionalParams;\n\n constructor(\n endpoint: string,\n credential: TokenCredential,\n options: AIProjectClientOptionalParams = {},\n ) {\n this._endpoint = endpoint;\n this._credential = credential;\n this._options = options;\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._cognitiveScopeClient = createAIProject(endpoint, this._credential, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n credentials: {\n ...options.credentials,\n scopes: [\"https://cognitiveservices.azure.com/.default\"],\n },\n });\n this._azureScopeClient = createAIProject(endpoint, credential, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n\n this.schedules = _getSchedulesOperations(this._cognitiveScopeClient);\n this.insights = _getInsightsOperations(this._cognitiveScopeClient);\n this.evaluators = _getEvaluatorsOperations(this._cognitiveScopeClient);\n this.evaluationTaxonomies = _getEvaluationTaxonomiesOperations(this._cognitiveScopeClient);\n this.evaluationRules = _getEvaluationRulesOperations(this._cognitiveScopeClient);\n this.redTeams = _getRedTeamsOperations(this._cognitiveScopeClient);\n this.deployments = _getDeploymentsOperations(this._azureScopeClient);\n this.indexes = _getIndexesOperations(this._azureScopeClient);\n this.datasets = _getDatasetsOperations(this._azureScopeClient, this._options);\n this.connections = _getConnectionsOperations(this._azureScopeClient);\n this.memoryStores = _getMemoryStoresOperations(this._cognitiveScopeClient);\n this.agents = _getAgentsOperations(this._azureScopeClient);\n }\n\n /** The operation groups for schedules */\n public readonly schedules: SchedulesOperations;\n /** The operation groups for insights */\n public readonly insights: InsightsOperations;\n /** The operation groups for evaluators */\n public readonly evaluators: EvaluatorsOperations;\n /** The operation groups for evaluationTaxonomies */\n public readonly evaluationTaxonomies: EvaluationTaxonomiesOperations;\n /** The operation groups for evaluationRules */\n public readonly evaluationRules: EvaluationRulesOperations;\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 connections */\n public readonly connections: ConnectionsOperations;\n /** The operation groups for memoryStores */\n public readonly memoryStores: MemoryStoresOperations;\n /** The operation groups for agents */\n public readonly agents: AgentsOperations;\n /**\n * gets the OpenAI client\n * @returns the OpenAI client\n */\n public async getOpenAIClient(): Promise<OpenAI> {\n const scope = \"https://ai.azure.com/.default\";\n const azureADTokenProvider = await getBearerTokenProvider(this._credential, scope);\n\n const openAIOptions: ConstructorParameters<typeof OpenAI>[0] = {\n apiKey: azureADTokenProvider,\n baseURL: `${this._endpoint}/openai`,\n defaultQuery: { \"api-version\": this._options?.apiVersion || \"2025-11-15-preview\" },\n dangerouslyAllowBrowser: true,\n };\n\n const openaiClient = new OpenAI(openAIOptions);\n return overwriteOpenAIClient(openaiClient);\n }\n /**\n * gets the endpoint of the client\n * @returns the endpoint of the client\n */\n public get endpoint(): string {\n return this._endpoint;\n }\n}\n"]}
1
+ {"version":3,"file":"aiProjectClient.js","sourceRoot":"","sources":["../../src/aiProjectClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iCAAiC;;;;AAEjC,4DAA4B;AAC5B,8CAAyD;AACzD,6CAAkG;AAClG,wDAAmF;AACnF,6DAAkG;AAClG,0DAAyF;AACzF,6DAAkG;AAClG,iEAG4C;AAC5C,sEAGiD;AACjD,4DAA+F;AAC/F,yDAAsF;AACtF,2DAAyF;AACzF,+DAGyC;AACzC,4DAA4F;AAC5F,2DAAyF;AACzF,4DAA4F;AAE5F,yEAAmE;AACnE,2DAAqD;AAIrD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,eAAe;IAClB,qBAAqB,CAAmB;IACxC,iBAAiB,CAAmB;IACpC,SAAS,CAAS;IAClB,WAAW,CAAkB;IAC7B,Q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,MAAM,IAAA,iCAAsB,EAAC,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QACnF,IAAI,WAA0E,CAAC;QAE/E,IACE,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,kBAAkB,CAAC,EAC7F,CAAC;YACD,WAAW,GAAG,IAAA,kCAAc,EAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC1F,CAAC;QAED,MAAM,aAAa,GAA4C;YAC7D,MAAM,EAAE,oBAAoB;YAC5B,OAAO,EAAE,GAAG,IAAI,CAAC,SAAS,SAAS;YACnC,YAAY,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,QAAQ,EAAE,UAAU,IAAI,oBAAoB,EAAE;YAClF,uBAAuB,EAAE,IAAI;YAC7B,KAAK,EAAE,WAAW;SACnB,CAAC;QAEF,MAAM,YAAY,GAAG,IAAI,gBAAM,CAAC,aAAa,CAAC,CAAC;QAC/C,OAAO,IAAA,gDAAqB,EAAC,YAAY,CAAC,CAAC;IAC7C,CAAC;IACD;;;OAGG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;CACF;AA1GD,0CA0GC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/* eslint-disable tsdoc/syntax */\n\nimport OpenAI from \"openai\";\nimport { getBearerTokenProvider } from \"@azure/identity\";\nimport { createAIProject, AIProjectContext, AIProjectClientOptionalParams } from \"./api/index.js\";\nimport { AgentsOperations, _getAgentsOperations } from \"./classic/agents/index.js\";\nimport { ConnectionsOperations, _getConnectionsOperations } from \"./classic/connections/index.js\";\nimport { DatasetsOperations, _getDatasetsOperations } from \"./classic/datasets/index.js\";\nimport { DeploymentsOperations, _getDeploymentsOperations } from \"./classic/deployments/index.js\";\nimport {\n EvaluationRulesOperations,\n _getEvaluationRulesOperations,\n} from \"./classic/evaluationRules/index.js\";\nimport {\n EvaluationTaxonomiesOperations,\n _getEvaluationTaxonomiesOperations,\n} from \"./classic/evaluationTaxonomies/index.js\";\nimport { EvaluatorsOperations, _getEvaluatorsOperations } from \"./classic/evaluators/index.js\";\nimport { IndexesOperations, _getIndexesOperations } from \"./classic/indexes/index.js\";\nimport { InsightsOperations, _getInsightsOperations } from \"./classic/insights/index.js\";\nimport {\n MemoryStoresOperations,\n _getMemoryStoresOperations,\n} from \"./classic/memoryStores/index.js\";\nimport { TelemetryOperations, _getTelemetryOperations } from \"./classic/telemetry/index.js\";\nimport { RedTeamsOperations, _getRedTeamsOperations } from \"./classic/redTeams/index.js\";\nimport { SchedulesOperations, _getSchedulesOperations } from \"./classic/schedules/index.js\";\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { overwriteOpenAIClient } from \"./overwriteOpenAIClient.js\";\nimport { getCustomFetch } from \"./getCustomFetch.js\";\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 {ConnectionsOperations} connections - The operation groups for connections\n * @property {MemoryStoresOperations} memoryStores - The operation groups for memoryStores\n * @property {AgentsOperations} agents - The operation groups for agents\n * @property {TelemetryOperations} telemetry - The operation groups for telemetry\n * @property {getEndpointUrl} getEndpointUrl - gets the endpoint of the client\n * @property {getOpenAIClient} getOpenAIClient - gets the OpenAI client\n */\nexport class AIProjectClient {\n private _cognitiveScopeClient: AIProjectContext;\n private _azureScopeClient: AIProjectContext;\n private _endpoint: string;\n private _credential: TokenCredential;\n private _options: AIProjectClientOptionalParams;\n\n constructor(\n endpoint: string,\n credential: TokenCredential,\n options: AIProjectClientOptionalParams = {},\n ) {\n this._endpoint = endpoint;\n this._credential = credential;\n this._options = options;\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._cognitiveScopeClient = createAIProject(endpoint, this._credential, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n credentials: {\n ...options.credentials,\n scopes: [\"https://ai.azure.com/.default\"],\n },\n });\n this._azureScopeClient = createAIProject(endpoint, credential, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n\n this.schedules = _getSchedulesOperations(this._cognitiveScopeClient);\n this.insights = _getInsightsOperations(this._cognitiveScopeClient);\n this.evaluators = _getEvaluatorsOperations(this._cognitiveScopeClient);\n this.evaluationTaxonomies = _getEvaluationTaxonomiesOperations(this._cognitiveScopeClient);\n this.evaluationRules = _getEvaluationRulesOperations(this._cognitiveScopeClient);\n this.redTeams = _getRedTeamsOperations(this._cognitiveScopeClient);\n this.deployments = _getDeploymentsOperations(this._azureScopeClient);\n this.indexes = _getIndexesOperations(this._azureScopeClient);\n this.datasets = _getDatasetsOperations(this._azureScopeClient, this._options);\n this.connections = _getConnectionsOperations(this._azureScopeClient);\n this.memoryStores = _getMemoryStoresOperations(this._cognitiveScopeClient);\n this.agents = _getAgentsOperations(this._azureScopeClient);\n this.telemetry = _getTelemetryOperations(this.connections);\n }\n\n /** The operation groups for schedules */\n public readonly schedules: SchedulesOperations;\n /** The operation groups for insights */\n public readonly insights: InsightsOperations;\n /** The operation groups for evaluators */\n public readonly evaluators: EvaluatorsOperations;\n /** The operation groups for evaluationTaxonomies */\n public readonly evaluationTaxonomies: EvaluationTaxonomiesOperations;\n /** The operation groups for evaluationRules */\n public readonly evaluationRules: EvaluationRulesOperations;\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 connections */\n public readonly connections: ConnectionsOperations;\n /** The operation groups for memoryStores */\n public readonly memoryStores: MemoryStoresOperations;\n /** The operation groups for agents */\n public readonly agents: AgentsOperations;\n /** The operation groups for telemetry */\n public readonly telemetry: TelemetryOperations;\n /**\n * gets the OpenAI client\n * @returns the OpenAI client\n */\n public async getOpenAIClient(): Promise<OpenAI> {\n const scope = \"https://ai.azure.com/.default\";\n const azureADTokenProvider = await getBearerTokenProvider(this._credential, scope);\n let customFetch: NonNullable<ConstructorParameters<typeof OpenAI>[0]>[\"fetch\"];\n\n if (\n this._options.additionalPolicies?.find((policy) => policy.policy.name === \"recording policy\")\n ) {\n customFetch = getCustomFetch(this._azureScopeClient.pipeline, this._options.httpClient);\n }\n\n const openAIOptions: ConstructorParameters<typeof OpenAI>[0] = {\n apiKey: azureADTokenProvider,\n baseURL: `${this._endpoint}/openai`,\n defaultQuery: { \"api-version\": this._options?.apiVersion || \"2025-11-15-preview\" },\n dangerouslyAllowBrowser: true,\n fetch: customFetch,\n };\n\n const openaiClient = new OpenAI(openAIOptions);\n return overwriteOpenAIClient(openaiClient);\n }\n /**\n * gets the endpoint of the client\n * @returns the endpoint of the client\n */\n public get endpoint(): string {\n return this._endpoint;\n }\n}\n"]}
@@ -9,7 +9,7 @@ const core_client_1 = require("@azure-rest/core-client");
9
9
  function createAIProject(endpoint, credential, options = {}) {
10
10
  const endpointUrl = options.endpoint ?? String(endpoint);
11
11
  const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
12
- const userAgentInfo = `azsdk-js-ai-projects/2.0.0-beta.1`;
12
+ const userAgentInfo = `azsdk-js-ai-projects/2.0.0-beta.3`;
13
13
  const userAgentPrefix = prefixFromOptions
14
14
  ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
15
15
  : `azsdk-js-api ${userAgentInfo}`;
@@ -1 +1 @@
1
- {"version":3,"file":"aiProjectContext.js","sourceRoot":"","sources":["../../../src/api/aiProjectContext.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAoBlC,0CAsCC;AAxDD,4CAAsC;AACtC,mDAAuD;AACvD,yDAA2E;AAgB3E,SAAgB,eAAe,CAC7B,QAAgB,EAChB,UAA2B,EAC3B,UAAyC,EAAE;IAE3C,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC;IACzD,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,mCAAmC,CAAC;IAC1D,MAAM,eAAe,GAAG,iBAAiB;QACvC,CAAC,CAAC,GAAG,iBAAiB,iBAAiB,aAAa,EAAE;QACtD,CAAC,CAAC,gBAAgB,aAAa,EAAE,CAAC;IACpC,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,GAAG;QAC3C,GAAG,OAAO;QACV,gBAAgB,EAAE,EAAE,eAAe,EAAE;QACrC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,IAAI,kBAAM,CAAC,IAAI,EAAE;QACzE,WAAW,EAAE;YACX,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC,+BAA+B,CAAC;SACzE;KACF,CAAC;IACF,MAAM,aAAa,GAAG,IAAA,uBAAS,EAAC,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IACzE,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAClE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,4BAAgB,CAAC,mBAAmB,CAAC;IAC9E,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,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,EAAE,GAAG,aAAa,EAAE,UAAU,EAAsB,CAAC;AAC9D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownApiVersions } 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 KnownApiVersions} that the service accepts. */\n apiVersion: KnownApiVersions;\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 KnownApiVersions} that the service accepts. */\n apiVersion?: KnownApiVersions;\n}\n\nexport function createAIProject(\n endpoint: string,\n credential: TokenCredential,\n options: AIProjectClientOptionalParams = {},\n): AIProjectContext {\n const endpointUrl = options.endpoint ?? String(endpoint);\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-ai-projects/2.0.0-beta.1`;\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://ai.azure.com/.default\"],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? KnownApiVersions.v2025_11_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 if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return { ...clientContext, apiVersion } as AIProjectContext;\n}\n"]}
1
+ {"version":3,"file":"aiProjectContext.js","sourceRoot":"","sources":["../../../src/api/aiProjectContext.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAoBlC,0CAsCC;AAxDD,4CAAsC;AACtC,mDAAuD;AACvD,yDAA2E;AAgB3E,SAAgB,eAAe,CAC7B,QAAgB,EAChB,UAA2B,EAC3B,UAAyC,EAAE;IAE3C,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC;IACzD,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,mCAAmC,CAAC;IAC1D,MAAM,eAAe,GAAG,iBAAiB;QACvC,CA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C,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,EAAE,GAAG,aAAa,EAAE,UAAU,EAAsB,CAAC;AAC9D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownApiVersions } 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 KnownApiVersions} that the service accepts. */\n apiVersion: KnownApiVersions;\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 KnownApiVersions} that the service accepts. */\n apiVersion?: KnownApiVersions;\n}\n\nexport function createAIProject(\n endpoint: string,\n credential: TokenCredential,\n options: AIProjectClientOptionalParams = {},\n): AIProjectContext {\n const endpointUrl = options.endpoint ?? String(endpoint);\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-ai-projects/2.0.0-beta.3`;\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://ai.azure.com/.default\"],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? KnownApiVersions.v2025_11_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 if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return { ...clientContext, apiVersion } as AIProjectContext;\n}\n"]}
@@ -1,3 +1,4 @@
1
1
  export { deleteScope, getUpdateResult, updateMemories, searchMemories, deleteMemoryStore, listMemoryStores, getMemoryStore, updateMemoryStore, createMemoryStore, } from "./operations.js";
2
2
  export { MemoryStoresDeleteScopeOptionalParams, MemoryStoresGetUpdateResultOptionalParams, MemoryStoresUpdateMemoriesOptionalParams, MemoryStoresSearchMemoriesOptionalParams, MemoryStoresDeleteMemoryStoreOptionalParams, MemoryStoresListMemoryStoresOptionalParams, MemoryStoresGetMemoryStoreOptionalParams, MemoryStoresUpdateMemoryStoreOptionalParams, MemoryStoresCreateMemoryStoreOptionalParams, } from "./options.js";
3
+ export { MemoryStoreUpdateMemoriesPoller, MemoryStoreUpdateOperationState, } from "./memoryStoreUpdateMemoriesPoller.js";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/memoryStores/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,WAAW,EACX,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,qCAAqC,EACrC,yCAAyC,EACzC,wCAAwC,EACxC,wCAAwC,EACxC,2CAA2C,EAC3C,0CAA0C,EAC1C,wCAAwC,EACxC,2CAA2C,EAC3C,2CAA2C,GAC5C,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/memoryStores/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,WAAW,EACX,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,qCAAqC,EACrC,yCAAyC,EACzC,wCAAwC,EACxC,wCAAwC,EACxC,2CAA2C,EAC3C,0CAA0C,EAC1C,wCAAwC,EACxC,2CAA2C,EAC3C,2CAA2C,GAC5C,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,sCAAsC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/memoryStores/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,iDAUyB;AATvB,4GAAA,WAAW,OAAA;AACX,gHAAA,eAAe,OAAA;AACf,+GAAA,cAAc,OAAA;AACd,+GAAA,cAAc,OAAA;AACd,kHAAA,iBAAiB,OAAA;AACjB,iHAAA,gBAAgB,OAAA;AAChB,+GAAA,cAAc,OAAA;AACd,kHAAA,iBAAiB,OAAA;AACjB,kHAAA,iBAAiB,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport {\n deleteScope,\n getUpdateResult,\n updateMemories,\n searchMemories,\n deleteMemoryStore,\n listMemoryStores,\n getMemoryStore,\n updateMemoryStore,\n createMemoryStore,\n} from \"./operations.js\";\nexport {\n MemoryStoresDeleteScopeOptionalParams,\n MemoryStoresGetUpdateResultOptionalParams,\n MemoryStoresUpdateMemoriesOptionalParams,\n MemoryStoresSearchMemoriesOptionalParams,\n MemoryStoresDeleteMemoryStoreOptionalParams,\n MemoryStoresListMemoryStoresOptionalParams,\n MemoryStoresGetMemoryStoreOptionalParams,\n MemoryStoresUpdateMemoryStoreOptionalParams,\n MemoryStoresCreateMemoryStoreOptionalParams,\n} from \"./options.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/memoryStores/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,iDAUyB;AATvB,4GAAA,WAAW,OAAA;AACX,gHAAA,eAAe,OAAA;AACf,+GAAA,cAAc,OAAA;AACd,+GAAA,cAAc,OAAA;AACd,kHAAA,iBAAiB,OAAA;AACjB,iHAAA,gBAAgB,OAAA;AAChB,+GAAA,cAAc,OAAA;AACd,kHAAA,iBAAiB,OAAA;AACjB,kHAAA,iBAAiB,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport {\n deleteScope,\n getUpdateResult,\n updateMemories,\n searchMemories,\n deleteMemoryStore,\n listMemoryStores,\n getMemoryStore,\n updateMemoryStore,\n createMemoryStore,\n} from \"./operations.js\";\nexport {\n MemoryStoresDeleteScopeOptionalParams,\n MemoryStoresGetUpdateResultOptionalParams,\n MemoryStoresUpdateMemoriesOptionalParams,\n MemoryStoresSearchMemoriesOptionalParams,\n MemoryStoresDeleteMemoryStoreOptionalParams,\n MemoryStoresListMemoryStoresOptionalParams,\n MemoryStoresGetMemoryStoreOptionalParams,\n MemoryStoresUpdateMemoryStoreOptionalParams,\n MemoryStoresCreateMemoryStoreOptionalParams,\n} from \"./options.js\";\nexport {\n MemoryStoreUpdateMemoriesPoller,\n MemoryStoreUpdateOperationState,\n} from \"./memoryStoreUpdateMemoriesPoller.js\";\n"]}
@@ -0,0 +1,43 @@
1
+ import { AIProjectContext as Client } from "../index.js";
2
+ import { MemoryStoreUpdateResult, MemoryStoreUpdateStatus } from "../../models/models.js";
3
+ import { PollerLike, OperationState } from "@azure/core-lro";
4
+ import { AbortSignalLike } from "@azure/abort-controller";
5
+ import { PathUncheckedResponse } from "@azure-rest/core-client";
6
+ /** State of the Memory Store update operation. */
7
+ export type MemoryStoreUpdateOperationState = OperationState<MemoryStoreUpdateResult> & {
8
+ /** The ID of the memory store update operation. */
9
+ updateId: string;
10
+ /** The status of the memory store update operation. */
11
+ updateStatus: MemoryStoreUpdateStatus;
12
+ /** The ID of the memory store update operation that superseded this one, if any. */
13
+ supersededBy?: string;
14
+ };
15
+ /** Custom LROPoller for Memory Store update operations. */
16
+ export type MemoryStoreUpdateMemoriesPoller = PollerLike<MemoryStoreUpdateOperationState, MemoryStoreUpdateResult> & {
17
+ /** The ID of the memory store update operation. */
18
+ readonly updateId: string;
19
+ /** The status of the memory store update operation. */
20
+ readonly updateStatus: MemoryStoreUpdateStatus;
21
+ /** The ID of the memory store update operation that superseded this one, if any. */
22
+ readonly supersededBy?: string;
23
+ };
24
+ /** Options for creating a MemoryStoreUpdateMemoriesPoller. */
25
+ export interface CreateMemoryStoreUpdateMemoriesPollerOptions {
26
+ /** Interval in milliseconds between update polls */
27
+ updateIntervalInMs?: number;
28
+ /** An abort signal to cancel the poller */
29
+ abortSignal?: AbortSignalLike;
30
+ /** Used to restore poller from a serialized state */
31
+ restoreFrom?: string;
32
+ }
33
+ /**
34
+ * Creates a poller to track the progress of updating memories in a memory store.
35
+ *
36
+ * @param client - The AIProjectClient instance.
37
+ * @param expectedStatuses - The expected HTTP statuses for the polling operation.
38
+ * @param getInitialResponse - A function that returns a promise of the initial response to start the polling operation.
39
+ * @param options - Optional parameters for creating the poller.
40
+ * @returns A MemoryStoreUpdateMemoriesPoller instance.
41
+ */
42
+ export declare function createMemoryStoreUpdateMemoriesPoller(client: Client, expectedStatuses: string[], getInitialResponse?: () => PromiseLike<PathUncheckedResponse>, options?: CreateMemoryStoreUpdateMemoriesPollerOptions): MemoryStoreUpdateMemoriesPoller;
43
+ //# sourceMappingURL=memoryStoreUpdateMemoriesPoller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memoryStoreUpdateMemoriesPoller.d.ts","sourceRoot":"","sources":["../../../../src/api/memoryStores/memoryStoreUpdateMemoriesPoller.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EAIxB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,UAAU,EACV,cAAc,EAIf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAmB,MAAM,yBAAyB,CAAC;AAEjF,kDAAkD;AAClD,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAAC,uBAAuB,CAAC,GAAG;IACtF,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,YAAY,EAAE,uBAAuB,CAAC;IACtC,oFAAoF;IACpF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,2DAA2D;AAC3D,MAAM,MAAM,+BAA+B,GAAG,UAAU,CACtD,+BAA+B,EAC/B,uBAAuB,CACxB,GAAG;IACF,mDAAmD;IACnD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,uDAAuD;IACvD,QAAQ,CAAC,YAAY,EAAE,uBAAuB,CAAC;IAC/C,oFAAoF;IACpF,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,8DAA8D;AAC9D,MAAM,WAAW,4CAA4C;IAC3D,oDAAoD;IACpD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2CAA2C;IAC3C,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAgID;;;;;;;;GAQG;AACH,wBAAgB,qCAAqC,CACnD,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,EAAE,EAC1B,kBAAkB,CAAC,EAAE,MAAM,WAAW,CAAC,qBAAqB,CAAC,EAC7D,OAAO,GAAE,4CAAiD,GACzD,+BAA+B,CAoDjC"}
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.createMemoryStoreUpdateMemoriesPoller = createMemoryStoreUpdateMemoriesPoller;
6
+ const models_js_1 = require("../../models/models.js");
7
+ const core_lro_1 = require("@azure/core-lro");
8
+ const core_client_1 = require("@azure-rest/core-client");
9
+ const nonFailureTerminalUpdateStatuses = ["completed", "superseded"];
10
+ function createDefaultUsage() {
11
+ return {
12
+ embedding_tokens: 0,
13
+ input_tokens: 0,
14
+ input_tokens_details: { cached_tokens: 0 },
15
+ output_tokens: 0,
16
+ output_tokens_details: { reasoning_tokens: 0 },
17
+ total_tokens: 0,
18
+ };
19
+ }
20
+ function toOperationResponse(response, expectedStatuses) {
21
+ if (!expectedStatuses.includes(response.status)) {
22
+ throw (0, core_client_1.createRestError)(response);
23
+ }
24
+ return {
25
+ flatResponse: response,
26
+ rawResponse: {
27
+ ...response,
28
+ statusCode: Number.parseInt(response.status),
29
+ body: response.body,
30
+ },
31
+ };
32
+ }
33
+ function deserializeUpdateResponse(response) {
34
+ try {
35
+ return (0, models_js_1.memoryStoreUpdateResponseDeserializer)(response.body);
36
+ }
37
+ catch {
38
+ return undefined;
39
+ }
40
+ }
41
+ function applyUpdateState(state, response) {
42
+ const parsed = deserializeUpdateResponse(response);
43
+ state.updateId = parsed?.update_id ?? "";
44
+ state.updateStatus = parsed?.status ?? "queued";
45
+ if (!parsed) {
46
+ return;
47
+ }
48
+ if (parsed.status === "failed") {
49
+ state.status = "failed";
50
+ if (!state.error) {
51
+ state.error = parsed.error
52
+ ? new Error(parsed.error.message ?? "Memory update failed")
53
+ : new Error("Memory update failed");
54
+ }
55
+ return;
56
+ }
57
+ if (nonFailureTerminalUpdateStatuses.includes(parsed.status)) {
58
+ if (parsed.status === "superseded" && !state.error) {
59
+ state.supersededBy = parsed.superseded_by;
60
+ }
61
+ state.status = "succeeded";
62
+ state.result = parsed.result ??
63
+ state.result ?? {
64
+ memory_operations: [],
65
+ usage: createDefaultUsage(),
66
+ };
67
+ return;
68
+ }
69
+ state.status = "running";
70
+ }
71
+ function buildRunningOperation(client, expectedStatuses, getInitialResponse, options) {
72
+ const pollAbortController = new AbortController();
73
+ return {
74
+ sendInitialRequest: async () => {
75
+ if (!getInitialResponse) {
76
+ throw new Error("getInitialResponse is required when starting a new poller");
77
+ }
78
+ const initialResponse = await getInitialResponse();
79
+ return toOperationResponse(initialResponse, expectedStatuses);
80
+ },
81
+ sendPollRequest: async (path, pollOptions) => {
82
+ // The poll request will both listen to the user provided abort signal and the poller's own abort signal
83
+ function abortListener() {
84
+ pollAbortController.abort();
85
+ }
86
+ const abortSignal = pollAbortController.signal;
87
+ if (options?.abortSignal?.aborted) {
88
+ pollAbortController.abort();
89
+ }
90
+ else if (pollOptions?.abortSignal?.aborted) {
91
+ pollAbortController.abort();
92
+ }
93
+ else if (!abortSignal.aborted) {
94
+ options?.abortSignal?.addEventListener("abort", abortListener, {
95
+ once: true,
96
+ });
97
+ pollOptions?.abortSignal?.addEventListener("abort", abortListener, {
98
+ once: true,
99
+ });
100
+ }
101
+ let response;
102
+ try {
103
+ response = (await client.pathUnchecked(path).get({ abortSignal }));
104
+ }
105
+ finally {
106
+ options?.abortSignal?.removeEventListener("abort", abortListener);
107
+ pollOptions?.abortSignal?.removeEventListener("abort", abortListener);
108
+ }
109
+ return toOperationResponse(response, expectedStatuses);
110
+ },
111
+ };
112
+ }
113
+ /**
114
+ * Creates a poller to track the progress of updating memories in a memory store.
115
+ *
116
+ * @param client - The AIProjectClient instance.
117
+ * @param expectedStatuses - The expected HTTP statuses for the polling operation.
118
+ * @param getInitialResponse - A function that returns a promise of the initial response to start the polling operation.
119
+ * @param options - Optional parameters for creating the poller.
120
+ * @returns A MemoryStoreUpdateMemoriesPoller instance.
121
+ */
122
+ function createMemoryStoreUpdateMemoriesPoller(client, expectedStatuses, getInitialResponse, options = {}) {
123
+ if (!getInitialResponse && !options?.restoreFrom) {
124
+ throw new Error("getInitialResponse is required when starting a new poller");
125
+ }
126
+ let initialResponse;
127
+ const poller = (0, core_lro_1.createHttpPoller)(buildRunningOperation(client, expectedStatuses, getInitialResponse
128
+ ? async () => {
129
+ initialResponse = await getInitialResponse();
130
+ return initialResponse;
131
+ }
132
+ : undefined, options), {
133
+ intervalInMs: options?.updateIntervalInMs,
134
+ restoreFrom: options?.restoreFrom,
135
+ updateState: (state, lastResponse) => {
136
+ const flatResponse = lastResponse.flatResponse;
137
+ applyUpdateState(state, flatResponse);
138
+ },
139
+ processResult: async (operationResponse, state) => {
140
+ applyUpdateState(state, operationResponse);
141
+ return state.result;
142
+ },
143
+ });
144
+ if (initialResponse && poller.operationState) {
145
+ applyUpdateState(poller.operationState, initialResponse);
146
+ }
147
+ Object.defineProperties(poller, {
148
+ updateId: {
149
+ enumerable: true,
150
+ get: () => poller.operationState?.updateId,
151
+ },
152
+ updateStatus: {
153
+ enumerable: true,
154
+ get: () => poller.operationState?.updateStatus,
155
+ },
156
+ supersededBy: {
157
+ enumerable: true,
158
+ get: () => poller.operationState?.supersededBy,
159
+ },
160
+ });
161
+ return poller;
162
+ }
163
+ //# sourceMappingURL=memoryStoreUpdateMemoriesPoller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memoryStoreUpdateMemoriesPoller.js","sourceRoot":"","sources":["../../../../src/api/memoryStores/memoryStoreUpdateMemoriesPoller.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA4LlC,sFAyDC;AAlPD,sDAMgC;AAChC,8CAMyB;AAEzB,yDAAiF;AAmCjF,MAAM,gCAAgC,GAA8B,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;AAEhG,SAAS,kBAAkB;IACzB,OAAO;QACL,gBAAgB,EAAE,CAAC;QACnB,YAAY,EAAE,CAAC;QACf,oBAAoB,EAAE,EAAE,aAAa,EAAE,CAAC,EAAE;QAC1C,aAAa,EAAE,CAAC;QAChB,qBAAqB,EAAE,EAAE,gBAAgB,EAAE,CAAC,EAAE;QAC9C,YAAY,EAAE,CAAC;KAChB,CAAC;AACJ,CAAC;AAED,SAAS,mBAA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e,GAAG,MAAM,kBAAkB,EAAE,CAAC;YAC7C,OAAO,eAAe,CAAC;QACzB,CAAC;QACH,CAAC,CAAC,SAAS,EACb,OAAO,CACR,EACD;QACE,YAAY,EAAE,OAAO,EAAE,kBAAkB;QACzC,WAAW,EAAE,OAAO,EAAE,WAAW;QACjC,WAAW,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE;YACnC,MAAM,YAAY,GAAG,YAAY,CAAC,YAAqC,CAAC;YACxE,gBAAgB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;QACxC,CAAC;QACD,aAAa,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,EAAE;YAChD,gBAAgB,CAAC,KAAK,EAAE,iBAA0C,CAAC,CAAC;YACpE,OAAO,KAAK,CAAC,MAAiC,CAAC;QACjD,CAAC;KACF,CACiC,CAAC;IAErC,IAAI,eAAe,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;QAC7C,gBAAgB,CAAC,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE;QAC9B,QAAQ,EAAE;YACR,UAAU,EAAE,IAAI;YAChB,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,QAAQ;SAC3C;QACD,YAAY,EAAE;YACZ,UAAU,EAAE,IAAI;YAChB,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,YAAY;SAC/C;QACD,YAAY,EAAE;YACZ,UAAU,EAAE,IAAI;YAChB,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,YAAY;SAC/C;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AIProjectContext as Client } from \"../index.js\";\nimport {\n MemoryStoreUpdateResult,\n MemoryStoreUpdateStatus,\n MemoryStoreUpdateResponse,\n memoryStoreUpdateResponseDeserializer,\n MemoryStoreOperationUsage,\n} from \"../../models/models.js\";\nimport {\n PollerLike,\n OperationState,\n createHttpPoller,\n RunningOperation,\n OperationResponse,\n} from \"@azure/core-lro\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { PathUncheckedResponse, createRestError } from \"@azure-rest/core-client\";\n\n/** State of the Memory Store update operation. */\nexport type MemoryStoreUpdateOperationState = OperationState<MemoryStoreUpdateResult> & {\n /** The ID of the memory store update operation. */\n updateId: string;\n /** The status of the memory store update operation. */\n updateStatus: MemoryStoreUpdateStatus;\n /** The ID of the memory store update operation that superseded this one, if any. */\n supersededBy?: string;\n};\n\n/** Custom LROPoller for Memory Store update operations. */\nexport type MemoryStoreUpdateMemoriesPoller = PollerLike<\n MemoryStoreUpdateOperationState,\n MemoryStoreUpdateResult\n> & {\n /** The ID of the memory store update operation. */\n readonly updateId: string;\n /** The status of the memory store update operation. */\n readonly updateStatus: MemoryStoreUpdateStatus;\n /** The ID of the memory store update operation that superseded this one, if any. */\n readonly supersededBy?: string;\n};\n\n/** Options for creating a MemoryStoreUpdateMemoriesPoller. */\nexport interface CreateMemoryStoreUpdateMemoriesPollerOptions {\n /** Interval in milliseconds between update polls */\n updateIntervalInMs?: number;\n /** An abort signal to cancel the poller */\n abortSignal?: AbortSignalLike;\n /** Used to restore poller from a serialized state */\n restoreFrom?: string;\n}\n\nconst nonFailureTerminalUpdateStatuses: MemoryStoreUpdateStatus[] = [\"completed\", \"superseded\"];\n\nfunction createDefaultUsage(): MemoryStoreOperationUsage {\n return {\n embedding_tokens: 0,\n input_tokens: 0,\n input_tokens_details: { cached_tokens: 0 },\n output_tokens: 0,\n output_tokens_details: { reasoning_tokens: 0 },\n total_tokens: 0,\n };\n}\n\nfunction toOperationResponse(\n response: PathUncheckedResponse,\n expectedStatuses: string[],\n): OperationResponse<PathUncheckedResponse> {\n if (!expectedStatuses.includes(response.status)) {\n throw createRestError(response);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n\nfunction deserializeUpdateResponse(\n response: PathUncheckedResponse,\n): MemoryStoreUpdateResponse | undefined {\n try {\n return memoryStoreUpdateResponseDeserializer(response.body);\n } catch {\n return undefined;\n }\n}\n\nfunction applyUpdateState(\n state: MemoryStoreUpdateOperationState,\n response: PathUncheckedResponse,\n): void {\n const parsed = deserializeUpdateResponse(response);\n state.updateId = parsed?.update_id ?? \"\";\n state.updateStatus = parsed?.status ?? \"queued\";\n\n if (!parsed) {\n return;\n }\n\n if (parsed.status === \"failed\") {\n state.status = \"failed\";\n if (!state.error) {\n state.error = parsed.error\n ? new Error(parsed.error.message ?? \"Memory update failed\")\n : new Error(\"Memory update failed\");\n }\n return;\n }\n\n if (nonFailureTerminalUpdateStatuses.includes(parsed.status)) {\n if (parsed.status === \"superseded\" && !state.error) {\n state.supersededBy = parsed.superseded_by;\n }\n state.status = \"succeeded\";\n state.result = parsed.result ??\n state.result ?? {\n memory_operations: [],\n usage: createDefaultUsage(),\n };\n return;\n }\n\n state.status = \"running\";\n}\n\nfunction buildRunningOperation(\n client: Client,\n expectedStatuses: string[],\n getInitialResponse?: () => PromiseLike<PathUncheckedResponse>,\n options?: CreateMemoryStoreUpdateMemoriesPollerOptions,\n): RunningOperation<PathUncheckedResponse> {\n const pollAbortController = new AbortController();\n return {\n sendInitialRequest: async () => {\n if (!getInitialResponse) {\n throw new Error(\"getInitialResponse is required when starting a new poller\");\n }\n const initialResponse = await getInitialResponse();\n return toOperationResponse(initialResponse, expectedStatuses);\n },\n sendPollRequest: async (path: string, pollOptions?: { abortSignal?: AbortSignalLike }) => {\n // The poll request will both listen to the user provided abort signal and the poller's own abort signal\n function abortListener(): void {\n pollAbortController.abort();\n }\n const abortSignal = pollAbortController.signal;\n if (options?.abortSignal?.aborted) {\n pollAbortController.abort();\n } else if (pollOptions?.abortSignal?.aborted) {\n pollAbortController.abort();\n } else if (!abortSignal.aborted) {\n options?.abortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n pollOptions?.abortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n }\n\n let response: PathUncheckedResponse;\n try {\n response = (await client.pathUnchecked(path).get({ abortSignal })) as PathUncheckedResponse;\n } finally {\n options?.abortSignal?.removeEventListener(\"abort\", abortListener);\n pollOptions?.abortSignal?.removeEventListener(\"abort\", abortListener);\n }\n\n return toOperationResponse(response, expectedStatuses);\n },\n };\n}\n\n/**\n * Creates a poller to track the progress of updating memories in a memory store.\n *\n * @param client - The AIProjectClient instance.\n * @param expectedStatuses - The expected HTTP statuses for the polling operation.\n * @param getInitialResponse - A function that returns a promise of the initial response to start the polling operation.\n * @param options - Optional parameters for creating the poller.\n * @returns A MemoryStoreUpdateMemoriesPoller instance.\n */\nexport function createMemoryStoreUpdateMemoriesPoller(\n client: Client,\n expectedStatuses: string[],\n getInitialResponse?: () => PromiseLike<PathUncheckedResponse>,\n options: CreateMemoryStoreUpdateMemoriesPollerOptions = {},\n): MemoryStoreUpdateMemoriesPoller {\n if (!getInitialResponse && !options?.restoreFrom) {\n throw new Error(\"getInitialResponse is required when starting a new poller\");\n }\n let initialResponse: PathUncheckedResponse | undefined;\n\n const poller = createHttpPoller<MemoryStoreUpdateResult, MemoryStoreUpdateOperationState>(\n buildRunningOperation(\n client,\n expectedStatuses,\n getInitialResponse\n ? async () => {\n initialResponse = await getInitialResponse();\n return initialResponse;\n }\n : undefined,\n options,\n ),\n {\n intervalInMs: options?.updateIntervalInMs,\n restoreFrom: options?.restoreFrom,\n updateState: (state, lastResponse) => {\n const flatResponse = lastResponse.flatResponse as PathUncheckedResponse;\n applyUpdateState(state, flatResponse);\n },\n processResult: async (operationResponse, state) => {\n applyUpdateState(state, operationResponse as PathUncheckedResponse);\n return state.result as MemoryStoreUpdateResult;\n },\n },\n ) as MemoryStoreUpdateMemoriesPoller;\n\n if (initialResponse && poller.operationState) {\n applyUpdateState(poller.operationState, initialResponse);\n }\n\n Object.defineProperties(poller, {\n updateId: {\n enumerable: true,\n get: () => poller.operationState?.updateId,\n },\n updateStatus: {\n enumerable: true,\n get: () => poller.operationState?.updateStatus,\n },\n supersededBy: {\n enumerable: true,\n get: () => poller.operationState?.supersededBy,\n },\n });\n\n return poller;\n}\n"]}
@@ -1,9 +1,9 @@
1
1
  import { AIProjectContext as Client } from "../index.js";
2
- import { MemoryStoreDefinitionUnion, MemoryStore, _AgentsPagedResultMemoryStore, DeleteMemoryStoreResponse, MemoryStoreSearchResponse, MemoryStoreUpdateResponse, MemoryStoreUpdateResult, MemoryStoreDeleteScopeResponse } from "../../models/models.js";
2
+ import { MemoryStoreDefinitionUnion, MemoryStore, _AgentsPagedResultMemoryStore, DeleteMemoryStoreResponse, MemoryStoreSearchResponse, MemoryStoreUpdateResponse, MemoryStoreDeleteScopeResponse } from "../../models/models.js";
3
3
  import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
4
+ import { MemoryStoreUpdateMemoriesPoller } from "./memoryStoreUpdateMemoriesPoller.js";
4
5
  import { MemoryStoresDeleteScopeOptionalParams, MemoryStoresGetUpdateResultOptionalParams, MemoryStoresUpdateMemoriesOptionalParams, MemoryStoresSearchMemoriesOptionalParams, MemoryStoresDeleteMemoryStoreOptionalParams, MemoryStoresListMemoryStoresOptionalParams, MemoryStoresGetMemoryStoreOptionalParams, MemoryStoresUpdateMemoryStoreOptionalParams, MemoryStoresCreateMemoryStoreOptionalParams } from "./options.js";
5
6
  import { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client";
6
- import { PollerLike, OperationState } from "@azure/core-lro";
7
7
  export declare function _deleteScopeSend(context: Client, name: string, scope: string, options?: MemoryStoresDeleteScopeOptionalParams): StreamableMethod;
8
8
  export declare function _deleteScopeDeserialize(result: PathUncheckedResponse): Promise<MemoryStoreDeleteScopeResponse>;
9
9
  /** Delete all memories associated with a specific scope from a memory store. */
@@ -13,9 +13,8 @@ export declare function _getUpdateResultDeserialize(result: PathUncheckedRespons
13
13
  /** Get memory store update result. */
14
14
  export declare function getUpdateResult(context: Client, name: string, updateId: string, options?: MemoryStoresGetUpdateResultOptionalParams): Promise<MemoryStoreUpdateResponse>;
15
15
  export declare function _updateMemoriesSend(context: Client, name: string, scope: string, options?: MemoryStoresUpdateMemoriesOptionalParams): StreamableMethod;
16
- export declare function _updateMemoriesDeserialize(result: PathUncheckedResponse): Promise<MemoryStoreUpdateResult>;
17
16
  /** Update memory store with conversation memories. */
18
- export declare function updateMemories(context: Client, name: string, scope: string, options?: MemoryStoresUpdateMemoriesOptionalParams): PollerLike<OperationState<MemoryStoreUpdateResult>, MemoryStoreUpdateResult>;
17
+ export declare function updateMemories(context: Client, name: string, scope: string, options?: MemoryStoresUpdateMemoriesOptionalParams): MemoryStoreUpdateMemoriesPoller;
19
18
  export declare function _searchMemoriesSend(context: Client, name: string, scope: string, options?: MemoryStoresSearchMemoriesOptionalParams): StreamableMethod;
20
19
  export declare function _searchMemoriesDeserialize(result: PathUncheckedResponse): Promise<MemoryStoreSearchResponse>;
21
20
  /** Search for relevant memories from a memory store based on conversation context. */
@@ -1 +1 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../src/api/memoryStores/operations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAIL,0BAA0B,EAC1B,WAAW,EAEX,6BAA6B,EAE7B,yBAAyB,EAGzB,yBAAyB,EAEzB,yBAAyB,EAEzB,uBAAuB,EAEvB,8BAA8B,EAE/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,0BAA0B,EAE3B,MAAM,uCAAuC,CAAC;AAG/C,OAAO,EACL,qCAAqC,EACrC,yCAAyC,EACzC,wCAAwC,EACxC,wCAAwC,EACxC,2CAA2C,EAC3C,0CAA0C,EAC1C,wCAAwC,EACxC,2CAA2C,EAC3C,2CAA2C,EA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QzC;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,wCAAiE,GACzE,gBAAgB,CAkBlB;AAED,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,WAAW,CAAC,CAStB;AAED,+BAA+B;AAC/B,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,wCAAiE,GACzE,OAAO,CAAC,WAAW,CAAC,CAGtB;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,2CAAoE,GAC5E,gBAAgB,CAoBlB;AAED,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,WAAW,CAAC,CAStB;AAED,6BAA6B;AAC7B,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,2CAAoE,GAC5E,OAAO,CAAC,WAAW,CAAC,CAGtB;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,0BAA0B,EACtC,OAAO,GAAE,2CAAoE,GAC5E,gBAAgB,CAwBlB;AAED,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,WAAW,CAAC,CAStB;AAED,6BAA6B;AAC7B,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,0BAA0B,EACtC,OAAO,GAAE,2CAAoE,GAC5E,OAAO,CAAC,WAAW,CAAC,CAGtB"}
1
+ {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../src/api/memoryStores/operations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,IAAI,M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