@wix/sdk-types 1.12.1 → 1.12.3

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/index.d.mts CHANGED
@@ -436,4 +436,16 @@ type PublicMetadata = {
436
436
  PACKAGE_NAME?: string;
437
437
  };
438
438
 
439
- export { type APIMetadata, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type Method, type PublicMetadata, type RESTFunctionDescriptor, type RequestContext, type RequestOptions, type RequestOptionsFactory, SERVICE_PLUGIN_ERROR_TYPE, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata };
439
+ declare global {
440
+ interface ContextualClient {
441
+ }
442
+ }
443
+ /**
444
+ * A type used to create concerete types from SDK descriptors in
445
+ * case a contextual client is available.
446
+ */
447
+ type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
448
+ host: Host;
449
+ } ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
450
+
451
+ export { type APIMetadata, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type PublicMetadata, type RESTFunctionDescriptor, type RequestContext, type RequestOptions, type RequestOptionsFactory, SERVICE_PLUGIN_ERROR_TYPE, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata };
package/build/index.d.ts CHANGED
@@ -436,4 +436,16 @@ type PublicMetadata = {
436
436
  PACKAGE_NAME?: string;
437
437
  };
438
438
 
439
- export { type APIMetadata, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type Method, type PublicMetadata, type RESTFunctionDescriptor, type RequestContext, type RequestOptions, type RequestOptionsFactory, SERVICE_PLUGIN_ERROR_TYPE, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata };
439
+ declare global {
440
+ interface ContextualClient {
441
+ }
442
+ }
443
+ /**
444
+ * A type used to create concerete types from SDK descriptors in
445
+ * case a contextual client is available.
446
+ */
447
+ type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
448
+ host: Host;
449
+ } ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
450
+
451
+ export { type APIMetadata, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type PublicMetadata, type RESTFunctionDescriptor, type RequestContext, type RequestOptions, type RequestOptionsFactory, SERVICE_PLUGIN_ERROR_TYPE, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/sdk-types",
3
- "version": "1.12.1",
3
+ "version": "1.12.3",
4
4
  "license": "UNLICENSED",
5
5
  "author": {
6
6
  "name": "Ronny Ringel",
@@ -58,5 +58,5 @@
58
58
  "wallaby": {
59
59
  "autoDetect": true
60
60
  },
61
- "falconPackageHash": "3ade7900865a4781de88ae3fd23b77db1eff4d458880ae16e81a6b4e"
61
+ "falconPackageHash": "752e0b1c726af0c96999550c6ce6651d0466c9972e8a1f5d4ae8439f"
62
62
  }