@scaleway/sdk 2.34.0 → 2.36.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/dist/api/baremetal/v1/api.gen.d.ts +1 -1
- package/dist/api/block/v1alpha1/api.gen.d.ts +1 -1
- package/dist/api/cockpit/v1/api.gen.cjs +26 -0
- package/dist/api/cockpit/v1/api.gen.d.ts +12 -1
- package/dist/api/cockpit/v1/api.gen.js +27 -1
- package/dist/api/cockpit/v1/index.gen.d.ts +1 -1
- package/dist/api/cockpit/v1/marshalling.gen.cjs +26 -0
- package/dist/api/cockpit/v1/marshalling.gen.d.ts +2 -1
- package/dist/api/cockpit/v1/marshalling.gen.js +26 -0
- package/dist/api/cockpit/v1/types.gen.d.ts +34 -0
- package/dist/api/cockpit/v1/validation-rules.gen.cjs +10 -0
- package/dist/api/cockpit/v1/validation-rules.gen.d.ts +9 -0
- package/dist/api/cockpit/v1/validation-rules.gen.js +10 -0
- package/dist/api/container/v1beta1/index.gen.d.ts +1 -1
- package/dist/api/container/v1beta1/marshalling.gen.cjs +3 -0
- package/dist/api/container/v1beta1/marshalling.gen.js +3 -0
- package/dist/api/container/v1beta1/types.gen.d.ts +7 -0
- package/dist/api/function/v1beta1/index.gen.d.ts +1 -1
- package/dist/api/function/v1beta1/marshalling.gen.cjs +3 -0
- package/dist/api/function/v1beta1/marshalling.gen.js +3 -0
- package/dist/api/function/v1beta1/types.gen.d.ts +8 -1
- package/dist/api/inference/v1beta1/api.gen.d.ts +151 -0
- package/dist/api/inference/v1beta1/content.gen.d.ts +3 -0
- package/dist/api/inference/v1beta1/index.gen.d.ts +4 -0
- package/dist/api/inference/v1beta1/marshalling.gen.d.ts +18 -0
- package/dist/api/inference/v1beta1/types.gen.d.ts +435 -0
- package/dist/api/inference/v1beta1/validation-rules.gen.d.ts +50 -0
- package/dist/api/instance/v1/api.utils.cjs +1 -2
- package/dist/api/instance/v1/api.utils.js +1 -2
- package/dist/api/secret/v1beta1/api.gen.cjs +25 -0
- package/dist/api/secret/v1beta1/api.gen.d.ts +12 -1
- package/dist/api/secret/v1beta1/api.gen.js +26 -1
- package/dist/api/secret/v1beta1/index.gen.d.ts +1 -1
- package/dist/api/secret/v1beta1/marshalling.gen.cjs +12 -0
- package/dist/api/secret/v1beta1/marshalling.gen.d.ts +2 -1
- package/dist/api/secret/v1beta1/marshalling.gen.js +12 -0
- package/dist/api/secret/v1beta1/types.gen.d.ts +17 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.cjs +1 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.js +1 -1
- package/dist/api/tem/v1alpha1/types.gen.d.ts +1 -1
- package/dist/api/tem/v1alpha1/validation-rules.gen.cjs +64 -0
- package/dist/api/tem/v1alpha1/validation-rules.gen.d.ts +57 -0
- package/dist/api/tem/v1alpha1/validation-rules.gen.js +64 -0
- package/dist/helpers/marshalling.cjs +2 -4
- package/dist/helpers/marshalling.js +2 -4
- package/dist/internal/async/interval-retrier.cjs +2 -4
- package/dist/internal/async/interval-retrier.js +2 -4
- package/dist/scw/auth.cjs +2 -4
- package/dist/scw/auth.js +2 -4
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/standard/invalid-arguments-error.cjs +1 -2
- package/dist/scw/errors/standard/invalid-arguments-error.js +1 -2
- package/dist/scw/errors/standard/out-of-stock-error.cjs +1 -2
- package/dist/scw/errors/standard/out-of-stock-error.js +1 -2
- package/dist/scw/errors/standard/permissions-denied-error.cjs +1 -2
- package/dist/scw/errors/standard/permissions-denied-error.js +1 -2
- package/dist/scw/errors/standard/quotas-exceeded-error.cjs +1 -2
- package/dist/scw/errors/standard/quotas-exceeded-error.js +1 -2
- package/dist/scw/errors/standard/too-many-requests-error.cjs +1 -2
- package/dist/scw/errors/standard/too-many-requests-error.js +1 -2
- package/dist/scw/fetch/resource-paginator.cjs +1 -2
- package/dist/scw/fetch/resource-paginator.js +1 -2
- package/dist/scw/fetch/response-parser.cjs +2 -4
- package/dist/scw/fetch/response-parser.js +2 -4
- package/package.json +2 -2
|
@@ -245,7 +245,7 @@ export declare class API extends ParentAPI {
|
|
|
245
245
|
*/
|
|
246
246
|
getOS: (request: Readonly<GetOSRequest>) => Promise<OS>;
|
|
247
247
|
}
|
|
248
|
-
/** Elastic Metal Private Network API. */
|
|
248
|
+
/** Elastic Metal - Private Network API. */
|
|
249
249
|
export declare class PrivateNetworkAPI extends ParentAPI {
|
|
250
250
|
/** Lists the available zones of the API. */
|
|
251
251
|
static readonly LOCALITIES: Zone[];
|
|
@@ -2,7 +2,7 @@ import { API as ParentAPI } from '../../../bridge';
|
|
|
2
2
|
import type { WaitForOptions, Zone } from '../../../bridge';
|
|
3
3
|
import type { CreateSnapshotRequest, CreateVolumeRequest, DeleteSnapshotRequest, DeleteVolumeRequest, ExportSnapshotToObjectStorageRequest, GetSnapshotRequest, GetVolumeRequest, ImportSnapshotFromObjectStorageRequest, ImportSnapshotFromS3Request, ListSnapshotsRequest, ListSnapshotsResponse, ListVolumeTypesRequest, ListVolumeTypesResponse, ListVolumesRequest, ListVolumesResponse, Snapshot, UpdateSnapshotRequest, UpdateVolumeRequest, Volume } from './types.gen';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Block Storage API.
|
|
6
6
|
*
|
|
7
7
|
* This API allows you to manage your Block Storage volumes.
|
|
8
8
|
*/
|
|
@@ -564,6 +564,32 @@ class RegionalAPI extends api.API {
|
|
|
564
564
|
method: "POST",
|
|
565
565
|
path: `/cockpit/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alert-manager/contact-points/delete`
|
|
566
566
|
});
|
|
567
|
+
pageOfListManagedAlerts = (request = {}) => this.client.fetch(
|
|
568
|
+
{
|
|
569
|
+
method: "GET",
|
|
570
|
+
path: `/cockpit/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/managed-alerts`,
|
|
571
|
+
urlParams: marshalling.urlParams(
|
|
572
|
+
["order_by", request.orderBy],
|
|
573
|
+
["page", request.page],
|
|
574
|
+
[
|
|
575
|
+
"page_size",
|
|
576
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
577
|
+
],
|
|
578
|
+
[
|
|
579
|
+
"project_id",
|
|
580
|
+
request.projectId ?? this.client.settings.defaultProjectId
|
|
581
|
+
]
|
|
582
|
+
)
|
|
583
|
+
},
|
|
584
|
+
marshalling_gen.unmarshalListManagedAlertsResponse
|
|
585
|
+
);
|
|
586
|
+
/**
|
|
587
|
+
* List managed alerts. List all managed alerts for the specified Project.
|
|
588
|
+
*
|
|
589
|
+
* @param request - The request {@link RegionalApiListManagedAlertsRequest}
|
|
590
|
+
* @returns A Promise of ListManagedAlertsResponse
|
|
591
|
+
*/
|
|
592
|
+
listManagedAlerts = (request = {}) => resourcePaginator.enrichForPagination("alerts", this.pageOfListManagedAlerts, request);
|
|
567
593
|
/**
|
|
568
594
|
* Enable managed alerts. Enable the sending of managed alerts for the
|
|
569
595
|
* specified Project. Managed alerts are predefined alerts that apply to
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { Region } from '../../../bridge';
|
|
3
|
-
import type { AlertManager, ContactPoint, DataSource, GlobalApiCreateGrafanaUserRequest, GlobalApiDeleteGrafanaUserRequest, GlobalApiGetCurrentPlanRequest, GlobalApiGetGrafanaProductDashboardRequest, GlobalApiGetGrafanaRequest, GlobalApiListGrafanaProductDashboardsRequest, GlobalApiListGrafanaUsersRequest, GlobalApiListPlansRequest, GlobalApiResetGrafanaUserPasswordRequest, GlobalApiSelectPlanRequest, GlobalApiSyncGrafanaDataSourcesRequest, Grafana, GrafanaProductDashboard, GrafanaUser, ListContactPointsResponse, ListDataSourcesResponse, ListGrafanaProductDashboardsResponse, ListGrafanaUsersResponse, ListPlansResponse, ListTokensResponse, Plan, RegionalApiCreateContactPointRequest, RegionalApiCreateDataSourceRequest, RegionalApiCreateTokenRequest, RegionalApiDeleteContactPointRequest, RegionalApiDeleteDataSourceRequest, RegionalApiDeleteTokenRequest, RegionalApiDisableAlertManagerRequest, RegionalApiDisableManagedAlertsRequest, RegionalApiEnableAlertManagerRequest, RegionalApiEnableManagedAlertsRequest, RegionalApiGetAlertManagerRequest, RegionalApiGetDataSourceRequest, RegionalApiGetTokenRequest, RegionalApiGetUsageOverviewRequest, RegionalApiListContactPointsRequest, RegionalApiListDataSourcesRequest, RegionalApiListTokensRequest, RegionalApiTriggerTestAlertRequest, Token, UsageOverview } from './types.gen';
|
|
3
|
+
import type { AlertManager, ContactPoint, DataSource, GlobalApiCreateGrafanaUserRequest, GlobalApiDeleteGrafanaUserRequest, GlobalApiGetCurrentPlanRequest, GlobalApiGetGrafanaProductDashboardRequest, GlobalApiGetGrafanaRequest, GlobalApiListGrafanaProductDashboardsRequest, GlobalApiListGrafanaUsersRequest, GlobalApiListPlansRequest, GlobalApiResetGrafanaUserPasswordRequest, GlobalApiSelectPlanRequest, GlobalApiSyncGrafanaDataSourcesRequest, Grafana, GrafanaProductDashboard, GrafanaUser, ListContactPointsResponse, ListDataSourcesResponse, ListGrafanaProductDashboardsResponse, ListGrafanaUsersResponse, ListManagedAlertsResponse, ListPlansResponse, ListTokensResponse, Plan, RegionalApiCreateContactPointRequest, RegionalApiCreateDataSourceRequest, RegionalApiCreateTokenRequest, RegionalApiDeleteContactPointRequest, RegionalApiDeleteDataSourceRequest, RegionalApiDeleteTokenRequest, RegionalApiDisableAlertManagerRequest, RegionalApiDisableManagedAlertsRequest, RegionalApiEnableAlertManagerRequest, RegionalApiEnableManagedAlertsRequest, RegionalApiGetAlertManagerRequest, RegionalApiGetDataSourceRequest, RegionalApiGetTokenRequest, RegionalApiGetUsageOverviewRequest, RegionalApiListContactPointsRequest, RegionalApiListDataSourcesRequest, RegionalApiListManagedAlertsRequest, RegionalApiListTokensRequest, RegionalApiTriggerTestAlertRequest, Token, UsageOverview } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* Cockpit Global API.
|
|
6
6
|
*
|
|
@@ -283,6 +283,17 @@ export declare class RegionalAPI extends ParentAPI {
|
|
|
283
283
|
* @param request - The request {@link RegionalApiDeleteContactPointRequest}
|
|
284
284
|
*/
|
|
285
285
|
deleteContactPoint: (request?: Readonly<RegionalApiDeleteContactPointRequest>) => Promise<void>;
|
|
286
|
+
protected pageOfListManagedAlerts: (request?: Readonly<RegionalApiListManagedAlertsRequest>) => Promise<ListManagedAlertsResponse>;
|
|
287
|
+
/**
|
|
288
|
+
* List managed alerts. List all managed alerts for the specified Project.
|
|
289
|
+
*
|
|
290
|
+
* @param request - The request {@link RegionalApiListManagedAlertsRequest}
|
|
291
|
+
* @returns A Promise of ListManagedAlertsResponse
|
|
292
|
+
*/
|
|
293
|
+
listManagedAlerts: (request?: Readonly<RegionalApiListManagedAlertsRequest>) => Promise<ListManagedAlertsResponse> & {
|
|
294
|
+
all: () => Promise<import("./types.gen").Alert[]>;
|
|
295
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").Alert[], void, void>;
|
|
296
|
+
};
|
|
286
297
|
/**
|
|
287
298
|
* Enable managed alerts. Enable the sending of managed alerts for the
|
|
288
299
|
* specified Project. Managed alerts are predefined alerts that apply to
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { API as API$1 } from "../../../scw/api.js";
|
|
2
2
|
import { urlParams, validatePathParam } from "../../../helpers/marshalling.js";
|
|
3
3
|
import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
|
|
4
|
-
import { unmarshalGrafana, marshalGlobalApiSyncGrafanaDataSourcesRequest, marshalGlobalApiCreateGrafanaUserRequest, unmarshalGrafanaUser, unmarshalListGrafanaUsersResponse, marshalGlobalApiResetGrafanaUserPasswordRequest, unmarshalListGrafanaProductDashboardsResponse, unmarshalGrafanaProductDashboard, unmarshalListPlansResponse, marshalGlobalApiSelectPlanRequest, unmarshalPlan, marshalRegionalApiCreateDataSourceRequest, unmarshalDataSource, unmarshalListDataSourcesResponse, unmarshalUsageOverview, marshalRegionalApiCreateTokenRequest, unmarshalToken, unmarshalListTokensResponse, unmarshalAlertManager, marshalRegionalApiEnableAlertManagerRequest, marshalRegionalApiDisableAlertManagerRequest, marshalRegionalApiCreateContactPointRequest, unmarshalContactPoint, unmarshalListContactPointsResponse, marshalRegionalApiDeleteContactPointRequest, marshalRegionalApiEnableManagedAlertsRequest, marshalRegionalApiDisableManagedAlertsRequest, marshalRegionalApiTriggerTestAlertRequest } from "./marshalling.gen.js";
|
|
4
|
+
import { unmarshalGrafana, marshalGlobalApiSyncGrafanaDataSourcesRequest, marshalGlobalApiCreateGrafanaUserRequest, unmarshalGrafanaUser, unmarshalListGrafanaUsersResponse, marshalGlobalApiResetGrafanaUserPasswordRequest, unmarshalListGrafanaProductDashboardsResponse, unmarshalGrafanaProductDashboard, unmarshalListPlansResponse, marshalGlobalApiSelectPlanRequest, unmarshalPlan, marshalRegionalApiCreateDataSourceRequest, unmarshalDataSource, unmarshalListDataSourcesResponse, unmarshalUsageOverview, marshalRegionalApiCreateTokenRequest, unmarshalToken, unmarshalListTokensResponse, unmarshalAlertManager, marshalRegionalApiEnableAlertManagerRequest, marshalRegionalApiDisableAlertManagerRequest, marshalRegionalApiCreateContactPointRequest, unmarshalContactPoint, unmarshalListContactPointsResponse, marshalRegionalApiDeleteContactPointRequest, unmarshalListManagedAlertsResponse, marshalRegionalApiEnableManagedAlertsRequest, marshalRegionalApiDisableManagedAlertsRequest, marshalRegionalApiTriggerTestAlertRequest } from "./marshalling.gen.js";
|
|
5
5
|
const jsonContentHeaders = {
|
|
6
6
|
"Content-Type": "application/json; charset=utf-8"
|
|
7
7
|
};
|
|
@@ -562,6 +562,32 @@ class RegionalAPI extends API$1 {
|
|
|
562
562
|
method: "POST",
|
|
563
563
|
path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alert-manager/contact-points/delete`
|
|
564
564
|
});
|
|
565
|
+
pageOfListManagedAlerts = (request = {}) => this.client.fetch(
|
|
566
|
+
{
|
|
567
|
+
method: "GET",
|
|
568
|
+
path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/managed-alerts`,
|
|
569
|
+
urlParams: urlParams(
|
|
570
|
+
["order_by", request.orderBy],
|
|
571
|
+
["page", request.page],
|
|
572
|
+
[
|
|
573
|
+
"page_size",
|
|
574
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
575
|
+
],
|
|
576
|
+
[
|
|
577
|
+
"project_id",
|
|
578
|
+
request.projectId ?? this.client.settings.defaultProjectId
|
|
579
|
+
]
|
|
580
|
+
)
|
|
581
|
+
},
|
|
582
|
+
unmarshalListManagedAlertsResponse
|
|
583
|
+
);
|
|
584
|
+
/**
|
|
585
|
+
* List managed alerts. List all managed alerts for the specified Project.
|
|
586
|
+
*
|
|
587
|
+
* @param request - The request {@link RegionalApiListManagedAlertsRequest}
|
|
588
|
+
* @returns A Promise of ListManagedAlertsResponse
|
|
589
|
+
*/
|
|
590
|
+
listManagedAlerts = (request = {}) => enrichForPagination("alerts", this.pageOfListManagedAlerts, request);
|
|
565
591
|
/**
|
|
566
592
|
* Enable managed alerts. Enable the sending of managed alerts for the
|
|
567
593
|
* specified Project. Managed alerts are predefined alerts that apply to
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { GlobalAPI, RegionalAPI } from './api.gen';
|
|
2
|
-
export type { AlertManager, ContactPoint, ContactPointEmail, DataSource, DataSourceOrigin, DataSourceType, GlobalApiCreateGrafanaUserRequest, GlobalApiDeleteGrafanaUserRequest, GlobalApiGetCurrentPlanRequest, GlobalApiGetGrafanaProductDashboardRequest, GlobalApiGetGrafanaRequest, GlobalApiListGrafanaProductDashboardsRequest, GlobalApiListGrafanaUsersRequest, GlobalApiListPlansRequest, GlobalApiResetGrafanaUserPasswordRequest, GlobalApiSelectPlanRequest, GlobalApiSyncGrafanaDataSourcesRequest, Grafana, GrafanaProductDashboard, GrafanaUser, GrafanaUserRole, ListContactPointsResponse, ListDataSourcesRequestOrderBy, ListDataSourcesResponse, ListGrafanaProductDashboardsResponse, ListGrafanaUsersRequestOrderBy, ListGrafanaUsersResponse, ListPlansRequestOrderBy, ListPlansResponse, ListTokensRequestOrderBy, ListTokensResponse, Plan, PlanName, RegionalApiCreateContactPointRequest, RegionalApiCreateDataSourceRequest, RegionalApiCreateTokenRequest, RegionalApiDeleteContactPointRequest, RegionalApiDeleteDataSourceRequest, RegionalApiDeleteTokenRequest, RegionalApiDisableAlertManagerRequest, RegionalApiDisableManagedAlertsRequest, RegionalApiEnableAlertManagerRequest, RegionalApiEnableManagedAlertsRequest, RegionalApiGetAlertManagerRequest, RegionalApiGetDataSourceRequest, RegionalApiGetTokenRequest, RegionalApiGetUsageOverviewRequest, RegionalApiListContactPointsRequest, RegionalApiListDataSourcesRequest, RegionalApiListTokensRequest, RegionalApiTriggerTestAlertRequest, Token, TokenScope, Usage, UsageOverview, UsageUnit, } from './types.gen';
|
|
2
|
+
export type { Alert, AlertManager, ContactPoint, ContactPointEmail, DataSource, DataSourceOrigin, DataSourceType, GlobalApiCreateGrafanaUserRequest, GlobalApiDeleteGrafanaUserRequest, GlobalApiGetCurrentPlanRequest, GlobalApiGetGrafanaProductDashboardRequest, GlobalApiGetGrafanaRequest, GlobalApiListGrafanaProductDashboardsRequest, GlobalApiListGrafanaUsersRequest, GlobalApiListPlansRequest, GlobalApiResetGrafanaUserPasswordRequest, GlobalApiSelectPlanRequest, GlobalApiSyncGrafanaDataSourcesRequest, Grafana, GrafanaProductDashboard, GrafanaUser, GrafanaUserRole, ListContactPointsResponse, ListDataSourcesRequestOrderBy, ListDataSourcesResponse, ListGrafanaProductDashboardsResponse, ListGrafanaUsersRequestOrderBy, ListGrafanaUsersResponse, ListManagedAlertsRequestOrderBy, ListManagedAlertsResponse, ListPlansRequestOrderBy, ListPlansResponse, ListTokensRequestOrderBy, ListTokensResponse, Plan, PlanName, RegionalApiCreateContactPointRequest, RegionalApiCreateDataSourceRequest, RegionalApiCreateTokenRequest, RegionalApiDeleteContactPointRequest, RegionalApiDeleteDataSourceRequest, RegionalApiDeleteTokenRequest, RegionalApiDisableAlertManagerRequest, RegionalApiDisableManagedAlertsRequest, RegionalApiEnableAlertManagerRequest, RegionalApiEnableManagedAlertsRequest, RegionalApiGetAlertManagerRequest, RegionalApiGetDataSourceRequest, RegionalApiGetTokenRequest, RegionalApiGetUsageOverviewRequest, RegionalApiListContactPointsRequest, RegionalApiListDataSourcesRequest, RegionalApiListManagedAlertsRequest, RegionalApiListTokensRequest, RegionalApiTriggerTestAlertRequest, Token, TokenScope, Usage, UsageOverview, UsageUnit, } from './types.gen';
|
|
3
3
|
export * as ValidationRules from './validation-rules.gen';
|
|
@@ -181,6 +181,31 @@ const unmarshalListGrafanaUsersResponse = (data) => {
|
|
|
181
181
|
totalCount: data.total_count
|
|
182
182
|
};
|
|
183
183
|
};
|
|
184
|
+
const unmarshalAlert = (data) => {
|
|
185
|
+
if (!json.isJSONObject(data)) {
|
|
186
|
+
throw new TypeError(
|
|
187
|
+
`Unmarshalling the type 'Alert' failed as data isn't a dictionary.`
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
return {
|
|
191
|
+
description: data.description,
|
|
192
|
+
name: data.name,
|
|
193
|
+
product: data.product,
|
|
194
|
+
productFamily: data.product_family,
|
|
195
|
+
rule: data.rule
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
const unmarshalListManagedAlertsResponse = (data) => {
|
|
199
|
+
if (!json.isJSONObject(data)) {
|
|
200
|
+
throw new TypeError(
|
|
201
|
+
`Unmarshalling the type 'ListManagedAlertsResponse' failed as data isn't a dictionary.`
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
return {
|
|
205
|
+
alerts: marshalling.unmarshalArrayOfObject(data.alerts, unmarshalAlert),
|
|
206
|
+
totalCount: data.total_count
|
|
207
|
+
};
|
|
208
|
+
};
|
|
184
209
|
const unmarshalListPlansResponse = (data) => {
|
|
185
210
|
if (!json.isJSONObject(data)) {
|
|
186
211
|
throw new TypeError(
|
|
@@ -318,6 +343,7 @@ exports.unmarshalListContactPointsResponse = unmarshalListContactPointsResponse;
|
|
|
318
343
|
exports.unmarshalListDataSourcesResponse = unmarshalListDataSourcesResponse;
|
|
319
344
|
exports.unmarshalListGrafanaProductDashboardsResponse = unmarshalListGrafanaProductDashboardsResponse;
|
|
320
345
|
exports.unmarshalListGrafanaUsersResponse = unmarshalListGrafanaUsersResponse;
|
|
346
|
+
exports.unmarshalListManagedAlertsResponse = unmarshalListManagedAlertsResponse;
|
|
321
347
|
exports.unmarshalListPlansResponse = unmarshalListPlansResponse;
|
|
322
348
|
exports.unmarshalListTokensResponse = unmarshalListTokensResponse;
|
|
323
349
|
exports.unmarshalPlan = unmarshalPlan;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultValues } from '../../../bridge';
|
|
2
|
-
import type { AlertManager, ContactPoint, DataSource, GlobalApiCreateGrafanaUserRequest, GlobalApiResetGrafanaUserPasswordRequest, GlobalApiSelectPlanRequest, GlobalApiSyncGrafanaDataSourcesRequest, Grafana, GrafanaProductDashboard, GrafanaUser, ListContactPointsResponse, ListDataSourcesResponse, ListGrafanaProductDashboardsResponse, ListGrafanaUsersResponse, ListPlansResponse, ListTokensResponse, Plan, RegionalApiCreateContactPointRequest, RegionalApiCreateDataSourceRequest, RegionalApiCreateTokenRequest, RegionalApiDeleteContactPointRequest, RegionalApiDisableAlertManagerRequest, RegionalApiDisableManagedAlertsRequest, RegionalApiEnableAlertManagerRequest, RegionalApiEnableManagedAlertsRequest, RegionalApiTriggerTestAlertRequest, Token, UsageOverview } from './types.gen';
|
|
2
|
+
import type { AlertManager, ContactPoint, DataSource, GlobalApiCreateGrafanaUserRequest, GlobalApiResetGrafanaUserPasswordRequest, GlobalApiSelectPlanRequest, GlobalApiSyncGrafanaDataSourcesRequest, Grafana, GrafanaProductDashboard, GrafanaUser, ListContactPointsResponse, ListDataSourcesResponse, ListGrafanaProductDashboardsResponse, ListGrafanaUsersResponse, ListManagedAlertsResponse, ListPlansResponse, ListTokensResponse, Plan, RegionalApiCreateContactPointRequest, RegionalApiCreateDataSourceRequest, RegionalApiCreateTokenRequest, RegionalApiDeleteContactPointRequest, RegionalApiDisableAlertManagerRequest, RegionalApiDisableManagedAlertsRequest, RegionalApiEnableAlertManagerRequest, RegionalApiEnableManagedAlertsRequest, RegionalApiTriggerTestAlertRequest, Token, UsageOverview } from './types.gen';
|
|
3
3
|
export declare const unmarshalContactPoint: (data: unknown) => ContactPoint;
|
|
4
4
|
export declare const unmarshalDataSource: (data: unknown) => DataSource;
|
|
5
5
|
export declare const unmarshalGrafanaProductDashboard: (data: unknown) => GrafanaProductDashboard;
|
|
@@ -12,6 +12,7 @@ export declare const unmarshalListContactPointsResponse: (data: unknown) => List
|
|
|
12
12
|
export declare const unmarshalListDataSourcesResponse: (data: unknown) => ListDataSourcesResponse;
|
|
13
13
|
export declare const unmarshalListGrafanaProductDashboardsResponse: (data: unknown) => ListGrafanaProductDashboardsResponse;
|
|
14
14
|
export declare const unmarshalListGrafanaUsersResponse: (data: unknown) => ListGrafanaUsersResponse;
|
|
15
|
+
export declare const unmarshalListManagedAlertsResponse: (data: unknown) => ListManagedAlertsResponse;
|
|
15
16
|
export declare const unmarshalListPlansResponse: (data: unknown) => ListPlansResponse;
|
|
16
17
|
export declare const unmarshalListTokensResponse: (data: unknown) => ListTokensResponse;
|
|
17
18
|
export declare const unmarshalUsageOverview: (data: unknown) => UsageOverview;
|
|
@@ -179,6 +179,31 @@ const unmarshalListGrafanaUsersResponse = (data) => {
|
|
|
179
179
|
totalCount: data.total_count
|
|
180
180
|
};
|
|
181
181
|
};
|
|
182
|
+
const unmarshalAlert = (data) => {
|
|
183
|
+
if (!isJSONObject(data)) {
|
|
184
|
+
throw new TypeError(
|
|
185
|
+
`Unmarshalling the type 'Alert' failed as data isn't a dictionary.`
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
return {
|
|
189
|
+
description: data.description,
|
|
190
|
+
name: data.name,
|
|
191
|
+
product: data.product,
|
|
192
|
+
productFamily: data.product_family,
|
|
193
|
+
rule: data.rule
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
const unmarshalListManagedAlertsResponse = (data) => {
|
|
197
|
+
if (!isJSONObject(data)) {
|
|
198
|
+
throw new TypeError(
|
|
199
|
+
`Unmarshalling the type 'ListManagedAlertsResponse' failed as data isn't a dictionary.`
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
return {
|
|
203
|
+
alerts: unmarshalArrayOfObject(data.alerts, unmarshalAlert),
|
|
204
|
+
totalCount: data.total_count
|
|
205
|
+
};
|
|
206
|
+
};
|
|
182
207
|
const unmarshalListPlansResponse = (data) => {
|
|
183
208
|
if (!isJSONObject(data)) {
|
|
184
209
|
throw new TypeError(
|
|
@@ -317,6 +342,7 @@ export {
|
|
|
317
342
|
unmarshalListDataSourcesResponse,
|
|
318
343
|
unmarshalListGrafanaProductDashboardsResponse,
|
|
319
344
|
unmarshalListGrafanaUsersResponse,
|
|
345
|
+
unmarshalListManagedAlertsResponse,
|
|
320
346
|
unmarshalListPlansResponse,
|
|
321
347
|
unmarshalListTokensResponse,
|
|
322
348
|
unmarshalPlan,
|
|
@@ -4,6 +4,7 @@ export type DataSourceType = 'unknown_type' | 'metrics' | 'logs' | 'traces';
|
|
|
4
4
|
export type GrafanaUserRole = 'unknown_role' | 'editor' | 'viewer';
|
|
5
5
|
export type ListDataSourcesRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc' | 'type_asc' | 'type_desc';
|
|
6
6
|
export type ListGrafanaUsersRequestOrderBy = 'login_asc' | 'login_desc';
|
|
7
|
+
export type ListManagedAlertsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc' | 'type_asc' | 'type_desc';
|
|
7
8
|
export type ListPlansRequestOrderBy = 'name_asc' | 'name_desc';
|
|
8
9
|
export type ListTokensRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
|
|
9
10
|
export type PlanName = 'unknown_name' | 'free' | 'premium' | 'custom';
|
|
@@ -73,6 +74,13 @@ export interface GrafanaUser {
|
|
|
73
74
|
/** Grafana user's password. */
|
|
74
75
|
password?: string;
|
|
75
76
|
}
|
|
77
|
+
export interface Alert {
|
|
78
|
+
productFamily: string;
|
|
79
|
+
product: string;
|
|
80
|
+
name: string;
|
|
81
|
+
rule: string;
|
|
82
|
+
description: string;
|
|
83
|
+
}
|
|
76
84
|
/** Type of pricing plan. */
|
|
77
85
|
export interface Plan {
|
|
78
86
|
/** Name of a given pricing plan. */
|
|
@@ -272,6 +280,13 @@ export interface ListGrafanaUsersResponse {
|
|
|
272
280
|
/** Grafana users information. */
|
|
273
281
|
grafanaUsers: GrafanaUser[];
|
|
274
282
|
}
|
|
283
|
+
/** Response returned when listing data sources. */
|
|
284
|
+
export interface ListManagedAlertsResponse {
|
|
285
|
+
/** Total count of data sources matching the request. */
|
|
286
|
+
totalCount: number;
|
|
287
|
+
/** Alerts matching the request within the pagination. */
|
|
288
|
+
alerts: Alert[];
|
|
289
|
+
}
|
|
275
290
|
/** Output returned when listing pricing plans. */
|
|
276
291
|
export interface ListPlansResponse {
|
|
277
292
|
/** Total count of available pricing plans. */
|
|
@@ -488,6 +503,25 @@ export type RegionalApiListDataSourcesRequest = {
|
|
|
488
503
|
*/
|
|
489
504
|
types?: DataSourceType[];
|
|
490
505
|
};
|
|
506
|
+
/** Enable the sending of managed alerts. */
|
|
507
|
+
export type RegionalApiListManagedAlertsRequest = {
|
|
508
|
+
/**
|
|
509
|
+
* Region to target. If none is passed will use default region from the
|
|
510
|
+
* config.
|
|
511
|
+
*/
|
|
512
|
+
region?: Region;
|
|
513
|
+
/** Page number to return, from the paginated results. */
|
|
514
|
+
page?: number;
|
|
515
|
+
/** Number of data sources to return per page. */
|
|
516
|
+
pageSize?: number;
|
|
517
|
+
/** Sort order for data sources in the response. */
|
|
518
|
+
orderBy?: ListManagedAlertsRequestOrderBy;
|
|
519
|
+
/**
|
|
520
|
+
* Project ID to filter for, only data sources from this Project will be
|
|
521
|
+
* returned.
|
|
522
|
+
*/
|
|
523
|
+
projectId?: string;
|
|
524
|
+
};
|
|
491
525
|
/** List tokens. */
|
|
492
526
|
export type RegionalApiListTokensRequest = {
|
|
493
527
|
/**
|
|
@@ -32,6 +32,15 @@ const RegionalApiListDataSourcesRequest = {
|
|
|
32
32
|
lessThanOrEqual: 1e3
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
+
const RegionalApiListManagedAlertsRequest = {
|
|
36
|
+
page: {
|
|
37
|
+
greaterThanOrEqual: 1
|
|
38
|
+
},
|
|
39
|
+
pageSize: {
|
|
40
|
+
greaterThanOrEqual: 1,
|
|
41
|
+
lessThanOrEqual: 1e3
|
|
42
|
+
}
|
|
43
|
+
};
|
|
35
44
|
const RegionalApiListTokensRequest = {
|
|
36
45
|
page: {
|
|
37
46
|
greaterThanOrEqual: 1
|
|
@@ -45,4 +54,5 @@ exports.RegionalApiCreateDataSourceRequest = RegionalApiCreateDataSourceRequest;
|
|
|
45
54
|
exports.RegionalApiCreateTokenRequest = RegionalApiCreateTokenRequest;
|
|
46
55
|
exports.RegionalApiListContactPointsRequest = RegionalApiListContactPointsRequest;
|
|
47
56
|
exports.RegionalApiListDataSourcesRequest = RegionalApiListDataSourcesRequest;
|
|
57
|
+
exports.RegionalApiListManagedAlertsRequest = RegionalApiListManagedAlertsRequest;
|
|
48
58
|
exports.RegionalApiListTokensRequest = RegionalApiListTokensRequest;
|
|
@@ -30,6 +30,15 @@ export declare const RegionalApiListDataSourcesRequest: {
|
|
|
30
30
|
lessThanOrEqual: number;
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
+
export declare const RegionalApiListManagedAlertsRequest: {
|
|
34
|
+
page: {
|
|
35
|
+
greaterThanOrEqual: number;
|
|
36
|
+
};
|
|
37
|
+
pageSize: {
|
|
38
|
+
greaterThanOrEqual: number;
|
|
39
|
+
lessThanOrEqual: number;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
33
42
|
export declare const RegionalApiListTokensRequest: {
|
|
34
43
|
page: {
|
|
35
44
|
greaterThanOrEqual: number;
|
|
@@ -30,6 +30,15 @@ const RegionalApiListDataSourcesRequest = {
|
|
|
30
30
|
lessThanOrEqual: 1e3
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
|
+
const RegionalApiListManagedAlertsRequest = {
|
|
34
|
+
page: {
|
|
35
|
+
greaterThanOrEqual: 1
|
|
36
|
+
},
|
|
37
|
+
pageSize: {
|
|
38
|
+
greaterThanOrEqual: 1,
|
|
39
|
+
lessThanOrEqual: 1e3
|
|
40
|
+
}
|
|
41
|
+
};
|
|
33
42
|
const RegionalApiListTokensRequest = {
|
|
34
43
|
page: {
|
|
35
44
|
greaterThanOrEqual: 1
|
|
@@ -44,5 +53,6 @@ export {
|
|
|
44
53
|
RegionalApiCreateTokenRequest,
|
|
45
54
|
RegionalApiListContactPointsRequest,
|
|
46
55
|
RegionalApiListDataSourcesRequest,
|
|
56
|
+
RegionalApiListManagedAlertsRequest,
|
|
47
57
|
RegionalApiListTokensRequest
|
|
48
58
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { API } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
|
-
export type { Container, ContainerHttpOption, ContainerPrivacy, ContainerProtocol, ContainerStatus, CreateContainerRequest, CreateCronRequest, CreateDomainRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, CreateTriggerRequestMnqNatsClientConfig, CreateTriggerRequestMnqSqsClientConfig, CreateTriggerRequestSqsClientConfig, Cron, CronStatus, DeleteContainerRequest, DeleteCronRequest, DeleteDomainRequest, DeleteNamespaceRequest, DeleteTokenRequest, DeleteTriggerRequest, DeployContainerRequest, Domain, DomainStatus, GetContainerRequest, GetCronRequest, GetDomainRequest, GetNamespaceRequest, GetTokenRequest, GetTriggerRequest, IssueJWTRequest, ListContainersRequest, ListContainersRequestOrderBy, ListContainersResponse, ListCronsRequest, ListCronsRequestOrderBy, ListCronsResponse, ListDomainsRequest, ListDomainsRequestOrderBy, ListDomainsResponse, ListNamespacesRequest, ListNamespacesRequestOrderBy, ListNamespacesResponse, ListTokensRequest, ListTokensRequestOrderBy, ListTokensResponse, ListTriggersRequest, ListTriggersRequestOrderBy, ListTriggersResponse, Namespace, NamespaceStatus, Secret, SecretHashedValue, Token, TokenStatus, Trigger, TriggerInputType, TriggerMnqNatsClientConfig, TriggerMnqSqsClientConfig, TriggerSqsClientConfig, TriggerStatus, UpdateContainerRequest, UpdateCronRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UpdateTriggerRequestSqsClientConfig, } from './types.gen';
|
|
3
|
+
export type { Container, ContainerHttpOption, ContainerPrivacy, ContainerProtocol, ContainerSandbox, ContainerStatus, CreateContainerRequest, CreateCronRequest, CreateDomainRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, CreateTriggerRequestMnqNatsClientConfig, CreateTriggerRequestMnqSqsClientConfig, CreateTriggerRequestSqsClientConfig, Cron, CronStatus, DeleteContainerRequest, DeleteCronRequest, DeleteDomainRequest, DeleteNamespaceRequest, DeleteTokenRequest, DeleteTriggerRequest, DeployContainerRequest, Domain, DomainStatus, GetContainerRequest, GetCronRequest, GetDomainRequest, GetNamespaceRequest, GetTokenRequest, GetTriggerRequest, IssueJWTRequest, ListContainersRequest, ListContainersRequestOrderBy, ListContainersResponse, ListCronsRequest, ListCronsRequestOrderBy, ListCronsResponse, ListDomainsRequest, ListDomainsRequestOrderBy, ListDomainsResponse, ListNamespacesRequest, ListNamespacesRequestOrderBy, ListNamespacesResponse, ListTokensRequest, ListTokensRequestOrderBy, ListTokensResponse, ListTriggersRequest, ListTriggersRequestOrderBy, ListTriggersResponse, Namespace, NamespaceStatus, Secret, SecretHashedValue, Token, TokenStatus, Trigger, TriggerInputType, TriggerMnqNatsClientConfig, TriggerMnqSqsClientConfig, TriggerSqsClientConfig, TriggerStatus, UpdateContainerRequest, UpdateCronRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UpdateTriggerRequestSqsClientConfig, } from './types.gen';
|
|
4
4
|
export * as ValidationRules from './validation-rules.gen';
|
|
@@ -39,6 +39,7 @@ const unmarshalContainer = (data) => {
|
|
|
39
39
|
protocol: data.protocol,
|
|
40
40
|
region: data.region,
|
|
41
41
|
registryImage: data.registry_image,
|
|
42
|
+
sandbox: data.sandbox,
|
|
42
43
|
secretEnvironmentVariables: marshalling.unmarshalArrayOfObject(
|
|
43
44
|
data.secret_environment_variables,
|
|
44
45
|
unmarshalSecretHashedValue
|
|
@@ -262,6 +263,7 @@ const marshalCreateContainerRequest = (request, defaults) => ({
|
|
|
262
263
|
privacy: request.privacy,
|
|
263
264
|
protocol: request.protocol,
|
|
264
265
|
registry_image: request.registryImage,
|
|
266
|
+
sandbox: request.sandbox,
|
|
265
267
|
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
|
|
266
268
|
(elt) => marshalSecret(elt)
|
|
267
269
|
) : void 0,
|
|
@@ -350,6 +352,7 @@ const marshalUpdateContainerRequest = (request, defaults) => ({
|
|
|
350
352
|
protocol: request.protocol,
|
|
351
353
|
redeploy: request.redeploy,
|
|
352
354
|
registry_image: request.registryImage,
|
|
355
|
+
sandbox: request.sandbox,
|
|
353
356
|
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
|
|
354
357
|
(elt) => marshalSecret(elt)
|
|
355
358
|
) : void 0,
|
|
@@ -37,6 +37,7 @@ const unmarshalContainer = (data) => {
|
|
|
37
37
|
protocol: data.protocol,
|
|
38
38
|
region: data.region,
|
|
39
39
|
registryImage: data.registry_image,
|
|
40
|
+
sandbox: data.sandbox,
|
|
40
41
|
secretEnvironmentVariables: unmarshalArrayOfObject(
|
|
41
42
|
data.secret_environment_variables,
|
|
42
43
|
unmarshalSecretHashedValue
|
|
@@ -260,6 +261,7 @@ const marshalCreateContainerRequest = (request, defaults) => ({
|
|
|
260
261
|
privacy: request.privacy,
|
|
261
262
|
protocol: request.protocol,
|
|
262
263
|
registry_image: request.registryImage,
|
|
264
|
+
sandbox: request.sandbox,
|
|
263
265
|
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
|
|
264
266
|
(elt) => marshalSecret(elt)
|
|
265
267
|
) : void 0,
|
|
@@ -348,6 +350,7 @@ const marshalUpdateContainerRequest = (request, defaults) => ({
|
|
|
348
350
|
protocol: request.protocol,
|
|
349
351
|
redeploy: request.redeploy,
|
|
350
352
|
registry_image: request.registryImage,
|
|
353
|
+
sandbox: request.sandbox,
|
|
351
354
|
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
|
|
352
355
|
(elt) => marshalSecret(elt)
|
|
353
356
|
) : void 0,
|
|
@@ -2,6 +2,7 @@ import type { Region } from '../../../bridge';
|
|
|
2
2
|
export type ContainerHttpOption = 'unknown_http_option' | 'enabled' | 'redirected';
|
|
3
3
|
export type ContainerPrivacy = 'unknown_privacy' | 'public' | 'private';
|
|
4
4
|
export type ContainerProtocol = 'unknown_protocol' | 'http1' | 'h2c';
|
|
5
|
+
export type ContainerSandbox = 'unknown_sandbox' | 'v1' | 'v2';
|
|
5
6
|
export type ContainerStatus = 'unknown' | 'ready' | 'deleting' | 'error' | 'locked' | 'creating' | 'pending' | 'created';
|
|
6
7
|
export type CronStatus = 'unknown' | 'ready' | 'deleting' | 'error' | 'locked' | 'creating' | 'pending';
|
|
7
8
|
export type DomainStatus = 'unknown' | 'ready' | 'deleting' | 'error' | 'creating' | 'pending';
|
|
@@ -131,6 +132,8 @@ export interface Container {
|
|
|
131
132
|
* - Enabled: Serve both HTTP and HTTPS traffic.
|
|
132
133
|
*/
|
|
133
134
|
httpOption: ContainerHttpOption;
|
|
135
|
+
/** Execution environment of the container. */
|
|
136
|
+
sandbox: ContainerSandbox;
|
|
134
137
|
/** Region in which the container will be deployed. */
|
|
135
138
|
region: Region;
|
|
136
139
|
}
|
|
@@ -302,6 +305,8 @@ export type CreateContainerRequest = {
|
|
|
302
305
|
* - Enabled: Serve both HTTP and HTTPS traffic.
|
|
303
306
|
*/
|
|
304
307
|
httpOption?: ContainerHttpOption;
|
|
308
|
+
/** Execution environment of the container. */
|
|
309
|
+
sandbox?: ContainerSandbox;
|
|
305
310
|
};
|
|
306
311
|
export type CreateCronRequest = {
|
|
307
312
|
/**
|
|
@@ -731,6 +736,8 @@ export type UpdateContainerRequest = {
|
|
|
731
736
|
* - Enabled: Serve both HTTP and HTTPS traffic.
|
|
732
737
|
*/
|
|
733
738
|
httpOption?: ContainerHttpOption;
|
|
739
|
+
/** Execution environment of the container. */
|
|
740
|
+
sandbox?: ContainerSandbox;
|
|
734
741
|
};
|
|
735
742
|
export type UpdateCronRequest = {
|
|
736
743
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { API } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
|
-
export type { CreateCronRequest, CreateDomainRequest, CreateFunctionRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, CreateTriggerRequestMnqNatsClientConfig, CreateTriggerRequestMnqSqsClientConfig, CreateTriggerRequestSqsClientConfig, Cron, CronStatus, DeleteCronRequest, DeleteDomainRequest, DeleteFunctionRequest, DeleteNamespaceRequest, DeleteTokenRequest, DeleteTriggerRequest, DeployFunctionRequest, Domain, DomainStatus, DownloadURL, Function, FunctionHttpOption, FunctionPrivacy, FunctionRuntime, FunctionStatus, GetCronRequest, GetDomainRequest, GetFunctionDownloadURLRequest, GetFunctionRequest, GetFunctionUploadURLRequest, GetNamespaceRequest, GetTokenRequest, GetTriggerRequest, IssueJWTRequest, ListCronsRequest, ListCronsRequestOrderBy, ListCronsResponse, ListDomainsRequest, ListDomainsRequestOrderBy, ListDomainsResponse, ListFunctionRuntimesRequest, ListFunctionRuntimesResponse, ListFunctionsRequest, ListFunctionsRequestOrderBy, ListFunctionsResponse, ListNamespacesRequest, ListNamespacesRequestOrderBy, ListNamespacesResponse, ListTokensRequest, ListTokensRequestOrderBy, ListTokensResponse, ListTriggersRequest, ListTriggersRequestOrderBy, ListTriggersResponse, Namespace, NamespaceStatus, Runtime, RuntimeStatus, Secret, SecretHashedValue, Token, TokenStatus, Trigger, TriggerInputType, TriggerMnqNatsClientConfig, TriggerMnqSqsClientConfig, TriggerSqsClientConfig, TriggerStatus, UpdateCronRequest, UpdateFunctionRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UpdateTriggerRequestSqsClientConfig, UploadURL, } from './types.gen';
|
|
3
|
+
export type { CreateCronRequest, CreateDomainRequest, CreateFunctionRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, CreateTriggerRequestMnqNatsClientConfig, CreateTriggerRequestMnqSqsClientConfig, CreateTriggerRequestSqsClientConfig, Cron, CronStatus, DeleteCronRequest, DeleteDomainRequest, DeleteFunctionRequest, DeleteNamespaceRequest, DeleteTokenRequest, DeleteTriggerRequest, DeployFunctionRequest, Domain, DomainStatus, DownloadURL, Function, FunctionHttpOption, FunctionPrivacy, FunctionRuntime, FunctionSandbox, FunctionStatus, GetCronRequest, GetDomainRequest, GetFunctionDownloadURLRequest, GetFunctionRequest, GetFunctionUploadURLRequest, GetNamespaceRequest, GetTokenRequest, GetTriggerRequest, IssueJWTRequest, ListCronsRequest, ListCronsRequestOrderBy, ListCronsResponse, ListDomainsRequest, ListDomainsRequestOrderBy, ListDomainsResponse, ListFunctionRuntimesRequest, ListFunctionRuntimesResponse, ListFunctionsRequest, ListFunctionsRequestOrderBy, ListFunctionsResponse, ListNamespacesRequest, ListNamespacesRequestOrderBy, ListNamespacesResponse, ListTokensRequest, ListTokensRequestOrderBy, ListTokensResponse, ListTriggersRequest, ListTriggersRequestOrderBy, ListTriggersResponse, Namespace, NamespaceStatus, Runtime, RuntimeStatus, Secret, SecretHashedValue, Token, TokenStatus, Trigger, TriggerInputType, TriggerMnqNatsClientConfig, TriggerMnqSqsClientConfig, TriggerSqsClientConfig, TriggerStatus, UpdateCronRequest, UpdateFunctionRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UpdateTriggerRequestSqsClientConfig, UploadURL, } from './types.gen';
|
|
4
4
|
export * as ValidationRules from './validation-rules.gen';
|
|
@@ -69,6 +69,7 @@ const unmarshalFunction = (data) => {
|
|
|
69
69
|
region: data.region,
|
|
70
70
|
runtime: data.runtime,
|
|
71
71
|
runtimeMessage: data.runtime_message,
|
|
72
|
+
sandbox: data.sandbox,
|
|
72
73
|
secretEnvironmentVariables: marshalling.unmarshalArrayOfObject(
|
|
73
74
|
data.secret_environment_variables,
|
|
74
75
|
unmarshalSecretHashedValue
|
|
@@ -321,6 +322,7 @@ const marshalCreateFunctionRequest = (request, defaults) => ({
|
|
|
321
322
|
namespace_id: request.namespaceId,
|
|
322
323
|
privacy: request.privacy,
|
|
323
324
|
runtime: request.runtime,
|
|
325
|
+
sandbox: request.sandbox,
|
|
324
326
|
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
|
|
325
327
|
(elt) => marshalSecret(elt)
|
|
326
328
|
) : void 0,
|
|
@@ -402,6 +404,7 @@ const marshalUpdateFunctionRequest = (request, defaults) => ({
|
|
|
402
404
|
privacy: request.privacy,
|
|
403
405
|
redeploy: request.redeploy,
|
|
404
406
|
runtime: request.runtime,
|
|
407
|
+
sandbox: request.sandbox,
|
|
405
408
|
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
|
|
406
409
|
(elt) => marshalSecret(elt)
|
|
407
410
|
) : void 0,
|
|
@@ -67,6 +67,7 @@ const unmarshalFunction = (data) => {
|
|
|
67
67
|
region: data.region,
|
|
68
68
|
runtime: data.runtime,
|
|
69
69
|
runtimeMessage: data.runtime_message,
|
|
70
|
+
sandbox: data.sandbox,
|
|
70
71
|
secretEnvironmentVariables: unmarshalArrayOfObject(
|
|
71
72
|
data.secret_environment_variables,
|
|
72
73
|
unmarshalSecretHashedValue
|
|
@@ -319,6 +320,7 @@ const marshalCreateFunctionRequest = (request, defaults) => ({
|
|
|
319
320
|
namespace_id: request.namespaceId,
|
|
320
321
|
privacy: request.privacy,
|
|
321
322
|
runtime: request.runtime,
|
|
323
|
+
sandbox: request.sandbox,
|
|
322
324
|
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
|
|
323
325
|
(elt) => marshalSecret(elt)
|
|
324
326
|
) : void 0,
|
|
@@ -400,6 +402,7 @@ const marshalUpdateFunctionRequest = (request, defaults) => ({
|
|
|
400
402
|
privacy: request.privacy,
|
|
401
403
|
redeploy: request.redeploy,
|
|
402
404
|
runtime: request.runtime,
|
|
405
|
+
sandbox: request.sandbox,
|
|
403
406
|
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
|
|
404
407
|
(elt) => marshalSecret(elt)
|
|
405
408
|
) : void 0,
|
|
@@ -3,7 +3,8 @@ export type CronStatus = 'unknown' | 'ready' | 'deleting' | 'error' | 'locked' |
|
|
|
3
3
|
export type DomainStatus = 'unknown' | 'ready' | 'deleting' | 'error' | 'creating' | 'pending';
|
|
4
4
|
export type FunctionHttpOption = 'unknown_http_option' | 'enabled' | 'redirected';
|
|
5
5
|
export type FunctionPrivacy = 'unknown_privacy' | 'public' | 'private';
|
|
6
|
-
export type FunctionRuntime = 'unknown_runtime' | 'golang' | 'python' | 'python3' | 'node8' | 'node10' | 'node14' | 'node16' | 'node17' | 'python37' | 'python38' | 'python39' | 'python310' | 'go113' | 'go117' | 'go118' | 'node18' | 'rust165' | 'go119' | 'python311' | 'php82' | 'node19' | 'go120' | 'node20' | 'go121' | 'node22' | 'python312' | 'php83' | 'go122' | '
|
|
6
|
+
export type FunctionRuntime = 'unknown_runtime' | 'golang' | 'python' | 'python3' | 'node8' | 'node10' | 'node14' | 'node16' | 'node17' | 'python37' | 'python38' | 'python39' | 'python310' | 'go113' | 'go117' | 'go118' | 'node18' | 'rust165' | 'go119' | 'python311' | 'php82' | 'node19' | 'go120' | 'node20' | 'go121' | 'node22' | 'python312' | 'php83' | 'go122' | 'rust179';
|
|
7
|
+
export type FunctionSandbox = 'unknown_sandbox' | 'v1' | 'v2';
|
|
7
8
|
export type FunctionStatus = 'unknown' | 'ready' | 'deleting' | 'error' | 'locked' | 'creating' | 'pending' | 'created';
|
|
8
9
|
export type ListCronsRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
9
10
|
export type ListDomainsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'hostname_asc' | 'hostname_desc';
|
|
@@ -170,6 +171,8 @@ export interface Function {
|
|
|
170
171
|
*/
|
|
171
172
|
httpOption: FunctionHttpOption;
|
|
172
173
|
runtimeMessage: string;
|
|
174
|
+
/** Execution environment of the function. */
|
|
175
|
+
sandbox: FunctionSandbox;
|
|
173
176
|
}
|
|
174
177
|
export interface Namespace {
|
|
175
178
|
/** UUID of the namespace. */
|
|
@@ -327,6 +330,8 @@ export type CreateFunctionRequest = {
|
|
|
327
330
|
* - Enabled: Serve both HTTP and HTTPS traffic.
|
|
328
331
|
*/
|
|
329
332
|
httpOption?: FunctionHttpOption;
|
|
333
|
+
/** Execution environment of the function. */
|
|
334
|
+
sandbox?: FunctionSandbox;
|
|
330
335
|
};
|
|
331
336
|
export type CreateNamespaceRequest = {
|
|
332
337
|
/**
|
|
@@ -776,6 +781,8 @@ export type UpdateFunctionRequest = {
|
|
|
776
781
|
* - Enabled: Serve both HTTP and HTTPS traffic.
|
|
777
782
|
*/
|
|
778
783
|
httpOption?: FunctionHttpOption;
|
|
784
|
+
/** Execution environment of the function. */
|
|
785
|
+
sandbox?: FunctionSandbox;
|
|
779
786
|
};
|
|
780
787
|
export type UpdateNamespaceRequest = {
|
|
781
788
|
/**
|