@layer-ai/sdk 2.3.0 → 2.4.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/dist/client.d.ts +11 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +11 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LayerConfig, RequestOptions } from './types/index.js';
|
|
2
|
-
import type { LayerRequestInput, LayerResponse, ChatRequest, ImageGenerationRequest } from './types/index.js';
|
|
2
|
+
import type { LayerRequestInput, LayerResponse, ChatRequest, ImageGenerationRequest, VideoGenerationRequest } from './types/index.js';
|
|
3
3
|
export declare class Layer {
|
|
4
4
|
private apiKey;
|
|
5
5
|
private baseUrl;
|
|
@@ -26,5 +26,15 @@ export declare class Layer {
|
|
|
26
26
|
model?: string;
|
|
27
27
|
metadata?: Record<string, unknown>;
|
|
28
28
|
}): Promise<LayerResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* v3 Video generation endpoint - Type-safe video requests
|
|
31
|
+
* @param request - Video request with gateId and VideoGenerationRequest data
|
|
32
|
+
*/
|
|
33
|
+
video(request: {
|
|
34
|
+
gateId: string;
|
|
35
|
+
data: VideoGenerationRequest;
|
|
36
|
+
model?: string;
|
|
37
|
+
metadata?: Record<string, unknown>;
|
|
38
|
+
}): Promise<LayerResponse>;
|
|
29
39
|
}
|
|
30
40
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,KAAK,EAAiB,iBAAiB,EAAE,aAAa,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":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}
|
package/dist/client.js
CHANGED
|
@@ -57,4 +57,15 @@ export class Layer {
|
|
|
57
57
|
body: request,
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* v3 Video generation endpoint - Type-safe video requests
|
|
62
|
+
* @param request - Video request with gateId and VideoGenerationRequest data
|
|
63
|
+
*/
|
|
64
|
+
async video(request) {
|
|
65
|
+
return this.request({
|
|
66
|
+
method: 'POST',
|
|
67
|
+
path: '/v3/video',
|
|
68
|
+
body: request,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
60
71
|
}
|