Skip to content

Commit

Permalink
fix(web) move registration types to their own file
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Jul 22, 2024
1 parent 03bcc0d commit b06984c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 18 deletions.
38 changes: 38 additions & 0 deletions web/src/types/registration.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright (c) [2024] SUSE LLC
*
* All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as published
* by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, contact SUSE LLC.
*
* To contact SUSE LLC about this file by physical or electronic mail, you may
* find current contact information at www.suse.com.
*/

type Registration = {
/** Registration requirement (i.e., "not-required", "optional", "mandatory") */
requirement: string;
/** Registration code, if any */
code?: string;
/** Registration email, if any */
email?: string;
};

type RegistrationFailure = {
/** @property {Number} id - ID of error */
id: number;
/** Failure message */
message: number;
};

export type { Registration, RegistrationFailure };
18 changes: 0 additions & 18 deletions web/src/types/software.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,6 @@ type Product = {
description: string;
};

type Registration = {
/** Registration requirement (i.e., "not-required", "optional", "mandatory") */
requirement: string;
/** Registration code, if any */
code?: string;
/** Registration email, if any */
email?: string;
};

type RegistrationFailure = {
/** @property {Number} id - ID of error */
id: number;
/** Failure message */
message: number;
};

type ActionResult = {
/** Whether the action was successfully done */
success: boolean;
Expand Down Expand Up @@ -108,8 +92,6 @@ export type {
PatternsGroups,
PatternsSelection,
Product,
Registration,
RegistrationFailure,
SoftwareConfig,
SoftwareProposal,
};

0 comments on commit b06984c

Please sign in to comment.