@paydock/client-sdk 1.108.0-beta → 1.108.1

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.
Files changed (63) hide show
  1. package/README.md +1 -29
  2. package/bundles/index.cjs +1844 -22970
  3. package/bundles/index.cjs.d.ts +5 -71
  4. package/bundles/index.cjs.map +1 -1
  5. package/bundles/index.mjs +1844 -22970
  6. package/bundles/index.mjs.d.ts +5 -71
  7. package/bundles/index.mjs.map +1 -1
  8. package/bundles/types/api/api-base.d.ts +6 -14
  9. package/bundles/types/api/api-base.d.ts.map +1 -1
  10. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts +3 -3
  11. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -1
  12. package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts +0 -2
  13. package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +1 -1
  14. package/bundles/types/checkout-button/checkout-contextual-handler.d.ts +0 -4
  15. package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +1 -1
  16. package/bundles/types/checkout-button/runner/contextual.runner.d.ts +1 -2
  17. package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +1 -1
  18. package/bundles/types/checkout-button/runner/popup.runner.d.ts +3 -3
  19. package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +1 -1
  20. package/bundles/types/components/http-core.d.ts.map +1 -1
  21. package/bundles/types/components/param.d.ts +0 -1
  22. package/bundles/types/components/param.d.ts.map +1 -1
  23. package/bundles/types/configs/env/environment.cba.d.ts +1 -1
  24. package/bundles/types/configs/env/environment.cba.d.ts.map +1 -1
  25. package/bundles/types/configs/env/environment.paydock.d.ts +1 -1
  26. package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -1
  27. package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +1 -1
  28. package/bundles/types/wallet-buttons/google.wallet-service.d.ts +4 -4
  29. package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +1 -1
  30. package/bundles/types/wallet-buttons/index.d.ts +0 -1
  31. package/bundles/types/wallet-buttons/index.d.ts.map +1 -1
  32. package/bundles/types/widget/configuration.d.ts.map +1 -1
  33. package/bundles/types/widget/html-multi-widget.d.ts +3 -3
  34. package/bundles/types/widget/html-multi-widget.d.ts.map +1 -1
  35. package/bundles/widget.umd.js +1844 -22970
  36. package/bundles/widget.umd.js.d.ts +5 -71
  37. package/bundles/widget.umd.js.map +1 -1
  38. package/bundles/widget.umd.js.min.d.ts +5 -71
  39. package/bundles/widget.umd.min.js +1 -61
  40. package/bundles/widget.umd.min.js.map +1 -1
  41. package/docs/wallet-buttons-examples.md +1 -28
  42. package/docs/wallet-buttons.md +0 -1
  43. package/examples/multi-html-widget/simple.html +1 -2
  44. package/package.json +50 -54
  45. package/slate.md +1 -28
  46. package/bundles/types/shared/http/http-request.d.ts +0 -14
  47. package/bundles/types/shared/http/http-request.d.ts.map +0 -1
  48. package/bundles/types/shared/http/index.d.ts +0 -2
  49. package/bundles/types/shared/http/index.d.ts.map +0 -1
  50. package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts +0 -15
  51. package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts.map +0 -1
  52. package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts +0 -66
  53. package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts.map +0 -1
  54. package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts +0 -14
  55. package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts.map +0 -1
  56. package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts +0 -15
  57. package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts.map +0 -1
  58. package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts +0 -23
  59. package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts.map +0 -1
  60. package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts +0 -15
  61. package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts.map +0 -1
  62. package/bundles/types/shared/services/instrumentation/repositories/index.d.ts +0 -4
  63. package/bundles/types/shared/services/instrumentation/repositories/index.d.ts.map +0 -1
