@katerai/sdk 0.6.0 → 0.8.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/CHANGELOG.md +34 -0
- package/README.md +23 -16
- package/client.d.mts +10 -13
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -13
- package/client.d.ts.map +1 -1
- package/client.js +37 -15
- package/client.js.map +1 -1
- package/client.mjs +37 -15
- package/client.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -1
- package/internal/utils/log.mjs.map +1 -1
- package/package.json +2 -2
- package/resources/index.d.mts +0 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +0 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -2
- package/resources/index.mjs.map +1 -1
- package/resources/v1/compiler.d.mts +1116 -0
- package/resources/v1/compiler.d.mts.map +1 -0
- package/resources/v1/compiler.d.ts +1116 -0
- package/resources/v1/compiler.d.ts.map +1 -0
- package/resources/v1/compiler.js +70 -0
- package/resources/v1/compiler.js.map +1 -0
- package/resources/v1/compiler.mjs +66 -0
- package/resources/v1/compiler.mjs.map +1 -0
- package/resources/v1/connections.d.mts +216 -1
- package/resources/v1/connections.d.mts.map +1 -1
- package/resources/v1/connections.d.ts +216 -1
- package/resources/v1/connections.d.ts.map +1 -1
- package/resources/v1/connections.js +22 -2
- package/resources/v1/connections.js.map +1 -1
- package/resources/v1/connections.mjs +20 -1
- package/resources/v1/connections.mjs.map +1 -1
- package/resources/v1/index.d.mts +3 -6
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +3 -6
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +7 -13
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +2 -5
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/tenants/groups.d.mts +5 -5
- package/resources/v1/tenants/groups.d.mts.map +1 -1
- package/resources/v1/tenants/groups.d.ts +5 -5
- package/resources/v1/tenants/groups.d.ts.map +1 -1
- package/resources/v1/tenants/groups.js +1 -1
- package/resources/v1/tenants/groups.js.map +1 -1
- package/resources/v1/tenants/groups.mjs +1 -1
- package/resources/v1/tenants/groups.mjs.map +1 -1
- package/resources/v1/tenants/index.d.mts +2 -4
- package/resources/v1/tenants/index.d.mts.map +1 -1
- package/resources/v1/tenants/index.d.ts +2 -4
- package/resources/v1/tenants/index.d.ts.map +1 -1
- package/resources/v1/tenants/index.js +1 -5
- package/resources/v1/tenants/index.js.map +1 -1
- package/resources/v1/tenants/index.mjs +0 -2
- package/resources/v1/tenants/index.mjs.map +1 -1
- package/resources/v1/tenants/tenants.d.mts +72 -151
- package/resources/v1/tenants/tenants.d.mts.map +1 -1
- package/resources/v1/tenants/tenants.d.ts +72 -151
- package/resources/v1/tenants/tenants.d.ts.map +1 -1
- package/resources/v1/tenants/tenants.js +29 -72
- package/resources/v1/tenants/tenants.js.map +1 -1
- package/resources/v1/tenants/tenants.mjs +29 -72
- package/resources/v1/tenants/tenants.mjs.map +1 -1
- package/resources/v1/v1.d.mts +9 -21
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +9 -21
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +6 -18
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +6 -18
- package/resources/v1/v1.mjs.map +1 -1
- package/src/client.ts +48 -23
- package/src/internal/utils/log.ts +1 -0
- package/src/resources/index.ts +0 -2
- package/src/resources/v1/compiler.ts +1484 -0
- package/src/resources/v1/connections.ts +277 -1
- package/src/resources/v1/index.ts +23 -43
- package/src/resources/v1/tenants/groups.ts +5 -5
- package/src/resources/v1/tenants/index.ts +5 -24
- package/src/resources/v1/tenants/tenants.ts +89 -213
- package/src/resources/v1/v1.ts +49 -101
- 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/resources/healthz.d.mts +0 -16
- package/resources/healthz.d.mts.map +0 -1
- package/resources/healthz.d.ts +0 -16
- package/resources/healthz.d.ts.map +0 -1
- package/resources/healthz.js +0 -15
- package/resources/healthz.js.map +0 -1
- package/resources/healthz.mjs +0 -11
- package/resources/healthz.mjs.map +0 -1
- package/resources/readyz.d.mts +0 -16
- package/resources/readyz.d.mts.map +0 -1
- package/resources/readyz.d.ts +0 -16
- package/resources/readyz.d.ts.map +0 -1
- package/resources/readyz.js +0 -15
- package/resources/readyz.js.map +0 -1
- package/resources/readyz.mjs +0 -11
- package/resources/readyz.mjs.map +0 -1
- package/resources/v1/connections/connections.d.mts +0 -1470
- package/resources/v1/connections/connections.d.mts.map +0 -1
- package/resources/v1/connections/connections.d.ts +0 -1470
- package/resources/v1/connections/connections.d.ts.map +0 -1
- package/resources/v1/connections/connections.js +0 -163
- package/resources/v1/connections/connections.js.map +0 -1
- package/resources/v1/connections/connections.mjs +0 -158
- package/resources/v1/connections/connections.mjs.map +0 -1
- package/resources/v1/connections/databases.d.mts +0 -25
- package/resources/v1/connections/databases.d.mts.map +0 -1
- package/resources/v1/connections/databases.d.ts +0 -25
- package/resources/v1/connections/databases.d.ts.map +0 -1
- package/resources/v1/connections/databases.js +0 -26
- package/resources/v1/connections/databases.js.map +0 -1
- package/resources/v1/connections/databases.mjs +0 -22
- package/resources/v1/connections/databases.mjs.map +0 -1
- package/resources/v1/connections/index.d.mts +0 -5
- package/resources/v1/connections/index.d.mts.map +0 -1
- package/resources/v1/connections/index.d.ts +0 -5
- package/resources/v1/connections/index.d.ts.map +0 -1
- package/resources/v1/connections/index.js +0 -13
- package/resources/v1/connections/index.js.map +0 -1
- package/resources/v1/connections/index.mjs +0 -6
- package/resources/v1/connections/index.mjs.map +0 -1
- package/resources/v1/connections/views.d.mts +0 -77
- package/resources/v1/connections/views.d.mts.map +0 -1
- package/resources/v1/connections/views.d.ts +0 -77
- package/resources/v1/connections/views.d.ts.map +0 -1
- package/resources/v1/connections/views.js +0 -24
- package/resources/v1/connections/views.js.map +0 -1
- package/resources/v1/connections/views.mjs +0 -20
- package/resources/v1/connections/views.mjs.map +0 -1
- package/resources/v1/connections/yaml.d.mts +0 -57
- package/resources/v1/connections/yaml.d.mts.map +0 -1
- package/resources/v1/connections/yaml.d.ts +0 -57
- package/resources/v1/connections/yaml.d.ts.map +0 -1
- package/resources/v1/connections/yaml.js +0 -22
- package/resources/v1/connections/yaml.js.map +0 -1
- package/resources/v1/connections/yaml.mjs +0 -18
- package/resources/v1/connections/yaml.mjs.map +0 -1
- package/resources/v1/github/github.d.mts +0 -99
- package/resources/v1/github/github.d.mts.map +0 -1
- package/resources/v1/github/github.d.ts +0 -99
- package/resources/v1/github/github.d.ts.map +0 -1
- package/resources/v1/github/github.js +0 -49
- package/resources/v1/github/github.js.map +0 -1
- package/resources/v1/github/github.mjs +0 -44
- package/resources/v1/github/github.mjs.map +0 -1
- package/resources/v1/github/index.d.mts +0 -5
- package/resources/v1/github/index.d.mts.map +0 -1
- package/resources/v1/github/index.d.ts +0 -5
- package/resources/v1/github/index.d.ts.map +0 -1
- package/resources/v1/github/index.js +0 -13
- package/resources/v1/github/index.js.map +0 -1
- package/resources/v1/github/index.mjs +0 -6
- package/resources/v1/github/index.mjs.map +0 -1
- package/resources/v1/github/repos.d.mts +0 -54
- package/resources/v1/github/repos.d.mts.map +0 -1
- package/resources/v1/github/repos.d.ts +0 -54
- package/resources/v1/github/repos.d.ts.map +0 -1
- package/resources/v1/github/repos.js +0 -22
- package/resources/v1/github/repos.js.map +0 -1
- package/resources/v1/github/repos.mjs +0 -18
- package/resources/v1/github/repos.mjs.map +0 -1
- package/resources/v1/github/scaffold.d.mts +0 -29
- package/resources/v1/github/scaffold.d.mts.map +0 -1
- package/resources/v1/github/scaffold.d.ts +0 -29
- package/resources/v1/github/scaffold.d.ts.map +0 -1
- package/resources/v1/github/scaffold.js +0 -21
- package/resources/v1/github/scaffold.js.map +0 -1
- package/resources/v1/github/scaffold.mjs +0 -17
- package/resources/v1/github/scaffold.mjs.map +0 -1
- package/resources/v1/github/webhooks.d.mts +0 -28
- package/resources/v1/github/webhooks.d.mts.map +0 -1
- package/resources/v1/github/webhooks.d.ts +0 -28
- package/resources/v1/github/webhooks.d.ts.map +0 -1
- package/resources/v1/github/webhooks.js +0 -27
- package/resources/v1/github/webhooks.js.map +0 -1
- package/resources/v1/github/webhooks.mjs +0 -23
- package/resources/v1/github/webhooks.mjs.map +0 -1
- package/resources/v1/github.d.mts +0 -2
- package/resources/v1/github.d.mts.map +0 -1
- package/resources/v1/github.d.ts +0 -2
- package/resources/v1/github.d.ts.map +0 -1
- package/resources/v1/github.js +0 -6
- package/resources/v1/github.js.map +0 -1
- package/resources/v1/github.mjs +0 -3
- package/resources/v1/github.mjs.map +0 -1
- package/resources/v1/groups/groups.d.mts +0 -162
- package/resources/v1/groups/groups.d.mts.map +0 -1
- package/resources/v1/groups/groups.d.ts +0 -162
- package/resources/v1/groups/groups.d.ts.map +0 -1
- package/resources/v1/groups/groups.js +0 -81
- package/resources/v1/groups/groups.js.map +0 -1
- package/resources/v1/groups/groups.mjs +0 -76
- package/resources/v1/groups/groups.mjs.map +0 -1
- package/resources/v1/groups/index.d.mts +0 -3
- package/resources/v1/groups/index.d.mts.map +0 -1
- package/resources/v1/groups/index.d.ts +0 -3
- package/resources/v1/groups/index.d.ts.map +0 -1
- package/resources/v1/groups/index.js +0 -9
- package/resources/v1/groups/index.js.map +0 -1
- package/resources/v1/groups/index.mjs +0 -4
- package/resources/v1/groups/index.mjs.map +0 -1
- package/resources/v1/groups/tenants.d.mts +0 -55
- package/resources/v1/groups/tenants.d.mts.map +0 -1
- package/resources/v1/groups/tenants.d.ts +0 -55
- package/resources/v1/groups/tenants.d.ts.map +0 -1
- package/resources/v1/groups/tenants.js +0 -39
- package/resources/v1/groups/tenants.js.map +0 -1
- package/resources/v1/groups/tenants.mjs +0 -35
- package/resources/v1/groups/tenants.mjs.map +0 -1
- package/resources/v1/groups.d.mts +0 -2
- package/resources/v1/groups.d.mts.map +0 -1
- package/resources/v1/groups.d.ts +0 -2
- package/resources/v1/groups.d.ts.map +0 -1
- package/resources/v1/groups.js +0 -6
- package/resources/v1/groups.js.map +0 -1
- package/resources/v1/groups.mjs +0 -3
- package/resources/v1/groups.mjs.map +0 -1
- package/resources/v1/me.d.mts +0 -43
- package/resources/v1/me.d.mts.map +0 -1
- package/resources/v1/me.d.ts +0 -43
- package/resources/v1/me.d.ts.map +0 -1
- package/resources/v1/me.js +0 -20
- package/resources/v1/me.js.map +0 -1
- package/resources/v1/me.mjs +0 -16
- package/resources/v1/me.mjs.map +0 -1
- package/resources/v1/org/client.d.mts +0 -53
- package/resources/v1/org/client.d.mts.map +0 -1
- package/resources/v1/org/client.d.ts +0 -53
- package/resources/v1/org/client.d.ts.map +0 -1
- package/resources/v1/org/client.js +0 -25
- package/resources/v1/org/client.js.map +0 -1
- package/resources/v1/org/client.mjs +0 -21
- package/resources/v1/org/client.mjs.map +0 -1
- package/resources/v1/org/index.d.mts +0 -4
- package/resources/v1/org/index.d.mts.map +0 -1
- package/resources/v1/org/index.d.ts +0 -4
- package/resources/v1/org/index.d.ts.map +0 -1
- package/resources/v1/org/index.js +0 -11
- package/resources/v1/org/index.js.map +0 -1
- package/resources/v1/org/index.mjs +0 -5
- package/resources/v1/org/index.mjs.map +0 -1
- package/resources/v1/org/org.d.mts +0 -14
- package/resources/v1/org/org.d.mts.map +0 -1
- package/resources/v1/org/org.d.ts +0 -14
- package/resources/v1/org/org.d.ts.map +0 -1
- package/resources/v1/org/org.js +0 -21
- package/resources/v1/org/org.js.map +0 -1
- package/resources/v1/org/org.mjs +0 -16
- package/resources/v1/org/org.mjs.map +0 -1
- package/resources/v1/org/users.d.mts +0 -87
- package/resources/v1/org/users.d.mts.map +0 -1
- package/resources/v1/org/users.d.ts +0 -87
- package/resources/v1/org/users.d.ts.map +0 -1
- package/resources/v1/org/users.js +0 -60
- package/resources/v1/org/users.js.map +0 -1
- package/resources/v1/org/users.mjs +0 -56
- package/resources/v1/org/users.mjs.map +0 -1
- package/resources/v1/org.d.mts +0 -2
- package/resources/v1/org.d.mts.map +0 -1
- package/resources/v1/org.d.ts +0 -2
- package/resources/v1/org.d.ts.map +0 -1
- package/resources/v1/org.js +0 -6
- package/resources/v1/org.js.map +0 -1
- package/resources/v1/org.mjs +0 -3
- package/resources/v1/org.mjs.map +0 -1
- package/resources/v1/tenants/batch.d.mts +0 -159
- package/resources/v1/tenants/batch.d.mts.map +0 -1
- package/resources/v1/tenants/batch.d.ts +0 -159
- package/resources/v1/tenants/batch.d.ts.map +0 -1
- package/resources/v1/tenants/batch.js +0 -42
- package/resources/v1/tenants/batch.js.map +0 -1
- package/resources/v1/tenants/batch.mjs +0 -38
- package/resources/v1/tenants/batch.mjs.map +0 -1
- package/resources/v1/tenants/import.d.mts +0 -126
- package/resources/v1/tenants/import.d.mts.map +0 -1
- package/resources/v1/tenants/import.d.ts +0 -126
- package/resources/v1/tenants/import.d.ts.map +0 -1
- package/resources/v1/tenants/import.js +0 -50
- package/resources/v1/tenants/import.js.map +0 -1
- package/resources/v1/tenants/import.mjs +0 -46
- package/resources/v1/tenants/import.mjs.map +0 -1
- package/src/resources/healthz.ts +0 -20
- package/src/resources/readyz.ts +0 -20
- package/src/resources/v1/connections/connections.ts +0 -1905
- package/src/resources/v1/connections/databases.ts +0 -42
- package/src/resources/v1/connections/index.ts +0 -33
- package/src/resources/v1/connections/views.ts +0 -112
- package/src/resources/v1/connections/yaml.ts +0 -81
- package/src/resources/v1/github/github.ts +0 -165
- package/src/resources/v1/github/index.ts +0 -20
- package/src/resources/v1/github/repos.ts +0 -85
- package/src/resources/v1/github/scaffold.ts +0 -44
- package/src/resources/v1/github/webhooks.ts +0 -60
- package/src/resources/v1/github.ts +0 -3
- package/src/resources/v1/groups/groups.ts +0 -218
- package/src/resources/v1/groups/index.ts +0 -10
- package/src/resources/v1/groups/tenants.ts +0 -78
- package/src/resources/v1/groups.ts +0 -3
- package/src/resources/v1/me.ts +0 -62
- package/src/resources/v1/org/client.ts +0 -81
- package/src/resources/v1/org/index.ts +0 -11
- package/src/resources/v1/org/org.ts +0 -32
- package/src/resources/v1/org/users.ts +0 -127
- package/src/resources/v1/org.ts +0 -3
- package/src/resources/v1/tenants/batch.ts +0 -200
- package/src/resources/v1/tenants/import.ts +0 -158
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenants.mjs","sourceRoot":"","sources":["../../../src/resources/v1/tenants/tenants.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,
|
|
1
|
+
{"version":3,"file":"tenants.mjs","sourceRoot":"","sources":["../../../src/resources/v1/tenants/tenants.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAsC,MAAM,EAAE;OAI9C,EAAE,2BAA2B,EAAE;AAEtC,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiEhE,CAAC;IA/DC;;;;;;;;OAQG;IACH,gBAAgB,CAAC,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,CACX,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,4BAA4B,EAC5B,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,mBAAmB,CACjB,IAAqC,EACrC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AAoID,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC"}
|
package/resources/v1/v1.d.mts
CHANGED
|
@@ -1,30 +1,18 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import * as ConnectionsAPI from "./connections
|
|
5
|
-
import { Connection,
|
|
6
|
-
import * as GitHubAPI from "./github/github.mjs";
|
|
7
|
-
import { GitHub, GitHubCallbackParams, GitHubCallbackResponse, GitHubConnectParams, GitHubConnectResponse, GitHubGetInstallationLinkResponse, GitHubGetStatusResponse } from "./github/github.mjs";
|
|
8
|
-
import * as GroupsAPI from "./groups/groups.mjs";
|
|
9
|
-
import { GroupCreateParams, GroupDetail, GroupListResponse, GroupUpdateParams, Groups } from "./groups/groups.mjs";
|
|
10
|
-
import * as OrgAPI from "./org/org.mjs";
|
|
11
|
-
import { Org } from "./org/org.mjs";
|
|
2
|
+
import * as CompilerAPI from "./compiler.mjs";
|
|
3
|
+
import { ChartConfig, Compiler, CompilerCompileParams, CompilerCompileResponse, CompilerErrorItem, CompilerResolveParams, CompilerResolveResponse, CompilerValidateParams, CompilerValidateResponse, InlineField, Manifest, ManifestEntry, RefWithLabel, SubqueryCondition } from "./compiler.mjs";
|
|
4
|
+
import * as ConnectionsAPI from "./connections.mjs";
|
|
5
|
+
import { Connection, ConnectionListConnectionsParams, ConnectionListConnectionsResponse, Connections } from "./connections.mjs";
|
|
12
6
|
import * as TenantsAPI from "./tenants/tenants.mjs";
|
|
13
|
-
import {
|
|
7
|
+
import { ImportTenantsResponse, TenantGetTenantsSchemaResponse, TenantImportFromCsvParams, TenantImportFromWarehouseParams, Tenants } from "./tenants/tenants.mjs";
|
|
14
8
|
export declare class V1 extends APIResource {
|
|
9
|
+
compiler: CompilerAPI.Compiler;
|
|
15
10
|
connections: ConnectionsAPI.Connections;
|
|
16
|
-
github: GitHubAPI.GitHub;
|
|
17
|
-
groups: GroupsAPI.Groups;
|
|
18
|
-
me: MeAPI.Me;
|
|
19
|
-
org: OrgAPI.Org;
|
|
20
11
|
tenants: TenantsAPI.Tenants;
|
|
21
12
|
}
|
|
22
13
|
export declare namespace V1 {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export { Me as Me, type ClientUser as ClientUser, type ClientUserRole as ClientUserRole };
|
|
27
|
-
export { Org as Org };
|
|
28
|
-
export { Tenants as Tenants, type CreateTenant as CreateTenant, type Tenant as Tenant, type TenantListResponse as TenantListResponse, type TenantRetrieveSchemaResponse as TenantRetrieveSchemaResponse, type TenantCreateParams as TenantCreateParams, type TenantUpdateParams as TenantUpdateParams, };
|
|
14
|
+
export { Compiler as Compiler, type ChartConfig as ChartConfig, type CompilerErrorItem as CompilerErrorItem, type InlineField as InlineField, type Manifest as Manifest, type ManifestEntry as ManifestEntry, type RefWithLabel as RefWithLabel, type SubqueryCondition as SubqueryCondition, type CompilerCompileResponse as CompilerCompileResponse, type CompilerResolveResponse as CompilerResolveResponse, type CompilerValidateResponse as CompilerValidateResponse, type CompilerCompileParams as CompilerCompileParams, type CompilerResolveParams as CompilerResolveParams, type CompilerValidateParams as CompilerValidateParams, };
|
|
15
|
+
export { Connections as Connections, type Connection as Connection, type ConnectionListConnectionsResponse as ConnectionListConnectionsResponse, type ConnectionListConnectionsParams as ConnectionListConnectionsParams, };
|
|
16
|
+
export { Tenants as Tenants, type ImportTenantsResponse as ImportTenantsResponse, type TenantGetTenantsSchemaResponse as TenantGetTenantsSchemaResponse, type TenantImportFromCsvParams as TenantImportFromCsvParams, type TenantImportFromWarehouseParams as TenantImportFromWarehouseParams, };
|
|
29
17
|
}
|
|
30
18
|
//# sourceMappingURL=v1.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.d.mts","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,
|
|
1
|
+
{"version":3,"file":"v1.d.mts","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EACL,WAAW,EACX,QAAQ,EACR,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,WAAW,EACX,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,iBAAiB,EAClB;OACM,KAAK,cAAc;OACnB,EACL,UAAU,EACV,+BAA+B,EAC/B,iCAAiC,EACjC,WAAW,EACZ;OACM,KAAK,UAAU;OACf,EACL,qBAAqB,EACrB,8BAA8B,EAC9B,yBAAyB,EACzB,+BAA+B,EAC/B,OAAO,EACR;AAED,qBAAa,EAAG,SAAQ,WAAW;IACjC,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IACxE,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;IACvF,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;CACpE;AAMD,MAAM,CAAC,OAAO,WAAW,EAAE,CAAC;IAC1B,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
package/resources/v1/v1.d.ts
CHANGED
|
@@ -1,30 +1,18 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import * as ConnectionsAPI from "./connections
|
|
5
|
-
import { Connection,
|
|
6
|
-
import * as GitHubAPI from "./github/github.js";
|
|
7
|
-
import { GitHub, GitHubCallbackParams, GitHubCallbackResponse, GitHubConnectParams, GitHubConnectResponse, GitHubGetInstallationLinkResponse, GitHubGetStatusResponse } from "./github/github.js";
|
|
8
|
-
import * as GroupsAPI from "./groups/groups.js";
|
|
9
|
-
import { GroupCreateParams, GroupDetail, GroupListResponse, GroupUpdateParams, Groups } from "./groups/groups.js";
|
|
10
|
-
import * as OrgAPI from "./org/org.js";
|
|
11
|
-
import { Org } from "./org/org.js";
|
|
2
|
+
import * as CompilerAPI from "./compiler.js";
|
|
3
|
+
import { ChartConfig, Compiler, CompilerCompileParams, CompilerCompileResponse, CompilerErrorItem, CompilerResolveParams, CompilerResolveResponse, CompilerValidateParams, CompilerValidateResponse, InlineField, Manifest, ManifestEntry, RefWithLabel, SubqueryCondition } from "./compiler.js";
|
|
4
|
+
import * as ConnectionsAPI from "./connections.js";
|
|
5
|
+
import { Connection, ConnectionListConnectionsParams, ConnectionListConnectionsResponse, Connections } from "./connections.js";
|
|
12
6
|
import * as TenantsAPI from "./tenants/tenants.js";
|
|
13
|
-
import {
|
|
7
|
+
import { ImportTenantsResponse, TenantGetTenantsSchemaResponse, TenantImportFromCsvParams, TenantImportFromWarehouseParams, Tenants } from "./tenants/tenants.js";
|
|
14
8
|
export declare class V1 extends APIResource {
|
|
9
|
+
compiler: CompilerAPI.Compiler;
|
|
15
10
|
connections: ConnectionsAPI.Connections;
|
|
16
|
-
github: GitHubAPI.GitHub;
|
|
17
|
-
groups: GroupsAPI.Groups;
|
|
18
|
-
me: MeAPI.Me;
|
|
19
|
-
org: OrgAPI.Org;
|
|
20
11
|
tenants: TenantsAPI.Tenants;
|
|
21
12
|
}
|
|
22
13
|
export declare namespace V1 {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export { Me as Me, type ClientUser as ClientUser, type ClientUserRole as ClientUserRole };
|
|
27
|
-
export { Org as Org };
|
|
28
|
-
export { Tenants as Tenants, type CreateTenant as CreateTenant, type Tenant as Tenant, type TenantListResponse as TenantListResponse, type TenantRetrieveSchemaResponse as TenantRetrieveSchemaResponse, type TenantCreateParams as TenantCreateParams, type TenantUpdateParams as TenantUpdateParams, };
|
|
14
|
+
export { Compiler as Compiler, type ChartConfig as ChartConfig, type CompilerErrorItem as CompilerErrorItem, type InlineField as InlineField, type Manifest as Manifest, type ManifestEntry as ManifestEntry, type RefWithLabel as RefWithLabel, type SubqueryCondition as SubqueryCondition, type CompilerCompileResponse as CompilerCompileResponse, type CompilerResolveResponse as CompilerResolveResponse, type CompilerValidateResponse as CompilerValidateResponse, type CompilerCompileParams as CompilerCompileParams, type CompilerResolveParams as CompilerResolveParams, type CompilerValidateParams as CompilerValidateParams, };
|
|
15
|
+
export { Connections as Connections, type Connection as Connection, type ConnectionListConnectionsResponse as ConnectionListConnectionsResponse, type ConnectionListConnectionsParams as ConnectionListConnectionsParams, };
|
|
16
|
+
export { Tenants as Tenants, type ImportTenantsResponse as ImportTenantsResponse, type TenantGetTenantsSchemaResponse as TenantGetTenantsSchemaResponse, type TenantImportFromCsvParams as TenantImportFromCsvParams, type TenantImportFromWarehouseParams as TenantImportFromWarehouseParams, };
|
|
29
17
|
}
|
|
30
18
|
//# sourceMappingURL=v1.d.ts.map
|
package/resources/v1/v1.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,
|
|
1
|
+
{"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EACL,WAAW,EACX,QAAQ,EACR,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,WAAW,EACX,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,iBAAiB,EAClB;OACM,KAAK,cAAc;OACnB,EACL,UAAU,EACV,+BAA+B,EAC/B,iCAAiC,EACjC,WAAW,EACZ;OACM,KAAK,UAAU;OACf,EACL,qBAAqB,EACrB,8BAA8B,EAC9B,yBAAyB,EACzB,+BAA+B,EAC/B,OAAO,EACR;AAED,qBAAa,EAAG,SAAQ,WAAW;IACjC,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IACxE,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;IACvF,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;CACpE;AAMD,MAAM,CAAC,OAAO,WAAW,EAAE,CAAC;IAC1B,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
package/resources/v1/v1.js
CHANGED
|
@@ -4,34 +4,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.V1 = void 0;
|
|
5
5
|
const tslib_1 = require("../../internal/tslib.js");
|
|
6
6
|
const resource_1 = require("../../core/resource.js");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const ConnectionsAPI = tslib_1.__importStar(require("./connections
|
|
10
|
-
const connections_1 = require("./connections
|
|
11
|
-
const GitHubAPI = tslib_1.__importStar(require("./github/github.js"));
|
|
12
|
-
const github_1 = require("./github/github.js");
|
|
13
|
-
const GroupsAPI = tslib_1.__importStar(require("./groups/groups.js"));
|
|
14
|
-
const groups_1 = require("./groups/groups.js");
|
|
15
|
-
const OrgAPI = tslib_1.__importStar(require("./org/org.js"));
|
|
16
|
-
const org_1 = require("./org/org.js");
|
|
7
|
+
const CompilerAPI = tslib_1.__importStar(require("./compiler.js"));
|
|
8
|
+
const compiler_1 = require("./compiler.js");
|
|
9
|
+
const ConnectionsAPI = tslib_1.__importStar(require("./connections.js"));
|
|
10
|
+
const connections_1 = require("./connections.js");
|
|
17
11
|
const TenantsAPI = tslib_1.__importStar(require("./tenants/tenants.js"));
|
|
18
12
|
const tenants_1 = require("./tenants/tenants.js");
|
|
19
13
|
class V1 extends resource_1.APIResource {
|
|
20
14
|
constructor() {
|
|
21
15
|
super(...arguments);
|
|
16
|
+
this.compiler = new CompilerAPI.Compiler(this._client);
|
|
22
17
|
this.connections = new ConnectionsAPI.Connections(this._client);
|
|
23
|
-
this.github = new GitHubAPI.GitHub(this._client);
|
|
24
|
-
this.groups = new GroupsAPI.Groups(this._client);
|
|
25
|
-
this.me = new MeAPI.Me(this._client);
|
|
26
|
-
this.org = new OrgAPI.Org(this._client);
|
|
27
18
|
this.tenants = new TenantsAPI.Tenants(this._client);
|
|
28
19
|
}
|
|
29
20
|
}
|
|
30
21
|
exports.V1 = V1;
|
|
22
|
+
V1.Compiler = compiler_1.Compiler;
|
|
31
23
|
V1.Connections = connections_1.Connections;
|
|
32
|
-
V1.GitHub = github_1.GitHub;
|
|
33
|
-
V1.Groups = groups_1.Groups;
|
|
34
|
-
V1.Me = me_1.Me;
|
|
35
|
-
V1.Org = org_1.Org;
|
|
36
24
|
V1.Tenants = tenants_1.Tenants;
|
|
37
25
|
//# sourceMappingURL=v1.js.map
|
package/resources/v1/v1.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,mEAA0C;AAC1C,4CAeoB;AACpB,yEAAgD;AAChD,kDAKuB;AACvB,yEAAgD;AAChD,kDAM2B;AAE3B,MAAa,EAAG,SAAQ,sBAAW;IAAnC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvF,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;CAAA;AAJD,gBAIC;AAED,EAAE,CAAC,QAAQ,GAAG,mBAAQ,CAAC;AACvB,EAAE,CAAC,WAAW,GAAG,yBAAW,CAAC;AAC7B,EAAE,CAAC,OAAO,GAAG,iBAAO,CAAC"}
|
package/resources/v1/v1.mjs
CHANGED
|
@@ -1,32 +1,20 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import * as ConnectionsAPI from "./connections
|
|
6
|
-
import { Connections, } from "./connections
|
|
7
|
-
import * as GitHubAPI from "./github/github.mjs";
|
|
8
|
-
import { GitHub, } from "./github/github.mjs";
|
|
9
|
-
import * as GroupsAPI from "./groups/groups.mjs";
|
|
10
|
-
import { Groups, } from "./groups/groups.mjs";
|
|
11
|
-
import * as OrgAPI from "./org/org.mjs";
|
|
12
|
-
import { Org } from "./org/org.mjs";
|
|
3
|
+
import * as CompilerAPI from "./compiler.mjs";
|
|
4
|
+
import { Compiler, } from "./compiler.mjs";
|
|
5
|
+
import * as ConnectionsAPI from "./connections.mjs";
|
|
6
|
+
import { Connections, } from "./connections.mjs";
|
|
13
7
|
import * as TenantsAPI from "./tenants/tenants.mjs";
|
|
14
8
|
import { Tenants, } from "./tenants/tenants.mjs";
|
|
15
9
|
export class V1 extends APIResource {
|
|
16
10
|
constructor() {
|
|
17
11
|
super(...arguments);
|
|
12
|
+
this.compiler = new CompilerAPI.Compiler(this._client);
|
|
18
13
|
this.connections = new ConnectionsAPI.Connections(this._client);
|
|
19
|
-
this.github = new GitHubAPI.GitHub(this._client);
|
|
20
|
-
this.groups = new GroupsAPI.Groups(this._client);
|
|
21
|
-
this.me = new MeAPI.Me(this._client);
|
|
22
|
-
this.org = new OrgAPI.Org(this._client);
|
|
23
14
|
this.tenants = new TenantsAPI.Tenants(this._client);
|
|
24
15
|
}
|
|
25
16
|
}
|
|
17
|
+
V1.Compiler = Compiler;
|
|
26
18
|
V1.Connections = Connections;
|
|
27
|
-
V1.GitHub = GitHub;
|
|
28
|
-
V1.Groups = Groups;
|
|
29
|
-
V1.Me = Me;
|
|
30
|
-
V1.Org = Org;
|
|
31
19
|
V1.Tenants = Tenants;
|
|
32
20
|
//# sourceMappingURL=v1.mjs.map
|
package/resources/v1/v1.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.mjs","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,
|
|
1
|
+
{"version":3,"file":"v1.mjs","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EAEL,QAAQ,GAaT;OACM,KAAK,cAAc;OACnB,EAIL,WAAW,GACZ;OACM,KAAK,UAAU;OACf,EAKL,OAAO,GACR;AAED,MAAM,OAAO,EAAG,SAAQ,WAAW;IAAnC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvF,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;CAAA;AAED,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACvB,EAAE,CAAC,WAAW,GAAG,WAAW,CAAC;AAC7B,EAAE,CAAC,OAAO,GAAG,OAAO,CAAC"}
|
package/src/client.ts
CHANGED
|
@@ -16,8 +16,6 @@ import * as Errors from './core/error';
|
|
|
16
16
|
import * as Uploads from './core/uploads';
|
|
17
17
|
import * as API from './resources/index';
|
|
18
18
|
import { APIPromise } from './core/api-promise';
|
|
19
|
-
import { Healthz, HealthzCheckResponse } from './resources/healthz';
|
|
20
|
-
import { Readyz, ReadyzCheckResponse } from './resources/readyz';
|
|
21
19
|
import { V1 } from './resources/v1/v1';
|
|
22
20
|
import { type Fetch } from './internal/builtin-types';
|
|
23
21
|
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
|
|
@@ -34,14 +32,14 @@ import { isEmptyObj } from './internal/utils/values';
|
|
|
34
32
|
|
|
35
33
|
export interface ClientOptions {
|
|
36
34
|
/**
|
|
37
|
-
*
|
|
35
|
+
* Defaults to process.env['KATER_API_KEY'].
|
|
38
36
|
*/
|
|
39
37
|
apiKey?: string | null | undefined;
|
|
40
38
|
|
|
41
39
|
/**
|
|
42
|
-
*
|
|
40
|
+
* Defaults to process.env['KATER_AUTH_TOKEN'].
|
|
43
41
|
*/
|
|
44
|
-
|
|
42
|
+
authToken?: string | null | undefined;
|
|
45
43
|
|
|
46
44
|
/**
|
|
47
45
|
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
@@ -117,7 +115,7 @@ export interface ClientOptions {
|
|
|
117
115
|
*/
|
|
118
116
|
export class Kater {
|
|
119
117
|
apiKey: string | null;
|
|
120
|
-
|
|
118
|
+
authToken: string | null;
|
|
121
119
|
|
|
122
120
|
baseURL: string;
|
|
123
121
|
maxRetries: number;
|
|
@@ -135,8 +133,8 @@ export class Kater {
|
|
|
135
133
|
* API Client for interfacing with the Kater API.
|
|
136
134
|
*
|
|
137
135
|
* @param {string | null | undefined} [opts.apiKey=process.env['KATER_API_KEY'] ?? null]
|
|
138
|
-
* @param {string | null | undefined} [opts.
|
|
139
|
-
* @param {string} [opts.baseURL=process.env['KATER_BASE_URL'] ?? https://api.
|
|
136
|
+
* @param {string | null | undefined} [opts.authToken=process.env['KATER_AUTH_TOKEN'] ?? null]
|
|
137
|
+
* @param {string} [opts.baseURL=process.env['KATER_BASE_URL'] ?? https://api.kater.ai] - Override the default base URL for the API.
|
|
140
138
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
141
139
|
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
142
140
|
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -147,14 +145,14 @@ export class Kater {
|
|
|
147
145
|
constructor({
|
|
148
146
|
baseURL = readEnv('KATER_BASE_URL'),
|
|
149
147
|
apiKey = readEnv('KATER_API_KEY') ?? null,
|
|
150
|
-
|
|
148
|
+
authToken = readEnv('KATER_AUTH_TOKEN') ?? null,
|
|
151
149
|
...opts
|
|
152
150
|
}: ClientOptions = {}) {
|
|
153
151
|
const options: ClientOptions = {
|
|
154
152
|
apiKey,
|
|
155
|
-
|
|
153
|
+
authToken,
|
|
156
154
|
...opts,
|
|
157
|
-
baseURL: baseURL || `https://api.
|
|
155
|
+
baseURL: baseURL || `https://api.kater.ai`,
|
|
158
156
|
};
|
|
159
157
|
|
|
160
158
|
this.baseURL = options.baseURL!;
|
|
@@ -175,7 +173,7 @@ export class Kater {
|
|
|
175
173
|
this._options = options;
|
|
176
174
|
|
|
177
175
|
this.apiKey = apiKey;
|
|
178
|
-
this.
|
|
176
|
+
this.authToken = authToken;
|
|
179
177
|
}
|
|
180
178
|
|
|
181
179
|
/**
|
|
@@ -192,7 +190,7 @@ export class Kater {
|
|
|
192
190
|
fetch: this.fetch,
|
|
193
191
|
fetchOptions: this.fetchOptions,
|
|
194
192
|
apiKey: this.apiKey,
|
|
195
|
-
|
|
193
|
+
authToken: this.authToken,
|
|
196
194
|
...options,
|
|
197
195
|
});
|
|
198
196
|
return client;
|
|
@@ -202,7 +200,7 @@ export class Kater {
|
|
|
202
200
|
* Check whether the base URL is set to its default.
|
|
203
201
|
*/
|
|
204
202
|
#baseURLOverridden(): boolean {
|
|
205
|
-
return this.baseURL !== 'https://api.
|
|
203
|
+
return this.baseURL !== 'https://api.kater.ai';
|
|
206
204
|
}
|
|
207
205
|
|
|
208
206
|
protected defaultQuery(): Record<string, string | undefined> | undefined {
|
|
@@ -210,7 +208,41 @@ export class Kater {
|
|
|
210
208
|
}
|
|
211
209
|
|
|
212
210
|
protected validateHeaders({ values, nulls }: NullableHeaders) {
|
|
213
|
-
|
|
211
|
+
if (this.apiKey && values.get('x-api-key')) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
if (nulls.has('x-api-key')) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
if (this.authToken && values.get('authorization')) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
if (nulls.has('authorization')) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
throw new Error(
|
|
226
|
+
'Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-API-Key" or "Authorization" headers to be explicitly omitted',
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
protected async authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined> {
|
|
231
|
+
return buildHeaders([await this.apiKeyAuth(opts), await this.propelAuth(opts)]);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
protected async apiKeyAuth(opts: FinalRequestOptions): Promise<NullableHeaders | undefined> {
|
|
235
|
+
if (this.apiKey == null) {
|
|
236
|
+
return undefined;
|
|
237
|
+
}
|
|
238
|
+
return buildHeaders([{ 'X-API-Key': this.apiKey }]);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
protected async propelAuth(opts: FinalRequestOptions): Promise<NullableHeaders | undefined> {
|
|
242
|
+
if (this.authToken == null) {
|
|
243
|
+
return undefined;
|
|
244
|
+
}
|
|
245
|
+
return buildHeaders([{ Authorization: `Bearer ${this.authToken}` }]);
|
|
214
246
|
}
|
|
215
247
|
|
|
216
248
|
/**
|
|
@@ -651,6 +683,7 @@ export class Kater {
|
|
|
651
683
|
...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}),
|
|
652
684
|
...getPlatformHeaders(),
|
|
653
685
|
},
|
|
686
|
+
await this.authHeaders(options),
|
|
654
687
|
this._options.defaultHeaders,
|
|
655
688
|
bodyHeaders,
|
|
656
689
|
options.headers,
|
|
@@ -724,20 +757,12 @@ export class Kater {
|
|
|
724
757
|
static toFile = Uploads.toFile;
|
|
725
758
|
|
|
726
759
|
v1: API.V1 = new API.V1(this);
|
|
727
|
-
healthz: API.Healthz = new API.Healthz(this);
|
|
728
|
-
readyz: API.Readyz = new API.Readyz(this);
|
|
729
760
|
}
|
|
730
761
|
|
|
731
762
|
Kater.V1 = V1;
|
|
732
|
-
Kater.Healthz = Healthz;
|
|
733
|
-
Kater.Readyz = Readyz;
|
|
734
763
|
|
|
735
764
|
export declare namespace Kater {
|
|
736
765
|
export type RequestOptions = Opts.RequestOptions;
|
|
737
766
|
|
|
738
767
|
export { V1 as V1 };
|
|
739
|
-
|
|
740
|
-
export { Healthz as Healthz, type HealthzCheckResponse as HealthzCheckResponse };
|
|
741
|
-
|
|
742
|
-
export { Readyz as Readyz, type ReadyzCheckResponse as ReadyzCheckResponse };
|
|
743
768
|
}
|
|
@@ -106,6 +106,7 @@ export const formatRequestDetails = (details: {
|
|
|
106
106
|
([name, value]) => [
|
|
107
107
|
name,
|
|
108
108
|
(
|
|
109
|
+
name.toLowerCase() === 'x-api-key' ||
|
|
109
110
|
name.toLowerCase() === 'authorization' ||
|
|
110
111
|
name.toLowerCase() === 'cookie' ||
|
|
111
112
|
name.toLowerCase() === 'set-cookie'
|
package/src/resources/index.ts
CHANGED