agentmail 0.4.0 → 0.4.1
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/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/apiKeys/types/ApiKey.d.ts +2 -0
- package/dist/cjs/api/resources/apiKeys/types/CreateApiKeyResponse.d.ts +2 -0
- package/dist/cjs/api/resources/pods/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/pods/client/Client.js +15 -10
- package/dist/cjs/api/resources/pods/resources/apiKeys/client/Client.d.ts +52 -0
- package/dist/cjs/api/resources/pods/resources/apiKeys/client/Client.js +262 -0
- package/dist/cjs/api/resources/pods/resources/apiKeys/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/apiKeys/client/index.js +17 -0
- package/dist/cjs/api/resources/pods/resources/apiKeys/client/requests/ListApiKeysRequest.d.ts +9 -0
- package/dist/cjs/api/resources/pods/resources/apiKeys/client/requests/ListApiKeysRequest.js +3 -0
- package/dist/cjs/api/resources/pods/resources/apiKeys/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/apiKeys/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/pods/resources/apiKeys/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/apiKeys/index.js +17 -0
- package/dist/cjs/api/resources/pods/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/pods/resources/index.js +3 -1
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKey.d.ts +1 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKey.js +1 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyResponse.d.ts +1 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyResponse.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/apiKeys/types/ApiKey.d.mts +2 -0
- package/dist/esm/api/resources/apiKeys/types/CreateApiKeyResponse.d.mts +2 -0
- package/dist/esm/api/resources/pods/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/pods/client/Client.mjs +5 -0
- package/dist/esm/api/resources/pods/resources/apiKeys/client/Client.d.mts +52 -0
- package/dist/esm/api/resources/pods/resources/apiKeys/client/Client.mjs +225 -0
- package/dist/esm/api/resources/pods/resources/apiKeys/client/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/apiKeys/client/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/apiKeys/client/requests/ListApiKeysRequest.d.mts +9 -0
- package/dist/esm/api/resources/pods/resources/apiKeys/client/requests/ListApiKeysRequest.mjs +2 -0
- package/dist/esm/api/resources/pods/resources/apiKeys/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/apiKeys/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/apiKeys/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/apiKeys/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/pods/resources/index.mjs +2 -0
- package/dist/esm/serialization/resources/apiKeys/types/ApiKey.d.mts +1 -0
- package/dist/esm/serialization/resources/apiKeys/types/ApiKey.mjs +1 -0
- package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyResponse.d.mts +1 -0
- package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyResponse.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +1446 -92
- package/dist/llms.txt +3 -2
- package/package.json +1 -1
- package/reference.md +174 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
3
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
4
|
+
import * as AgentMail from "../../../../../index.mjs";
|
|
5
|
+
export declare namespace ApiKeysClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class ApiKeysClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ApiKeysClient.Options>;
|
|
12
|
+
constructor(options?: ApiKeysClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
15
|
+
* @param {AgentMail.CreateApiKeyRequest} request
|
|
16
|
+
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
17
|
+
*
|
|
18
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
19
|
+
* @throws {@link AgentMail.ValidationError}
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* await client.pods.apiKeys.create("pod_id", {
|
|
23
|
+
* name: "name"
|
|
24
|
+
* })
|
|
25
|
+
*/
|
|
26
|
+
create(pod_id: AgentMail.pods.PodId, request: AgentMail.CreateApiKeyRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<AgentMail.CreateApiKeyResponse>;
|
|
27
|
+
private __create;
|
|
28
|
+
/**
|
|
29
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
30
|
+
* @param {AgentMail.pods.ListApiKeysRequest} request
|
|
31
|
+
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
|
+
*
|
|
33
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* await client.pods.apiKeys.list("pod_id")
|
|
37
|
+
*/
|
|
38
|
+
list(pod_id: AgentMail.pods.PodId, request?: AgentMail.pods.ListApiKeysRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListApiKeysResponse>;
|
|
39
|
+
private __list;
|
|
40
|
+
/**
|
|
41
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
42
|
+
* @param {AgentMail.ApiKeyId} api_key
|
|
43
|
+
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
|
+
*
|
|
45
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* await client.pods.apiKeys.delete("pod_id", "api_key")
|
|
49
|
+
*/
|
|
50
|
+
delete(pod_id: AgentMail.pods.PodId, api_key: AgentMail.ApiKeyId, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
51
|
+
private __delete;
|
|
52
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
13
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
14
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../../../errors/index.mjs";
|
|
17
|
+
import * as serializers from "../../../../../../serialization/index.mjs";
|
|
18
|
+
import * as AgentMail from "../../../../../index.mjs";
|
|
19
|
+
export class ApiKeysClient {
|
|
20
|
+
constructor(options = {}) {
|
|
21
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
25
|
+
* @param {AgentMail.CreateApiKeyRequest} request
|
|
26
|
+
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
+
*
|
|
28
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
29
|
+
* @throws {@link AgentMail.ValidationError}
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* await client.pods.apiKeys.create("pod_id", {
|
|
33
|
+
* name: "name"
|
|
34
|
+
* })
|
|
35
|
+
*/
|
|
36
|
+
create(pod_id, request, requestOptions) {
|
|
37
|
+
return core.HttpResponsePromise.fromPromise(this.__create(pod_id, request, requestOptions));
|
|
38
|
+
}
|
|
39
|
+
__create(pod_id, request, requestOptions) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
42
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
43
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
44
|
+
const _response = yield core.fetcher({
|
|
45
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Prod)
|
|
46
|
+
.http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/api-keys`),
|
|
47
|
+
method: "POST",
|
|
48
|
+
headers: _headers,
|
|
49
|
+
contentType: "application/json",
|
|
50
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
51
|
+
requestType: "json",
|
|
52
|
+
body: serializers.CreateApiKeyRequest.jsonOrThrow(request, {
|
|
53
|
+
unrecognizedObjectKeys: "strip",
|
|
54
|
+
omitUndefined: true,
|
|
55
|
+
}),
|
|
56
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
57
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
58
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
59
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
60
|
+
logging: this._options.logging,
|
|
61
|
+
});
|
|
62
|
+
if (_response.ok) {
|
|
63
|
+
return {
|
|
64
|
+
data: serializers.CreateApiKeyResponse.parseOrThrow(_response.body, {
|
|
65
|
+
unrecognizedObjectKeys: "passthrough",
|
|
66
|
+
allowUnrecognizedUnionMembers: true,
|
|
67
|
+
allowUnrecognizedEnumValues: true,
|
|
68
|
+
skipValidation: true,
|
|
69
|
+
breadcrumbsPrefix: ["response"],
|
|
70
|
+
}),
|
|
71
|
+
rawResponse: _response.rawResponse,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
if (_response.error.reason === "status-code") {
|
|
75
|
+
switch (_response.error.statusCode) {
|
|
76
|
+
case 404:
|
|
77
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
78
|
+
unrecognizedObjectKeys: "passthrough",
|
|
79
|
+
allowUnrecognizedUnionMembers: true,
|
|
80
|
+
allowUnrecognizedEnumValues: true,
|
|
81
|
+
skipValidation: true,
|
|
82
|
+
breadcrumbsPrefix: ["response"],
|
|
83
|
+
}), _response.rawResponse);
|
|
84
|
+
case 400:
|
|
85
|
+
throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
|
|
86
|
+
unrecognizedObjectKeys: "passthrough",
|
|
87
|
+
allowUnrecognizedUnionMembers: true,
|
|
88
|
+
allowUnrecognizedEnumValues: true,
|
|
89
|
+
skipValidation: true,
|
|
90
|
+
breadcrumbsPrefix: ["response"],
|
|
91
|
+
}), _response.rawResponse);
|
|
92
|
+
default:
|
|
93
|
+
throw new errors.AgentMailError({
|
|
94
|
+
statusCode: _response.error.statusCode,
|
|
95
|
+
body: _response.error.body,
|
|
96
|
+
rawResponse: _response.rawResponse,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/pods/{pod_id}/api-keys");
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
105
|
+
* @param {AgentMail.pods.ListApiKeysRequest} request
|
|
106
|
+
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
107
|
+
*
|
|
108
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* await client.pods.apiKeys.list("pod_id")
|
|
112
|
+
*/
|
|
113
|
+
list(pod_id, request = {}, requestOptions) {
|
|
114
|
+
return core.HttpResponsePromise.fromPromise(this.__list(pod_id, request, requestOptions));
|
|
115
|
+
}
|
|
116
|
+
__list(pod_id_1) {
|
|
117
|
+
return __awaiter(this, arguments, void 0, function* (pod_id, request = {}, requestOptions) {
|
|
118
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
119
|
+
const { limit, pageToken } = request;
|
|
120
|
+
const _queryParams = {
|
|
121
|
+
limit,
|
|
122
|
+
page_token: pageToken,
|
|
123
|
+
};
|
|
124
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
125
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
126
|
+
const _response = yield core.fetcher({
|
|
127
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Prod)
|
|
128
|
+
.http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/api-keys`),
|
|
129
|
+
method: "GET",
|
|
130
|
+
headers: _headers,
|
|
131
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
132
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
133
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
134
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
135
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
136
|
+
logging: this._options.logging,
|
|
137
|
+
});
|
|
138
|
+
if (_response.ok) {
|
|
139
|
+
return {
|
|
140
|
+
data: serializers.ListApiKeysResponse.parseOrThrow(_response.body, {
|
|
141
|
+
unrecognizedObjectKeys: "passthrough",
|
|
142
|
+
allowUnrecognizedUnionMembers: true,
|
|
143
|
+
allowUnrecognizedEnumValues: true,
|
|
144
|
+
skipValidation: true,
|
|
145
|
+
breadcrumbsPrefix: ["response"],
|
|
146
|
+
}),
|
|
147
|
+
rawResponse: _response.rawResponse,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
if (_response.error.reason === "status-code") {
|
|
151
|
+
switch (_response.error.statusCode) {
|
|
152
|
+
case 404:
|
|
153
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
154
|
+
unrecognizedObjectKeys: "passthrough",
|
|
155
|
+
allowUnrecognizedUnionMembers: true,
|
|
156
|
+
allowUnrecognizedEnumValues: true,
|
|
157
|
+
skipValidation: true,
|
|
158
|
+
breadcrumbsPrefix: ["response"],
|
|
159
|
+
}), _response.rawResponse);
|
|
160
|
+
default:
|
|
161
|
+
throw new errors.AgentMailError({
|
|
162
|
+
statusCode: _response.error.statusCode,
|
|
163
|
+
body: _response.error.body,
|
|
164
|
+
rawResponse: _response.rawResponse,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/api-keys");
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
173
|
+
* @param {AgentMail.ApiKeyId} api_key
|
|
174
|
+
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
175
|
+
*
|
|
176
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* await client.pods.apiKeys.delete("pod_id", "api_key")
|
|
180
|
+
*/
|
|
181
|
+
delete(pod_id, api_key, requestOptions) {
|
|
182
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(pod_id, api_key, requestOptions));
|
|
183
|
+
}
|
|
184
|
+
__delete(pod_id, api_key, requestOptions) {
|
|
185
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
186
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
187
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
188
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
189
|
+
const _response = yield core.fetcher({
|
|
190
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Prod)
|
|
191
|
+
.http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/api-keys/${core.url.encodePathParam(serializers.ApiKeyId.jsonOrThrow(api_key, { omitUndefined: true }))}`),
|
|
192
|
+
method: "DELETE",
|
|
193
|
+
headers: _headers,
|
|
194
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
195
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
196
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
197
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
198
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
199
|
+
logging: this._options.logging,
|
|
200
|
+
});
|
|
201
|
+
if (_response.ok) {
|
|
202
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
203
|
+
}
|
|
204
|
+
if (_response.error.reason === "status-code") {
|
|
205
|
+
switch (_response.error.statusCode) {
|
|
206
|
+
case 404:
|
|
207
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
208
|
+
unrecognizedObjectKeys: "passthrough",
|
|
209
|
+
allowUnrecognizedUnionMembers: true,
|
|
210
|
+
allowUnrecognizedEnumValues: true,
|
|
211
|
+
skipValidation: true,
|
|
212
|
+
breadcrumbsPrefix: ["response"],
|
|
213
|
+
}), _response.rawResponse);
|
|
214
|
+
default:
|
|
215
|
+
throw new errors.AgentMailError({
|
|
216
|
+
statusCode: _response.error.statusCode,
|
|
217
|
+
body: _response.error.body,
|
|
218
|
+
rawResponse: _response.rawResponse,
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v0/pods/{pod_id}/api-keys/{api_key}");
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ListApiKeysRequest } from "./ListApiKeysRequest.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -8,6 +8,7 @@ export const ApiKey = core.serialization.object({
|
|
|
8
8
|
apiKeyId: core.serialization.property("api_key_id", ApiKeyId),
|
|
9
9
|
prefix: Prefix,
|
|
10
10
|
name: Name,
|
|
11
|
+
podId: core.serialization.property("pod_id", core.serialization.string().optional()),
|
|
11
12
|
usedAt: core.serialization.property("used_at", core.serialization.date().optional()),
|
|
12
13
|
createdAt: core.serialization.property("created_at", CreatedAt),
|
|
13
14
|
});
|
|
@@ -9,5 +9,6 @@ export const CreateApiKeyResponse = core.serialization.object({
|
|
|
9
9
|
apiKey: core.serialization.property("api_key", core.serialization.string()),
|
|
10
10
|
prefix: Prefix,
|
|
11
11
|
name: Name,
|
|
12
|
+
podId: core.serialization.property("pod_id", core.serialization.string().optional()),
|
|
12
13
|
createdAt: core.serialization.property("created_at", CreatedAt),
|
|
13
14
|
});
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.4.
|
|
1
|
+
export declare const SDK_VERSION = "0.4.1";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.4.
|
|
1
|
+
export const SDK_VERSION = "0.4.1";
|