@basetime/a2w-api-ts
Advanced tools
Comparing version 0.1.13 to 0.1.14
@@ -231,2 +231,20 @@ "use strict"; | ||
}; | ||
/** | ||
* Accepts an scanner app invite code and returns api keys. | ||
* | ||
* @param code The invite code. | ||
*/ | ||
exchangeScannerInvite = async (code) => { | ||
const url = `${_OrganizationsEndpoint.endpoint}/scanners/invites`; | ||
return await this.req.fetch(url, { | ||
method: "POST", | ||
headers: { | ||
Accept: "application/json", | ||
"Content-Type": "application/json" | ||
}, | ||
body: JSON.stringify({ | ||
code | ||
}) | ||
}); | ||
}; | ||
}; | ||
@@ -233,0 +251,0 @@ |
@@ -197,2 +197,20 @@ // src/Endpoint.ts | ||
}; | ||
/** | ||
* Accepts an scanner app invite code and returns api keys. | ||
* | ||
* @param code The invite code. | ||
*/ | ||
exchangeScannerInvite = async (code) => { | ||
const url = `${_OrganizationsEndpoint.endpoint}/scanners/invites`; | ||
return await this.req.fetch(url, { | ||
method: "POST", | ||
headers: { | ||
Accept: "application/json", | ||
"Content-Type": "application/json" | ||
}, | ||
body: JSON.stringify({ | ||
code | ||
}) | ||
}); | ||
}; | ||
}; | ||
@@ -199,0 +217,0 @@ |
@@ -17,2 +17,11 @@ import Endpoint from './Endpoint'; | ||
getMine: () => Promise<Organization>; | ||
/** | ||
* Accepts an scanner app invite code and returns api keys. | ||
* | ||
* @param code The invite code. | ||
*/ | ||
exchangeScannerInvite: (code: string) => Promise<{ | ||
key: string; | ||
secret: string; | ||
}>; | ||
} |
{ | ||
"name": "@basetime/a2w-api-ts", | ||
"version": "0.1.13", | ||
"version": "0.1.14", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "Client library that communicates with the addtowallet API.", |
Sorry, the diff of this file is not supported yet
107609
2957