@wix/sdk-types 1.13.40 → 1.14.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.
@@ -76,16 +76,27 @@ type HttpResponse<T = any> = {
76
76
  headers: any;
77
77
  request?: any;
78
78
  };
79
+ type ResponseTransformer$1 = (data: any) => any;
79
80
  type RequestOptions<_TResponse = any, Data = any> = {
80
81
  method: HTTPMethod;
81
82
  url: string;
82
83
  data?: Data;
83
84
  params?: URLSearchParams;
85
+ fallback?: RequestOptions<any, any>[];
86
+ /**
87
+ * The array option is for interoperability, defacto only the first function is used
88
+ * if an array is provided
89
+ */
90
+ transformResponse?: ResponseTransformer$1 | ResponseTransformer$1[];
84
91
  } & APIMetadata;
85
92
  type APIMetadata = {
86
93
  methodFqn?: string;
87
94
  entityFqdn?: string;
88
95
  packageName?: string;
96
+ migrationOptions?: MigrationOptions;
97
+ };
98
+ type MigrationOptions = {
99
+ optInTransformResponse?: boolean;
89
100
  };
90
101
  type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
91
102
  type RestModuleMeta<TMethod extends HTTPMethod = HTTPMethod, TPathParams = unknown, RequestType = unknown, TOriginalRequestType = unknown, ResponseType = unknown, OriginalResponseType = unknown> = {
@@ -806,4 +817,4 @@ type BaseSearch<Entity, Spec extends SearchSpec> = {
806
817
  */
807
818
  type Search<Entity, Spec extends SearchSpec> = BaseSearch<Entity, Spec> & Partial<Paging<Spec>>;
808
819
 
809
- 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 ExposeFieldsBasedOnToggle, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type NonNullablePaths, type PublicMetadata, type RESTFunctionDescriptor, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, type Search, type SearchSpec, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata };
820
+ 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 ExposeFieldsBasedOnToggle, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type MigrationOptions, type NonNullablePaths, type PublicMetadata, type RESTFunctionDescriptor, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, type Search, type SearchSpec, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata };
package/build/index.d.mts CHANGED
@@ -76,16 +76,27 @@ type HttpResponse<T = any> = {
76
76
  headers: any;
77
77
  request?: any;
78
78
  };
79
+ type ResponseTransformer$1 = (data: any) => any;
79
80
  type RequestOptions<_TResponse = any, Data = any> = {
80
81
  method: HTTPMethod;
81
82
  url: string;
82
83
  data?: Data;
83
84
  params?: URLSearchParams;
85
+ fallback?: RequestOptions<any, any>[];
86
+ /**
87
+ * The array option is for interoperability, defacto only the first function is used
88
+ * if an array is provided
89
+ */
90
+ transformResponse?: ResponseTransformer$1 | ResponseTransformer$1[];
84
91
  } & APIMetadata;
85
92
  type APIMetadata = {
86
93
  methodFqn?: string;
87
94
  entityFqdn?: string;
88
95
  packageName?: string;
96
+ migrationOptions?: MigrationOptions;
97
+ };
98
+ type MigrationOptions = {
99
+ optInTransformResponse?: boolean;
89
100
  };
90
101
  type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
91
102
  type RestModuleMeta<TMethod extends HTTPMethod = HTTPMethod, TPathParams = unknown, RequestType = unknown, TOriginalRequestType = unknown, ResponseType = unknown, OriginalResponseType = unknown> = {
@@ -806,4 +817,4 @@ type BaseSearch<Entity, Spec extends SearchSpec> = {
806
817
  */
807
818
  type Search<Entity, Spec extends SearchSpec> = BaseSearch<Entity, Spec> & Partial<Paging<Spec>>;
808
819
 
809
- 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 ExposeFieldsBasedOnToggle, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type NonNullablePaths, type PublicMetadata, type RESTFunctionDescriptor, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, type Search, type SearchSpec, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata };
820
+ 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 ExposeFieldsBasedOnToggle, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type MigrationOptions, type NonNullablePaths, type PublicMetadata, type RESTFunctionDescriptor, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, type Search, type SearchSpec, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata };
package/build/index.d.ts CHANGED
@@ -76,16 +76,27 @@ type HttpResponse<T = any> = {
76
76
  headers: any;
77
77
  request?: any;
78
78
  };
