@randock/nameshift-api-client 0.0.4 → 0.0.6

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.
Files changed (39) hide show
  1. package/.openapi-generator/FILES +5 -3
  2. package/dist/apis/AccountsApi.d.ts +9 -1
  3. package/dist/apis/AccountsApi.js +50 -0
  4. package/dist/apis/DomainsPublicApi.d.ts +26 -0
  5. package/dist/apis/DomainsPublicApi.js +121 -0
  6. package/dist/apis/LeadsPublicApi.d.ts +27 -0
  7. package/dist/apis/LeadsPublicApi.js +124 -0
  8. package/dist/apis/index.d.ts +2 -2
  9. package/dist/apis/index.js +2 -2
  10. package/dist/models/AccountDto.d.ts +37 -0
  11. package/dist/models/AccountDto.js +53 -0
  12. package/dist/models/DomainDto.d.ts +6 -0
  13. package/dist/models/DomainDto.js +3 -0
  14. package/dist/models/IntersectionAccountDtoWithAddressDto.d.ts +6 -0
  15. package/dist/models/IntersectionAccountDtoWithAddressDto.js +3 -0
  16. package/dist/models/IntersectionAccountDtoWithFinancialDto.d.ts +6 -0
  17. package/dist/models/IntersectionAccountDtoWithFinancialDto.js +3 -0
  18. package/dist/models/IntersectionAccountDtoWithSettingsDto.d.ts +6 -0
  19. package/dist/models/IntersectionAccountDtoWithSettingsDto.js +3 -0
  20. package/dist/models/PublicDomainControllerGetDomainIdentifier404Response.d.ts +43 -0
  21. package/dist/models/PublicDomainControllerGetDomainIdentifier404Response.js +56 -0
  22. package/dist/models/UpdateSettings429Response.d.ts +43 -0
  23. package/dist/models/UpdateSettings429Response.js +56 -0
  24. package/dist/models/index.d.ts +3 -1
  25. package/dist/models/index.js +3 -1
  26. package/package.json +1 -1
  27. package/src/apis/AccountsApi.ts +40 -3
  28. package/src/apis/DomainsApi.ts +3 -3
  29. package/src/apis/DomainsPublicApi.ts +62 -0
  30. package/src/apis/LeadsPublicApi.ts +71 -0
  31. package/src/apis/index.ts +2 -2
  32. package/src/models/AccountDto.ts +75 -0
  33. package/src/models/DomainDto.ts +9 -0
  34. package/src/models/IntersectionAccountDtoWithAddressDto.ts +9 -0
  35. package/src/models/IntersectionAccountDtoWithFinancialDto.ts +9 -0
  36. package/src/models/IntersectionAccountDtoWithSettingsDto.ts +9 -0
  37. package/src/models/PublicDomainControllerGetDomainIdentifier404Response.ts +83 -0
  38. package/src/models/UpdateSettings429Response.ts +83 -0
  39. package/src/models/index.ts +3 -1
@@ -21,6 +21,7 @@ var IntersectionAccountDtoWithSettingsDtoSettings_1 = require("./IntersectionAcc
21
21
  function instanceOfIntersectionAccountDtoWithSettingsDto(value) {
22
22
  var isInstance = true;
23
23
  isInstance = isInstance && "id" in value;
24
+ isInstance = isInstance && "identifier" in value;
24
25
  isInstance = isInstance && "settings" in value;
25
26
  return isInstance;
26
27
  }
@@ -35,6 +36,7 @@ function IntersectionAccountDtoWithSettingsDtoFromJSONTyped(json, ignoreDiscrimi
35
36
  }
36
37
  return {
37
38
  'id': json['id'],
39
+ 'identifier': json['identifier'],
38
40
  'settings': (0, IntersectionAccountDtoWithSettingsDtoSettings_1.IntersectionAccountDtoWithSettingsDtoSettingsFromJSON)(json['settings']),
39
41
  };
40
42
  }
@@ -48,6 +50,7 @@ function IntersectionAccountDtoWithSettingsDtoToJSON(value) {
48
50
  }
49
51
  return {
50
52
  'id': value.id,
53
+ 'identifier': value.identifier,
51
54
  'settings': (0, IntersectionAccountDtoWithSettingsDtoSettings_1.IntersectionAccountDtoWithSettingsDtoSettingsToJSON)(value.settings),
52
55
  };
53
56
  }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Nameshift
