@wix/sdk-types 1.17.8 → 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 +23 -4
- package/build/index.d.mts +23 -4
- package/build/index.d.ts +23 -4
- package/internal/build/browser/index.d.mts +23 -4
- package/internal/build/index.d.mts +23 -4
- package/internal/build/index.d.ts +23 -4
- package/package.json +2 -2
|
@@ -171,6 +171,13 @@ interface TokenStorage {
|
|
|
171
171
|
getTokens(): Tokens;
|
|
172
172
|
setTokens(tokens: Tokens): void;
|
|
173
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Identity provider to authenticate with instead of the default Wix login page:
|
|
176
|
+
* a well-known social provider, or a custom IAM IdP connection id.
|
|
177
|
+
*/
|
|
178
|
+
type IdentityProvider = 'google' | 'facebook' | {
|
|
179
|
+
connectionId: string;
|
|
180
|
+
};
|
|
174
181
|
|
|
175
182
|
type EventIdentity = {
|
|
176
183
|
identityType: 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
@@ -288,12 +295,24 @@ declare global {
|
|
|
288
295
|
}
|
|
289
296
|
}
|
|
290
297
|
/**
|
|
291
|
-
*
|
|
292
|
-
*
|
|
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`.
|
|
293
312
|
*/
|
|
294
313
|
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
295
314
|
host: Host;
|
|
296
|
-
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
315
|
+
} ? T extends RESTFunctionDescriptor ? BuildDescriptors<T, globalThis.ContextualClient['host']> & T : BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
297
316
|
|
|
298
317
|
/**
|
|
299
318
|
* Expose fields based on the current exposure toggle.
|
|
@@ -1281,4 +1300,4 @@ interface QueryHelpers<T, S extends QuerySpec, R = QueryRequest<T, S>> {
|
|
|
1281
1300
|
Sort: SortFactory<S>;
|
|
1282
1301
|
}
|
|
1283
1302
|
|
|
1284
|
-
export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
|
|
1303
|
+
export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
|
package/build/index.d.mts
CHANGED
|
@@ -171,6 +171,13 @@ interface TokenStorage {
|
|
|
171
171
|
getTokens(): Tokens;
|
|
172
172
|
setTokens(tokens: Tokens): void;
|
|
173
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Identity provider to authenticate with instead of the default Wix login page:
|
|
176
|
+
* a well-known social provider, or a custom IAM IdP connection id.
|
|
177
|
+
*/
|
|
178
|
+
type IdentityProvider = 'google' | 'facebook' | {
|
|
179
|
+
connectionId: string;
|
|
180
|
+
};
|
|
174
181
|
|
|
175
182
|
type EventIdentity = {
|
|
176
183
|
identityType: 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
@@ -288,12 +295,24 @@ declare global {
|
|
|
288
295
|
}
|
|
289
296
|
}
|
|
290
297
|
/**
|
|
291
|
-
*
|
|
292
|
-
*
|
|
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`.
|
|
293
312
|
*/
|
|
294
313
|
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
295
314
|
host: Host;
|
|
296
|
-
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
315
|
+
} ? T extends RESTFunctionDescriptor ? BuildDescriptors<T, globalThis.ContextualClient['host']> & T : BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
297
316
|
|
|
298
317
|
/**
|
|
299
318
|
* Expose fields based on the current exposure toggle.
|
|
@@ -1281,4 +1300,4 @@ interface QueryHelpers<T, S extends QuerySpec, R = QueryRequest<T, S>> {
|
|
|
1281
1300
|
Sort: SortFactory<S>;
|
|
1282
1301
|
}
|
|
1283
1302
|
|
|
1284
|
-
export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
|
|
1303
|
+
export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
|
package/build/index.d.ts
CHANGED
|
@@ -171,6 +171,13 @@ interface TokenStorage {
|
|
|
171
171
|
getTokens(): Tokens;
|
|
172
172
|
setTokens(tokens: Tokens): void;
|
|
173
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Identity provider to authenticate with instead of the default Wix login page:
|
|
176
|
+
* a well-known social provider, or a custom IAM IdP connection id.
|
|
177
|
+
*/
|
|
178
|
+
type IdentityProvider = 'google' | 'facebook' | {
|
|
179
|
+
connectionId: string;
|
|
180
|
+
};
|
|
174
181
|
|
|
175
182
|
type EventIdentity = {
|
|
176
183
|
identityType: 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
@@ -288,12 +295,24 @@ declare global {
|
|
|
288
295
|
}
|
|
289
296
|
}
|
|
290
297
|
/**
|
|
291
|
-
*
|
|
292
|
-
*
|
|
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`.
|
|
293
312
|
*/
|
|
294
313
|
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
295
314
|
host: Host;
|
|
296
|
-
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
315
|
+
} ? T extends RESTFunctionDescriptor ? BuildDescriptors<T, globalThis.ContextualClient['host']> & T : BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
297
316
|
|
|
298
317
|
/**
|
|
299
318
|
* Expose fields based on the current exposure toggle.
|
|
@@ -1281,4 +1300,4 @@ interface QueryHelpers<T, S extends QuerySpec, R = QueryRequest<T, S>> {
|
|
|
1281
1300
|
Sort: SortFactory<S>;
|
|
1282
1301
|
}
|
|
1283
1302
|
|
|
1284
|
-
export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
|
|
1303
|
+
export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
|
|
@@ -229,6 +229,13 @@ interface TokenStorage {
|
|
|
229
229
|
getTokens(): Tokens;
|
|
230
230
|
setTokens(tokens: Tokens): void;
|
|
231
231
|
}
|
|
232
|
+
/**
|
|
233
|
+
* Identity provider to authenticate with instead of the default Wix login page:
|
|
234
|
+
* a well-known social provider, or a custom IAM IdP connection id.
|
|
235
|
+
*/
|
|
236
|
+
type IdentityProvider = 'google' | 'facebook' | {
|
|
237
|
+
connectionId: string;
|
|
238
|
+
};
|
|
232
239
|
|
|
233
240
|
type EventIdentity = {
|
|
234
241
|
identityType: 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
@@ -346,12 +353,24 @@ declare global {
|
|
|
346
353
|
}
|
|
347
354
|
}
|
|
348
355
|
/**
|
|
349
|
-
*
|
|
350
|
-
*
|
|
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`.
|
|
351
370
|
*/
|
|
352
371
|
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
353
372
|
host: Host;
|
|
354
|
-
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
373
|
+
} ? T extends RESTFunctionDescriptor ? BuildDescriptors<T, globalThis.ContextualClient['host']> & T : BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
355
374
|
|
|
356
375
|
/**
|
|
357
376
|
* Expose fields based on the current exposure toggle.
|
|
@@ -1339,4 +1358,4 @@ interface QueryHelpers<T, S extends QuerySpec, R = QueryRequest<T, S>> {
|
|
|
1339
1358
|
Sort: SortFactory<S>;
|
|
1340
1359
|
}
|
|
1341
1360
|
|
|
1342
|
-
export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
|
|
1361
|
+
export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
|
|
@@ -229,6 +229,13 @@ interface TokenStorage {
|
|
|
229
229
|
getTokens(): Tokens;
|
|
230
230
|
setTokens(tokens: Tokens): void;
|
|
231
231
|
}
|
|
232
|
+
/**
|
|
233
|
+
* Identity provider to authenticate with instead of the default Wix login page:
|
|
234
|
+
* a well-known social provider, or a custom IAM IdP connection id.
|
|
235
|
+
*/
|
|
236
|
+
type IdentityProvider = 'google' | 'facebook' | {
|
|
237
|
+
connectionId: string;
|
|
238
|
+
};
|
|
232
239
|
|
|
233
240
|
type EventIdentity = {
|
|
234
241
|
identityType: 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
@@ -346,12 +353,24 @@ declare global {
|
|
|
346
353
|
}
|
|
347
354
|
}
|
|
348
355
|
/**
|
|
349
|
-
*
|
|
350
|
-
*
|
|
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`.
|
|
351
370
|
*/
|
|
352
371
|
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
353
372
|
host: Host;
|
|
354
|
-
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
373
|
+
} ? T extends RESTFunctionDescriptor ? BuildDescriptors<T, globalThis.ContextualClient['host']> & T : BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
355
374
|
|
|
356
375
|
/**
|
|
357
376
|
* Expose fields based on the current exposure toggle.
|
|
@@ -1339,4 +1358,4 @@ interface QueryHelpers<T, S extends QuerySpec, R = QueryRequest<T, S>> {
|
|
|
1339
1358
|
Sort: SortFactory<S>;
|
|
1340
1359
|
}
|
|
1341
1360
|
|
|
1342
|
-
export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
|
|
1361
|
+
export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
|
|
@@ -229,6 +229,13 @@ interface TokenStorage {
|
|
|
229
229
|
getTokens(): Tokens;
|
|
230
230
|
setTokens(tokens: Tokens): void;
|
|
231
231
|
}
|
|
232
|
+
/**
|
|
233
|
+
* Identity provider to authenticate with instead of the default Wix login page:
|
|
234
|
+
* a well-known social provider, or a custom IAM IdP connection id.
|
|
235
|
+
*/
|
|
236
|
+
type IdentityProvider = 'google' | 'facebook' | {
|
|
237
|
+
connectionId: string;
|
|
238
|
+
};
|
|
232
239
|
|
|
233
240
|
type EventIdentity = {
|
|
234
241
|
identityType: 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
@@ -346,12 +353,24 @@ declare global {
|
|
|
346
353
|
}
|
|
347
354
|
}
|
|
348
355
|
/**
|
|
349
|
-
*
|
|
350
|
-
*
|
|
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`.
|
|
351
370
|
*/
|
|
352
371
|
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
353
372
|
host: Host;
|
|
354
|
-
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
373
|
+
} ? T extends RESTFunctionDescriptor ? BuildDescriptors<T, globalThis.ContextualClient['host']> & T : BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
355
374
|
|
|
356
375
|
/**
|
|
357
376
|
* Expose fields based on the current exposure toggle.
|
|
@@ -1339,4 +1358,4 @@ interface QueryHelpers<T, S extends QuerySpec, R = QueryRequest<T, S>> {
|
|
|
1339
1358
|
Sort: SortFactory<S>;
|
|
1340
1359
|
}
|
|
1341
1360
|
|
|
1342
|
-
export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
|
|
1361
|
+
export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
|
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
|
}
|