@@ -1,5 +1,3 @@
1
- import { MicroAgent } from '@newrelic/browser-agent/loaders/micro-agent';
2
-
3
1
  declare class ApiCharge {
4
2
  protected api: Api;
5
3
  constructor(api: Api);
@@ -56,57 +54,6 @@ declare class Env implements IEnvironment {
56
54
  private isValidMode;
57
55
  }
58
56
 
59
- type HttpRequestMethod = 'DELETE' | 'GET' | 'OPTIONS' | 'POST' | 'PUT';
60
-
61
- type AgentPrototype = Pick<(typeof MicroAgent)['prototype'], 'addPageAction' | 'noticeError'>;
62
- type AgentMethodNames = keyof AgentPrototype;
63
- type AgentMethodParameters<T extends AgentMethodNames> = Parameters<AgentPrototype[T]>;
64
- declare class InstrumentationAgent extends MicroAgent {
65
- private static agent;
66
- private static available;
67
- private static initialized;
68
- private constructor();
69
- static get instance(): InstrumentationAgent;
70
- isAvailable(): boolean;
71
- call: <T extends "addPageAction" | "noticeError">(method: T, ...args: AgentMethodParameters<T>) => void;
72
- }
73
-
74
- interface CustomEventDTO {
75
- environment: string;
76
- appId?: never;
77
- timestamp?: never;
78
- [x: string]: unknown;
79
- }
80
- interface ReportBaseContext {
81
- environment: string;
82
- sdkVersion: string | null;
83
- description?: string;
84
- [x: string]: SerializableValue | undefined;
85
- }
86
- type SerializableValue = string | number | symbol | object | null;
87
-
88
- type ReportErrorFn = (repository: ErrorRepository, error: string | Error, ctx: ReportBaseContext & ({
89
- className: string;
90
- classMethod: string;
91
- functionName?: never;
92
- } | {
93
- className?: never;
94
- classMethod?: never;
95
- functionName: string;
96
- })) => void;
97
- declare class ErrorRepository {
98
- private readonly agent;
99
- constructor();
100
- createError(...args: Parameters<InstrumentationAgent['noticeError']>): Promise<void>;
101
- }
102
-
103
- type ReportEventFn = (repository: EventRepository, actionName: string, ctx: ReportBaseContext & CustomEventDTO) => void;
104
- declare class EventRepository {
105
- private readonly agent;
106
- constructor();
107
- createEvent(...args: Parameters<InstrumentationAgent['addPageAction']>): Promise<void>;
108
- }
109
-
110
57
  declare enum API_AUTH_TYPE {
111
58
  PUBLIC_KEY = 0,
112
59
  TOKEN = 1
@@ -127,11 +74,11 @@ declare class ApiBase {
127
74
  */
128
75
  setEnv(env: string, alias?: string): ApiBase;
129
76
  setAuthType(): API_AUTH_TYPE;
130
- getClient(method: Extract<HttpRequestMethod, 'GET' | 'POST'>, link: string): {
77
+ getClient(method: 'GET' | 'POST', link: string): {
131
78
  config: XMLHttpRequest;
132
- send: (body: any, cb?: (data) => void, errorCb?: (data: any) => any) => void;
79
+ send: (body: any, cb?: (data: any) => void, errorCb?: (data: any) => void) => void;
133
80
  };
134
- getClientPromise<Req extends object, Res>(method: Extract<HttpRequestMethod, 'GET' | 'POST'>, link: string): {
81
+ getClientPromise<Req extends object, Res>(method: 'GET' | 'POST', link: string): {
135
82
  config: XMLHttpRequest;
136
83
  send: (body: Req) => Promise<Res>;
137
84
  };
@@ -143,14 +90,7 @@ declare class ApiBase {
143
90
  text: string;
144
91
  status: number;
145
92
  }): Promise<Res>;
146
- reportEvent: ReportEventFn;
147
- reportError: ReportErrorFn;
148
- protected newApiRequest(method: Extract<HttpRequestMethod, 'GET' | 'POST'>, link: string): XMLHttpRequest;
149
- protected get ctx(): {
150
- sdkVersion: string;
151
- className: string;
152
- environment: string;
153
- };
93
+ setAuthHeader(request: XMLHttpRequest): void;
154
94
  }
155
95
 
156
96
  interface BrowserDetails {
@@ -620,7 +560,6 @@ interface IWalletMeta {
620
560
  refresh_token?: string;
621
561
  style?: WalletStyles;
622
562
  wallets?: WALLET_TYPE[];
623
- client_id?: string;
624
563
  }
625
564
 
626
565
  declare class Link {
@@ -1153,18 +1092,13 @@ interface IRunner {
1153
1092
  setEnv(env: string, alias?: string): void;
1154
1093
  }
1155
1094
 
1156
- interface IDispatcherData {
1157
- message_source: string;
1158
- event: string;
1159
- }
1160
-
1161
1095
  interface IContextualRunner extends IRunner {
1162
1096
  run(): void;
1163
1097
  isRunning(): boolean;
1164
1098
  continue(): void;
1165
1099
  stop(): void;
1166
1100
  onStop(cb: () => void): void;
1167
- onCheckout<T extends IDispatcherData>(event: string, cb: (checkout: ICheckout, data?: T) => void): void;
1101
+ onCheckout(event: string, cb: (checkout: ICheckout) => void): void;
1168
1102
  setBackgroundTitle(text: string): void;
1169
1103
  setBackgroundDescription(text: string): void;
1170
1104
  turnOffBackdrop(): void;