@wix/app-management 1.0.17 → 1.0.18

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.17",
3
+ "version": "1.0.18",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -19,15 +19,14 @@
19
19
  "service-plugins"
20
20
  ],
21
21
  "dependencies": {
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.3",
27
- "@wix/app-management_embedded-scripts": "1.0.5"
22
+ "@wix/app-management_app-instances": "1.0.9",
23
+ "@wix/app-management_app-plans": "1.0.9",
24
+ "@wix/app-management_bi-events": "1.0.8",
25
+ "@wix/app-management_billing": "1.0.9",
26
+ "@wix/app-management_custom-charges": "1.0.4",
27
+ "@wix/app-management_embedded-scripts": "1.0.6"
28
28
  },
29
29
  "devDependencies": {
30
- "@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
31
30
  "glob": "^10.4.1",
32
31
  "rollup": "^4.18.0",
33
32
  "rollup-plugin-dts": "^6.1.1",
@@ -49,5 +48,5 @@
49
48
  "fqdn": ""
50
49
  }
51
50
  },
52
- "falconPackageHash": "612b4667ab176ba9db1cc7d819da2764192701d978858b4d66a7d923"
51
+ "falconPackageHash": "c93ddde8a502652d4d9c0c1f79738a8318be5afb21b0d7a670e63b88"
53
52
  }
@@ -219,44 +219,42 @@ interface ListAppPlansByAppIdResponseNonNullableFields {
219
219
  }[];
220
220
  }
221
221
 
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>>;
222
+ type RESTFunctionDescriptor$4<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$4) => T;
223
+ interface HttpClient$4 {
224
+ request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
225
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
225
226
  }
