@openrouter/sdk 0.0.0-beta.37 → 0.0.0-beta.38
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/dist/commonjs/funcs/betaResponsesSend.d.ts +2 -2
- package/dist/commonjs/funcs/betaResponsesSend.d.ts.map +1 -1
- package/dist/commonjs/funcs/betaResponsesSend.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/createapikeydata.d.ts +120 -0
- package/dist/commonjs/models/createapikeydata.d.ts.map +1 -0
- package/dist/commonjs/models/createapikeydata.js +134 -0
- package/dist/commonjs/models/createapikeydata.js.map +1 -0
- package/dist/commonjs/models/getapikeydata.d.ts +120 -0
- package/dist/commonjs/models/getapikeydata.d.ts.map +1 -0
- package/dist/commonjs/models/getapikeydata.js +134 -0
- package/dist/commonjs/models/getapikeydata.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +4 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +4 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/keyinfo.d.ts +8 -8
- package/dist/commonjs/models/listapikeysdata.d.ts +117 -0
- package/dist/commonjs/models/listapikeysdata.d.ts.map +1 -0
- package/dist/commonjs/models/listapikeysdata.js +134 -0
- package/dist/commonjs/models/listapikeysdata.js.map +1 -0
- package/dist/commonjs/models/operations/create.d.ts +43 -68
- package/dist/commonjs/models/operations/create.d.ts.map +1 -1
- package/dist/commonjs/models/operations/create.js +31 -54
- package/dist/commonjs/models/operations/create.js.map +1 -1
- package/dist/commonjs/models/operations/getapikey.d.ts +3 -68
- package/dist/commonjs/models/operations/getapikey.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getapikey.js +4 -55
- package/dist/commonjs/models/operations/getapikey.js.map +1 -1
- package/dist/commonjs/models/operations/listapikeys.d.ts +3 -65
- package/dist/commonjs/models/operations/listapikeys.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listapikeys.js +4 -54
- package/dist/commonjs/models/operations/listapikeys.js.map +1 -1
- package/dist/commonjs/models/operations/update.d.ts +43 -68
- package/dist/commonjs/models/operations/update.d.ts.map +1 -1
- package/dist/commonjs/models/operations/update.js +31 -54
- package/dist/commonjs/models/operations/update.js.map +1 -1
- package/dist/commonjs/models/responsesoutputitemreasoning.d.ts +3 -0
- package/dist/commonjs/models/responsesoutputitemreasoning.d.ts.map +1 -1
- package/dist/commonjs/models/responsesoutputitemreasoning.js +1 -0
- package/dist/commonjs/models/responsesoutputitemreasoning.js.map +1 -1
- package/dist/commonjs/models/updateapikeydata.d.ts +120 -0
- package/dist/commonjs/models/updateapikeydata.d.ts.map +1 -0
- package/dist/commonjs/models/updateapikeydata.js +134 -0
- package/dist/commonjs/models/updateapikeydata.js.map +1 -0
- package/dist/commonjs/sdk/responses.d.ts +2 -2
- package/dist/commonjs/sdk/responses.d.ts.map +1 -1
- package/dist/esm/funcs/betaResponsesSend.d.ts +2 -2
- package/dist/esm/funcs/betaResponsesSend.d.ts.map +1 -1
- package/dist/esm/funcs/betaResponsesSend.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/createapikeydata.d.ts +120 -0
- package/dist/esm/models/createapikeydata.d.ts.map +1 -0
- package/dist/esm/models/createapikeydata.js +96 -0
- package/dist/esm/models/createapikeydata.js.map +1 -0
- package/dist/esm/models/getapikeydata.d.ts +120 -0
- package/dist/esm/models/getapikeydata.d.ts.map +1 -0
- package/dist/esm/models/getapikeydata.js +96 -0
- package/dist/esm/models/getapikeydata.js.map +1 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +4 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/keyinfo.d.ts +8 -8
- package/dist/esm/models/listapikeysdata.d.ts +117 -0
- package/dist/esm/models/listapikeysdata.d.ts.map +1 -0
- package/dist/esm/models/listapikeysdata.js +96 -0
- package/dist/esm/models/listapikeysdata.js.map +1 -0
- package/dist/esm/models/operations/create.d.ts +43 -68
- package/dist/esm/models/operations/create.d.ts.map +1 -1
- package/dist/esm/models/operations/create.js +30 -51
- package/dist/esm/models/operations/create.js.map +1 -1
- package/dist/esm/models/operations/getapikey.d.ts +3 -68
- package/dist/esm/models/operations/getapikey.d.ts.map +1 -1
- package/dist/esm/models/operations/getapikey.js +3 -52
- package/dist/esm/models/operations/getapikey.js.map +1 -1
- package/dist/esm/models/operations/listapikeys.d.ts +3 -65
- package/dist/esm/models/operations/listapikeys.d.ts.map +1 -1
- package/dist/esm/models/operations/listapikeys.js +3 -51
- package/dist/esm/models/operations/listapikeys.js.map +1 -1
- package/dist/esm/models/operations/update.d.ts +43 -68
- package/dist/esm/models/operations/update.d.ts.map +1 -1
- package/dist/esm/models/operations/update.js +30 -51
- package/dist/esm/models/operations/update.js.map +1 -1
- package/dist/esm/models/responsesoutputitemreasoning.d.ts +3 -0
- package/dist/esm/models/responsesoutputitemreasoning.d.ts.map +1 -1
- package/dist/esm/models/responsesoutputitemreasoning.js +1 -0
- package/dist/esm/models/responsesoutputitemreasoning.js.map +1 -1
- package/dist/esm/models/updateapikeydata.d.ts +120 -0
- package/dist/esm/models/updateapikeydata.d.ts.map +1 -0
- package/dist/esm/models/updateapikeydata.js +96 -0
- package/dist/esm/models/updateapikeydata.js.map +1 -0
- package/dist/esm/sdk/responses.d.ts +2 -2
- package/dist/esm/sdk/responses.d.ts.map +1 -1
- package/docs/sdks/apikeys/README.md +4 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/betaResponsesSend.ts +2 -2
- package/src/lib/config.ts +3 -3
- package/src/models/createapikeydata.ts +222 -0
- package/src/models/getapikeydata.ts +218 -0
- package/src/models/index.ts +4 -0
- package/src/models/keyinfo.ts +8 -8
- package/src/models/listapikeysdata.ts +217 -0
- package/src/models/operations/create.ts +49 -123
- package/src/models/operations/getapikey.ts +5 -124
- package/src/models/operations/listapikeys.ts +5 -122
- package/src/models/operations/update.ts +49 -123
- package/src/models/responsesoutputitemreasoning.ts +1 -0
- package/src/models/updateapikeydata.ts +222 -0
- package/src/sdk/responses.ts +2 -2
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type ListAPIKeysData = {
|
|
5
|
+
/**
|
|
6
|
+
* Unique hash identifier for the API key
|
|
7
|
+
*/
|
|
8
|
+
hash: string;
|
|
9
|
+
/**
|
|
10
|
+
* Name of the API key
|
|
11
|
+
*/
|
|
12
|
+
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* Human-readable label for the API key
|
|
15
|
+
*/
|
|
16
|
+
label: string;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the API key is disabled
|
|
19
|
+
*/
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Spending limit for the API key in USD
|
|
23
|
+
*/
|
|
24
|
+
limit: number | null;
|
|
25
|
+
/**
|
|
26
|
+
* Remaining spending limit in USD
|
|
27
|
+
*/
|
|
28
|
+
limitRemaining: number | null;
|
|
29
|
+
/**
|
|
30
|
+
* Type of limit reset for the API key
|
|
31
|
+
*/
|
|
32
|
+
limitReset: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* Whether to include external BYOK usage in the credit limit
|
|
35
|
+
*/
|
|
36
|
+
includeByokInLimit: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Total OpenRouter credit usage (in USD) for the API key
|
|
39
|
+
*/
|
|
40
|
+
usage: number;
|
|
41
|
+
/**
|
|
42
|
+
* OpenRouter credit usage (in USD) for the current UTC day
|
|
43
|
+
*/
|
|
44
|
+
usageDaily: number;
|
|
45
|
+
/**
|
|
46
|
+
* OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
|
|
47
|
+
*/
|
|
48
|
+
usageWeekly: number;
|
|
49
|
+
/**
|
|
50
|
+
* OpenRouter credit usage (in USD) for the current UTC month
|
|
51
|
+
*/
|
|
52
|
+
usageMonthly: number;
|
|
53
|
+
/**
|
|
54
|
+
* Total external BYOK usage (in USD) for the API key
|
|
55
|
+
*/
|
|
56
|
+
byokUsage: number;
|
|
57
|
+
/**
|
|
58
|
+
* External BYOK usage (in USD) for the current UTC day
|
|
59
|
+
*/
|
|
60
|
+
byokUsageDaily: number;
|
|
61
|
+
/**
|
|
62
|
+
* External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
|
|
63
|
+
*/
|
|
64
|
+
byokUsageWeekly: number;
|
|
65
|
+
/**
|
|
66
|
+
* External BYOK usage (in USD) for current UTC month
|
|
67
|
+
*/
|
|
68
|
+
byokUsageMonthly: number;
|
|
69
|
+
/**
|
|
70
|
+
* ISO 8601 timestamp of when the API key was created
|
|
71
|
+
*/
|
|
72
|
+
createdAt: string;
|
|
73
|
+
/**
|
|
74
|
+
* ISO 8601 timestamp of when the API key was last updated
|
|
75
|
+
*/
|
|
76
|
+
updatedAt: string | null;
|
|
77
|
+
};
|
|
78
|
+
/** @internal */
|
|
79
|
+
export declare const ListAPIKeysData$inboundSchema: z.ZodType<ListAPIKeysData, z.ZodTypeDef, unknown>;
|
|
80
|
+
/** @internal */
|
|
81
|
+
export type ListAPIKeysData$Outbound = {
|
|
82
|
+
hash: string;
|
|
83
|
+
name: string;
|
|
84
|
+
label: string;
|
|
85
|
+
disabled: boolean;
|
|
86
|
+
limit: number | null;
|
|
87
|
+
limit_remaining: number | null;
|
|
88
|
+
limit_reset: string | null;
|
|
89
|
+
include_byok_in_limit: boolean;
|
|
90
|
+
usage: number;
|
|
91
|
+
usage_daily: number;
|
|
92
|
+
usage_weekly: number;
|
|
93
|
+
usage_monthly: number;
|
|
94
|
+
byok_usage: number;
|
|
95
|
+
byok_usage_daily: number;
|
|
96
|
+
byok_usage_weekly: number;
|
|
97
|
+
byok_usage_monthly: number;
|
|
98
|
+
created_at: string;
|
|
99
|
+
updated_at: string | null;
|
|
100
|
+
};
|
|
101
|
+
/** @internal */
|
|
102
|
+
export declare const ListAPIKeysData$outboundSchema: z.ZodType<ListAPIKeysData$Outbound, z.ZodTypeDef, ListAPIKeysData>;
|
|
103
|
+
/**
|
|
104
|
+
* @internal
|
|
105
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
106
|
+
*/
|
|
107
|
+
export declare namespace ListAPIKeysData$ {
|
|
108
|
+
/** @deprecated use `ListAPIKeysData$inboundSchema` instead. */
|
|
109
|
+
const inboundSchema: z.ZodType<ListAPIKeysData, z.ZodTypeDef, unknown>;
|
|
110
|
+
/** @deprecated use `ListAPIKeysData$outboundSchema` instead. */
|
|
111
|
+
const outboundSchema: z.ZodType<ListAPIKeysData$Outbound, z.ZodTypeDef, ListAPIKeysData>;
|
|
112
|
+
/** @deprecated use `ListAPIKeysData$Outbound` instead. */
|
|
113
|
+
type Outbound = ListAPIKeysData$Outbound;
|
|
114
|
+
}
|
|
115
|
+
export declare function listAPIKeysDataToJSON(listAPIKeysData: ListAPIKeysData): string;
|
|
116
|
+
export declare function listAPIKeysDataFromJSON(jsonString: string): SafeParseResult<ListAPIKeysData, SDKValidationError>;
|
|
117
|
+
//# sourceMappingURL=listapikeysdata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listapikeysdata.d.ts","sourceRoot":"","sources":["../../../src/models/listapikeysdata.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH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AAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,OAAO,CACpD,wBAAwB,EACxB,CAAC,CAAC,UAAU,EACZ,eAAe,CAmCf,CAAC;AAEH;;;GAGG;AACH,yBAAiB,gBAAgB,CAAC;IAChC,+DAA+D;IACxD,MAAM,aAAa,mDAAgC,CAAC;IAC3D,gEAAgE;IACzD,MAAM,cAAc,oEAAiC,CAAC;IAC7D,0DAA0D;IAC1D,KAAY,QAAQ,GAAG,wBAAwB,CAAC;CACjD;AAED,wBAAgB,qBAAqB,CACnC,eAAe,EAAE,eAAe,GAC/B,MAAM,CAER;AAED,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAMtD"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod";
|
|
5
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const ListAPIKeysData$inboundSchema = z.object({
|
|
9
|
+
hash: z.string(),
|
|
10
|
+
name: z.string(),
|
|
11
|
+
label: z.string(),
|
|
12
|
+
disabled: z.boolean(),
|
|
13
|
+
limit: z.nullable(z.number()),
|
|
14
|
+
limit_remaining: z.nullable(z.number()),
|
|
15
|
+
limit_reset: z.nullable(z.string()),
|
|
16
|
+
include_byok_in_limit: z.boolean(),
|
|
17
|
+
usage: z.number(),
|
|
18
|
+
usage_daily: z.number(),
|
|
19
|
+
usage_weekly: z.number(),
|
|
20
|
+
usage_monthly: z.number(),
|
|
21
|
+
byok_usage: z.number(),
|
|
22
|
+
byok_usage_daily: z.number(),
|
|
23
|
+
byok_usage_weekly: z.number(),
|
|
24
|
+
byok_usage_monthly: z.number(),
|
|
25
|
+
created_at: z.string(),
|
|
26
|
+
updated_at: z.nullable(z.string()),
|
|
27
|
+
}).transform((v) => {
|
|
28
|
+
return remap$(v, {
|
|
29
|
+
"limit_remaining": "limitRemaining",
|
|
30
|
+
"limit_reset": "limitReset",
|
|
31
|
+
"include_byok_in_limit": "includeByokInLimit",
|
|
32
|
+
"usage_daily": "usageDaily",
|
|
33
|
+
"usage_weekly": "usageWeekly",
|
|
34
|
+
"usage_monthly": "usageMonthly",
|
|
35
|
+
"byok_usage": "byokUsage",
|
|
36
|
+
"byok_usage_daily": "byokUsageDaily",
|
|
37
|
+
"byok_usage_weekly": "byokUsageWeekly",
|
|
38
|
+
"byok_usage_monthly": "byokUsageMonthly",
|
|
39
|
+
"created_at": "createdAt",
|
|
40
|
+
"updated_at": "updatedAt",
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const ListAPIKeysData$outboundSchema = z.object({
|
|
45
|
+
hash: z.string(),
|
|
46
|
+
name: z.string(),
|
|
47
|
+
label: z.string(),
|
|
48
|
+
disabled: z.boolean(),
|
|
49
|
+
limit: z.nullable(z.number()),
|
|
50
|
+
limitRemaining: z.nullable(z.number()),
|
|
51
|
+
limitReset: z.nullable(z.string()),
|
|
52
|
+
includeByokInLimit: z.boolean(),
|
|
53
|
+
usage: z.number(),
|
|
54
|
+
usageDaily: z.number(),
|
|
55
|
+
usageWeekly: z.number(),
|
|
56
|
+
usageMonthly: z.number(),
|
|
57
|
+
byokUsage: z.number(),
|
|
58
|
+
byokUsageDaily: z.number(),
|
|
59
|
+
byokUsageWeekly: z.number(),
|
|
60
|
+
byokUsageMonthly: z.number(),
|
|
61
|
+
createdAt: z.string(),
|
|
62
|
+
updatedAt: z.nullable(z.string()),
|
|
63
|
+
}).transform((v) => {
|
|
64
|
+
return remap$(v, {
|
|
65
|
+
limitRemaining: "limit_remaining",
|
|
66
|
+
limitReset: "limit_reset",
|
|
67
|
+
includeByokInLimit: "include_byok_in_limit",
|
|
68
|
+
usageDaily: "usage_daily",
|
|
69
|
+
usageWeekly: "usage_weekly",
|
|
70
|
+
usageMonthly: "usage_monthly",
|
|
71
|
+
byokUsage: "byok_usage",
|
|
72
|
+
byokUsageDaily: "byok_usage_daily",
|
|
73
|
+
byokUsageWeekly: "byok_usage_weekly",
|
|
74
|
+
byokUsageMonthly: "byok_usage_monthly",
|
|
75
|
+
createdAt: "created_at",
|
|
76
|
+
updatedAt: "updated_at",
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
/**
|
|
80
|
+
* @internal
|
|
81
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
82
|
+
*/
|
|
83
|
+
export var ListAPIKeysData$;
|
|
84
|
+
(function (ListAPIKeysData$) {
|
|
85
|
+
/** @deprecated use `ListAPIKeysData$inboundSchema` instead. */
|
|
86
|
+
ListAPIKeysData$.inboundSchema = ListAPIKeysData$inboundSchema;
|
|
87
|
+
/** @deprecated use `ListAPIKeysData$outboundSchema` instead. */
|
|
88
|
+
ListAPIKeysData$.outboundSchema = ListAPIKeysData$outboundSchema;
|
|
89
|
+
})(ListAPIKeysData$ || (ListAPIKeysData$ = {}));
|
|
90
|
+
export function listAPIKeysDataToJSON(listAPIKeysData) {
|
|
91
|
+
return JSON.stringify(ListAPIKeysData$outboundSchema.parse(listAPIKeysData));
|
|
92
|
+
}
|
|
93
|
+
export function listAPIKeysDataFromJSON(jsonString) {
|
|
94
|
+
return safeParse(jsonString, (x) => ListAPIKeysData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAPIKeysData' from JSON`);
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=listapikeysdata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listapikeysdata.js","sourceRoot":"","sources":["../../../src/models/listapikeysdata.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AA+E9C,gBAAgB;AAChB,MAAM,CAAC,MAAM,6BAA6B,GAItC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7B,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACvC,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACnC,qBAAqB,EAAE,CAAC,CAAC,OAAO,EAAE;IAClC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC7B,kB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EAAE,CAAC,6BAA6B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACzD,6CAA6C,CAC9C,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
+
import * as models from "../index.js";
|
|
6
|
+
/**
|
|
7
|
+
* Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
|
|
8
|
+
*/
|
|
9
|
+
export declare const CreateLimitReset: {
|
|
10
|
+
readonly Daily: "daily";
|
|
11
|
+
readonly Weekly: "weekly";
|
|
12
|
+
readonly Monthly: "monthly";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
|
|
16
|
+
*/
|
|
17
|
+
export type CreateLimitReset = ClosedEnum<typeof CreateLimitReset>;
|
|
4
18
|
export type CreateRequest = {
|
|
5
19
|
/**
|
|
6
20
|
* Name for the new API key
|
|
@@ -11,46 +25,13 @@ export type CreateRequest = {
|
|
|
11
25
|
*/
|
|
12
26
|
limit?: number | null | undefined;
|
|
13
27
|
/**
|
|
14
|
-
*
|
|
15
|
-
*/
|
|
16
|
-
includeByokInLimit?: boolean | undefined;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* The created API key information
|
|
20
|
-
*/
|
|
21
|
-
export type CreateData = {
|
|
22
|
-
/**
|
|
23
|
-
* Unique hash identifier for the API key
|
|
24
|
-
*/
|
|
25
|
-
hash: string;
|
|
26
|
-
/**
|
|
27
|
-
* Name of the API key
|
|
28
|
-
*/
|
|
29
|
-
name: string;
|
|
30
|
-
/**
|
|
31
|
-
* Human-readable label for the API key
|
|
32
|
-
*/
|
|
33
|
-
label: string;
|
|
34
|
-
/**
|
|
35
|
-
* Whether the API key is disabled
|
|
36
|
-
*/
|
|
37
|
-
disabled: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Spending limit for the API key in USD
|
|
40
|
-
*/
|
|
41
|
-
limit: number | null;
|
|
42
|
-
/**
|
|
43
|
-
* Current usage of the API key in USD
|
|
44
|
-
*/
|
|
45
|
-
usage: number;
|
|
46
|
-
/**
|
|
47
|
-
* ISO 8601 timestamp of when the API key was created
|
|
28
|
+
* Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
|
|
48
29
|
*/
|
|
49
|
-
|
|
30
|
+
limitReset?: CreateLimitReset | null | undefined;
|
|
50
31
|
/**
|
|
51
|
-
*
|
|
32
|
+
* Whether to include BYOK usage in the limit
|
|
52
33
|
*/
|
|
53
|
-
|
|
34
|
+
includeByokInLimit?: boolean | undefined;
|
|
54
35
|
};
|
|
55
36
|
/**
|
|
56
37
|
* API key created successfully
|
|
@@ -59,18 +40,41 @@ export type CreateResponse = {
|
|
|
59
40
|
/**
|
|
60
41
|
* The created API key information
|
|
61
42
|
*/
|
|
62
|
-
data:
|
|
43
|
+
data: models.CreateAPIKeyData;
|
|
63
44
|
/**
|
|
64
45
|
* The actual API key string (only shown once)
|
|
65
46
|
*/
|
|
66
47
|
key: string;
|
|
67
48
|
};
|
|
68
49
|
/** @internal */
|
|
50
|
+
export declare const CreateLimitReset$inboundSchema: z.ZodNativeEnum<typeof CreateLimitReset>;
|
|
51
|
+
/** @internal */
|
|
52
|
+
export declare const CreateLimitReset$outboundSchema: z.ZodNativeEnum<typeof CreateLimitReset>;
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
56
|
+
*/
|
|
57
|
+
export declare namespace CreateLimitReset$ {
|
|
58
|
+
/** @deprecated use `CreateLimitReset$inboundSchema` instead. */
|
|
59
|
+
const inboundSchema: z.ZodNativeEnum<{
|
|
60
|
+
readonly Daily: "daily";
|
|
61
|
+
readonly Weekly: "weekly";
|
|
62
|
+
readonly Monthly: "monthly";
|
|
63
|
+
}>;
|
|
64
|
+
/** @deprecated use `CreateLimitReset$outboundSchema` instead. */
|
|
65
|
+
const outboundSchema: z.ZodNativeEnum<{
|
|
66
|
+
readonly Daily: "daily";
|
|
67
|
+
readonly Weekly: "weekly";
|
|
68
|
+
readonly Monthly: "monthly";
|
|
69
|
+
}>;
|
|
70
|
+
}
|
|
71
|
+
/** @internal */
|
|
69
72
|
export declare const CreateRequest$inboundSchema: z.ZodType<CreateRequest, z.ZodTypeDef, unknown>;
|
|
70
73
|
/** @internal */
|
|
71
74
|
export type CreateRequest$Outbound = {
|
|
72
75
|
name: string;
|
|
73
76
|
limit?: number | null | undefined;
|
|
77
|
+
limit_reset?: string | null | undefined;
|
|
74
78
|
include_byok_in_limit?: boolean | undefined;
|
|
75
79
|
};
|
|
76
80
|
/** @internal */
|
|
@@ -90,39 +94,10 @@ export declare namespace CreateRequest$ {
|
|
|
90
94
|
export declare function createRequestToJSON(createRequest: CreateRequest): string;
|
|
91
95
|
export declare function createRequestFromJSON(jsonString: string): SafeParseResult<CreateRequest, SDKValidationError>;
|
|
92
96
|
/** @internal */
|
|
93
|
-
export declare const CreateData$inboundSchema: z.ZodType<CreateData, z.ZodTypeDef, unknown>;
|
|
94
|
-
/** @internal */
|
|
95
|
-
export type CreateData$Outbound = {
|
|
96
|
-
hash: string;
|
|
97
|
-
name: string;
|
|
98
|
-
label: string;
|
|
99
|
-
disabled: boolean;
|
|
100
|
-
limit: number | null;
|
|
101
|
-
usage: number;
|
|
102
|
-
created_at: string;
|
|
103
|
-
updated_at: string | null;
|
|
104
|
-
};
|
|
105
|
-
/** @internal */
|
|
106
|
-
export declare const CreateData$outboundSchema: z.ZodType<CreateData$Outbound, z.ZodTypeDef, CreateData>;
|
|
107
|
-
/**
|
|
108
|
-
* @internal
|
|
109
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
110
|
-
*/
|
|
111
|
-
export declare namespace CreateData$ {
|
|
112
|
-
/** @deprecated use `CreateData$inboundSchema` instead. */
|
|
113
|
-
const inboundSchema: z.ZodType<CreateData, z.ZodTypeDef, unknown>;
|
|
114
|
-
/** @deprecated use `CreateData$outboundSchema` instead. */
|
|
115
|
-
const outboundSchema: z.ZodType<CreateData$Outbound, z.ZodTypeDef, CreateData>;
|
|
116
|
-
/** @deprecated use `CreateData$Outbound` instead. */
|
|
117
|
-
type Outbound = CreateData$Outbound;
|
|
118
|
-
}
|
|
119
|
-
export declare function createDataToJSON(createData: CreateData): string;
|
|
120
|
-
export declare function createDataFromJSON(jsonString: string): SafeParseResult<CreateData, SDKValidationError>;
|
|
121
|
-
/** @internal */
|
|
122
97
|
export declare const CreateResponse$inboundSchema: z.ZodType<CreateResponse, z.ZodTypeDef, unknown>;
|
|
123
98
|
/** @internal */
|
|
124
99
|
export type CreateResponse$Outbound = {
|
|
125
|
-
data:
|
|
100
|
+
data: models.CreateAPIKeyData$Outbound;
|
|
126
101
|
key: string;
|
|
127
102
|
};
|
|
128
103
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/create.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/create.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACl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AAgC,CAAC;IAC5D,yDAAyD;IACzD,KAAY,QAAQ,GAAG,uBAAuB,CAAC;CAChD;AAED,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,cAAc,GAAG,MAAM,CAE3E;AAED,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAMrD"}
|
|
@@ -4,13 +4,39 @@
|
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import * as models from "../index.js";
|
|
8
|
+
/**
|
|
9
|
+
* Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
|
|
10
|
+
*/
|
|
11
|
+
export const CreateLimitReset = {
|
|
12
|
+
Daily: "daily",
|
|
13
|
+
Weekly: "weekly",
|
|
14
|
+
Monthly: "monthly",
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const CreateLimitReset$inboundSchema = z.nativeEnum(CreateLimitReset);
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const CreateLimitReset$outboundSchema = CreateLimitReset$inboundSchema;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
23
|
+
*/
|
|
24
|
+
export var CreateLimitReset$;
|
|
25
|
+
(function (CreateLimitReset$) {
|
|
26
|
+
/** @deprecated use `CreateLimitReset$inboundSchema` instead. */
|
|
27
|
+
CreateLimitReset$.inboundSchema = CreateLimitReset$inboundSchema;
|
|
28
|
+
/** @deprecated use `CreateLimitReset$outboundSchema` instead. */
|
|
29
|
+
CreateLimitReset$.outboundSchema = CreateLimitReset$outboundSchema;
|
|
30
|
+
})(CreateLimitReset$ || (CreateLimitReset$ = {}));
|
|
7
31
|
/** @internal */
|
|
8
32
|
export const CreateRequest$inboundSchema = z.object({
|
|
9
33
|
name: z.string(),
|
|
10
34
|
limit: z.nullable(z.number()).optional(),
|
|
35
|
+
limit_reset: z.nullable(CreateLimitReset$inboundSchema).optional(),
|
|
11
36
|
include_byok_in_limit: z.boolean().optional(),
|
|
12
37
|
}).transform((v) => {
|
|
13
38
|
return remap$(v, {
|
|
39
|
+
"limit_reset": "limitReset",
|
|
14
40
|
"include_byok_in_limit": "includeByokInLimit",
|
|
15
41
|
});
|
|
16
42
|
});
|
|
@@ -18,9 +44,11 @@ export const CreateRequest$inboundSchema = z.object({
|
|
|
18
44
|
export const CreateRequest$outboundSchema = z.object({
|
|
19
45
|
name: z.string(),
|
|
20
46
|
limit: z.nullable(z.number()).optional(),
|
|
47
|
+
limitReset: z.nullable(CreateLimitReset$outboundSchema).optional(),
|
|
21
48
|
includeByokInLimit: z.boolean().optional(),
|
|
22
49
|
}).transform((v) => {
|
|
23
50
|
return remap$(v, {
|
|
51
|
+
limitReset: "limit_reset",
|
|
24
52
|
includeByokInLimit: "include_byok_in_limit",
|
|
25
53
|
});
|
|
26
54
|
});
|
|
@@ -42,62 +70,13 @@ export function createRequestFromJSON(jsonString) {
|
|
|
42
70
|
return safeParse(jsonString, (x) => CreateRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateRequest' from JSON`);
|
|
43
71
|
}
|
|
44
72
|
/** @internal */
|
|
45
|
-
export const CreateData$inboundSchema = z.object({
|
|
46
|
-
hash: z.string(),
|
|
47
|
-
name: z.string(),
|
|
48
|
-
label: z.string(),
|
|
49
|
-
disabled: z.boolean(),
|
|
50
|
-
limit: z.nullable(z.number()),
|
|
51
|
-
usage: z.number(),
|
|
52
|
-
created_at: z.string(),
|
|
53
|
-
updated_at: z.nullable(z.string()),
|
|
54
|
-
}).transform((v) => {
|
|
55
|
-
return remap$(v, {
|
|
56
|
-
"created_at": "createdAt",
|
|
57
|
-
"updated_at": "updatedAt",
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
/** @internal */
|
|
61
|
-
export const CreateData$outboundSchema = z.object({
|
|
62
|
-
hash: z.string(),
|
|
63
|
-
name: z.string(),
|
|
64
|
-
label: z.string(),
|
|
65
|
-
disabled: z.boolean(),
|
|
66
|
-
limit: z.nullable(z.number()),
|
|
67
|
-
usage: z.number(),
|
|
68
|
-
createdAt: z.string(),
|
|
69
|
-
updatedAt: z.nullable(z.string()),
|
|
70
|
-
}).transform((v) => {
|
|
71
|
-
return remap$(v, {
|
|
72
|
-
createdAt: "created_at",
|
|
73
|
-
updatedAt: "updated_at",
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
/**
|
|
77
|
-
* @internal
|
|
78
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
79
|
-
*/
|
|
80
|
-
export var CreateData$;
|
|
81
|
-
(function (CreateData$) {
|
|
82
|
-
/** @deprecated use `CreateData$inboundSchema` instead. */
|
|
83
|
-
CreateData$.inboundSchema = CreateData$inboundSchema;
|
|
84
|
-
/** @deprecated use `CreateData$outboundSchema` instead. */
|
|
85
|
-
CreateData$.outboundSchema = CreateData$outboundSchema;
|
|
86
|
-
})(CreateData$ || (CreateData$ = {}));
|
|
87
|
-
export function createDataToJSON(createData) {
|
|
88
|
-
return JSON.stringify(CreateData$outboundSchema.parse(createData));
|
|
89
|
-
}
|
|
90
|
-
export function createDataFromJSON(jsonString) {
|
|
91
|
-
return safeParse(jsonString, (x) => CreateData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateData' from JSON`);
|
|
92
|
-
}
|
|
93
|
-
/** @internal */
|
|
94
73
|
export const CreateResponse$inboundSchema = z.object({
|
|
95
|
-
data:
|
|
74
|
+
data: models.CreateAPIKeyData$inboundSchema,
|
|
96
75
|
key: z.string(),
|
|
97
76
|
});
|
|
98
77
|
/** @internal */
|
|
99
78
|
export const CreateResponse$outboundSchema = z.object({
|
|
100
|
-
data:
|
|
79
|
+
data: models.CreateAPIKeyData$outboundSchema,
|
|
101
80
|
key: z.string(),
|
|
102
81
|
});
|
|
103
82
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/models/operations/create.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/models/operations/create.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAIjD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;CACV,CAAC;AAuCX,gBAAgB;AAChB,MAAM,CAAC,MAAM,8BAA8B,GAEvC,CAAC,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;AAEnC,gBAAgB;AAChB,MAAM,CAAC,MAAM,+BAA+B,GAExC,8BAA8B,CAAC;AAEnC;;;GAGG;AACH,MAAM,KAAW,iBAAiB,CAKjC;AALD,WAAiB,iBAAiB;IAChC,gEAAgE;IACnD,+BAAa,GAAG,8BAA8B,CAAC;IAC5D,iEAAiE;IACpD,gCAAc,GAAG,+BAA+B,CAAC;AAChE,CAAC,EALgB,iBAAiB,KAAjB,iBAAiB,QAKjC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,2BAA2B,GAIpC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CA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
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
+
import * as models from "../index.js";
|
|
4
5
|
export type GetApiKeyRequest = {
|
|
5
6
|
hash: string;
|
|
6
7
|
};
|
|
7
|
-
/**
|
|
8
|
-
* The API key information
|
|
9
|
-
*/
|
|
10
|
-
export type GetApiKeyData = {
|
|
11
|
-
/**
|
|
12
|
-
* Unique hash identifier for the API key
|
|
13
|
-
*/
|
|
14
|
-
hash: string;
|
|
15
|
-
/**
|
|
16
|
-
* Name of the API key
|
|
17
|
-
*/
|
|
18
|
-
name: string;
|
|
19
|
-
/**
|
|
20
|
-
* Human-readable label for the API key
|
|
21
|
-
*/
|
|
22
|
-
label: string;
|
|
23
|
-
/**
|
|
24
|
-
* Whether the API key is disabled
|
|
25
|
-
*/
|
|
26
|
-
disabled: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Spending limit for the API key in USD
|
|
29
|
-
*/
|
|
30
|
-
limit: number | null;
|
|
31
|
-
/**
|
|
32
|
-
* Current usage of the API key in USD
|
|
33
|
-
*/
|
|
34
|
-
usage: number;
|
|
35
|
-
/**
|
|
36
|
-
* ISO 8601 timestamp of when the API key was created
|
|
37
|
-
*/
|
|
38
|
-
createdAt: string;
|
|
39
|
-
/**
|
|
40
|
-
* ISO 8601 timestamp of when the API key was last updated
|
|
41
|
-
*/
|
|
42
|
-
updatedAt: string | null;
|
|
43
|
-
};
|
|
44
8
|
/**
|
|
45
9
|
* API key details
|
|
46
10
|
*/
|
|
@@ -48,7 +12,7 @@ export type GetApiKeyResponse = {
|
|
|
48
12
|
/**
|
|
49
13
|
* The API key information
|
|
50
14
|
*/
|
|
51
|
-
data:
|
|
15
|
+
data: models.GetAPIKeyData;
|
|
52
16
|
};
|
|
53
17
|
/** @internal */
|
|
54
18
|
export declare const GetApiKeyRequest$inboundSchema: z.ZodType<GetApiKeyRequest, z.ZodTypeDef, unknown>;
|
|
@@ -73,39 +37,10 @@ export declare namespace GetApiKeyRequest$ {
|
|
|
73
37
|
export declare function getApiKeyRequestToJSON(getApiKeyRequest: GetApiKeyRequest): string;
|
|
74
38
|
export declare function getApiKeyRequestFromJSON(jsonString: string): SafeParseResult<GetApiKeyRequest, SDKValidationError>;
|
|
75
39
|
/** @internal */
|
|
76
|
-
export declare const GetApiKeyData$inboundSchema: z.ZodType<GetApiKeyData, z.ZodTypeDef, unknown>;
|
|
77
|
-
/** @internal */
|
|
78
|
-
export type GetApiKeyData$Outbound = {
|
|
79
|
-
hash: string;
|
|
80
|
-
name: string;
|
|
81
|
-
label: string;
|
|
82
|
-
disabled: boolean;
|
|
83
|
-
limit: number | null;
|
|
84
|
-
usage: number;
|
|
85
|
-
created_at: string;
|
|
86
|
-
updated_at: string | null;
|
|
87
|
-
};
|
|
88
|
-
/** @internal */
|
|
89
|
-
export declare const GetApiKeyData$outboundSchema: z.ZodType<GetApiKeyData$Outbound, z.ZodTypeDef, GetApiKeyData>;
|
|
90
|
-
/**
|
|
91
|
-
* @internal
|
|
92
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
93
|
-
*/
|
|
94
|
-
export declare namespace GetApiKeyData$ {
|
|
95
|
-
/** @deprecated use `GetApiKeyData$inboundSchema` instead. */
|
|
96
|
-
const inboundSchema: z.ZodType<GetApiKeyData, z.ZodTypeDef, unknown>;
|
|
97
|
-
/** @deprecated use `GetApiKeyData$outboundSchema` instead. */
|
|
98
|
-
const outboundSchema: z.ZodType<GetApiKeyData$Outbound, z.ZodTypeDef, GetApiKeyData>;
|
|
99
|
-
/** @deprecated use `GetApiKeyData$Outbound` instead. */
|
|
100
|
-
type Outbound = GetApiKeyData$Outbound;
|
|
101
|
-
}
|
|
102
|
-
export declare function getApiKeyDataToJSON(getApiKeyData: GetApiKeyData): string;
|
|
103
|
-
export declare function getApiKeyDataFromJSON(jsonString: string): SafeParseResult<GetApiKeyData, SDKValidationError>;
|
|
104
|
-
/** @internal */
|
|
105
40
|
export declare const GetApiKeyResponse$inboundSchema: z.ZodType<GetApiKeyResponse, z.ZodTypeDef, unknown>;
|
|
106
41
|
/** @internal */
|
|
107
42
|
export type GetApiKeyResponse$Outbound = {
|
|
108
|
-
data:
|
|
43
|
+
data: models.GetAPIKeyData$Outbound;
|
|
109
44
|
};
|
|
110
45
|
/** @internal */
|
|
111
46
|
export declare const GetApiKeyResponse$outboundSchema: z.ZodType<GetApiKeyResponse$Outbound, z.ZodTypeDef, GetApiKeyResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getapikey.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/getapikey.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"getapikey.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/getapikey.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC;CAC5B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,OAAO,CACpD,gBAAgB,EAChB,CAAC,CAAC,UAAU,EACZ,OAAO,CAGP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,gBAAgB;AAChB,eAA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