3
+ * Nameshift API
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Thrown if domain is not found.
14
+ * @export
15
+ * @interface PublicDomainControllerGetDomainIdentifier404Response
16
+ */
17
+ export interface PublicDomainControllerGetDomainIdentifier404Response {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof PublicDomainControllerGetDomainIdentifier404Response
22
+ */
23
+ statusCode: number;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof PublicDomainControllerGetDomainIdentifier404Response
28
+ */
29
+ message: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof PublicDomainControllerGetDomainIdentifier404Response
34
+ */
35
+ error?: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the PublicDomainControllerGetDomainIdentifier404Response interface.
39
+ */
40
+ export declare function instanceOfPublicDomainControllerGetDomainIdentifier404Response(value: object): boolean;
41
+ export declare function PublicDomainControllerGetDomainIdentifier404ResponseFromJSON(json: any): PublicDomainControllerGetDomainIdentifier404Response;
42
+ export declare function PublicDomainControllerGetDomainIdentifier404ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicDomainControllerGetDomainIdentifier404Response;
43
+ export declare function PublicDomainControllerGetDomainIdentifier404ResponseToJSON(value?: PublicDomainControllerGetDomainIdentifier404Response | null): any;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * Nameshift API
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PublicDomainControllerGetDomainIdentifier404ResponseToJSON = exports.PublicDomainControllerGetDomainIdentifier404ResponseFromJSONTyped = exports.PublicDomainControllerGetDomainIdentifier404ResponseFromJSON = exports.instanceOfPublicDomainControllerGetDomainIdentifier404Response = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * Check if a given object implements the PublicDomainControllerGetDomainIdentifier404Response interface.
20
+ */
21
+ function instanceOfPublicDomainControllerGetDomainIdentifier404Response(value) {
22
+ var isInstance = true;
23
+ isInstance = isInstance && "statusCode" in value;
24
+ isInstance = isInstance && "message" in value;
25
+ return isInstance;
26
+ }
27
+ exports.instanceOfPublicDomainControllerGetDomainIdentifier404Response = instanceOfPublicDomainControllerGetDomainIdentifier404Response;
28
+ function PublicDomainControllerGetDomainIdentifier404ResponseFromJSON(json) {
29
+ return PublicDomainControllerGetDomainIdentifier404ResponseFromJSONTyped(json, false);
30
+ }
31
+ exports.PublicDomainControllerGetDomainIdentifier404ResponseFromJSON = PublicDomainControllerGetDomainIdentifier404ResponseFromJSON;
32
+ function PublicDomainControllerGetDomainIdentifier404ResponseFromJSONTyped(json, ignoreDiscriminator) {
33
+ if ((json === undefined) || (json === null)) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'statusCode': json['statusCode'],
38
+ 'message': json['message'],
39
+ 'error': !(0, runtime_1.exists)(json, 'error') ? undefined : json['error'],
40
+ };
41
+ }
42
+ exports.PublicDomainControllerGetDomainIdentifier404ResponseFromJSONTyped = PublicDomainControllerGetDomainIdentifier404ResponseFromJSONTyped;
43
+ function PublicDomainControllerGetDomainIdentifier404ResponseToJSON(value) {
44
+ if (value === undefined) {
45
+ return undefined;
46
+ }
47
+ if (value === null) {
48
+ return null;
49
+ }
50
+ return {
51
+ 'statusCode': value.statusCode,
52
+ 'message': value.message,
53
+ 'error': value.error,
54
+ };
55
+ }
56
+ exports.PublicDomainControllerGetDomainIdentifier404ResponseToJSON = PublicDomainControllerGetDomainIdentifier404ResponseToJSON;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Nameshift
3
+ * Nameshift API
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Returned if more than 300 requests are made per minute.
14
+ * @export
15
+ * @interface UpdateSettings429Response
16
+ */
17
+ export interface UpdateSettings429Response {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof UpdateSettings429Response
22
+ */
23
+ statusCode: number;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof UpdateSettings429Response
28
+ */
29
+ message: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof UpdateSettings429Response
34
+ */
35
+ error?: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the UpdateSettings429Response interface.
39
+ */
40
+ export declare function instanceOfUpdateSettings429Response(value: object): boolean;
41
+ export declare function UpdateSettings429ResponseFromJSON(json: any): UpdateSettings429Response;
42
+ export declare function UpdateSettings429ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSettings429Response;
43
+ export declare function UpdateSettings429ResponseToJSON(value?: UpdateSettings429Response | null): any;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * Nameshift API
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.UpdateSettings429ResponseToJSON = exports.UpdateSettings429ResponseFromJSONTyped = exports.UpdateSettings429ResponseFromJSON = exports.instanceOfUpdateSettings429Response = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * Check if a given object implements the UpdateSettings429Response interface.
20
+ */
21
+ function instanceOfUpdateSettings429Response(value) {
22
+ var isInstance = true;
23
+ isInstance = isInstance && "statusCode" in value;
24
+ isInstance = isInstance && "message" in value;
25
+ return isInstance;
26
+ }
27
+ exports.instanceOfUpdateSettings429Response = instanceOfUpdateSettings429Response;
28
+ function UpdateSettings429ResponseFromJSON(json) {
29
+ return UpdateSettings429ResponseFromJSONTyped(json, false);
30
+ }
31
+ exports.UpdateSettings429ResponseFromJSON = UpdateSettings429ResponseFromJSON;
32
+ function UpdateSettings429ResponseFromJSONTyped(json, ignoreDiscriminator) {
33
+ if ((json === undefined) || (json === null)) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'statusCode': json['statusCode'],
38
+ 'message': json['message'],
39
+ 'error': !(0, runtime_1.exists)(json, 'error') ? undefined : json['error'],
40
+ };
41
+ }
42
+ exports.UpdateSettings429ResponseFromJSONTyped = UpdateSettings429ResponseFromJSONTyped;
43
+ function UpdateSettings429ResponseToJSON(value) {
44
+ if (value === undefined) {
45
+ return undefined;
46
+ }
47
+ if (value === null) {
48
+ return null;
49
+ }
50
+ return {
51
+ 'statusCode': value.statusCode,
52
+ 'message': value.message,
53
+ 'error': value.error,
54
+ };
55
+ }
56
+ exports.UpdateSettings429ResponseToJSON = UpdateSettings429ResponseToJSON;
@@ -1,5 +1,6 @@
1
1
  export * from './AccountAddressDto';
