@inferencesh/sdk 0.5.18 → 0.5.19

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/types.d.ts CHANGED
@@ -395,6 +395,9 @@ export interface APIError {
395
395
  code: string;
396
396
  message: string;
397
397
  suggestions?: string[];
398
+ meta?: {
399
+ [key: string]: any;
400
+ };
398
401
  }
399
402
  /**
400
403
  * ApiAppRunRequest is the request body for /apps/run endpoint.
@@ -813,6 +816,12 @@ export interface IntegrationConnectResponse {
813
816
  * For service accounts - instructions
814
817
  */
815
818
  instructions?: string;
819
+ /**
820
+ * RequiresConfirmation — the connect was paused, user must acknowledge and retry with a flag.
821
+ */
822
+ requires_confirmation?: boolean;
823
+ confirmation_type?: string;
824
+ message?: string;
816
825
  }
817
826
  export interface ProjectCreateRequest {
818
827
  name: string;
@@ -955,6 +964,43 @@ export interface App extends BaseModel, PermissionModel {
955
964
  version_id: string;
956
965
  version?: AppVersion;
957
966
  }
967
+ /**
968
+ * AppPricing configures all pricing using CEL expressions
969
+ * Empty expressions use defaults. All values in nanocents (1 cent = 1,000,000,000)
970
+ */
971
+ export interface AppPricing {
972
+ prices: {
973
+ [key: string]: number;
974
+ };
975
+ upstream_pricing?: string;
976
+ /**
977
+ * Resource fee expression (compute cost)
978
+ * Available variables: resources (list of {name, price_per_second}), usage_seconds, prices
979
+ * Default: sum(resources.map(r, r.price_per_second)) * usage_seconds
980
+ */
981
+ resource_expression: string;
982
+ /**
983
+ * CEL expressions for each fee type (result in nanocents)
984
+ * Available variables: inputs, outputs, prices, resource_fee, usage_seconds
985
+ */
986
+ inference_expression: string;
987
+ royalty_expression: string;
988
+ partner_expression: string;
989
+ /**
990
+ * Total expression combines all fees (can apply weights/discounts)
991
+ * Available variables: inputs, outputs, prices, resource_fee, usage_seconds, inference_fee, royalty_fee, partner_fee
992
+ * Default: resource_fee + inference_fee + royalty_fee + partner_fee
993
+ */
994
+ total_expression: string;
995
+ description: string;
996
+ /**
997
+ * DescriptionRendered is the result of evaluating Description against the
998
+ * static prices map at save time. Frontends should display this rather than
999
+ * the raw CEL source. Empty string means the description failed to render
1000
+ * (e.g. references variables outside `prices`).
1001
+ */
1002
+ description_rendered?: string;
1003
+ }
958
1004
  export interface AppGPUResource {
959
1005
  count: number;
960
1006
  vram: number;
@@ -1104,6 +1150,23 @@ export interface AppSession extends BaseModel, PermissionModel {
1104
1150
  worker?: WorkerState;
1105
1151
  task?: Task;
1106
1152
  }
1153
+ /**
1154
+ * PublicAppStoreDTO is a lean DTO for public app store display.
1155
+ */
1156
+ export interface PublicAppStoreDTO {
1157
+ id: string;
1158
+ category: string;
1159
+ subcategory?: string;
1160
+ tags?: string[];
1161
+ namespace: string;
1162
+ name: string;
1163
+ description: string;
1164
+ images: AppImages;
1165
+ is_featured: boolean;
1166
+ rank: number;
1167
+ has_approved_version: boolean;
1168
+ page_id?: string;
1169
+ }
1107
1170
  export interface BaseModel {
1108
1171
  id: string;
1109
1172
  short_id: string;
@@ -1813,6 +1876,73 @@ export interface KnowledgeFile {
1813
1876
  content?: string;
1814
1877
  }
1815
1878
  export type SkillFile = KnowledgeFile;
1879
+ export interface PublicSkillStoreDTO {
1880
+ id: string;
1881
+ category: string;
1882
+ tags?: string[];
1883
+ namespace: string;
1884
+ name: string;
1885
+ description: string;
1886
+ is_featured: boolean;
1887
+ rank: number;
1888
+ has_approved_version: boolean;
1889
+ }
1890
+ export type PageStatus = number;
1891
+ export declare const PageStatusUnknown: PageStatus;
1892
+ export declare const PageStatusDraft: PageStatus;
1893
+ export declare const PageStatusPublished: PageStatus;
1894
+ export declare const PageStatusArchived: PageStatus;
1895
+ export interface PageMetadata {
1896
+ title: string;
1897
+ description: string;
1898
+ image: string;
1899
+ tags: string[];
1900
+ /**
1901
+ * Docs-specific fields
1902
+ */
1903
+ order?: number;
1904
+ type?: string;
1905
+ icon?: string;
1906
+ hide_from_nav?: boolean;
1907
+ }
1908
+ /**
1909
+ * PageType represents the type of page content
1910
+ */
1911
+ export type PageType = string;
1912
+ export declare const PageTypeDoc: PageType;
1913
+ export declare const PageTypeBlog: PageType;
1914
+ export declare const PageTypePage: PageType;
1915
+ export interface PageDTO extends BaseModel, PermissionModelDTO {
1916
+ is_featured: boolean;
1917
+ title: string;
1918
+ content: string;
1919
+ excerpt: string;
1920
+ status: PageStatus;
1921
+ type: PageType;
1922
+ metadata: PageMetadata;
1923
+ slug: string;
1924
+ }
1925
+ /**
1926
+ * MenuItem represents an item in a menu (can be nested)
1927
+ */
1928
+ export interface MenuItem {
1929
+ id: string;
1930
+ label: string;
1931
+ slug?: string;
1932
+ page_id?: string;
1933
+ url?: string;
1934
+ icon?: string;
1935
+ order: number;
1936
+ is_group?: boolean;
1937
+ expanded?: boolean;
1938
+ children?: MenuItem[];
1939
+ }
1940
+ export interface MenuDTO extends BaseModel, PermissionModelDTO {
1941
+ name: string;
1942
+ slug: string;
1943
+ description: string;
1944
+ items: MenuItem[];
1945
+ }
1816
1946
  /**
1817
1947
  * ProjectType represents different types of projects
1818
1948
  */
@@ -2031,12 +2161,6 @@ export interface SystemInfo {
2031
2161
  hf_cache: HFCacheInfo;
2032
2162
  gpus: GPU[];
2033
2163
  }
2034
- export interface TelemetrySystemInfo {
2035
- cpus: CPU[];
2036
- ram: RAM;
2037
- gpus: GPU[];
2038
- volumes: Volume[];
2039
- }
2040
2164
  export interface Docker {
2041
2165
  binary_path: string;
2042
2166
  installed: boolean;
@@ -2216,7 +2340,6 @@ export interface Task extends BaseModel, PermissionModel {
2216
2340
  */
2217
2341
  events: TaskEvent[];
2218
2342
  logs: TaskLog[];
2219
- telemetry: TimescaleTask[];
2220
2343
  usage_events: (UsageEvent | undefined)[];
2221
2344
  /**
2222
2345
  * Secret refs for billing (tracks ownership to determine partner fee)
@@ -2291,27 +2414,18 @@ export interface TaskDTO extends BaseModel, PermissionModelDTO {
2291
2414
  rating: ContentRating;
2292
2415
  events: TaskEvent[];
2293
2416
  logs: TaskLog[];
2294
- telemetry: TimescaleTask[];
2295
2417
  usage_events: (UsageEvent | undefined)[];
2296
2418
  session_id?: string;
2297
2419
  session_timeout?: number;
2298
2420
  }
2299
- export interface TimescaleTask {
2300
- id: string;
2301
- timestamp: string;
2302
- task_id?: string;
2303
- task_seq: number;
2304
- app_id: string;
2305
- app_version_id: string;
2306
- engine_id: string;
2307
- engine_resources: TelemetrySystemInfo;
2308
- worker_id: string;
2309
- system_info: TelemetrySystemInfo;
2310
- }
2311
2421
  export type TeamType = string;
2312
2422
  export declare const TeamTypePersonal: TeamType;
2313
2423
  export declare const TeamTypeTeam: TeamType;
2314
2424
  export declare const TeamTypeSystem: TeamType;
2425
+ export type TeamStatus = string;
2426
+ export declare const TeamStatusActive: TeamStatus;
2427
+ export declare const TeamStatusSuspended: TeamStatus;
2428
+ export declare const TeamStatusTerminated: TeamStatus;
2315
2429
  export interface Team extends BaseModel {
2316
2430
  type: TeamType;
2317
2431
  username: string;
@@ -2327,6 +2441,7 @@ export interface Team extends BaseModel {
2327
2441
  * MaxConcurrency limits total active tasks for this team (0 = use default)
2328
2442
  */
2329
2443
  max_concurrency: number;
2444
+ status: TeamStatus;
2330
2445
  }
2331
2446
  export interface TeamDTO extends BaseModel {
2332
2447
  type: TeamType;
@@ -2336,6 +2451,7 @@ export interface TeamDTO extends BaseModel {
2336
2451
  email: string;
2337
2452
  setup_completed: boolean;
2338
2453
  max_concurrency: number;
2454
+ status: TeamStatus;
2339
2455
  }
2340
2456
  export type TeamRole = string;
2341
2457
  export declare const TeamRoleOwner: TeamRole;
package/dist/types.js CHANGED
@@ -129,6 +129,13 @@ export const GraphEdgeTypeExecution = "execution"; // Node → Resource executio
129
129
  export const GraphEdgeTypeParent = "parent"; // Parent resource → child resource (e.g. skill fork)
130
130
  export const GraphEdgeTypeAncestor = "ancestor"; // Specific version → child resource (fork point)
131
131
  export const GraphEdgeTypeDuplicate = "duplicate"; // Skill → skill with identical content hash
132
+ export const PageStatusUnknown = 0; // 0
133
+ export const PageStatusDraft = 1; // 1
134
+ export const PageStatusPublished = 2; // 2
135
+ export const PageStatusArchived = 3; // 3
136
+ export const PageTypeDoc = "doc"; // Documentation page
137
+ export const PageTypeBlog = "blog"; // Blog post
138
+ export const PageTypePage = "page"; // Generic page/landing
132
139
  export const ProjectTypeAgent = "agent";
133
140
  export const ProjectTypeApp = "app";
134
141
  export const ProjectTypeFlow = "flow";
@@ -194,6 +201,9 @@ export const TaskLogTypeTask = 4;
194
201
  export const TeamTypePersonal = "personal";
195
202
  export const TeamTypeTeam = "team";
196
203
  export const TeamTypeSystem = "system";
204
+ export const TeamStatusActive = "active";
205
+ export const TeamStatusSuspended = "suspended";
206
+ export const TeamStatusTerminated = "terminated";
197
207
  export const TeamRoleOwner = "owner";
198
208
  export const TeamRoleAdmin = "admin";
199
209
  export const TeamRoleMember = "member";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inferencesh/sdk",
3
- "version": "0.5.18",
3
+ "version": "0.5.19",
4
4
  "description": "Official JavaScript/TypeScript SDK for inference.sh - Run AI models with a simple API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",