sim 2.2.9-preview.213.1 → 2.2.9-preview.215.1

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.
@@ -1,4 +1,5 @@
1
- import { SimClient } from '../http/client';
1
+ import type { V2OperationName } from '../generated/v2-api';
2
+ import type { OperationClient } from '../runtime/called-operations';
2
3
  export type UploadTransfer = {
3
4
  method: 'put';
4
5
  url: string;
@@ -8,11 +9,18 @@ export type UploadTransfer = {
8
9
  partSize: number;
9
10
  partCount: number;
10
11
  };
11
- export interface UploadSession {
12
- basePath: string;
12
+ export interface UploadSession<Operation extends V2OperationName> {
13
+ /** The operations that drive this kind of session past its creation. */
14
+ operations: {
15
+ parts: Operation;
16
+ complete: Operation;
17
+ abort: Operation;
18
+ };
19
+ /** The path parameters that address the session. */
20
+ params: Record<string, string>;
13
21
  uploadToken: string;
14
22
  transfer: UploadTransfer;
15
23
  size: number;
16
24
  }
17
25
  /** Uploads and completes a signed transfer, aborting its session if the transfer fails. */
18
- export declare function finishUploadSession<T>(client: SimClient, workspaceId: string, session: UploadSession, path: string): Promise<T>;
26
+ export declare function finishUploadSession<T, Operation extends V2OperationName>(client: OperationClient<Operation>, workspaceId: string, session: UploadSession<Operation>, path: string): Promise<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sim",
3
- "version": "2.2.9-preview.213.1",
3
+ "version": "2.2.9-preview.215.1",
4
4
  "description": "Sim CLI - talk to the Sim API from your terminal",
5
5
  "type": "module",
6
6
  "imports": {