@allisall/sdk 0.1.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.
Files changed (66) hide show
  1. package/README.md +145 -4
  2. package/dist/client.d.ts +87 -37
  3. package/dist/client.js +144 -73
  4. package/dist/generated/openapi.d.ts +9497 -0
  5. package/dist/generated/openapi.js +4 -0
  6. package/dist/generated/operations.d.ts +42 -0
  7. package/dist/generated/operations.js +1167 -0
  8. package/dist/import-mapping.d.ts +10 -0
  9. package/dist/import-mapping.js +20 -0
  10. package/dist/index.d.ts +8 -2
  11. package/dist/index.js +2 -0
  12. package/dist/ingest.d.ts +1 -1
  13. package/dist/ingest.js +2 -2
  14. package/dist/money.d.ts +57 -0
  15. package/dist/money.js +284 -0
  16. package/dist/multipart.d.ts +29 -0
  17. package/dist/multipart.js +48 -0
  18. package/dist/options.d.ts +50 -0
  19. package/dist/options.js +73 -0
  20. package/dist/pagination.d.ts +55 -0
  21. package/dist/pagination.js +85 -0
  22. package/dist/request.d.ts +126 -0
  23. package/dist/request.js +403 -0
  24. package/dist/resources/agents.d.ts +58 -0
  25. package/dist/resources/agents.js +72 -0
  26. package/dist/resources/analytics.d.ts +42 -0
  27. package/dist/resources/analytics.js +68 -0
  28. package/dist/resources/api-keys.d.ts +54 -0
  29. package/dist/resources/api-keys.js +63 -0
  30. package/dist/resources/calculations.d.ts +98 -0
  31. package/dist/resources/calculations.js +133 -0
  32. package/dist/resources/clients.d.ts +93 -0
  33. package/dist/resources/clients.js +113 -0
  34. package/dist/resources/cost.d.ts +76 -0
  35. package/dist/resources/cost.js +96 -0
  36. package/dist/resources/dashboard.d.ts +32 -0
  37. package/dist/resources/dashboard.js +36 -0
  38. package/dist/resources/events.d.ts +116 -0
  39. package/dist/resources/events.js +145 -0
  40. package/dist/resources/health.d.ts +14 -0
  41. package/dist/resources/health.js +17 -0
  42. package/dist/resources/imports.d.ts +56 -0
  43. package/dist/resources/imports.js +63 -0
  44. package/dist/resources/onboarding.d.ts +29 -0
  45. package/dist/resources/onboarding.js +34 -0
  46. package/dist/resources/outcome-types.d.ts +25 -0
  47. package/dist/resources/outcome-types.js +33 -0
  48. package/dist/resources/reports.d.ts +92 -0
  49. package/dist/resources/reports.js +120 -0
  50. package/dist/resources/value-models.d.ts +99 -0
  51. package/dist/resources/value-models.js +133 -0
  52. package/dist/resources/workspace.d.ts +15 -0
  53. package/dist/resources/workspace.js +18 -0
  54. package/dist/runtime.d.ts +2 -0
  55. package/dist/runtime.js +2 -1
  56. package/dist/share.d.ts +52 -0
  57. package/dist/share.js +60 -0
  58. package/dist/transport.d.ts +54 -5
  59. package/dist/transport.js +81 -32
  60. package/dist/types.d.ts +163 -3
  61. package/dist/types.js +18 -3
  62. package/dist/unicode.d.ts +2 -0
  63. package/dist/unicode.js +11 -0
  64. package/dist/version.d.ts +1 -1
  65. package/dist/version.js +1 -1
  66. package/package.json +4 -3
