@openmrp/sdk 0.19.3 → 0.19.5
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.
- package/CHANGELOG.md +2 -9
- package/LICENSE +1 -1
- package/README.md +31 -31
- package/client.d.mts +12 -12
- package/client.d.ts +12 -12
- package/client.js +47 -47
- package/client.js.map +1 -1
- package/client.mjs +45 -45
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +2 -2
- package/core/api-promise.d.ts +2 -2
- package/core/error.d.mts +2 -2
- package/core/error.d.ts +2 -2
- package/core/error.js +4 -4
- package/core/error.mjs +2 -2
- package/core/resource.d.mts +3 -3
- package/core/resource.d.ts +3 -3
- package/index.d.mts +3 -3
- package/index.d.ts +3 -3
- package/index.js +4 -4
- package/index.mjs +3 -3
- package/internal/parse.d.mts +2 -2
- package/internal/parse.d.ts +2 -2
- package/internal/shims.js +1 -1
- package/internal/shims.mjs +1 -1
- package/internal/uploads.d.mts +4 -4
- package/internal/uploads.d.ts +4 -4
- package/internal/utils/base64.js +2 -2
- package/internal/utils/base64.mjs +3 -3
- package/internal/utils/log.d.mts +3 -3
- package/internal/utils/log.d.ts +3 -3
- package/internal/utils/path.js +1 -1
- package/internal/utils/path.mjs +2 -2
- package/internal/utils/values.js +5 -5
- package/internal/utils/values.mjs +6 -6
- package/package.json +3 -3
- package/resources/ai/agents.d.mts +8 -8
- package/resources/ai/agents.d.ts +8 -8
- package/resources/ai/agents.js +6 -6
- package/resources/ai/agents.mjs +6 -6
- package/resources/auth/api-keys/actions.d.mts +2 -2
- package/resources/auth/api-keys/actions.d.ts +2 -2
- package/resources/auth/api-keys/actions.js +2 -2
- package/resources/auth/api-keys/actions.mjs +2 -2
- package/resources/auth/api-keys/api-keys.d.mts +6 -6
- package/resources/auth/api-keys/api-keys.d.ts +6 -6
- package/resources/auth/api-keys/api-keys.js +5 -5
- package/resources/auth/api-keys/api-keys.mjs +5 -5
- package/resources/core/request-logs.d.mts +4 -3
- package/resources/core/request-logs.d.mts.map +1 -1
- package/resources/core/request-logs.d.ts +4 -3
- package/resources/core/request-logs.d.ts.map +1 -1
- package/resources/finance/payment-terms.d.mts +2 -2
- package/resources/finance/payment-terms.d.ts +2 -2
- package/resources/finance/payment-terms.js +2 -2
- package/resources/finance/payment-terms.mjs +2 -2
- package/resources/identity/account-users/account-users.d.mts +2 -2
- package/resources/identity/account-users/account-users.d.ts +2 -2
- package/resources/identity/account-users/account-users.js +2 -2
- package/resources/identity/account-users/account-users.mjs +2 -2
- package/resources/sales/volume-discounts.d.mts +4 -4
- package/resources/sales/volume-discounts.d.mts.map +1 -1
- package/resources/sales/volume-discounts.d.ts +4 -4
- package/resources/sales/volume-discounts.d.ts.map +1 -1
- package/src/client.ts +30 -30
- package/src/core/api-promise.ts +4 -4
- package/src/core/error.ts +2 -2
- package/src/core/resource.ts +3 -3
- package/src/index.ts +3 -3
- package/src/internal/parse.ts +2 -2
- package/src/internal/shims.ts +1 -1
- package/src/internal/uploads.ts +5 -5
- package/src/internal/utils/base64.ts +3 -3
- package/src/internal/utils/log.ts +3 -3
- package/src/internal/utils/path.ts +2 -2
- package/src/internal/utils/values.ts +6 -6
- package/src/resources/ai/agents.ts +8 -8
- package/src/resources/auth/api-keys/actions.ts +2 -2
- package/src/resources/auth/api-keys/api-keys.ts +6 -6
- package/src/resources/core/request-logs.ts +4 -3
- package/src/resources/finance/payment-terms.ts +2 -2
- package/src/resources/identity/account-users/account-users.ts +2 -2
- package/src/resources/sales/volume-discounts.ts +32 -4
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/internal/utils/path.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OpenmrpError } from "../../core/error.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* Percent-encode everything that isn't safe to have in a path without encoding safe chars.
|
|
4
4
|
*
|
|
@@ -61,7 +61,7 @@ export const createPathTagFunction = (pathEncoder = encodeURIPath) => function p
|
|
|
61
61
|
lastEnd = segment.start + segment.length;
|
|
62
62
|
return acc + spaces + arrows;
|
|
63
63
|
}, '');
|
|
64
|
-
throw new
|
|
64
|
+
throw new OpenmrpError(`Path parameters result in path with invalid segments:\n${invalidSegments
|
|
65
65
|
.map((e) => e.error)
|
|
66
66
|
.join('\n')}\n${path}\n${underline}`);
|
|
67
67
|
}
|
package/internal/utils/values.js
CHANGED
|
@@ -40,17 +40,17 @@ function isObj(obj) {
|
|
|
40
40
|
}
|
|
41
41
|
const ensurePresent = (value) => {
|
|
42
42
|
if (value == null) {
|
|
43
|
-
throw new error_1.
|
|
43
|
+
throw new error_1.OpenmrpError(`Expected a value to be given but received ${value} instead.`);
|
|
44
44
|
}
|
|
45
45
|
return value;
|
|
46
46
|
};
|
|
47
47
|
exports.ensurePresent = ensurePresent;
|
|
48
48
|
const validatePositiveInteger = (name, n) => {
|
|
49
49
|
if (typeof n !== 'number' || !Number.isInteger(n)) {
|
|
50
|
-
throw new error_1.
|
|
50
|
+
throw new error_1.OpenmrpError(`${name} must be an integer`);
|
|
51
51
|
}
|
|
52
52
|
if (n < 0) {
|
|
53
|
-
throw new error_1.
|
|
53
|
+
throw new error_1.OpenmrpError(`${name} must be a positive integer`);
|
|
54
54
|
}
|
|
55
55
|
return n;
|
|
56
56
|
};
|
|
@@ -60,7 +60,7 @@ const coerceInteger = (value) => {
|
|
|
60
60
|
return Math.round(value);
|
|
61
61
|
if (typeof value === 'string')
|
|
62
62
|
return parseInt(value, 10);
|
|
63
|
-
throw new error_1.
|
|
63
|
+
throw new error_1.OpenmrpError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
64
64
|
};
|
|
65
65
|
exports.coerceInteger = coerceInteger;
|
|
66
66
|
const coerceFloat = (value) => {
|
|
@@ -68,7 +68,7 @@ const coerceFloat = (value) => {
|
|
|
68
68
|
return value;
|
|
69
69
|
if (typeof value === 'string')
|
|
70
70
|
return parseFloat(value);
|
|
71
|
-
throw new error_1.
|
|
71
|
+
throw new error_1.OpenmrpError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
72
72
|
};
|
|
73
73
|
exports.coerceFloat = coerceFloat;
|
|
74
74
|
const coerceBoolean = (value) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import {
|
|
2
|
+
import { OpenmrpError } from "../../core/error.mjs";
|
|
3
3
|
// https://url.spec.whatwg.org/#url-scheme-string
|
|
4
4
|
const startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i;
|
|
5
5
|
export const isAbsoluteURL = (url) => {
|
|
@@ -31,16 +31,16 @@ export function isObj(obj) {
|
|
|
31
31
|
}
|
|
32
32
|
export const ensurePresent = (value) => {
|
|
33
33
|
if (value == null) {
|
|
34
|
-
throw new
|
|
34
|
+
throw new OpenmrpError(`Expected a value to be given but received ${value} instead.`);
|
|
35
35
|
}
|
|
36
36
|
return value;
|
|
37
37
|
};
|
|
38
38
|
export const validatePositiveInteger = (name, n) => {
|
|
39
39
|
if (typeof n !== 'number' || !Number.isInteger(n)) {
|
|
40
|
-
throw new
|
|
40
|
+
throw new OpenmrpError(`${name} must be an integer`);
|
|
41
41
|
}
|
|
42
42
|
if (n < 0) {
|
|
43
|
-
throw new
|
|
43
|
+
throw new OpenmrpError(`${name} must be a positive integer`);
|
|
44
44
|
}
|
|
45
45
|
return n;
|
|
46
46
|
};
|
|
@@ -49,14 +49,14 @@ export const coerceInteger = (value) => {
|
|
|
49
49
|
return Math.round(value);
|
|
50
50
|
if (typeof value === 'string')
|
|
51
51
|
return parseInt(value, 10);
|
|
52
|
-
throw new
|
|
52
|
+
throw new OpenmrpError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
53
53
|
};
|
|
54
54
|
export const coerceFloat = (value) => {
|
|
55
55
|
if (typeof value === 'number')
|
|
56
56
|
return value;
|
|
57
57
|
if (typeof value === 'string')
|
|
58
58
|
return parseFloat(value);
|
|
59
|
-
throw new
|
|
59
|
+
throw new OpenmrpError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
60
60
|
};
|
|
61
61
|
export const coerceBoolean = (value) => {
|
|
62
62
|
if (typeof value === 'boolean')
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrp/sdk",
|
|
3
|
-
"version": "0.19.
|
|
4
|
-
"description": "The official TypeScript library for the
|
|
5
|
-
"author": "
|
|
3
|
+
"version": "0.19.5",
|
|
4
|
+
"description": "The official TypeScript library for the Openmrp API",
|
|
5
|
+
"author": "Openmrp <support@openmrp.ai>",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
7
|
"main": "./index.js",
|
|
8
8
|
"type": "commonjs",
|
|
@@ -46,9 +46,9 @@ export declare class Agents extends APIResource {
|
|
|
46
46
|
/**
|
|
47
47
|
* Lists the agents available to your account, newest first.
|
|
48
48
|
*
|
|
49
|
-
* Covers both the `system` agents OpenMRP provides to every account and the
|
|
50
|
-
* agents created in yours. Deleted agents are never returned. The `q`
|
|
51
|
-
* matches an agent's name, slug, description, or ID.
|
|
49
|
+
* Covers both the `system` agents OpenMRP provides to every account and the
|
|
50
|
+
* `custom` agents created in yours. Deleted agents are never returned. The `q`
|
|
51
|
+
* parameter matches an agent's name, slug, description, or ID.
|
|
52
52
|
*
|
|
53
53
|
* This endpoint requires the permission: `agents:read`.
|
|
54
54
|
*
|
|
@@ -61,9 +61,9 @@ export declare class Agents extends APIResource {
|
|
|
61
61
|
/**
|
|
62
62
|
* Retrieves a single agent by ID.
|
|
63
63
|
*
|
|
64
|
-
* Resolves both the `system` agents OpenMRP provides and the `custom` agents in
|
|
65
|
-
* account; the `status` reflects whether the agent is enabled for your
|
|
66
|
-
* specifically.
|
|
64
|
+
* Resolves both the `system` agents OpenMRP provides and the `custom` agents in
|
|
65
|
+
* your account; the `status` reflects whether the agent is enabled for your
|
|
66
|
+
* account specifically.
|
|
67
67
|
*
|
|
68
68
|
* This endpoint requires the permission: `agents:read`.
|
|
69
69
|
*
|
|
@@ -368,8 +368,8 @@ export interface ConfigInput {
|
|
|
368
368
|
/**
|
|
369
369
|
* Instructions that define the agent's role and how it should behave.
|
|
370
370
|
*
|
|
371
|
-
* Sent to the model on every turn of a run, alongside the platform guidance
|
|
372
|
-
* adds automatically.
|
|
371
|
+
* Sent to the model on every turn of a run, alongside the platform guidance
|
|
372
|
+
* OpenMRP adds automatically.
|
|
373
373
|
*/
|
|
374
374
|
system_prompt?: string;
|
|
375
375
|
/**
|
package/resources/ai/agents.d.ts
CHANGED
|
@@ -46,9 +46,9 @@ export declare class Agents extends APIResource {
|
|
|
46
46
|
/**
|
|
47
47
|
* Lists the agents available to your account, newest first.
|
|
48
48
|
*
|
|
49
|
-
* Covers both the `system` agents OpenMRP provides to every account and the
|
|
50
|
-
* agents created in yours. Deleted agents are never returned. The `q`
|
|
51
|
-
* matches an agent's name, slug, description, or ID.
|
|
49
|
+
* Covers both the `system` agents OpenMRP provides to every account and the
|
|
50
|
+
* `custom` agents created in yours. Deleted agents are never returned. The `q`
|
|
51
|
+
* parameter matches an agent's name, slug, description, or ID.
|
|
52
52
|
*
|
|
53
53
|
* This endpoint requires the permission: `agents:read`.
|
|
54
54
|
*
|
|
@@ -61,9 +61,9 @@ export declare class Agents extends APIResource {
|
|
|
61
61
|
/**
|
|
62
62
|
* Retrieves a single agent by ID.
|
|
63
63
|
*
|
|
64
|
-
* Resolves both the `system` agents OpenMRP provides and the `custom` agents in
|
|
65
|
-
* account; the `status` reflects whether the agent is enabled for your
|
|
66
|
-
* specifically.
|
|
64
|
+
* Resolves both the `system` agents OpenMRP provides and the `custom` agents in
|
|
65
|
+
* your account; the `status` reflects whether the agent is enabled for your
|
|
66
|
+
* account specifically.
|
|
67
67
|
*
|
|
68
68
|
* This endpoint requires the permission: `agents:read`.
|
|
69
69
|
*
|
|
@@ -368,8 +368,8 @@ export interface ConfigInput {
|
|
|
368
368
|
/**
|
|
369
369
|
* Instructions that define the agent's role and how it should behave.
|
|
370
370
|
*
|
|
371
|
-
* Sent to the model on every turn of a run, alongside the platform guidance
|
|
372
|
-
* adds automatically.
|
|
371
|
+
* Sent to the model on every turn of a run, alongside the platform guidance
|
|
372
|
+
* OpenMRP adds automatically.
|
|
373
373
|
*/
|
|
374
374
|
system_prompt?: string;
|
|
375
375
|
/**
|
package/resources/ai/agents.js
CHANGED
|
@@ -50,9 +50,9 @@ class Agents extends resource_1.APIResource {
|
|
|
50
50
|
/**
|
|
51
51
|
* Lists the agents available to your account, newest first.
|
|
52
52
|
*
|
|
53
|
-
* Covers both the `system` agents OpenMRP provides to every account and the
|
|
54
|
-
* agents created in yours. Deleted agents are never returned. The `q`
|
|
55
|
-
* matches an agent's name, slug, description, or ID.
|
|
53
|
+
* Covers both the `system` agents OpenMRP provides to every account and the
|
|
54
|
+
* `custom` agents created in yours. Deleted agents are never returned. The `q`
|
|
55
|
+
* parameter matches an agent's name, slug, description, or ID.
|
|
56
56
|
*
|
|
57
57
|
* This endpoint requires the permission: `agents:read`.
|
|
58
58
|
*
|
|
@@ -67,9 +67,9 @@ class Agents extends resource_1.APIResource {
|
|
|
67
67
|
/**
|
|
68
68
|
* Retrieves a single agent by ID.
|
|
69
69
|
*
|
|
70
|
-
* Resolves both the `system` agents OpenMRP provides and the `custom` agents in
|
|
71
|
-
* account; the `status` reflects whether the agent is enabled for your
|
|
72
|
-
* specifically.
|
|
70
|
+
* Resolves both the `system` agents OpenMRP provides and the `custom` agents in
|
|
71
|
+
* your account; the `status` reflects whether the agent is enabled for your
|
|
72
|
+
* account specifically.
|
|
73
73
|
*
|
|
74
74
|
* This endpoint requires the permission: `agents:read`.
|
|
75
75
|
*
|
package/resources/ai/agents.mjs
CHANGED
|
@@ -47,9 +47,9 @@ export class Agents extends APIResource {
|
|
|
47
47
|
/**
|
|
48
48
|
* Lists the agents available to your account, newest first.
|
|
49
49
|
*
|
|
50
|
-
* Covers both the `system` agents OpenMRP provides to every account and the
|
|
51
|
-
* agents created in yours. Deleted agents are never returned. The `q`
|
|
52
|
-
* matches an agent's name, slug, description, or ID.
|
|
50
|
+
* Covers both the `system` agents OpenMRP provides to every account and the
|
|
51
|
+
* `custom` agents created in yours. Deleted agents are never returned. The `q`
|
|
52
|
+
* parameter matches an agent's name, slug, description, or ID.
|
|
53
53
|
*
|
|
54
54
|
* This endpoint requires the permission: `agents:read`.
|
|
55
55
|
*
|
|
@@ -64,9 +64,9 @@ export class Agents extends APIResource {
|
|
|
64
64
|
/**
|
|
65
65
|
* Retrieves a single agent by ID.
|
|
66
66
|
*
|
|
67
|
-
* Resolves both the `system` agents OpenMRP provides and the `custom` agents in
|
|
68
|
-
* account; the `status` reflects whether the agent is enabled for your
|
|
69
|
-
* specifically.
|
|
67
|
+
* Resolves both the `system` agents OpenMRP provides and the `custom` agents in
|
|
68
|
+
* your account; the `status` reflects whether the agent is enabled for your
|
|
69
|
+
* account specifically.
|
|
70
70
|
*
|
|
71
71
|
* This endpoint requires the permission: `agents:read`.
|
|
72
72
|
*
|
|
@@ -7,7 +7,7 @@ import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class Actions extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* Rotates an [API key](https://docs.
|
|
10
|
+
* Rotates an [API key](https://docs.openmrp.ai/api/api-keys) by revoking the
|
|
11
11
|
* existing key and issuing a replacement with the same name, role, and expiration
|
|
12
12
|
* (unless overridden).
|
|
13
13
|
*
|
|
@@ -18,7 +18,7 @@ export declare class Actions extends APIResource {
|
|
|
18
18
|
*
|
|
19
19
|
* The secret key is returned once and cannot be retrieved later, so you should
|
|
20
20
|
* store it securely. We provide some
|
|
21
|
-
* [recommendations](https://docs.
|
|
21
|
+
* [recommendations](https://docs.openmrp.ai/api/managing-api-keys) on how you can
|
|
22
22
|
* manage your API keys.
|
|
23
23
|
*
|
|
24
24
|
* This endpoint requires the `admin` role type.
|
|
@@ -7,7 +7,7 @@ import { RequestOptions } from "../../../internal/request-options.js";
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class Actions extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* Rotates an [API key](https://docs.
|
|
10
|
+
* Rotates an [API key](https://docs.openmrp.ai/api/api-keys) by revoking the
|
|
11
11
|
* existing key and issuing a replacement with the same name, role, and expiration
|
|
12
12
|
* (unless overridden).
|
|
13
13
|
*
|
|
@@ -18,7 +18,7 @@ export declare class Actions extends APIResource {
|
|
|
18
18
|
*
|
|
19
19
|
* The secret key is returned once and cannot be retrieved later, so you should
|
|
20
20
|
* store it securely. We provide some
|
|
21
|
-
* [recommendations](https://docs.
|
|
21
|
+
* [recommendations](https://docs.openmrp.ai/api/managing-api-keys) on how you can
|
|
22
22
|
* manage your API keys.
|
|
23
23
|
*
|
|
24
24
|
* This endpoint requires the `admin` role type.
|
|
@@ -9,7 +9,7 @@ const path_1 = require("../../../internal/utils/path.js");
|
|
|
9
9
|
*/
|
|
10
10
|
class Actions extends resource_1.APIResource {
|
|
11
11
|
/**
|
|
12
|
-
* Rotates an [API key](https://docs.
|
|
12
|
+
* Rotates an [API key](https://docs.openmrp.ai/api/api-keys) by revoking the
|
|
13
13
|
* existing key and issuing a replacement with the same name, role, and expiration
|
|
14
14
|
* (unless overridden).
|
|
15
15
|
*
|
|
@@ -20,7 +20,7 @@ class Actions extends resource_1.APIResource {
|
|
|
20
20
|
*
|
|
21
21
|
* The secret key is returned once and cannot be retrieved later, so you should
|
|
22
22
|
* store it securely. We provide some
|
|
23
|
-
* [recommendations](https://docs.
|
|
23
|
+
* [recommendations](https://docs.openmrp.ai/api/managing-api-keys) on how you can
|
|
24
24
|
* manage your API keys.
|
|
25
25
|
*
|
|
26
26
|
* This endpoint requires the `admin` role type.
|
|
@@ -6,7 +6,7 @@ import { path } from "../../../internal/utils/path.mjs";
|
|
|
6
6
|
*/
|
|
7
7
|
export class Actions extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* Rotates an [API key](https://docs.
|
|
9
|
+
* Rotates an [API key](https://docs.openmrp.ai/api/api-keys) by revoking the
|
|
10
10
|
* existing key and issuing a replacement with the same name, role, and expiration
|
|
11
11
|
* (unless overridden).
|
|
12
12
|
*
|
|
@@ -17,7 +17,7 @@ export class Actions extends APIResource {
|
|
|
17
17
|
*
|
|
18
18
|
* The secret key is returned once and cannot be retrieved later, so you should
|
|
19
19
|
* store it securely. We provide some
|
|
20
|
-
* [recommendations](https://docs.
|
|
20
|
+
* [recommendations](https://docs.openmrp.ai/api/managing-api-keys) on how you can
|
|
21
21
|
* manage your API keys.
|
|
22
22
|
*
|
|
23
23
|
* This endpoint requires the `admin` role type.
|
|
@@ -9,7 +9,7 @@ import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
|
9
9
|
export declare class APIKeys extends APIResource {
|
|
10
10
|
actions: ActionsAPI.Actions;
|
|
11
11
|
/**
|
|
12
|
-
* Returns [API key](https://docs.
|
|
12
|
+
* Returns [API key](https://docs.openmrp.ai/api/api-keys) metadata by ID.
|
|
13
13
|
*
|
|
14
14
|
* Only the redacted key value is returned. The full secret is available only in
|
|
15
15
|
* the response that issued the key, so a lost secret must be replaced by rotating
|
|
@@ -26,7 +26,7 @@ export declare class APIKeys extends APIResource {
|
|
|
26
26
|
*/
|
|
27
27
|
retrieve(id: string, query?: APIKeyRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<APIKey>;
|
|
28
28
|
/**
|
|
29
|
-
* Returns a paginated list of [API keys](https://docs.
|
|
29
|
+
* Returns a paginated list of [API keys](https://docs.openmrp.ai/api/api-keys),
|
|
30
30
|
* newest first.
|
|
31
31
|
*
|
|
32
32
|
* Only keys belonging to the account making the request are returned. The search
|
|
@@ -41,7 +41,7 @@ export declare class APIKeys extends APIResource {
|
|
|
41
41
|
*/
|
|
42
42
|
list(query?: APIKeyListParams | null | undefined, options?: RequestOptions): APIPromise<ListAPIKey>;
|
|
43
43
|
/**
|
|
44
|
-
* Creates an [API key](https://docs.
|
|
44
|
+
* Creates an [API key](https://docs.openmrp.ai/api/api-keys) to authenticate API
|
|
45
45
|
* requests.
|
|
46
46
|
*
|
|
47
47
|
* The key belongs to the account it was created under and only ever acts on behalf
|
|
@@ -50,7 +50,7 @@ export declare class APIKeys extends APIResource {
|
|
|
50
50
|
*
|
|
51
51
|
* The secret key is returned once and cannot be retrieved later, so you should
|
|
52
52
|
* store it securely. We provide some
|
|
53
|
-
* [recommendations](https://docs.
|
|
53
|
+
* [recommendations](https://docs.openmrp.ai/api/managing-api-keys) on how you can
|
|
54
54
|
* manage your API keys.
|
|
55
55
|
*
|
|
56
56
|
* This endpoint requires the `admin` role type.
|
|
@@ -66,7 +66,7 @@ export declare class APIKeys extends APIResource {
|
|
|
66
66
|
*/
|
|
67
67
|
create(params: APIKeyCreateParams, options?: RequestOptions): APIPromise<CreatedAPIKey>;
|
|
68
68
|
/**
|
|
69
|
-
* Revokes an [API key](https://docs.
|
|
69
|
+
* Revokes an [API key](https://docs.openmrp.ai/api/api-keys).
|
|
70
70
|
*
|
|
71
71
|
* Revocation takes effect immediately and cannot be undone; any request still
|
|
72
72
|
* presenting the key is rejected. The key record is kept, so it stays visible in
|
|
@@ -384,7 +384,7 @@ export interface CreatedAPIKey {
|
|
|
384
384
|
*
|
|
385
385
|
* This is the only response that ever contains the secret; if it is lost, rotate
|
|
386
386
|
* the key to issue a new one. Learn more about
|
|
387
|
-
* [managing your API keys](https://docs.
|
|
387
|
+
* [managing your API keys](https://docs.openmrp.ai/api/managing-api-keys).
|
|
388
388
|
*/
|
|
389
389
|
api_key_secret: string;
|
|
390
390
|
/**
|
|
@@ -9,7 +9,7 @@ import { RequestOptions } from "../../../internal/request-options.js";
|
|
|
9
9
|
export declare class APIKeys extends APIResource {
|
|
10
10
|
actions: ActionsAPI.Actions;
|
|
11
11
|
/**
|
|
12
|
-
* Returns [API key](https://docs.
|
|
12
|
+
* Returns [API key](https://docs.openmrp.ai/api/api-keys) metadata by ID.
|
|
13
13
|
*
|
|
14
14
|
* Only the redacted key value is returned. The full secret is available only in
|
|
15
15
|
* the response that issued the key, so a lost secret must be replaced by rotating
|
|
@@ -26,7 +26,7 @@ export declare class APIKeys extends APIResource {
|
|
|
26
26
|
*/
|
|
27
27
|
retrieve(id: string, query?: APIKeyRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<APIKey>;
|
|
28
28
|
/**
|
|
29
|
-
* Returns a paginated list of [API keys](https://docs.
|
|
29
|
+
* Returns a paginated list of [API keys](https://docs.openmrp.ai/api/api-keys),
|
|
30
30
|
* newest first.
|
|
31
31
|
*
|
|
32
32
|
* Only keys belonging to the account making the request are returned. The search
|
|
@@ -41,7 +41,7 @@ export declare class APIKeys extends APIResource {
|
|
|
41
41
|
*/
|
|
42
42
|
list(query?: APIKeyListParams | null | undefined, options?: RequestOptions): APIPromise<ListAPIKey>;
|
|
43
43
|
/**
|
|
44
|
-
* Creates an [API key](https://docs.
|
|
44
|
+
* Creates an [API key](https://docs.openmrp.ai/api/api-keys) to authenticate API
|
|
45
45
|
* requests.
|
|
46
46
|
*
|
|
47
47
|
* The key belongs to the account it was created under and only ever acts on behalf
|
|
@@ -50,7 +50,7 @@ export declare class APIKeys extends APIResource {
|
|
|
50
50
|
*
|
|
51
51
|
* The secret key is returned once and cannot be retrieved later, so you should
|
|
52
52
|
* store it securely. We provide some
|
|
53
|
-
* [recommendations](https://docs.
|
|
53
|
+
* [recommendations](https://docs.openmrp.ai/api/managing-api-keys) on how you can
|
|
54
54
|
* manage your API keys.
|
|
55
55
|
*
|
|
56
56
|
* This endpoint requires the `admin` role type.
|
|
@@ -66,7 +66,7 @@ export declare class APIKeys extends APIResource {
|
|
|
66
66
|
*/
|
|
67
67
|
create(params: APIKeyCreateParams, options?: RequestOptions): APIPromise<CreatedAPIKey>;
|
|
68
68
|
/**
|
|
69
|
-
* Revokes an [API key](https://docs.
|
|
69
|
+
* Revokes an [API key](https://docs.openmrp.ai/api/api-keys).
|
|
70
70
|
*
|
|
71
71
|
* Revocation takes effect immediately and cannot be undone; any request still
|
|
72
72
|
* presenting the key is rejected. The key record is kept, so it stays visible in
|
|
@@ -384,7 +384,7 @@ export interface CreatedAPIKey {
|
|
|
384
384
|
*
|
|
385
385
|
* This is the only response that ever contains the secret; if it is lost, rotate
|
|
386
386
|
* the key to issue a new one. Learn more about
|
|
387
|
-
* [managing your API keys](https://docs.
|
|
387
|
+
* [managing your API keys](https://docs.openmrp.ai/api/managing-api-keys).
|
|
388
388
|
*/
|
|
389
389
|
api_key_secret: string;
|
|
390
390
|
/**
|
|
@@ -16,7 +16,7 @@ class APIKeys extends resource_1.APIResource {
|
|
|
16
16
|
this.actions = new ActionsAPI.Actions(this._client);
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Returns [API key](https://docs.
|
|
19
|
+
* Returns [API key](https://docs.openmrp.ai/api/api-keys) metadata by ID.
|
|
20
20
|
*
|
|
21
21
|
* Only the redacted key value is returned. The full secret is available only in
|
|
22
22
|
* the response that issued the key, so a lost secret must be replaced by rotating
|
|
@@ -35,7 +35,7 @@ class APIKeys extends resource_1.APIResource {
|
|
|
35
35
|
return this._client.get((0, path_1.path) `/v1/auth/api-keys/${id}`, { query, ...options });
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
* Returns a paginated list of [API keys](https://docs.
|
|
38
|
+
* Returns a paginated list of [API keys](https://docs.openmrp.ai/api/api-keys),
|
|
39
39
|
* newest first.
|
|
40
40
|
*
|
|
41
41
|
* Only keys belonging to the account making the request are returned. The search
|
|
@@ -52,7 +52,7 @@ class APIKeys extends resource_1.APIResource {
|
|
|
52
52
|
return this._client.get('/v1/auth/api-keys', { query, ...options });
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
|
-
* Creates an [API key](https://docs.
|
|
55
|
+
* Creates an [API key](https://docs.openmrp.ai/api/api-keys) to authenticate API
|
|
56
56
|
* requests.
|
|
57
57
|
*
|
|
58
58
|
* The key belongs to the account it was created under and only ever acts on behalf
|
|
@@ -61,7 +61,7 @@ class APIKeys extends resource_1.APIResource {
|
|
|
61
61
|
*
|
|
62
62
|
* The secret key is returned once and cannot be retrieved later, so you should
|
|
63
63
|
* store it securely. We provide some
|
|
64
|
-
* [recommendations](https://docs.
|
|
64
|
+
* [recommendations](https://docs.openmrp.ai/api/managing-api-keys) on how you can
|
|
65
65
|
* manage your API keys.
|
|
66
66
|
*
|
|
67
67
|
* This endpoint requires the `admin` role type.
|
|
@@ -80,7 +80,7 @@ class APIKeys extends resource_1.APIResource {
|
|
|
80
80
|
return this._client.post('/v1/auth/api-keys', { query: { include }, body, ...options });
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
|
-
* Revokes an [API key](https://docs.
|
|
83
|
+
* Revokes an [API key](https://docs.openmrp.ai/api/api-keys).
|
|
84
84
|
*
|
|
85
85
|
* Revocation takes effect immediately and cannot be undone; any request still
|
|
86
86
|
* presenting the key is rejected. The key record is kept, so it stays visible in
|
|
@@ -12,7 +12,7 @@ export class APIKeys extends APIResource {
|
|
|
12
12
|
this.actions = new ActionsAPI.Actions(this._client);
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* Returns [API key](https://docs.
|
|
15
|
+
* Returns [API key](https://docs.openmrp.ai/api/api-keys) metadata by ID.
|
|
16
16
|
*
|
|
17
17
|
* Only the redacted key value is returned. The full secret is available only in
|
|
18
18
|
* the response that issued the key, so a lost secret must be replaced by rotating
|
|
@@ -31,7 +31,7 @@ export class APIKeys extends APIResource {
|
|
|
31
31
|
return this._client.get(path `/v1/auth/api-keys/${id}`, { query, ...options });
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
* Returns a paginated list of [API keys](https://docs.
|
|
34
|
+
* Returns a paginated list of [API keys](https://docs.openmrp.ai/api/api-keys),
|
|
35
35
|
* newest first.
|
|
36
36
|
*
|
|
37
37
|
* Only keys belonging to the account making the request are returned. The search
|
|
@@ -48,7 +48,7 @@ export class APIKeys extends APIResource {
|
|
|
48
48
|
return this._client.get('/v1/auth/api-keys', { query, ...options });
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
|
-
* Creates an [API key](https://docs.
|
|
51
|
+
* Creates an [API key](https://docs.openmrp.ai/api/api-keys) to authenticate API
|
|
52
52
|
* requests.
|
|
53
53
|
*
|
|
54
54
|
* The key belongs to the account it was created under and only ever acts on behalf
|
|
@@ -57,7 +57,7 @@ export class APIKeys extends APIResource {
|
|
|
57
57
|
*
|
|
58
58
|
* The secret key is returned once and cannot be retrieved later, so you should
|
|
59
59
|
* store it securely. We provide some
|
|
60
|
-
* [recommendations](https://docs.
|
|
60
|
+
* [recommendations](https://docs.openmrp.ai/api/managing-api-keys) on how you can
|
|
61
61
|
* manage your API keys.
|
|
62
62
|
*
|
|
63
63
|
* This endpoint requires the `admin` role type.
|
|
@@ -76,7 +76,7 @@ export class APIKeys extends APIResource {
|
|
|
76
76
|
return this._client.post('/v1/auth/api-keys', { query: { include }, body, ...options });
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
-
* Revokes an [API key](https://docs.
|
|
79
|
+
* Revokes an [API key](https://docs.openmrp.ai/api/api-keys).
|
|
80
80
|
*
|
|
81
81
|
* Revocation takes effect immediately and cannot be undone; any request still
|
|
82
82
|
* presenting the key is rejected. The key record is kept, so it stays visible in
|
|
@@ -177,7 +177,7 @@ export interface RequestLog {
|
|
|
177
177
|
/**
|
|
178
178
|
* Request host.
|
|
179
179
|
*
|
|
180
|
-
* Usually `api.
|
|
180
|
+
* Usually `api.openmrp.ai`.
|
|
181
181
|
*/
|
|
182
182
|
host: string;
|
|
183
183
|
/**
|
|
@@ -188,7 +188,8 @@ export interface RequestLog {
|
|
|
188
188
|
* Request latency in microseconds.
|
|
189
189
|
*
|
|
190
190
|
* Measured at the API edge, from the moment the request was received until the
|
|
191
|
-
* response was written, so it excludes network time between your client and
|
|
191
|
+
* response was written, so it excludes network time between your client and
|
|
192
|
+
* OpenMRP.
|
|
192
193
|
*/
|
|
193
194
|
latency_us: number;
|
|
194
195
|
/**
|
|
@@ -312,7 +313,7 @@ export interface RequestLogListParams {
|
|
|
312
313
|
/**
|
|
313
314
|
* Filter by the request host.
|
|
314
315
|
*
|
|
315
|
-
* Typically `api.
|
|
316
|
+
* Typically `api.openmrp.ai`.
|
|
316
317
|
*/
|
|
317
318
|
hosts?: Array<string>;
|
|
318
319
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-logs.d.mts","sourceRoot":"","sources":["../../src/resources/core/request-logs.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,IAAI,CACF,KAAK,GAAE,oBAAoB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC;IAI7B;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,KAAK,GAAE,wBAAwB,GAAG,IAAI,GAAG,SAAc,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,UAAU,CAAC;CAG1B;AAED;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;OAIG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;;;;;;OAOG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;OAGG;IACH,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC;IAE7B;;;;;;;;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G,YAAY,CAAC,CAAC;IAEpD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;IAElF;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAElC;;;;OAIG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEpC;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE7B;;;;;;;;OAQG;IACH,kBAAkB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CACX,SAAS,GACT,OAAO,GACP,YAAY,GACZ,wBAAwB,GACxB,cAAc,GACd,cAAc,GACd,eAAe,CAClB,CAAC;CACH;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -177,7 +177,7 @@ export interface RequestLog {
|
|
|
177
177
|
/**
|
|
178
178
|
* Request host.
|
|
179
179
|
*
|
|
180
|
-
* Usually `api.
|
|
180
|
+
* Usually `api.openmrp.ai`.
|
|
181
181
|
*/
|
|
182
182
|
host: string;
|
|
183
183
|
/**
|
|
@@ -188,7 +188,8 @@ export interface RequestLog {
|
|
|
188
188
|
* Request latency in microseconds.
|
|
189
189
|
*
|
|
190
190
|
* Measured at the API edge, from the moment the request was received until the
|
|
191
|
-
* response was written, so it excludes network time between your client and
|
|
191
|
+
* response was written, so it excludes network time between your client and
|
|
192
|
+
* OpenMRP.
|
|
192
193
|
*/
|
|
193
194
|
latency_us: number;
|
|
194
195
|
/**
|
|
@@ -312,7 +313,7 @@ export interface RequestLogListParams {
|
|
|
312
313
|
/**
|
|
313
314
|
* Filter by the request host.
|
|
314
315
|
*
|
|
315
|
-
* Typically `api.
|
|
316
|
+
* Typically `api.openmrp.ai`.
|
|
316
317
|
*/
|
|
317
318
|
hosts?: Array<string>;
|
|
318
319
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-logs.d.ts","sourceRoot":"","sources":["../../src/resources/core/request-logs.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,IAAI,CACF,KAAK,GAAE,oBAAoB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC;IAI7B;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,KAAK,GAAE,wBAAwB,GAAG,IAAI,GAAG,SAAc,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,UAAU,CAAC;CAG1B;AAED;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;OAIG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;;;;;;OAOG;IACH,MAAM,EAAE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,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -10,8 +10,8 @@ export declare class PaymentTerms extends APIResource {
|
|
|
10
10
|
/**
|
|
11
11
|
* Returns a paginated list of payment terms.
|
|
12
12
|
*
|
|
13
|
-
* The list includes both payment terms created by your account and
|
|
14
|
-
* system defaults.
|
|
13
|
+
* The list includes both payment terms created by your account and
|
|
14
|
+
* OpenMRP-provided system defaults.
|
|
15
15
|
*
|
|
16
16
|
* This endpoint requires the permission: `payment_terms:read`.
|
|
17
17
|
*
|
|
@@ -10,8 +10,8 @@ export declare class PaymentTerms extends APIResource {
|
|
|
10
10
|
/**
|
|
11
11
|
* Returns a paginated list of payment terms.
|
|
12
12
|
*
|
|
13
|
-
* The list includes both payment terms created by your account and
|
|
14
|
-
* system defaults.
|
|
13
|
+
* The list includes both payment terms created by your account and
|
|
14
|
+
* OpenMRP-provided system defaults.
|
|
15
15
|
*
|
|
16
16
|
* This endpoint requires the permission: `payment_terms:read`.
|
|
17
17
|
*
|