@cjavdev/believe 0.3.0 → 0.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.
Files changed (87) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/client.d.mts +5 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +5 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/characters.d.mts +1 -1
  12. package/resources/characters.d.ts +1 -1
  13. package/resources/characters.js +1 -1
  14. package/resources/characters.mjs +1 -1
  15. package/resources/client/client.d.mts +10 -0
  16. package/resources/client/client.d.mts.map +1 -0
  17. package/resources/client/client.d.ts +10 -0
  18. package/resources/client/client.d.ts.map +1 -0
  19. package/resources/client/client.js +17 -0
  20. package/resources/client/client.js.map +1 -0
  21. package/resources/client/client.mjs +12 -0
  22. package/resources/client/client.mjs.map +1 -0
  23. package/resources/client/index.d.mts +3 -0
  24. package/resources/client/index.d.mts.map +1 -0
  25. package/resources/client/index.d.ts +3 -0
  26. package/resources/client/index.d.ts.map +1 -0
  27. package/resources/client/index.js +9 -0
  28. package/resources/client/index.js.map +1 -0
  29. package/resources/client/index.mjs +4 -0
  30. package/resources/client/index.mjs.map +1 -0
  31. package/resources/client/ws.d.mts +23 -0
  32. package/resources/client/ws.d.mts.map +1 -0
  33. package/resources/client/ws.d.ts +23 -0
  34. package/resources/client/ws.d.ts.map +1 -0
  35. package/resources/client/ws.js +32 -0
  36. package/resources/client/ws.js.map +1 -0
  37. package/resources/client/ws.mjs +28 -0
  38. package/resources/client/ws.mjs.map +1 -0
  39. package/resources/client.d.mts +2 -0
  40. package/resources/client.d.mts.map +1 -0
  41. package/resources/client.d.ts +2 -0
  42. package/resources/client.d.ts.map +1 -0
  43. package/resources/client.js +6 -0
  44. package/resources/client.js.map +1 -0
  45. package/resources/client.mjs +3 -0
  46. package/resources/client.mjs.map +1 -0
  47. package/resources/index.d.mts +2 -1
  48. package/resources/index.d.mts.map +1 -1
  49. package/resources/index.d.ts +2 -1
  50. package/resources/index.d.ts.map +1 -1
  51. package/resources/index.js +3 -1
  52. package/resources/index.js.map +1 -1
  53. package/resources/index.mjs +1 -0
  54. package/resources/index.mjs.map +1 -1
  55. package/resources/matches/index.d.mts +1 -1
  56. package/resources/matches/index.d.mts.map +1 -1
  57. package/resources/matches/index.d.ts +1 -1
  58. package/resources/matches/index.d.ts.map +1 -1
  59. package/resources/matches/index.js.map +1 -1
  60. package/resources/matches/index.mjs.map +1 -1
  61. package/resources/matches/matches.d.mts +62 -1
  62. package/resources/matches/matches.d.mts.map +1 -1
  63. package/resources/matches/matches.d.ts +62 -1
  64. package/resources/matches/matches.d.ts.map +1 -1
  65. package/resources/matches/matches.js +49 -0
  66. package/resources/matches/matches.js.map +1 -1
  67. package/resources/matches/matches.mjs +49 -0
  68. package/resources/matches/matches.mjs.map +1 -1
  69. package/resources/pep-talk.d.mts +7 -6
  70. package/resources/pep-talk.d.mts.map +1 -1
  71. package/resources/pep-talk.d.ts +7 -6
  72. package/resources/pep-talk.d.ts.map +1 -1
  73. package/src/client.ts +7 -0
  74. package/src/resources/characters.ts +1 -1
  75. package/src/resources/client/client.ts +15 -0
  76. package/src/resources/client/index.ts +4 -0
  77. package/src/resources/client/ws.ts +31 -0
  78. package/src/resources/client.ts +3 -0
  79. package/src/resources/index.ts +2 -0
  80. package/src/resources/matches/index.ts +1 -0
  81. package/src/resources/matches/matches.ts +76 -0
  82. package/src/resources/pep-talk.ts +8 -7
  83. package/src/version.ts +1 -1
  84. package/version.d.mts +1 -1
  85. package/version.d.ts +1 -1
  86. package/version.js +1 -1
  87. package/version.mjs +1 -1
