/* Options: Date: 2026-02-04 05:12:53 Version: 8.30 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.simplified.id/v2 //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: RegisterAccount.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; // @DataContract class Authentication implements IConvertible { /** * The API User ID provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-User) */ // @DataMember // @ApiMember(Description="The API User ID provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-User)", IsRequired=true, ParameterType="header, body") String? apiUserId; /** * The API User Key provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-Key) */ // @DataMember // @ApiMember(Description="The API User Key provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-Key)", IsRequired=true, ParameterType="header, body") String? apiUserKey; /** * The User ID of the user making the request (e.g. a sub user). This is optional but can be used to associate API requests with a specific user, thereby allowing user permissions to be enforced. Can be provided in the body, or as a header parameter (X-User-Id). */ // @DataMember // @ApiMember(Description="The User ID of the user making the request (e.g. a sub user). This is optional but can be used to associate API requests with a specific user, thereby allowing user permissions to be enforced. Can be provided in the body, or as a header parameter (X-User-Id).", ParameterType="header, body") String? userId; Authentication({this.apiUserId,this.apiUserKey,this.userId}); Authentication.fromJson(Map json) { fromMap(json); } fromMap(Map json) { apiUserId = json['apiUserId']; apiUserKey = json['apiUserKey']; userId = json['userId']; return this; } Map toJson() => { 'apiUserId': apiUserId, 'apiUserKey': apiUserKey, 'userId': userId }; getTypeName() => "Authentication"; TypeContext? context = _ctx; } // @DataContract class BaseRequest implements IBaseRequest, IConvertible { /** * The authentication credentials */ // @DataMember // @ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body") Authentication? authentication; BaseRequest({this.authentication}); BaseRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { authentication = JsonConverters.fromJson(json['authentication'],'Authentication',context!); return this; } Map toJson() => { 'authentication': JsonConverters.toJson(authentication,'Authentication',context!) }; getTypeName() => "BaseRequest"; TypeContext? context = _ctx; } abstract class IBaseRequest { Authentication? authentication; } class RegisterAccountRequest implements IConvertible { /** * The desired login username for the account */ // @ApiMember(Description="The desired login username for the account", IsRequired=true) String? username; /** * The password for account login */ // @ApiMember(Description="The password for account login", IsRequired=true) String? password; /** * The contact email address for the account holder */ // @ApiMember(Description="The contact email address for the account holder", IsRequired=true) String? email; /** * The full legal name of the account holder */ // @ApiMember(Description="The full legal name of the account holder", IsRequired=true) String? fullName; /** * The registered name of the company associated with this account */ // @ApiMember(Description="The registered name of the company associated with this account", IsRequired=true) String? companyName; /** * The primary contact phone number of the company */ // @ApiMember(Description="The primary contact phone number of the company", IsRequired=true) String? companyPhone; /** * The first line of the company’s address (e.g., street name and number) */ // @ApiMember(Description="The first line of the company’s address (e.g., street name and number)", IsRequired=true) String? address1; /** * The second line of the company’s address (optional) */ // @ApiMember(Description="The second line of the company’s address (optional)") String? address2; /** * The third line of the company’s address (optional) */ // @ApiMember(Description="The third line of the company’s address (optional)") String? address3; /** * The city where the company is located (optional) */ // @ApiMember(Description="The city where the company is located (optional)") String? city; /** * The postal or ZIP code of the company’s address */ // @ApiMember(Description="The postal or ZIP code of the company’s address", IsRequired=true) String? postcode; /** * The country where the company is registered */ // @ApiMember(Description="The country where the company is registered", IsRequired=true) String? country; /** * The classification of the company (e.g., LLC, Corporation, Sole Proprietorship) */ // @ApiMember(Description="The classification of the company (e.g., LLC, Corporation, Sole Proprietorship)", IsRequired=true) String? companyType; /** * The industry sector the company operates in */ // @ApiMember(Description="The industry sector the company operates in", IsRequired=true) String? companyIndustry; /** * The trade body, network, or affiliation the company is a member of (if applicable) */ // @ApiMember(Description="The trade body, network, or affiliation the company is a member of (if applicable)") String? companyNetwork; /** * Indicates agreement to the terms and conditions (required) */ // @ApiMember(Description="Indicates agreement to the terms and conditions (required)", IsRequired=true) bool? agreeToTerms; /** * Indicates agreement to the data protection statement (required) */ // @ApiMember(Description="Indicates agreement to the data protection statement (required)", IsRequired=true) bool? agreeToDataProtection; /** * Indicates consent to be contacted (optional) */ // @ApiMember(Description="Indicates consent to be contacted (optional)") bool? agreeToContact; /** * Indicates agreement to the privacy policy (required) */ // @ApiMember(Description="Indicates agreement to the privacy policy (required)", IsRequired=true) bool? agreeToPrivacy; /** * An optional voucher code for discounts or promotions */ // @ApiMember(Description="An optional voucher code for discounts or promotions") String? voucherCode; /** * An optional code that grants access to certain features or subscriptions */ // @ApiMember(Description="An optional code that grants access to certain features or subscriptions") String? accountActivationCode; /** * The company's VAT registration number (if applicable) */ // @ApiMember(Description="The company's VAT registration number (if applicable)") String? vatNumber; /** * The country where the company is VAT-registered */ // @ApiMember(Description="The country where the company is VAT-registered") String? vatCountry; RegisterAccountRequest({this.username,this.password,this.email,this.fullName,this.companyName,this.companyPhone,this.address1,this.address2,this.address3,this.city,this.postcode,this.country,this.companyType,this.companyIndustry,this.companyNetwork,this.agreeToTerms,this.agreeToDataProtection,this.agreeToContact,this.agreeToPrivacy,this.voucherCode,this.accountActivationCode,this.vatNumber,this.vatCountry}); RegisterAccountRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { username = json['username']; password = json['password']; email = json['email']; fullName = json['fullName']; companyName = json['companyName']; companyPhone = json['companyPhone']; address1 = json['address1']; address2 = json['address2']; address3 = json['address3']; city = json['city']; postcode = json['postcode']; country = json['country']; companyType = json['companyType']; companyIndustry = json['companyIndustry']; companyNetwork = json['companyNetwork']; agreeToTerms = json['agreeToTerms']; agreeToDataProtection = json['agreeToDataProtection']; agreeToContact = json['agreeToContact']; agreeToPrivacy = json['agreeToPrivacy']; voucherCode = json['voucherCode']; accountActivationCode = json['accountActivationCode']; vatNumber = json['vatNumber']; vatCountry = json['vatCountry']; return this; } Map toJson() => { 'username': username, 'password': password, 'email': email, 'fullName': fullName, 'companyName': companyName, 'companyPhone': companyPhone, 'address1': address1, 'address2': address2, 'address3': address3, 'city': city, 'postcode': postcode, 'country': country, 'companyType': companyType, 'companyIndustry': companyIndustry, 'companyNetwork': companyNetwork, 'agreeToTerms': agreeToTerms, 'agreeToDataProtection': agreeToDataProtection, 'agreeToContact': agreeToContact, 'agreeToPrivacy': agreeToPrivacy, 'voucherCode': voucherCode, 'accountActivationCode': accountActivationCode, 'vatNumber': vatNumber, 'vatCountry': vatCountry }; getTypeName() => "RegisterAccountRequest"; TypeContext? context = _ctx; } class BaseResponse implements IBaseDataResponse, IHasResponseStatus, IConvertible { /** * The status of the response */ // @ApiMember(Description="The status of the response") ResponseStatus? responseStatus; BaseResponse({this.responseStatus}); BaseResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!) }; getTypeName() => "BaseResponse"; TypeContext? context = _ctx; } class RegisterAccountData extends BaseResponse implements IConvertible { /** * A unique identifier for the users API access */ // @ApiMember(Description="A unique identifier for the users API access") String? apiUserId; /** * A secure, randomly generated key used for API authentication */ // @ApiMember(Description="A secure, randomly generated key used for API authentication") String? apiUserKey; RegisterAccountData({this.apiUserId,this.apiUserKey}); RegisterAccountData.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); apiUserId = json['apiUserId']; apiUserKey = json['apiUserKey']; return this; } Map toJson() => super.toJson()..addAll({ 'apiUserId': apiUserId, 'apiUserKey': apiUserKey }); getTypeName() => "RegisterAccountData"; TypeContext? context = _ctx; } abstract class IBaseDataResponse { ResponseStatus? responseStatus; } abstract class IHasResponseStatus { ResponseStatus? responseStatus; } // @DataContract class RegisterAccountResponse implements IConvertible { /** * The response data */ // @DataMember // @ApiMember(Description="The response data") RegisterAccountData? data; RegisterAccountResponse({this.data}); RegisterAccountResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { data = JsonConverters.fromJson(json['data'],'RegisterAccountData',context!); return this; } Map toJson() => { 'data': JsonConverters.toJson(data,'RegisterAccountData',context!) }; getTypeName() => "RegisterAccountResponse"; TypeContext? context = _ctx; } // @Route("/account/register", "POST") // @DataContract class RegisterAccount extends BaseRequest implements IReturn, IConvertible, IPost { // @DataMember RegisterAccountRequest? request; RegisterAccount({this.request}); RegisterAccount.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); request = JsonConverters.fromJson(json['request'],'RegisterAccountRequest',context!); return this; } Map toJson() => super.toJson()..addAll({ 'request': JsonConverters.toJson(request,'RegisterAccountRequest',context!) }); createResponse() => RegisterAccountResponse(); getResponseTypeName() => "RegisterAccountResponse"; getTypeName() => "RegisterAccount"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.simplified.id', types: { 'Authentication': TypeInfo(TypeOf.Class, create:() => Authentication()), 'BaseRequest': TypeInfo(TypeOf.Class, create:() => BaseRequest()), 'IBaseRequest': TypeInfo(TypeOf.Interface), 'RegisterAccountRequest': TypeInfo(TypeOf.Class, create:() => RegisterAccountRequest()), 'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()), 'RegisterAccountData': TypeInfo(TypeOf.Class, create:() => RegisterAccountData()), 'IBaseDataResponse': TypeInfo(TypeOf.Interface), 'IHasResponseStatus': TypeInfo(TypeOf.Interface), 'RegisterAccountResponse': TypeInfo(TypeOf.Class, create:() => RegisterAccountResponse()), 'RegisterAccount': TypeInfo(TypeOf.Class, create:() => RegisterAccount()), });