@allisall/sdk 0.0.0-stage → 0.2.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 (70) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +2 -0
  3. package/README.md +227 -2
  4. package/dist/client.d.ts +121 -0
  5. package/dist/client.js +193 -0
  6. package/dist/decimal.d.ts +20 -0
  7. package/dist/decimal.js +23 -0
  8. package/dist/errors.d.ts +79 -0
  9. package/dist/errors.js +98 -0
  10. package/dist/generated/openapi.d.ts +7724 -0
  11. package/dist/generated/openapi.js +4 -0
  12. package/dist/generated/operations.d.ts +37 -0
  13. package/dist/generated/operations.js +976 -0
  14. package/dist/index.d.ts +10 -0
  15. package/dist/index.js +5 -0
  16. package/dist/ingest.d.ts +28 -0
  17. package/dist/ingest.js +247 -0
  18. package/dist/money.d.ts +57 -0
  19. package/dist/money.js +284 -0
  20. package/dist/multipart.d.ts +27 -0
  21. package/dist/multipart.js +48 -0
  22. package/dist/options.d.ts +50 -0
  23. package/dist/options.js +73 -0
  24. package/dist/pagination.d.ts +55 -0
  25. package/dist/pagination.js +85 -0
  26. package/dist/request.d.ts +117 -0
  27. package/dist/request.js +363 -0
  28. package/dist/resources/agents.d.ts +51 -0
  29. package/dist/resources/agents.js +65 -0
  30. package/dist/resources/analytics.d.ts +42 -0
  31. package/dist/resources/analytics.js +68 -0
  32. package/dist/resources/api-keys.d.ts +54 -0
  33. package/dist/resources/api-keys.js +63 -0
  34. package/dist/resources/calculations.d.ts +78 -0
  35. package/dist/resources/calculations.js +111 -0
  36. package/dist/resources/clients.d.ts +65 -0
  37. package/dist/resources/clients.js +85 -0
  38. package/dist/resources/cost.d.ts +69 -0
  39. package/dist/resources/cost.js +89 -0
  40. package/dist/resources/dashboard.d.ts +24 -0
  41. package/dist/resources/dashboard.js +28 -0
  42. package/dist/resources/events.d.ts +47 -0
  43. package/dist/resources/events.js +69 -0
  44. package/dist/resources/health.d.ts +14 -0
  45. package/dist/resources/health.js +17 -0
  46. package/dist/resources/imports.d.ts +33 -0
  47. package/dist/resources/imports.js +37 -0
  48. package/dist/resources/outcome-types.d.ts +25 -0
  49. package/dist/resources/outcome-types.js +33 -0
  50. package/dist/resources/reports.d.ts +77 -0
  51. package/dist/resources/reports.js +103 -0
  52. package/dist/resources/value-models.d.ts +92 -0
  53. package/dist/resources/value-models.js +126 -0
  54. package/dist/retry.d.ts +18 -0
  55. package/dist/retry.js +105 -0
  56. package/dist/runtime.d.ts +19 -0
  57. package/dist/runtime.js +61 -0
  58. package/dist/share.d.ts +52 -0
  59. package/dist/share.js +60 -0
  60. package/dist/transport.d.ts +102 -0
  61. package/dist/transport.js +269 -0
  62. package/dist/types.d.ts +268 -0
  63. package/dist/types.js +89 -0
  64. package/dist/unicode.d.ts +2 -0
  65. package/dist/unicode.js +11 -0
  66. package/dist/uuid.d.ts +6 -0
  67. package/dist/uuid.js +20 -0
  68. package/dist/version.d.ts +2 -0
  69. package/dist/version.js +2 -0
  70. package/package.json +40 -4
@@ -0,0 +1,4 @@
1
+ // Generated from the API's OpenAPI document by scripts/generate.mjs.
2
+ // Never edit this file by hand: change the document or the script, and
3
+ // regenerate.
4
+ export {};
@@ -0,0 +1,37 @@
1
+ import type { operations } from "./openapi.js";
2
+ /** The path segment that stands for every item of an array. */
3
+ export declare const ITEMS = "*";
4
+ /** A path to a value in a JSON body: member names, with ITEMS for every item of an array. */
5
+ export type JsonPath = readonly string[];
6
+ /** What the SDK needs to know about one operation, beyond its types. */
7
+ export interface Operation {
8
+ /** The HTTP method. */
9
+ readonly method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
10
+ /** The path template, such as "/v1/clients/{id}". */
11
+ readonly path: string;
12
+ /** Who may call it, from the operation's access policy. */
13
+ readonly access: "KeyOnly" | "KeyOrSession" | "SessionOnly" | "Public" | "ShareToken";
14
+ /** The scope an API key needs, or null when the policy names none. */
15
+ readonly scope: "ingest" | "read" | "write" | null;
16
+ /** Whether it takes an Idempotency-Key. */
17
+ readonly idempotent: boolean;
18
+ /** The list kind, or null when it is not a list. */
19
+ readonly list: "keyset" | "offset" | null;
20
+ /** The request body it takes. */
21
+ readonly body: "none" | "json" | "merge-patch" | "multipart";
22
+ /** The status of its success response. */
23
+ readonly status: number;
24
+ /** The path of every Money value in its request body. */
25
+ readonly requestMoney: readonly JsonPath[];
26
+ /** The path of every Money value in its success response. */
27
+ readonly responseMoney: readonly JsonPath[];
28
+ }
29
+ /**
30
+ * The operations the SDK can call, by operationId. Each must be an operation
31
+ * of the generated types, or the table below fails to compile.
32
+ */
33
+ export type OperationId = Extract<keyof operations, "commitImport" | "createAgent" | "createApiKey" | "createCalculation" | "createClient" | "createCostLineItem" | "createReport" | "createValueModel" | "deleteAgent" | "deleteCalculation" | "deleteClient" | "deleteCostLineItem" | "deleteReport" | "deleteValueModel" | "getAgent" | "getApiKey" | "getCalculation" | "getClient" | "getClientAnomalies" | "getClientCost" | "getClientRoi" | "getClientValue" | "getClientValueModel" | "getCostLineItem" | "getDashboard" | "getHealth" | "getPriceTable" | "getReport" | "getSharedReport" | "getValueModel" | "ingestEvents" | "listAgents" | "listApiKeys" | "listCalculationReports" | "listClientCalculations" | "listClientEvents" | "listClientOutcomeTypes" | "listClients" | "listCostLineItems" | "listOutcomeTypes" | "listRenewals" | "listValueModels" | "listValueTemplates" | "previewImport" | "publishCalculation" | "reopenCalculation" | "revokeApiKey" | "revokeReport" | "setClientAgents" | "setPriceTable" | "setValueModelLineItems" | "shareReport" | "updateAgent" | "updateClient" | "updateCostLineItem" | "updateReport" | "updateValueModel" | "validateCalculation">;
34
+ /** The operation table, one entry per operation the SDK can call. */
35
+ export declare const OPERATIONS: {
36
+ readonly [K in OperationId]: Operation;
37
+ };