@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
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// The `onboarding` operations.
|
|
2
|
+
import { call } from "../request.js";
|
|
3
|
+
/** The `onboarding` operations. */
|
|
4
|
+
export class OnboardingOperations {
|
|
5
|
+
#config;
|
|
6
|
+
constructor(config) {
|
|
7
|
+
this.#config = config;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Reads the guided setup's progress: the five steps in their fixed
|
|
11
|
+
* order, each with whether the workspace's data completes it and when it
|
|
12
|
+
* was skipped, and `current_step`, the first step neither completed nor
|
|
13
|
+
* skipped. This is the read for the guided setup's progress.
|
|
14
|
+
*
|
|
15
|
+
* Needs the `read` scope. Operation `getOnboarding`.
|
|
16
|
+
*/
|
|
17
|
+
get(options) {
|
|
18
|
+
return call(this.#config, "getOnboarding", { options });
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Replaces the set of skipped steps, and resolves with the whole
|
|
22
|
+
* progress. `steps` replaces the whole set: a step left out is no longer
|
|
23
|
+
* skipped, and `[]` clears every skip. A step already skipped keeps its
|
|
24
|
+
* `skipped_at`.
|
|
25
|
+
*
|
|
26
|
+
* Retried on a failure worth retrying, because a repeat leaves the same
|
|
27
|
+
* set.
|
|
28
|
+
*
|
|
29
|
+
* Needs the `write` scope. Operation `setOnboardingSkippedSteps`.
|
|
30
|
+
*/
|
|
31
|
+
setSkippedSteps(body, options) {
|
|
32
|
+
return call(this.#config, "setOnboardingSkippedSteps", { body, options });
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
import type { IdempotentRequestOptions, RequestOptions } from "../options.js";
|
|
2
2
|
import type { PagePromise } from "../pagination.js";
|
|
3
3
|
import type { TransportConfig } from "../transport.js";
|
|
4
|
-
import type { ListCalculationReportsQuery, Report, ReportList, ReportPatch, ReportSummary, ReportWithPreview } from "../types.js";
|
|
4
|
+
import type { ListCalculationReportsQuery, ListReportsQuery, Report, ReportList, ReportPatch, ReportSummary, ReportWithPreview, WorkspaceReportList } from "../types.js";
|
|
5
5
|
/** The `reports` operations. */
|
|
6
6
|
export declare class Reports {
|
|
7
7
|
#private;
|
|
8
8
|
constructor(config: TransportConfig);
|
|
9
|
+
/**
|
|
10
|
+
* Lists the workspace's reports across calculations, newest first, each
|
|
11
|
+
* without its disclosures. Await the result for one page; iterate it with
|
|
12
|
+
* `for await` for every report of every page.
|
|
13
|
+
*
|
|
14
|
+
* Pass `page` for a numbered page: its `body` then holds `page` and
|
|
15
|
+
* `total`. Only that first page is counted; every later page of a walk
|
|
16
|
+
* continues by cursor from it, and its `page` and `total` are `null`. To
|
|
17
|
+
* show another numbered page, call this method again with its `page`
|
|
18
|
+
* rather than `getNextPage()`. A `page` past the end has no items, and the
|
|
19
|
+
* walk ends there.
|
|
20
|
+
*
|
|
21
|
+
* Needs the `read` scope. Operation `listReports`.
|
|
22
|
+
*/
|
|
23
|
+
list(query?: ListReportsQuery, options?: RequestOptions): PagePromise<ReportSummary, WorkspaceReportList>;
|
|
9
24
|
/**
|
|
10
25
|
* Composes a report on a published calculation, with its disclosures
|
|
11
26
|
* taken from the calculation's coverage.
|
|
@@ -7,6 +7,23 @@ export class Reports {
|
|
|
7
7
|
constructor(config) {
|
|
8
8
|
this.#config = config;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Lists the workspace's reports across calculations, newest first, each
|
|
12
|
+
* without its disclosures. Await the result for one page; iterate it with
|
|
13
|
+
* `for await` for every report of every page.
|
|
14
|
+
*
|
|
15
|
+
* Pass `page` for a numbered page: its `body` then holds `page` and
|
|
16
|
+
* `total`. Only that first page is counted; every later page of a walk
|
|
17
|
+
* continues by cursor from it, and its `page` and `total` are `null`. To
|
|
18
|
+
* show another numbered page, call this method again with its `page`
|
|
19
|
+
* rather than `getNextPage()`. A `page` past the end has no items, and the
|
|
20
|
+
* walk ends there.
|
|
21
|
+
*
|
|
22
|
+
* Needs the `read` scope. Operation `listReports`.
|
|
23
|
+
*/
|
|
24
|
+
list(query, options) {
|
|
25
|
+
return callPage(this.#config, "listReports", { query, options });
|
|
26
|
+
}
|
|
10
27
|
/**
|
|
11
28
|
* Composes a report on a published calculation, with its disclosures
|
|
12
29
|
* taken from the calculation's coverage.
|
|
@@ -11,6 +11,13 @@ export declare class ValueModels {
|
|
|
11
11
|
* Lists value models. Await the result for one page; iterate it with
|
|
12
12
|
* `for await` for every value model of every page.
|
|
13
13
|
*
|
|
14
|
+
* Pass `page` for a numbered page: its `body` then holds `page` and
|
|
15
|
+
* `total`. Only that first page is counted; every later page of a walk
|
|
16
|
+
* continues by cursor from it, and its `page` and `total` are `null`. To
|
|
17
|
+
* show another numbered page, call this method again with its `page`
|
|
18
|
+
* rather than `getNextPage()`. A `page` past the end has no items, and the
|
|
19
|
+
* walk ends there.
|
|
20
|
+
*
|
|
14
21
|
* Needs the `read` scope. Operation `listValueModels`.
|
|
15
22
|
*/
|
|
16
23
|
list(query?: ListValueModelsQuery, options?: RequestOptions): PagePromise<ValueModelSummary, ValueModelList>;
|
|
@@ -11,6 +11,13 @@ export class ValueModels {
|
|
|
11
11
|
* Lists value models. Await the result for one page; iterate it with
|
|
12
12
|
* `for await` for every value model of every page.
|
|
13
13
|
*
|
|
14
|
+
* Pass `page` for a numbered page: its `body` then holds `page` and
|
|
15
|
+
* `total`. Only that first page is counted; every later page of a walk
|
|
16
|
+
* continues by cursor from it, and its `page` and `total` are `null`. To
|
|
17
|
+
* show another numbered page, call this method again with its `page`
|
|
18
|
+
* rather than `getNextPage()`. A `page` past the end has no items, and the
|
|
19
|
+
* walk ends there.
|
|
20
|
+
*
|
|
14
21
|
* Needs the `read` scope. Operation `listValueModels`.
|
|
15
22
|
*/
|
|
16
23
|
list(query, options) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RequestOptions } from "../options.js";
|
|
2
|
+
import type { TransportConfig } from "../transport.js";
|
|
3
|
+
import type { Workspace } from "../types.js";
|
|
4
|
+
/** The `workspace` operations. */
|
|
5
|
+
export declare class WorkspaceOperations {
|
|
6
|
+
#private;
|
|
7
|
+
constructor(config: TransportConfig);
|
|
8
|
+
/**
|
|
9
|
+
* Reads the workspace the credential belongs to: its name, its currency
|
|
10
|
+
* and when it was created.
|
|
11
|
+
*
|
|
12
|
+
* Needs the `read` scope. Operation `getWorkspace`.
|
|
13
|
+
*/
|
|
14
|
+
get(options?: RequestOptions): Promise<Workspace>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// The `workspace` operations.
|
|
2
|
+
import { call } from "../request.js";
|
|
3
|
+
/** The `workspace` operations. */
|
|
4
|
+
export class WorkspaceOperations {
|
|
5
|
+
#config;
|
|
6
|
+
constructor(config) {
|
|
7
|
+
this.#config = config;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Reads the workspace the credential belongs to: its name, its currency
|
|
11
|
+
* and when it was created.
|
|
12
|
+
*
|
|
13
|
+
* Needs the `read` scope. Operation `getWorkspace`.
|
|
14
|
+
*/
|
|
15
|
+
get(options) {
|
|
16
|
+
return call(this.#config, "getWorkspace", { options });
|
|
17
|
+
}
|
|
18
|
+
}
|
package/dist/types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ type Schemas = components["schemas"];
|
|
|
7
7
|
*/
|
|
8
8
|
export type QueryOf<K extends keyof operations> = NonNullable<operations[K]["parameters"]["query"]>;
|
|
9
9
|
/** The known request-level error codes, in the API's catalogue order. */
|
|
10
|
-
export declare const ERROR_CODES: readonly ["invalid_json", "validation_failed", "unauthenticated", "insufficient_scope", "session_required", "account_not_provisioned", "not_found", "no_active_value_model", "method_not_allowed", "idempotency_key_in_use", "client_key_in_use", "agent_key_in_use", "client_has_events", "client_has_calculations", "agent_has_events", "client_key_has_events", "value_model_exists", "value_model_version_stale", "calculation_transition_invalid", "calculation_not_draft", "calculation_not_published", "report_shared", "report_not_shared", "api_key_revoked", "payload_too_large", "uri_too_long", "unsupported_media_type", "idempotency_key_reused", "rate_limited", "internal_error"];
|
|
10
|
+
export declare const ERROR_CODES: readonly ["invalid_json", "validation_failed", "unauthenticated", "insufficient_scope", "session_required", "account_not_provisioned", "not_found", "no_active_value_model", "method_not_allowed", "idempotency_key_in_use", "client_key_in_use", "agent_key_in_use", "client_has_events", "client_has_calculations", "agent_has_events", "client_key_has_events", "value_model_exists", "value_model_version_stale", "calculation_transition_invalid", "calculation_not_draft", "calculation_not_published", "report_shared", "report_not_shared", "api_key_revoked", "invite_expired", "invite_used", "invite_revoked", "invite_email_mismatch", "email_has_workspace", "payload_too_large", "uri_too_long", "unsupported_media_type", "idempotency_key_reused", "rate_limited", "internal_error", "upstream_failed"];
|
|
11
11
|
/** The known field-level error codes, in the API's catalogue order. */
|
|
12
12
|
export declare const FIELD_ERROR_CODES: readonly ["required", "unknown_field", "immutable", "invalid_type", "invalid_format", "invalid_value", "too_long", "too_many", "out_of_range", "too_precise", "duplicate", "too_large", "mutually_exclusive", "unknown_reference", "client_key_required", "currency_mismatch"];
|
|
13
13
|
/** The event categories. */
|
|
@@ -154,6 +154,10 @@ export type ClientStatus = Schemas["ClientStatus"];
|
|
|
154
154
|
export type AgentStatus = Schemas["AgentStatus"];
|
|
155
155
|
export type ValueModelStatus = Schemas["ValueModelStatus"];
|
|
156
156
|
export type CalculationState = Schemas["CalculationState"];
|
|
157
|
+
export type ReportState = Schemas["ReportState"];
|
|
158
|
+
export type RenewalTerm = Schemas["RenewalTerm"];
|
|
159
|
+
export type RenewalTermFilter = Schemas["RenewalTermFilter"];
|
|
160
|
+
export type RenewalWindow = Schemas["RenewalWindow"];
|
|
157
161
|
export type Scope = Schemas["Scope"];
|
|
158
162
|
export type CostTargetKind = Schemas["CostTargetKind"];
|
|
159
163
|
export type EventSource = Schemas["EventSource"];
|
|
@@ -211,6 +215,11 @@ export type RoiResult = Schemas["RoiResult"];
|
|
|
211
215
|
export type Anomalies = Schemas["Anomalies"];
|
|
212
216
|
export type AttributedEvent = Schemas["AttributedEvent"];
|
|
213
217
|
export type ClientEventList = Schemas["ClientEventList"];
|
|
218
|
+
export type EventList = Schemas["EventList"];
|
|
219
|
+
export type EventSummary = Schemas["EventSummary"];
|
|
220
|
+
export type EventDayCount = Schemas["EventDayCount"];
|
|
221
|
+
export type EventCategoryCount = Schemas["EventCategoryCount"];
|
|
222
|
+
export type EventArrivalList = Schemas["EventArrivalList"];
|
|
214
223
|
export type Checklist = Schemas["Checklist"];
|
|
215
224
|
export type ChecklistInput = Schemas["ChecklistInput"];
|
|
216
225
|
export type CalculationSnapshot = Schemas["CalculationSnapshot"];
|
|
@@ -236,7 +245,12 @@ export type PreviewEvent = Schemas["PreviewEvent"];
|
|
|
236
245
|
export type PreviewRow = Schemas["PreviewRow"];
|
|
237
246
|
export type ImportPreview = Schemas["ImportPreview"];
|
|
238
247
|
export type ImportResult = Schemas["ImportResult"];
|
|
248
|
+
export type ImportSummary = Schemas["ImportSummary"];
|
|
249
|
+
export type Import = Schemas["Import"];
|
|
250
|
+
export type AppliedImportMapping = Schemas["AppliedImportMapping"];
|
|
251
|
+
export type ImportDelimiter = Schemas["ImportDelimiter"];
|
|
239
252
|
export type Health = Schemas["Health"];
|
|
253
|
+
export type ImportList = Schemas["ImportList"];
|
|
240
254
|
export type ClientList = Schemas["ClientList"];
|
|
241
255
|
export type AgentList = Schemas["AgentList"];
|
|
242
256
|
export type ValueModelList = Schemas["ValueModelList"];
|
|
@@ -245,8 +259,19 @@ export type ValueTemplateList = Schemas["ValueTemplateList"];
|
|
|
245
259
|
export type CostLineItemList = Schemas["CostLineItemList"];
|
|
246
260
|
export type CalculationList = Schemas["CalculationList"];
|
|
247
261
|
export type ReportList = Schemas["ReportList"];
|
|
262
|
+
export type WorkspaceCalculationList = Schemas["WorkspaceCalculationList"];
|
|
263
|
+
export type WorkspaceReportList = Schemas["WorkspaceReportList"];
|
|
248
264
|
export type RenewalList = Schemas["RenewalList"];
|
|
249
265
|
export type ApiKeyList = Schemas["ApiKeyList"];
|
|
266
|
+
export type Workspace = Schemas["Workspace"];
|
|
267
|
+
export type OnboardingStep = Schemas["OnboardingStep"];
|
|
268
|
+
export type OnboardingStepProgress = Schemas["OnboardingStepProgress"];
|
|
269
|
+
export type Onboarding = Schemas["Onboarding"];
|
|
270
|
+
export type OnboardingSkippedStepsSet = Schemas["OnboardingSkippedStepsSet"];
|
|
271
|
+
export type ListEventsQuery = QueryOf<"listEvents">;
|
|
272
|
+
export type GetEventSummaryQuery = QueryOf<"getEventSummary">;
|
|
273
|
+
export type ListEventArrivalsQuery = QueryOf<"listEventArrivals">;
|
|
274
|
+
export type ListImportsQuery = QueryOf<"listImports">;
|
|
250
275
|
export type ListClientsQuery = QueryOf<"listClients">;
|
|
251
276
|
export type ListClientOutcomeTypesQuery = QueryOf<"listClientOutcomeTypes">;
|
|
252
277
|
export type GetClientValueQuery = QueryOf<"getClientValue">;
|
|
@@ -261,7 +286,9 @@ export type ListValueModelsQuery = QueryOf<"listValueModels">;
|
|
|
261
286
|
export type ListOutcomeTypesQuery = QueryOf<"listOutcomeTypes">;
|
|
262
287
|
export type ListValueTemplatesQuery = QueryOf<"listValueTemplates">;
|
|
263
288
|
export type ListCostLineItemsQuery = QueryOf<"listCostLineItems">;
|
|
289
|
+
export type ListCalculationsQuery = QueryOf<"listCalculations">;
|
|
264
290
|
export type ListCalculationReportsQuery = QueryOf<"listCalculationReports">;
|
|
291
|
+
export type ListReportsQuery = QueryOf<"listReports">;
|
|
265
292
|
export type GetDashboardQuery = QueryOf<"getDashboard">;
|
|
266
293
|
export type ListRenewalsQuery = QueryOf<"listRenewals">;
|
|
267
294
|
export type ListApiKeysQuery = QueryOf<"listApiKeys">;
|
package/dist/types.js
CHANGED
|
@@ -36,12 +36,18 @@ export const ERROR_CODES = [
|
|
|
36
36
|
"report_shared",
|
|
37
37
|
"report_not_shared",
|
|
38
38
|
"api_key_revoked",
|
|
39
|
+
"invite_expired",
|
|
40
|
+
"invite_used",
|
|
41
|
+
"invite_revoked",
|
|
42
|
+
"invite_email_mismatch",
|
|
43
|
+
"email_has_workspace",
|
|
39
44
|
"payload_too_large",
|
|
40
45
|
"uri_too_long",
|
|
41
46
|
"unsupported_media_type",
|
|
42
47
|
"idempotency_key_reused",
|
|
43
48
|
"rate_limited",
|
|
44
49
|
"internal_error",
|
|
50
|
+
"upstream_failed",
|
|
45
51
|
];
|
|
46
52
|
/** The known field-level error codes, in the API's catalogue order. */
|
|
47
53
|
export const FIELD_ERROR_CODES = [
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** The SDK's version. The release tooling updates it; never edit it by hand. */
|
|
2
|
-
export declare const VERSION = "0.
|
|
2
|
+
export declare const VERSION = "0.4.0";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** The SDK's version. The release tooling updates it; never edit it by hand. */
|
|
2
|
-
export const VERSION = "0.
|
|
2
|
+
export const VERSION = "0.4.0"; // x-release-please-version
|
package/package.json
CHANGED