@basetime/a2w-api-ts
Advanced tools
Comparing version 0.1.22 to 0.1.23
@@ -281,2 +281,30 @@ "use strict"; | ||
}; | ||
/** | ||
* Returns the API keys for the authenticated organization. | ||
*/ | ||
getApiKeys = async () => { | ||
const url = `${_OrganizationsEndpoint.endpoint}/apiKeys`; | ||
return await this.req.fetch( | ||
url, | ||
{ | ||
method: "GET" | ||
}, | ||
false | ||
); | ||
}; | ||
/** | ||
* Returns an API key by ID. | ||
* | ||
* @param id The ID of the API key. | ||
*/ | ||
getApiKey = async (id) => { | ||
const url = `${_OrganizationsEndpoint.endpoint}/apiKeys/${id}`; | ||
return await this.req.fetch( | ||
url, | ||
{ | ||
method: "GET" | ||
}, | ||
false | ||
); | ||
}; | ||
}; | ||
@@ -283,0 +311,0 @@ |
@@ -27,1 +27,2 @@ export { default as Client } from './Client'; | ||
export type { ScannerInvite } from './ScannerInvite'; | ||
export type { ApiKey } from './ApiKey'; |
@@ -247,2 +247,30 @@ // src/Endpoint.ts | ||
}; | ||
/** | ||
* Returns the API keys for the authenticated organization. | ||
*/ | ||
getApiKeys = async () => { | ||
const url = `${_OrganizationsEndpoint.endpoint}/apiKeys`; | ||
return await this.req.fetch( | ||
url, | ||
{ | ||
method: "GET" | ||
}, | ||
false | ||
); | ||
}; | ||
/** | ||
* Returns an API key by ID. | ||
* | ||
* @param id The ID of the API key. | ||
*/ | ||
getApiKey = async (id) => { | ||
const url = `${_OrganizationsEndpoint.endpoint}/apiKeys/${id}`; | ||
return await this.req.fetch( | ||
url, | ||
{ | ||
method: "GET" | ||
}, | ||
false | ||
); | ||
}; | ||
}; | ||
@@ -249,0 +277,0 @@ |
@@ -0,1 +1,2 @@ | ||
import { ApiKey } from './ApiKey'; | ||
import Endpoint from './Endpoint'; | ||
@@ -39,2 +40,12 @@ import { Organization } from './Organization'; | ||
}>; | ||
/** | ||
* Returns the API keys for the authenticated organization. | ||
*/ | ||
getApiKeys: () => Promise<ApiKey[]>; | ||
/** | ||
* Returns an API key by ID. | ||
* | ||
* @param id The ID of the API key. | ||
*/ | ||
getApiKey: (id: string) => Promise<ApiKey | null>; | ||
} |
{ | ||
"name": "@basetime/a2w-api-ts", | ||
"version": "0.1.22", | ||
"version": "0.1.23", | ||
"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
115941
41
3186