@@ -0,0 +1,56 @@
1
+ import type { ImportUpload } from "../multipart.js";
2
+ import type { IdempotentRequestOptions, RequestOptions } from "../options.js";
3
+ import type { PagePromise } from "../pagination.js";
4
+ import type { TransportConfig } from "../transport.js";
5
+ import type { Import, ImportList, ImportPreview, ImportResult, ImportSummary, ListImportsQuery } from "../types.js";
6
+ /** The `imports` operations. */
7
+ export declare class Imports {
8
+ #private;
9
+ constructor(config: TransportConfig);
10
+ /**
11
+ * Lists the workspace's imports, newest first, each with its counts.
12
+ * Await the result for one page; iterate it with `for await` for every
13
+ * import 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 `listImports`.
23
+ */
24
+ list(query?: ListImportsQuery, options?: RequestOptions): PagePromise<ImportSummary, ImportList>;
25
+ /**
26
+ * Reads an import, with the mapping it ran with. Pass that mapping to
27
+ * `toImportMapping` to send it as the next import's mapping.
28
+ *
29
+ * Needs the `read` scope. Operation `getImport`.
30
+ */
31
+ get(id: string, options?: RequestOptions): Promise<Import>;
32
+ /**
33
+ * Previews a CSV import: parses, maps and validates the file exactly as
34
+ * `commit` would, and writes nothing.
35
+ *
36
+ * Never retried, although it writes nothing; repeat the call to try
37
+ * again.
38
+ *
39
+ * Needs the `ingest` scope. Operation `previewImport`.
40
+ */
41
+ preview(upload: ImportUpload, options?: RequestOptions): Promise<ImportPreview>;
42
+ /**
43
+ * Imports a CSV file: stores its valid rows and records an import batch.
44
+ * A problem with one row rejects that row only. The result lists the
45
+ * problems of the rejected rows, one `errors` entry per problem, up to the
46
+ * first 1,000; `errors_truncated` says when more were omitted, and the
47
+ * counts always cover the whole file. Events deduplicate as they do on
48
+ * ingest.
49
+ *
50
+ * Every attempt of the call sends one `Idempotency-Key`, so a retry
51
+ * cannot record a second import batch.
52
+ *
53
+ * Needs the `ingest` scope. Operation `commitImport`.
54
+ */
55
+ commit(upload: ImportUpload, options?: IdempotentRequestOptions): Promise<ImportResult>;
56
+ }
@@ -0,0 +1,63 @@
1
+ // The `imports` operations: a CSV file of events, previewed or committed.
2
+ import { call, callPage } from "../request.js";
3
+ /** The `imports` operations. */
4
+ export class Imports {
5
+ #config;
6
+ constructor(config) {
7
+ this.#config = config;
8
+ }
9
+ /**
10
+ * Lists the workspace's imports, newest first, each with its counts.
11
+ * Await the result for one page; iterate it with `for await` for every
12
+ * import 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 `listImports`.
22
+ */
23
+ list(query, options) {
24
+ return callPage(this.#config, "listImports", { query, options });
25
+ }
26
+ /**
27
+ * Reads an import, with the mapping it ran with. Pass that mapping to
28
+ * `toImportMapping` to send it as the next import's mapping.
29
+ *
30
+ * Needs the `read` scope. Operation `getImport`.
31
+ */
32
+ get(id, options) {
33
+ return call(this.#config, "getImport", { path: { id }, options });
34
+ }
35
+ /**
36
+ * Previews a CSV import: parses, maps and validates the file exactly as
37
+ * `commit` would, and writes nothing.
38
+ *
39
+ * Never retried, although it writes nothing; repeat the call to try
40
+ * again.
41
+ *
42
+ * Needs the `ingest` scope. Operation `previewImport`.
43
+ */
44
+ preview(upload, options) {
45
+ return call(this.#config, "previewImport", { body: upload, options });
46
+ }
47
+ /**
48
+ * Imports a CSV file: stores its valid rows and records an import batch.
49
+ * A problem with one row rejects that row only. The result lists the
50
+ * problems of the rejected rows, one `errors` entry per problem, up to the
51
+ * first 1,000; `errors_truncated` says when more were omitted, and the
52
+ * counts always cover the whole file. Events deduplicate as they do on
53
+ * ingest.
54
+ *
55
+ * Every attempt of the call sends one `Idempotency-Key`, so a retry
56
+ * cannot record a second import batch.
57
+ *
58
+ * Needs the `ingest` scope. Operation `commitImport`.
59
+ */
60
+ commit(upload, options) {
61
+ return call(this.#config, "commitImport", { body: upload, options });
62
+ }
63
+ }
@@ -0,0 +1,29 @@
1
+ import type { RequestOptions } from "../options.js";
2
+ import type { TransportConfig } from "../transport.js";
3
+ import type { Onboarding, OnboardingSkippedStepsSet } from "../types.js";
4
+ /** The `onboarding` operations. */
5
+ export declare class OnboardingOperations {
6
+ #private;
7
+ constructor(config: TransportConfig);
8
+ /**
9
+ * Reads the guided setup's progress: the five steps in their fixed
10
+ * order, each with whether the workspace's data completes it and when it
11
+ * was skipped, and `current_step`, the first step neither completed nor
12
+ * skipped. This is the read for the guided setup's progress.
13
+ *
14
+ * Needs the `read` scope. Operation `getOnboarding`.
15
+ */
16
+ get(options?: RequestOptions): Promise<Onboarding>;
17
+ /**
18
+ * Replaces the set of skipped steps, and resolves with the whole
19
+ * progress. `steps` replaces the whole set: a step left out is no longer
20
+ * skipped, and `[]` clears every skip. A step already skipped keeps its
21
+ * `skipped_at`.
22
+ *
23
+ * Retried on a failure worth retrying, because a repeat leaves the same
24
+ * set.
25
+ *
26
+ * Needs the `write` scope. Operation `setOnboardingSkippedSteps`.
27
+ */
28
+ setSkippedSteps(body: OnboardingSkippedStepsSet, options?: RequestOptions): Promise<Onboarding>;
29
+ }
@@ -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
+ }
@@ -0,0 +1,25 @@
1
+ import type { RequestOptions } from "../options.js";
2
+ import type { PagePromise } from "../pagination.js";
3
+ import type { TransportConfig } from "../transport.js";
4
+ import type { ListClientOutcomeTypesQuery, ListOutcomeTypesQuery, OutcomeTypeList, OutcomeTypeUsage } from "../types.js";
5
+ /** The `outcomeTypes` operations. */
6
+ export declare class OutcomeTypes {
7
+ #private;
8
+ constructor(config: TransportConfig);
9
+ /**
10
+ * Lists the workspace's outcome types. Await the result for one page;
11
+ * iterate it with `for await` for every outcome type of every page.
12
+ *
13
+ * Needs the `read` scope. Operation `listOutcomeTypes`.
14
+ */
15
+ list(query?: ListOutcomeTypesQuery, options?: RequestOptions): PagePromise<OutcomeTypeUsage, OutcomeTypeList>;
16
+ /**
17
+ * Lists a client's outcome types. Await the result for one page; iterate
18
+ * it with `for await` for every outcome type of every page.
19
+ *
20
+ * Needs the `read` scope. Operation `listClientOutcomeTypes`.
21
+ *
22
+ * @param clientId - the client's id.
23
+ */
24
+ listForClient(clientId: string, query?: ListClientOutcomeTypesQuery, options?: RequestOptions): PagePromise<OutcomeTypeUsage, OutcomeTypeList>;
25
+ }
@@ -0,0 +1,33 @@
1
+ // The `outcomeTypes` operations.
2
+ import { callPage } from "../request.js";
3
+ /** The `outcomeTypes` operations. */
4
+ export class OutcomeTypes {
5
+ #config;
6
+ constructor(config) {
7
+ this.#config = config;
8
+ }
9
+ /**
10
+ * Lists the workspace's outcome types. Await the result for one page;
11
+ * iterate it with `for await` for every outcome type of every page.
12
+ *
13
+ * Needs the `read` scope. Operation `listOutcomeTypes`.
14
+ */
15
+ list(query, options) {
16
+ return callPage(this.#config, "listOutcomeTypes", { query, options });
17
+ }
18
+ /**
19
+ * Lists a client's outcome types. Await the result for one page; iterate
20
+ * it with `for await` for every outcome type of every page.
21
+ *
22
+ * Needs the `read` scope. Operation `listClientOutcomeTypes`.
23
+ *
24
+ * @param clientId - the client's id.
25
+ */
26
+ listForClient(clientId, query, options) {
27
+ return callPage(this.#config, "listClientOutcomeTypes", {
28
+ path: { id: clientId },
29
+ query,
30
+ options,
31
+ });
32
+ }
33
+ }
@@ -0,0 +1,92 @@
1
+ import type { IdempotentRequestOptions, RequestOptions } from "../options.js";
2
+ import type { PagePromise } from "../pagination.js";
3
+ import type { TransportConfig } from "../transport.js";
4
+ import type { ListCalculationReportsQuery, ListReportsQuery, Report, ReportList, ReportPatch, ReportSummary, ReportWithPreview, WorkspaceReportList } from "../types.js";
5
+ /** The `reports` operations. */
6
+ export declare class Reports {
7
+ #private;
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>;
24
+ /**
25
+ * Composes a report on a published calculation, with its disclosures
26
+ * taken from the calculation's coverage.
27
+ *
28
+ * Every attempt of the call sends one `Idempotency-Key`, so a retry
29
+ * cannot create a second report.
30
+ *
31
+ * Needs the `write` scope. Operation `createReport`.
32
+ *
33
+ * @param calculationId - the calculation's id.
34
+ */
35
+ createForCalculation(calculationId: string, options?: IdempotentRequestOptions): Promise<Report>;
36
+ /**
37
+ * Lists a calculation's reports. Await the result for one page; iterate
38
+ * it with `for await` for every report of every page. Each item is a
39
+ * summary without `disclosures`; `get` reads a report with them.
40
+ *
41
+ * Needs the `read` scope. Operation `listCalculationReports`.
42
+ *
43
+ * @param calculationId - the calculation's id.
44
+ */
45
+ listForCalculation(calculationId: string, query?: ListCalculationReportsQuery, options?: RequestOptions): PagePromise<ReportSummary, ReportList>;
46
+ /**
47
+ * Reads a report.
48
+ *
49
+ * Needs the `read` scope. Operation `getReport`.
50
+ */
51
+ get(id: string, options?: RequestOptions): Promise<ReportWithPreview>;
52
+ /**
53
+ * Edits a report with a merge patch: a member left out keeps its value,
54
+ * `null` clears it, and any other value sets it. An array, such as
55
+ * `disclosures`, replaces the stored one whole.
56
+ *
57
+ * Never retried.
58
+ *
59
+ * Needs the `write` scope. Operation `updateReport`.
60
+ */
61
+ update(id: string, patch: ReportPatch, options?: RequestOptions): Promise<Report>;
62
+ /**
63
+ * Deletes an unshared report. A shared report cannot be deleted; revoke
64
+ * its link instead.
65
+ *
66
+ * A retry after a lost response can answer `404` for a delete that
67
+ * succeeded.
68
+ *
69
+ * Needs the `write` scope. Operation `deleteReport`.
70
+ */
71
+ delete(id: string, options?: RequestOptions): Promise<void>;
72
+ /**
73
+ * Shares a report: mints its share token and seals the report against
74
+ * edits. Anyone holding the token can read the report, so handle it like
75
+ * a secret.
76
+ *
77
+ * Needs a session token: sharing is a human trust step. An API key is
78
+ * refused with `403` `session_required`, as an `ApiError`. Never retried.
79
+ *
80
+ * Operation `shareReport`.
81
+ */
82
+ share(id: string, options?: RequestOptions): Promise<Report>;
83
+ /**
84
+ * Revokes a report's link: its share token stops working.
85
+ *
86
+ * Needs a session token: it undoes a human trust step. An API key is
87
+ * refused with `403` `session_required`, as an `ApiError`. Never retried.
88
+ *
89
+ * Operation `revokeReport`.
90
+ */
91
+ revoke(id: string, options?: RequestOptions): Promise<Report>;
92
+ }
@@ -0,0 +1,120 @@
1
+ // The `reports` operations: a report on a published calculation, and the
2
+ // human steps that share it and revoke its link.
3
+ import { call, callPage } from "../request.js";
4
+ /** The `reports` operations. */
5
+ export class Reports {
6
+ #config;
7
+ constructor(config) {
8
+ this.#config = config;
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
+ }
27
+ /**
28
+ * Composes a report on a published calculation, with its disclosures
29
+ * taken from the calculation's coverage.
30
+ *
31
+ * Every attempt of the call sends one `Idempotency-Key`, so a retry
32
+ * cannot create a second report.
33
+ *
34
+ * Needs the `write` scope. Operation `createReport`.
35
+ *
36
+ * @param calculationId - the calculation's id.
37
+ */
38
+ createForCalculation(calculationId, options) {
39
+ return call(this.#config, "createReport", {
40
+ path: { id: calculationId },
41
+ options,
42
+ });
43
+ }
44
+ /**
45
+ * Lists a calculation's reports. Await the result for one page; iterate
46
+ * it with `for await` for every report of every page. Each item is a
47
+ * summary without `disclosures`; `get` reads a report with them.
48
+ *
49
+ * Needs the `read` scope. Operation `listCalculationReports`.
50
+ *
51
+ * @param calculationId - the calculation's id.
52
+ */
53
+ listForCalculation(calculationId, query, options) {
54
+ return callPage(this.#config, "listCalculationReports", {
55
+ path: { id: calculationId },
56
+ query,
57
+ options,
58
+ });
59
+ }
60
+ /**
61
+ * Reads a report.
62
+ *
63
+ * Needs the `read` scope. Operation `getReport`.
64
+ */
65
+ get(id, options) {
66
+ return call(this.#config, "getReport", { path: { id }, options });
67
+ }
68
+ /**
69
+ * Edits a report with a merge patch: a member left out keeps its value,
70
+ * `null` clears it, and any other value sets it. An array, such as
71
+ * `disclosures`, replaces the stored one whole.
72
+ *
73
+ * Never retried.
74
+ *
75
+ * Needs the `write` scope. Operation `updateReport`.
76
+ */
77
+ update(id, patch, options) {
78
+ return call(this.#config, "updateReport", {
79
+ path: { id },
80
+ body: patch,
81
+ options,
82
+ });
83
+ }
84
+ /**
85
+ * Deletes an unshared report. A shared report cannot be deleted; revoke
86
+ * its link instead.
87
+ *
88
+ * A retry after a lost response can answer `404` for a delete that
89
+ * succeeded.
90
+ *
91
+ * Needs the `write` scope. Operation `deleteReport`.
92
+ */
93
+ delete(id, options) {
94
+ return call(this.#config, "deleteReport", { path: { id }, options });
95
+ }
96
+ /**
97
+ * Shares a report: mints its share token and seals the report against
98
+ * edits. Anyone holding the token can read the report, so handle it like
99
+ * a secret.
100
+ *
101
+ * Needs a session token: sharing is a human trust step. An API key is
102
+ * refused with `403` `session_required`, as an `ApiError`. Never retried.
103
+ *
104
+ * Operation `shareReport`.
105
+ */
106
+ share(id, options) {
107
+ return call(this.#config, "shareReport", { path: { id }, options });
108
+ }
109
+ /**
110
+ * Revokes a report's link: its share token stops working.
111
+ *
112
+ * Needs a session token: it undoes a human trust step. An API key is
113
+ * refused with `403` `session_required`, as an `ApiError`. Never retried.
114
+ *
115
+ * Operation `revokeReport`.
116
+ */
117
+ revoke(id, options) {
118
+ return call(this.#config, "revokeReport", { path: { id }, options });
119
+ }
120
+ }
@@ -0,0 +1,99 @@
1
+ import type { MoneyInput } from "../money.js";
2
+ import type { IdempotentRequestOptions, RequestOptions } from "../options.js";
3
+ import type { PagePromise } from "../pagination.js";
4
+ import type { TransportConfig } from "../transport.js";
5
+ import type { ListValueModelsQuery, ListValueTemplatesQuery, ValueLineItemsSet, ValueModel, ValueModelCreate, ValueModelList, ValueModelPatch, ValueModelSummary, ValueTemplate, ValueTemplateList } from "../types.js";
6
+ /** The `valueModels` operations. */
7
+ export declare class ValueModels {
8
+ #private;
9
+ constructor(config: TransportConfig);
10
+ /**
11
+ * Lists value models. Await the result for one page; iterate it with
12
+ * `for await` for every value model 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 `listValueModels`.
22
+ */
23
+ list(query?: ListValueModelsQuery, options?: RequestOptions): PagePromise<ValueModelSummary, ValueModelList>;
24
+ /**
25
+ * Reads a value model by its own id: any model in the workspace,
26
+ * archived ones included.
27
+ *
28
+ * Needs the `read` scope. Operation `getValueModel`.
29
+ *
30
+ * @param id - the value model's id, not its client's.
31
+ */
32
+ get(id: string, options?: RequestOptions): Promise<ValueModel>;
33
+ /**
34
+ * Reads a client's active value model.
35
+ *
36
+ * Needs the `read` scope. Operation `getClientValueModel`.
37
+ *
38
+ * @param clientId - the client's id.
39
+ */
40
+ getForClient(clientId: string, options?: RequestOptions): Promise<ValueModel>;
41
+ /**
42
+ * Creates a client's value model.
43
+ *
44
+ * Every attempt of the call sends one `Idempotency-Key`, so a retry
45
+ * cannot create a second value model.
46
+ *
47
+ * Needs the `write` scope. Operation `createValueModel`.
48
+ *
49
+ * @param clientId - the client's id.
50
+ */
51
+ createForClient(clientId: string, body: ValueModelCreate, options?: IdempotentRequestOptions): Promise<ValueModel>;
52
+ /**
53
+ * Updates a client's active value model with a merge patch: a member
54
+ * left out keeps its value, `null` clears it, and any other value sets
55
+ * it.
56
+ *
57
+ * Never retried.
58
+ *
59
+ * Needs the `write` scope. Operation `updateValueModel`.
60
+ *
61
+ * @param clientId - the client's id.
62
+ */
63
+ updateForClient(clientId: string, patch: ValueModelPatch, options?: RequestOptions): Promise<ValueModel>;
64
+ /**
65
+ * Deletes a client's active value model.
66
+ *
67
+ * A retry after a lost response can answer `404` for a delete that
68
+ * succeeded.
69
+ *
70
+ * Needs the `write` scope. Operation `deleteValueModel`.
71
+ *
72
+ * @param clientId - the client's id.
73
+ */
74
+ deleteForClient(clientId: string, options?: RequestOptions): Promise<void>;
75
+ /**
76
+ * Replaces the line items of a client's active value model, as a whole
77
+ * set. It is guarded by `version`: a stale version is refused rather
78
+ * than overwriting a co-editor's change.
79
+ *
80
+ * Each `unit_value` takes a `Decimal` or a `number`.
81
+ *
82
+ * Never retried, because the `version` guard refuses a repeat of a write
83
+ * that already landed as a stale version. On a `ConnectionError` the
84
+ * write may have landed: read the value model again for its current
85
+ * `version` before trying again.
86
+ *
87
+ * Needs the `write` scope. Operation `setValueModelLineItems`.
88
+ *
89
+ * @param clientId - the client's id.
90
+ */
91
+ setLineItemsForClient(clientId: string, body: MoneyInput<ValueLineItemsSet>, options?: RequestOptions): Promise<ValueModel>;
92
+ /**
93
+ * Lists value templates. Await the result for one page; iterate it with
94
+ * `for await` for every template of every page.
95
+ *
96
+ * Needs the `read` scope. Operation `listValueTemplates`.
97
+ */
98
+ listTemplates(query?: ListValueTemplatesQuery, options?: RequestOptions): PagePromise<ValueTemplate, ValueTemplateList>;
99
+ }