2
2
  export * from './AccountAddressInput';
3
+ export * from './AccountDto';
3
4
  export * from './AccountFinancialInput';
4
5
  export * from './AccountSettingsInput';
5
6
  export * from './BatchUpdate404Response';
@@ -17,7 +18,6 @@ export * from './LeadDto';
17
18
  export * from './List200Response';
18
19
  export * from './List400Response';
19
20
  export * from './List401Response';
20
- export * from './List429Response';
21
21
  export * from './Login401Response';
22
22
  export * from './Login429Response';
23
23
  export * from './LoginInput';
@@ -26,6 +26,8 @@ export * from './MoneyInput';
26
26
  export * from './PaginateResponse';
27
27
  export * from './PaginateResponseLinks';
28
28
  export * from './PaginateResponseMeta';
29
+ export * from './PublicDomainControllerGetDomainIdentifier404Response';
29
30
  export * from './TokenDto';
30
31
  export * from './UpdateDomainInput';
31
32
  export * from './UpdateSettings401Response';
33
+ export * from './UpdateSettings429Response';
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  /* eslint-disable */
19
19
  __exportStar(require("./AccountAddressDto"), exports);
20
20
  __exportStar(require("./AccountAddressInput"), exports);
21
+ __exportStar(require("./AccountDto"), exports);
21
22
  __exportStar(require("./AccountFinancialInput"), exports);
22
23
  __exportStar(require("./AccountSettingsInput"), exports);
23
24
  __exportStar(require("./BatchUpdate404Response"), exports);
@@ -35,7 +36,6 @@ __exportStar(require("./LeadDto"), exports);
35
36
  __exportStar(require("./List200Response"), exports);
36
37
  __exportStar(require("./List400Response"), exports);
37
38
  __exportStar(require("./List401Response"), exports);
38
- __exportStar(require("./List429Response"), exports);
39
39
  __exportStar(require("./Login401Response"), exports);
40
40
  __exportStar(require("./Login429Response"), exports);
41
41
  __exportStar(require("./LoginInput"), exports);
@@ -44,6 +44,8 @@ __exportStar(require("./MoneyInput"), exports);
44
44
  __exportStar(require("./PaginateResponse"), exports);
45
45
  __exportStar(require("./PaginateResponseLinks"), exports);