79
+ type ResponseTransformer$1 = (data: any) => any;
79
80
  type RequestOptions<_TResponse = any, Data = any> = {
80
81
  method: HTTPMethod;
81
82
  url: string;
82
83
  data?: Data;
83
84
  params?: URLSearchParams;
85
+ fallback?: RequestOptions<any, any>[];
86
+ /**
87
+ * The array option is for interoperability, defacto only the first function is used
88
+ * if an array is provided
89
+ */
90
+ transformResponse?: ResponseTransformer$1 | ResponseTransformer$1[];
84
91
  } & APIMetadata;
85
92
  type APIMetadata = {
86
93
  methodFqn?: string;
87
94
  entityFqdn?: string;
88
95
  packageName?: string;
96
+ migrationOptions?: MigrationOptions;
97
+ };
98
+ type MigrationOptions = {
99
+ optInTransformResponse?: boolean;
89
100
  };
90
101
  type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
91
102
  type RestModuleMeta<TMethod extends HTTPMethod = HTTPMethod, TPathParams = unknown, RequestType = unknown, TOriginalRequestType = unknown, ResponseType = unknown, OriginalResponseType = unknown> = {
@@ -806,4 +817,4 @@ type BaseSearch<Entity, Spec extends SearchSpec> = {
806
817
  */
807
818
  type Search<Entity, Spec extends SearchSpec> = BaseSearch<Entity, Spec> & Partial<Paging<Spec>>;
808
819
 
809
- 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 ExposeFieldsBasedOnToggle, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type NonNullablePaths, type PublicMetadata, type RESTFunctionDescriptor, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, type Search, type SearchSpec, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata };
820
+ 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 ExposeFieldsBasedOnToggle, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type MigrationOptions, type NonNullablePaths, type PublicMetadata, type RESTFunctionDescriptor, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, type Search, type SearchSpec, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata };
@@ -134,16 +134,27 @@ type HttpResponse<T = any> = {
134
134
  headers: any;
135
135
  request?: any;
136
136
  };
137
+ type ResponseTransformer$1 = (data: any) => any;
137
138
  type RequestOptions<_TResponse = any, Data = any> = {
138
139
  method: HTTPMethod;
139
140
  url: string;
140
141
  data?: Data;
141
142
  params?: URLSearchParams;
143
+ fallback?: RequestOptions<any, any>[];
144
+ /**
145
+ * The array option is for interoperability, defacto only the first function is used
146
+ * if an array is provided
147
+ */
148
+ transformResponse?: ResponseTransformer$1 | ResponseTransformer$1[];
142
149
  } & APIMetadata;
143
150
  type APIMetadata = {
144
151
  methodFqn?: string;
145
152
  entityFqdn?: string;
146
153
  packageName?: string;
154
+ migrationOptions?: MigrationOptions;
155
+ };
156
+ type MigrationOptions = {
157
+ optInTransformResponse?: boolean;
147
158
  };
148
159
  type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
149
160
  type RestModuleMeta<TMethod extends HTTPMethod = HTTPMethod, TPathParams = unknown, RequestType = unknown, TOriginalRequestType = unknown, ResponseType = unknown, OriginalResponseType = unknown> = {
@@ -864,4 +875,4 @@ type BaseSearch<Entity, Spec extends SearchSpec> = {
864
875
  */
865
876
  type Search<Entity, Spec extends SearchSpec> = BaseSearch<Entity, Spec> & Partial<Paging<Spec>>;
866
877
 
867
- 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 ExposeFieldsBasedOnToggle, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type NonNullablePaths, type PublicMetadata, type RESTFunctionDescriptor, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, type Search, type SearchSpec, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata };
878
+ 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 ExposeFieldsBasedOnToggle, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type MigrationOptions, type NonNullablePaths, type PublicMetadata, type RESTFunctionDescriptor, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, type Search, type SearchSpec, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata };
@@ -134,16 +134,27 @@ type HttpResponse<T = any> = {
134
134
  headers: any;
135
135
  request?: any;
136
136
  };
137
+ type ResponseTransformer$1 = (data: any) => any;
137
138
  type RequestOptions<_TResponse = any, Data = any> = {
138
139
  method: HTTPMethod;
139
140
  url: string;
140
141
  data?: Data;
141
142
  params?: URLSearchParams;
143
+ fallback?: RequestOptions<any, any>[];
144
+ /**
145
+ * The array option is for interoperability, defacto only the first function is used
146
+ * if an array is provided
147
+ */
148
+ transformResponse?: ResponseTransformer$1 | ResponseTransformer$1[];
142
149
  } & APIMetadata;