@@ -100,6 +100,55 @@ export class Matches extends APIResource {
100
100
  getTurningPoints(matchID, options) {
101
101
  return this._client.get(path `/matches/${matchID}/turning-points`, options);
102
102
  }
103
+ /**
104
+ * WebSocket endpoint for real-time live match simulation.
105
+ *
106
+ * Connect to receive a stream of match events as they happen in a simulated
107
+ * football match.
108
+ *
109
+ * ## Connection
110
+ *
111
+ * Connect via WebSocket with optional query parameters to customize the
112
+ * simulation.
113
+ *
114
+ * ## Example WebSocket URL
115
+ *
116
+ * ```
117
+ * ws://localhost:8000/matches/live?home_team=AFC%20Richmond&away_team=Manchester%20City&speed=2.0&excitement_level=7
118
+ * ```
119
+ *
120
+ * ## Server Messages
121
+ *
122
+ * The server sends JSON messages with these types:
123
+ *
124
+ * - `match_start` - When the match begins
125
+ * - `match_event` - For each match event (goals, fouls, cards, etc.)
126
+ * - `match_end` - When the match concludes
127
+ * - `error` - If an error occurs
128
+ * - `pong` - Response to client ping
129
+ *
130
+ * ## Client Messages
131
+ *
132
+ * Send JSON to control the simulation:
133
+ *
134
+ * - `{"action": "ping"}` - Keep-alive, server responds with `{"type": "pong"}`
135
+ * - `{"action": "pause"}` - Pause the simulation
136
+ * - `{"action": "resume"}` - Resume a paused simulation
137
+ * - `{"action": "set_speed", "speed": 2.0}` - Change playback speed (0.1-10.0)
138
+ * - `{"action": "get_status"}` - Request current match status
139
+ *
140
+ * @example
141
+ * ```ts
142
+ * await client.matches.streamLive();
143
+ * ```
144
+ */
145
+ streamLive(query = {}, options) {
146
+ return this._client.get('/matches/live', {
147
+ query,
148
+ ...options,
149
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
150
+ });
151
+ }
103
152
  }
104
153
  Matches.Commentary = Commentary;
105
154
  //# sourceMappingURL=matches.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"matches.mjs","sourceRoot":"","sources":["../../src/resources/matches/matches.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,aAAa;OAClB,EAAE,UAAU,EAA4B;OAExC,EAAe,aAAa,EAA4B;OACxD,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ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O,CAAC,UAAU,GAAG,UAAU,CAAC"}
@@ -29,25 +29,26 @@ export interface PepTalkRetrieveResponse {
29
29
  }
30
30
  export declare namespace PepTalkRetrieveResponse {
31
31
  /**
32
- * A chunk of a streaming pep talk.
32
+ * A chunk of a streaming pep talk from Ted.
33
33
  */
34
34
  interface Chunk {
35
35
  /**
36
36
  * Chunk sequence number
37
37
  */
38
38
  chunk_id: number;
39
+ /**
40
+ * Is this the final chunk
41
+ */
42
+ is_final: boolean;
39
43
  /**
40
44
  * The text of this chunk
41
45
  */
42
46
  text: string;
43
47
  /**
44
- * The emotional purpose of this chunk
48
+ * The emotional purpose of this chunk (e.g., greeting, acknowledgment, wisdom,
49
+ * affirmation, encouragement)
45
50
  */
46
51
  emotional_beat?: string | null;
47
- /**
48
- * Is this the final chunk
49
- */
50
- is_final?: boolean;
51
52
  }
52
53
  }