46
46
  __exportStar(require("./PaginateResponseMeta"), exports);
47
+ __exportStar(require("./PublicDomainControllerGetDomainIdentifier404Response"), exports);
47
48
  __exportStar(require("./TokenDto"), exports);
48
49
  __exportStar(require("./UpdateDomainInput"), exports);
49
50
  __exportStar(require("./UpdateSettings401Response"), exports);
51
+ __exportStar(require("./UpdateSettings429Response"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "main": "./dist/index.js",
@@ -16,17 +16,20 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  AccountAddressInput,
19
+ AccountDto,
19
20
  AccountFinancialInput,
20
21
  AccountSettingsInput,
21
22
  IntersectionAccountDtoWithAddressDto,
22
23
  IntersectionAccountDtoWithFinancialDto,
23
24
  IntersectionAccountDtoWithSettingsDto,
24
- List429Response,
25
25
  UpdateSettings401Response,
26
+ UpdateSettings429Response,
26
27
  } from '../models/index';
27
28
  import {
28
29
  AccountAddressInputFromJSON,
29
30
  AccountAddressInputToJSON,
31
+ AccountDtoFromJSON,
32
+ AccountDtoToJSON,
30
33
  AccountFinancialInputFromJSON,
31
34
  AccountFinancialInputToJSON,
32
35
  AccountSettingsInputFromJSON,
@@ -37,10 +40,10 @@ import {
37
40
  IntersectionAccountDtoWithFinancialDtoToJSON,
38
41
  IntersectionAccountDtoWithSettingsDtoFromJSON,
39
42
  IntersectionAccountDtoWithSettingsDtoToJSON,
40
- List429ResponseFromJSON,
41
- List429ResponseToJSON,
42
43
  UpdateSettings401ResponseFromJSON,
43
44
  UpdateSettings401ResponseToJSON,
45
+ UpdateSettings429ResponseFromJSON,
46
+ UpdateSettings429ResponseToJSON,
44
47
  } from '../models/index';
45
48
 
46
49
  export interface UpdateAddressRequest {
@@ -63,6 +66,40 @@ export interface UpdateSettingsRequest {
63
66
  */
64
67
  export class AccountsApi extends runtime.BaseAPI {
65
68
 
69
+ /**
70
+ *
71
+ */
72
+ async meRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountDto>> {
73
+ const queryParameters: any = {};
74
+
75
+ const headerParameters: runtime.HTTPHeaders = {};
76
+
77
+ if (this.configuration && this.configuration.accessToken) {
78
+ const token = this.configuration.accessToken;
79
+ const tokenString = await token("bearer", []);
80
+
81
+ if (tokenString) {
82
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
83
+ }
84
+ }
85
+ const response = await this.request({
86
+ path: `/accounts/me`,
87
+ method: 'GET',
88
+ headers: headerParameters,
89
+ query: queryParameters,
90
+ }, initOverrides);
91
+
92
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountDtoFromJSON(jsonValue));
93
+ }
94
+
95
+ /**
96
+ *
97
+ */
98
+ async me(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountDto> {
99
+ const response = await this.meRaw(initOverrides);
100
+ return await response.value();
101
+ }
102
+
66
103
  /**
67
104
  *
68
105
  */
@@ -23,8 +23,8 @@ import type {
23
23
  List200Response,
24
24
  List400Response,
25
25
  List401Response,
26
- List429Response,
27
26
  UpdateDomainInput,
27
+ UpdateSettings429Response,
28
28
  } from '../models/index';
29
29
  import {
30
30
  BatchUpdate404ResponseFromJSON,
@@ -43,10 +43,10 @@ import {
43
43
  List400ResponseToJSON,
44
44
  List401ResponseFromJSON,
45
45
  List401ResponseToJSON,
46
- List429ResponseFromJSON,
47
- List429ResponseToJSON,
48
46
  UpdateDomainInputFromJSON,
49
47
  UpdateDomainInputToJSON,
48
+ UpdateSettings429ResponseFromJSON,
49
+ UpdateSettings429ResponseToJSON,
50
50
  } from '../models/index';
51
51
 
52
52
  export interface BatchImportRequest {
@@ -0,0 +1,62 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ PublicDomainControllerGetDomainIdentifier404Response,
19
+ } from '../models/index';
20
+ import {
21
+ PublicDomainControllerGetDomainIdentifier404ResponseFromJSON,
22
+ PublicDomainControllerGetDomainIdentifier404ResponseToJSON,
23
+ } from '../models/index';
24
+
25
+ export interface PublicDomainControllerGetDomainIdentifierRequest {
26
+ domainName: string;
27
+ }
28
+
29
+ /**
30
+ *
31
+ */
32
+ export class DomainsPublicApi extends runtime.BaseAPI {
33
+
34
+ /**
35
+ */
36
+ async publicDomainControllerGetDomainIdentifierRaw(requestParameters: PublicDomainControllerGetDomainIdentifierRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
37
+ if (requestParameters.domainName === null || requestParameters.domainName === undefined) {
38
+ throw new runtime.RequiredError('domainName','Required parameter requestParameters.domainName was null or undefined when calling publicDomainControllerGetDomainIdentifier.');
39
+ }
40
+
41
+ const queryParameters: any = {};
42
+
43
+ const headerParameters: runtime.HTTPHeaders = {};
44
+
45
+ const response = await this.request({
46
+ path: `/domains/by-name/{domainName}/identifier`.replace(`{${"domainName"}}`, encodeURIComponent(String(requestParameters.domainName))),
47
+ method: 'GET',
48
+ headers: headerParameters,
49
+ query: queryParameters,
50
+ }, initOverrides);
51
+
52
+ return new runtime.JSONApiResponse<any>(response);
53
+ }
54
+
55
+ /**
56
+ */
57
+ async publicDomainControllerGetDomainIdentifier(requestParameters: PublicDomainControllerGetDomainIdentifierRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
58
+ const response = await this.publicDomainControllerGetDomainIdentifierRaw(requestParameters, initOverrides);
59
+ return await response.value();
60
+ }
61
+
62
+ }
@@ -0,0 +1,71 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ BatchUpdate404Response,
19
+ CreateLeadInput,
20
+ LeadDto,
21
+ } from '../models/index';
22
+ import {
23
+ BatchUpdate404ResponseFromJSON,
24
+ BatchUpdate404ResponseToJSON,
25
+ CreateLeadInputFromJSON,
26
+ CreateLeadInputToJSON,
27
+ LeadDtoFromJSON,
28
+ LeadDtoToJSON,
29
+ } from '../models/index';
30
+
31
+ export interface PublicLeadControllerPostLeadRequest {
32
+ createLeadInput: CreateLeadInput;
33
+ }
34
+
35
+ /**
36
+ *
37
+ */
38
+ export class LeadsPublicApi extends runtime.BaseAPI {
39
+
40
+ /**
41
+ */
42
+ async publicLeadControllerPostLeadRaw(requestParameters: PublicLeadControllerPostLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadDto>> {
43
+ if (requestParameters.createLeadInput === null || requestParameters.createLeadInput === undefined) {
44
+ throw new runtime.RequiredError('createLeadInput','Required parameter requestParameters.createLeadInput was null or undefined when calling publicLeadControllerPostLead.');
45
+ }
46
+
47
+ const queryParameters: any = {};
48
+
49
+ const headerParameters: runtime.HTTPHeaders = {};
50
+
51
+ headerParameters['Content-Type'] = 'application/json';
52
+
53
+ const response = await this.request({
54
+ path: `/leads`,
55
+ method: 'POST',
56
+ headers: headerParameters,
57
+ query: queryParameters,
58
+ body: CreateLeadInputToJSON(requestParameters.createLeadInput),
59
+ }, initOverrides);
60
+
61
+ return new runtime.JSONApiResponse(response, (jsonValue) => LeadDtoFromJSON(jsonValue));
62
+ }
63
+
64
+ /**
65
+ */
66
+ async publicLeadControllerPostLead(requestParameters: PublicLeadControllerPostLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadDto> {
67
+ const response = await this.publicLeadControllerPostLeadRaw(requestParameters, initOverrides);
68
+ return await response.value();
69
+ }
70
+
71
+ }
package/src/apis/index.ts CHANGED
@@ -3,5 +3,5 @@
3
3
  export * from './AccountsApi';
4
4
  export * from './AuthApi';
5
5
  export * from './DomainsApi';
6
- export * from './LeadsApi';
7
- export * from './TestApi';
6
+ export * from './DomainsPublicApi';
7
+ export * from './LeadsPublicApi';
@@ -0,0 +1,75 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface AccountDto
20
+ */
21
+ export interface AccountDto {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof AccountDto
26
+ */
27
+ id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AccountDto
32
+ */
33
+ identifier: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the AccountDto interface.
38
+ */
39
+ export function instanceOfAccountDto(value: object): boolean {
40
+ let isInstance = true;
41
+ isInstance = isInstance && "id" in value;
42
+ isInstance = isInstance && "identifier" in value;
43
+
44
+ return isInstance;
45
+ }
46
+
47
+ export function AccountDtoFromJSON(json: any): AccountDto {
48
+ return AccountDtoFromJSONTyped(json, false);
49
+ }
50
+
51
+ export function AccountDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountDto {
52
+ if ((json === undefined) || (json === null)) {
53
+ return json;
54
+ }
55
+ return {
56
+
57
+ 'id': json['id'],
58
+ 'identifier': json['identifier'],
59
+ };
60
+ }
61
+
62
+ export function AccountDtoToJSON(value?: AccountDto | null): any {
63
+ if (value === undefined) {
64
+ return undefined;
65
+ }
66
+ if (value === null) {
67
+ return null;
68
+ }
69
+ return {
70
+
71
+ 'id': value.id,
72
+ 'identifier': value.identifier,
73
+ };
74
+ }
75
+
@@ -32,6 +32,12 @@ export interface DomainDto {
32
32
  * @memberof DomainDto
33
33
  */
34
34
  id: string;
35
+ /**
36
+ * The TLD for this domain.
37
+ * @type {string}
38
+ * @memberof DomainDto
39
+ */
40
+ tld: string;
35
41
  /**
36
42
  * Whether this domain is verified by the owner (ns3, txt) or not.
37
43
  * @type {boolean}
@@ -70,6 +76,7 @@ export interface DomainDto {
70
76
  export function instanceOfDomainDto(value: object): boolean {
71
77
  let isInstance = true;
72
78
  isInstance = isInstance && "id" in value;
79
+ isInstance = isInstance && "tld" in value;
73
80
  isInstance = isInstance && "verified" in value;
74
81
  isInstance = isInstance && "nameservers" in value;
75
82
  isInstance = isInstance && "name" in value;
@@ -90,6 +97,7 @@ export function DomainDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean):
90
97
  return {
91
98
 
92
99
  'id': json['id'],
100
+ 'tld': json['tld'],
93
101
  'verified': json['verified'],
94
102
  'nameservers': json['nameservers'],
95
103
  'name': json['name'],
@@ -108,6 +116,7 @@ export function DomainDtoToJSON(value?: DomainDto | null): any {
108
116
  return {
109
117
 
110
118
  'id': value.id,
119
+ 'tld': value.tld,
111
120
  'verified': value.verified,
112
121
  'nameservers': value.nameservers,
113
122
  'name': value.name,
@@ -32,6 +32,12 @@ export interface IntersectionAccountDtoWithAddressDto {
32
32
  * @memberof IntersectionAccountDtoWithAddressDto
33
33
  */
34
34
  id: string;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof IntersectionAccountDtoWithAddressDto
39
+ */
40
+ identifier: string;
35
41
  /**
36
42
  *
37
43
  * @type {Array<AccountAddressDto>}
@@ -46,6 +52,7 @@ export interface IntersectionAccountDtoWithAddressDto {
46
52
  export function instanceOfIntersectionAccountDtoWithAddressDto(value: object): boolean {
47
53
  let isInstance = true;
48
54
  isInstance = isInstance && "id" in value;
55
+ isInstance = isInstance && "identifier" in value;
49
56
  isInstance = isInstance && "addresses" in value;
50
57
 
51
58
  return isInstance;
@@ -62,6 +69,7 @@ export function IntersectionAccountDtoWithAddressDtoFromJSONTyped(json: any, ign
62
69
  return {
63
70
 
64
71
  'id': json['id'],
72
+ 'identifier': json['identifier'],
65
73
  'addresses': ((json['addresses'] as Array<any>).map(AccountAddressDtoFromJSON)),
66
74
  };
67
75
  }
@@ -76,6 +84,7 @@ export function IntersectionAccountDtoWithAddressDtoToJSON(value?: IntersectionA
76
84
  return {
77
85
 
78
86
  'id': value.id,
87
+ 'identifier': value.identifier,
79
88
  'addresses': ((value.addresses as Array<any>).map(AccountAddressDtoToJSON)),
80
89
  };
81
90
  }