143
150
  type APIMetadata = {
144
151
  methodFqn?: string;
145
152
  entityFqdn?: string;
146
153
  packageName?: string;
154
+ migrationOptions?: MigrationOptions;
155
+ };
156
+ type MigrationOptions = {
157
+ optInTransformResponse?: boolean;
147
158
  };
148
159
  type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
149
160
  type RestModuleMeta<TMethod extends HTTPMethod = HTTPMethod, TPathParams = unknown, RequestType = unknown, TOriginalRequestType = unknown, ResponseType = unknown, OriginalResponseType = unknown> = {
@@ -864,4 +875,4 @@ type BaseSearch<Entity, Spec extends SearchSpec> = {
864
875
  */
865
876
  type Search<Entity, Spec extends SearchSpec> = BaseSearch<Entity, Spec> & Partial<Paging<Spec>>;
866
877
 
867
- 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 ExposeFieldsBasedOnToggle, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type NonNullablePaths, type PublicMetadata, type RESTFunctionDescriptor, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, type Search, type SearchSpec, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata };
878
+ 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 ExposeFieldsBasedOnToggle, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type MigrationOptions, type NonNullablePaths, type PublicMetadata, type RESTFunctionDescriptor, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, type Search, type SearchSpec, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata };
@@ -134,16 +134,27 @@ type HttpResponse<T = any> = {
134
134
  headers: any;
135
135
  request?: any;
136
136
  };
137
+ type ResponseTransformer$1 = (data: any) => any;
137
138
  type RequestOptions<_TResponse = any, Data = any> = {
138
139
  method: HTTPMethod;
139
140
  url: string;
140
141
  data?: Data;
141
142
  params?: URLSearchParams;
143
+ fallback?: RequestOptions<any, any>[];
144
+ /**
145
+ * The array option is for interoperability, defacto only the first function is used
146
+ * if an array is provided
147
+ */
148
+ transformResponse?: ResponseTransformer$1 | ResponseTransformer$1[];
142
149
  } & APIMetadata;
143
150
  type APIMetadata = {
144
151
  methodFqn?: string;
145
152
  entityFqdn?: string;
146
153
  packageName?: string;
154
+ migrationOptions?: MigrationOptions;
155
+ };
156
+ type MigrationOptions = {
157
+ optInTransformResponse?: boolean;
147
158
  };
148
159
  type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
149
160
  type RestModuleMeta<TMethod extends HTTPMethod = HTTPMethod, TPathParams = unknown, RequestType = unknown, TOriginalRequestType = unknown, ResponseType = unknown, OriginalResponseType = unknown> = {
@@ -864,4 +875,4 @@ type BaseSearch<Entity, Spec extends SearchSpec> = {
864
875
  */
865
876
  type Search<Entity, Spec extends SearchSpec> = BaseSearch<Entity, Spec> & Partial<Paging<Spec>>;
866
877
 
867
- 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 ExposeFieldsBasedOnToggle, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type NonNullablePaths, type PublicMetadata, type RESTFunctionDescriptor, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, type Search, type SearchSpec, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata };
878
+ 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 ExposeFieldsBasedOnToggle, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type MaybeContext, type Method, type MigrationOptions, type NonNullablePaths, type PublicMetadata, type RESTFunctionDescriptor, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, type Search, type SearchSpec, 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.13.40",
3
+ "version": "1.14.0",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Ronny Ringel",
@@ -35,7 +35,7 @@
35
35
  "type-fest": "^4.41.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@types/node": "^20.19.10",
38
+ "@types/node": "^20.19.13",
39
39
  "eslint": "^8.57.1",
40
40
  "eslint-config-sdk": "0.0.0",
41
41
  "tsup": "^7.3.0",
@@ -62,5 +62,5 @@
62
62
  "wallaby": {
63
63
  "autoDetect": true
64
64
  },
65
- "falconPackageHash": "4ee21968afd533e93159c5265973ca363af928dc4657be9352dfe3bf"
65
+ "falconPackageHash": "ad79ca2ca9d3a97ddefbd940a7794e50c91e55e26806c0132e5d8d53"
66
66
  }