-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from nestrilabs/release-please--branches--main…
…--changes--next--components--sdk release: 0.1.0-alpha.3
- Loading branch information
Showing
21 changed files
with
654 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
".": "0.1.0-alpha.2" | ||
".": "0.1.0-alpha.3" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
configured_endpoints: 8 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nestri%2Fnestri-sdk-82a0a3ecc659cc86ed90fd9c59967fda4c8956b9a169e9aa59e82116010d386c.yml | ||
configured_endpoints: 16 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nestri%2Fnestri-sdk-d41f3521b15659cbf7f06eff19bc1c16f38356804fb3dd517a1b2305dc31672a.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@nestri/sdk", | ||
"version": "0.1.0-alpha.2", | ||
"version": "0.1.0-alpha.3", | ||
"description": "The official TypeScript library for the Nestri API", | ||
"author": "Nestri <[email protected]>", | ||
"types": "dist/index.d.ts", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
import { APIResource } from '../../resource'; | ||
import * as Core from '../../core'; | ||
import * as SessionsAPI from './sessions'; | ||
import { SessionListResponse, Sessions } from './sessions'; | ||
|
||
export class Games extends APIResource { | ||
sessions: SessionsAPI.Sessions = new SessionsAPI.Sessions(this._client); | ||
|
||
/** | ||
* Adds a game to the currently authenticated user's library. Once added, the user | ||
* can play the game and share their progress with others | ||
*/ | ||
create(steamId: number, options?: Core.RequestOptions): Core.APIPromise<GameCreateResponse> { | ||
return this._client.post(`/games/${steamId}`, options); | ||
} | ||
|
||
/** | ||
* Fetches detailed metadata about a specific game using its Steam ID | ||
*/ | ||
retrieve(steamId: number, options?: Core.RequestOptions): Core.APIPromise<GameRetrieveResponse> { | ||
return this._client.get(`/games/${steamId}`, options); | ||
} | ||
|
||
/** | ||
* Updates the metadata about a specific game using its Steam ID | ||
*/ | ||
update(body: GameUpdateParams, options?: Core.RequestOptions): Core.APIPromise<GameUpdateResponse> { | ||
return this._client.put('/games', { body, ...options }); | ||
} | ||
|
||
/** | ||
* Returns a list of all (known) games associated with the authenticated user | ||
*/ | ||
list(options?: Core.RequestOptions): Core.APIPromise<GameListResponse> { | ||
return this._client.get('/games', options); | ||
} | ||
|
||
/** | ||
* Removes a game from the authenticated user's library. The game remains in the | ||
* system but will no longer be accessible to the user | ||
*/ | ||
delete(steamId: number, options?: Core.RequestOptions): Core.APIPromise<GameDeleteResponse> { | ||
return this._client.delete(`/games/${steamId}`, options); | ||
} | ||
} | ||
|
||
export interface GameCreateResponse { | ||
data: 'ok'; | ||
} | ||
|
||
export interface GameRetrieveResponse { | ||
/** | ||
* Represents a Steam game that can be installed and played on a machine. | ||
*/ | ||
data: GameRetrieveResponse.Data; | ||
} | ||
|
||
export namespace GameRetrieveResponse { | ||
/** | ||
* Represents a Steam game that can be installed and played on a machine. | ||
*/ | ||
export interface Data { | ||
/** | ||
* Unique object identifier. The format and length of IDs may change over time. | ||
*/ | ||
id: string; | ||
|
||
/** | ||
* A human-readable name for the game, used for easy identification. | ||
*/ | ||
name: string; | ||
|
||
/** | ||
* The Steam ID of the game, used to identify it during installation and runtime. | ||
*/ | ||
steamID: number; | ||
} | ||
} | ||
|
||
export interface GameUpdateResponse { | ||
data: 'ok'; | ||
} | ||
|
||
export interface GameListResponse { | ||
/** | ||
* A list of games owned by the user | ||
*/ | ||
data: Array<GameListResponse.Data>; | ||
} | ||
|
||
export namespace GameListResponse { | ||
/** | ||
* Represents a Steam game that can be installed and played on a machine. | ||
*/ | ||
export interface Data { | ||
/** | ||
* Unique object identifier. The format and length of IDs may change over time. | ||
*/ | ||
id: string; | ||
|
||
/** | ||
* A human-readable name for the game, used for easy identification. | ||
*/ | ||
name: string; | ||
|
||
/** | ||
* The Steam ID of the game, used to identify it during installation and runtime. | ||
*/ | ||
steamID: number; | ||
} | ||
} | ||
|
||
export interface GameDeleteResponse { | ||
data: 'ok'; | ||
} | ||
|
||
export interface GameUpdateParams { | ||
/** | ||
* A human-readable name for the game, used for easy identification. | ||
*/ | ||
name: string; | ||
|
||
/** | ||
* The Steam ID of the game, used to identify it during installation and runtime. | ||
*/ | ||
steamID: number; | ||
} | ||
|
||
Games.Sessions = Sessions; | ||
|
||
export declare namespace Games { | ||
export { | ||
type GameCreateResponse as GameCreateResponse, | ||
type GameRetrieveResponse as GameRetrieveResponse, | ||
type GameUpdateResponse as GameUpdateResponse, | ||
type GameListResponse as GameListResponse, | ||
type GameDeleteResponse as GameDeleteResponse, | ||
type GameUpdateParams as GameUpdateParams, | ||
}; | ||
|
||
export { Sessions as Sessions, type SessionListResponse as SessionListResponse }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
export { | ||
Games, | ||
type GameCreateResponse, | ||
type GameRetrieveResponse, | ||
type GameUpdateResponse, | ||
type GameListResponse, | ||
type GameDeleteResponse, | ||
type GameUpdateParams, | ||
} from './games'; | ||
export { Sessions, type SessionListResponse } from './sessions'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
import { APIResource } from '../../resource'; | ||
import * as Core from '../../core'; | ||
|
||
export class Sessions extends APIResource { | ||
/** | ||
* Fetches active and public game sessions associated with a specific game using | ||
* its Steam ID | ||
*/ | ||
list(steamId: number, options?: Core.RequestOptions): Core.APIPromise<SessionListResponse> { | ||
return this._client.get(`/games/${steamId}/sessions`, options); | ||
} | ||
} | ||
|
||
export interface SessionListResponse { | ||
/** | ||
* Publicly active sessions associated with the game | ||
*/ | ||
data: Array<SessionListResponse.Data>; | ||
} | ||
|
||
export namespace SessionListResponse { | ||
/** | ||
* Represents a single game play session, tracking its lifetime and accessibility | ||
* settings. | ||
*/ | ||
export interface Data { | ||
/** | ||
* Unique object identifier. The format and length of IDs may change over time. | ||
*/ | ||
id: string; | ||
|
||
/** | ||
* A human-readable name for the session to help identify it | ||
*/ | ||
name: string; | ||
|
||
/** | ||
* If true, the session is publicly viewable by all users. If false, only | ||
* authorized users can access it | ||
*/ | ||
public: boolean; | ||
|
||
/** | ||
* The timestamp indicating when this session started. | ||
*/ | ||
startedAt: string | number; | ||
|
||
/** | ||
* The timestamp indicating when this session was completed or terminated. Null if | ||
* session is still active. | ||
*/ | ||
endedAt?: string | number; | ||
} | ||
} | ||
|
||
export declare namespace Sessions { | ||
export { type SessionListResponse as SessionListResponse }; | ||
} |
Oops, something went wrong.