Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/phonegap-nfc

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/phonegap-nfc - npm Package Compare versions

Comparing version 0.0.32 to 0.0.33

140

phonegap-nfc/index.d.ts

@@ -8,7 +8,6 @@ // Type definitions for Phonegap NFC Plugin

interface Document {
addEventListener(type: 'deviceready', listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "deviceready", listener: (ev: Event) => any, useCapture?: boolean): void;
}
declare namespace PhoneGapNfc {
/**

@@ -20,11 +19,11 @@ * Global object NFC.

ndef: Ndef;
util:Util;
fireNfcTagEvent(event:TagEvent, tagAsJson:string):void;
util: Util;
fireNfcTagEvent(event: TagEvent, tagAsJson: string): void;
}
interface Tag {
id:Array<number>;
techTypes:Array<string>;
type:string;
date:string;
id: Array<number>;
techTypes: Array<string>;
type: string;
date: string;
}

@@ -36,30 +35,30 @@

*/
tnf:number;
tnf: number;
/**
* byte array, containing zero to 255 bytes, must not be null
*/
type:Array<number>;
type: Array<number>;
/**
* byte array, containing zero to 255 bytes, must not be null
*/
id:Array<number>;
id: Array<number>;
/**
* byte array, containing zero to (2 ** 32 - 1) bytes, must not be null
*/
payload:Array<number>;
payload: Array<number>;
}
interface NdefTag extends Tag {
canMakeReadOnly:boolean;
isWritable:boolean;
maxSize:number;
ndefMessage:Array<NdefRecord>;
canMakeReadOnly: boolean;
isWritable: boolean;
maxSize: number;
ndefMessage: Array<NdefRecord>;
}
interface TagEvent extends Event {
tag:Tag;
tag: Tag;
}
interface NdefTagEvent extends TagEvent {
tag:NdefTag;
tag: NdefTag;
}

@@ -72,3 +71,3 @@

*/
protocols:Array<string>;
protocols: Array<string>;

@@ -79,3 +78,3 @@ /**

*/
decodePayload(data:any):string;
decodePayload(data: any): string;

@@ -86,7 +85,6 @@ /**

*/
encodePayload(uri:string):Array<number>;
encodePayload(uri: string): Array<number>;
}
interface TextHelper {
/**

@@ -96,3 +94,3 @@ * Decode a URI payload bytes

*/
decodePayload(data:any):string;
decodePayload(data: any): string;

@@ -105,3 +103,3 @@ /**

*/
encodePayload(text:string, lang:string, encoding:string):Array<number>;
encodePayload(text: string, lang: string, encoding: string): Array<number>;
}

@@ -113,4 +111,3 @@

interface Ndef {
TNF_EMPTY:number;
TNF_EMPTY: number;
TNF_WELL_KNOWN: number;

@@ -132,4 +129,4 @@ TNF_MIME_MEDIA: number;

uriHelper:UriHelper;
textHelper:TextHelper;
uriHelper: UriHelper;
textHelper: TextHelper;
/**

@@ -147,3 +144,3 @@ * Creates a JSON representation of a NdefRecord.

*/
record(tnf:number, type:Array<number>, id:Array<number>, payload:Array<number>):NdefRecord;
record(tnf: number, type: Array<number>, id: Array<number>, payload: Array<number>): NdefRecord;

@@ -159,3 +156,3 @@ /**

*/
textRecord(text:string, languageCode:string, id:Array<number>):NdefRecord;
textRecord(text: string, languageCode: string, id: Array<number>): NdefRecord;

@@ -170,3 +167,3 @@ /**

*/
uriRecord(uri:string, id:Array<number>):NdefRecord;
uriRecord(uri: string, id: Array<number>): NdefRecord;

@@ -198,3 +195,3 @@ /**

*/
absoluteUriRecord(uri:string, payload:Array<number>, id:Array<number>):NdefRecord;
absoluteUriRecord(uri: string, payload: Array<number>, id: Array<number>): NdefRecord;

@@ -208,3 +205,3 @@ /**

*/
mimeMediaRecord(mimeType:string, payload:Array<number>, id:Array<number>):NdefRecord;
mimeMediaRecord(mimeType: string, payload: Array<number>, id: Array<number>): NdefRecord;

@@ -219,9 +216,8 @@ /**

*/
smartPoster(ndefRecords:Array<NdefRecord>, id:Array<number>):NdefRecord;
smartPoster(ndefRecords: Array<NdefRecord>, id: Array<number>): NdefRecord;
/**
* Helper that creates an empty NdefRecord.
*
*/
emptyRecord():NdefRecord;
emptyRecord(): NdefRecord;

@@ -232,5 +228,4 @@ /**

* @param packageName android package name
*
*/
androidApplicationRecord(packageName:string):NdefRecord;
androidApplicationRecord(packageName: string): NdefRecord;

@@ -246,3 +241,3 @@ /**

*/
encodeMessage(ndefRecords:Array<NdefRecord>):Array<number>;
encodeMessage(ndefRecords: Array<NdefRecord>): Array<number>;

@@ -258,3 +253,3 @@ /**

*/
decodeMessage(bytes:Array<number>):Array<NdefRecord>;
decodeMessage(bytes: Array<number>): Array<NdefRecord>;

@@ -268,3 +263,3 @@ /**

*/
decodeTnf(tnf_byte:number):any;
decodeTnf(tnf_byte: number): any;

@@ -278,3 +273,3 @@ /**

*/
encodeTnf(mb:number, me:number, cf:number, sr:number, il:number, tnf:number):number;
encodeTnf(mb: number, me: number, cf: number, sr: number, il: number, tnf: number): number;

@@ -284,5 +279,5 @@ /**

*
*@param tnf tnf byte
* @param tnf tnf byte
*/
tnfToString(tnf:number):string;
tnfToString(tnf: number): string;
}

