@wix/app-management 1.0.14 → 1.0.16
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/app-management",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -19,14 +19,15 @@
|
|
|
19
19
|
"service-plugins"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@wix/app-management_app-instances": "1.0.
|
|
23
|
-
"@wix/app-management_app-plans": "1.0.
|
|
24
|
-
"@wix/app-management_bi-events": "1.0.
|
|
25
|
-
"@wix/app-management_billing": "1.0.
|
|
26
|
-
"@wix/app-management_custom-charges": "1.0.
|
|
27
|
-
"@wix/app-management_embedded-scripts": "1.0.
|
|
22
|
+
"@wix/app-management_app-instances": "1.0.8",
|
|
23
|
+
"@wix/app-management_app-plans": "1.0.8",
|
|
24
|
+
"@wix/app-management_bi-events": "1.0.7",
|
|
25
|
+
"@wix/app-management_billing": "1.0.8",
|
|
26
|
+
"@wix/app-management_custom-charges": "1.0.2",
|
|
27
|
+
"@wix/app-management_embedded-scripts": "1.0.5"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
+
"@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
|
|
30
31
|
"glob": "^10.4.1",
|
|
31
32
|
"rollup": "^4.18.0",
|
|
32
33
|
"rollup-plugin-dts": "^6.1.1",
|
|
@@ -48,5 +49,5 @@
|
|
|
48
49
|
"fqdn": ""
|
|
49
50
|
}
|
|
50
51
|
},
|
|
51
|
-
"falconPackageHash": "
|
|
52
|
+
"falconPackageHash": "dd16d4f51c17d1bb9c61eb3b5aba28fb5e1db63cbb4a2a6f020dbec3"
|
|
52
53
|
}
|
|
@@ -219,42 +219,44 @@ interface ListAppPlansByAppIdResponseNonNullableFields {
|
|
|
219
219
|
}[];
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
type RESTFunctionDescriptor
|
|
223
|
-
interface HttpClient
|
|
224
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
225
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
222
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
223
|
+
interface HttpClient {
|
|
224
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
226
225
|
}
|
|
227
|
-
type RequestOptionsFactory
|
|
228
|
-
type HttpResponse
|
|
226
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
227
|
+
type HttpResponse<T = any> = {
|
|
229
228
|
data: T;
|
|
230
229
|
status: number;
|
|
231
230
|
statusText: string;
|
|
232
231
|
headers: any;
|
|
233
232
|
request?: any;
|
|
234
233
|
};
|
|
235
|
-
type RequestOptions
|
|
234
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
236
235
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
237
236
|
url: string;
|
|
238
237
|
data?: Data;
|
|
239
238
|
params?: URLSearchParams;
|
|
240
|
-
} & APIMetadata
|
|
241
|
-
type APIMetadata
|
|
239
|
+
} & APIMetadata;
|
|
240
|
+
type APIMetadata = {
|
|
242
241
|
methodFqn?: string;
|
|
243
242
|
entityFqdn?: string;
|
|
244
243
|
packageName?: string;
|
|
245
244
|
};
|
|
246
|
-
type BuildRESTFunction
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}
|
|
245
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
246
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
247
|
+
__type: 'event-definition';
|
|
248
|
+
type: Type;
|
|
249
|
+
isDomainEvent?: boolean;
|
|
250
|
+
transformations?: unknown;
|
|
251
|
+
__payload: Payload;
|
|
252
|
+
};
|
|
253
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
254
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
255
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
254
256
|
|
|
255
|
-
declare function listAppPlansByAppId$1(httpClient: HttpClient
|
|
257
|
+
declare function listAppPlansByAppId$1(httpClient: HttpClient): (appIds: string[]) => Promise<ListAppPlansByAppIdResponse & ListAppPlansByAppIdResponseNonNullableFields>;
|
|
256
258
|
|
|
257
|
-
declare const listAppPlansByAppId: BuildRESTFunction
|
|
259
|
+
declare const listAppPlansByAppId: BuildRESTFunction<typeof listAppPlansByAppId$1>;
|
|
258
260
|
|
|
259
261
|
declare const context$4_listAppPlansByAppId: typeof listAppPlansByAppId;
|
|
260
262
|
declare namespace context$4 {
|
|
@@ -640,57 +642,14 @@ interface AppInstancePaidPlanAutoRenewalCancelledEnvelope {
|
|
|
640
642
|
metadata: BaseEventMetadata;
|
|
641
643
|
}
|
|
642
644
|
|
|
643
|
-
|
|
644
|
-
interface HttpClient$3 {
|
|
645
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
646
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
647
|
-
}
|
|
648
|
-
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
649
|
-
type HttpResponse$3<T = any> = {
|
|
650
|
-
data: T;
|
|
651
|
-
status: number;
|
|
652
|
-
statusText: string;
|
|
653
|
-
headers: any;
|
|
654
|
-
request?: any;
|
|
655
|
-
};
|
|
656
|
-
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
657
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
658
|
-
url: string;
|
|
659
|
-
data?: Data;
|
|
660
|
-
params?: URLSearchParams;
|
|
661
|
-
} & APIMetadata$3;
|
|
662
|
-
type APIMetadata$3 = {
|
|
663
|
-
methodFqn?: string;
|
|
664
|
-
entityFqdn?: string;
|
|
665
|
-
packageName?: string;
|
|
666
|
-
};
|
|
667
|
-
type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
|
|
668
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
669
|
-
__type: 'event-definition';
|
|
670
|
-
type: Type;
|
|
671
|
-
isDomainEvent?: boolean;
|
|
672
|
-
transformations?: (envelope: unknown) => Payload;
|
|
673
|
-
__payload: Payload;
|
|
674
|
-
};
|
|
675
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
676
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
677
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
678
|
-
|
|
679
|
-
declare global {
|
|
680
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
681
|
-
interface SymbolConstructor {
|
|
682
|
-
readonly observable: symbol;
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
declare function getAppInstance$1(httpClient: HttpClient$3): () => Promise<GetAppInstanceResponse & GetAppInstanceResponseNonNullableFields>;
|
|
645
|
+
declare function getAppInstance$1(httpClient: HttpClient): () => Promise<GetAppInstanceResponse & GetAppInstanceResponseNonNullableFields>;
|
|
687
646
|
declare const onAppInstanceInstalled$1: EventDefinition<AppInstanceInstalledEnvelope, "AppInstalled">;
|
|
688
647
|
declare const onAppInstanceRemoved$1: EventDefinition<AppInstanceRemovedEnvelope, "AppRemoved">;
|
|
689
648
|
declare const onAppInstancePaidPlanPurchased$1: EventDefinition<AppInstancePaidPlanPurchasedEnvelope, "PaidPlanPurchased">;
|
|
690
649
|
declare const onAppInstancePaidPlanChanged$1: EventDefinition<AppInstancePaidPlanChangedEnvelope, "PaidPlanChanged">;
|
|
691
650
|
declare const onAppInstancePaidPlanAutoRenewalCancelled$1: EventDefinition<AppInstancePaidPlanAutoRenewalCancelledEnvelope, "PaidPlanAutoRenewalCancelled">;
|
|
692
651
|
|
|
693
|
-
declare const getAppInstance: BuildRESTFunction
|
|
652
|
+
declare const getAppInstance: BuildRESTFunction<typeof getAppInstance$1>;
|
|
694
653
|
declare const onAppInstanceInstalled: BuildEventDefinition<typeof onAppInstanceInstalled$1>;
|
|
695
654
|
declare const onAppInstanceRemoved: BuildEventDefinition<typeof onAppInstanceRemoved$1>;
|
|
696
655
|
declare const onAppInstancePaidPlanPurchased: BuildEventDefinition<typeof onAppInstancePaidPlanPurchased$1>;
|
|
@@ -707,39 +666,6 @@ declare namespace context$3 {
|
|
|
707
666
|
export { context$3_getAppInstance as getAppInstance, context$3_onAppInstanceInstalled as onAppInstanceInstalled, context$3_onAppInstancePaidPlanAutoRenewalCancelled as onAppInstancePaidPlanAutoRenewalCancelled, context$3_onAppInstancePaidPlanChanged as onAppInstancePaidPlanChanged, context$3_onAppInstancePaidPlanPurchased as onAppInstancePaidPlanPurchased, context$3_onAppInstanceRemoved as onAppInstanceRemoved };
|
|
708
667
|
}
|
|
709
668
|
|
|
710
|
-
type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
|
|
711
|
-
interface HttpClient$2 {
|
|
712
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
713
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
714
|
-
}
|
|
715
|
-
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
716
|
-
type HttpResponse$2<T = any> = {
|
|
717
|
-
data: T;
|
|
718
|
-
status: number;
|
|
719
|
-
statusText: string;
|
|
720
|
-
headers: any;
|
|
721
|
-
request?: any;
|
|
722
|
-
};
|
|
723
|
-
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
724
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
725
|
-
url: string;
|
|
726
|
-
data?: Data;
|
|
727
|
-
params?: URLSearchParams;
|
|
728
|
-
} & APIMetadata$2;
|
|
729
|
-
type APIMetadata$2 = {
|
|
730
|
-
methodFqn?: string;
|
|
731
|
-
entityFqdn?: string;
|
|
732
|
-
packageName?: string;
|
|
733
|
-
};
|
|
734
|
-
type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
|
|
735
|
-
|
|
736
|
-
declare global {
|
|
737
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
738
|
-
interface SymbolConstructor {
|
|
739
|
-
readonly observable: symbol;
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
|
|
743
669
|
declare enum EventName {
|
|
744
670
|
UNKNOWN = "UNKNOWN",
|
|
745
671
|
APP_DASHBOARD_LOADED = "APP_DASHBOARD_LOADED",
|
|
@@ -790,9 +716,9 @@ interface SendBiEventOptions {
|
|
|
790
716
|
eventData?: Record<string, string>;
|
|
791
717
|
}
|
|
792
718
|
|
|
793
|
-
declare function sendBiEvent$1(httpClient: HttpClient
|
|
719
|
+
declare function sendBiEvent$1(httpClient: HttpClient): (options?: SendBiEventOptions) => Promise<void>;
|
|
794
720
|
|
|
795
|
-
declare const sendBiEvent: BuildRESTFunction
|
|
721
|
+
declare const sendBiEvent: BuildRESTFunction<typeof sendBiEvent$1>;
|
|
796
722
|
|
|
797
723
|
declare const context$2_sendBiEvent: typeof sendBiEvent;
|
|
798
724
|
declare namespace context$2 {
|
|
@@ -885,44 +811,11 @@ interface GetUrlOptions {
|
|
|
885
811
|
couponCode?: string | null;
|
|
886
812
|
}
|
|
887
813
|
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
891
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
892
|
-
}
|
|
893
|
-
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
894
|
-
type HttpResponse$1<T = any> = {
|
|
895
|
-
data: T;
|
|
896
|
-
status: number;
|
|
897
|
-
statusText: string;
|
|
898
|
-
headers: any;
|
|
899
|
-
request?: any;
|
|
900
|
-
};
|
|
901
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
902
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
903
|
-
url: string;
|
|
904
|
-
data?: Data;
|
|
905
|
-
params?: URLSearchParams;
|
|
906
|
-
} & APIMetadata$1;
|
|
907
|
-
type APIMetadata$1 = {
|
|
908
|
-
methodFqn?: string;
|
|
909
|
-
entityFqdn?: string;
|
|
910
|
-
packageName?: string;
|
|
911
|
-
};
|
|
912
|
-
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
913
|
-
|
|
914
|
-
declare global {
|
|
915
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
916
|
-
interface SymbolConstructor {
|
|
917
|
-
readonly observable: symbol;
|
|
918
|
-
}
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
declare function getUrl$1(httpClient: HttpClient$1): (productId: string, options?: GetUrlOptions) => Promise<GetUrlResponse & GetUrlResponseNonNullableFields>;
|
|
922
|
-
declare function getPurchaseHistory$1(httpClient: HttpClient$1): () => Promise<GetPurchaseHistoryResponse & GetPurchaseHistoryResponseNonNullableFields>;
|
|
814
|
+
declare function getUrl$1(httpClient: HttpClient): (productId: string, options?: GetUrlOptions) => Promise<GetUrlResponse & GetUrlResponseNonNullableFields>;
|
|
815
|
+
declare function getPurchaseHistory$1(httpClient: HttpClient): () => Promise<GetPurchaseHistoryResponse & GetPurchaseHistoryResponseNonNullableFields>;
|
|
923
816
|
|
|
924
|
-
declare const getUrl: BuildRESTFunction
|
|
925
|
-
declare const getPurchaseHistory: BuildRESTFunction
|
|
817
|
+
declare const getUrl: BuildRESTFunction<typeof getUrl$1>;
|
|
818
|
+
declare const getPurchaseHistory: BuildRESTFunction<typeof getPurchaseHistory$1>;
|
|
926
819
|
|
|
927
820
|
declare const context$1_getPurchaseHistory: typeof getPurchaseHistory;
|
|
928
821
|
declare const context$1_getUrl: typeof getUrl;
|
|
@@ -955,39 +848,6 @@ interface GetEmbeddedScriptOptions {
|
|
|
955
848
|
componentId?: string | null;
|
|
956
849
|
}
|
|
957
850
|
|
|
958
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
959
|
-
interface HttpClient {
|
|
960
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
961
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
962
|
-
}
|
|
963
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
964
|
-
type HttpResponse<T = any> = {
|
|
965
|
-
data: T;
|
|
966
|
-
status: number;
|
|
967
|
-
statusText: string;
|
|
968
|
-
headers: any;
|
|
969
|
-
request?: any;
|
|
970
|
-
};
|
|
971
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
972
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
973
|
-
url: string;
|
|
974
|
-
data?: Data;
|
|
975
|
-
params?: URLSearchParams;
|
|
976
|
-
} & APIMetadata;
|
|
977
|
-
type APIMetadata = {
|
|
978
|
-
methodFqn?: string;
|
|
979
|
-
entityFqdn?: string;
|
|
980
|
-
packageName?: string;
|
|
981
|
-
};
|
|
982
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
983
|
-
|
|
984
|
-
declare global {
|
|
985
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
986
|
-
interface SymbolConstructor {
|
|
987
|
-
readonly observable: symbol;
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
|
|
991
851
|
declare function embedScript$1(httpClient: HttpClient): (properties: ScriptProperties, options?: EmbedScriptOptions) => Promise<EmbedScriptResponse & EmbedScriptResponseNonNullableFields>;
|
|
992
852
|
declare function getEmbeddedScript$1(httpClient: HttpClient): (options?: GetEmbeddedScriptOptions) => Promise<ScriptProperties & {
|
|
993
853
|
disabled: boolean;
|
|
@@ -228,41 +228,41 @@ interface ListAppPlansByAppIdResponseNonNullableFields {
|
|
|
228
228
|
}[];
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
interface HttpClient
|
|
232
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
233
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
231
|
+
interface HttpClient {
|
|
232
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
234
233
|
}
|
|
235
|
-
type RequestOptionsFactory
|
|
236
|
-
type HttpResponse
|
|
234
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
235
|
+
type HttpResponse<T = any> = {
|
|
237
236
|
data: T;
|
|
238
237
|
status: number;
|
|
239
238
|
statusText: string;
|
|
240
239
|
headers: any;
|
|
241
240
|
request?: any;
|
|
242
241
|
};
|
|
243
|
-
type RequestOptions
|
|
242
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
244
243
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
245
244
|
url: string;
|
|
246
245
|
data?: Data;
|
|
247
246
|
params?: URLSearchParams;
|
|
248
|
-
} & APIMetadata
|
|
249
|
-
type APIMetadata
|
|
247
|
+
} & APIMetadata;
|
|
248
|
+
type APIMetadata = {
|
|
250
249
|
methodFqn?: string;
|
|
251
250
|
entityFqdn?: string;
|
|
252
251
|
packageName?: string;
|
|
253
252
|
};
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
}
|
|
253
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
254
|
+
__type: 'event-definition';
|
|
255
|
+
type: Type;
|
|
256
|
+
isDomainEvent?: boolean;
|
|
257
|
+
transformations?: unknown;
|
|
258
|
+
__payload: Payload;
|
|
259
|
+
};
|
|
260
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
261
261
|
|
|
262
262
|
declare const __metadata$4: {
|
|
263
263
|
PACKAGE_NAME: string;
|
|
264
264
|
};
|
|
265
|
-
declare function listAppPlansByAppId(httpClient: HttpClient
|
|
265
|
+
declare function listAppPlansByAppId(httpClient: HttpClient): (appIds: string[]) => Promise<ListAppPlansByAppIdResponse & ListAppPlansByAppIdResponseNonNullableFields>;
|
|
266
266
|
|
|
267
267
|
type index_d$4_AppPlans = AppPlans;
|
|
268
268
|
type index_d$4_Cycle = Cycle;
|
|
@@ -680,49 +680,10 @@ interface AppInstancePaidPlanAutoRenewalCancelledEnvelope {
|
|
|
680
680
|
metadata: BaseEventMetadata;
|
|
681
681
|
}
|
|
682
682
|
|
|
683
|
-
interface HttpClient$3 {
|
|
684
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
685
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
686
|
-
}
|
|
687
|
-
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
688
|
-
type HttpResponse$3<T = any> = {
|
|
689
|
-
data: T;
|
|
690
|
-
status: number;
|
|
691
|
-
statusText: string;
|
|
692
|
-
headers: any;
|
|
693
|
-
request?: any;
|
|
694
|
-
};
|
|
695
|
-
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
696
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
697
|
-
url: string;
|
|
698
|
-
data?: Data;
|
|
699
|
-
params?: URLSearchParams;
|
|
700
|
-
} & APIMetadata$3;
|
|
701
|
-
type APIMetadata$3 = {
|
|
702
|
-
methodFqn?: string;
|
|
703
|
-
entityFqdn?: string;
|
|
704
|
-
packageName?: string;
|
|
705
|
-
};
|
|
706
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
707
|
-
__type: 'event-definition';
|
|
708
|
-
type: Type;
|
|
709
|
-
isDomainEvent?: boolean;
|
|
710
|
-
transformations?: (envelope: unknown) => Payload;
|
|
711
|
-
__payload: Payload;
|
|
712
|
-
};
|
|
713
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
714
|
-
|
|
715
|
-
declare global {
|
|
716
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
717
|
-
interface SymbolConstructor {
|
|
718
|
-
readonly observable: symbol;
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
|
|
722
683
|
declare const __metadata$3: {
|
|
723
684
|
PACKAGE_NAME: string;
|
|
724
685
|
};
|
|
725
|
-
declare function getAppInstance(httpClient: HttpClient
|
|
686
|
+
declare function getAppInstance(httpClient: HttpClient): () => Promise<GetAppInstanceResponse & GetAppInstanceResponseNonNullableFields>;
|
|
726
687
|
declare const onAppInstanceInstalled: EventDefinition<AppInstanceInstalledEnvelope, "AppInstalled">;
|
|
727
688
|
declare const onAppInstanceRemoved: EventDefinition<AppInstanceRemovedEnvelope, "AppRemoved">;
|
|
728
689
|
declare const onAppInstancePaidPlanPurchased: EventDefinition<AppInstancePaidPlanPurchasedEnvelope, "PaidPlanPurchased">;
|
|
@@ -767,37 +728,6 @@ declare namespace index_d$3 {
|
|
|
767
728
|
export { type index_d$3_AppInstalled as AppInstalled, type index_d$3_AppInstance as AppInstance, type index_d$3_AppInstanceInstalledEnvelope as AppInstanceInstalledEnvelope, type index_d$3_AppInstancePaidPlanAutoRenewalCancelledEnvelope as AppInstancePaidPlanAutoRenewalCancelledEnvelope, type index_d$3_AppInstancePaidPlanChangedEnvelope as AppInstancePaidPlanChangedEnvelope, type index_d$3_AppInstancePaidPlanPurchasedEnvelope as AppInstancePaidPlanPurchasedEnvelope, type index_d$3_AppInstanceRemovedEnvelope as AppInstanceRemovedEnvelope, type index_d$3_AppRemoved as AppRemoved, type index_d$3_AvailablePlan as AvailablePlan, type index_d$3_BaseEventMetadata as BaseEventMetadata, type index_d$3_BillingInfo as BillingInfo, type index_d$3_FreeTrialInfo as FreeTrialInfo, index_d$3_FreeTrialStatus as FreeTrialStatus, type index_d$3_GetAppInstanceByInstanceIdRequest as GetAppInstanceByInstanceIdRequest, type index_d$3_GetAppInstanceRequest as GetAppInstanceRequest, type index_d$3_GetAppInstanceResponse as GetAppInstanceResponse, type index_d$3_GetAppInstanceResponseNonNullableFields as GetAppInstanceResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type index_d$3_Locale as Locale, type MessageEnvelope$1 as MessageEnvelope, type index_d$3_Multilingual as Multilingual, type index_d$3_OwnerInfo as OwnerInfo, type index_d$3_PaidPlanAutoRenewalCancelled as PaidPlanAutoRenewalCancelled, type index_d$3_PaidPlanChanged as PaidPlanChanged, type index_d$3_PaidPlanPurchased as PaidPlanPurchased, PaymentCycle$1 as PaymentCycle, index_d$3_ResolutionMethod as ResolutionMethod, type index_d$3_SiteInfo as SiteInfo, type index_d$3_SupportedLanguage as SupportedLanguage, WebhookIdentityType$1 as WebhookIdentityType, __metadata$3 as __metadata, index_d$3_getAppInstance as getAppInstance, index_d$3_onAppInstanceInstalled as onAppInstanceInstalled, index_d$3_onAppInstancePaidPlanAutoRenewalCancelled as onAppInstancePaidPlanAutoRenewalCancelled, index_d$3_onAppInstancePaidPlanChanged as onAppInstancePaidPlanChanged, index_d$3_onAppInstancePaidPlanPurchased as onAppInstancePaidPlanPurchased, index_d$3_onAppInstanceRemoved as onAppInstanceRemoved };
|
|
768
729
|
}
|
|
769
730
|
|
|
770
|
-
interface HttpClient$2 {
|
|
771
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
772
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
773
|
-
}
|
|
774
|
-
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
775
|
-
type HttpResponse$2<T = any> = {
|
|
776
|
-
data: T;
|
|
777
|
-
status: number;
|
|
778
|
-
statusText: string;
|
|
779
|
-
headers: any;
|
|
780
|
-
request?: any;
|
|
781
|
-
};
|
|
782
|
-
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
783
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
784
|
-
url: string;
|
|
785
|
-
data?: Data;
|
|
786
|
-
params?: URLSearchParams;
|
|
787
|
-
} & APIMetadata$2;
|
|
788
|
-
type APIMetadata$2 = {
|
|
789
|
-
methodFqn?: string;
|
|
790
|
-
entityFqdn?: string;
|
|
791
|
-
packageName?: string;
|
|
792
|
-
};
|
|
793
|
-
|
|
794
|
-
declare global {
|
|
795
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
796
|
-
interface SymbolConstructor {
|
|
797
|
-
readonly observable: symbol;
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
|
|
801
731
|
interface SendBIEventResponse {
|
|
802
732
|
}
|
|
803
733
|
interface SendBIEventRequest {
|
|
@@ -889,7 +819,7 @@ interface SendBiEventOptions {
|
|
|
889
819
|
declare const __metadata$2: {
|
|
890
820
|
PACKAGE_NAME: string;
|
|
891
821
|
};
|
|
892
|
-
declare function sendBiEvent(httpClient: HttpClient
|
|
822
|
+
declare function sendBiEvent(httpClient: HttpClient): (options?: SendBiEventOptions) => Promise<void>;
|
|
893
823
|
|
|
894
824
|
type index_d$2_EventName = EventName;
|
|
895
825
|
declare const index_d$2_EventName: typeof EventName;
|
|
@@ -1153,42 +1083,11 @@ interface GetUrlOptions {
|
|
|
1153
1083
|
couponCode?: string | null;
|
|
1154
1084
|
}
|
|
1155
1085
|
|
|
1156
|
-
interface HttpClient$1 {
|
|
1157
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
1158
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
1159
|
-
}
|
|
1160
|
-
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
1161
|
-
type HttpResponse$1<T = any> = {
|
|
1162
|
-
data: T;
|
|
1163
|
-
status: number;
|
|
1164
|
-
statusText: string;
|
|
1165
|
-
headers: any;
|
|
1166
|
-
request?: any;
|
|
1167
|
-
};
|
|
1168
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
1169
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1170
|
-
url: string;
|
|
1171
|
-
data?: Data;
|
|
1172
|
-
params?: URLSearchParams;
|
|
1173
|
-
} & APIMetadata$1;
|
|
1174
|
-
type APIMetadata$1 = {
|
|
1175
|
-
methodFqn?: string;
|
|
1176
|
-
entityFqdn?: string;
|
|
1177
|
-
packageName?: string;
|
|
1178
|
-
};
|
|
1179
|
-
|
|
1180
|
-
declare global {
|
|
1181
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1182
|
-
interface SymbolConstructor {
|
|
1183
|
-
readonly observable: symbol;
|
|
1184
|
-
}
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
1086
|
declare const __metadata$1: {
|
|
1188
1087
|
PACKAGE_NAME: string;
|
|
1189
1088
|
};
|
|
1190
|
-
declare function getUrl(httpClient: HttpClient
|
|
1191
|
-
declare function getPurchaseHistory(httpClient: HttpClient
|
|
1089
|
+
declare function getUrl(httpClient: HttpClient): (productId: string, options?: GetUrlOptions) => Promise<GetUrlResponse & GetUrlResponseNonNullableFields>;
|
|
1090
|
+
declare function getPurchaseHistory(httpClient: HttpClient): () => Promise<GetPurchaseHistoryResponse & GetPurchaseHistoryResponseNonNullableFields>;
|
|
1192
1091
|
|
|
1193
1092
|
type index_d$1_Charge = Charge;
|
|
1194
1093
|
type index_d$1_ChargeOverride = ChargeOverride;
|
|
@@ -1274,37 +1173,6 @@ interface GetEmbeddedScriptOptions {
|
|
|
1274
1173
|
componentId?: string | null;
|
|
1275
1174
|
}
|
|
1276
1175
|
|
|
1277
|
-
interface HttpClient {
|
|
1278
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
1279
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
1280
|
-
}
|
|
1281
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
1282
|
-
type HttpResponse<T = any> = {
|
|
1283
|
-
data: T;
|
|
1284
|
-
status: number;
|
|
1285
|
-
statusText: string;
|
|
1286
|
-
headers: any;
|
|
1287
|
-
request?: any;
|
|
1288
|
-
};
|
|
1289
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
1290
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1291
|
-
url: string;
|
|
1292
|
-
data?: Data;
|
|
1293
|
-
params?: URLSearchParams;
|
|
1294
|
-
} & APIMetadata;
|
|
1295
|
-
type APIMetadata = {
|
|
1296
|
-
methodFqn?: string;
|
|
1297
|
-
entityFqdn?: string;
|
|
1298
|
-
packageName?: string;
|
|
1299
|
-
};
|
|
1300
|
-
|
|
1301
|
-
declare global {
|
|
1302
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1303
|
-
interface SymbolConstructor {
|
|
1304
|
-
readonly observable: symbol;
|
|
1305
|
-
}
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
1176
|
declare const __metadata: {
|
|
1309
1177
|
PACKAGE_NAME: string;
|
|
1310
1178
|
};
|
|
@@ -73,8 +73,7 @@ interface ListChargesResponse {
|
|
|
73
73
|
interface ChargeLineItem {
|
|
74
74
|
/**
|
|
75
75
|
* ID of the charge. Make sure to save the charge ID on your servers for future
|
|
76
|
-
* reference. Identical to `lineItem.chargeId` in the
|
|
77
|
-
* [Invoice Created Event](https://dev.wix.com/docs/rest/api-reference/app-management/apps/custom-charges-spi/custom-charges-provider-v1/invoice-created-event).
|
|
76
|
+
* reference. Identical to `lineItem.chargeId` in the Invoice Created Event.
|
|
78
77
|
*
|
|
79
78
|
* Max: 64 characters
|
|
80
79
|
*/
|
|
@@ -161,8 +160,7 @@ interface InvoiceCreatedRequest {
|
|
|
161
160
|
}
|
|
162
161
|
interface InvoiceLineItem {
|
|
163
162
|
/**
|
|
164
|
-
* ID of the charge as returned in
|
|
165
|
-
* [List Charges](https://dev.wix.com/docs/rest/api-reference/app-management/apps/custom-charges-spi/custom-charges-provider-v1/list-charges).
|
|
163
|
+
* ID of the charge as returned in List Charges.
|
|
166
164
|
*
|
|
167
165
|
* Max: 64 characters
|
|
168
166
|
*/
|
|
@@ -199,8 +197,7 @@ interface CustomChargesConfig {
|
|
|
199
197
|
* Base part of your integration's deployment URI for the Custom Charges SPI.
|
|
200
198
|
* For example `"https://provider.example.com"`, if Wix should call your
|
|
201
199
|
* integration at `https://provider.example.com/v1/charge-limit` for the
|
|
202
|
-
*
|
|
203
|
-
* endpoint.
|
|
200
|
+
* Get Charge Limit method.
|
|
204
201
|
*/
|
|
205
202
|
baseUri?: SpiBaseUri;
|
|
206
203
|
}
|
|
@@ -294,13 +291,6 @@ type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
|
294
291
|
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
295
292
|
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
296
293
|
|
|
297
|
-
declare global {
|
|
298
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
299
|
-
interface SymbolConstructor {
|
|
300
|
-
readonly observable: symbol;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
294
|
interface GetChargeLimitEnvelope {
|
|
305
295
|
request: GetChargeLimitRequest;
|
|
306
296
|
metadata: Context;
|
|
@@ -73,8 +73,7 @@ interface ListChargesResponse {
|
|
|
73
73
|
interface ChargeLineItem {
|
|
74
74
|
/**
|
|
75
75
|
* ID of the charge. Make sure to save the charge ID on your servers for future
|
|
76
|
-
* reference. Identical to `lineItem.chargeId` in the
|
|
77
|
-
* [Invoice Created Event](https://dev.wix.com/docs/rest/api-reference/app-management/apps/custom-charges-spi/custom-charges-provider-v1/invoice-created-event).
|
|
76
|
+
* reference. Identical to `lineItem.chargeId` in the Invoice Created Event.
|
|
78
77
|
*
|
|
79
78
|
* Max: 64 characters
|
|
80
79
|
*/
|
|
@@ -161,8 +160,7 @@ interface InvoiceCreatedRequest {
|
|
|
161
160
|
}
|
|
162
161
|
interface InvoiceLineItem {
|
|
163
162
|
/**
|
|
164
|
-
* ID of the charge as returned in
|
|
165
|
-
* [List Charges](https://dev.wix.com/docs/rest/api-reference/app-management/apps/custom-charges-spi/custom-charges-provider-v1/list-charges).
|
|
163
|
+
* ID of the charge as returned in List Charges.
|
|
166
164
|
*
|
|
167
165
|
* Max: 64 characters
|
|
168
166
|
*/
|
|
@@ -199,8 +197,7 @@ interface CustomChargesConfig {
|
|
|
199
197
|
* Base part of your integration's deployment URI for the Custom Charges SPI.
|
|
200
198
|
* For example `"https://provider.example.com"`, if Wix should call your
|
|
201
199
|
* integration at `https://provider.example.com/v1/charge-limit` for the
|
|
202
|
-
*
|
|
203
|
-
* endpoint.
|
|
200
|
+
* Get Charge Limit method.
|
|
204
201
|
*/
|
|
205
202
|
baseUri?: SpiBaseUri;
|
|
206
203
|
}
|
|
@@ -293,13 +290,6 @@ type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
|
293
290
|
};
|
|
294
291
|
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
295
292
|
|
|
296
|
-
declare global {
|
|
297
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
298
|
-
interface SymbolConstructor {
|
|
299
|
-
readonly observable: symbol;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
293
|
interface GetChargeLimitEnvelope {
|
|
304
294
|
request: GetChargeLimitRequest;
|
|
305
295
|
metadata: Context;
|