226
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
227
- type HttpResponse<T = any> = {
227
+ type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
228
+ type HttpResponse$4<T = any> = {
228
229
  data: T;
229
230
  status: number;
230
231
  statusText: string;
231
232
  headers: any;
232
233
  request?: any;
233
234
  };
234
- type RequestOptions<_TResponse = any, Data = any> = {
235
+ type RequestOptions$4<_TResponse = any, Data = any> = {
235
236
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
236
237
  url: string;
237
238
  data?: Data;
238
239
  params?: URLSearchParams;
239
- } & APIMetadata;
240
- type APIMetadata = {
240
+ } & APIMetadata$4;
241
+ type APIMetadata$4 = {
241
242
  methodFqn?: string;
242
243
  entityFqdn?: string;
243
244
  packageName?: string;
244
245
  };
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;
246
+ type BuildRESTFunction$4<T extends RESTFunctionDescriptor$4> = T extends RESTFunctionDescriptor$4<infer U> ? U : never;
256
247
 
257
- declare function listAppPlansByAppId$1(httpClient: HttpClient): (appIds: string[]) => Promise<ListAppPlansByAppIdResponse & ListAppPlansByAppIdResponseNonNullableFields>;
248
+ declare global {
249
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
250
+ interface SymbolConstructor {
251
+ readonly observable: symbol;
252
+ }
253
+ }
258
254
 
259
- declare const listAppPlansByAppId: BuildRESTFunction<typeof listAppPlansByAppId$1>;
255
+ declare function listAppPlansByAppId$1(httpClient: HttpClient$4): (appIds: string[]) => Promise<ListAppPlansByAppIdResponse & ListAppPlansByAppIdResponseNonNullableFields>;
256
+
257
+ declare const listAppPlansByAppId: BuildRESTFunction$4<typeof listAppPlansByAppId$1>;
260
258
 
261
259
  declare const context$4_listAppPlansByAppId: typeof listAppPlansByAppId;
262
260
  declare namespace context$4 {
@@ -642,14 +640,57 @@ interface AppInstancePaidPlanAutoRenewalCancelledEnvelope {
642
640
  metadata: BaseEventMetadata;
643
641
  }
644
642
 
645
- declare function getAppInstance$1(httpClient: HttpClient): () => Promise<GetAppInstanceResponse & GetAppInstanceResponseNonNullableFields>;
643
+ type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
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>;
646
687
  declare const onAppInstanceInstalled$1: EventDefinition<AppInstanceInstalledEnvelope, "AppInstalled">;
647
688
  declare const onAppInstanceRemoved$1: EventDefinition<AppInstanceRemovedEnvelope, "AppRemoved">;
648
689
  declare const onAppInstancePaidPlanPurchased$1: EventDefinition<AppInstancePaidPlanPurchasedEnvelope, "PaidPlanPurchased">;
649
690
  declare const onAppInstancePaidPlanChanged$1: EventDefinition<AppInstancePaidPlanChangedEnvelope, "PaidPlanChanged">;
650
691
  declare const onAppInstancePaidPlanAutoRenewalCancelled$1: EventDefinition<AppInstancePaidPlanAutoRenewalCancelledEnvelope, "PaidPlanAutoRenewalCancelled">;
651
692
 
652
- declare const getAppInstance: BuildRESTFunction<typeof getAppInstance$1>;
693
+ declare const getAppInstance: BuildRESTFunction$3<typeof getAppInstance$1>;
653
694
  declare const onAppInstanceInstalled: BuildEventDefinition<typeof onAppInstanceInstalled$1>;
654
695
  declare const onAppInstanceRemoved: BuildEventDefinition<typeof onAppInstanceRemoved$1>;
655
696
  declare const onAppInstancePaidPlanPurchased: BuildEventDefinition<typeof onAppInstancePaidPlanPurchased$1>;
@@ -666,6 +707,39 @@ declare namespace context$3 {
666
707
  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 };
667
708
  }
668
709
 
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
+
669
743
  declare enum EventName {
670
744
  UNKNOWN = "UNKNOWN",
671
745
  APP_DASHBOARD_LOADED = "APP_DASHBOARD_LOADED",
@@ -716,9 +790,9 @@ interface SendBiEventOptions {
716
790
  eventData?: Record<string, string>;
717
791
  }
718
792
 
719
- declare function sendBiEvent$1(httpClient: HttpClient): (options?: SendBiEventOptions) => Promise<void>;
793
+ declare function sendBiEvent$1(httpClient: HttpClient$2): (options?: SendBiEventOptions) => Promise<void>;
720
794
 
721
- declare const sendBiEvent: BuildRESTFunction<typeof sendBiEvent$1>;
795
+ declare const sendBiEvent: BuildRESTFunction$2<typeof sendBiEvent$1>;
722
796
 
723
797
  declare const context$2_sendBiEvent: typeof sendBiEvent;
724
798
  declare namespace context$2 {
@@ -811,11 +885,44 @@ interface GetUrlOptions {
811
885
  couponCode?: string | null;
812
886
  }
813
887
 
814
- declare function getUrl$1(httpClient: HttpClient): (productId: string, options?: GetUrlOptions) => Promise<GetUrlResponse & GetUrlResponseNonNullableFields>;
815
- declare function getPurchaseHistory$1(httpClient: HttpClient): () => Promise<GetPurchaseHistoryResponse & GetPurchaseHistoryResponseNonNullableFields>;
888
+ type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
889
+ interface HttpClient$1 {
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>;
816
923
 
817
- declare const getUrl: BuildRESTFunction<typeof getUrl$1>;
818
- declare const getPurchaseHistory: BuildRESTFunction<typeof getPurchaseHistory$1>;
924
+ declare const getUrl: BuildRESTFunction$1<typeof getUrl$1>;
925
+ declare const getPurchaseHistory: BuildRESTFunction$1<typeof getPurchaseHistory$1>;
819
926
 
820
927
  declare const context$1_getPurchaseHistory: typeof getPurchaseHistory;
821
928
  declare const context$1_getUrl: typeof getUrl;
@@ -848,6 +955,39 @@ interface GetEmbeddedScriptOptions {
848
955
  componentId?: string | null;
849
956
  }
850
957
 
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
+
851
991
  declare function embedScript$1(httpClient: HttpClient): (properties: ScriptProperties, options?: EmbedScriptOptions) => Promise<EmbedScriptResponse & EmbedScriptResponseNonNullableFields>;
852
992
  declare function getEmbeddedScript$1(httpClient: HttpClient): (options?: GetEmbeddedScriptOptions) => Promise<ScriptProperties & {
853
993
  disabled: boolean;
@@ -228,41 +228,41 @@ interface ListAppPlansByAppIdResponseNonNullableFields {
228
228
  }[];
229
229
  }
230
230
 
231
- interface HttpClient {
232
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
231
+ interface HttpClient$4 {
232
+ request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
233
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
233
234
  }
234
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
235
- type HttpResponse<T = any> = {
235
+ type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
236
+ type HttpResponse$4<T = any> = {
236
237
  data: T;
237
238
  status: number;
238
239
  statusText: string;
239
240
  headers: any;
240
241
  request?: any;
241
242
  };
242
- type RequestOptions<_TResponse = any, Data = any> = {
243
+ type RequestOptions$4<_TResponse = any, Data = any> = {
243
244
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
244
245
  url: string;
245
246
  data?: Data;
246
247
  params?: URLSearchParams;
247
- } & APIMetadata;
248
- type APIMetadata = {
248
+ } & APIMetadata$4;
249
+ type APIMetadata$4 = {
249
250
  methodFqn?: string;
250
251
  entityFqdn?: string;
251
252
  packageName?: string;
252
253
  };
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>;
254
+
255
+ declare global {
256
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
257
+ interface SymbolConstructor {
258
+ readonly observable: symbol;
259
+ }
260
+ }
261
261
 
262
262
  declare const __metadata$4: {
263
263
  PACKAGE_NAME: string;
264
264
  };
265
- declare function listAppPlansByAppId(httpClient: HttpClient): (appIds: string[]) => Promise<ListAppPlansByAppIdResponse & ListAppPlansByAppIdResponseNonNullableFields>;
265
+ declare function listAppPlansByAppId(httpClient: HttpClient$4): (appIds: string[]) => Promise<ListAppPlansByAppIdResponse & ListAppPlansByAppIdResponseNonNullableFields>;
266
266
 
267
267
  type index_d$4_AppPlans = AppPlans;
268
268
  type index_d$4_Cycle = Cycle;
@@ -680,10 +680,49 @@ 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
+
683
722
  declare const __metadata$3: {
684
723
  PACKAGE_NAME: string;
685
724
  };
686
- declare function getAppInstance(httpClient: HttpClient): () => Promise<GetAppInstanceResponse & GetAppInstanceResponseNonNullableFields>;
725
+ declare function getAppInstance(httpClient: HttpClient$3): () => Promise<GetAppInstanceResponse & GetAppInstanceResponseNonNullableFields>;
687
726
  declare const onAppInstanceInstalled: EventDefinition<AppInstanceInstalledEnvelope, "AppInstalled">;
688
727
  declare const onAppInstanceRemoved: EventDefinition<AppInstanceRemovedEnvelope, "AppRemoved">;
689
728
  declare const onAppInstancePaidPlanPurchased: EventDefinition<AppInstancePaidPlanPurchasedEnvelope, "PaidPlanPurchased">;
@@ -728,6 +767,37 @@ declare namespace index_d$3 {
728
767
  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 };
729
768
  }
730
769
 
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
+
731
801
  interface SendBIEventResponse {
732
802
  }
733
803
  interface SendBIEventRequest {
@@ -819,7 +889,7 @@ interface SendBiEventOptions {
819
889
  declare const __metadata$2: {
820
890
  PACKAGE_NAME: string;
821
891
  };
822
- declare function sendBiEvent(httpClient: HttpClient): (options?: SendBiEventOptions) => Promise<void>;
892
+ declare function sendBiEvent(httpClient: HttpClient$2): (options?: SendBiEventOptions) => Promise<void>;
823
893
 
824
894
  type index_d$2_EventName = EventName;
825
895
  declare const index_d$2_EventName: typeof EventName;
@@ -1083,11 +1153,42 @@ interface GetUrlOptions {
1083
1153
  couponCode?: string | null;
1084
1154
  }
1085
1155
 
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
+
1086
1187
  declare const __metadata$1: {
1087
1188
  PACKAGE_NAME: string;
1088
1189
  };
1089
- declare function getUrl(httpClient: HttpClient): (productId: string, options?: GetUrlOptions) => Promise<GetUrlResponse & GetUrlResponseNonNullableFields>;
1090
- declare function getPurchaseHistory(httpClient: HttpClient): () => Promise<GetPurchaseHistoryResponse & GetPurchaseHistoryResponseNonNullableFields>;
1190
+ declare function getUrl(httpClient: HttpClient$1): (productId: string, options?: GetUrlOptions) => Promise<GetUrlResponse & GetUrlResponseNonNullableFields>;
1191
+ declare function getPurchaseHistory(httpClient: HttpClient$1): () => Promise<GetPurchaseHistoryResponse & GetPurchaseHistoryResponseNonNullableFields>;
1091
1192
 
1092
1193
  type index_d$1_Charge = Charge;
1093
1194
  type index_d$1_ChargeOverride = ChargeOverride;
@@ -1173,6 +1274,37 @@ interface GetEmbeddedScriptOptions {
1173
1274
  componentId?: string | null;
1174
1275
  }
1175
1276
 
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
+
1176
1308
  declare const __metadata: {
1177
1309
  PACKAGE_NAME: string;
1178
1310
  };
@@ -291,6 +291,13 @@ type ServicePluginDefinition<Contract extends ServicePluginContract> = {
291
291
  declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
292
292
  type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
293
293
 
294
+ declare global {
295
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
296
+ interface SymbolConstructor {
297
+ readonly observable: symbol;
298
+ }
299
+ }
300
+
294
301
  interface GetChargeLimitEnvelope {
295
302
  request: GetChargeLimitRequest;
296
303
  metadata: Context;
@@ -290,6 +290,13 @@ type ServicePluginDefinition<Contract extends ServicePluginContract> = {
290
290
  };
291
291
  declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
292
292
 
293
+ declare global {
294
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
295
+ interface SymbolConstructor {
296
+ readonly observable: symbol;
297
+ }
298
+ }
299
+
293
300
  interface GetChargeLimitEnvelope {
294
301
  request: GetChargeLimitRequest;
295
302
  metadata: Context;