@wix/sdk-types 1.12.0 → 1.12.2
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 +23 -1
- package/build/index.d.ts +23 -1
- package/enable-all-context-types.d.ts +8 -0
- package/package.json +4 -3
package/build/index.d.mts
CHANGED
|
@@ -21,8 +21,18 @@ type Host<Environment = unknown> = {
|
|
|
21
21
|
* like internationalization, billing, etc.
|
|
22
22
|
*/
|
|
23
23
|
essentials?: {
|
|
24
|
+
/**
|
|
25
|
+
* The language of the currently viewed session
|
|
26
|
+
*/
|
|
24
27
|
language?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The locale of the currently viewed session
|
|
30
|
+
*/
|
|
25
31
|
locale?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Any headers that should be passed through to the API requests
|
|
34
|
+
*/
|
|
35
|
+
passThroughHeaders?: Record<string, string>;
|
|
26
36
|
};
|
|
27
37
|
};
|
|
28
38
|
|
|
@@ -426,4 +436,16 @@ type PublicMetadata = {
|
|
|
426
436
|
PACKAGE_NAME?: string;
|
|
427
437
|
};
|
|
428
438
|
|
|
429
|
-
|
|
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
|
@@ -21,8 +21,18 @@ type Host<Environment = unknown> = {
|
|
|
21
21
|
* like internationalization, billing, etc.
|
|
22
22
|
*/
|
|
23
23
|
essentials?: {
|
|
24
|
+
/**
|
|
25
|
+
* The language of the currently viewed session
|
|
26
|
+
*/
|
|
24
27
|
language?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The locale of the currently viewed session
|
|
30
|
+
*/
|
|
25
31
|
locale?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Any headers that should be passed through to the API requests
|
|
34
|
+
*/
|
|
35
|
+
passThroughHeaders?: Record<string, string>;
|
|
26
36
|
};
|
|
27
37
|
};
|
|
28
38
|
|
|
@@ -426,4 +436,16 @@ type PublicMetadata = {
|
|
|
426
436
|
PACKAGE_NAME?: string;
|
|
427
437
|
};
|
|
428
438
|
|
|
429
|
-
|
|
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.
|
|
3
|
+
"version": "1.12.2",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Ronny Ringel",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"sideEffects": false,
|
|
13
13
|
"types": "build/index.d.ts",
|
|
14
14
|
"files": [
|
|
15
|
-
"build"
|
|
15
|
+
"build",
|
|
16
|
+
"enable-all-context-types.d.ts"
|
|
16
17
|
],
|
|
17
18
|
"publishConfig": {
|
|
18
19
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -58,5 +59,5 @@
|
|
|
58
59
|
"wallaby": {
|
|
59
60
|
"autoDetect": true
|
|
60
61
|
},
|
|
61
|
-
"falconPackageHash": "
|
|
62
|
+
"falconPackageHash": "d792d8c125ad82e0e2f2102bf625213e93dd91dfc8255b91a58a222a"
|
|
62
63
|
}
|