@valtown/sdk 0.38.2 → 1.0.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 (226) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +0 -30
  3. package/core.d.ts +1 -1
  4. package/core.d.ts.map +1 -1
  5. package/core.js +5 -5
  6. package/core.js.map +1 -1
  7. package/core.mjs +5 -5
  8. package/core.mjs.map +1 -1
  9. package/index.d.mts +5 -12
  10. package/index.d.ts +5 -12
  11. package/index.d.ts.map +1 -1
  12. package/index.js +2 -9
  13. package/index.js.map +1 -1
  14. package/index.mjs +3 -10
  15. package/index.mjs.map +1 -1
  16. package/package.json +1 -1
  17. package/resources/alias/username/index.d.ts +1 -2
  18. package/resources/alias/username/index.d.ts.map +1 -1
  19. package/resources/alias/username/index.js +1 -3
  20. package/resources/alias/username/index.js.map +1 -1
  21. package/resources/alias/username/index.mjs +0 -1
  22. package/resources/alias/username/index.mjs.map +1 -1
  23. package/resources/alias/username/username.d.ts +2 -6
  24. package/resources/alias/username/username.d.ts.map +1 -1
  25. package/resources/alias/username/username.js +0 -4
  26. package/resources/alias/username/username.js.map +1 -1
  27. package/resources/alias/username/username.mjs +0 -4
  28. package/resources/alias/username/username.mjs.map +1 -1
  29. package/resources/alias/username/val-name.d.ts +2 -87
  30. package/resources/alias/username/val-name.d.ts.map +1 -1
  31. package/resources/alias/username/val-name.js +1 -1
  32. package/resources/alias/username/val-name.js.map +1 -1
  33. package/resources/alias/username/val-name.mjs +1 -1
  34. package/resources/alias/username/val-name.mjs.map +1 -1
  35. package/resources/index.d.ts +2 -3
  36. package/resources/index.d.ts.map +1 -1
  37. package/resources/index.js +2 -5
  38. package/resources/index.js.map +1 -1
  39. package/resources/index.mjs +2 -3
  40. package/resources/index.mjs.map +1 -1
  41. package/resources/me/index.d.ts +1 -4
  42. package/resources/me/index.d.ts.map +1 -1
  43. package/resources/me/index.js +3 -12
  44. package/resources/me/index.js.map +1 -1
  45. package/resources/me/index.mjs +1 -4
  46. package/resources/me/index.mjs.map +1 -1
  47. package/resources/me/me.d.ts +4 -16
  48. package/resources/me/me.d.ts.map +1 -1
  49. package/resources/me/me.js +4 -19
  50. package/resources/me/me.js.map +1 -1
  51. package/resources/me/me.mjs +4 -19
  52. package/resources/me/me.mjs.map +1 -1
  53. package/resources/{users → me}/vals.d.ts +4 -4
  54. package/resources/me/vals.d.ts.map +1 -0
  55. package/resources/me/vals.js +17 -0
  56. package/resources/me/vals.js.map +1 -0
  57. package/resources/me/vals.mjs +13 -0
  58. package/resources/me/vals.mjs.map +1 -0
  59. package/resources/search/index.d.ts +1 -1
  60. package/resources/search/index.d.ts.map +1 -1
  61. package/resources/search/index.js +2 -1
  62. package/resources/search/index.js.map +1 -1
  63. package/resources/search/index.mjs +1 -1
  64. package/resources/search/index.mjs.map +1 -1
  65. package/resources/search/search.d.ts +2 -2
  66. package/resources/search/search.d.ts.map +1 -1
  67. package/resources/search/search.js +1 -0
  68. package/resources/search/search.js.map +1 -1
  69. package/resources/search/search.mjs +2 -1
  70. package/resources/search/search.mjs.map +1 -1
  71. package/resources/search/vals.d.ts +78 -6
  72. package/resources/search/vals.d.ts.map +1 -1
  73. package/resources/search/vals.js +7 -4
  74. package/resources/search/vals.js.map +1 -1
  75. package/resources/search/vals.mjs +5 -3
  76. package/resources/search/vals.mjs.map +1 -1
  77. package/resources/shared.d.ts +36 -157
  78. package/resources/shared.d.ts.map +1 -1
  79. package/resources/shared.js +3 -3
  80. package/resources/shared.js.map +1 -1
  81. package/resources/shared.mjs +1 -1
  82. package/resources/shared.mjs.map +1 -1
  83. package/resources/users.d.ts +12 -1
  84. package/resources/users.d.ts.map +1 -1
  85. package/resources/users.js +14 -15
  86. package/resources/users.js.map +1 -1
  87. package/resources/users.mjs +12 -1
  88. package/resources/users.mjs.map +1 -1
  89. package/resources/{projects → vals}/branches.d.ts +8 -8
  90. package/resources/vals/branches.d.ts.map +1 -0
  91. package/resources/{projects → vals}/branches.js +12 -12
  92. package/resources/vals/branches.js.map +1 -0
  93. package/resources/vals/branches.mjs +39 -0
  94. package/resources/vals/branches.mjs.map +1 -0
  95. package/resources/{projects → vals}/files.d.ts +26 -37
  96. package/resources/vals/files.d.ts.map +1 -0
  97. package/resources/{projects → vals}/files.js +18 -26
  98. package/resources/vals/files.js.map +1 -0
  99. package/resources/{projects → vals}/files.mjs +18 -26
  100. package/resources/vals/files.mjs.map +1 -0
  101. package/resources/vals/index.d.ts +3 -2
  102. package/resources/vals/index.d.ts.map +1 -1
  103. package/resources/vals/index.js +7 -4
  104. package/resources/vals/index.js.map +1 -1
  105. package/resources/vals/index.mjs +3 -2
  106. package/resources/vals/index.mjs.map +1 -1
  107. package/resources/vals/vals.d.ts +22 -114
  108. package/resources/vals/vals.d.ts.map +1 -1
  109. package/resources/vals/vals.js +20 -40
  110. package/resources/vals/vals.js.map +1 -1
  111. package/resources/vals/vals.mjs +19 -39
  112. package/resources/vals/vals.mjs.map +1 -1
  113. package/src/core.ts +4 -4
  114. package/src/index.ts +5 -47
  115. package/src/resources/alias/username/index.ts +1 -2
  116. package/src/resources/alias/username/username.ts +2 -8
  117. package/src/resources/alias/username/val-name.ts +3 -115
  118. package/src/resources/index.ts +2 -19
  119. package/src/resources/me/index.ts +1 -19
  120. package/src/resources/me/me.ts +5 -56
  121. package/src/resources/{users → me}/vals.ts +5 -9
  122. package/src/resources/search/index.ts +1 -1
  123. package/src/resources/search/search.ts +8 -2
  124. package/src/resources/search/vals.ts +103 -8
  125. package/src/resources/shared.ts +47 -197
  126. package/src/resources/users.ts +15 -1
  127. package/src/resources/{projects → vals}/branches.ts +12 -12
  128. package/src/resources/{projects → vals}/files.ts +33 -55
  129. package/src/resources/vals/index.ts +20 -15
  130. package/src/resources/vals/vals.ts +65 -181
  131. package/src/version.ts +1 -1
  132. package/version.d.ts +1 -1
  133. package/version.d.ts.map +1 -1
  134. package/version.js +1 -1
  135. package/version.js.map +1 -1
  136. package/version.mjs +1 -1
  137. package/version.mjs.map +1 -1
  138. package/resources/alias/username/project-name.d.ts +0 -51
  139. package/resources/alias/username/project-name.d.ts.map +0 -1
  140. package/resources/alias/username/project-name.js +0 -15
  141. package/resources/alias/username/project-name.js.map +0 -1
  142. package/resources/alias/username/project-name.mjs +0 -11
  143. package/resources/alias/username/project-name.mjs.map +0 -1
  144. package/resources/me/comments.d.ts +0 -74
  145. package/resources/me/comments.d.ts.map +0 -1
  146. package/resources/me/comments.js +0 -23
  147. package/resources/me/comments.js.map +0 -1
  148. package/resources/me/comments.mjs +0 -18
  149. package/resources/me/comments.mjs.map +0 -1
  150. package/resources/me/likes.d.ts +0 -18
  151. package/resources/me/likes.d.ts.map +0 -1
  152. package/resources/me/likes.js +0 -17
  153. package/resources/me/likes.js.map +0 -1
  154. package/resources/me/likes.mjs +0 -13
  155. package/resources/me/likes.mjs.map +0 -1
  156. package/resources/me/projects.d.ts +0 -56
  157. package/resources/me/projects.d.ts.map +0 -1
  158. package/resources/me/projects.js +0 -23
  159. package/resources/me/projects.js.map +0 -1
  160. package/resources/me/projects.mjs +0 -18
  161. package/resources/me/projects.mjs.map +0 -1
  162. package/resources/me/references.d.ts +0 -84
  163. package/resources/me/references.d.ts.map +0 -1
  164. package/resources/me/references.js +0 -23
  165. package/resources/me/references.js.map +0 -1
  166. package/resources/me/references.mjs +0 -18
  167. package/resources/me/references.mjs.map +0 -1
  168. package/resources/projects/branches.d.ts.map +0 -1
  169. package/resources/projects/branches.js.map +0 -1
  170. package/resources/projects/branches.mjs +0 -39
  171. package/resources/projects/branches.mjs.map +0 -1
  172. package/resources/projects/files.d.ts.map +0 -1
  173. package/resources/projects/files.js.map +0 -1
  174. package/resources/projects/files.mjs.map +0 -1
  175. package/resources/projects/index.d.ts +0 -4
  176. package/resources/projects/index.d.ts.map +0 -1
  177. package/resources/projects/index.js +0 -14
  178. package/resources/projects/index.js.map +0 -1
  179. package/resources/projects/index.mjs +0 -5
  180. package/resources/projects/index.mjs.map +0 -1
  181. package/resources/projects/projects.d.ts +0 -162
  182. package/resources/projects/projects.d.ts.map +0 -1
  183. package/resources/projects/projects.js +0 -80
  184. package/resources/projects/projects.js.map +0 -1
  185. package/resources/projects/projects.mjs +0 -52
  186. package/resources/projects/projects.mjs.map +0 -1
  187. package/resources/projects.d.ts +0 -2
  188. package/resources/projects.d.ts.map +0 -1
  189. package/resources/projects.js +0 -19
  190. package/resources/projects.js.map +0 -1
  191. package/resources/projects.mjs +0 -3
  192. package/resources/projects.mjs.map +0 -1
  193. package/resources/users/index.d.ts +0 -3
  194. package/resources/users/index.d.ts.map +0 -1
  195. package/resources/users/index.js +0 -9
  196. package/resources/users/index.js.map +0 -1
  197. package/resources/users/index.mjs +0 -4
  198. package/resources/users/index.mjs.map +0 -1
  199. package/resources/users/users.d.ts +0 -19
  200. package/resources/users/users.d.ts.map +0 -1
  201. package/resources/users/users.js +0 -48
  202. package/resources/users/users.js.map +0 -1
  203. package/resources/users/users.mjs +0 -21
  204. package/resources/users/users.mjs.map +0 -1
  205. package/resources/users/vals.d.ts.map +0 -1
  206. package/resources/users/vals.js +0 -17
  207. package/resources/users/vals.js.map +0 -1
  208. package/resources/users/vals.mjs +0 -13
  209. package/resources/users/vals.mjs.map +0 -1
  210. package/resources/vals/versions.d.ts +0 -75
  211. package/resources/vals/versions.d.ts.map +0 -1
  212. package/resources/vals/versions.js +0 -44
  213. package/resources/vals/versions.js.map +0 -1
  214. package/resources/vals/versions.mjs +0 -39
  215. package/resources/vals/versions.mjs.map +0 -1
  216. package/src/resources/alias/username/project-name.ts +0 -72
  217. package/src/resources/me/comments.ts +0 -108
  218. package/src/resources/me/likes.ts +0 -27
  219. package/src/resources/me/projects.ts +0 -85
  220. package/src/resources/me/references.ts +0 -114
  221. package/src/resources/projects/index.ts +0 -32
  222. package/src/resources/projects/projects.ts +0 -275
  223. package/src/resources/projects.ts +0 -3
  224. package/src/resources/users/index.ts +0 -4
  225. package/src/resources/users/users.ts +0 -27
  226. package/src/resources/vals/versions.ts +0 -126