53
54
  export interface PepTalkRetrieveParams {
@@ -1 +1 @@
1
- {"version":3,"file":"pep-talk.d.mts","sourceRoot":"","sources":["../src/resources/pep-talk.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,QAAQ,CACN,KAAK,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;CAGvC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;IAE7C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,yBAAiB,uBAAuB,CAAC;IACvC;;OAEG;IACH,UAAiB,KAAK;QACpB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QAC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uB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
@@ -29,25 +29,26 @@ export interface PepTalkRetrieveResponse {
29
29
  }
30
30
  export declare namespace PepTalkRetrieveResponse {
31
31
  /**
32
- * A chunk of a streaming pep talk.
32
+ * A chunk of a streaming pep talk from Ted.
33
33
  */
34
34
  interface Chunk {
35
35
  /**
36
36
  * Chunk sequence number
37
37
  */
38
38
  chunk_id: number;
39
+ /**
40
+ * Is this the final chunk
41
+ */
42
+ is_final: boolean;
39
43
  /**
40
44
  * The text of this chunk
41
45
  */
42
46
  text: string;
43
47
  /**
44
- * The emotional purpose of this chunk
48
+ * The emotional purpose of this chunk (e.g., greeting, acknowledgment, wisdom,
49
+ * affirmation, encouragement)
45
50
  */
46
51
  emotional_beat?: string | null;
47
- /**
48
- * Is this the final chunk
49
- */
50
- is_final?: boolean;
51
52
  }
52
53
  }
53
54
  export interface PepTalkRetrieveParams {
@@ -1 +1 @@
1
- {"version":3,"file":"pep-talk.d.ts","sourceRoot":"","sources":["../src/resources/pep-talk.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,QAAQ,CACN,KAAK,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;CAGvC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;IAE7C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,yBAAiB,uBAAuB,CAAC;IACvC;;OAEG;IACH,UAAiB,KAAK;QACpB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,IA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O,CAAC;IAC/B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
package/src/client.ts CHANGED
@@ -112,6 +112,7 @@ import {
112
112
  MatchGetTurningPointsResponse,
113
113
  MatchListParams,
114
114
  MatchResult,
115
+ MatchStreamLiveParams,
115
116
  MatchType,
116
117
  MatchUpdateParams,
117
118
  Matches,
@@ -144,6 +145,7 @@ import {
144
145
  parseLogLevel,
145
146
  } from './internal/utils/log';
146
147
  import { isEmptyObj } from './internal/utils/values';
148
+ import { Client } from './resources/client/client';
147
149
 
148
150
  export interface ClientOptions {
149
151
  /**
@@ -873,6 +875,7 @@ export class Believe {
873
875
  webhooks: API.Webhooks = new API.Webhooks(this);
874
876
  health: API.Health = new API.Health(this);
875
877
  version: API.Version = new API.Version(this);
878
+ client: API.Client = new API.Client(this);
876
879
  }
877
880
 
878
881
  Believe.Characters = Characters;
@@ -892,6 +895,7 @@ Believe.TeamMembers = TeamMembers;
892
895
  Believe.Webhooks = Webhooks;
893
896
  Believe.Health = Health;
894
897
  Believe.Version = Version;
898
+ Believe.Client = Client;
895
899
 
896
900
  export declare namespace Believe {
897
901
  export type RequestOptions = Opts.RequestOptions;
@@ -944,6 +948,7 @@ export declare namespace Believe {
944
948
  type MatchCreateParams as MatchCreateParams,
945
949
  type MatchUpdateParams as MatchUpdateParams,
946
950
  type MatchListParams as MatchListParams,
951
+ type MatchStreamLiveParams as MatchStreamLiveParams,
947
952
  };
948
953
 
949
954
  export {
@@ -1054,4 +1059,6 @@ export declare namespace Believe {
1054
1059
  export { Health as Health, type HealthCheckResponse as HealthCheckResponse };
1055
1060
 
1056
1061
  export { Version as Version, type VersionRetrieveResponse as VersionRetrieveResponse };
1062
+
1063
+ export { Client as Client };
1057
1064
  }
@@ -67,7 +67,7 @@ export class Characters extends APIResource {
67
67
  }
68
68
 
69
69
  /**
70
- * Get a paginated list of all Ted Lasso characters with optional filtering.
70
+ * Get a paginated list of Ted Lasso characters with optional filtering.
71
71
  *
72
72
  * @example
73
73
  * ```ts
@@ -0,0 +1,15 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as WsAPI from './ws';
5
+ import { Ws } from './ws';
6
+
7
+ export class Client extends APIResource {
8
+ ws: WsAPI.Ws = new WsAPI.Ws(this._client);
9
+ }
10
+
11
+ Client.Ws = Ws;
12
+
13
+ export declare namespace Client {
14
+ export { Ws as Ws };
15
+ }
@@ -0,0 +1,4 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Client } from './client';
4
+ export { Ws } from './ws';
@@ -0,0 +1,31 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { buildHeaders } from '../../internal/headers';
6
+ import { RequestOptions } from '../../internal/request-options';
7
+
8
+ export class Ws extends APIResource {
9
+ /**
10
+ * Simple WebSocket test endpoint for connectivity testing.
11
+ *
12
+ * Connect to test WebSocket functionality. The server will:
13
+ *
14
+ * 1. Send a welcome message on connection
15
+ * 2. Echo back any message you send
16
+ *
17
+ * ## Example
18
+ *
19
+ * ```javascript
20
+ * const ws = new WebSocket("ws://localhost:8000/ws/test");
21
+ * ws.onmessage = (event) => console.log(event.data);
22
+ * ws.send("Hello!"); // Server responds with echo
23
+ * ```
24
+ */
25
+ test(options?: RequestOptions): APIPromise<void> {
26
+ return this._client.get('/ws/test', {
27
+ ...options,
28
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
29
+ });
30
+ }
31
+ }
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './client/index';
@@ -14,6 +14,7 @@ export {
14
14
  type CharacterListParams,
15
15
  type CharactersSkipLimitPage,
16
16
  } from './characters';
17
+ export { Client } from './client/client';
17
18
  export { Coaching } from './coaching/coaching';
18
19
  export { Conflicts, type ConflictResolveResponse, type ConflictResolveParams } from './conflicts';
19
20
  export {
@@ -39,6 +40,7 @@ export {
39
40
  type MatchCreateParams,
40
41
  type MatchUpdateParams,
41
42
  type MatchListParams,
43
+ type MatchStreamLiveParams,
42
44
  type MatchesSkipLimitPage,
43
45
  } from './matches/matches';
44
46
  export { PepTalk, type PepTalkRetrieveResponse, type PepTalkRetrieveParams } from './pep-talk';
@@ -12,5 +12,6 @@ export {
12
12
  type MatchCreateParams,
13
13
  type MatchUpdateParams,
14
14
  type MatchListParams,
15
+ type MatchStreamLiveParams,
15
16
  type MatchesSkipLimitPage,
16
17
  } from './matches';
@@ -111,6 +111,59 @@ export class Matches extends APIResource {
111
111
  getTurningPoints(matchID: string, options?: RequestOptions): APIPromise<MatchGetTurningPointsResponse> {
112
112
  return this._client.get(path`/matches/${matchID}/turning-points`, options);
113
113
  }
114
+
115
+ /**
116
+ * WebSocket endpoint for real-time live match simulation.
117
+ *
118
+ * Connect to receive a stream of match events as they happen in a simulated
119
+ * football match.
120
+ *
121
+ * ## Connection
122
+ *
123
+ * Connect via WebSocket with optional query parameters to customize the
124
+ * simulation.
125
+ *
126
+ * ## Example WebSocket URL
127
+ *
128
+ * ```
129
+ * ws://localhost:8000/matches/live?home_team=AFC%20Richmond&away_team=Manchester%20City&speed=2.0&excitement_level=7
130
+ * ```
131
+ *
132
+ * ## Server Messages
133
+ *
134
+ * The server sends JSON messages with these types:
135
+ *
136
+ * - `match_start` - When the match begins
137
+ * - `match_event` - For each match event (goals, fouls, cards, etc.)
138
+ * - `match_end` - When the match concludes
139
+ * - `error` - If an error occurs
140
+ * - `pong` - Response to client ping
141
+ *
142
+ * ## Client Messages
143
+ *
144
+ * Send JSON to control the simulation:
145
+ *
146
+ * - `{"action": "ping"}` - Keep-alive, server responds with `{"type": "pong"}`
147
+ * - `{"action": "pause"}` - Pause the simulation
148
+ * - `{"action": "resume"}` - Resume a paused simulation
149
+ * - `{"action": "set_speed", "speed": 2.0}` - Change playback speed (0.1-10.0)
150
+ * - `{"action": "get_status"}` - Request current match status
151
+ *
152
+ * @example
153
+ * ```ts
154
+ * await client.matches.streamLive();
155
+ * ```
156
+ */
157
+ streamLive(
158
+ query: MatchStreamLiveParams | null | undefined = {},
159
+ options?: RequestOptions,
160
+ ): APIPromise<void> {
161
+ return this._client.get('/matches/live', {
162
+ query,
163
+ ...options,
164
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
165
+ });
166
+ }
114
167
  }
115
168
 
116
169
  export type MatchesSkipLimitPage = SkipLimitPage<Match>;
@@ -371,6 +424,28 @@ export interface MatchListParams extends SkipLimitPageParams {
371
424
  team_id?: string | null;
372
425
  }
373
426
 
427
+ export interface MatchStreamLiveParams {
428
+ /**
429
+ * Away team name
430
+ */
431
+ away_team?: string;
432
+
433
+ /**
434
+ * How eventful the match should be (1=boring, 10=chaos)
435
+ */
436
+ excitement_level?: number;
437
+
438
+ /**
439
+ * Home team name
440
+ */
441
+ home_team?: string;
442
+
443
+ /**
444
+ * Simulation speed multiplier (1.0 = real-time)
445
+ */
446
+ speed?: number;
447
+ }
448
+
374
449
  Matches.Commentary = Commentary;
375
450
 
376
451
  export declare namespace Matches {
@@ -385,6 +460,7 @@ export declare namespace Matches {
385
460
  type MatchCreateParams as MatchCreateParams,
386
461
  type MatchUpdateParams as MatchUpdateParams,
387
462
  type MatchListParams as MatchListParams,
463
+ type MatchStreamLiveParams as MatchStreamLiveParams,
388
464
  };
389
465
 
390
466
  export { Commentary as Commentary, type CommentaryStreamResponse as CommentaryStreamResponse };
@@ -40,7 +40,7 @@ export interface PepTalkRetrieveResponse {
40
40
 
41
41
  export namespace PepTalkRetrieveResponse {
42
42
  /**
43
- * A chunk of a streaming pep talk.
43
+ * A chunk of a streaming pep talk from Ted.
44
44
  */
45
45
  export interface Chunk {
46
46
  /**
@@ -49,19 +49,20 @@ export namespace PepTalkRetrieveResponse {
49
49
  chunk_id: number;
50
50
 
51
51
  /**
52
- * The text of this chunk
52
+ * Is this the final chunk
53
53
  */
54
- text: string;
54
+ is_final: boolean;
55
55
 
56
56
  /**
57
- * The emotional purpose of this chunk
57
+ * The text of this chunk
58
58
  */
59
- emotional_beat?: string | null;
59
+ text: string;
60
60
 
61
61
  /**
62
- * Is this the final chunk
62
+ * The emotional purpose of this chunk (e.g., greeting, acknowledgment, wisdom,
63
+ * affirmation, encouragement)
63
64
  */
64
- is_final?: boolean;
65
+ emotional_beat?: string | null;
65
66
  }
66
67
  }
67
68
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.3.0'; // x-release-please-version
1
+ export const VERSION = '0.4.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.3.0";
1
+ export declare const VERSION = "0.4.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.3.0";
1
+ export declare const VERSION = "0.4.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.3.0'; // x-release-please-version
4
+ exports.VERSION = '0.4.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.3.0'; // x-release-please-version
1
+ export const VERSION = '0.4.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map