@valtown/sdk 1.14.0 → 2.1.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 +39 -0
  2. package/index.d.mts +9 -5
  3. package/index.d.ts +9 -5
  4. package/index.d.ts.map +1 -1
  5. package/index.js +1 -0
  6. package/index.js.map +1 -1
  7. package/index.mjs +2 -1
  8. package/index.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/pagination.d.ts +20 -0
  11. package/pagination.d.ts.map +1 -1
  12. package/pagination.js +35 -1
  13. package/pagination.js.map +1 -1
  14. package/pagination.mjs +33 -0
  15. package/pagination.mjs.map +1 -1
  16. package/resources/index.d.ts +2 -2
  17. package/resources/index.d.ts.map +1 -1
  18. package/resources/index.js +2 -1
  19. package/resources/index.js.map +1 -1
  20. package/resources/index.mjs +1 -1
  21. package/resources/index.mjs.map +1 -1
  22. package/resources/orgs.d.ts +11 -29
  23. package/resources/orgs.d.ts.map +1 -1
  24. package/resources/orgs.js +8 -3
  25. package/resources/orgs.js.map +1 -1
  26. package/resources/orgs.mjs +6 -2
  27. package/resources/orgs.mjs.map +1 -1
  28. package/resources/search/index.d.ts +1 -1
  29. package/resources/search/index.d.ts.map +1 -1
  30. package/resources/search/index.js +1 -2
  31. package/resources/search/index.js.map +1 -1
  32. package/resources/search/index.mjs +1 -1
  33. package/resources/search/index.mjs.map +1 -1
  34. package/resources/search/search.d.ts +2 -2
  35. package/resources/search/search.d.ts.map +1 -1
  36. package/resources/search/search.js +0 -1
  37. package/resources/search/search.js.map +1 -1
  38. package/resources/search/search.mjs +1 -2
  39. package/resources/search/search.mjs.map +1 -1
  40. package/resources/search/vals.d.ts +6 -78
  41. package/resources/search/vals.d.ts.map +1 -1
  42. package/resources/search/vals.js +4 -7
  43. package/resources/search/vals.js.map +1 -1
  44. package/resources/search/vals.mjs +3 -5
  45. package/resources/search/vals.mjs.map +1 -1
  46. package/resources/shared.d.ts +161 -1
  47. package/resources/shared.d.ts.map +1 -1
  48. package/resources/shared.js +7 -1
  49. package/resources/shared.js.map +1 -1
  50. package/resources/shared.mjs +5 -1
  51. package/resources/shared.mjs.map +1 -1
  52. package/resources/vals/environment-variables.d.ts +137 -0
  53. package/resources/vals/environment-variables.d.ts.map +1 -0
  54. package/resources/vals/environment-variables.js +81 -0
  55. package/resources/vals/environment-variables.js.map +1 -0
  56. package/resources/vals/environment-variables.mjs +76 -0
  57. package/resources/vals/environment-variables.mjs.map +1 -0
  58. package/resources/vals/index.d.ts +2 -1
  59. package/resources/vals/index.d.ts.map +1 -1
  60. package/resources/vals/index.js +4 -1
  61. package/resources/vals/index.js.map +1 -1
  62. package/resources/vals/index.mjs +1 -0
  63. package/resources/vals/index.mjs.map +1 -1
  64. package/resources/vals/vals.d.ts +14 -18
  65. package/resources/vals/vals.d.ts.map +1 -1
  66. package/resources/vals/vals.js +13 -3
  67. package/resources/vals/vals.js.map +1 -1
  68. package/resources/vals/vals.mjs +12 -2
  69. package/resources/vals/vals.mjs.map +1 -1
  70. package/src/index.ts +18 -11
  71. package/src/pagination.ts +61 -0
  72. package/src/resources/index.ts +2 -2
  73. package/src/resources/orgs.ts +20 -33
  74. package/src/resources/search/index.ts +1 -1
  75. package/src/resources/search/search.ts +2 -8
  76. package/src/resources/search/vals.ts +8 -103
  77. package/src/resources/shared.ts +201 -1
  78. package/src/resources/vals/environment-variables.ts +199 -0
  79. package/src/resources/vals/index.ts +11 -1
  80. package/src/resources/vals/vals.ts +38 -26
  81. package/src/version.ts +1 -1
  82. package/version.d.ts +1 -1
  83. package/version.d.ts.map +1 -1
  84. package/version.js +1 -1
  85. package/version.js.map +1 -1
  86. package/version.mjs +1 -1
  87. package/version.mjs.map +1 -1
@@ -3,6 +3,7 @@
3
3
  import { APIResource } from '../../resource';
4
4
  import * as Core from '../../core';
5
5
  import * as Shared from '../shared';
6
+ import { ValsCursor } from '../shared';
6
7
  import * as BranchesAPI from './branches';