@@ -295,3 +290,3 @@

*/
bytesToString(bytes:Array<number>):string;
bytesToString(bytes: Array<number>): string;

@@ -302,3 +297,3 @@ /**

*/
stringToBytes(string:string):Array<number>;
stringToBytes(string: string): Array<number>;

@@ -309,3 +304,3 @@ /**

*/
bytesToHexString(bytes:Array<number>):string;
bytesToHexString(bytes: Array<number>): string;
}

@@ -324,3 +319,3 @@

*/
addTagDiscoveredListener(callback:(event:TagEvent) => void, win?:() => void, fail?:() => void):void;
addTagDiscoveredListener(callback: (event: TagEvent) => void, win?: () => void, fail?: () => void): void;

@@ -336,3 +331,3 @@ /**

*/
addMimeTypeListener(mimeType:string, callback:() => void, win?:() => void, fail?:() => void):void;
addMimeTypeListener(mimeType: string, callback: () => void, win?: () => void, fail?: () => void): void;

@@ -348,3 +343,3 @@ /**

*/
addNdefListener(callback:(event:NdefTagEvent) => void, win?:() => void, fail?:() => void):void;
addNdefListener(callback: (event: NdefTagEvent) => void, win?: () => void, fail?: () => void): void;

@@ -360,3 +355,3 @@ /**

*/
addNdefFormatableListener(callback:(event:NdefTagEvent) => void, win?:() => void, fail?:() => void):void;
addNdefFormatableListener(callback: (event: NdefTagEvent) => void, win?: () => void, fail?: () => void): void;

@@ -373,3 +368,3 @@ /**

*/
write(ndefMessage:Array<NdefRecord>, win?:() => void, fail?:() => void):void;
write(ndefMessage: Array<NdefRecord>, win?: () => void, fail?: () => void): void;

@@ -383,3 +378,3 @@ /**

*/
makeReadOnly(win?:() => void, fail?:() => void):void;
makeReadOnly(win?: () => void, fail?: () => void): void;

@@ -393,3 +388,3 @@ /**

*/
share(ndefMessage:Array<NdefRecord>, win?:() => void, fail?:() => void):void;
share(ndefMessage: Array<NdefRecord>, win?: () => void, fail?: () => void): void;

@@ -401,3 +396,3 @@ /**

*/
unshare(win?:() => void, fail?:() => void):void;
unshare(win?: () => void, fail?: () => void): void;

@@ -413,3 +408,3 @@ /**

*/
handover(uris:string|Array<string>, win?:() => void, fail?:() => void):void;
handover(uris: string | Array<string>, win?: () => void, fail?: () => void): void;

@@ -421,3 +416,3 @@ /**

*/
stopHandover(win?:() => void, fail?:() => void):void;
stopHandover(win?: () => void, fail?: () => void): void;

@@ -431,3 +426,3 @@ /**

*/
erase(win?:() => void, fail?:() => void):void;
erase(win?: () => void, fail?: () => void): void;

@@ -446,3 +441,3 @@ /**

*/
enabled(win?:(status:String) => void, fail?:(status:String) => void):void;
enabled(win?: (status: String) => void, fail?: (status: String) => void): void;

@@ -455,3 +450,3 @@ /**

*/
removeTagDiscoveredListener(callback:(event:TagEvent) => void, win?:() => void, fail?:() => void):void;
removeTagDiscoveredListener(callback: (event: TagEvent) => void, win?: () => void, fail?: () => void): void;

@@ -465,3 +460,8 @@ /**

*/
removeMimeTypeListener(mimeType:string, callback:(event:TagEvent) => void, win?:() => void, fail?:() => void):void;
removeMimeTypeListener(
mimeType: string,
callback: (event: TagEvent) => void,
win?: () => void,
fail?: () => void,
): void;

@@ -474,3 +474,3 @@ /**

*/
removeNdefListener(callback:(event:TagEvent) => void, win?:() => void, fail?:() => void):void;
removeNdefListener(callback: (event: TagEvent) => void, win?: () => void, fail?: () => void): void;

@@ -482,22 +482,20 @@ /**

*/
showSettings(win?:() => void, fail?:() => void):void;
showSettings(win?: () => void, fail?: () => void): void;
}
}
declare var nfc:PhoneGapNfc.Nfc;
declare var ndef:PhoneGapNfc.Ndef;
declare var util:PhoneGapNfc.Util;
declare var nfc: PhoneGapNfc.Nfc;
declare var ndef: PhoneGapNfc.Ndef;
declare var util: PhoneGapNfc.Util;
declare module 'nfc' {
declare module "nfc" {
export = nfc;
}
declare module 'ndef' {
declare module "ndef" {
export = ndef;
}
declare module 'util' {
declare module "util" {
export = util;
}
{
"name": "@types/phonegap-nfc",
"version": "0.0.32",
"version": "0.0.33",
"description": "TypeScript definitions for Phonegap NFC Plugin",

@@ -23,4 +23,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/phonegap-nfc",

"dependencies": {},
"typesPublisherContentHash": "bfedd63594a0e9860aad35822069f67280952a33cd95f73d322f1f7d21d6f08b",
"typeScriptVersion": "4.3"
"typesPublisherContentHash": "0fbd093d60af3d544ad531e5dc9c2abaa1deda6f164968d24a0a7c7afb812065",
"typeScriptVersion": "4.5"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Thu, 25 May 2023 20:34:35 GMT
* Last updated: Sun, 24 Sep 2023 06:37:28 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: `ndef`, `nfc`, `util`

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc