@azure/ai-projects 2.7.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/dist/browser/aiProjectClient.d.ts +4 -0
- package/dist/browser/aiProjectClient.d.ts.map +1 -1
- package/dist/browser/aiProjectClient.js +5 -0
- package/dist/browser/aiProjectClient.js.map +1 -1
- package/dist/browser/api/agents/index.d.ts +2 -2
- package/dist/browser/api/agents/index.d.ts.map +1 -1
- package/dist/browser/api/agents/index.js +1 -1
- package/dist/browser/api/agents/index.js.map +1 -1
- package/dist/browser/api/agents/operations.d.ts +41 -4
- package/dist/browser/api/agents/operations.d.ts.map +1 -1
- package/dist/browser/api/agents/operations.js +322 -21
- package/dist/browser/api/agents/operations.js.map +1 -1
- package/dist/browser/api/agents/options.d.ts +163 -93
- package/dist/browser/api/agents/options.d.ts.map +1 -1
- package/dist/browser/api/agents/options.js.map +1 -1
- package/dist/browser/api/beta/agents/index.d.ts +2 -2
- package/dist/browser/api/beta/agents/index.d.ts.map +1 -1
- package/dist/browser/api/beta/agents/index.js +1 -1
- package/dist/browser/api/beta/agents/index.js.map +1 -1
- package/dist/browser/api/beta/agents/operations.d.ts +2 -24
- package/dist/browser/api/beta/agents/operations.d.ts.map +1 -1
- package/dist/browser/api/beta/agents/operations.js +3 -185
- package/dist/browser/api/beta/agents/operations.js.map +1 -1
- package/dist/browser/api/beta/agents/options.d.ts +0 -56
- package/dist/browser/api/beta/agents/options.d.ts.map +1 -1
- package/dist/browser/api/beta/agents/options.js.map +1 -1
- package/dist/browser/api/beta/evaluators/index.d.ts +2 -2
- package/dist/browser/api/beta/evaluators/index.d.ts.map +1 -1
- package/dist/browser/api/beta/evaluators/index.js +1 -1
- package/dist/browser/api/beta/evaluators/index.js.map +1 -1
- package/dist/browser/api/beta/evaluators/operations.d.ts +2 -59
- package/dist/browser/api/beta/evaluators/operations.d.ts.map +1 -1
- package/dist/browser/api/beta/evaluators/operations.js +1 -388
- package/dist/browser/api/beta/evaluators/operations.js.map +1 -1
- package/dist/browser/api/beta/evaluators/options.d.ts +0 -84
- package/dist/browser/api/beta/evaluators/options.d.ts.map +1 -1
- package/dist/browser/api/beta/evaluators/options.js.map +1 -1
- package/dist/browser/api/beta/models/operations.d.ts +1 -2
- package/dist/browser/api/beta/models/operations.d.ts.map +1 -1
- package/dist/browser/api/beta/models/operations.js +0 -59
- package/dist/browser/api/beta/models/operations.js.map +1 -1
- package/dist/browser/api/beta/models/uploads.d.ts +5 -0
- package/dist/browser/api/beta/models/uploads.d.ts.map +1 -0
- package/dist/browser/api/beta/models/uploads.js +6 -0
- package/dist/browser/api/beta/models/uploads.js.map +1 -0
- package/dist/browser/api/datasets/index.d.ts +2 -2
- package/dist/browser/api/datasets/index.d.ts.map +1 -1
- package/dist/browser/api/datasets/index.js +1 -1
- package/dist/browser/api/datasets/index.js.map +1 -1
- package/dist/browser/api/datasets/operations.d.ts +24 -5
- package/dist/browser/api/datasets/operations.d.ts.map +1 -1
- package/dist/browser/api/datasets/operations.js +193 -130
- package/dist/browser/api/datasets/operations.js.map +1 -1
- package/dist/browser/api/datasets/options.d.ts +52 -0
- package/dist/browser/api/datasets/options.d.ts.map +1 -1
- package/dist/browser/api/datasets/options.js.map +1 -1
- package/dist/browser/api/datasets/uploads.d.ts +5 -0
- package/dist/browser/api/datasets/uploads.d.ts.map +1 -0
- package/dist/browser/api/datasets/uploads.js +9 -0
- package/dist/browser/api/datasets/uploads.js.map +1 -0
- package/dist/browser/api/evaluators/index.d.ts +3 -0
- package/dist/browser/api/evaluators/index.d.ts.map +1 -0
- package/dist/browser/api/evaluators/index.js +4 -0
- package/dist/browser/api/evaluators/index.js.map +1 -0
- package/dist/browser/api/evaluators/operations.d.ts +62 -0
- package/dist/browser/api/evaluators/operations.d.ts.map +1 -0
- package/dist/browser/api/evaluators/operations.js +373 -0
- package/dist/browser/api/evaluators/operations.js.map +1 -0
- package/dist/browser/api/evaluators/options.d.ts +70 -0
- package/dist/browser/api/evaluators/options.d.ts.map +1 -0
- package/dist/browser/api/evaluators/options.js.map +1 -0
- package/dist/browser/classic/agents/index.d.ts +21 -2
- package/dist/browser/classic/agents/index.d.ts.map +1 -1
- package/dist/browser/classic/agents/index.js +10 -1
- package/dist/browser/classic/agents/index.js.map +1 -1
- package/dist/browser/classic/beta/agents/index.d.ts +2 -14
- package/dist/browser/classic/beta/agents/index.d.ts.map +1 -1
- package/dist/browser/classic/beta/agents/index.js +2 -10
- package/dist/browser/classic/beta/agents/index.js.map +1 -1
- package/dist/browser/classic/beta/evaluators/index.d.ts +3 -38
- package/dist/browser/classic/beta/evaluators/index.d.ts.map +1 -1
- package/dist/browser/classic/beta/evaluators/index.js +2 -18
- package/dist/browser/classic/beta/evaluators/index.js.map +1 -1
- package/dist/browser/classic/beta/index.d.ts +0 -3
- package/dist/browser/classic/beta/index.d.ts.map +1 -1
- package/dist/browser/classic/beta/index.js +0 -3
- package/dist/browser/classic/beta/index.js.map +1 -1
- package/dist/browser/classic/beta/models/index.d.ts +1 -1
- package/dist/browser/classic/beta/models/index.d.ts.map +1 -1
- package/dist/browser/classic/beta/models/index.js +2 -1
- package/dist/browser/classic/beta/models/index.js.map +1 -1
- package/dist/browser/classic/datasets/index.d.ts +15 -4
- package/dist/browser/classic/datasets/index.d.ts.map +1 -1
- package/dist/browser/classic/datasets/index.js +7 -1
- package/dist/browser/classic/datasets/index.js.map +1 -1
- package/dist/browser/classic/evaluators/index.d.ts +43 -0
- package/dist/browser/classic/evaluators/index.d.ts.map +1 -0
- package/dist/browser/classic/evaluators/index.js +19 -0
- package/dist/browser/classic/evaluators/index.js.map +1 -0
- package/dist/browser/classic/index.d.ts +1 -1
- package/dist/browser/classic/index.d.ts.map +1 -1
- package/dist/browser/classic/index.js.map +1 -1
- package/dist/browser/constants.d.ts +1 -1
- package/dist/browser/constants.js +1 -1
- package/dist/browser/constants.js.map +1 -1
- package/dist/browser/index.d.ts +10 -17
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +1 -2
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/models/index.d.ts +1 -3
- package/dist/browser/models/index.d.ts.map +1 -1
- package/dist/browser/models/index.js.map +1 -1
- package/dist/browser/models/models.d.ts +880 -380
- package/dist/browser/models/models.d.ts.map +1 -1
- package/dist/browser/models/models.js +1424 -534
- package/dist/browser/models/models.js.map +1 -1
- package/dist/browser/package.json +1 -1
- package/dist/browser/realtime/voiceAgentRealtimeClient.d.ts +24 -2
- package/dist/browser/realtime/voiceAgentRealtimeClient.d.ts.map +1 -1
- package/dist/browser/realtime/voiceAgentRealtimeClient.js +60 -11
- package/dist/browser/realtime/voiceAgentRealtimeClient.js.map +1 -1
- package/dist/browser/webSocketTransport.d.ts +1 -0
- package/dist/browser/webSocketTransport.d.ts.map +1 -1
- package/dist/browser/webSocketTransport.js +5 -13
- package/dist/browser/webSocketTransport.js.map +1 -1
- package/dist/commonjs/aiProjectClient.d.ts +4 -0
- package/dist/commonjs/aiProjectClient.d.ts.map +1 -1
- package/dist/commonjs/aiProjectClient.js +4 -0
- package/dist/commonjs/aiProjectClient.js.map +2 -2
- package/dist/commonjs/api/agents/index.d.ts +2 -2
- package/dist/commonjs/api/agents/index.d.ts.map +1 -1
- package/dist/commonjs/api/agents/index.js +18 -0
- package/dist/commonjs/api/agents/index.js.map +2 -2
- package/dist/commonjs/api/agents/operations.d.ts +41 -4
- package/dist/commonjs/api/agents/operations.d.ts.map +1 -1
- package/dist/commonjs/api/agents/operations.js +415 -19
- package/dist/commonjs/api/agents/operations.js.map +2 -2
- package/dist/commonjs/api/agents/options.d.ts +163 -93
- package/dist/commonjs/api/agents/options.d.ts.map +1 -1
- package/dist/commonjs/api/agents/options.js.map +1 -1
- package/dist/commonjs/api/beta/agents/index.d.ts +2 -2
- package/dist/commonjs/api/beta/agents/index.d.ts.map +1 -1
- package/dist/commonjs/api/beta/agents/index.js +2 -12
- package/dist/commonjs/api/beta/agents/index.js.map +2 -2
- package/dist/commonjs/api/beta/agents/operations.d.ts +2 -24
- package/dist/commonjs/api/beta/agents/operations.d.ts.map +1 -1
- package/dist/commonjs/api/beta/agents/operations.js +4 -239
- package/dist/commonjs/api/beta/agents/operations.js.map +2 -2
- package/dist/commonjs/api/beta/agents/options.d.ts +0 -56
- package/dist/commonjs/api/beta/agents/options.d.ts.map +1 -1
- package/dist/commonjs/api/beta/agents/options.js.map +1 -1
- package/dist/commonjs/api/beta/evaluators/index.d.ts +2 -2
- package/dist/commonjs/api/beta/evaluators/index.d.ts.map +1 -1
- package/dist/commonjs/api/beta/evaluators/index.js +2 -24
- package/dist/commonjs/api/beta/evaluators/index.js.map +2 -2
- package/dist/commonjs/api/beta/evaluators/operations.d.ts +2 -59
- package/dist/commonjs/api/beta/evaluators/operations.d.ts.map +1 -1
- package/dist/commonjs/api/beta/evaluators/operations.js +2 -497
- package/dist/commonjs/api/beta/evaluators/operations.js.map +2 -2
- package/dist/commonjs/api/beta/evaluators/options.d.ts +0 -84
- package/dist/commonjs/api/beta/evaluators/options.d.ts.map +1 -1
- package/dist/commonjs/api/beta/evaluators/options.js.map +1 -1
- package/dist/commonjs/api/beta/models/operations.d.ts +1 -2
- package/dist/commonjs/api/beta/models/operations.d.ts.map +1 -1
- package/dist/commonjs/api/beta/models/operations.js +0 -68
- package/dist/commonjs/api/beta/models/operations.js.map +3 -3
- package/dist/commonjs/api/beta/models/uploads.d.ts +5 -0
- package/dist/commonjs/api/beta/models/uploads.d.ts.map +1 -0
- package/dist/commonjs/api/beta/models/uploads.js +94 -0
- package/dist/commonjs/api/beta/models/uploads.js.map +7 -0
- package/dist/commonjs/api/datasets/index.d.ts +2 -2
- package/dist/commonjs/api/datasets/index.d.ts.map +1 -1
- package/dist/commonjs/api/datasets/index.js +10 -0
- package/dist/commonjs/api/datasets/index.js.map +2 -2
- package/dist/commonjs/api/datasets/operations.d.ts +24 -5
- package/dist/commonjs/api/datasets/operations.d.ts.map +1 -1
- package/dist/commonjs/api/datasets/operations.js +247 -147
- package/dist/commonjs/api/datasets/operations.js.map +3 -3
- package/dist/commonjs/api/datasets/options.d.ts +52 -0
- package/dist/commonjs/api/datasets/options.d.ts.map +1 -1
- package/dist/commonjs/api/datasets/options.js.map +1 -1
- package/dist/commonjs/api/datasets/uploads.d.ts +5 -0
- package/dist/commonjs/api/datasets/uploads.d.ts.map +1 -0
- package/dist/commonjs/api/datasets/uploads.js +171 -0
- package/dist/commonjs/api/datasets/uploads.js.map +7 -0
- package/dist/commonjs/api/evaluators/index.d.ts +3 -0
- package/dist/commonjs/api/evaluators/index.d.ts.map +1 -0
- package/dist/commonjs/api/{beta/datasets → evaluators}/index.js +17 -5
- package/dist/commonjs/api/evaluators/index.js.map +7 -0
- package/dist/commonjs/api/evaluators/operations.d.ts +62 -0
- package/dist/commonjs/api/evaluators/operations.d.ts.map +1 -0
- package/dist/commonjs/api/evaluators/operations.js +505 -0
- package/dist/commonjs/api/evaluators/operations.js.map +7 -0
- package/dist/commonjs/api/evaluators/options.d.ts +70 -0
- package/dist/commonjs/api/evaluators/options.d.ts.map +1 -0
- package/dist/commonjs/api/evaluators/options.js.map +7 -0
- package/dist/commonjs/classic/agents/index.d.ts +21 -2
- package/dist/commonjs/classic/agents/index.d.ts.map +1 -1
- package/dist/commonjs/classic/agents/index.js +9 -0
- package/dist/commonjs/classic/agents/index.js.map +2 -2
- package/dist/commonjs/classic/beta/agents/index.d.ts +2 -14
- package/dist/commonjs/classic/beta/agents/index.d.ts.map +1 -1
- package/dist/commonjs/classic/beta/agents/index.js +1 -9
- package/dist/commonjs/classic/beta/agents/index.js.map +2 -2
- package/dist/commonjs/classic/beta/evaluators/index.d.ts +3 -38
- package/dist/commonjs/classic/beta/evaluators/index.d.ts.map +1 -1
- package/dist/commonjs/classic/beta/evaluators/index.js +2 -18
- package/dist/commonjs/classic/beta/evaluators/index.js.map +2 -2
- package/dist/commonjs/classic/beta/index.d.ts +0 -3
- package/dist/commonjs/classic/beta/index.d.ts.map +1 -1
- package/dist/commonjs/classic/beta/index.js +0 -3
- package/dist/commonjs/classic/beta/index.js.map +2 -2
- package/dist/commonjs/classic/beta/models/index.d.ts +1 -1
- package/dist/commonjs/classic/beta/models/index.d.ts.map +1 -1
- package/dist/commonjs/classic/beta/models/index.js +2 -1
- package/dist/commonjs/classic/beta/models/index.js.map +2 -2
- package/dist/commonjs/classic/datasets/index.d.ts +15 -4
- package/dist/commonjs/classic/datasets/index.d.ts.map +1 -1
- package/dist/commonjs/classic/datasets/index.js +8 -2
- package/dist/commonjs/classic/datasets/index.js.map +2 -2
- package/dist/commonjs/classic/evaluators/index.d.ts +43 -0
- package/dist/commonjs/classic/evaluators/index.d.ts.map +1 -0
- package/dist/commonjs/classic/{beta/datasets → evaluators}/index.js +15 -14
- package/dist/commonjs/classic/evaluators/index.js.map +7 -0
- package/dist/commonjs/classic/index.d.ts +1 -1
- package/dist/commonjs/classic/index.d.ts.map +1 -1
- package/dist/commonjs/classic/index.js.map +1 -1
- package/dist/commonjs/constants.d.ts +1 -1
- package/dist/commonjs/constants.js +1 -1
- package/dist/commonjs/constants.js.map +1 -1
- package/dist/commonjs/index.d.ts +10 -17
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +1 -2
- package/dist/commonjs/index.js.map +3 -3
- package/dist/commonjs/models/index.d.ts +1 -3
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/models.d.ts +880 -380
- package/dist/commonjs/models/models.d.ts.map +1 -1
- package/dist/commonjs/models/models.js +1658 -616
- package/dist/commonjs/models/models.js.map +2 -2
- package/dist/commonjs/package.json +1 -1
- package/dist/commonjs/realtime/voiceAgentRealtimeClient.d.ts +24 -2
- package/dist/commonjs/realtime/voiceAgentRealtimeClient.d.ts.map +1 -1
- package/dist/commonjs/realtime/voiceAgentRealtimeClient.js +59 -16
- package/dist/commonjs/realtime/voiceAgentRealtimeClient.js.map +2 -2
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/esm/aiProjectClient.d.ts +4 -0
- package/dist/esm/aiProjectClient.d.ts.map +1 -1
- package/dist/esm/aiProjectClient.js +5 -0
- package/dist/esm/aiProjectClient.js.map +1 -1
- package/dist/esm/api/agents/index.d.ts +2 -2
- package/dist/esm/api/agents/index.d.ts.map +1 -1
- package/dist/esm/api/agents/index.js +1 -1
- package/dist/esm/api/agents/index.js.map +1 -1
- package/dist/esm/api/agents/operations.d.ts +41 -4
- package/dist/esm/api/agents/operations.d.ts.map +1 -1
- package/dist/esm/api/agents/operations.js +322 -21
- package/dist/esm/api/agents/operations.js.map +1 -1
- package/dist/esm/api/agents/options.d.ts +163 -93
- package/dist/esm/api/agents/options.d.ts.map +1 -1
- package/dist/esm/api/agents/options.js.map +1 -1
- package/dist/esm/api/beta/agents/index.d.ts +2 -2
- package/dist/esm/api/beta/agents/index.d.ts.map +1 -1
- package/dist/esm/api/beta/agents/index.js +1 -1
- package/dist/esm/api/beta/agents/index.js.map +1 -1
- package/dist/esm/api/beta/agents/operations.d.ts +2 -24
- package/dist/esm/api/beta/agents/operations.d.ts.map +1 -1
- package/dist/esm/api/beta/agents/operations.js +3 -185
- package/dist/esm/api/beta/agents/operations.js.map +1 -1
- package/dist/esm/api/beta/agents/options.d.ts +0 -56
- package/dist/esm/api/beta/agents/options.d.ts.map +1 -1
- package/dist/esm/api/beta/agents/options.js.map +1 -1
- package/dist/esm/api/beta/evaluators/index.d.ts +2 -2
- package/dist/esm/api/beta/evaluators/index.d.ts.map +1 -1
- package/dist/esm/api/beta/evaluators/index.js +1 -1
- package/dist/esm/api/beta/evaluators/index.js.map +1 -1
- package/dist/esm/api/beta/evaluators/operations.d.ts +2 -59
- package/dist/esm/api/beta/evaluators/operations.d.ts.map +1 -1
- package/dist/esm/api/beta/evaluators/operations.js +1 -388
- package/dist/esm/api/beta/evaluators/operations.js.map +1 -1
- package/dist/esm/api/beta/evaluators/options.d.ts +0 -84
- package/dist/esm/api/beta/evaluators/options.d.ts.map +1 -1
- package/dist/esm/api/beta/evaluators/options.js.map +1 -1
- package/dist/esm/api/beta/models/operations.d.ts +1 -2
- package/dist/esm/api/beta/models/operations.d.ts.map +1 -1
- package/dist/esm/api/beta/models/operations.js +0 -59
- package/dist/esm/api/beta/models/operations.js.map +1 -1
- package/dist/esm/api/beta/models/uploads.d.ts +5 -0
- package/dist/esm/api/beta/models/uploads.d.ts.map +1 -0
- package/dist/esm/api/beta/models/uploads.js +63 -0
- package/dist/esm/api/beta/models/uploads.js.map +1 -0
- package/dist/esm/api/datasets/index.d.ts +2 -2
- package/dist/esm/api/datasets/index.d.ts.map +1 -1
- package/dist/esm/api/datasets/index.js +1 -1
- package/dist/esm/api/datasets/index.js.map +1 -1
- package/dist/esm/api/datasets/operations.d.ts +24 -5
- package/dist/esm/api/datasets/operations.d.ts.map +1 -1
- package/dist/esm/api/datasets/operations.js +193 -130
- package/dist/esm/api/datasets/operations.js.map +1 -1
- package/dist/esm/api/datasets/options.d.ts +52 -0
- package/dist/esm/api/datasets/options.d.ts.map +1 -1
- package/dist/esm/api/datasets/options.js.map +1 -1
- package/dist/esm/api/datasets/uploads.d.ts +5 -0
- package/dist/esm/api/datasets/uploads.d.ts.map +1 -0
- package/dist/esm/api/datasets/uploads.js +133 -0
- package/dist/esm/api/datasets/uploads.js.map +1 -0
- package/dist/esm/api/evaluators/index.d.ts +3 -0
- package/dist/esm/api/evaluators/index.d.ts.map +1 -0
- package/dist/esm/api/evaluators/index.js +4 -0
- package/dist/esm/api/evaluators/index.js.map +1 -0
- package/dist/esm/api/evaluators/operations.d.ts +62 -0
- package/dist/esm/api/evaluators/operations.d.ts.map +1 -0
- package/dist/esm/api/evaluators/operations.js +373 -0
- package/dist/esm/api/evaluators/operations.js.map +1 -0
- package/dist/esm/api/evaluators/options.d.ts +70 -0
- package/dist/esm/api/evaluators/options.d.ts.map +1 -0
- package/dist/esm/api/evaluators/options.js.map +1 -0
- package/dist/esm/classic/agents/index.d.ts +21 -2
- package/dist/esm/classic/agents/index.d.ts.map +1 -1
- package/dist/esm/classic/agents/index.js +10 -1
- package/dist/esm/classic/agents/index.js.map +1 -1
- package/dist/esm/classic/beta/agents/index.d.ts +2 -14
- package/dist/esm/classic/beta/agents/index.d.ts.map +1 -1
- package/dist/esm/classic/beta/agents/index.js +2 -10
- package/dist/esm/classic/beta/agents/index.js.map +1 -1
- package/dist/esm/classic/beta/evaluators/index.d.ts +3 -38
- package/dist/esm/classic/beta/evaluators/index.d.ts.map +1 -1
- package/dist/esm/classic/beta/evaluators/index.js +2 -18
- package/dist/esm/classic/beta/evaluators/index.js.map +1 -1
- package/dist/esm/classic/beta/index.d.ts +0 -3
- package/dist/esm/classic/beta/index.d.ts.map +1 -1
- package/dist/esm/classic/beta/index.js +0 -3
- package/dist/esm/classic/beta/index.js.map +1 -1
- package/dist/esm/classic/beta/models/index.d.ts +1 -1
- package/dist/esm/classic/beta/models/index.d.ts.map +1 -1
- package/dist/esm/classic/beta/models/index.js +2 -1
- package/dist/esm/classic/beta/models/index.js.map +1 -1
- package/dist/esm/classic/datasets/index.d.ts +15 -4
- package/dist/esm/classic/datasets/index.d.ts.map +1 -1
- package/dist/esm/classic/datasets/index.js +7 -1
- package/dist/esm/classic/datasets/index.js.map +1 -1
- package/dist/esm/classic/evaluators/index.d.ts +43 -0
- package/dist/esm/classic/evaluators/index.d.ts.map +1 -0
- package/dist/esm/classic/evaluators/index.js +19 -0
- package/dist/esm/classic/evaluators/index.js.map +1 -0
- package/dist/esm/classic/index.d.ts +1 -1
- package/dist/esm/classic/index.d.ts.map +1 -1
- package/dist/esm/classic/index.js.map +1 -1
- package/dist/esm/constants.d.ts +1 -1
- package/dist/esm/constants.js +1 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/index.d.ts +10 -17
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models/index.d.ts +1 -3
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/models.d.ts +880 -380
- package/dist/esm/models/models.d.ts.map +1 -1
- package/dist/esm/models/models.js +1424 -534
- package/dist/esm/models/models.js.map +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/esm/realtime/voiceAgentRealtimeClient.d.ts +24 -2
- package/dist/esm/realtime/voiceAgentRealtimeClient.d.ts.map +1 -1
- package/dist/esm/realtime/voiceAgentRealtimeClient.js +60 -11
- package/dist/esm/realtime/voiceAgentRealtimeClient.js.map +1 -1
- package/dist/react-native/aiProjectClient.d.ts +4 -0
- package/dist/react-native/aiProjectClient.d.ts.map +1 -1
- package/dist/react-native/aiProjectClient.js +5 -0
- package/dist/react-native/aiProjectClient.js.map +1 -1
- package/dist/react-native/api/agents/index.d.ts +2 -2
- package/dist/react-native/api/agents/index.d.ts.map +1 -1
- package/dist/react-native/api/agents/index.js +1 -1
- package/dist/react-native/api/agents/index.js.map +1 -1
- package/dist/react-native/api/agents/operations.d.ts +41 -4
- package/dist/react-native/api/agents/operations.d.ts.map +1 -1
- package/dist/react-native/api/agents/operations.js +322 -21
- package/dist/react-native/api/agents/operations.js.map +1 -1
- package/dist/react-native/api/agents/options.d.ts +163 -93
- package/dist/react-native/api/agents/options.d.ts.map +1 -1
- package/dist/react-native/api/agents/options.js.map +1 -1
- package/dist/react-native/api/beta/agents/index.d.ts +2 -2
- package/dist/react-native/api/beta/agents/index.d.ts.map +1 -1
- package/dist/react-native/api/beta/agents/index.js +1 -1
- package/dist/react-native/api/beta/agents/index.js.map +1 -1
- package/dist/react-native/api/beta/agents/operations.d.ts +2 -24
- package/dist/react-native/api/beta/agents/operations.d.ts.map +1 -1
- package/dist/react-native/api/beta/agents/operations.js +3 -185
- package/dist/react-native/api/beta/agents/operations.js.map +1 -1
- package/dist/react-native/api/beta/agents/options.d.ts +0 -56
- package/dist/react-native/api/beta/agents/options.d.ts.map +1 -1
- package/dist/react-native/api/beta/agents/options.js.map +1 -1
- package/dist/react-native/api/beta/evaluators/index.d.ts +2 -2
- package/dist/react-native/api/beta/evaluators/index.d.ts.map +1 -1
- package/dist/react-native/api/beta/evaluators/index.js +1 -1
- package/dist/react-native/api/beta/evaluators/index.js.map +1 -1
- package/dist/react-native/api/beta/evaluators/operations.d.ts +2 -59
- package/dist/react-native/api/beta/evaluators/operations.d.ts.map +1 -1
- package/dist/react-native/api/beta/evaluators/operations.js +1 -388
- package/dist/react-native/api/beta/evaluators/operations.js.map +1 -1
- package/dist/react-native/api/beta/evaluators/options.d.ts +0 -84
- package/dist/react-native/api/beta/evaluators/options.d.ts.map +1 -1
- package/dist/react-native/api/beta/evaluators/options.js.map +1 -1
- package/dist/react-native/api/beta/models/operations.d.ts +1 -2
- package/dist/react-native/api/beta/models/operations.d.ts.map +1 -1
- package/dist/react-native/api/beta/models/operations.js +0 -59
- package/dist/react-native/api/beta/models/operations.js.map +1 -1
- package/dist/react-native/api/beta/models/uploads-browser.d.mts +5 -0
- package/dist/react-native/api/beta/models/uploads-browser.d.mts.map +1 -0
- package/dist/react-native/api/beta/models/uploads-browser.mjs +6 -0
- package/dist/react-native/api/beta/models/uploads-browser.mjs.map +1 -0
- package/dist/react-native/api/beta/models/uploads.d.ts +2 -0
- package/dist/react-native/api/beta/models/uploads.d.ts.map +1 -0
- package/dist/react-native/api/beta/models/uploads.js +4 -0
- package/dist/react-native/api/beta/models/uploads.js.map +1 -0
- package/dist/react-native/api/datasets/index.d.ts +2 -2
- package/dist/react-native/api/datasets/index.d.ts.map +1 -1
- package/dist/react-native/api/datasets/index.js +1 -1
- package/dist/react-native/api/datasets/index.js.map +1 -1
- package/dist/react-native/api/datasets/operations.d.ts +24 -5
- package/dist/react-native/api/datasets/operations.d.ts.map +1 -1
- package/dist/react-native/api/datasets/operations.js +193 -130
- package/dist/react-native/api/datasets/operations.js.map +1 -1
- package/dist/react-native/api/datasets/options.d.ts +52 -0
- package/dist/react-native/api/datasets/options.d.ts.map +1 -1
- package/dist/react-native/api/datasets/options.js.map +1 -1
- package/dist/react-native/api/datasets/uploads-browser.d.mts +5 -0
- package/dist/react-native/api/datasets/uploads-browser.d.mts.map +1 -0
- package/dist/react-native/api/datasets/uploads-browser.mjs +9 -0
- package/dist/react-native/api/datasets/uploads-browser.mjs.map +1 -0
- package/dist/react-native/api/datasets/uploads.d.ts +2 -0
- package/dist/react-native/api/datasets/uploads.d.ts.map +1 -0
- package/dist/react-native/api/datasets/uploads.js +4 -0
- package/dist/react-native/api/datasets/uploads.js.map +1 -0
- package/dist/react-native/api/evaluators/index.d.ts +3 -0
- package/dist/react-native/api/evaluators/index.d.ts.map +1 -0
- package/dist/react-native/api/evaluators/index.js +4 -0
- package/dist/react-native/api/evaluators/index.js.map +1 -0
- package/dist/react-native/api/evaluators/operations.d.ts +62 -0
- package/dist/react-native/api/evaluators/operations.d.ts.map +1 -0
- package/dist/react-native/api/evaluators/operations.js +373 -0
- package/dist/react-native/api/evaluators/operations.js.map +1 -0
- package/dist/react-native/api/evaluators/options.d.ts +70 -0
- package/dist/react-native/api/evaluators/options.d.ts.map +1 -0
- package/dist/react-native/api/evaluators/options.js.map +1 -0
- package/dist/react-native/classic/agents/index.d.ts +21 -2
- package/dist/react-native/classic/agents/index.d.ts.map +1 -1
- package/dist/react-native/classic/agents/index.js +10 -1
- package/dist/react-native/classic/agents/index.js.map +1 -1
- package/dist/react-native/classic/beta/agents/index.d.ts +2 -14
- package/dist/react-native/classic/beta/agents/index.d.ts.map +1 -1
- package/dist/react-native/classic/beta/agents/index.js +2 -10
- package/dist/react-native/classic/beta/agents/index.js.map +1 -1
- package/dist/react-native/classic/beta/evaluators/index.d.ts +3 -38
- package/dist/react-native/classic/beta/evaluators/index.d.ts.map +1 -1
- package/dist/react-native/classic/beta/evaluators/index.js +2 -18
- package/dist/react-native/classic/beta/evaluators/index.js.map +1 -1
- package/dist/react-native/classic/beta/index.d.ts +0 -3
- package/dist/react-native/classic/beta/index.d.ts.map +1 -1
- package/dist/react-native/classic/beta/index.js +0 -3
- package/dist/react-native/classic/beta/index.js.map +1 -1
- package/dist/react-native/classic/beta/models/index.d.ts +1 -1
- package/dist/react-native/classic/beta/models/index.d.ts.map +1 -1
- package/dist/react-native/classic/beta/models/index.js +2 -1
- package/dist/react-native/classic/beta/models/index.js.map +1 -1
- package/dist/react-native/classic/datasets/index.d.ts +15 -4
- package/dist/react-native/classic/datasets/index.d.ts.map +1 -1
- package/dist/react-native/classic/datasets/index.js +7 -1
- package/dist/react-native/classic/datasets/index.js.map +1 -1
- package/dist/react-native/classic/evaluators/index.d.ts +43 -0
- package/dist/react-native/classic/evaluators/index.d.ts.map +1 -0
- package/dist/react-native/classic/evaluators/index.js +19 -0
- package/dist/react-native/classic/evaluators/index.js.map +1 -0
- package/dist/react-native/classic/index.d.ts +1 -1
- package/dist/react-native/classic/index.d.ts.map +1 -1
- package/dist/react-native/classic/index.js.map +1 -1
- package/dist/react-native/constants.d.ts +1 -1
- package/dist/react-native/constants.js +1 -1
- package/dist/react-native/constants.js.map +1 -1
- package/dist/react-native/index.d.ts +10 -17
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +1 -2
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/models/index.d.ts +1 -3
- package/dist/react-native/models/index.d.ts.map +1 -1
- package/dist/react-native/models/index.js.map +1 -1
- package/dist/react-native/models/models.d.ts +880 -380
- package/dist/react-native/models/models.d.ts.map +1 -1
- package/dist/react-native/models/models.js +1424 -534
- package/dist/react-native/models/models.js.map +1 -1
- package/dist/react-native/package.json +1 -1
- package/dist/react-native/realtime/voiceAgentRealtimeClient.d.ts +24 -2
- package/dist/react-native/realtime/voiceAgentRealtimeClient.d.ts.map +1 -1
- package/dist/react-native/realtime/voiceAgentRealtimeClient.js +60 -11
- package/dist/react-native/realtime/voiceAgentRealtimeClient.js.map +1 -1
- package/dist/react-native/webSocketTransport-browser.d.mts +1 -0
- package/dist/react-native/webSocketTransport-browser.d.mts.map +1 -1
- package/dist/react-native/webSocketTransport-browser.mjs +5 -13
- package/dist/react-native/webSocketTransport-browser.mjs.map +1 -1
- package/package.json +8 -5
- package/dist/browser/api/beta/datasets/index.d.ts +0 -3
- package/dist/browser/api/beta/datasets/index.d.ts.map +0 -1
- package/dist/browser/api/beta/datasets/index.js +0 -4
- package/dist/browser/api/beta/datasets/index.js.map +0 -1
- package/dist/browser/api/beta/datasets/operations.d.ts +0 -27
- package/dist/browser/api/beta/datasets/operations.d.ts.map +0 -1
- package/dist/browser/api/beta/datasets/operations.js +0 -184
- package/dist/browser/api/beta/datasets/operations.js.map +0 -1
- package/dist/browser/api/beta/datasets/options.d.ts +0 -58
- package/dist/browser/api/beta/datasets/options.d.ts.map +0 -1
- package/dist/browser/api/beta/datasets/options.js.map +0 -1
- package/dist/browser/classic/beta/datasets/index.d.ts +0 -20
- package/dist/browser/classic/beta/datasets/index.d.ts.map +0 -1
- package/dist/browser/classic/beta/datasets/index.js +0 -18
- package/dist/browser/classic/beta/datasets/index.js.map +0 -1
- package/dist/commonjs/api/beta/datasets/index.d.ts +0 -3
- package/dist/commonjs/api/beta/datasets/index.d.ts.map +0 -1
- package/dist/commonjs/api/beta/datasets/index.js.map +0 -7
- package/dist/commonjs/api/beta/datasets/operations.d.ts +0 -27
- package/dist/commonjs/api/beta/datasets/operations.d.ts.map +0 -1
- package/dist/commonjs/api/beta/datasets/operations.js +0 -259
- package/dist/commonjs/api/beta/datasets/operations.js.map +0 -7
- package/dist/commonjs/api/beta/datasets/options.d.ts +0 -58
- package/dist/commonjs/api/beta/datasets/options.d.ts.map +0 -1
- package/dist/commonjs/api/beta/datasets/options.js.map +0 -7
- package/dist/commonjs/classic/beta/datasets/index.d.ts +0 -20
- package/dist/commonjs/classic/beta/datasets/index.d.ts.map +0 -1
- package/dist/commonjs/classic/beta/datasets/index.js.map +0 -7
- package/dist/esm/api/beta/datasets/index.d.ts +0 -3
- package/dist/esm/api/beta/datasets/index.d.ts.map +0 -1
- package/dist/esm/api/beta/datasets/index.js +0 -4
- package/dist/esm/api/beta/datasets/index.js.map +0 -1
- package/dist/esm/api/beta/datasets/operations.d.ts +0 -27
- package/dist/esm/api/beta/datasets/operations.d.ts.map +0 -1
- package/dist/esm/api/beta/datasets/operations.js +0 -184
- package/dist/esm/api/beta/datasets/operations.js.map +0 -1
- package/dist/esm/api/beta/datasets/options.d.ts +0 -58
- package/dist/esm/api/beta/datasets/options.d.ts.map +0 -1
- package/dist/esm/api/beta/datasets/options.js.map +0 -1
- package/dist/esm/classic/beta/datasets/index.d.ts +0 -20
- package/dist/esm/classic/beta/datasets/index.d.ts.map +0 -1
- package/dist/esm/classic/beta/datasets/index.js +0 -18
- package/dist/esm/classic/beta/datasets/index.js.map +0 -1
- package/dist/react-native/api/beta/datasets/index.d.ts +0 -3
- package/dist/react-native/api/beta/datasets/index.d.ts.map +0 -1
- package/dist/react-native/api/beta/datasets/index.js +0 -4
- package/dist/react-native/api/beta/datasets/index.js.map +0 -1
- package/dist/react-native/api/beta/datasets/operations.d.ts +0 -27
- package/dist/react-native/api/beta/datasets/operations.d.ts.map +0 -1
- package/dist/react-native/api/beta/datasets/operations.js +0 -184
- package/dist/react-native/api/beta/datasets/operations.js.map +0 -1
- package/dist/react-native/api/beta/datasets/options.d.ts +0 -58
- package/dist/react-native/api/beta/datasets/options.d.ts.map +0 -1
- package/dist/react-native/api/beta/datasets/options.js.map +0 -1
- package/dist/react-native/classic/beta/datasets/index.d.ts +0 -20
- package/dist/react-native/classic/beta/datasets/index.d.ts.map +0 -1
- package/dist/react-native/classic/beta/datasets/index.js +0 -18
- package/dist/react-native/classic/beta/datasets/index.js.map +0 -1
- /package/dist/browser/api/{beta/datasets → evaluators}/options.js +0 -0
- /package/dist/commonjs/api/{beta/datasets → evaluators}/options.js +0 -0
- /package/dist/esm/api/{beta/datasets → evaluators}/options.js +0 -0
- /package/dist/react-native/api/{beta/datasets → evaluators}/options.js +0 -0
|
@@ -1,13 +1,201 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
import
|
|
4
|
-
import nodePath from "node:path";
|
|
5
|
-
import { _pagedDatasetVersionDeserializer, datasetVersionUnionSerializer, datasetVersionUnionDeserializer, pendingUploadRequestSerializer, pendingUploadResponseDeserializer, datasetCredentialDeserializer, } from "../../models/models.js";
|
|
3
|
+
import { apiErrorResponseDeserializer, dataGenerationJobUnionDeserializer, dataGenerationJobResultDeserializer, _agentsPagedResultDataGenerationJobDeserializer, dataGenerationJobInputsUnionSerializer, _pagedDatasetVersionDeserializer, datasetVersionUnionSerializer, datasetVersionUnionDeserializer, pendingUploadRequestSerializer, pendingUploadResponseDeserializer, datasetCredentialDeserializer, } from "../../models/models.js";
|
|
6
4
|
import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js";
|
|
7
5
|
import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
|
|
8
6
|
import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client";
|
|
9
|
-
import {
|
|
10
|
-
|
|
7
|
+
import { getJobPoller } from "../../static-helpers/pollingHelpers.js";
|
|
8
|
+
export function _deleteGenerationJobSend(context, jobId, options = { requestOptions: {} }) {
|
|
9
|
+
const path = expandUrlTemplate("/data_generation_jobs/{jobId}{?api-version}", {
|
|
10
|
+
jobId: jobId,
|
|
11
|
+
"api-version": context.apiVersion ?? "v1",
|
|
12
|
+
}, {
|
|
13
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
14
|
+
});
|
|
15
|
+
return context.path(path).delete({
|
|
16
|
+
...operationOptionsToRequestParameters(options),
|
|
17
|
+
headers: {
|
|
18
|
+
"foundry-features": "DataGenerationJobs=V1Preview",
|
|
19
|
+
...options.requestOptions?.headers,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export async function _deleteGenerationJobDeserialize(result) {
|
|
24
|
+
const expectedStatuses = ["204"];
|
|
25
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
26
|
+
const error = createRestError(result);
|
|
27
|
+
if (result.body) {
|
|
28
|
+
error.details = apiErrorResponseDeserializer(result.body);
|
|
29
|
+
}
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
/** Removes the specified data generation job and its associated output. */
|
|
35
|
+
export async function deleteGenerationJob(context, jobId, options = { requestOptions: {} }) {
|
|
36
|
+
const result = await _deleteGenerationJobSend(context, jobId, options);
|
|
37
|
+
return _deleteGenerationJobDeserialize(result);
|
|
38
|
+
}
|
|
39
|
+
export function _cancelGenerationJobSend(context, jobId, options = { requestOptions: {} }) {
|
|
40
|
+
const path = expandUrlTemplate("/data_generation_jobs/{jobId}:cancel{?api-version}", {
|
|
41
|
+
jobId: jobId,
|
|
42
|
+
"api-version": context.apiVersion ?? "v1",
|
|
43
|
+
}, {
|
|
44
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
45
|
+
});
|
|
46
|
+
return context.path(path).post({
|
|
47
|
+
...operationOptionsToRequestParameters(options),
|
|
48
|
+
headers: {
|
|
49
|
+
"foundry-features": "DataGenerationJobs=V1Preview",
|
|
50
|
+
accept: "application/json",
|
|
51
|
+
...options.requestOptions?.headers,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
export async function _cancelGenerationJobDeserialize(result) {
|
|
56
|
+
const expectedStatuses = ["200"];
|
|
57
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
58
|
+
const error = createRestError(result);
|
|
59
|
+
if (result.body) {
|
|
60
|
+
error.details = apiErrorResponseDeserializer(result.body);
|
|
61
|
+
}
|
|
62
|
+
throw error;
|
|
63
|
+
}
|
|
64
|
+
return dataGenerationJobUnionDeserializer(result.body);
|
|
65
|
+
}
|
|
66
|
+
/** Cancels the specified data generation job if it is still in progress. */
|
|
67
|
+
export async function cancelGenerationJob(context, jobId, options = { requestOptions: {} }) {
|
|
68
|
+
const result = await _cancelGenerationJobSend(context, jobId, options);
|
|
69
|
+
return _cancelGenerationJobDeserialize(result);
|
|
70
|
+
}
|
|
71
|
+
export function _createGenerationJobSend(context, job, options = { requestOptions: {} }) {
|
|
72
|
+
const path = expandUrlTemplate("/data_generation_jobs{?api-version}", {
|
|
73
|
+
"api-version": context.apiVersion ?? "v1",
|
|
74
|
+
}, {
|
|
75
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
76
|
+
});
|
|
77
|
+
return context.path(path).post({
|
|
78
|
+
...operationOptionsToRequestParameters(options),
|
|
79
|
+
contentType: "application/json",
|
|
80
|
+
headers: {
|
|
81
|
+
"foundry-features": "DataGenerationJobs=V1Preview",
|
|
82
|
+
...(options?.operationId !== undefined ? { "operation-id": options?.operationId } : {}),
|
|
83
|
+
accept: "application/json",
|
|
84
|
+
...options.requestOptions?.headers,
|
|
85
|
+
},
|
|
86
|
+
body: dataGenerationJobInputsUnionSerializer(job),
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
export async function _createGenerationJobDeserialize(result) {
|
|
90
|
+
const expectedStatuses = ["201", "200", "202"];
|
|
91
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
92
|
+
const error = createRestError(result);
|
|
93
|
+
if (result.body) {
|
|
94
|
+
error.details = apiErrorResponseDeserializer(result.body);
|
|
95
|
+
}
|
|
96
|
+
throw error;
|
|
97
|
+
}
|
|
98
|
+
if (result?.body?.result === undefined) {
|
|
99
|
+
throw createRestError(`Expected a result in the response at position "result.body.result"`, result);
|
|
100
|
+
}
|
|
101
|
+
return dataGenerationJobResultDeserializer(result.body.result);
|
|
102
|
+
}
|
|
103
|
+
/** Submits a new data generation job for asynchronous execution. */
|
|
104
|
+
export function createGenerationJob(context, job, options = { requestOptions: {} }) {
|
|
105
|
+
// CUSTOMIZATION: SDK-IMPROVEMENT: `getJobPoller` exposes the queued job id on the poller state.
|
|
106
|
+
return getJobPoller(context, _createGenerationJobDeserialize, ["201", "200", "202"], {
|
|
107
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
108
|
+
abortSignal: options?.abortSignal,
|
|
109
|
+
getInitialResponse: () => _createGenerationJobSend(context, job, options),
|
|
110
|
+
resourceLocationConfig: "operation-location",
|
|
111
|
+
apiVersion: context.apiVersion ?? "v1",
|
|
112
|
+
pollHeaders: {
|
|
113
|
+
...options?.requestOptions?.headers,
|
|
114
|
+
"foundry-features": "DataGenerationJobs=V1Preview",
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
export function _listGenerationJobsSend(context, options = { requestOptions: {} }) {
|
|
119
|
+
const requestParameters = operationOptionsToRequestParameters(options);
|
|
120
|
+
const path = expandUrlTemplate("/data_generation_jobs{?after,api-version,before,limit,order}", {
|
|
121
|
+
limit: options?.limit,
|
|
122
|
+
order: options?.order,
|
|
123
|
+
after: options?.after,
|
|
124
|
+
before: options?.before,
|
|
125
|
+
"api-version": context.apiVersion ?? "v1",
|
|
126
|
+
}, {
|
|
127
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
128
|
+
});
|
|
129
|
+
return context.path(path).get({
|
|
130
|
+
...requestParameters,
|
|
131
|
+
headers: {
|
|
132
|
+
"foundry-features": "DataGenerationJobs=V1Preview",
|
|
133
|
+
accept: "application/json",
|
|
134
|
+
...requestParameters.headers,
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
export async function _listGenerationJobsDeserialize(result) {
|
|
139
|
+
const expectedStatuses = ["200"];
|
|
140
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
141
|
+
const error = createRestError(result);
|
|
142
|
+
if (result.body) {
|
|
143
|
+
error.details = apiErrorResponseDeserializer(result.body);
|
|
144
|
+
}
|
|
145
|
+
throw error;
|
|
146
|
+
}
|
|
147
|
+
return _agentsPagedResultDataGenerationJobDeserializer(result.body);
|
|
148
|
+
}
|
|
149
|
+
/** Returns a list of data generation jobs. */
|
|
150
|
+
export function listGenerationJobs(context, options = { requestOptions: {} }) {
|
|
151
|
+
const requestParameters = operationOptionsToRequestParameters(options);
|
|
152
|
+
return buildPagedAsyncIterator(context, () => _listGenerationJobsSend(context, options), _listGenerationJobsDeserialize, ["200"], {
|
|
153
|
+
itemName: "data",
|
|
154
|
+
apiVersion: context.apiVersion ?? "v1",
|
|
155
|
+
cursorFieldName: "last_id",
|
|
156
|
+
hasMoreFieldName: "has_more",
|
|
157
|
+
nextPageRequestOptions: {
|
|
158
|
+
...requestParameters,
|
|
159
|
+
headers: {
|
|
160
|
+
"foundry-features": "DataGenerationJobs=V1Preview",
|
|
161
|
+
accept: "application/json",
|
|
162
|
+
...requestParameters.headers,
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
export function _getGenerationJobSend(context, jobId, options = { requestOptions: {} }) {
|
|
168
|
+
const path = expandUrlTemplate("/data_generation_jobs/{jobId}{?api-version}", {
|
|
169
|
+
jobId: jobId,
|
|
170
|
+
"api-version": context.apiVersion ?? "v1",
|
|
171
|
+
}, {
|
|
172
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
173
|
+
});
|
|
174
|
+
return context.path(path).get({
|
|
175
|
+
...operationOptionsToRequestParameters(options),
|
|
176
|
+
headers: {
|
|
177
|
+
"foundry-features": "DataGenerationJobs=V1Preview",
|
|
178
|
+
accept: "application/json",
|
|
179
|
+
...options.requestOptions?.headers,
|
|
180
|
+
},
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
export async function _getGenerationJobDeserialize(result) {
|
|
184
|
+
const expectedStatuses = ["200"];
|
|
185
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
186
|
+
const error = createRestError(result);
|
|
187
|
+
if (result.body) {
|
|
188
|
+
error.details = apiErrorResponseDeserializer(result.body);
|
|
189
|
+
}
|
|
190
|
+
throw error;
|
|
191
|
+
}
|
|
192
|
+
return dataGenerationJobUnionDeserializer(result.body);
|
|
193
|
+
}
|
|
194
|
+
/** Retrieves the specified data generation job and its current status. */
|
|
195
|
+
export async function getGenerationJob(context, jobId, options = { requestOptions: {} }) {
|
|
196
|
+
const result = await _getGenerationJobSend(context, jobId, options);
|
|
197
|
+
return _getGenerationJobDeserialize(result);
|
|
198
|
+
}
|
|
11
199
|
export function _getCredentialsSend(context, name, version, options = { requestOptions: {} }) {
|
|
12
200
|
const path = expandUrlTemplate("/datasets/{name}/versions/{version}/credentials{?api-version}", {
|
|
13
201
|
name: name,
|
|
@@ -197,129 +385,4 @@ export async function _listVersionsDeserialize(result) {
|
|
|
197
385
|
export function listVersions(context, name, options = { requestOptions: {} }) {
|
|
198
386
|
return buildPagedAsyncIterator(context, () => _listVersionsSend(context, name, options), _listVersionsDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink", apiVersion: context.apiVersion });
|
|
199
387
|
}
|
|
200
|
-
// Internal helper method to create a new dataset and return a ContainerClient from azure-storage-blob package, to the dataset's blob storage.
|
|
201
|
-
async function createDatasetAndGetItsContainer(context, name, version, options) {
|
|
202
|
-
const { connectionName, projectOptions = {} } = options || {};
|
|
203
|
-
// Start a pending upload to get the container URL with SAS token
|
|
204
|
-
const pendingUploadResponse = await pendingUpload(context, name, version, {
|
|
205
|
-
pendingUploadType: "BlobReference",
|
|
206
|
-
connectionName,
|
|
207
|
-
});
|
|
208
|
-
const blobReference = pendingUploadResponse.blobReference;
|
|
209
|
-
// Validate the response
|
|
210
|
-
if (!blobReference) {
|
|
211
|
-
throw new Error("Blob reference for consumption is not present");
|
|
212
|
-
}
|
|
213
|
-
if (!blobReference.credential?.type) {
|
|
214
|
-
throw new Error("Credential type is not present");
|
|
215
|
-
}
|
|
216
|
-
if (blobReference.credential.type !== "SAS") {
|
|
217
|
-
throw new Error("Credential type is not SAS");
|
|
218
|
-
}
|
|
219
|
-
if (!blobReference.blobUri) {
|
|
220
|
-
throw new Error("Blob URI is not present or empty");
|
|
221
|
-
}
|
|
222
|
-
// Log metadata only; upload URLs can contain credentials.
|
|
223
|
-
logger.verbose(`[createDatasetAndGetItsContainer] pendingUploadResponse.pendingUploadId = ${pendingUploadResponse.pendingUploadId}`);
|
|
224
|
-
logger.verbose(`[createDatasetAndGetItsContainer] pendingUploadResponse.pendingUploadType = ${pendingUploadResponse.pendingUploadType}`);
|
|
225
|
-
logger.verbose(`[createDatasetAndGetItsContainer] blobReference.storageAccountArmId = ${blobReference.storageAccountArmId}`);
|
|
226
|
-
logger.verbose(`[createDatasetAndGetItsContainer] blobReference.credential.type = ${blobReference.credential.type}`);
|
|
227
|
-
// Create container client from the blob URI (which includes the SAS token)
|
|
228
|
-
const containerClient = new ContainerClient(blobReference.credential.sasUri);
|
|
229
|
-
const pipeline = containerClient["storageClientContext"].pipeline;
|
|
230
|
-
for (const { policy } of projectOptions.additionalPolicies ?? []) {
|
|
231
|
-
pipeline.addPolicy(policy, { afterPhase: "Sign" });
|
|
232
|
-
}
|
|
233
|
-
return {
|
|
234
|
-
containerClient,
|
|
235
|
-
version,
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
export async function uploadFile(context, name, version, filePath, options) {
|
|
239
|
-
// if file does not exist
|
|
240
|
-
const fileExists = fs.existsSync(filePath);
|
|
241
|
-
if (!fileExists) {
|
|
242
|
-
throw new Error(`File does not exist at path: ${filePath}`);
|
|
243
|
-
}
|
|
244
|
-
// Check if the file is a directory
|
|
245
|
-
const isDirectory = fs.lstatSync(filePath).isDirectory();
|
|
246
|
-
if (isDirectory) {
|
|
247
|
-
throw new Error(`The provided file is actually a folder. Use method uploadFolder instead`);
|
|
248
|
-
}
|
|
249
|
-
const { containerClient, version: outputVersion } = await createDatasetAndGetItsContainer(context, name, version, options);
|
|
250
|
-
// file name as blob name
|
|
251
|
-
const blobName = nodePath.basename(filePath);
|
|
252
|
-
const blockBlobClient = containerClient.getBlockBlobClient(blobName);
|
|
253
|
-
await blockBlobClient.uploadStream(fs.createReadStream(filePath));
|
|
254
|
-
const datasetVersion = await createOrUpdate(context, name, outputVersion, {
|
|
255
|
-
name: name,
|
|
256
|
-
version: outputVersion,
|
|
257
|
-
type: "uri_file",
|
|
258
|
-
dataUri: blockBlobClient.url,
|
|
259
|
-
});
|
|
260
|
-
return datasetVersion;
|
|
261
|
-
}
|
|
262
|
-
export async function uploadFolder(context, name, version, folderPath, options) {
|
|
263
|
-
// Check if the folder exists
|
|
264
|
-
const folderExists = fs.existsSync(folderPath);
|
|
265
|
-
if (!folderExists) {
|
|
266
|
-
throw new Error(`Folder does not exist at path: ${folderPath}`);
|
|
267
|
-
}
|
|
268
|
-
// Check if the folder is a file
|
|
269
|
-
const isFile = fs.lstatSync(folderPath).isFile();
|
|
270
|
-
if (isFile) {
|
|
271
|
-
throw new Error(`The provided path is actually a file. Use method uploadFile instead`);
|
|
272
|
-
}
|
|
273
|
-
const { containerClient, version: outputVersion } = await createDatasetAndGetItsContainer(context, name, version, options);
|
|
274
|
-
// Helper function to recursively get all files in a directory
|
|
275
|
-
async function getAllFiles(dir, fileList = []) {
|
|
276
|
-
const files = await fs.promises.readdir(dir);
|
|
277
|
-
for (const file of files) {
|
|
278
|
-
const filePath = `${dir}/${file}`;
|
|
279
|
-
const stat = await fs.promises.lstat(filePath);
|
|
280
|
-
if (stat.isDirectory()) {
|
|
281
|
-
await getAllFiles(filePath, fileList);
|
|
282
|
-
}
|
|
283
|
-
else {
|
|
284
|
-
fileList.push(filePath);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
return fileList;
|
|
288
|
-
}
|
|
289
|
-
// Get all files in the folder
|
|
290
|
-
const allFiles = await getAllFiles(folderPath);
|
|
291
|
-
let filteredFiles = allFiles;
|
|
292
|
-
if (options?.filePattern) {
|
|
293
|
-
try {
|
|
294
|
-
const filePattern = new RegExp(options.filePattern);
|
|
295
|
-
filteredFiles = allFiles.filter((file) => filePattern.test(file));
|
|
296
|
-
}
|
|
297
|
-
catch {
|
|
298
|
-
// If regex pattern is invalid, ignore the pattern and upload all files
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
if (filteredFiles.length === 0) {
|
|
302
|
-
throw new Error("The provided folder is empty.");
|
|
303
|
-
}
|
|
304
|
-
// Upload each file to blob storage while maintaining relative paths
|
|
305
|
-
for (const filePath of filteredFiles) {
|
|
306
|
-
// Create blob name as relative path from the base folder
|
|
307
|
-
const relativePath = nodePath.relative(folderPath, filePath).split(nodePath.sep).join("/");
|
|
308
|
-
logger.verbose(`[uploadFolderAndCreate] Start uploading file '${filePath}' as blob '${relativePath}'`);
|
|
309
|
-
// Get a block blob client for the relative path
|
|
310
|
-
const blobClient = containerClient.getBlockBlobClient(relativePath);
|
|
311
|
-
// Upload the file using a readable stream for better performance
|
|
312
|
-
const fileStream = fs.createReadStream(filePath);
|
|
313
|
-
await blobClient.uploadStream(fileStream);
|
|
314
|
-
logger.verbose(`[uploadFolderAndCreate] Done uploading file '${filePath}' as blob '${relativePath}'`);
|
|
315
|
-
}
|
|
316
|
-
// Create dataset version that references this folder
|
|
317
|
-
const datasetVersion = await createOrUpdate(context, name, outputVersion, {
|
|
318
|
-
name: name,
|
|
319
|
-
version: outputVersion,
|
|
320
|
-
type: "uri_folder",
|
|
321
|
-
dataUri: containerClient.url,
|
|
322
|
-
});
|
|
323
|
-
return datasetVersion;
|
|
324
|
-
}
|
|
325
388
|
//# sourceMappingURL=operations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/datasets/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,QAAQ,MAAM,WAAW,CAAC;AASjC,OAAO,EACL,gCAAgC,EAChC,6BAA6B,EAC7B,+BAA+B,EAC/B,8BAA8B,EAC9B,iCAAiC,EACjC,6BAA6B,GAC9B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM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AAc,CAAC;AACxB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport fs from \"node:fs\";\nimport nodePath from \"node:path\";\nimport type { DatasetUploadInternalOptions, AIProjectContext as Client } from \"../index.js\";\nimport type {\n _PagedDatasetVersion,\n DatasetVersionUnion,\n PendingUploadRequest,\n PendingUploadResponse,\n DatasetCredential,\n} from \"../../models/models.js\";\nimport {\n _pagedDatasetVersionDeserializer,\n datasetVersionUnionSerializer,\n datasetVersionUnionDeserializer,\n pendingUploadRequestSerializer,\n pendingUploadResponseDeserializer,\n datasetCredentialDeserializer,\n} from \"../../models/models.js\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { buildPagedAsyncIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport type {\n DatasetsGetCredentialsOptionalParams,\n DatasetsPendingUploadOptionalParams,\n DatasetsCreateOrUpdateOptionalParams,\n DatasetsDeleteOptionalParams,\n DatasetsGetOptionalParams,\n DatasetsListOptionalParams,\n DatasetsListVersionsOptionalParams,\n} from \"./options.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\nimport { ContainerClient } from \"@azure/storage-blob\";\nimport { logger } from \"../../logger.js\";\nexport function _getCredentialsSend(\n context: Client,\n name: string,\n version: string,\n options: DatasetsGetCredentialsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/datasets/{name}/versions/{version}/credentials{?api-version}\",\n {\n name: name,\n version: version,\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 accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getCredentialsDeserialize(\n result: PathUncheckedResponse,\n): Promise<DatasetCredential> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return datasetCredentialDeserializer(result.body);\n}\n\n/** Get the SAS credential to access the storage account associated with a Dataset version. */\nexport async function getCredentials(\n context: Client,\n name: string,\n version: string,\n options: DatasetsGetCredentialsOptionalParams = { requestOptions: {} },\n): Promise<DatasetCredential> {\n const result = await _getCredentialsSend(context, name, version, options);\n return _getCredentialsDeserialize(result);\n}\n\nexport function _pendingUploadSend(\n context: Client,\n name: string,\n version: string,\n pendingUploadRequest: PendingUploadRequest,\n options: DatasetsPendingUploadOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/datasets/{name}/versions/{version}/startPendingUpload{?api-version}\",\n {\n name: name,\n version: version,\n \"api-version\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: pendingUploadRequestSerializer(pendingUploadRequest),\n });\n}\n\nexport async function _pendingUploadDeserialize(\n result: PathUncheckedResponse,\n): Promise<PendingUploadResponse> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return pendingUploadResponseDeserializer(result.body);\n}\n\n/** Start a new or get an existing pending upload of a dataset for a specific version. */\nexport async function pendingUpload(\n context: Client,\n name: string,\n version: string,\n pendingUploadRequest: PendingUploadRequest,\n options: DatasetsPendingUploadOptionalParams = { requestOptions: {} },\n): Promise<PendingUploadResponse> {\n const result = await _pendingUploadSend(context, name, version, pendingUploadRequest, options);\n return _pendingUploadDeserialize(result);\n}\n\nexport function _createOrUpdateSend(\n context: Client,\n name: string,\n version: string,\n datasetVersion: DatasetVersionUnion,\n options: DatasetsCreateOrUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/datasets/{name}/versions/{version}{?api-version}\",\n {\n name: name,\n version: version,\n \"api-version\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).patch({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/merge-patch+json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: datasetVersionUnionSerializer(datasetVersion),\n });\n}\n\nexport async function _createOrUpdateDeserialize(\n result: PathUncheckedResponse,\n): Promise<DatasetVersionUnion> {\n const expectedStatuses = [\"201\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return datasetVersionUnionDeserializer(result.body);\n}\n\n/** Create a new or update an existing DatasetVersion with the given version id */\nexport async function createOrUpdate(\n context: Client,\n name: string,\n version: string,\n datasetVersion: DatasetVersionUnion,\n options: DatasetsCreateOrUpdateOptionalParams = { requestOptions: {} },\n): Promise<DatasetVersionUnion> {\n const result = await _createOrUpdateSend(context, name, version, datasetVersion, options);\n return _createOrUpdateDeserialize(result);\n}\n\nexport function _$deleteSend(\n context: Client,\n name: string,\n version: string,\n options: DatasetsDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/datasets/{name}/versions/{version}{?api-version}\",\n {\n name: name,\n version: version,\n \"api-version\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"204\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return;\n}\n\n/** Delete the specific version of the DatasetVersion. The service returns 204 No Content if the DatasetVersion was deleted successfully or if the DatasetVersion does not exist. */\nexport async function $delete(\n context: Client,\n name: string,\n version: string,\n options: DatasetsDeleteOptionalParams = { requestOptions: {} },\n): Promise<void> {\n const result = await _$deleteSend(context, name, version, options);\n return _$deleteDeserialize(result);\n}\n\nexport function _getSend(\n context: Client,\n name: string,\n version: string,\n options: DatasetsGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/datasets/{name}/versions/{version}{?api-version}\",\n {\n name: name,\n version: version,\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 accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeserialize(result: PathUncheckedResponse): Promise<DatasetVersionUnion> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return datasetVersionUnionDeserializer(result.body);\n}\n\n/** Get the specific version of the DatasetVersion. The service returns 404 Not Found error if the DatasetVersion does not exist. */\nexport async function get(\n context: Client,\n name: string,\n version: string,\n options: DatasetsGetOptionalParams = { requestOptions: {} },\n): Promise<DatasetVersionUnion> {\n const result = await _getSend(context, name, version, options);\n return _getDeserialize(result);\n}\n\nexport function _listSend(\n context: Client,\n options: DatasetsListOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/datasets{?api-version}\",\n {\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 accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listDeserialize(\n result: PathUncheckedResponse,\n): Promise<_PagedDatasetVersion> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return _pagedDatasetVersionDeserializer(result.body);\n}\n\n/** List the latest version of each DatasetVersion */\nexport function list(\n context: Client,\n options: DatasetsListOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<DatasetVersionUnion> {\n return buildPagedAsyncIterator(\n context,\n () => _listSend(context, options),\n _listDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\", apiVersion: context.apiVersion },\n );\n}\n\nexport function _listVersionsSend(\n context: Client,\n name: string,\n options: DatasetsListVersionsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/datasets/{name}/versions{?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 accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listVersionsDeserialize(\n result: PathUncheckedResponse,\n): Promise<_PagedDatasetVersion> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return _pagedDatasetVersionDeserializer(result.body);\n}\n\n/** List all versions of the given DatasetVersion */\nexport function listVersions(\n context: Client,\n name: string,\n options: DatasetsListVersionsOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<DatasetVersionUnion> {\n return buildPagedAsyncIterator(\n context,\n () => _listVersionsSend(context, name, options),\n _listVersionsDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\", apiVersion: context.apiVersion },\n );\n}\n\n// Internal helper method to create a new dataset and return a ContainerClient from azure-storage-blob package, to the dataset's blob storage.\nasync function createDatasetAndGetItsContainer(\n context: Client,\n name: string,\n version: string,\n options?: DatasetUploadInternalOptions,\n): Promise<{ containerClient: ContainerClient; version: string }> {\n const { connectionName, projectOptions = {} } = options || {};\n // Start a pending upload to get the container URL with SAS token\n const pendingUploadResponse = await pendingUpload(context, name, version, {\n pendingUploadType: \"BlobReference\",\n connectionName,\n } as PendingUploadRequest);\n\n const blobReference = pendingUploadResponse.blobReference;\n // Validate the response\n if (!blobReference) {\n throw new Error(\"Blob reference for consumption is not present\");\n }\n\n if (!blobReference.credential?.type) {\n throw new Error(\"Credential type is not present\");\n }\n\n if (blobReference.credential.type !== \"SAS\") {\n throw new Error(\"Credential type is not SAS\");\n }\n\n if (!blobReference.blobUri) {\n throw new Error(\"Blob URI is not present or empty\");\n }\n\n // Log metadata only; upload URLs can contain credentials.\n logger.verbose(\n `[createDatasetAndGetItsContainer] pendingUploadResponse.pendingUploadId = ${pendingUploadResponse.pendingUploadId}`,\n );\n logger.verbose(\n `[createDatasetAndGetItsContainer] pendingUploadResponse.pendingUploadType = ${pendingUploadResponse.pendingUploadType}`,\n );\n logger.verbose(\n `[createDatasetAndGetItsContainer] blobReference.storageAccountArmId = ${blobReference.storageAccountArmId}`,\n );\n logger.verbose(\n `[createDatasetAndGetItsContainer] blobReference.credential.type = ${blobReference.credential.type}`,\n );\n\n // Create container client from the blob URI (which includes the SAS token)\n const containerClient = new ContainerClient(blobReference.credential.sasUri);\n\n const pipeline = containerClient[\"storageClientContext\"].pipeline;\n for (const { policy } of projectOptions.additionalPolicies ?? []) {\n pipeline.addPolicy(policy, { afterPhase: \"Sign\" });\n }\n\n return {\n containerClient,\n version,\n };\n}\n\nexport async function uploadFile(\n context: Client,\n name: string,\n version: string,\n filePath: string,\n options?: DatasetUploadInternalOptions,\n): Promise<DatasetVersionUnion> {\n // if file does not exist\n\n const fileExists = fs.existsSync(filePath);\n if (!fileExists) {\n throw new Error(`File does not exist at path: ${filePath}`);\n }\n // Check if the file is a directory\n const isDirectory = fs.lstatSync(filePath).isDirectory();\n if (isDirectory) {\n throw new Error(`The provided file is actually a folder. Use method uploadFolder instead`);\n }\n\n const { containerClient, version: outputVersion } = await createDatasetAndGetItsContainer(\n context,\n name,\n version,\n options,\n );\n // file name as blob name\n const blobName = nodePath.basename(filePath);\n const blockBlobClient = containerClient.getBlockBlobClient(blobName);\n await blockBlobClient.uploadStream(fs.createReadStream(filePath));\n\n const datasetVersion = await createOrUpdate(context, name, outputVersion, {\n name: name,\n version: outputVersion,\n type: \"uri_file\",\n dataUri: blockBlobClient.url,\n });\n return datasetVersion;\n}\n\nexport async function uploadFolder(\n context: Client,\n name: string,\n version: string,\n folderPath: string,\n options?: DatasetUploadInternalOptions,\n): Promise<DatasetVersionUnion> {\n // Check if the folder exists\n const folderExists = fs.existsSync(folderPath);\n if (!folderExists) {\n throw new Error(`Folder does not exist at path: ${folderPath}`);\n }\n // Check if the folder is a file\n const isFile = fs.lstatSync(folderPath).isFile();\n if (isFile) {\n throw new Error(`The provided path is actually a file. Use method uploadFile instead`);\n }\n\n const { containerClient, version: outputVersion } = await createDatasetAndGetItsContainer(\n context,\n name,\n version,\n options,\n );\n\n // Helper function to recursively get all files in a directory\n async function getAllFiles(dir: string, fileList: string[] = []): Promise<string[]> {\n const files = await fs.promises.readdir(dir);\n\n for (const file of files) {\n const filePath = `${dir}/${file}`;\n const stat = await fs.promises.lstat(filePath);\n\n if (stat.isDirectory()) {\n await getAllFiles(filePath, fileList);\n } else {\n fileList.push(filePath);\n }\n }\n\n return fileList;\n }\n\n // Get all files in the folder\n const allFiles = await getAllFiles(folderPath);\n let filteredFiles = allFiles;\n if (options?.filePattern) {\n try {\n const filePattern = new RegExp(options.filePattern);\n filteredFiles = allFiles.filter((file) => filePattern.test(file));\n } catch {\n // If regex pattern is invalid, ignore the pattern and upload all files\n }\n }\n\n if (filteredFiles.length === 0) {\n throw new Error(\"The provided folder is empty.\");\n }\n\n // Upload each file to blob storage while maintaining relative paths\n for (const filePath of filteredFiles) {\n // Create blob name as relative path from the base folder\n const relativePath = nodePath.relative(folderPath, filePath).split(nodePath.sep).join(\"/\");\n\n logger.verbose(\n `[uploadFolderAndCreate] Start uploading file '${filePath}' as blob '${relativePath}'`,\n );\n\n // Get a block blob client for the relative path\n const blobClient = containerClient.getBlockBlobClient(relativePath);\n\n // Upload the file using a readable stream for better performance\n const fileStream = fs.createReadStream(filePath);\n await blobClient.uploadStream(fileStream);\n logger.verbose(\n `[uploadFolderAndCreate] Done uploading file '${filePath}' as blob '${relativePath}'`,\n );\n }\n\n // Create dataset version that references this folder\n const datasetVersion = await createOrUpdate(context, name, outputVersion, {\n name: name,\n version: outputVersion,\n type: \"uri_folder\",\n dataUri: containerClient.url,\n });\n\n return datasetVersion;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/datasets/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,4BAA4B,EAC5B,kCAAkC,EAClC,mCAAmC,EACnC,+CAA+C,EAC/C,sCAAsC,EACtC,gCAAgC,EAChC,6BAA6B,EAC7B,+BAA+B,EAC/B,8BAA8B,EAC9B,iCAAiC,EACjC,6BAA6B,GAC9B,MAAM,wBAAwB,CAAC;AAahC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAgBxE,OAAO,EAAE,eAAe,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAE/F,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAEtE,MAAM,UAAU,wBAAwB,CACtC,OAAe,EACf,KAAa,EACb,UAAqD,EAAE,cAAc,EAAE,EAAE,EAAE;IAE3E,MAAM,IAAI,GAAG,iBAAiB,CAC5B,6CAA6C,EAC7C;QACE,KAAK,EAAE,KAAK;QACZ,aAAa,EAAE,OAAO,CAAC,UAAU,IAAI,IAAI;KAC1C,EACD;QACE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe;KACxD,CACF,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;QAC/B,GAAG,mCAAmC,CAAC,OAAO,CAAC;QAC/C,OAAO,EAAE;YACP,kBAAkB,EAAE,8BAA8B;YAClD,GAAG,OAAO,CAAC,cAAc,EAAE,OAAO;SACnC;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,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P,GAAG,EAAE,CAAC,iBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,EAC/C,wBAAwB,EACxB,CAAC,KAAK,CAAC,EACP,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAChF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AIProjectContext as Client } from \"../index.js\";\nimport {\n apiErrorResponseDeserializer,\n dataGenerationJobUnionDeserializer,\n dataGenerationJobResultDeserializer,\n _agentsPagedResultDataGenerationJobDeserializer,\n dataGenerationJobInputsUnionSerializer,\n _pagedDatasetVersionDeserializer,\n datasetVersionUnionSerializer,\n datasetVersionUnionDeserializer,\n pendingUploadRequestSerializer,\n pendingUploadResponseDeserializer,\n datasetCredentialDeserializer,\n} from \"../../models/models.js\";\nimport type {\n DataGenerationJobUnion,\n DataGenerationJobResult,\n _AgentsPagedResultDataGenerationJob,\n DataGenerationJobInputsUnion,\n _PagedDatasetVersion,\n DatasetVersionUnion,\n PendingUploadRequest,\n PendingUploadResponse,\n DatasetCredential,\n} from \"../../models/models.js\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { buildPagedAsyncIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport type {\n DatasetsDeleteGenerationJobOptionalParams,\n DatasetsCancelGenerationJobOptionalParams,\n DatasetsCreateGenerationJobOptionalParams,\n DatasetsListGenerationJobsOptionalParams,\n DatasetsGetGenerationJobOptionalParams,\n DatasetsGetCredentialsOptionalParams,\n DatasetsPendingUploadOptionalParams,\n DatasetsCreateOrUpdateOptionalParams,\n DatasetsDeleteOptionalParams,\n DatasetsGetOptionalParams,\n DatasetsListOptionalParams,\n DatasetsListVersionsOptionalParams,\n} from \"./options.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\nimport type { JobPoller } from \"../../static-helpers/pollingHelpers.js\";\nimport { getJobPoller } from \"../../static-helpers/pollingHelpers.js\";\n\nexport function _deleteGenerationJobSend(\n context: Client,\n jobId: string,\n options: DatasetsDeleteGenerationJobOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/data_generation_jobs/{jobId}{?api-version}\",\n {\n jobId: jobId,\n \"api-version\": context.apiVersion ?? \"v1\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n \"foundry-features\": \"DataGenerationJobs=V1Preview\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _deleteGenerationJobDeserialize(\n result: PathUncheckedResponse,\n): Promise<void> {\n const expectedStatuses = [\"204\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = apiErrorResponseDeserializer(result.body);\n }\n\n throw error;\n }\n\n return;\n}\n\n/** Removes the specified data generation job and its associated output. */\nexport async function deleteGenerationJob(\n context: Client,\n jobId: string,\n options: DatasetsDeleteGenerationJobOptionalParams = { requestOptions: {} },\n): Promise<void> {\n const result = await _deleteGenerationJobSend(context, jobId, options);\n return _deleteGenerationJobDeserialize(result);\n}\n\nexport function _cancelGenerationJobSend(\n context: Client,\n jobId: string,\n options: DatasetsCancelGenerationJobOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/data_generation_jobs/{jobId}:cancel{?api-version}\",\n {\n jobId: jobId,\n \"api-version\": context.apiVersion ?? \"v1\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n headers: {\n \"foundry-features\": \"DataGenerationJobs=V1Preview\",\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _cancelGenerationJobDeserialize(\n result: PathUncheckedResponse,\n): Promise<DataGenerationJobUnion> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = apiErrorResponseDeserializer(result.body);\n }\n\n throw error;\n }\n\n return dataGenerationJobUnionDeserializer(result.body);\n}\n\n/** Cancels the specified data generation job if it is still in progress. */\nexport async function cancelGenerationJob(\n context: Client,\n jobId: string,\n options: DatasetsCancelGenerationJobOptionalParams = { requestOptions: {} },\n): Promise<DataGenerationJobUnion> {\n const result = await _cancelGenerationJobSend(context, jobId, options);\n return _cancelGenerationJobDeserialize(result);\n}\n\nexport function _createGenerationJobSend(\n context: Client,\n job: DataGenerationJobInputsUnion,\n options: DatasetsCreateGenerationJobOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/data_generation_jobs{?api-version}\",\n {\n \"api-version\": context.apiVersion ?? \"v1\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n \"foundry-features\": \"DataGenerationJobs=V1Preview\",\n ...(options?.operationId !== undefined ? { \"operation-id\": options?.operationId } : {}),\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: dataGenerationJobInputsUnionSerializer(job),\n });\n}\n\nexport async function _createGenerationJobDeserialize(\n result: PathUncheckedResponse,\n): Promise<DataGenerationJobResult> {\n const expectedStatuses = [\"201\", \"200\", \"202\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = apiErrorResponseDeserializer(result.body);\n }\n\n throw error;\n }\n\n if (result?.body?.result === undefined) {\n throw createRestError(\n `Expected a result in the response at position \"result.body.result\"`,\n result,\n );\n }\n\n return dataGenerationJobResultDeserializer(result.body.result);\n}\n\n/** Submits a new data generation job for asynchronous execution. */\nexport function createGenerationJob(\n context: Client,\n job: DataGenerationJobInputsUnion,\n options: DatasetsCreateGenerationJobOptionalParams = { requestOptions: {} },\n): JobPoller<DataGenerationJobResult> {\n // CUSTOMIZATION: SDK-IMPROVEMENT: `getJobPoller` exposes the queued job id on the poller state.\n return getJobPoller(context, _createGenerationJobDeserialize, [\"201\", \"200\", \"202\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () => _createGenerationJobSend(context, job, options),\n resourceLocationConfig: \"operation-location\",\n apiVersion: context.apiVersion ?? \"v1\",\n pollHeaders: {\n ...options?.requestOptions?.headers,\n \"foundry-features\": \"DataGenerationJobs=V1Preview\",\n },\n });\n}\n\nexport function _listGenerationJobsSend(\n context: Client,\n options: DatasetsListGenerationJobsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const requestParameters = operationOptionsToRequestParameters(options);\n const path = expandUrlTemplate(\n \"/data_generation_jobs{?after,api-version,before,limit,order}\",\n {\n limit: options?.limit,\n order: options?.order,\n after: options?.after,\n before: options?.before,\n \"api-version\": context.apiVersion ?? \"v1\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...requestParameters,\n headers: {\n \"foundry-features\": \"DataGenerationJobs=V1Preview\",\n accept: \"application/json\",\n ...requestParameters.headers,\n },\n });\n}\n\nexport async function _listGenerationJobsDeserialize(\n result: PathUncheckedResponse,\n): Promise<_AgentsPagedResultDataGenerationJob> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = apiErrorResponseDeserializer(result.body);\n }\n\n throw error;\n }\n\n return _agentsPagedResultDataGenerationJobDeserializer(result.body);\n}\n\n/** Returns a list of data generation jobs. */\nexport function listGenerationJobs(\n context: Client,\n options: DatasetsListGenerationJobsOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<DataGenerationJobUnion> {\n const requestParameters = operationOptionsToRequestParameters(options);\n return buildPagedAsyncIterator(\n context,\n () => _listGenerationJobsSend(context, options),\n _listGenerationJobsDeserialize,\n [\"200\"],\n {\n itemName: \"data\",\n apiVersion: context.apiVersion ?? \"v1\",\n cursorFieldName: \"last_id\",\n hasMoreFieldName: \"has_more\",\n nextPageRequestOptions: {\n ...requestParameters,\n headers: {\n \"foundry-features\": \"DataGenerationJobs=V1Preview\",\n accept: \"application/json\",\n ...requestParameters.headers,\n },\n },\n },\n );\n}\n\nexport function _getGenerationJobSend(\n context: Client,\n jobId: string,\n options: DatasetsGetGenerationJobOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/data_generation_jobs/{jobId}{?api-version}\",\n {\n jobId: jobId,\n \"api-version\": context.apiVersion ?? \"v1\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n \"foundry-features\": \"DataGenerationJobs=V1Preview\",\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getGenerationJobDeserialize(\n result: PathUncheckedResponse,\n): Promise<DataGenerationJobUnion> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = apiErrorResponseDeserializer(result.body);\n }\n\n throw error;\n }\n\n return dataGenerationJobUnionDeserializer(result.body);\n}\n\n/** Retrieves the specified data generation job and its current status. */\nexport async function getGenerationJob(\n context: Client,\n jobId: string,\n options: DatasetsGetGenerationJobOptionalParams = { requestOptions: {} },\n): Promise<DataGenerationJobUnion> {\n const result = await _getGenerationJobSend(context, jobId, options);\n return _getGenerationJobDeserialize(result);\n}\n\nexport function _getCredentialsSend(\n context: Client,\n name: string,\n version: string,\n options: DatasetsGetCredentialsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/datasets/{name}/versions/{version}/credentials{?api-version}\",\n {\n name: name,\n version: version,\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 accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getCredentialsDeserialize(\n result: PathUncheckedResponse,\n): Promise<DatasetCredential> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return datasetCredentialDeserializer(result.body);\n}\n\n/** Get the SAS credential to access the storage account associated with a Dataset version. */\nexport async function getCredentials(\n context: Client,\n name: string,\n version: string,\n options: DatasetsGetCredentialsOptionalParams = { requestOptions: {} },\n): Promise<DatasetCredential> {\n const result = await _getCredentialsSend(context, name, version, options);\n return _getCredentialsDeserialize(result);\n}\n\nexport function _pendingUploadSend(\n context: Client,\n name: string,\n version: string,\n pendingUploadRequest: PendingUploadRequest,\n options: DatasetsPendingUploadOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/datasets/{name}/versions/{version}/startPendingUpload{?api-version}\",\n {\n name: name,\n version: version,\n \"api-version\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: pendingUploadRequestSerializer(pendingUploadRequest),\n });\n}\n\nexport async function _pendingUploadDeserialize(\n result: PathUncheckedResponse,\n): Promise<PendingUploadResponse> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return pendingUploadResponseDeserializer(result.body);\n}\n\n/** Start a new or get an existing pending upload of a dataset for a specific version. */\nexport async function pendingUpload(\n context: Client,\n name: string,\n version: string,\n pendingUploadRequest: PendingUploadRequest,\n options: DatasetsPendingUploadOptionalParams = { requestOptions: {} },\n): Promise<PendingUploadResponse> {\n const result = await _pendingUploadSend(context, name, version, pendingUploadRequest, options);\n return _pendingUploadDeserialize(result);\n}\n\nexport function _createOrUpdateSend(\n context: Client,\n name: string,\n version: string,\n datasetVersion: DatasetVersionUnion,\n options: DatasetsCreateOrUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/datasets/{name}/versions/{version}{?api-version}\",\n {\n name: name,\n version: version,\n \"api-version\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).patch({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/merge-patch+json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: datasetVersionUnionSerializer(datasetVersion),\n });\n}\n\nexport async function _createOrUpdateDeserialize(\n result: PathUncheckedResponse,\n): Promise<DatasetVersionUnion> {\n const expectedStatuses = [\"201\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return datasetVersionUnionDeserializer(result.body);\n}\n\n/** Create a new or update an existing DatasetVersion with the given version id */\nexport async function createOrUpdate(\n context: Client,\n name: string,\n version: string,\n datasetVersion: DatasetVersionUnion,\n options: DatasetsCreateOrUpdateOptionalParams = { requestOptions: {} },\n): Promise<DatasetVersionUnion> {\n const result = await _createOrUpdateSend(context, name, version, datasetVersion, options);\n return _createOrUpdateDeserialize(result);\n}\n\nexport function _$deleteSend(\n context: Client,\n name: string,\n version: string,\n options: DatasetsDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/datasets/{name}/versions/{version}{?api-version}\",\n {\n name: name,\n version: version,\n \"api-version\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"204\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return;\n}\n\n/** Delete the specific version of the DatasetVersion. The service returns 204 No Content if the DatasetVersion was deleted successfully or if the DatasetVersion does not exist. */\nexport async function $delete(\n context: Client,\n name: string,\n version: string,\n options: DatasetsDeleteOptionalParams = { requestOptions: {} },\n): Promise<void> {\n const result = await _$deleteSend(context, name, version, options);\n return _$deleteDeserialize(result);\n}\n\nexport function _getSend(\n context: Client,\n name: string,\n version: string,\n options: DatasetsGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/datasets/{name}/versions/{version}{?api-version}\",\n {\n name: name,\n version: version,\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 accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeserialize(result: PathUncheckedResponse): Promise<DatasetVersionUnion> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return datasetVersionUnionDeserializer(result.body);\n}\n\n/** Get the specific version of the DatasetVersion. The service returns 404 Not Found error if the DatasetVersion does not exist. */\nexport async function get(\n context: Client,\n name: string,\n version: string,\n options: DatasetsGetOptionalParams = { requestOptions: {} },\n): Promise<DatasetVersionUnion> {\n const result = await _getSend(context, name, version, options);\n return _getDeserialize(result);\n}\n\nexport function _listSend(\n context: Client,\n options: DatasetsListOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/datasets{?api-version}\",\n {\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 accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listDeserialize(\n result: PathUncheckedResponse,\n): Promise<_PagedDatasetVersion> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return _pagedDatasetVersionDeserializer(result.body);\n}\n\n/** List the latest version of each DatasetVersion */\nexport function list(\n context: Client,\n options: DatasetsListOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<DatasetVersionUnion> {\n return buildPagedAsyncIterator(\n context,\n () => _listSend(context, options),\n _listDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\", apiVersion: context.apiVersion },\n );\n}\n\nexport function _listVersionsSend(\n context: Client,\n name: string,\n options: DatasetsListVersionsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/datasets/{name}/versions{?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 accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listVersionsDeserialize(\n result: PathUncheckedResponse,\n): Promise<_PagedDatasetVersion> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return _pagedDatasetVersionDeserializer(result.body);\n}\n\n/** List all versions of the given DatasetVersion */\nexport function listVersions(\n context: Client,\n name: string,\n options: DatasetsListVersionsOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<DatasetVersionUnion> {\n return buildPagedAsyncIterator(\n context,\n () => _listVersionsSend(context, name, options),\n _listVersionsDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\", apiVersion: context.apiVersion },\n );\n}\n"]}
|
|
@@ -1,5 +1,57 @@
|
|
|
1
|
+
import type { PageOrder } from "../../models/models.js";
|
|
1
2
|
import type { OperationOptions } from "@azure-rest/core-client";
|
|
2
3
|
/** Optional parameters. */
|
|
4
|
+
export interface DatasetsDeleteGenerationJobOptionalParams extends OperationOptions {
|
|
5
|
+
/** A feature flag opt-in required when using preview operations or modifying persisted preview resources. */
|
|
6
|
+
foundryFeatures?: "DataGenerationJobs=V1Preview";
|
|
7
|
+
}
|
|
8
|
+
/** Optional parameters. */
|
|
9
|
+
export interface DatasetsCancelGenerationJobOptionalParams extends OperationOptions {
|
|
10
|
+
/** A feature flag opt-in required when using preview operations or modifying persisted preview resources. */
|
|
11
|
+
foundryFeatures?: "DataGenerationJobs=V1Preview";
|
|
12
|
+
}
|
|
13
|
+
/** Optional parameters. */
|
|
14
|
+
export interface DatasetsCreateGenerationJobOptionalParams extends OperationOptions {
|
|
15
|
+
/** Delay to wait until next poll, in milliseconds. */
|
|
16
|
+
updateIntervalInMs?: number;
|
|
17
|
+
/** A feature flag opt-in required when using preview operations or modifying persisted preview resources. */
|
|
18
|
+
foundryFeatures?: "DataGenerationJobs=V1Preview";
|
|
19
|
+
/** Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. */
|
|
20
|
+
operationId?: string;
|
|
21
|
+
}
|
|
22
|
+
/** Optional parameters. */
|
|
23
|
+
export interface DatasetsListGenerationJobsOptionalParams extends OperationOptions {
|
|
24
|
+
/** A feature flag opt-in required when using preview operations or modifying persisted preview resources. */
|
|
25
|
+
foundryFeatures?: "DataGenerationJobs=V1Preview";
|
|
26
|
+
/**
|
|
27
|
+
* A limit on the number of objects to be returned. Limit can range between 1 and 100, and the
|
|
28
|
+
* default is 20.
|
|
29
|
+
*/
|
|
30
|
+
limit?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`
|
|
33
|
+
* for descending order.
|
|
34
|
+
*/
|
|
35
|
+
order?: PageOrder;
|
|
36
|
+
/**
|
|
37
|
+
* A cursor for use in pagination. `after` is an object ID that defines your place in the list.
|
|
38
|
+
* For instance, if you make a list request and receive 100 objects, ending with obj_foo, your
|
|
39
|
+
* subsequent call can include after=obj_foo in order to fetch the next page of the list.
|
|
40
|
+
*/
|
|
41
|
+
after?: string;
|
|
42
|
+
/**
|
|
43
|
+
* A cursor for use in pagination. `before` is an object ID that defines your place in the list.
|
|
44
|
+
* For instance, if you make a list request and receive 100 objects, ending with obj_foo, your
|
|
45
|
+
* subsequent call can include before=obj_foo in order to fetch the previous page of the list.
|
|
46
|
+
*/
|
|
47
|
+
before?: string;
|
|
48
|
+
}
|
|
49
|
+
/** Optional parameters. */
|
|
50
|
+
export interface DatasetsGetGenerationJobOptionalParams extends OperationOptions {
|
|
51
|
+
/** A feature flag opt-in required when using preview operations or modifying persisted preview resources. */
|
|
52
|
+
foundryFeatures?: "DataGenerationJobs=V1Preview";
|
|
53
|
+
}
|
|
54
|
+
/** Optional parameters. */
|
|
3
55
|
export interface DatasetsGetCredentialsOptionalParams extends OperationOptions {
|
|
4
56
|
}
|
|
5
57
|
/** Optional parameters. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/api/datasets/options.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,2BAA2B;AAC3B,MAAM,WAAW,oCAAqC,SAAQ,gBAAgB;CAAG;AAEjF,2BAA2B;AAC3B,MAAM,WAAW,mCAAoC,SAAQ,gBAAgB;CAAG;AAEhF,2BAA2B;AAC3B,MAAM,WAAW,oCAAqC,SAAQ,gBAAgB;CAAG;AAEjF,2BAA2B;AAC3B,MAAM,WAAW,4BAA6B,SAAQ,gBAAgB;CAAG;AAEzE,2BAA2B;AAC3B,MAAM,WAAW,yBAA0B,SAAQ,gBAAgB;CAAG;AAEtE,2BAA2B;AAC3B,MAAM,WAAW,0BAA2B,SAAQ,gBAAgB;CAAG;AAEvE,2BAA2B;AAC3B,MAAM,WAAW,kCAAmC,SAAQ,gBAAgB;CAAG"}
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/api/datasets/options.ts"],"names":[],"mappings":"AA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AA6B,SAAQ,gBAAgB;CAAG;AAEzE,2BAA2B;AAC3B,MAAM,WAAW,yBAA0B,SAAQ,gBAAgB;CAAG;AAEtE,2BAA2B;AAC3B,MAAM,WAAW,0BAA2B,SAAQ,gBAAgB;CAAG;AAEvE,2BAA2B;AAC3B,MAAM,WAAW,kCAAmC,SAAQ,gBAAgB;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/api/datasets/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationOptions } from \"@azure-rest/core-client\";\n\n/** Optional parameters. */\nexport interface DatasetsGetCredentialsOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface DatasetsPendingUploadOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface DatasetsCreateOrUpdateOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface DatasetsDeleteOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface DatasetsGetOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface DatasetsListOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface DatasetsListVersionsOptionalParams extends OperationOptions {}\n"]}
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/api/datasets/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { PageOrder } from \"../../models/models.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\n\n/** Optional parameters. */\nexport interface DatasetsDeleteGenerationJobOptionalParams extends OperationOptions {\n /** A feature flag opt-in required when using preview operations or modifying persisted preview resources. */\n foundryFeatures?: \"DataGenerationJobs=V1Preview\";\n}\n\n/** Optional parameters. */\nexport interface DatasetsCancelGenerationJobOptionalParams extends OperationOptions {\n /** A feature flag opt-in required when using preview operations or modifying persisted preview resources. */\n foundryFeatures?: \"DataGenerationJobs=V1Preview\";\n}\n\n/** Optional parameters. */\nexport interface DatasetsCreateGenerationJobOptionalParams extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /** A feature flag opt-in required when using preview operations or modifying persisted preview resources. */\n foundryFeatures?: \"DataGenerationJobs=V1Preview\";\n /** Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. */\n operationId?: string;\n}\n\n/** Optional parameters. */\nexport interface DatasetsListGenerationJobsOptionalParams extends OperationOptions {\n /** A feature flag opt-in required when using preview operations or modifying persisted preview resources. */\n foundryFeatures?: \"DataGenerationJobs=V1Preview\";\n /**\n * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n * default is 20.\n */\n limit?: number;\n /**\n * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\n * for descending order.\n */\n order?: PageOrder;\n /**\n * A cursor for use in pagination. `after` is an object ID that defines your place in the list.\n * For instance, if you make a list request and receive 100 objects, ending with obj_foo, your\n * subsequent call can include after=obj_foo in order to fetch the next page of the list.\n */\n after?: string;\n /**\n * A cursor for use in pagination. `before` is an object ID that defines your place in the list.\n * For instance, if you make a list request and receive 100 objects, ending with obj_foo, your\n * subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n */\n before?: string;\n}\n\n/** Optional parameters. */\nexport interface DatasetsGetGenerationJobOptionalParams extends OperationOptions {\n /** A feature flag opt-in required when using preview operations or modifying persisted preview resources. */\n foundryFeatures?: \"DataGenerationJobs=V1Preview\";\n}\n\n/** Optional parameters. */\nexport interface DatasetsGetCredentialsOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface DatasetsPendingUploadOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface DatasetsCreateOrUpdateOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface DatasetsDeleteOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface DatasetsGetOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface DatasetsListOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface DatasetsListVersionsOptionalParams extends OperationOptions {}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DatasetUploadInternalOptions, AIProjectContext as Client } from "../index.js";
|
|
2
|
+
import type { DatasetVersionUnion } from "../../models/models.js";
|
|
3
|
+
export declare function uploadFile(_context: Client, _name: string, _version: string, _filePath: string, _options?: DatasetUploadInternalOptions): Promise<DatasetVersionUnion>;
|
|
4
|
+
export declare function uploadFolder(_context: Client, _name: string, _version: string, _folderPath: string, _options?: DatasetUploadInternalOptions): Promise<DatasetVersionUnion>;
|
|
5
|
+
//# sourceMappingURL=uploads-browser.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploads-browser.d.mts","sourceRoot":"","sources":["../../../../src/api/datasets/uploads-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,4BAA4B,EAAE,gBAAgB,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAC5F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,4BAA4B,GACtC,OAAO,CAAC,mBAAmB,CAAC,CAE9B;AAED,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,4BAA4B,GACtC,OAAO,CAAC,mBAAmB,CAAC,CAE9B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
export async function uploadFile(_context, _name, _version, _filePath, _options) {
|
|
4
|
+
throw new Error("Dataset file uploads are only supported in Node.js.");
|
|
5
|
+
}
|
|
6
|
+
export async function uploadFolder(_context, _name, _version, _folderPath, _options) {
|
|
7
|
+
throw new Error("Dataset folder uploads are only supported in Node.js.");
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=uploads-browser.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploads-browser.mjs","sourceRoot":"","sources":["../../../../src/api/datasets/uploads-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,QAAgB,EAChB,KAAa,EACb,QAAgB,EAChB,SAAiB,EACjB,QAAuC;IAEvC,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;AACzE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,QAAgB,EAChB,KAAa,EACb,QAAgB,EAChB,WAAmB,EACnB,QAAuC;IAEvC,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;AAC3E,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { DatasetUploadInternalOptions, AIProjectContext as Client } from \"../index.js\";\nimport type { DatasetVersionUnion } from \"../../models/models.js\";\n\nexport async function uploadFile(\n _context: Client,\n _name: string,\n _version: string,\n _filePath: string,\n _options?: DatasetUploadInternalOptions,\n): Promise<DatasetVersionUnion> {\n throw new Error(\"Dataset file uploads are only supported in Node.js.\");\n}\n\nexport async function uploadFolder(\n _context: Client,\n _name: string,\n _version: string,\n _folderPath: string,\n _options?: DatasetUploadInternalOptions,\n): Promise<DatasetVersionUnion> {\n throw new Error(\"Dataset folder uploads are only supported in Node.js.\");\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["../../../../src/api/datasets/uploads.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["../../../../src/api/datasets/uploads.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { uploadFile, uploadFolder } from \"./uploads-browser.mjs\";\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { deleteGenerationJob, cancelGenerationJob, listGenerationJobs, getGenerationJob, createGenerationJob, updateVersion, createVersion, deleteVersion, getVersion, list, listVersions, } from "./operations.js";
|
|
2
|
+
export type { EvaluatorsDeleteGenerationJobOptionalParams, EvaluatorsCancelGenerationJobOptionalParams, EvaluatorsListGenerationJobsOptionalParams, EvaluatorsGetGenerationJobOptionalParams, EvaluatorsCreateGenerationJobOptionalParams, EvaluatorsUpdateVersionOptionalParams, EvaluatorsCreateVersionOptionalParams, EvaluatorsDeleteVersionOptionalParams, EvaluatorsGetVersionOptionalParams, EvaluatorsListOptionalParams, EvaluatorsListVersionsOptionalParams, } from "./options.js";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/evaluators/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,aAAa,EACb,UAAU,EACV,IAAI,EACJ,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,2CAA2C,EAC3C,2CAA2C,EAC3C,0CAA0C,EAC1C,wCAAwC,EACxC,2CAA2C,EAC3C,qCAAqC,EACrC,qCAAqC,EACrC,qCAAqC,EACrC,kCAAkC,EAClC,4BAA4B,EAC5B,oCAAoC,GACrC,MAAM,cAAc,CAAC"}
|