@smplkit/sdk 3.0.51 → 3.0.53
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/index.cjs +254 -65
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +346 -63
- package/dist/index.d.ts +346 -63
- package/dist/index.js +254 -65
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17097,10 +17097,10 @@ function resolveChain(chain, environment) {
|
|
|
17097
17097
|
|
|
17098
17098
|
// src/config/types.ts
|
|
17099
17099
|
var ItemType = /* @__PURE__ */ ((ItemType2) => {
|
|
17100
|
-
ItemType2["STRING"] = "STRING";
|
|
17101
|
-
ItemType2["NUMBER"] = "NUMBER";
|
|
17102
17100
|
ItemType2["BOOLEAN"] = "BOOLEAN";
|
|
17103
17101
|
ItemType2["JSON"] = "JSON";
|
|
17102
|
+
ItemType2["NUMBER"] = "NUMBER";
|
|
17103
|
+
ItemType2["STRING"] = "STRING";
|
|
17104
17104
|
return ItemType2;
|
|
17105
17105
|
})(ItemType || {});
|
|
17106
17106
|
var ConfigItem = class {
|
|
@@ -18279,8 +18279,8 @@ import createClient3 from "openapi-fetch";
|
|
|
18279
18279
|
|
|
18280
18280
|
// src/management/types.ts
|
|
18281
18281
|
var EnvironmentClassification = /* @__PURE__ */ ((EnvironmentClassification3) => {
|
|
18282
|
-
EnvironmentClassification3["STANDARD"] = "STANDARD";
|
|
18283
18282
|
EnvironmentClassification3["AD_HOC"] = "AD_HOC";
|
|
18283
|
+
EnvironmentClassification3["STANDARD"] = "STANDARD";
|
|
18284
18284
|
return EnvironmentClassification3;
|
|
18285
18285
|
})(EnvironmentClassification || {});
|
|
18286
18286
|
var HEX_RE = /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;
|
|
@@ -18512,14 +18512,14 @@ var AccountSettings = class {
|
|
|
18512
18512
|
|
|
18513
18513
|
// src/flags/types.ts
|
|
18514
18514
|
var Op = /* @__PURE__ */ ((Op2) => {
|
|
18515
|
+
Op2["CONTAINS"] = "contains";
|
|
18515
18516
|
Op2["EQ"] = "==";
|
|
18516
|
-
Op2["NEQ"] = "!=";
|
|
18517
|
-
Op2["LT"] = "<";
|
|
18518
|
-
Op2["LTE"] = "<=";
|
|
18519
18517
|
Op2["GT"] = ">";
|
|
18520
18518
|
Op2["GTE"] = ">=";
|
|
18521
18519
|
Op2["IN"] = "in";
|
|
18522
|
-
Op2["
|
|
18520
|
+
Op2["LT"] = "<";
|
|
18521
|
+
Op2["LTE"] = "<=";
|
|
18522
|
+
Op2["NEQ"] = "!=";
|
|
18523
18523
|
return Op2;
|
|
18524
18524
|
})(Op || {});
|
|
18525
18525
|
var CONTEXT_FIELDS = /* @__PURE__ */ new Set([
|
|
@@ -19208,13 +19208,13 @@ function _coerceValues(values) {
|
|
|
19208
19208
|
|
|
19209
19209
|
// src/logging/types.ts
|
|
19210
19210
|
var LogLevel = /* @__PURE__ */ ((LogLevel5) => {
|
|
19211
|
-
LogLevel5["TRACE"] = "TRACE";
|
|
19212
19211
|
LogLevel5["DEBUG"] = "DEBUG";
|
|
19213
|
-
LogLevel5["INFO"] = "INFO";
|
|
19214
|
-
LogLevel5["WARN"] = "WARN";
|
|
19215
19212
|
LogLevel5["ERROR"] = "ERROR";
|
|
19216
19213
|
LogLevel5["FATAL"] = "FATAL";
|
|
19214
|
+
LogLevel5["INFO"] = "INFO";
|
|
19217
19215
|
LogLevel5["SILENT"] = "SILENT";
|
|
19216
|
+
LogLevel5["TRACE"] = "TRACE";
|
|
19217
|
+
LogLevel5["WARN"] = "WARN";
|
|
19218
19218
|
return LogLevel5;
|
|
19219
19219
|
})(LogLevel || {});
|
|
19220
19220
|
var LoggerChangeEvent = class {
|
|
@@ -19840,6 +19840,137 @@ var LogGroupsClient = class {
|
|
|
19840
19840
|
}
|
|
19841
19841
|
};
|
|
19842
19842
|
|
|
19843
|
+
// src/audit/types.ts
|
|
19844
|
+
var HttpConfiguration = class {
|
|
19845
|
+
/** HTTP verb used for delivery. Defaults to {@link HttpMethod.POST}. */
|
|
19846
|
+
method;
|
|
19847
|
+
/** Destination URL the audit service POSTs each event to. */
|
|
19848
|
+
url;
|
|
19849
|
+
/**
|
|
19850
|
+
* Headers attached to every outbound request. Values carry credentials
|
|
19851
|
+
* and are encrypted at rest server-side; reads return them redacted.
|
|
19852
|
+
*/
|
|
19853
|
+
headers;
|
|
19854
|
+
/**
|
|
19855
|
+
* Status the destination must return for delivery to count as success
|
|
19856
|
+
* — either an exact code (`"200"`, `"204"`) or a status class
|
|
19857
|
+
* (`"2xx"`, `"4xx"`). Defaults to `"2xx"`.
|
|
19858
|
+
*/
|
|
19859
|
+
successStatus;
|
|
19860
|
+
constructor(fields = {}) {
|
|
19861
|
+
this.method = fields.method ?? "POST" /* POST */;
|
|
19862
|
+
this.url = fields.url ?? "";
|
|
19863
|
+
this.headers = fields.headers ?? [];
|
|
19864
|
+
this.successStatus = fields.successStatus ?? "2xx";
|
|
19865
|
+
}
|
|
19866
|
+
};
|
|
19867
|
+
var Forwarder = class {
|
|
19868
|
+
/**
|
|
19869
|
+
* Server-assigned UUID for this forwarder. `null` until {@link save}
|
|
19870
|
+
* has run for the first time.
|
|
19871
|
+
*/
|
|
19872
|
+
id;
|
|
19873
|
+
/** Display name. Free-form. */
|
|
19874
|
+
name;
|
|
19875
|
+
/** Destination type — see {@link ForwarderType}. */
|
|
19876
|
+
forwarderType;
|
|
19877
|
+
/** Destination request configuration. */
|
|
19878
|
+
configuration;
|
|
19879
|
+
/**
|
|
19880
|
+
* When `false`, the audit service skips delivery for this forwarder
|
|
19881
|
+
* but still records `filtered_out` deliveries.
|
|
19882
|
+
*/
|
|
19883
|
+
enabled;
|
|
19884
|
+
/** Optional free-text description. */
|
|
19885
|
+
description;
|
|
19886
|
+
/**
|
|
19887
|
+
* Optional JSON Logic expression evaluated per event. When set, events
|
|
19888
|
+
* that don't match are recorded as `filtered_out` deliveries instead
|
|
19889
|
+
* of being POSTed to the destination.
|
|
19890
|
+
*/
|
|
19891
|
+
filter;
|
|
19892
|
+
/**
|
|
19893
|
+
* Optional template applied to each event before delivery. Shape
|
|
19894
|
+
* depends on {@link transformType}; for `"JSONATA"`, a JSONata
|
|
19895
|
+
* expression string. `null` delivers the event JSON as-is.
|
|
19896
|
+
*/
|
|
19897
|
+
transform;
|
|
19898
|
+
/**
|
|
19899
|
+
* Engine used to evaluate {@link transform}. Currently only
|
|
19900
|
+
* `"JSONATA"` is supported. Auto-filled by the SDK whenever
|
|
19901
|
+
* {@link transform} is set on save.
|
|
19902
|
+
*/
|
|
19903
|
+
transformType;
|
|
19904
|
+
/**
|
|
19905
|
+
* When the audit service first persisted this forwarder. `null` for
|
|
19906
|
+
* an unsaved instance.
|
|
19907
|
+
*/
|
|
19908
|
+
createdAt;
|
|
19909
|
+
/** When this forwarder was last mutated. */
|
|
19910
|
+
updatedAt;
|
|
19911
|
+
/** Soft-delete timestamp. `null` for live forwarders. */
|
|
19912
|
+
deletedAt;
|
|
19913
|
+
/** Monotonic version counter; bumped on every server-side write. */
|
|
19914
|
+
version;
|
|
19915
|
+
/** @internal */
|
|
19916
|
+
_client;
|
|
19917
|
+
constructor(client, fields) {
|
|
19918
|
+
this._client = client;
|
|
19919
|
+
this.id = fields.id ?? null;
|
|
19920
|
+
this.name = fields.name;
|
|
19921
|
+
this.forwarderType = fields.forwarderType;
|
|
19922
|
+
this.configuration = fields.configuration;
|
|
19923
|
+
this.enabled = fields.enabled ?? true;
|
|
19924
|
+
this.description = fields.description ?? null;
|
|
19925
|
+
this.filter = fields.filter ?? null;
|
|
19926
|
+
this.transform = fields.transform ?? null;
|
|
19927
|
+
this.transformType = fields.transformType ?? null;
|
|
19928
|
+
this.createdAt = fields.createdAt ?? null;
|
|
19929
|
+
this.updatedAt = fields.updatedAt ?? null;
|
|
19930
|
+
this.deletedAt = fields.deletedAt ?? null;
|
|
19931
|
+
this.version = fields.version ?? null;
|
|
19932
|
+
}
|
|
19933
|
+
/**
|
|
19934
|
+
* Create or update this forwarder on the server.
|
|
19935
|
+
*
|
|
19936
|
+
* Upsert behavior is driven by {@link createdAt}: a forwarder with
|
|
19937
|
+
* no `createdAt` is created (POST); otherwise it's full-replace
|
|
19938
|
+
* updated (PUT). After the call, every field is refreshed from the
|
|
19939
|
+
* server response (including newly-assigned `id`, `createdAt`,
|
|
19940
|
+
* `updatedAt`, `version`).
|
|
19941
|
+
*/
|
|
19942
|
+
async save() {
|
|
19943
|
+
if (this._client === null) {
|
|
19944
|
+
throw new Error("Forwarder was constructed without a client; cannot save");
|
|
19945
|
+
}
|
|
19946
|
+
const other = this.createdAt === null ? await this._client._createForwarder(this) : await this._client._updateForwarder(this);
|
|
19947
|
+
this._apply(other);
|
|
19948
|
+
}
|
|
19949
|
+
/** Soft-delete this forwarder on the server. */
|
|
19950
|
+
async delete() {
|
|
19951
|
+
if (this._client === null || this.id === null) {
|
|
19952
|
+
throw new Error("Forwarder was constructed without a client or id; cannot delete");
|
|
19953
|
+
}
|
|
19954
|
+
await this._client._deleteForwarder(this.id);
|
|
19955
|
+
}
|
|
19956
|
+
/** @internal Copy every server-authoritative field from `other` onto self. */
|
|
19957
|
+
_apply(other) {
|
|
19958
|
+
this.id = other.id;
|
|
19959
|
+
this.name = other.name;
|
|
19960
|
+
this.forwarderType = other.forwarderType;
|
|
19961
|
+
this.configuration = other.configuration;
|
|
19962
|
+
this.enabled = other.enabled;
|
|
19963
|
+
this.description = other.description;
|
|
19964
|
+
this.filter = other.filter;
|
|
19965
|
+
this.transform = other.transform;
|
|
19966
|
+
this.transformType = other.transformType;
|
|
19967
|
+
this.createdAt = other.createdAt;
|
|
19968
|
+
this.updatedAt = other.updatedAt;
|
|
19969
|
+
this.deletedAt = other.deletedAt;
|
|
19970
|
+
this.version = other.version;
|
|
19971
|
+
}
|
|
19972
|
+
};
|
|
19973
|
+
|
|
19843
19974
|
// src/management/audit.ts
|
|
19844
19975
|
async function checkError4(response) {
|
|
19845
19976
|
const body = await response.text().catch(() => "");
|
|
@@ -19866,79 +19997,106 @@ function _paginationFromBody2(body) {
|
|
|
19866
19997
|
}
|
|
19867
19998
|
return out;
|
|
19868
19999
|
}
|
|
19869
|
-
function
|
|
20000
|
+
function _configurationToWire(config) {
|
|
19870
20001
|
return {
|
|
19871
|
-
method:
|
|
19872
|
-
url:
|
|
19873
|
-
headers:
|
|
19874
|
-
|
|
19875
|
-
success_status: http.successStatus
|
|
20002
|
+
method: config.method,
|
|
20003
|
+
url: config.url,
|
|
20004
|
+
headers: config.headers.map((h) => ({ name: h.name, value: h.value })),
|
|
20005
|
+
success_status: config.successStatus
|
|
19876
20006
|
};
|
|
19877
20007
|
}
|
|
19878
|
-
function
|
|
20008
|
+
function _configurationFromWire(raw) {
|
|
19879
20009
|
const r = raw ?? {};
|
|
19880
20010
|
const headers = (r.headers ?? []).map((h) => ({
|
|
19881
20011
|
name: String(h.name ?? ""),
|
|
19882
20012
|
value: String(h.value ?? "")
|
|
19883
20013
|
}));
|
|
19884
|
-
return {
|
|
19885
|
-
method:
|
|
20014
|
+
return new HttpConfiguration({
|
|
20015
|
+
method: r.method ?? "POST" /* POST */,
|
|
19886
20016
|
url: String(r.url ?? ""),
|
|
19887
20017
|
headers,
|
|
19888
|
-
body: r.body ?? null,
|
|
19889
20018
|
successStatus: String(r.success_status ?? "2xx")
|
|
19890
|
-
};
|
|
20019
|
+
});
|
|
19891
20020
|
}
|
|
19892
|
-
function
|
|
20021
|
+
function _forwarderAttrs(forwarder) {
|
|
19893
20022
|
const attrs = {
|
|
19894
|
-
name:
|
|
19895
|
-
forwarder_type:
|
|
19896
|
-
enabled:
|
|
19897
|
-
|
|
20023
|
+
name: forwarder.name,
|
|
20024
|
+
forwarder_type: forwarder.forwarderType,
|
|
20025
|
+
enabled: forwarder.enabled,
|
|
20026
|
+
configuration: _configurationToWire(forwarder.configuration)
|
|
19898
20027
|
};
|
|
19899
|
-
if (
|
|
19900
|
-
|
|
20028
|
+
if (forwarder.description !== null) attrs.description = forwarder.description;
|
|
20029
|
+
if (forwarder.filter !== null) {
|
|
20030
|
+
attrs.filter = forwarder.filter;
|
|
20031
|
+
}
|
|
20032
|
+
if (forwarder.transform !== null) {
|
|
20033
|
+
attrs.transform_type = "JSONATA" /* JSONATA */;
|
|
20034
|
+
attrs.transform = forwarder.transform;
|
|
19901
20035
|
}
|
|
19902
|
-
if (input.transform !== void 0) attrs.transform = input.transform;
|
|
19903
20036
|
return attrs;
|
|
19904
20037
|
}
|
|
19905
|
-
function _forwarderFromResource(resource) {
|
|
20038
|
+
function _forwarderFromResource(resource, client) {
|
|
19906
20039
|
const a = resource.attributes;
|
|
19907
|
-
return {
|
|
20040
|
+
return new Forwarder(client, {
|
|
19908
20041
|
id: resource.id,
|
|
19909
20042
|
name: String(a.name ?? ""),
|
|
19910
|
-
|
|
20043
|
+
description: a.description ?? null,
|
|
19911
20044
|
forwarderType: a.forwarder_type,
|
|
19912
20045
|
enabled: Boolean(a.enabled ?? true),
|
|
19913
20046
|
filter: a.filter ?? null,
|
|
20047
|
+
transformType: a.transform_type ?? null,
|
|
19914
20048
|
transform: a.transform ?? null,
|
|
19915
|
-
|
|
20049
|
+
configuration: _configurationFromWire(a.configuration),
|
|
19916
20050
|
createdAt: a.created_at ?? null,
|
|
19917
20051
|
updatedAt: a.updated_at ?? null,
|
|
19918
20052
|
deletedAt: a.deleted_at ?? null,
|
|
19919
20053
|
version: a.version ?? null
|
|
19920
|
-
};
|
|
20054
|
+
});
|
|
19921
20055
|
}
|
|
19922
20056
|
var ForwardersClient = class {
|
|
19923
20057
|
/** @internal */
|
|
19924
20058
|
constructor(_http) {
|
|
19925
20059
|
this._http = _http;
|
|
19926
20060
|
}
|
|
19927
|
-
|
|
19928
|
-
|
|
19929
|
-
|
|
19930
|
-
|
|
19931
|
-
|
|
19932
|
-
|
|
19933
|
-
|
|
19934
|
-
|
|
19935
|
-
|
|
19936
|
-
|
|
19937
|
-
|
|
19938
|
-
|
|
19939
|
-
|
|
19940
|
-
|
|
20061
|
+
/**
|
|
20062
|
+
* Construct an unsaved {@link Forwarder}. Call {@link Forwarder.save}
|
|
20063
|
+
* to persist.
|
|
20064
|
+
*
|
|
20065
|
+
* @param fields.name Display name. Free-form.
|
|
20066
|
+
* @param fields.forwarderType Destination type — see {@link ForwarderType}.
|
|
20067
|
+
* @param fields.configuration Destination HTTP request configuration.
|
|
20068
|
+
* Headers carry credentials and are
|
|
20069
|
+
* encrypted at rest server-side; reads
|
|
20070
|
+
* return them redacted.
|
|
20071
|
+
* @param fields.enabled Whether the forwarder is active. Defaults true.
|
|
20072
|
+
* @param fields.description Optional free-text description.
|
|
20073
|
+
* @param fields.filter Optional JSON Logic filter; events that
|
|
20074
|
+
* don't match are recorded as
|
|
20075
|
+
* `filtered_out` deliveries.
|
|
20076
|
+
* @param fields.transform Optional JSONata template applied to
|
|
20077
|
+
* the event payload before POST. `null`
|
|
20078
|
+
* delivers the event as-is.
|
|
20079
|
+
*/
|
|
20080
|
+
new(fields) {
|
|
20081
|
+
return new Forwarder(this, {
|
|
20082
|
+
name: fields.name,
|
|
20083
|
+
forwarderType: fields.forwarderType,
|
|
20084
|
+
configuration: fields.configuration,
|
|
20085
|
+
enabled: fields.enabled,
|
|
20086
|
+
description: fields.description,
|
|
20087
|
+
filter: fields.filter,
|
|
20088
|
+
transform: fields.transform
|
|
20089
|
+
});
|
|
19941
20090
|
}
|
|
20091
|
+
/**
|
|
20092
|
+
* List forwarders for the authenticated account.
|
|
20093
|
+
*
|
|
20094
|
+
* Offset paginated per ADR-014: pass {@link ListForwardersParams.pageNumber}
|
|
20095
|
+
* (1-based) and {@link ListForwardersParams.pageSize} (default 1000,
|
|
20096
|
+
* max 1000). Pass `metaTotal=true` to populate `total` and `totalPages`
|
|
20097
|
+
* in the returned `pagination` (costs an extra `COUNT` query
|
|
20098
|
+
* server-side).
|
|
20099
|
+
*/
|
|
19942
20100
|
async list(params = {}) {
|
|
19943
20101
|
const query = {};
|
|
19944
20102
|
if (params.forwarderType !== void 0) query["filter[forwarder_type]"] = params.forwarderType;
|
|
@@ -19957,10 +20115,15 @@ var ForwardersClient = class {
|
|
|
19957
20115
|
wrapFetchError4(err);
|
|
19958
20116
|
}
|
|
19959
20117
|
return {
|
|
19960
|
-
forwarders: (data?.data ?? []).map(_forwarderFromResource),
|
|
20118
|
+
forwarders: (data?.data ?? []).map((r) => _forwarderFromResource(r, this)),
|
|
19961
20119
|
pagination: _paginationFromBody2(data ?? {})
|
|
19962
20120
|
};
|
|
19963
20121
|
}
|
|
20122
|
+
/**
|
|
20123
|
+
* Fetch a single forwarder by id. The returned instance is bound to
|
|
20124
|
+
* this client so {@link Forwarder.save} and {@link Forwarder.delete}
|
|
20125
|
+
* round-trip back here.
|
|
20126
|
+
*/
|
|
19964
20127
|
async get(forwarderId) {
|
|
19965
20128
|
let data;
|
|
19966
20129
|
try {
|
|
@@ -19973,41 +20136,67 @@ var ForwardersClient = class {
|
|
|
19973
20136
|
wrapFetchError4(err);
|
|
19974
20137
|
}
|
|
19975
20138
|
if (!data?.data) throw new SmplError("Unexpected empty response from audit");
|
|
19976
|
-
return _forwarderFromResource(data.data);
|
|
20139
|
+
return _forwarderFromResource(data.data, this);
|
|
20140
|
+
}
|
|
20141
|
+
/** Soft-delete a forwarder by id. */
|
|
20142
|
+
async delete(forwarderId) {
|
|
20143
|
+
try {
|
|
20144
|
+
const result = await this._http.DELETE("/api/v1/forwarders/{forwarder_id}", {
|
|
20145
|
+
params: { path: { forwarder_id: forwarderId } }
|
|
20146
|
+
});
|
|
20147
|
+
if (result.response.status !== 204) await checkError4(result.response);
|
|
20148
|
+
} catch (err) {
|
|
20149
|
+
wrapFetchError4(err);
|
|
20150
|
+
}
|
|
19977
20151
|
}
|
|
19978
20152
|
/**
|
|
19979
|
-
*
|
|
19980
|
-
*
|
|
19981
|
-
* Header values must be re-supplied as plaintext; the GET path
|
|
19982
|
-
* returns them in plaintext for exactly this round-trip.
|
|
20153
|
+
* @internal Called by `Forwarder.save()` on unsaved instances.
|
|
19983
20154
|
*/
|
|
19984
|
-
async
|
|
20155
|
+
async _createForwarder(forwarder) {
|
|
19985
20156
|
const body = {
|
|
19986
|
-
data: { id:
|
|
20157
|
+
data: { id: "", type: "forwarder", attributes: _forwarderAttrs(forwarder) }
|
|
19987
20158
|
};
|
|
19988
20159
|
let data;
|
|
19989
20160
|
try {
|
|
19990
|
-
const result = await this._http.
|
|
19991
|
-
params: { path: { forwarder_id: forwarderId } },
|
|
19992
|
-
body
|
|
19993
|
-
});
|
|
20161
|
+
const result = await this._http.POST("/api/v1/forwarders", { body });
|
|
19994
20162
|
if (!result.response.ok) await checkError4(result.response);
|
|
19995
20163
|
data = result.data;
|
|
19996
20164
|
} catch (err) {
|
|
19997
20165
|
wrapFetchError4(err);
|
|
19998
20166
|
}
|
|
19999
20167
|
if (!data?.data) throw new SmplError("Unexpected empty response from audit");
|
|
20000
|
-
return _forwarderFromResource(data.data);
|
|
20168
|
+
return _forwarderFromResource(data.data, this);
|
|
20001
20169
|
}
|
|
20002
|
-
|
|
20170
|
+
/**
|
|
20171
|
+
* @internal Full-replace PUT. Called by `Forwarder.save()` on
|
|
20172
|
+
* instances that already have a `createdAt`. Header values must be
|
|
20173
|
+
* re-supplied as plaintext; the GET path redacts them, so a PUT body
|
|
20174
|
+
* containing `"<redacted>"` would persist that literal.
|
|
20175
|
+
*/
|
|
20176
|
+
async _updateForwarder(forwarder) {
|
|
20177
|
+
if (forwarder.id === null) {
|
|
20178
|
+
throw new Error("cannot update a Forwarder with no id");
|
|
20179
|
+
}
|
|
20180
|
+
const body = {
|
|
20181
|
+
data: { id: forwarder.id, type: "forwarder", attributes: _forwarderAttrs(forwarder) }
|
|
20182
|
+
};
|
|
20183
|
+
let data;
|
|
20003
20184
|
try {
|
|
20004
|
-
const result = await this._http.
|
|
20005
|
-
params: { path: { forwarder_id:
|
|
20185
|
+
const result = await this._http.PUT("/api/v1/forwarders/{forwarder_id}", {
|
|
20186
|
+
params: { path: { forwarder_id: forwarder.id } },
|
|
20187
|
+
body
|
|
20006
20188
|
});
|
|
20007
|
-
if (result.response.
|
|
20189
|
+
if (!result.response.ok) await checkError4(result.response);
|
|
20190
|
+
data = result.data;
|
|
20008
20191
|
} catch (err) {
|
|
20009
20192
|
wrapFetchError4(err);
|
|
20010
20193
|
}
|
|
20194
|
+
if (!data?.data) throw new SmplError("Unexpected empty response from audit");
|
|
20195
|
+
return _forwarderFromResource(data.data, this);
|
|
20196
|
+
}
|
|
20197
|
+
/** @internal Called by `Forwarder.delete()`. */
|
|
20198
|
+
async _deleteForwarder(id) {
|
|
20199
|
+
return this.delete(id);
|
|
20011
20200
|
}
|
|
20012
20201
|
};
|
|
20013
20202
|
var ManagementAuditClient = class {
|