@seamapi/http 2.5.0 → 2.6.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.
- package/README.md +47 -0
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/index.js.map +1 -1
- package/lib/client.js +1 -1
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/request-parameters.d.ts +1 -1
- package/lib/request-parameters.js.map +1 -1
- package/lib/routes/access-codes/access-codes.d.ts +1 -1
- package/lib/routes/access-codes/access-codes.js +30 -17
- package/lib/routes/access-codes/access-codes.js.map +1 -1
- package/lib/routes/access-codes/simulate/simulate.js +3 -2
- package/lib/routes/access-codes/simulate/simulate.js.map +1 -1
- package/lib/routes/access-codes/unmanaged/unmanaged.d.ts +1 -1
- package/lib/routes/access-codes/unmanaged/unmanaged.js +15 -6
- package/lib/routes/access-codes/unmanaged/unmanaged.js.map +1 -1
- package/lib/routes/access-grants/access-grants.d.ts +1 -1
- package/lib/routes/access-grants/access-grants.js +21 -12
- package/lib/routes/access-grants/access-grants.js.map +1 -1
- package/lib/routes/access-grants/unmanaged/unmanaged.js +9 -4
- package/lib/routes/access-grants/unmanaged/unmanaged.js.map +1 -1
- package/lib/routes/access-methods/access-methods.d.ts +1 -1
- package/lib/routes/access-methods/access-methods.js +21 -13
- package/lib/routes/access-methods/access-methods.js.map +1 -1
- package/lib/routes/access-methods/unmanaged/unmanaged.js +6 -3
- package/lib/routes/access-methods/unmanaged/unmanaged.js.map +1 -1
- package/lib/routes/acs/access-groups/access-groups.js +21 -10
- package/lib/routes/acs/access-groups/access-groups.js.map +1 -1
- package/lib/routes/acs/credentials/credentials.js +24 -19
- package/lib/routes/acs/credentials/credentials.js.map +1 -1
- package/lib/routes/acs/encoders/encoders.js +15 -8
- package/lib/routes/acs/encoders/encoders.js.map +1 -1
- package/lib/routes/acs/encoders/simulate/simulate.js +12 -5
- package/lib/routes/acs/encoders/simulate/simulate.js.map +1 -1
- package/lib/routes/acs/entrances/entrances.js +15 -11
- package/lib/routes/acs/entrances/entrances.js.map +1 -1
- package/lib/routes/acs/systems/systems.js +12 -7
- package/lib/routes/acs/systems/systems.js.map +1 -1
- package/lib/routes/acs/users/users.d.ts +1 -1
- package/lib/routes/acs/users/users.js +33 -15
- package/lib/routes/acs/users/users.js.map +1 -1
- package/lib/routes/action-attempts/action-attempts.js +6 -5
- package/lib/routes/action-attempts/action-attempts.js.map +1 -1
- package/lib/routes/client-sessions/client-sessions.d.ts +1 -1
- package/lib/routes/client-sessions/client-sessions.js +21 -12
- package/lib/routes/client-sessions/client-sessions.js.map +1 -1
- package/lib/routes/connect-webviews/connect-webviews.js +12 -9
- package/lib/routes/connect-webviews/connect-webviews.js.map +1 -1
- package/lib/routes/connected-accounts/connected-accounts.d.ts +1 -1
- package/lib/routes/connected-accounts/connected-accounts.js +15 -8
- package/lib/routes/connected-accounts/connected-accounts.js.map +1 -1
- package/lib/routes/connected-accounts/simulate/simulate.js +3 -2
- package/lib/routes/connected-accounts/simulate/simulate.js.map +1 -1
- package/lib/routes/customers/customers.js +9 -6
- package/lib/routes/customers/customers.js.map +1 -1
- package/lib/routes/devices/devices.d.ts +1 -1
- package/lib/routes/devices/devices.js +15 -8
- package/lib/routes/devices/devices.js.map +1 -1
- package/lib/routes/devices/simulate/simulate.js +18 -9
- package/lib/routes/devices/simulate/simulate.js.map +1 -1
- package/lib/routes/devices/unmanaged/unmanaged.d.ts +1 -1
- package/lib/routes/devices/unmanaged/unmanaged.js +9 -4
- package/lib/routes/devices/unmanaged/unmanaged.js.map +1 -1
- package/lib/routes/events/events.d.ts +1 -1
- package/lib/routes/events/events.js +6 -3
- package/lib/routes/events/events.js.map +1 -1
- package/lib/routes/instant-keys/instant-keys.d.ts +1 -1
- package/lib/routes/instant-keys/instant-keys.js +9 -6
- package/lib/routes/instant-keys/instant-keys.js.map +1 -1
- package/lib/routes/locks/locks.d.ts +1 -1
- package/lib/routes/locks/locks.js +15 -10
- package/lib/routes/locks/locks.js.map +1 -1
- package/lib/routes/locks/simulate/simulate.js +6 -3
- package/lib/routes/locks/simulate/simulate.js.map +1 -1
- package/lib/routes/noise-sensors/noise-sensors.js +3 -2
- package/lib/routes/noise-sensors/noise-sensors.js.map +1 -1
- package/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.js +15 -6
- package/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.js.map +1 -1
- package/lib/routes/noise-sensors/simulate/simulate.js +3 -2
- package/lib/routes/noise-sensors/simulate/simulate.js.map +1 -1
- package/lib/routes/phones/phones.js +9 -6
- package/lib/routes/phones/phones.js.map +1 -1
- package/lib/routes/phones/simulate/simulate.js +3 -2
- package/lib/routes/phones/simulate/simulate.js.map +1 -1
- package/lib/routes/spaces/spaces.d.ts +1 -1
- package/lib/routes/spaces/spaces.js +36 -21
- package/lib/routes/spaces/spaces.js.map +1 -1
- package/lib/routes/thermostats/daily-programs/daily-programs.js +13 -4
- package/lib/routes/thermostats/daily-programs/daily-programs.js.map +1 -1
- package/lib/routes/thermostats/schedules/schedules.js +20 -6
- package/lib/routes/thermostats/schedules/schedules.js.map +1 -1
- package/lib/routes/thermostats/simulate/simulate.js +6 -3
- package/lib/routes/thermostats/simulate/simulate.js.map +1 -1
- package/lib/routes/thermostats/thermostats.js +42 -23
- package/lib/routes/thermostats/thermostats.js.map +1 -1
- package/lib/routes/user-identities/unmanaged/unmanaged.js +9 -4
- package/lib/routes/user-identities/unmanaged/unmanaged.js.map +1 -1
- package/lib/routes/user-identities/user-identities.d.ts +1 -1
- package/lib/routes/user-identities/user-identities.js +42 -19
- package/lib/routes/user-identities/user-identities.js.map +1 -1
- package/lib/routes/webhooks/webhooks.js +15 -13
- package/lib/routes/webhooks/webhooks.js.map +1 -1
- package/lib/routes/workspaces/workspaces.js +15 -8
- package/lib/routes/workspaces/workspaces.js.map +1 -1
- package/lib/seam-http-request.d.ts +3 -0
- package/lib/seam-http-request.js +3 -1
- package/lib/seam-http-request.js.map +1 -1
- package/lib/url-search-params-serializer.d.ts +4 -0
- package/lib/url-search-params-serializer.js +17 -0
- package/lib/url-search-params-serializer.js.map +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
- package/src/index.ts +0 -1
- package/src/lib/client.ts +1 -1
- package/src/lib/index.ts +1 -0
- package/src/lib/request-parameters.ts +1 -1
- package/src/lib/routes/access-codes/access-codes.ts +31 -55
- package/src/lib/routes/access-codes/simulate/simulate.ts +3 -8
- package/src/lib/routes/access-codes/unmanaged/unmanaged.ts +16 -39
- package/src/lib/routes/access-grants/access-grants.ts +22 -32
- package/src/lib/routes/access-grants/unmanaged/unmanaged.ts +9 -22
- package/src/lib/routes/access-methods/access-methods.ts +22 -38
- package/src/lib/routes/access-methods/unmanaged/unmanaged.ts +6 -15
- package/src/lib/routes/acs/access-groups/access-groups.ts +21 -47
- package/src/lib/routes/acs/credentials/credentials.ts +24 -37
- package/src/lib/routes/acs/encoders/encoders.ts +15 -28
- package/src/lib/routes/acs/encoders/simulate/simulate.ts +12 -29
- package/src/lib/routes/acs/entrances/entrances.ts +15 -26
- package/src/lib/routes/acs/systems/systems.ts +12 -21
- package/src/lib/routes/acs/users/users.ts +34 -49
- package/src/lib/routes/action-attempts/action-attempts.ts +6 -7
- package/src/lib/routes/client-sessions/client-sessions.ts +22 -37
- package/src/lib/routes/connect-webviews/connect-webviews.ts +12 -23
- package/src/lib/routes/connected-accounts/connected-accounts.ts +16 -36
- package/src/lib/routes/connected-accounts/simulate/simulate.ts +3 -8
- package/src/lib/routes/customers/customers.ts +9 -19
- package/src/lib/routes/devices/devices.ts +16 -26
- package/src/lib/routes/devices/simulate/simulate.ts +18 -40
- package/src/lib/routes/devices/unmanaged/unmanaged.ts +10 -20
- package/src/lib/routes/events/events.ts +7 -8
- package/src/lib/routes/instant-keys/instant-keys.ts +10 -12
- package/src/lib/routes/locks/locks.ts +16 -23
- package/src/lib/routes/locks/simulate/simulate.ts +6 -15
- package/src/lib/routes/noise-sensors/noise-sensors.ts +3 -3
- package/src/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.ts +15 -36
- package/src/lib/routes/noise-sensors/simulate/simulate.ts +3 -8
- package/src/lib/routes/phones/phones.ts +9 -9
- package/src/lib/routes/phones/simulate/simulate.ts +3 -8
- package/src/lib/routes/spaces/spaces.ts +37 -56
- package/src/lib/routes/thermostats/daily-programs/daily-programs.ts +13 -22
- package/src/lib/routes/thermostats/schedules/schedules.ts +20 -36
- package/src/lib/routes/thermostats/simulate/simulate.ts +6 -15
- package/src/lib/routes/thermostats/thermostats.ts +42 -82
- package/src/lib/routes/user-identities/unmanaged/unmanaged.ts +9 -22
- package/src/lib/routes/user-identities/user-identities.ts +43 -86
- package/src/lib/routes/webhooks/webhooks.ts +15 -18
- package/src/lib/routes/workspaces/workspaces.ts +15 -18
- package/src/lib/seam-http-request.ts +12 -1
- package/src/lib/url-search-params-serializer.ts +28 -0
- package/src/lib/version.ts +1 -1
|
@@ -28,7 +28,6 @@ import {
|
|
|
28
28
|
limitToSeamHttpRequestOptions,
|
|
29
29
|
parseOptions,
|
|
30
30
|
} from 'lib/parse-options.js'
|
|
31
|
-
import { assertValidRequestParameters } from 'lib/request-parameters.js'
|
|
32
31
|
import type { Webhook } from 'lib/resources/webhook.js'
|
|
33
32
|
import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
|
|
34
33
|
import { SeamHttpRequest } from 'lib/seam-http-request.js'
|
|
@@ -166,12 +165,13 @@ export class SeamHttpWebhooks {
|
|
|
166
165
|
parameters: WebhooksCreateParameters,
|
|
167
166
|
options: WebhooksCreateOptions = {},
|
|
168
167
|
): WebhooksCreateRequest {
|
|
169
|
-
assertValidRequestParameters(parameters, '/webhooks/create', true, ['url'])
|
|
170
|
-
|
|
171
168
|
return new SeamHttpRequest(this, {
|
|
172
169
|
pathname: '/webhooks/create',
|
|
173
170
|
method: 'POST',
|
|
174
171
|
body: parameters,
|
|
172
|
+
parameters,
|
|
173
|
+
hasRequiredParameters: true,
|
|
174
|
+
requiredParameterNames: ['url'],
|
|
175
175
|
responseKey: 'webhook',
|
|
176
176
|
options,
|
|
177
177
|
})
|
|
@@ -184,14 +184,13 @@ export class SeamHttpWebhooks {
|
|
|
184
184
|
parameters: WebhooksDeleteParameters,
|
|
185
185
|
options: WebhooksDeleteOptions = {},
|
|
186
186
|
): WebhooksDeleteRequest {
|
|
187
|
-
assertValidRequestParameters(parameters, '/webhooks/delete', true, [
|
|
188
|
-
'webhook_id',
|
|
189
|
-
])
|
|
190
|
-
|
|
191
187
|
return new SeamHttpRequest(this, {
|
|
192
188
|
pathname: '/webhooks/delete',
|
|
193
189
|
method: 'DELETE',
|
|
194
190
|
params: parameters,
|
|
191
|
+
parameters,
|
|
192
|
+
hasRequiredParameters: true,
|
|
193
|
+
requiredParameterNames: ['webhook_id'],
|
|
195
194
|
responseKey: undefined,
|
|
196
195
|
options,
|
|
197
196
|
})
|
|
@@ -204,14 +203,13 @@ export class SeamHttpWebhooks {
|
|
|
204
203
|
parameters: WebhooksGetParameters,
|
|
205
204
|
options: WebhooksGetOptions = {},
|
|
206
205
|
): WebhooksGetRequest {
|
|
207
|
-
assertValidRequestParameters(parameters, '/webhooks/get', true, [
|
|
208
|
-
'webhook_id',
|
|
209
|
-
])
|
|
210
|
-
|
|
211
206
|
return new SeamHttpRequest(this, {
|
|
212
207
|
pathname: '/webhooks/get',
|
|
213
208
|
method: 'GET',
|
|
214
209
|
params: parameters,
|
|
210
|
+
parameters,
|
|
211
|
+
hasRequiredParameters: true,
|
|
212
|
+
requiredParameterNames: ['webhook_id'],
|
|
215
213
|
responseKey: 'webhook',
|
|
216
214
|
options,
|
|
217
215
|
})
|
|
@@ -224,12 +222,13 @@ export class SeamHttpWebhooks {
|
|
|
224
222
|
parameters?: WebhooksListParameters,
|
|
225
223
|
options: WebhooksListOptions = {},
|
|
226
224
|
): WebhooksListRequest {
|
|
227
|
-
assertValidRequestParameters(parameters, '/webhooks/list', false, [])
|
|
228
|
-
|
|
229
225
|
return new SeamHttpRequest(this, {
|
|
230
226
|
pathname: '/webhooks/list',
|
|
231
227
|
method: 'GET',
|
|
232
228
|
params: parameters,
|
|
229
|
+
parameters,
|
|
230
|
+
hasRequiredParameters: false,
|
|
231
|
+
requiredParameterNames: [],
|
|
233
232
|
responseKey: 'webhooks',
|
|
234
233
|
options,
|
|
235
234
|
})
|
|
@@ -242,15 +241,13 @@ export class SeamHttpWebhooks {
|
|
|
242
241
|
parameters: WebhooksUpdateParameters,
|
|
243
242
|
options: WebhooksUpdateOptions = {},
|
|
244
243
|
): WebhooksUpdateRequest {
|
|
245
|
-
assertValidRequestParameters(parameters, '/webhooks/update', true, [
|
|
246
|
-
'event_types',
|
|
247
|
-
'webhook_id',
|
|
248
|
-
])
|
|
249
|
-
|
|
250
244
|
return new SeamHttpRequest(this, {
|
|
251
245
|
pathname: '/webhooks/update',
|
|
252
246
|
method: 'PUT',
|
|
253
247
|
body: parameters,
|
|
248
|
+
parameters,
|
|
249
|
+
hasRequiredParameters: true,
|
|
250
|
+
requiredParameterNames: ['event_types', 'webhook_id'],
|
|
254
251
|
responseKey: undefined,
|
|
255
252
|
options,
|
|
256
253
|
})
|
|
@@ -28,7 +28,6 @@ import {
|
|
|
28
28
|
limitToSeamHttpRequestOptions,
|
|
29
29
|
parseOptions,
|
|
30
30
|
} from 'lib/parse-options.js'
|
|
31
|
-
import { assertValidRequestParameters } from 'lib/request-parameters.js'
|
|
32
31
|
import type { ActionAttempt } from 'lib/resources/action-attempt.js'
|
|
33
32
|
import type { Workspace } from 'lib/resources/workspace.js'
|
|
34
33
|
import { SeamHttpActionAttempts } from 'lib/routes/action-attempts/index.js'
|
|
@@ -168,14 +167,13 @@ export class SeamHttpWorkspaces {
|
|
|
168
167
|
parameters: WorkspacesCreateParameters,
|
|
169
168
|
options: WorkspacesCreateOptions = {},
|
|
170
169
|
): WorkspacesCreateRequest {
|
|
171
|
-
assertValidRequestParameters(parameters, '/workspaces/create', true, [
|
|
172
|
-
'name',
|
|
173
|
-
])
|
|
174
|
-
|
|
175
170
|
return new SeamHttpRequest(this, {
|
|
176
171
|
pathname: '/workspaces/create',
|
|
177
172
|
method: 'POST',
|
|
178
173
|
body: parameters,
|
|
174
|
+
parameters,
|
|
175
|
+
hasRequiredParameters: true,
|
|
176
|
+
requiredParameterNames: ['name'],
|
|
179
177
|
responseKey: 'workspace',
|
|
180
178
|
options,
|
|
181
179
|
})
|
|
@@ -188,12 +186,13 @@ export class SeamHttpWorkspaces {
|
|
|
188
186
|
parameters?: WorkspacesGetParameters,
|
|
189
187
|
options: WorkspacesGetOptions = {},
|
|
190
188
|
): WorkspacesGetRequest {
|
|
191
|
-
assertValidRequestParameters(parameters, '/workspaces/get', false, [])
|
|
192
|
-
|
|
193
189
|
return new SeamHttpRequest(this, {
|
|
194
190
|
pathname: '/workspaces/get',
|
|
195
191
|
method: 'GET',
|
|
196
192
|
params: parameters,
|
|
193
|
+
parameters,
|
|
194
|
+
hasRequiredParameters: false,
|
|
195
|
+
requiredParameterNames: [],
|
|
197
196
|
responseKey: 'workspace',
|
|
198
197
|
options,
|
|
199
198
|
})
|
|
@@ -206,12 +205,13 @@ export class SeamHttpWorkspaces {
|
|
|
206
205
|
parameters?: WorkspacesListParameters,
|
|
207
206
|
options: WorkspacesListOptions = {},
|
|
208
207
|
): WorkspacesListRequest {
|
|
209
|
-
assertValidRequestParameters(parameters, '/workspaces/list', false, [])
|
|
210
|
-
|
|
211
208
|
return new SeamHttpRequest(this, {
|
|
212
209
|
pathname: '/workspaces/list',
|
|
213
210
|
method: 'GET',
|
|
214
211
|
params: parameters,
|
|
212
|
+
parameters,
|
|
213
|
+
hasRequiredParameters: false,
|
|
214
|
+
requiredParameterNames: [],
|
|
215
215
|
responseKey: 'workspaces',
|
|
216
216
|
options,
|
|
217
217
|
})
|
|
@@ -224,17 +224,13 @@ export class SeamHttpWorkspaces {
|
|
|
224
224
|
parameters?: WorkspacesResetSandboxParameters,
|
|
225
225
|
options: WorkspacesResetSandboxOptions = {},
|
|
226
226
|
): WorkspacesResetSandboxRequest {
|
|
227
|
-
assertValidRequestParameters(
|
|
228
|
-
parameters,
|
|
229
|
-
'/workspaces/reset_sandbox',
|
|
230
|
-
false,
|
|
231
|
-
[],
|
|
232
|
-
)
|
|
233
|
-
|
|
234
227
|
return new SeamHttpRequest(this, {
|
|
235
228
|
pathname: '/workspaces/reset_sandbox',
|
|
236
229
|
method: 'POST',
|
|
237
230
|
body: parameters,
|
|
231
|
+
parameters,
|
|
232
|
+
hasRequiredParameters: false,
|
|
233
|
+
requiredParameterNames: [],
|
|
238
234
|
responseKey: 'action_attempt',
|
|
239
235
|
options,
|
|
240
236
|
actionAttempts: SeamHttpActionAttempts.fromClient(this.client, {
|
|
@@ -251,12 +247,13 @@ export class SeamHttpWorkspaces {
|
|
|
251
247
|
parameters?: WorkspacesUpdateParameters,
|
|
252
248
|
options: WorkspacesUpdateOptions = {},
|
|
253
249
|
): WorkspacesUpdateRequest {
|
|
254
|
-
assertValidRequestParameters(parameters, '/workspaces/update', false, [])
|
|
255
|
-
|
|
256
250
|
return new SeamHttpRequest(this, {
|
|
257
251
|
pathname: '/workspaces/update',
|
|
258
252
|
method: 'PATCH',
|
|
259
253
|
body: parameters,
|
|
254
|
+
parameters,
|
|
255
|
+
hasRequiredParameters: false,
|
|
256
|
+
requiredParameterNames: [],
|
|
260
257
|
responseKey: undefined,
|
|
261
258
|
options,
|
|
262
259
|
})
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { serializeUrlSearchParams } from '@seamapi/url-search-params-serializer'
|
|
2
1
|
import type { Method } from 'axios'
|
|
3
2
|
|
|
4
3
|
import type { Client } from './client.js'
|
|
5
4
|
import type { SeamHttpRequestOptions } from './options.js'
|
|
5
|
+
import { assertValidRequestParameters } from './request-parameters.js'
|
|
6
6
|
import {
|
|
7
7
|
type ActionAttemptsClient,
|
|
8
8
|
resolveActionAttempt,
|
|
9
9
|
} from './resolve-action-attempt.js'
|
|
10
10
|
import type { ActionAttempt } from './resources/action-attempt.js'
|
|
11
|
+
import { serializeUrlSearchParams } from './url-search-params-serializer.js'
|
|
11
12
|
|
|
12
13
|
interface SeamHttpRequestParent {
|
|
13
14
|
readonly client: Client
|
|
@@ -22,6 +23,9 @@ interface SeamHttpRequestConfig<TResponseKey> {
|
|
|
22
23
|
readonly responseKey: TResponseKey
|
|
23
24
|
readonly options?: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'>
|
|
24
25
|
readonly actionAttempts?: ActionAttemptsClient
|
|
26
|
+
readonly parameters?: unknown
|
|
27
|
+
readonly hasRequiredParameters?: boolean
|
|
28
|
+
readonly requiredParameterNames?: readonly string[]
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
export class SeamHttpRequest<
|
|
@@ -122,6 +126,13 @@ export class SeamHttpRequest<
|
|
|
122
126
|
}
|
|
123
127
|
|
|
124
128
|
async fetchResponse(): Promise<TResponse> {
|
|
129
|
+
assertValidRequestParameters(
|
|
130
|
+
this.#config.parameters,
|
|
131
|
+
this.pathname,
|
|
132
|
+
this.#config.hasRequiredParameters ?? false,
|
|
133
|
+
this.#config.requiredParameterNames ?? [],
|
|
134
|
+
)
|
|
135
|
+
|
|
125
136
|
const { client } = this.#parent
|
|
126
137
|
const response = await client.request({
|
|
127
138
|
url: this.pathname,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type Params,
|
|
3
|
+
serializeUrlSearchParams as baseSerializeUrlSearchParams,
|
|
4
|
+
UnserializableParamError,
|
|
5
|
+
updateUrlSearchParams as baseUpdateUrlSearchParams,
|
|
6
|
+
} from '@seamapi/url-search-params-serializer'
|
|
7
|
+
|
|
8
|
+
export const serializeUrlSearchParams = (params: Params): string => {
|
|
9
|
+
const queryString = baseSerializeUrlSearchParams(params)
|
|
10
|
+
if (queryString === '') return ''
|
|
11
|
+
|
|
12
|
+
const searchParams = new URLSearchParams(queryString)
|
|
13
|
+
searchParams.set('_strict', 'true')
|
|
14
|
+
return searchParams.toString()
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const updateUrlSearchParams = (
|
|
18
|
+
searchParams: URLSearchParams,
|
|
19
|
+
params: Params,
|
|
20
|
+
): void => {
|
|
21
|
+
baseUpdateUrlSearchParams(searchParams, params)
|
|
22
|
+
|
|
23
|
+
if (searchParams.size > 0) {
|
|
24
|
+
searchParams.set('_strict', 'true')
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { type Params, UnserializableParamError }
|
package/src/lib/version.ts
CHANGED