@allisall/sdk 0.2.0 → 0.4.0
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/README.md +5 -2
- package/dist/client.d.ts +6 -0
- package/dist/client.js +8 -0
- package/dist/generated/openapi.d.ts +1820 -47
- package/dist/generated/operations.d.ts +6 -1
- package/dist/generated/operations.js +191 -0
- package/dist/import-mapping.d.ts +10 -0
- package/dist/import-mapping.js +20 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/multipart.d.ts +3 -1
- package/dist/request.d.ts +9 -0
- package/dist/request.js +43 -3
- package/dist/resources/agents.d.ts +7 -0
- package/dist/resources/agents.js +7 -0
- package/dist/resources/calculations.d.ts +21 -1
- package/dist/resources/calculations.js +22 -0
- package/dist/resources/clients.d.ts +28 -0
- package/dist/resources/clients.js +28 -0
- package/dist/resources/cost.d.ts +7 -0
- package/dist/resources/cost.js +7 -0
- package/dist/resources/dashboard.d.ts +8 -0
- package/dist/resources/dashboard.js +8 -0
- package/dist/resources/events.d.ts +70 -1
- package/dist/resources/events.js +78 -2
- package/dist/resources/imports.d.ts +24 -1
- package/dist/resources/imports.js +27 -1
- package/dist/resources/onboarding.d.ts +29 -0
- package/dist/resources/onboarding.js +34 -0
- package/dist/resources/reports.d.ts +16 -1
- package/dist/resources/reports.js +17 -0
- package/dist/resources/value-models.d.ts +7 -0
- package/dist/resources/value-models.js +7 -0
- package/dist/resources/workspace.d.ts +15 -0
- package/dist/resources/workspace.js +18 -0
- package/dist/types.d.ts +28 -1
- package/dist/types.js +6 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -89,9 +89,12 @@ const created = await client.clients.create({
|
|
|
89
89
|
});
|
|
90
90
|
|
|
91
91
|
// An update is a merge patch: a member you leave out keeps its value, and
|
|
92
|
-
// null clears it.
|
|
92
|
+
// null clears it. This sets the renewal date to one calendar year after
|
|
93
|
+
// today's UTC date; a date before yesterday in UTC is refused.
|
|
94
|
+
const renewal = new Date();
|
|
95
|
+
renewal.setUTCFullYear(renewal.getUTCFullYear() + 1);
|
|
93
96
|
const updated = await client.clients.update(created.id, {
|
|
94
|
-
renewal_date:
|
|
97
|
+
renewal_date: renewal.toISOString().slice(0, 10),
|
|
95
98
|
});
|
|
96
99
|
console.log(updated.name, updated.renewal_date);
|
|
97
100
|
```
|
package/dist/client.d.ts
CHANGED
|
@@ -8,9 +8,11 @@ import { DashboardOperations } from "./resources/dashboard.js";
|
|
|
8
8
|
import { Events } from "./resources/events.js";
|
|
9
9
|
import { HealthOperations } from "./resources/health.js";
|
|
10
10
|
import { Imports } from "./resources/imports.js";
|
|
11
|
+
import { OnboardingOperations } from "./resources/onboarding.js";
|
|
11
12
|
import { OutcomeTypes } from "./resources/outcome-types.js";
|
|
12
13
|
import { Reports } from "./resources/reports.js";
|
|
13
14
|
import { ValueModels } from "./resources/value-models.js";
|
|
15
|
+
import { WorkspaceOperations } from "./resources/workspace.js";
|
|
14
16
|
import { type FetchLike, type TokenProvider, type TransportConfig } from "./transport.js";
|
|
15
17
|
/** The options of `new Allisall()`. Every one is optional. */
|
|
16
18
|
export interface ClientOptions {
|
|
@@ -106,6 +108,10 @@ export declare class Allisall {
|
|
|
106
108
|
readonly apiKeys: ApiKeys;
|
|
107
109
|
/** The API's liveness. */
|
|
108
110
|
readonly health: HealthOperations;
|
|
111
|
+
/** The workspace the credential belongs to. */
|
|
112
|
+
readonly workspace: WorkspaceOperations;
|
|
113
|
+
/** The guided setup's progress, and the steps skipped in it. */
|
|
114
|
+
readonly onboarding: OnboardingOperations;
|
|
109
115
|
/**
|
|
110
116
|
* @throws {AllisallError} when there is no credential, or both an API key
|
|
111
117
|
* and a token provider; when the base URL is neither an absolute `http`
|
package/dist/client.js
CHANGED
|
@@ -12,9 +12,11 @@ import { DashboardOperations } from "./resources/dashboard.js";
|
|
|
12
12
|
import { Events } from "./resources/events.js";
|
|
13
13
|
import { HealthOperations } from "./resources/health.js";
|
|
14
14
|
import { Imports } from "./resources/imports.js";
|
|
15
|
+
import { OnboardingOperations } from "./resources/onboarding.js";
|
|
15
16
|
import { OutcomeTypes } from "./resources/outcome-types.js";
|
|
16
17
|
import { Reports } from "./resources/reports.js";
|
|
17
18
|
import { ValueModels } from "./resources/value-models.js";
|
|
19
|
+
import { WorkspaceOperations } from "./resources/workspace.js";
|
|
18
20
|
import { globalValue, isBrowser, readEnv, userAgent } from "./runtime.js";
|
|
19
21
|
import { BROWSER_KEY_MESSAGE, isPrintableCredential, } from "./transport.js";
|
|
20
22
|
const DEFAULT_BASE_URL = "https://api.allisai.ai";
|
|
@@ -163,6 +165,10 @@ export class Allisall {
|
|
|
163
165
|
apiKeys;
|
|
164
166
|
/** The API's liveness. */
|
|
165
167
|
health;
|
|
168
|
+
/** The workspace the credential belongs to. */
|
|
169
|
+
workspace;
|
|
170
|
+
/** The guided setup's progress, and the steps skipped in it. */
|
|
171
|
+
onboarding;
|
|
166
172
|
/**
|
|
167
173
|
* @throws {AllisallError} when there is no credential, or both an API key
|
|
168
174
|
* and a token provider; when the base URL is neither an absolute `http`
|
|
@@ -189,5 +195,7 @@ export class Allisall {
|
|
|
189
195
|
this.dashboard = new DashboardOperations(config);
|
|
190
196
|
this.apiKeys = new ApiKeys(config);
|
|
191
197
|
this.health = new HealthOperations(config);
|
|
198
|
+
this.workspace = new WorkspaceOperations(config);
|
|
199
|
+
this.onboarding = new OnboardingOperations(config);
|
|
192
200
|
}
|
|
193
201
|
}
|