@connexup/react-native-square-mobile-payment-sdk 0.1.5 → 0.1.6
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.
|
@@ -34,7 +34,7 @@ export class MobilePaymentAuthorization {
|
|
|
34
34
|
throw createMobilePaymentError(e);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
addAuthorizationStateChangeListener(listener) {
|
|
38
38
|
return this.authorizationManage.onAuthorizationStateChange(payloads => {
|
|
39
39
|
listener(payloads);
|
|
40
40
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createMobilePaymentError","NativeMobilePaymentAuthorization","MobilePaymentAuthorization","constructor","authorizationManage","state","e","authorize","accessToken","locationID","location","deauthorize","
|
|
1
|
+
{"version":3,"names":["createMobilePaymentError","NativeMobilePaymentAuthorization","MobilePaymentAuthorization","constructor","authorizationManage","state","e","authorize","accessToken","locationID","location","deauthorize","addAuthorizationStateChangeListener","listener","onAuthorizationStateChange","payloads","mobilePaymentAuthorization"],"sourceRoot":"../../../src","sources":["authorization/index.ts"],"mappings":";;AAAA,SAASA,wBAAwB,QAAQ,YAAS;AAClD,SACEC,gCAAgC,QAI3B,uCAAoC;AAG3C,OAAO,MAAMC,0BAA0B,CAEvC;EAGEC,WAAWA,CAACC,mBAAyB,EAAE;IACrC,IAAI,CAACA,mBAAmB,GAAGA,mBAAmB;EAChD;EAEAC,KAAKA,CAAA,EAAuB;IAC1B,IAAI;MACF,OAAO,IAAI,CAACD,mBAAmB,CAACC,KAAK,CAAC,CAAC;IACzC,CAAC,CAAC,OAAOC,CAAC,EAAE;MACV,MAAMN,wBAAwB,CAACM,CAAC,CAAC;IACnC;EACF;EAEA,MAAMC,SAASA,CAACC,WAAmB,EAAEC,UAAkB,EAAiB;IACtE,IAAI;MACF,OAAO,MAAM,IAAI,CAACL,mBAAmB,CAACG,SAAS,CAACC,WAAW,EAAEC,UAAU,CAAC;IAC1E,CAAC,CAAC,OAAOH,CAAC,EAAE;MACV,MAAMN,wBAAwB,CAACM,CAAC,CAAC;IACnC;EACF;EAEAI,QAAQA,CAAA,EAAoB;IAC1B,IAAI;MACF,OAAO,IAAI,CAACN,mBAAmB,CAACM,QAAQ,CAAC,CAAC;IAC5C,CAAC,CAAC,OAAOJ,CAAC,EAAE;MACV,MAAMN,wBAAwB,CAACM,CAAC,CAAC;IACnC;EACF;EAEA,MAAMK,WAAWA,CAAA,EAAkB;IACjC,IAAI;MACF,OAAO,MAAM,IAAI,CAACP,mBAAmB,CAACO,WAAW,CAAC,CAAC;IACrD,CAAC,CAAC,OAAOL,CAAC,EAAE;MACV,MAAMN,wBAAwB,CAACM,CAAC,CAAC;IACnC;EACF;EAEAM,mCAAmCA,CACjCC,QAA6C,EAC1B;IACnB,OAAO,IAAI,CAACT,mBAAmB,CAACU,0BAA0B,CAAEC,QAAQ,IAAK;MACvEF,QAAQ,CAACE,QAAQ,CAAC;IACpB,CAAC,CAAC;EACJ;AACF;AAEA,OAAO,MAAMC,0BAA0B,GAAG,IAAId,0BAA0B,CACtED,gCACF,CAAC;AAED,cAAc,uCAAoC","ignoreList":[]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type AuthorizationState, type Location, type Spec } from './NativeMobilePaymentAuthorization';
|
|
2
2
|
import type { EventSubscription } from 'react-native';
|
|
3
|
-
export declare class MobilePaymentAuthorization implements Omit<Spec, 'getConstants'> {
|
|
3
|
+
export declare class MobilePaymentAuthorization implements Omit<Spec, 'getConstants' | 'onAuthorizationStateChange'> {
|
|
4
4
|
private readonly authorizationManage;
|
|
5
5
|
constructor(authorizationManage: Spec);
|
|
6
6
|
state(): AuthorizationState;
|
|
7
7
|
authorize(accessToken: string, locationID: string): Promise<void>;
|
|
8
8
|
location(): Location | null;
|
|
9
9
|
deauthorize(): Promise<void>;
|
|
10
|
-
|
|
10
|
+
addAuthorizationStateChangeListener(listener: (state: AuthorizationState) => void): EventSubscription;
|
|
11
11
|
}
|
|
12
12
|
export declare const mobilePaymentAuthorization: MobilePaymentAuthorization;
|
|
13
13
|
export * from './NativeMobilePaymentAuthorization';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/authorization/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACb,KAAK,IAAI,EACV,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,qBAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/authorization/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACb,KAAK,IAAI,EACV,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,qBAAa,0BACX,YAAW,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,4BAA4B,CAAC;IAEpE,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAO;gBAE/B,mBAAmB,EAAE,IAAI;IAIrC,KAAK,IAAI,kBAAkB;IAQrB,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQvE,QAAQ,IAAI,QAAQ,GAAG,IAAI;IAQrB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAQlC,mCAAmC,CACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,GAC5C,iBAAiB;CAKrB;AAED,eAAO,MAAM,0BAA0B,4BAEtC,CAAC;AAEF,cAAc,oCAAoC,CAAC"}
|
package/package.json
CHANGED
|
@@ -7,7 +7,9 @@ import {
|
|
|
7
7
|
} from './NativeMobilePaymentAuthorization';
|
|
8
8
|
import type { EventSubscription } from 'react-native';
|
|
9
9
|
|
|
10
|
-
export class MobilePaymentAuthorization
|
|
10
|
+
export class MobilePaymentAuthorization
|
|
11
|
+
implements Omit<Spec, 'getConstants' | 'onAuthorizationStateChange'>
|
|
12
|
+
{
|
|
11
13
|
private readonly authorizationManage: Spec;
|
|
12
14
|
|
|
13
15
|
constructor(authorizationManage: Spec) {
|
|
@@ -46,7 +48,7 @@ export class MobilePaymentAuthorization implements Omit<Spec, 'getConstants'> {
|
|
|
46
48
|
}
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
|
|
51
|
+
addAuthorizationStateChangeListener(
|
|
50
52
|
listener: (state: AuthorizationState) => void
|
|
51
53
|
): EventSubscription {
|
|
52
54
|
return this.authorizationManage.onAuthorizationStateChange((payloads) => {
|