@wix/sdk-types 1.17.9 → 1.17.10
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/build/browser/index.d.mts +15 -3
- package/build/index.d.mts +15 -3
- package/build/index.d.ts +15 -3
- package/internal/build/browser/index.d.mts +15 -3
- package/internal/build/index.d.mts +15 -3
- package/internal/build/index.d.ts +15 -3
- package/package.json +2 -2
|
@@ -295,12 +295,24 @@ declare global {
|
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
/**
|
|
298
|
-
*
|
|
299
|
-
*
|
|
298
|
+
* Creates concrete types from SDK descriptors when a contextual client is
|
|
299
|
+
* available.
|
|
300
|
+
*
|
|
301
|
+
* For a REST descriptor the built (bound) API is intersected with the original
|
|
302
|
+
* descriptor, matching what `contextualizeRESTModuleV2` returns at runtime — a
|
|
303
|
+
* value callable as the bound API and still usable as a descriptor. Keeping the
|
|
304
|
+
* descriptor half lets contextual modules be passed to descriptor-constrained
|
|
305
|
+
* helpers such as `elevate` from `@wix/sdk/context` (FEDINF-14092).
|
|
306
|
+
*
|
|
307
|
+
* The `& T` is scoped to REST descriptors — the only shape codegen wraps in
|
|
308
|
+
* `MaybeContext` — so `BuildDescriptors` (used by `createClient().use`) is left
|
|
309
|
+
* unchanged and stays bound-only. The fix lives here rather than in `elevate`,
|
|
310
|
+
* which is kept strict on purpose (see #941) so it still rejects bound-only
|
|
311
|
+
* functions that are unsafe through `createRESTModule`.
|
|
300
312
|
*/
|
|
301
313
|
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
302
314
|
host: Host;
|
|
303
|
-
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
315
|
+
} ? T extends RESTFunctionDescriptor ? BuildDescriptors<T, globalThis.ContextualClient['host']> & T : BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
304
316
|
|
|
305
317
|
/**
|
|
306
318
|
* Expose fields based on the current exposure toggle.
|
package/build/index.d.mts
CHANGED
|
@@ -295,12 +295,24 @@ declare global {
|
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
/**
|
|
298
|
-
*
|
|
299
|
-
*
|
|
298
|
+
* Creates concrete types from SDK descriptors when a contextual client is
|
|
299
|
+
* available.
|
|
300
|
+
*
|
|
301
|
+
* For a REST descriptor the built (bound) API is intersected with the original
|
|
302
|
+
* descriptor, matching what `contextualizeRESTModuleV2` returns at runtime — a
|
|
303
|
+
* value callable as the bound API and still usable as a descriptor. Keeping the
|
|
304
|
+
* descriptor half lets contextual modules be passed to descriptor-constrained
|
|
305
|
+
* helpers such as `elevate` from `@wix/sdk/context` (FEDINF-14092).
|
|
306
|
+
*
|
|
307
|
+
* The `& T` is scoped to REST descriptors — the only shape codegen wraps in
|
|
308
|
+
* `MaybeContext` — so `BuildDescriptors` (used by `createClient().use`) is left
|
|
309
|
+
* unchanged and stays bound-only. The fix lives here rather than in `elevate`,
|
|
310
|
+
* which is kept strict on purpose (see #941) so it still rejects bound-only
|
|
311
|
+
* functions that are unsafe through `createRESTModule`.
|
|
300
312
|
*/
|
|
301
313
|
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
302
314
|
host: Host;
|
|
303
|
-
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
315
|
+
} ? T extends RESTFunctionDescriptor ? BuildDescriptors<T, globalThis.ContextualClient['host']> & T : BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
304
316
|
|
|
305
317
|
/**
|
|
306
318
|
* Expose fields based on the current exposure toggle.
|
package/build/index.d.ts
CHANGED
|
@@ -295,12 +295,24 @@ declare global {
|
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
/**
|
|
298
|
-
*
|
|
299
|
-
*
|
|
298
|
+
* Creates concrete types from SDK descriptors when a contextual client is
|
|
299
|
+
* available.
|
|
300
|
+
*
|
|
301
|
+
* For a REST descriptor the built (bound) API is intersected with the original
|
|
302
|
+
* descriptor, matching what `contextualizeRESTModuleV2` returns at runtime — a
|
|
303
|
+
* value callable as the bound API and still usable as a descriptor. Keeping the
|
|
304
|
+
* descriptor half lets contextual modules be passed to descriptor-constrained
|
|
305
|
+
* helpers such as `elevate` from `@wix/sdk/context` (FEDINF-14092).
|
|
306
|
+
*
|
|
307
|
+
* The `& T` is scoped to REST descriptors — the only shape codegen wraps in
|
|
308
|
+
* `MaybeContext` — so `BuildDescriptors` (used by `createClient().use`) is left
|
|
309
|
+
* unchanged and stays bound-only. The fix lives here rather than in `elevate`,
|
|
310
|
+
* which is kept strict on purpose (see #941) so it still rejects bound-only
|
|
311
|
+
* functions that are unsafe through `createRESTModule`.
|
|
300
312
|
*/
|
|
301
313
|
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
302
314
|
host: Host;
|
|
303
|
-
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
315
|
+
} ? T extends RESTFunctionDescriptor ? BuildDescriptors<T, globalThis.ContextualClient['host']> & T : BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
304
316
|
|
|
305
317
|
/**
|
|
306
318
|
* Expose fields based on the current exposure toggle.
|
|
@@ -353,12 +353,24 @@ declare global {
|
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
/**
|
|
356
|
-
*
|
|
357
|
-
*
|
|
356
|
+
* Creates concrete types from SDK descriptors when a contextual client is
|
|
357
|
+
* available.
|
|
358
|
+
*
|
|
359
|
+
* For a REST descriptor the built (bound) API is intersected with the original
|
|
360
|
+
* descriptor, matching what `contextualizeRESTModuleV2` returns at runtime — a
|
|
361
|
+
* value callable as the bound API and still usable as a descriptor. Keeping the
|
|
362
|
+
* descriptor half lets contextual modules be passed to descriptor-constrained
|
|
363
|
+
* helpers such as `elevate` from `@wix/sdk/context` (FEDINF-14092).
|
|
364
|
+
*
|
|
365
|
+
* The `& T` is scoped to REST descriptors — the only shape codegen wraps in
|
|
366
|
+
* `MaybeContext` — so `BuildDescriptors` (used by `createClient().use`) is left
|
|
367
|
+
* unchanged and stays bound-only. The fix lives here rather than in `elevate`,
|
|
368
|
+
* which is kept strict on purpose (see #941) so it still rejects bound-only
|
|
369
|
+
* functions that are unsafe through `createRESTModule`.
|
|
358
370
|
*/
|
|
359
371
|
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
360
372
|
host: Host;
|
|
361
|
-
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
373
|
+
} ? T extends RESTFunctionDescriptor ? BuildDescriptors<T, globalThis.ContextualClient['host']> & T : BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
362
374
|
|
|
363
375
|
/**
|
|
364
376
|
* Expose fields based on the current exposure toggle.
|
|
@@ -353,12 +353,24 @@ declare global {
|
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
/**
|
|
356
|
-
*
|
|
357
|
-
*
|
|
356
|
+
* Creates concrete types from SDK descriptors when a contextual client is
|
|
357
|
+
* available.
|
|
358
|
+
*
|
|
359
|
+
* For a REST descriptor the built (bound) API is intersected with the original
|
|
360
|
+
* descriptor, matching what `contextualizeRESTModuleV2` returns at runtime — a
|
|
361
|
+
* value callable as the bound API and still usable as a descriptor. Keeping the
|
|
362
|
+
* descriptor half lets contextual modules be passed to descriptor-constrained
|
|
363
|
+
* helpers such as `elevate` from `@wix/sdk/context` (FEDINF-14092).
|
|
364
|
+
*
|
|
365
|
+
* The `& T` is scoped to REST descriptors — the only shape codegen wraps in
|
|
366
|
+
* `MaybeContext` — so `BuildDescriptors` (used by `createClient().use`) is left
|
|
367
|
+
* unchanged and stays bound-only. The fix lives here rather than in `elevate`,
|
|
368
|
+
* which is kept strict on purpose (see #941) so it still rejects bound-only
|
|
369
|
+
* functions that are unsafe through `createRESTModule`.
|
|
358
370
|
*/
|
|
359
371
|
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
360
372
|
host: Host;
|
|
361
|
-
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
373
|
+
} ? T extends RESTFunctionDescriptor ? BuildDescriptors<T, globalThis.ContextualClient['host']> & T : BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
362
374
|
|
|
363
375
|
/**
|
|
364
376
|
* Expose fields based on the current exposure toggle.
|
|
@@ -353,12 +353,24 @@ declare global {
|
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
/**
|
|
356
|
-
*
|
|
357
|
-
*
|
|
356
|
+
* Creates concrete types from SDK descriptors when a contextual client is
|
|
357
|
+
* available.
|
|
358
|
+
*
|
|
359
|
+
* For a REST descriptor the built (bound) API is intersected with the original
|
|
360
|
+
* descriptor, matching what `contextualizeRESTModuleV2` returns at runtime — a
|
|
361
|
+
* value callable as the bound API and still usable as a descriptor. Keeping the
|
|
362
|
+
* descriptor half lets contextual modules be passed to descriptor-constrained
|
|
363
|
+
* helpers such as `elevate` from `@wix/sdk/context` (FEDINF-14092).
|
|
364
|
+
*
|
|
365
|
+
* The `& T` is scoped to REST descriptors — the only shape codegen wraps in
|
|
366
|
+
* `MaybeContext` — so `BuildDescriptors` (used by `createClient().use`) is left
|
|
367
|
+
* unchanged and stays bound-only. The fix lives here rather than in `elevate`,
|
|
368
|
+
* which is kept strict on purpose (see #941) so it still rejects bound-only
|
|
369
|
+
* functions that are unsafe through `createRESTModule`.
|
|
358
370
|
*/
|
|
359
371
|
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
360
372
|
host: Host;
|
|
361
|
-
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
373
|
+
} ? T extends RESTFunctionDescriptor ? BuildDescriptors<T, globalThis.ContextualClient['host']> & T : BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
362
374
|
|
|
363
375
|
/**
|
|
364
376
|
* Expose fields based on the current exposure toggle.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/sdk-types",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.10",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Ronny Ringel",
|
|
6
6
|
"email": "ronnyr@wix.com"
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
]
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
|
-
"falconPackageHash": "
|
|
65
|
+
"falconPackageHash": "0c07d4af6ff579e93680872233ba8af1ab54b1c6f61127f1b820ddf4"
|
|
66
66
|
}
|