@seamapi/http 0.14.0 → 0.14.1
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/README.md +3 -3
- package/dist/connect.cjs +27 -16
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +11 -11
- package/lib/seam/connect/parse-options.js +9 -0
- package/lib/seam/connect/parse-options.js.map +1 -1
- package/lib/seam/connect/routes/connected-accounts.d.ts +3 -3
- package/lib/seam/connect/routes/connected-accounts.js +3 -3
- package/lib/seam/connect/routes/connected-accounts.js.map +1 -1
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.d.ts +1 -1
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.js +2 -1
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.js.map +1 -1
- package/lib/seam/connect/routes/user-identities.d.ts +3 -3
- package/lib/seam/connect/routes/user-identities.js +3 -3
- package/lib/seam/connect/routes/user-identities.js.map +1 -1
- package/lib/seam/connect/routes/webhooks.d.ts +3 -3
- package/lib/seam/connect/routes/webhooks.js +3 -3
- package/lib/seam/connect/routes/webhooks.js.map +1 -1
- package/lib/seam/connect/routes/workspaces.d.ts +5 -5
- package/lib/seam/connect/routes/workspaces.js +6 -6
- package/lib/seam/connect/routes/workspaces.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/lib/seam/connect/parse-options.ts +17 -0
- package/src/lib/seam/connect/routes/connected-accounts.ts +5 -9
- package/src/lib/seam/connect/routes/noise-sensors-noise-thresholds.ts +11 -6
- package/src/lib/seam/connect/routes/user-identities.ts +5 -10
- package/src/lib/seam/connect/routes/webhooks.ts +5 -9
- package/src/lib/seam/connect/routes/workspaces.ts +9 -13
- package/src/lib/version.ts +1 -1
|
@@ -3,11 +3,7 @@
|
|
|
3
3
|
* Do not edit this file or add other files to this directory.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type {
|
|
7
|
-
RouteRequestBody,
|
|
8
|
-
RouteRequestParams,
|
|
9
|
-
RouteResponse,
|
|
10
|
-
} from '@seamapi/types/connect'
|
|
6
|
+
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect'
|
|
11
7
|
import type { SetNonNullable } from 'type-fest'
|
|
12
8
|
|
|
13
9
|
import { warnOnInsecureuserIdentifierKey } from 'lib/seam/connect/auth.js'
|
|
@@ -166,12 +162,12 @@ export class SeamHttpWebhooks {
|
|
|
166
162
|
}
|
|
167
163
|
|
|
168
164
|
async list(
|
|
169
|
-
|
|
165
|
+
body?: WebhooksListParams,
|
|
170
166
|
): Promise<WebhooksListResponse['webhooks']> {
|
|
171
167
|
const { data } = await this.client.request<WebhooksListResponse>({
|
|
172
168
|
url: '/webhooks/list',
|
|
173
|
-
method: '
|
|
174
|
-
|
|
169
|
+
method: 'post',
|
|
170
|
+
data: body,
|
|
175
171
|
})
|
|
176
172
|
|
|
177
173
|
return data.webhooks
|
|
@@ -202,7 +198,7 @@ export type WebhooksGetResponse = SetNonNullable<
|
|
|
202
198
|
|
|
203
199
|
export type WebhooksGetOptions = never
|
|
204
200
|
|
|
205
|
-
export type WebhooksListParams =
|
|
201
|
+
export type WebhooksListParams = RouteRequestBody<'/webhooks/list'>
|
|
206
202
|
|
|
207
203
|
export type WebhooksListResponse = SetNonNullable<
|
|
208
204
|
Required<RouteResponse<'/webhooks/list'>>
|
|
@@ -3,11 +3,7 @@
|
|
|
3
3
|
* Do not edit this file or add other files to this directory.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type {
|
|
7
|
-
RouteRequestBody,
|
|
8
|
-
RouteRequestParams,
|
|
9
|
-
RouteResponse,
|
|
10
|
-
} from '@seamapi/types/connect'
|
|
6
|
+
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect'
|
|
11
7
|
import type { SetNonNullable } from 'type-fest'
|
|
12
8
|
|
|
13
9
|
import { warnOnInsecureuserIdentifierKey } from 'lib/seam/connect/auth.js'
|
|
@@ -148,24 +144,24 @@ export class SeamHttpWorkspaces {
|
|
|
148
144
|
}
|
|
149
145
|
|
|
150
146
|
async get(
|
|
151
|
-
|
|
147
|
+
body?: WorkspacesGetParams,
|
|
152
148
|
): Promise<WorkspacesGetResponse['workspace']> {
|
|
153
149
|
const { data } = await this.client.request<WorkspacesGetResponse>({
|
|
154
150
|
url: '/workspaces/get',
|
|
155
|
-
method: '
|
|
156
|
-
|
|
151
|
+
method: 'post',
|
|
152
|
+
data: body,
|
|
157
153
|
})
|
|
158
154
|
|
|
159
155
|
return data.workspace
|
|
160
156
|
}
|
|
161
157
|
|
|
162
158
|
async list(
|
|
163
|
-
|
|
159
|
+
body?: WorkspacesListParams,
|
|
164
160
|
): Promise<WorkspacesListResponse['workspaces']> {
|
|
165
161
|
const { data } = await this.client.request<WorkspacesListResponse>({
|
|
166
162
|
url: '/workspaces/list',
|
|
167
|
-
method: '
|
|
168
|
-
|
|
163
|
+
method: 'post',
|
|
164
|
+
data: body,
|
|
169
165
|
})
|
|
170
166
|
|
|
171
167
|
return data.workspaces
|
|
@@ -188,7 +184,7 @@ export type WorkspacesCreateResponse = SetNonNullable<
|
|
|
188
184
|
|
|
189
185
|
export type WorkspacesCreateOptions = never
|
|
190
186
|
|
|
191
|
-
export type WorkspacesGetParams =
|
|
187
|
+
export type WorkspacesGetParams = RouteRequestBody<'/workspaces/get'>
|
|
192
188
|
|
|
193
189
|
export type WorkspacesGetResponse = SetNonNullable<
|
|
194
190
|
Required<RouteResponse<'/workspaces/get'>>
|
|
@@ -196,7 +192,7 @@ export type WorkspacesGetResponse = SetNonNullable<
|
|
|
196
192
|
|
|
197
193
|
export type WorkspacesGetOptions = never
|
|
198
194
|
|
|
199
|
-
export type WorkspacesListParams =
|
|
195
|
+
export type WorkspacesListParams = RouteRequestBody<'/workspaces/list'>
|
|
200
196
|
|
|
201
197
|
export type WorkspacesListResponse = SetNonNullable<
|
|
202
198
|
Required<RouteResponse<'/workspaces/list'>>
|
package/src/lib/version.ts
CHANGED