@northern.tech/store 0.1.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/.eslintrc.cjs +9 -0
- package/.prettierignore +1 -0
- package/CHANGELOG.md +12 -0
- package/actions.ts +32 -0
- package/api/general-api.test.ts +51 -0
- package/api/general-api.ts +60 -0
- package/api/types/AWSCredentials.ts +16 -0
- package/api/types/Actor.ts +35 -0
- package/api/types/Addon.ts +17 -0
- package/api/types/AddonTenantadm.ts +17 -0
- package/api/types/Alert.ts +34 -0
- package/api/types/AlertDetails.ts +23 -0
- package/api/types/AlertSubject.ts +23 -0
- package/api/types/ApiBurst.ts +21 -0
- package/api/types/ApiBurstTenantadm.ts +21 -0
- package/api/types/ApiLimits.ts +16 -0
- package/api/types/ApiLimitsTenantadm.ts +16 -0
- package/api/types/ApiQuota.ts +17 -0
- package/api/types/ApiQuotaTenantadm.ts +17 -0
- package/api/types/Artifact.ts +48 -0
- package/api/types/ArtifactDeployments.ts +48 -0
- package/api/types/ArtifactInfo.ts +11 -0
- package/api/types/ArtifactInfoDeployments.ts +11 -0
- package/api/types/ArtifactLink.ts +11 -0
- package/api/types/ArtifactTypeInfo.ts +13 -0
- package/api/types/ArtifactTypeInfoDeployments.ts +13 -0
- package/api/types/ArtifactUpdate.ts +10 -0
- package/api/types/ArtifactUploadLink.ts +15 -0
- package/api/types/Attribute.ts +36 -0
- package/api/types/AttributeInventory.ts +32 -0
- package/api/types/AuditLog.ts +26 -0
- package/api/types/AuthSet.ts +33 -0
- package/api/types/AuthSetDeviceauth.ts +37 -0
- package/api/types/AutoAuthRequest.ts +23 -0
- package/api/types/AzureSharedAccessSecret.ts +11 -0
- package/api/types/BillingInfo.ts +13 -0
- package/api/types/BinaryDeltaConfiguration.ts +15 -0
- package/api/types/BinaryDeltaConfigurationDeployments.ts +15 -0
- package/api/types/BinaryDeltaLimits.ts +15 -0
- package/api/types/BinaryDeltaLimitsDeployments.ts +15 -0
- package/api/types/BoundingBox.ts +11 -0
- package/api/types/CancelRequest.ts +10 -0
- package/api/types/CardData.ts +49 -0
- package/api/types/CardSetupData.ts +17 -0
- package/api/types/CheckoutData.ts +13 -0
- package/api/types/Configuration.ts +11 -0
- package/api/types/Count.ts +13 -0
- package/api/types/Credentials.ts +23 -0
- package/api/types/DBusSubsystem.ts +27 -0
- package/api/types/DeltaConfiguration.ts +14 -0
- package/api/types/DeltaConfigurationDeployments.ts +14 -0
- package/api/types/Deployment.ts +95 -0
- package/api/types/DeploymentAggregation.ts +18 -0
- package/api/types/DeploymentAggregationItem.ts +18 -0
- package/api/types/DeploymentAggregationTerm.ts +23 -0
- package/api/types/DeploymentAggregationTerms.ts +18 -0
- package/api/types/DeploymentAttributeProjection.ts +11 -0
- package/api/types/DeploymentAuditlogs.ts +11 -0
- package/api/types/DeploymentDeployments.ts +99 -0
- package/api/types/DeploymentFilterTerm.ts +37 -0
- package/api/types/DeploymentIdentifier.ts +10 -0
- package/api/types/DeploymentPhase.ts +23 -0
- package/api/types/DeploymentReporting.ts +46 -0
- package/api/types/DeploymentSearchTerms.ts +39 -0
- package/api/types/DeploymentSortTerm.ts +25 -0
- package/api/types/DeploymentStatistics.ts +15 -0
- package/api/types/DeploymentStatusStatistics.ts +54 -0
- package/api/types/Device.ts +29 -0
- package/api/types/DeviceAggregation.ts +18 -0
- package/api/types/DeviceAggregationItem.ts +18 -0
- package/api/types/DeviceAggregationTerm.ts +27 -0
- package/api/types/DeviceAggregationTerms.ts +22 -0
- package/api/types/DeviceAttribute.ts +23 -0
- package/api/types/DeviceAttributeProjection.ts +15 -0
- package/api/types/DeviceAuditlogs.ts +17 -0
- package/api/types/DeviceAuthEvent.ts +23 -0
- package/api/types/DeviceConfiguration.ts +16 -0
- package/api/types/DeviceDeployment.ts +11 -0
- package/api/types/DeviceDeployments.ts +31 -0
- package/api/types/DeviceDeviceauth.ts +42 -0
- package/api/types/DeviceFilterAttribute.ts +22 -0
- package/api/types/DeviceFilterTerm.ts +41 -0
- package/api/types/DeviceInventory.ts +19 -0
- package/api/types/DeviceInventoryInventory.ts +19 -0
- package/api/types/DeviceReporting.ts +22 -0
- package/api/types/DeviceSearchTerms.ts +39 -0
- package/api/types/DeviceSortTerm.ts +29 -0
- package/api/types/DeviceState.ts +32 -0
- package/api/types/DeviceStateDeviceconnect.ts +33 -0
- package/api/types/DeviceStateIot_manager.ts +14 -0
- package/api/types/DeviceStatus.ts +19 -0
- package/api/types/DeviceWithImage.ts +80 -0
- package/api/types/DirectUploadMetadata.ts +18 -0
- package/api/types/EmailVerificationCompletion.ts +13 -0
- package/api/types/EmailVerificationRequest.ts +13 -0
- package/api/types/Error.ts +17 -0
- package/api/types/ErrorAuditlogs.ts +13 -0
- package/api/types/ErrorDeployments.ts +17 -0
- package/api/types/ErrorDeviceauth.ts +13 -0
- package/api/types/ErrorDeviceconfig.ts +17 -0
- package/api/types/ErrorDeviceconnect.ts +17 -0
- package/api/types/ErrorDevicemonitor.ts +17 -0
- package/api/types/ErrorExt.ts +18 -0
- package/api/types/ErrorInventory.ts +17 -0
- package/api/types/ErrorIot_manager.ts +17 -0
- package/api/types/ErrorNotFound.ts +17 -0
- package/api/types/ErrorReporting.ts +18 -0
- package/api/types/ErrorTenantadm.ts +13 -0
- package/api/types/ErrorUseradm.ts +17 -0
- package/api/types/Event.ts +48 -0
- package/api/types/ExternalIdentity.ts +17 -0
- package/api/types/Features.ts +17 -0
- package/api/types/FileUpload.ts +23 -0
- package/api/types/Filter.ts +19 -0
- package/api/types/FilterAttribute.ts +21 -0
- package/api/types/FilterDefinition.ts +18 -0
- package/api/types/FilterDeployments.ts +19 -0
- package/api/types/FilterInventory.ts +20 -0
- package/api/types/FilterPredicate.ts +78 -0
- package/api/types/FilterPredicateDeployments.ts +48 -0
- package/api/types/FilterPredicateInventory.ts +76 -0
- package/api/types/GeoBoundingBox.ts +10 -0
- package/api/types/GeoBoundingBoxFilter.ts +6 -0
- package/api/types/GeoDistance.ts +17 -0
- package/api/types/GeoDistanceFilter.ts +10 -0
- package/api/types/GeoPoint.ts +15 -0
- package/api/types/Group.ts +10 -0
- package/api/types/HTTP.ts +19 -0
- package/api/types/IdentityData.ts +25 -0
- package/api/types/InputParameter.ts +8 -0
- package/api/types/Integration.ts +24 -0
- package/api/types/JobStatus.ts +13 -0
- package/api/types/Limit.ts +21 -0
- package/api/types/LimitDeployments.ts +21 -0
- package/api/types/LimitDeviceauth.ts +10 -0
- package/api/types/LimitUseradm.ts +11 -0
- package/api/types/Limits.ts +11 -0
- package/api/types/LineDescriptor.ts +11 -0
- package/api/types/LogSubsystem.ts +23 -0
- package/api/types/LoginOptions.ts +18 -0
- package/api/types/ManagementAPIConfiguration.ts +5 -0
- package/api/types/MenderTypes.ts +183 -0
- package/api/types/MonitorConfiguration.ts +22 -0
- package/api/types/NewConfigurationDeployment.ts +15 -0
- package/api/types/NewConfigurationDeploymentResponse.ts +10 -0
- package/api/types/NewDeployment.ts +42 -0
- package/api/types/NewDeploymentForGroup.ts +33 -0
- package/api/types/NewDeploymentPhase.ts +37 -0
- package/api/types/NewDeploymentPhaseDeployments.ts +20 -0
- package/api/types/NewDeploymentV2.ts +31 -0
- package/api/types/NewTenant.ts +41 -0
- package/api/types/Object.ts +35 -0
- package/api/types/OwnUserUpdate.ts +21 -0
- package/api/types/PasswordResetCompletion.ts +17 -0
- package/api/types/PasswordResetRequest.ts +13 -0
- package/api/types/Permission.ts +21 -0
- package/api/types/PermissionObject.ts +14 -0
- package/api/types/PermissionSet.ts +22 -0
- package/api/types/PermissionSetWithScope.ts +15 -0
- package/api/types/PersonalAccessToken.ts +29 -0
- package/api/types/PersonalAccessTokenRequest.ts +18 -0
- package/api/types/Plan.ts +19 -0
- package/api/types/PlanBindingDetails.ts +13 -0
- package/api/types/PlanChangeRequest.ts +14 -0
- package/api/types/PlanLimits.ts +12 -0
- package/api/types/PreAuthSet.ts +16 -0
- package/api/types/Release.ts +32 -0
- package/api/types/ReleaseDeployments.ts +32 -0
- package/api/types/ReleaseUpdate.ts +13 -0
- package/api/types/Releases.ts +9 -0
- package/api/types/ReleasesDeleteError.ts +21 -0
- package/api/types/ReleasesDeployments.ts +9 -0
- package/api/types/Role.ts +19 -0
- package/api/types/RolePermission.ts +25 -0
- package/api/types/RolePermissionObject.ts +17 -0
- package/api/types/RoleUseradm.ts +19 -0
- package/api/types/SAMLMetadata.ts +21 -0
- package/api/types/Scope.ts +19 -0
- package/api/types/SelectAttribute.ts +17 -0
- package/api/types/ServiceSubsystem.ts +19 -0
- package/api/types/Settings.ts +23 -0
- package/api/types/SortCriteria.ts +30 -0
- package/api/types/SsoObject.ts +21 -0
- package/api/types/Status.ts +17 -0
- package/api/types/StatusDeviceauth.ts +18 -0
- package/api/types/StatusTenantadm.ts +19 -0
- package/api/types/StorageLimit.ts +17 -0
- package/api/types/SubscriptionData.ts +8 -0
- package/api/types/SupportRequest.ts +17 -0
- package/api/types/Tag.ts +27 -0
- package/api/types/Tags.ts +10 -0
- package/api/types/TaskResult.ts +13 -0
- package/api/types/TaskResultCLI.ts +10 -0
- package/api/types/TaskResultHTTPRequest.ts +8 -0
- package/api/types/TaskResultHTTPResponse.ts +10 -0
- package/api/types/Tenant.ts +38 -0
- package/api/types/TenantApiLimits.ts +12 -0
- package/api/types/TenantApiLimitsTenantadm.ts +12 -0
- package/api/types/TenantIdName.ts +14 -0
- package/api/types/TenantIdsData.ts +10 -0
- package/api/types/TenantInfo.ts +14 -0
- package/api/types/TenantShortInfo.ts +21 -0
- package/api/types/TenantTenantadm.ts +38 -0
- package/api/types/TenantsIdName.ts +6 -0
- package/api/types/Update.ts +17 -0
- package/api/types/UpdateDeployments.ts +18 -0
- package/api/types/UpdateFile.ts +13 -0
- package/api/types/UpdateFileDeployments.ts +13 -0
- package/api/types/UpdateTypes.ts +8 -0
- package/api/types/UpgradeCompleteRequest.ts +23 -0
- package/api/types/User.ts +13 -0
- package/api/types/UserAuditlogs.ts +13 -0
- package/api/types/UserNew.ts +26 -0
- package/api/types/UserUpdate.ts +25 -0
- package/api/types/UserUseradm.ts +45 -0
- package/api/types/UserWithTenantInfo.ts +8 -0
- package/api/types/XDeltaArgs.ts +9 -0
- package/api/types/XDeltaArgsDeployments.ts +9 -0
- package/api/types/XDeltaArgsLimits.ts +10 -0
- package/api/types/XDeltaArgsLimitsDeployments.ts +10 -0
- package/api/users-api.ts +34 -0
- package/appSlice/constants.ts +166 -0
- package/appSlice/index.ts +159 -0
- package/appSlice/reducer.test.ts +97 -0
- package/appSlice/selectors.ts +33 -0
- package/appSlice/thunks.test.ts +118 -0
- package/appSlice/thunks.ts +148 -0
- package/auth.test.ts +36 -0
- package/auth.ts +82 -0
- package/commonConstants.tsx +252 -0
- package/commonSelectors.ts +255 -0
- package/constants.ts +22 -0
- package/deploymentsSlice/constants.ts +175 -0
- package/deploymentsSlice/index.ts +145 -0
- package/deploymentsSlice/reducer.test.ts +108 -0
- package/deploymentsSlice/selectors.ts +58 -0
- package/deploymentsSlice/thunks.test.ts +425 -0
- package/deploymentsSlice/thunks.ts +382 -0
- package/devicesSlice/constants.ts +56 -0
- package/devicesSlice/index.ts +207 -0
- package/devicesSlice/reducer.test.ts +194 -0
- package/devicesSlice/selectors.ts +127 -0
- package/devicesSlice/thunks.test.tsx +1245 -0
- package/devicesSlice/thunks.tsx +1098 -0
- package/monitorSlice/constants.ts +17 -0
- package/monitorSlice/index.ts +65 -0
- package/monitorSlice/reducer.test.ts +79 -0
- package/monitorSlice/selectors.ts +15 -0
- package/monitorSlice/thunks.test.ts +112 -0
- package/monitorSlice/thunks.ts +101 -0
- package/onboardingSlice/constants.ts +53 -0
- package/onboardingSlice/index.ts +60 -0
- package/onboardingSlice/reducer.test.ts +45 -0
- package/onboardingSlice/selectors.ts +15 -0
- package/onboardingSlice/thunks.test.ts +235 -0
- package/onboardingSlice/thunks.ts +142 -0
- package/organizationSlice/constants.ts +82 -0
- package/organizationSlice/index.ts +111 -0
- package/organizationSlice/reducer.test.ts +78 -0
- package/organizationSlice/selectors.ts +45 -0
- package/organizationSlice/thunks.test.ts +619 -0
- package/organizationSlice/thunks.ts +383 -0
- package/package.json +38 -0
- package/releasesSlice/constants.ts +18 -0
- package/releasesSlice/index.ts +116 -0
- package/releasesSlice/reducer.test.ts +78 -0
- package/releasesSlice/selectors.ts +33 -0
- package/releasesSlice/thunks.test.ts +389 -0
- package/releasesSlice/thunks.ts +379 -0
- package/selectors.ts +22 -0
- package/store.ts +89 -0
- package/storehooks.test.tsx +386 -0
- package/storehooks.ts +250 -0
- package/thunks.ts +21 -0
- package/tsconfig.json +11 -0
- package/tsup.config.ts +11 -0
- package/usersSlice/constants.ts +374 -0
- package/usersSlice/index.ts +151 -0
- package/usersSlice/reducer.test.ts +141 -0
- package/usersSlice/selectors.ts +60 -0
- package/usersSlice/thunks.test.ts +660 -0
- package/usersSlice/thunks.ts +773 -0
- package/utils.test.ts +187 -0
- package/utils.ts +249 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Contact support request.
|
|
7
|
+
*/
|
|
8
|
+
export type SupportRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* Message subject.
|
|
11
|
+
*/
|
|
12
|
+
subject: string;
|
|
13
|
+
/**
|
|
14
|
+
* Message body.
|
|
15
|
+
*/
|
|
16
|
+
body: string;
|
|
17
|
+
};
|
package/api/types/Tag.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Tag descriptor.
|
|
7
|
+
*/
|
|
8
|
+
export type Tag = {
|
|
9
|
+
/**
|
|
10
|
+
* Tag is an attribute with 'tags' scope.
|
|
11
|
+
*
|
|
12
|
+
* A human readable, unique tag ID, e.g. 'location', 'environment', etc.
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* Tag description.
|
|
17
|
+
*/
|
|
18
|
+
description?: string;
|
|
19
|
+
/**
|
|
20
|
+
* The current value of the tag.
|
|
21
|
+
*/
|
|
22
|
+
value: string;
|
|
23
|
+
/**
|
|
24
|
+
* The date and time of last tag update in RFC3339 format.
|
|
25
|
+
*/
|
|
26
|
+
timestamp?: string;
|
|
27
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Tags assigned to the release used for filtering releases. Each tag
|
|
7
|
+
* must be valid a ASCII string and contain only lowercase and uppercase
|
|
8
|
+
* letters, digits, underscores, periods and hyphens.
|
|
9
|
+
*/
|
|
10
|
+
export type Tags = Array<string>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { TaskResultCLI } from "./TaskResultCLI";
|
|
6
|
+
import type { TaskResultHTTPRequest } from "./TaskResultHTTPRequest";
|
|
7
|
+
import type { TaskResultHTTPResponse } from "./TaskResultHTTPResponse";
|
|
8
|
+
export type TaskResult = {
|
|
9
|
+
success?: boolean;
|
|
10
|
+
cli?: TaskResultCLI;
|
|
11
|
+
request?: TaskResultHTTPRequest;
|
|
12
|
+
response?: TaskResultHTTPResponse;
|
|
13
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type TaskResultCLI = {
|
|
6
|
+
command?: Array<string>;
|
|
7
|
+
output?: string;
|
|
8
|
+
error?: string;
|
|
9
|
+
exitCode?: number;
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type TaskResultHTTPResponse = {
|
|
6
|
+
uri?: string;
|
|
7
|
+
method?: string;
|
|
8
|
+
headers?: Array<string>;
|
|
9
|
+
body?: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { Addon } from "./Addon";
|
|
6
|
+
import type { TenantApiLimits } from "./TenantApiLimits";
|
|
7
|
+
/**
|
|
8
|
+
* Tenant descriptor.
|
|
9
|
+
*/
|
|
10
|
+
export type Tenant = {
|
|
11
|
+
/**
|
|
12
|
+
* Tenant ID.
|
|
13
|
+
*/
|
|
14
|
+
id: string;
|
|
15
|
+
/**
|
|
16
|
+
* Name of the tenant's organization.
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
19
|
+
/**
|
|
20
|
+
* Currently used tenant token.
|
|
21
|
+
*/
|
|
22
|
+
tenant_token: string;
|
|
23
|
+
/**
|
|
24
|
+
* Status of the tenant account.
|
|
25
|
+
*/
|
|
26
|
+
status?: Tenant.status;
|
|
27
|
+
api_limits?: TenantApiLimits;
|
|
28
|
+
addons?: Array<Addon>;
|
|
29
|
+
};
|
|
30
|
+
export namespace Tenant {
|
|
31
|
+
/**
|
|
32
|
+
* Status of the tenant account.
|
|
33
|
+
*/
|
|
34
|
+
export enum status {
|
|
35
|
+
ACTIVE = "active",
|
|
36
|
+
SUSPENDED = "suspended",
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { ApiLimits } from "./ApiLimits";
|
|
6
|
+
/**
|
|
7
|
+
* API usage quota and burst limit definitions for a tenant - per API type.
|
|
8
|
+
*/
|
|
9
|
+
export type TenantApiLimits = {
|
|
10
|
+
management?: ApiLimits;
|
|
11
|
+
devices?: ApiLimits;
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { ApiLimits } from "./ApiLimits";
|
|
6
|
+
/**
|
|
7
|
+
* API usage quota and burst limit definitions for a tenant - per API type.
|
|
8
|
+
*/
|
|
9
|
+
export type TenantApiLimitsTenantadm = {
|
|
10
|
+
management?: ApiLimits;
|
|
11
|
+
devices?: ApiLimits;
|
|
12
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type TenantIdName = {
|
|
6
|
+
/**
|
|
7
|
+
* Tenant identifier.
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* Tenant name.
|
|
12
|
+
*/
|
|
13
|
+
name?: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type TenantInfo = {
|
|
6
|
+
/**
|
|
7
|
+
* Tenant identifier of a tenant, user will log in to by default.
|
|
8
|
+
*/
|
|
9
|
+
tenant_id?: string;
|
|
10
|
+
/**
|
|
11
|
+
* List of tenant Ids user can login to.
|
|
12
|
+
*/
|
|
13
|
+
tenant_ids?: Array<string>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Tenant short info.
|
|
7
|
+
*/
|
|
8
|
+
export type TenantShortInfo = {
|
|
9
|
+
/**
|
|
10
|
+
* Tenant ID.
|
|
11
|
+
*/
|
|
12
|
+
id: string;
|
|
13
|
+
/**
|
|
14
|
+
* Stripe Intent ID.
|
|
15
|
+
*/
|
|
16
|
+
intent_id?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Stripe client secret.
|
|
19
|
+
*/
|
|
20
|
+
secret: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { Addon } from "./Addon";
|
|
6
|
+
import type { TenantApiLimits } from "./TenantApiLimits";
|
|
7
|
+
/**
|
|
8
|
+
* Tenant descriptor.
|
|
9
|
+
*/
|
|
10
|
+
export type TenantTenantadm = {
|
|
11
|
+
/**
|
|
12
|
+
* Tenant ID.
|
|
13
|
+
*/
|
|
14
|
+
id: string;
|
|
15
|
+
/**
|
|
16
|
+
* Name of the tenant's organization.
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
19
|
+
/**
|
|
20
|
+
* Currently used tenant token.
|
|
21
|
+
*/
|
|
22
|
+
tenant_token: string;
|
|
23
|
+
/**
|
|
24
|
+
* Status of the tenant account.
|
|
25
|
+
*/
|
|
26
|
+
status?: TenantTenantadm.status;
|
|
27
|
+
api_limits?: TenantApiLimits;
|
|
28
|
+
addons?: Array<Addon>;
|
|
29
|
+
};
|
|
30
|
+
export namespace TenantTenantadm {
|
|
31
|
+
/**
|
|
32
|
+
* Status of the tenant account.
|
|
33
|
+
*/
|
|
34
|
+
export enum status {
|
|
35
|
+
ACTIVE = "active",
|
|
36
|
+
SUSPENDED = "suspended",
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { ArtifactTypeInfo } from "./ArtifactTypeInfo";
|
|
6
|
+
import type { UpdateFile } from "./UpdateFile";
|
|
7
|
+
/**
|
|
8
|
+
* Single updated to be applied.
|
|
9
|
+
*/
|
|
10
|
+
export type Update = {
|
|
11
|
+
type_info?: ArtifactTypeInfo;
|
|
12
|
+
files?: Array<UpdateFile>;
|
|
13
|
+
/**
|
|
14
|
+
* meta_data is an object of unknown structure as this is dependent of update type (also custom defined by user)
|
|
15
|
+
*/
|
|
16
|
+
meta_data?: Record<string, any>;
|
|
17
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { ArtifactTypeInfo } from "./ArtifactTypeInfo";
|
|
6
|
+
import type { UpdateFile } from "./UpdateFile";
|
|
7
|
+
/**
|
|
8
|
+
* Single updated to be applied.
|
|
9
|
+
*/
|
|
10
|
+
export type UpdateDeployments = {
|
|
11
|
+
type_info?: ArtifactTypeInfo;
|
|
12
|
+
files?: Array<UpdateFile>;
|
|
13
|
+
/**
|
|
14
|
+
* meta_data is an array of objects of unknown structure as this
|
|
15
|
+
* is dependent of update type (also custom defined by user)
|
|
16
|
+
*/
|
|
17
|
+
meta_data?: Array<any>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Information about particular update file.
|
|
7
|
+
*/
|
|
8
|
+
export type UpdateFile = {
|
|
9
|
+
name?: string;
|
|
10
|
+
checksum?: string;
|
|
11
|
+
size?: number;
|
|
12
|
+
date?: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Information about particular update file.
|
|
7
|
+
*/
|
|
8
|
+
export type UpdateFileDeployments = {
|
|
9
|
+
name?: string;
|
|
10
|
+
checksum?: string;
|
|
11
|
+
size?: number;
|
|
12
|
+
date?: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Upgrade a trial tenant to a given plan.
|
|
7
|
+
*/
|
|
8
|
+
export type UpgradeCompleteRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* customer plan
|
|
11
|
+
*/
|
|
12
|
+
plan: UpgradeCompleteRequest.plan;
|
|
13
|
+
};
|
|
14
|
+
export namespace UpgradeCompleteRequest {
|
|
15
|
+
/**
|
|
16
|
+
* customer plan
|
|
17
|
+
*/
|
|
18
|
+
export enum plan {
|
|
19
|
+
OS = "os",
|
|
20
|
+
PROFESSIONAL = "professional",
|
|
21
|
+
ENTERPRISE = "enterprise",
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* User descriptor.
|
|
7
|
+
*/
|
|
8
|
+
export type User = {
|
|
9
|
+
/**
|
|
10
|
+
* Email address of the user.
|
|
11
|
+
*/
|
|
12
|
+
email: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { SsoObject } from "./SsoObject";
|
|
6
|
+
/**
|
|
7
|
+
* New user descriptor.
|
|
8
|
+
*/
|
|
9
|
+
export type UserNew = {
|
|
10
|
+
/**
|
|
11
|
+
* A unique email address. Non-ascii characters are invalid.
|
|
12
|
+
*/
|
|
13
|
+
email: string;
|
|
14
|
+
/**
|
|
15
|
+
* Password.
|
|
16
|
+
*/
|
|
17
|
+
password?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Alternative login schemes
|
|
20
|
+
*/
|
|
21
|
+
login?: Record<string, any>;
|
|
22
|
+
/**
|
|
23
|
+
* SSO login schemes
|
|
24
|
+
*/
|
|
25
|
+
sso?: Array<SsoObject>;
|
|
26
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Update user information.
|
|
7
|
+
*/
|
|
8
|
+
export type UserUpdate = {
|
|
9
|
+
/**
|
|
10
|
+
* A unique email address.
|
|
11
|
+
*/
|
|
12
|
+
email?: string;
|
|
13
|
+
/**
|
|
14
|
+
* New password.
|
|
15
|
+
*/
|
|
16
|
+
password?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Current password.
|
|
19
|
+
*/
|
|
20
|
+
current_password?: string;
|
|
21
|
+
/**
|
|
22
|
+
* List of roles for the user. If not provided existing roles are kept.
|
|
23
|
+
*/
|
|
24
|
+
roles?: Array<string>;
|
|
25
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* User descriptor.
|
|
7
|
+
*/
|
|
8
|
+
export type UserUseradm = {
|
|
9
|
+
/**
|
|
10
|
+
* A unique email address.
|
|
11
|
+
*/
|
|
12
|
+
email: string;
|
|
13
|
+
/**
|
|
14
|
+
* User Id.
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* Server-side timestamp of the user creation.
|
|
19
|
+
*/
|
|
20
|
+
created_ts?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Server-side timestamp of the last user information update.
|
|
23
|
+
*/
|
|
24
|
+
updated_ts?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Timestamp the of last successful login.
|
|
27
|
+
*/
|
|
28
|
+
login_ts?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Indicates if the user's email address has been verified.
|
|
31
|
+
*/
|
|
32
|
+
verified?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* User Two Factor Authentication status.
|
|
35
|
+
*/
|
|
36
|
+
tfa_status?: string;
|
|
37
|
+
/**
|
|
38
|
+
* List of user roles.
|
|
39
|
+
*/
|
|
40
|
+
roles?: Array<string>;
|
|
41
|
+
/**
|
|
42
|
+
* Flag indicating wether to trigger password reset on user creation.
|
|
43
|
+
*/
|
|
44
|
+
send_reset_password?: boolean;
|
|
45
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { TenantInfo } from "./TenantInfo";
|
|
6
|
+
import type { TenantsIdName } from "./TenantsIdName";
|
|
7
|
+
import type { User } from "./User";
|
|
8
|
+
export type UserWithTenantInfo = User & TenantInfo & TenantsIdName;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* xdelta3 arguments. Please refer to the xdelta3 documentation
|
|
7
|
+
* for a detailed description of the different options.
|
|
8
|
+
*/
|
|
9
|
+
export type XDeltaArgs = {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* xdelta3 arguments. Please refer to the xdelta3 documentation
|
|
7
|
+
* for a detailed description of the different options.
|
|
8
|
+
*/
|
|
9
|
+
export type XDeltaArgsDeployments = {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Limits for arguments which will be passed to xdelta3.
|
|
7
|
+
* Please refer to the xdelta3 documentation
|
|
8
|
+
* for a detailed description of the different options.
|
|
9
|
+
*/
|
|
10
|
+
export type XDeltaArgsLimits = {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Limits for arguments which will be passed to xdelta3.
|
|
7
|
+
* Please refer to the xdelta3 documentation
|
|
8
|
+
* for a detailed description of the different options.
|
|
9
|
+
*/
|
|
10
|
+
export type XDeltaArgsLimitsDeployments = {};
|
package/api/users-api.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Copyright 2016 Northern.tech AS
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
// @ts-nocheck
|
|
15
|
+
import axios from 'axios';
|
|
16
|
+
|
|
17
|
+
import { getToken } from '../auth';
|
|
18
|
+
import { commonRequestConfig } from './general-api';
|
|
19
|
+
|
|
20
|
+
const Api = {
|
|
21
|
+
postLogin: (url, { email: username, password, ...body }) =>
|
|
22
|
+
axios
|
|
23
|
+
.post(url, body, { ...commonRequestConfig, auth: { username, password } })
|
|
24
|
+
.then(res => ({ text: res.data, code: res.status, contentType: res.headers?.['content-type'] })),
|
|
25
|
+
putVerifyTFA: (url, userData) => {
|
|
26
|
+
let body = {};
|
|
27
|
+
if (userData.hasOwnProperty('token2fa')) {
|
|
28
|
+
body = { token2fa: userData.token2fa };
|
|
29
|
+
}
|
|
30
|
+
return axios.put(url, body, { ...commonRequestConfig, headers: { ...commonRequestConfig.headers, Authorization: `Bearer ${getToken()}` } });
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default Api;
|