7
8
  import {
8
9
  BranchCreateParams,
@@ -13,6 +14,17 @@ import {
13
14
  BranchRetrieveResponse,
14
15
  Branches,
15
16
  } from './branches';
17
+ import * as EnvironmentVariablesAPI from './environment-variables';
18
+ import {
19
+ EnvironmentVariableCreateParams,
20
+ EnvironmentVariableCreateResponse,
21
+ EnvironmentVariableListParams,
22
+ EnvironmentVariableListResponse,
23
+ EnvironmentVariableListResponsesPageCursorURL,
24
+ EnvironmentVariableUpdateParams,
25
+ EnvironmentVariableUpdateResponse,
26
+ EnvironmentVariables,
27
+ } from './environment-variables';
16
28
  import * as FilesAPI from './files';
17
29
  import {
18
30
  FileCreateParams,
@@ -26,6 +38,7 @@ import {
26
38
  FileUpdateResponse,
27
39
  Files,
28
40
  } from './files';
41
+ import { type CursorParams } from '../../pagination';
29
42
 
30
43
  /**
31
44
  * Vals are a collaborative folder of runnable JavaScript, TypeScript, and JSX modules
@@ -33,6 +46,8 @@ import {
33
46
  export class Vals extends APIResource {
34
47
  branches: BranchesAPI.Branches = new BranchesAPI.Branches(this._client);
35
48
  files: FilesAPI.Files = new FilesAPI.Files(this._client);
49
+ environmentVariables: EnvironmentVariablesAPI.EnvironmentVariables =
50
+ new EnvironmentVariablesAPI.EnvironmentVariables(this._client);
36
51
 
37
52
  /**
38
53
  * Create a new val
@@ -69,11 +84,14 @@ export class Vals extends APIResource {
69
84
  *
70
85
  * @example
71
86
  * ```ts
72
- * const vals = await client.vals.list({ limit: 1 });
87
+ * // Automatically fetches more pages as needed.
88
+ * for await (const val of client.vals.list({ limit: 1 })) {
89
+ * // ...
90
+ * }
73
91
  * ```
74
92
  */
75
- list(query: ValListParams, options?: Core.RequestOptions): Core.APIPromise<ValListResponse> {
76
- return this._client.get('/v2/vals', { query, ...options });
93
+ list(query: ValListParams, options?: Core.RequestOptions): Core.PagePromise<ValsCursor, Shared.Val> {
94
+ return this._client.getAPIList('/v2/vals', ValsCursor, { query, ...options });
77
95
  }
78
96
 
79
97
  /**
@@ -94,18 +112,6 @@ export class Vals extends APIResource {
94
112
  }
95
113
  }
96
114
 
97
- /**
98
- * A paginated result set
99
- */
100
- export interface ValListResponse {
101
- data: Array<Shared.Val>;
102
-
103
- /**
104
- * Links to use for pagination
105
- */
106
- links: Shared.PaginationLinks;
107
- }
108
-
109
115
  export interface ValCreateParams {
110
116
  name: string;
111
117
 
@@ -119,17 +125,12 @@ export interface ValCreateParams {
119
125
  orgId?: string;
120
126
  }
121
127
 
122
- export interface ValListParams {
128
+ export interface ValListParams extends CursorParams {
123
129
  /**
124
130
  * Maximum items to return in each paginated response
125
131
  */
126
132
  limit: number;
127
133
 
128
- /**
129
- * Cursor to start the pagination from
130
- */
131
- cursor?: string;
132
-
133
134
  /**
134
135
  * This resource's privacy setting. Unlisted resources do not appear on profile
135
136
  * pages or elsewhere, but you can link to them.
@@ -146,13 +147,11 @@ Vals.Branches = Branches;
146
147
  Vals.BranchListResponsesPageCursorURL = BranchListResponsesPageCursorURL;
147
148
  Vals.Files = Files;
148
149
  Vals.FileRetrieveResponsesPageCursorURL = FileRetrieveResponsesPageCursorURL;
150
+ Vals.EnvironmentVariables = EnvironmentVariables;
151
+ Vals.EnvironmentVariableListResponsesPageCursorURL = EnvironmentVariableListResponsesPageCursorURL;
149
152
 
150
153
  export declare namespace Vals {
151
- export {
152
- type ValListResponse as ValListResponse,
153
- type ValCreateParams as ValCreateParams,
154
- type ValListParams as ValListParams,
155
- };
154
+ export { type ValCreateParams as ValCreateParams, type ValListParams as ValListParams };
156
155
 
157
156
  export {
158
157
  Branches as Branches,
@@ -176,4 +175,17 @@ export declare namespace Vals {
176
175
  type FileDeleteParams as FileDeleteParams,
177
176
  type FileGetContentParams as FileGetContentParams,
178
177
  };
178
+
179
+ export {
180
+ EnvironmentVariables as EnvironmentVariables,
181
+ type EnvironmentVariableCreateResponse as EnvironmentVariableCreateResponse,
182
+ type EnvironmentVariableUpdateResponse as EnvironmentVariableUpdateResponse,
183
+ type EnvironmentVariableListResponse as EnvironmentVariableListResponse,
184
+ EnvironmentVariableListResponsesPageCursorURL as EnvironmentVariableListResponsesPageCursorURL,
185
+ type EnvironmentVariableCreateParams as EnvironmentVariableCreateParams,
186
+ type EnvironmentVariableUpdateParams as EnvironmentVariableUpdateParams,
187
+ type EnvironmentVariableListParams as EnvironmentVariableListParams,
188
+ };
179
189
  }
190
+
191
+ export { ValsCursor };
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.14.0'; // x-release-please-version
1
+ export const VERSION = '2.1.0'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.14.0";
1
+ export declare const VERSION = "2.1.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
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 = '1.14.0'; // x-release-please-version
4
+ exports.VERSION = '2.1.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.14.0'; // x-release-please-version
1
+ export const VERSION = '2.1.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
package/version.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}