@@ -2,125 +2,13 @@
2
2
 
3
3
  import { APIResource } from '../../../resource';
4
4
  import * as Core from '../../../core';
5
+ import * as Shared from '../../shared';
5
6
 
6
7
  export class ValName extends APIResource {
7
8
  /**
8
9
  * Get a val
9
10
  */
10
- retrieve(
11
- username: string,
12
- valName: string,
13
- options?: Core.RequestOptions,
14
- ): Core.APIPromise<ValNameRetrieveResponse> {
15
- return this._client.get(`/v1/alias/${username}/${valName}`, options);
11
+ retrieve(username: string, valName: string, options?: Core.RequestOptions): Core.APIPromise<Shared.Val> {
12
+ return this._client.get(`/v2/alias/vals/${username}/${valName}`, options);
16
13
  }
17
14
  }
18
-
19
- /**
20
- * A Val
21
- */
22
- export interface ValNameRetrieveResponse {
23
- /**
24
- * This val's id
25
- */
26
- id: string;
27
-
28
- /**
29
- * The user who created this val
30
- */
31
- author: ValNameRetrieveResponse.Author | null;
32
-
33
- /**
34
- * TypeScript code associated with this val
35
- */
36
- code: string | null;
37
-
38
- createdAt: string;
39
-
40
- /**
41
- * How many likes this val has received
42
- */
43
- likeCount: number;
44
-
45
- links: ValNameRetrieveResponse.Links;
46
-
47
- /**
48
- * The name of this val
49
- */
50
- name: string;
51
-
52
- /**
53
- * This resource's privacy setting. Unlisted resources do not appear on profile
54
- * pages or elsewhere, but you can link to them.
55
- */
56
- privacy: 'public' | 'unlisted' | 'private';
57
-
58
- /**
59
- * Whether this val is available publicly on Val Town
60
- */
61
- public: boolean;
62
-
63
- /**
64
- * This val's readme, as Markdown
65
- */
66
- readme: string | null;
67
-
68
- referenceCount: number;
69
-
70
- /**
71
- * The type of a val. HTTP can receive web requests, Email can receive emails, Cron
72
- * runs periodically, and Script can be used for libraries or one-off calculations
73
- */
74
- type: 'interval' | 'http' | 'express' | 'email' | 'script' | 'rpc' | 'httpnext';
75
-
76
- updatedAt: string;
77
-
78
- /**
79
- * The URL of this resource on the Val Town website
80
- */
81
- url: string;
82
-
83
- /**
84
- * The version of this val, starting at zero
85
- */
86
- version: number;
87
-
88
- versionCreatedAt?: string;
89
- }
90
-
91
- export namespace ValNameRetrieveResponse {
92
- /**
93
- * The user who created this val
94
- */
95
- export interface Author {
96
- id: string;
97
-
98
- username: string | null;
99
- }
100
-
101
- export interface Links {
102
- /**
103
- * The URL of this Val's source code as a module
104
- */
105
- module: string;
106
-
107
- /**
108
- * The URL of this val on this API
109
- */
110
- self: string;
111
-
112
- /**
113
- * The endpoint to retrieve this val's versions
114
- */
115
- versions: string;
116
-
117
- /**
118
- * This val's web endpoint, where it serves a website or API
119
- */
120
- endpoint?: string;
121
- }
122
- }
123
-
124
- export declare namespace ValName {
125
- export { type ValNameRetrieveResponse as ValNameRetrieveResponse };
126
- }
@@ -5,24 +5,7 @@ export { Alias } from './alias/alias';
5
5
  export { Blobs, type BlobListResponse, type BlobListParams, type BlobStoreParams } from './blobs';
6
6
  export { Emails, type EmailSendResponse, type EmailSendParams } from './emails';
7
7
  export { Me } from './me/me';
8
- export {
9
- ProjectListResponsesPageCursorURL,
10
- Projects,
11
- type ProjectCreateResponse,
12
- type ProjectRetrieveResponse,
13
- type ProjectListResponse,
14
- type ProjectCreateParams,
15
- type ProjectListParams,
16
- } from './projects/projects';
17
8
  export { Search } from './search/search';
18
9
  export { Sqlite, type SqliteBatchResponse, type SqliteBatchParams, type SqliteExecuteParams } from './sqlite';
19
- export { Users } from './users/users';
20
- export {
21
- Vals,
22
- type ValListResponse,
23
- type ValCancelEvaluationResponse,
24
- type ValCreateParams,
25
- type ValUpdateParams,
26
- type ValListParams,
27
- type ValCreateOrUpdateParams,
28
- } from './vals/vals';
10
+ export { Users } from './users';
11
+ export { Vals, type ValCreateParams, type ValListParams } from './vals/vals';
@@ -1,23 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export {
4
- CommentListResponsesPageCursorURL,
5
- Comments,
6
- type CommentListResponse,
7
- type CommentListParams,
8
- } from './comments';
9
- export { Likes, type LikeListParams } from './likes';
10
3
  export { Me } from './me';
11
4
  export { Profile, type ProfileRetrieveResponse } from './profile';
12
- export {
13
- ProjectListResponsesPageCursorURL,
14
- Projects,
15
- type ProjectListResponse,
16
- type ProjectListParams,
17
- } from './projects';
18
- export {
19
- ReferenceListResponsesPageCursorURL,
20
- References,
21
- type ReferenceListResponse,
22
- type ReferenceListParams,
23
- } from './references';
5
+ export { Vals, type ValListParams } from './vals';
@@ -1,75 +1,24 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../resource';
4
- import * as CommentsAPI from './comments';
5
- import {
6
- CommentListParams,
7
- CommentListResponse,
8
- CommentListResponsesPageCursorURL,
9
- Comments,
10
- } from './comments';
11
- import * as LikesAPI from './likes';
12
- import { LikeListParams, Likes } from './likes';
13
4
  import * as ProfileAPI from './profile';
14
5
  import { Profile, ProfileRetrieveResponse } from './profile';
15
- import * as ProjectsAPI from './projects';
16
- import {
17
- ProjectListParams,
18
- ProjectListResponse,
19
- ProjectListResponsesPageCursorURL,
20
- Projects,
21
- } from './projects';
22
- import * as ReferencesAPI from './references';
23
- import {
24
- ReferenceListParams,
25
- ReferenceListResponse,
26
- ReferenceListResponsesPageCursorURL,
27
- References,
28
- } from './references';
6
+ import * as ValsAPI from './vals';
7
+ import { ValListParams, Vals } from './vals';
29
8
 
30
9
  /**
31
10
  * Methods to get information about your own profile and resources
32
11
  */
33
12
  export class Me extends APIResource {
34
13
  profile: ProfileAPI.Profile = new ProfileAPI.Profile(this._client);
35
- likes: LikesAPI.Likes = new LikesAPI.Likes(this._client);
36
- comments: CommentsAPI.Comments = new CommentsAPI.Comments(this._client);
37
- references: ReferencesAPI.References = new ReferencesAPI.References(this._client);
38
- projects: ProjectsAPI.Projects = new ProjectsAPI.Projects(this._client);
14
+ vals: ValsAPI.Vals = new ValsAPI.Vals(this._client);
39
15
  }
40
16
 
41
17
  Me.Profile = Profile;
42
- Me.Likes = Likes;
43
- Me.Comments = Comments;
44
- Me.CommentListResponsesPageCursorURL = CommentListResponsesPageCursorURL;
45
- Me.References = References;
46
- Me.ReferenceListResponsesPageCursorURL = ReferenceListResponsesPageCursorURL;
47
- Me.Projects = Projects;
48
- Me.ProjectListResponsesPageCursorURL = ProjectListResponsesPageCursorURL;
18
+ Me.Vals = Vals;
49
19
 
50
20
  export declare namespace Me {
51
21
  export { Profile as Profile, type ProfileRetrieveResponse as ProfileRetrieveResponse };
52
22
 
53
- export { Likes as Likes, type LikeListParams as LikeListParams };
54
-
55
- export {
56
- Comments as Comments,
57
- type CommentListResponse as CommentListResponse,
58
- CommentListResponsesPageCursorURL as CommentListResponsesPageCursorURL,
59
- type CommentListParams as CommentListParams,
60
- };
61
-
62
- export {
63
- References as References,
64
- type ReferenceListResponse as ReferenceListResponse,
65
- ReferenceListResponsesPageCursorURL as ReferenceListResponsesPageCursorURL,
66
- type ReferenceListParams as ReferenceListParams,
67
- };
68
-
69
- export {
70
- Projects as Projects,
71
- type ProjectListResponse as ProjectListResponse,
72
- ProjectListResponsesPageCursorURL as ProjectListResponsesPageCursorURL,
73
- type ProjectListParams as ProjectListParams,
74
- };
23
+ export { Vals as Vals, type ValListParams as ValListParams };
75
24
  }
@@ -3,19 +3,15 @@
3
3
  import { APIResource } from '../../resource';
4
4
  import * as Core from '../../core';
5
5
  import * as Shared from '../shared';
6
- import { BasicValsPageCursorURL } from '../shared';
6
+ import { ValsPageCursorURL } from '../shared';
7
7
  import { type PageCursorURLParams } from '../../pagination';
8
8
 
9
9
  export class Vals extends APIResource {
10
10
  /**
11
- * List a user's vals
11
+ * [BETA] List all of a user's vals for authenticated users
12
12
  */
13
- list(
14
- userId: string,
15
- query: ValListParams,
16
- options?: Core.RequestOptions,
17
- ): Core.PagePromise<BasicValsPageCursorURL, Shared.BasicVal> {
18
- return this._client.getAPIList(`/v1/users/${userId}/vals`, BasicValsPageCursorURL, { query, ...options });
13
+ list(query: ValListParams, options?: Core.RequestOptions): Core.PagePromise<ValsPageCursorURL, Shared.Val> {
14
+ return this._client.getAPIList('/v2/me/vals', ValsPageCursorURL, { query, ...options });
19
15
  }
20
16
  }
21
17
 
@@ -25,4 +21,4 @@ export declare namespace Vals {
25
21
  export { type ValListParams as ValListParams };
26
22
  }
27
23
 
28
- export { BasicValsPageCursorURL };
24
+ export { ValsPageCursorURL };
@@ -1,4 +1,4 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  export { Search } from './search';
4
- export { Vals, type ValListParams } from './vals';
4
+ export { ValListResponsesPageCursorURL, Vals, type ValListResponse, type ValListParams } from './vals';
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../../resource';
4
4
  import * as ValsAPI from './vals';
5
- import { ValListParams, Vals } from './vals';
5
+ import { ValListParams, ValListResponse, ValListResponsesPageCursorURL, Vals } from './vals';
6
6
 
7
7
  /**
8
8
  * Search endpoint for vals
@@ -12,7 +12,13 @@ export class Search extends APIResource {
12
12
  }
13
13
 
14
14
  Search.Vals = Vals;
15
+ Search.ValListResponsesPageCursorURL = ValListResponsesPageCursorURL;
15
16
 
16
17
  export declare namespace Search {
17
- export { Vals as Vals, type ValListParams as ValListParams };
18
+ export {
19
+ Vals as Vals,
20
+ type ValListResponse as ValListResponse,
21
+ ValListResponsesPageCursorURL as ValListResponsesPageCursorURL,
22
+ type ValListParams as ValListParams,
23
+ };
18
24
  }
@@ -2,9 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../../resource';
4
4
  import * as Core from '../../core';
5
- import * as Shared from '../shared';
6
- import { BasicValsPageCursorURL } from '../shared';
7
- import { type PageCursorURLParams } from '../../pagination';
5
+ import { PageCursorURL, type PageCursorURLParams } from '../../pagination';
8
6
 
9
7
  export class Vals extends APIResource {
10
8
  /**
@@ -13,8 +11,101 @@ export class Vals extends APIResource {
13
11
  list(
14
12
  query: ValListParams,
15
13
  options?: Core.RequestOptions,
16
- ): Core.PagePromise<BasicValsPageCursorURL, Shared.BasicVal> {
17
- return this._client.getAPIList('/v1/search/vals', BasicValsPageCursorURL, { query, ...options });
14
+ ): Core.PagePromise<ValListResponsesPageCursorURL, ValListResponse> {
15
+ return this._client.getAPIList('/v1/search/vals', ValListResponsesPageCursorURL, { query, ...options });
16
+ }
17
+ }
18
+
19
+ export class ValListResponsesPageCursorURL extends PageCursorURL<ValListResponse> {}
20
+
21
+ /**
22
+ * A Val
23
+ */
24
+ export interface ValListResponse {
25
+ /**
26
+ * This val's id
27
+ */
28
+ id: string;
29
+
30
+ /**
31
+ * The user who created this val
32
+ */
33
+ author: ValListResponse.Author | null;
34
+
35
+ /**
36
+ * TypeScript code associated with this val
37
+ */
38
+ code: string | null;
39
+
40
+ createdAt: string;
41
+
42
+ links: ValListResponse.Links;
43
+
44
+ /**
45
+ * The name of this val
46
+ */
47
+ name: string;
48
+
49
+ /**
50
+ * This resource's privacy setting. Unlisted resources do not appear on profile
51
+ * pages or elsewhere, but you can link to them.
52
+ */
53
+ privacy: 'public' | 'unlisted' | 'private';
54
+
55
+ /**
56
+ * Whether this val is available publicly on Val Town
57
+ */
58
+ public: boolean;
59
+
60
+ /**
61
+ * The type of a val. HTTP can receive web requests, Email can receive emails, Cron
62
+ * runs periodically, and Script can be used for libraries or one-off calculations
63
+ */
64
+ type: 'interval' | 'http' | 'express' | 'email' | 'script' | 'rpc' | 'httpnext';
65
+
66
+ updatedAt: string;
67
+
68
+ /**
69
+ * The URL of this resource on the Val Town website
70
+ */
71
+ url: string;
72
+
73
+ /**
74
+ * The version of this val, starting at zero
75
+ */
76
+ version: number;
77
+ }
78
+
79
+ export namespace ValListResponse {
80
+ /**
81
+ * The user who created this val
82
+ */
83
+ export interface Author {
84
+ id: string;
85
+
86
+ username: string | null;
87
+ }
88
+
89
+ export interface Links {
90
+ /**
91
+ * The URL of this Val's source code as a module
92
+ */
93
+ module: string;
94
+
95
+ /**
96
+ * The URL of this val on this API
97
+ */
98
+ self: string;
99
+
100
+ /**
101
+ * The endpoint to retrieve this val's versions
102
+ */
103
+ versions: string;
104
+
105
+ /**
106
+ * This val's web endpoint, where it serves a website or API
107
+ */
108
+ endpoint?: string;
18
109
  }
19
110
  }
20
111
 
@@ -25,8 +116,12 @@ export interface ValListParams extends PageCursorURLParams {
25
116
  query: string;
26
117
  }
27
118
 
119
+ Vals.ValListResponsesPageCursorURL = ValListResponsesPageCursorURL;
120
+
28
121
  export declare namespace Vals {
29
- export { type ValListParams as ValListParams };
122
+ export {
123
+ type ValListResponse as ValListResponse,
124
+ ValListResponsesPageCursorURL as ValListResponsesPageCursorURL,
125
+ type ValListParams as ValListParams,
126
+ };
30
127
  }
31
-
32
- export { BasicValsPageCursorURL };
@@ -2,202 +2,6 @@
2
2
 
3
3
  import { PageCursorURL } from '../pagination';
4
4
 
5
- /**
6
- * A Val
7
- */
8
- export interface BasicVal {
9
- /**
10
- * This val's id
11
- */
12
- id: string;
13
-
14
- /**
15
- * The user who created this val
16
- */
17
- author: BasicVal.Author | null;
18
-
19
- /**
20
- * TypeScript code associated with this val
21
- */
22
- code: string | null;
23
-
24
- createdAt: string;
25
-
26
- links: BasicVal.Links;
27
-
28
- /**
29
- * The name of this val
30
- */
31
- name: string;
32
-
33
- /**
34
- * This resource's privacy setting. Unlisted resources do not appear on profile
35
- * pages or elsewhere, but you can link to them.
36
- */
37
- privacy: 'public' | 'unlisted' | 'private';
38
-
39
- /**
40
- * Whether this val is available publicly on Val Town
41
- */
42
- public: boolean;
43
-
44
- /**
45
- * The type of a val. HTTP can receive web requests, Email can receive emails, Cron
46
- * runs periodically, and Script can be used for libraries or one-off calculations
47
- */
48
- type: 'interval' | 'http' | 'express' | 'email' | 'script' | 'rpc' | 'httpnext';
49
-
50
- updatedAt: string;
51
-
52
- /**
53
- * The URL of this resource on the Val Town website
54
- */
55
- url: string;
56
-
57
- /**
58
- * The version of this val, starting at zero
59
- */
60
- version: number;
61
- }
62
-
63
- export namespace BasicVal {
64
- /**
65
- * The user who created this val
66
- */
67
- export interface Author {
68
- id: string;
69
-
70
- username: string | null;
71
- }
72
-
73
- export interface Links {
74
- /**
75
- * The URL of this Val's source code as a module
76
- */
77
- module: string;
78
-
79
- /**
80
- * The URL of this val on this API
81
- */
82
- self: string;
83
-
84
- /**
85
- * The endpoint to retrieve this val's versions
86
- */
87
- versions: string;
88
-
89
- /**
90
- * This val's web endpoint, where it serves a website or API
91
- */
92
- endpoint?: string;
93
- }
94
- }
95
-
96
- /**
97
- * A Val
98
- */
99
- export interface ExtendedVal {
100
- /**
101
- * This val's id
102
- */
103
- id: string;
104
-
105
- /**
106
- * The user who created this val
107
- */
108
- author: ExtendedVal.Author | null;
109
-
110
- /**
111
- * TypeScript code associated with this val
112
- */
113
- code: string | null;
114
-
115
- createdAt: string;
116
-
117
- /**
118
- * How many likes this val has received
119
- */
120
- likeCount: number;
121
-
122
- links: ExtendedVal.Links;
123
-
124
- /**
125
- * The name of this val
126
- */
127
- name: string;
128
-
129
- /**
130
- * This resource's privacy setting. Unlisted resources do not appear on profile
131
- * pages or elsewhere, but you can link to them.
132
- */
133
- privacy: 'public' | 'unlisted' | 'private';
134
-
135
- /**
136
- * Whether this val is available publicly on Val Town
137
- */
138
- public: boolean;
139
-
140
- /**
141
- * This val's readme, as Markdown
142
- */
143
- readme: string | null;
144
-
145
- referenceCount: number;
146
-
147
- /**
148
- * The type of a val. HTTP can receive web requests, Email can receive emails, Cron
149
- * runs periodically, and Script can be used for libraries or one-off calculations
150
- */
151
- type: 'interval' | 'http' | 'express' | 'email' | 'script' | 'rpc' | 'httpnext';
152
-
153
- updatedAt: string;
154
-
155
- /**
156
- * The URL of this resource on the Val Town website
157
- */
158
- url: string;
159
-
160
- /**
161
- * The version of this val, starting at zero
162
- */
163
- version: number;
164
-
165
- versionCreatedAt?: string;
166
- }
167
-
168
- export namespace ExtendedVal {
169
- /**
170
- * The user who created this val
171
- */
172
- export interface Author {
173
- id: string;
174
-
175
- username: string | null;
176
- }
177
-
178
- export interface Links {
179
- /**
180
- * The URL of this Val's source code as a module
181
- */
182
- module: string;
183
-
184
- /**
185
- * The URL of this val on this API
186
- */
187
- self: string;
188
-
189
- /**
190
- * The endpoint to retrieve this val's versions
191
- */
192
- versions: string;
193
-
194
- /**
195
- * This val's web endpoint, where it serves a website or API
196
- */
197
- endpoint?: string;
198
- }
199
- }
200
-
201
5
  /**
202
6
  * Links to use for pagination
203
7
  */
@@ -303,4 +107,50 @@ export namespace User {
303
107
  }
304
108
  }
305
109
 
306
- export class BasicValsPageCursorURL extends PageCursorURL<BasicVal> {}
110
+ /**
111
+ * A Val
112
+ */
113
+ export interface Val {
114
+ /**
115
+ * The id of the val
116
+ */
117
+ id: string;
118
+
119
+ author: Val.Author;
120
+
121
+ createdAt: string;
122
+
123
+ description: string | null;
124
+
125
+ links: Val.Links;
126
+
127
+ name: string;
128
+
129
+ /**
130
+ * This resource's privacy setting. Unlisted resources do not appear on profile
131
+ * pages or elsewhere, but you can link to them.
132
+ */
133
+ privacy: 'public' | 'unlisted' | 'private';
134
+ }
135
+
136
+ export namespace Val {
137
+ export interface Author {
138
+ id: string;
139
+
140
+ username: string | null;
141
+ }
142
+
143
+ export interface Links {
144
+ /**
145
+ * The URL of this resource on Val Town
146
+ */
147
+ html: string;
148
+
149
+ /**
150
+ * The URL of this resource on this API
151
+ */
152
+ self: string;
153
+ }
154
+ }
155
+
156
+ export class ValsPageCursorURL extends PageCursorURL<Val> {}