@managespace/sdk 0.1.104 → 0.1.106

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 (35) hide show
  1. package/dist/extensibility/functions/project/billing.d.ts +13 -1
  2. package/dist/extensibility/functions/project/billing.d.ts.map +1 -1
  3. package/dist/extensibility/functions/project/billing.js +10 -0
  4. package/dist/generated/apis/default-api.d.ts +23 -3
  5. package/dist/generated/apis/default-api.d.ts.map +1 -1
  6. package/dist/generated/apis/default-api.js +69 -1
  7. package/dist/generated/models/create-credit.d.ts +81 -0
  8. package/dist/generated/models/create-credit.d.ts.map +1 -0
  9. package/dist/generated/models/create-credit.js +71 -0
  10. package/dist/generated/models/credit.d.ts +123 -0
  11. package/dist/generated/models/credit.d.ts.map +1 -0
  12. package/dist/generated/models/credit.js +87 -0
  13. package/dist/generated/models/custom-update-contact.d.ts +76 -0
  14. package/dist/generated/models/custom-update-contact.d.ts.map +1 -0
  15. package/dist/generated/models/custom-update-contact.js +64 -0
  16. package/dist/generated/models/index.d.ts +4 -1
  17. package/dist/generated/models/index.d.ts.map +1 -1
  18. package/dist/generated/models/index.js +4 -1
  19. package/dist/generated/models/update-address.d.ts +69 -0
  20. package/dist/generated/models/update-address.d.ts.map +1 -0
  21. package/dist/generated/models/update-address.js +61 -0
  22. package/dist/generated/models/update-contact.d.ts +81 -0
  23. package/dist/generated/models/update-contact.d.ts.map +1 -0
  24. package/dist/generated/models/update-contact.js +65 -0
  25. package/package.json +2 -2
  26. package/src/extensibility/functions/project/billing.ts +16 -0
  27. package/src/generated/.openapi-generator/FILES +4 -1
  28. package/src/generated/apis/default-api.ts +120 -6
  29. package/src/generated/models/create-credit.ts +132 -0
  30. package/src/generated/models/credit.ts +189 -0
  31. package/src/generated/models/custom-update-contact.ts +129 -0
  32. package/src/generated/models/index.ts +4 -1
  33. package/src/generated/models/update-address.ts +113 -0
  34. package/src/generated/models/update-contact.ts +129 -0
  35. package/package.deploy.json +0 -33
@@ -0,0 +1,69 @@
1
+ /**
2
+ * ManageSpace API
3
+ * ManageSpace API Documentation
4
+ *
5
+ * The version of the OpenAPI document: 1.0.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
+ *
14
+ * @export
15
+ * @interface UpdateAddress
16
+ */
17
+ export interface UpdateAddress {
18
+ /**
19
+ * First Line of Address
20
+ * @type {string}
21
+ * @memberof UpdateAddress
22
+ */
23
+ addressLineOne?: string;
24
+ /**
25
+ * Second Line of Address
26
+ * @type {string}
27
+ * @memberof UpdateAddress
28
+ */
29
+ addressLineTwo?: string | null;
30
+ /**
31
+ * City
32
+ * @type {string}
33
+ * @memberof UpdateAddress
34
+ */
35
+ city?: string;
36
+ /**
37
+ * State
38
+ * @type {string}
39
+ * @memberof UpdateAddress
40
+ */
41
+ state?: string;
42
+ /**
43
+ * Zip Code
44
+ * @type {string}
45
+ * @memberof UpdateAddress
46
+ */
47
+ zip?: string;
48
+ /**
49
+ * Country
50
+ * @type {string}
51
+ * @memberof UpdateAddress
52
+ */
53
+ country?: string;
54
+ /**
55
+ * County
56
+ * @type {string}
57
+ * @memberof UpdateAddress
58
+ */
59
+ county?: string | null;
60
+ }
61
+ /**
62
+ * Check if a given object implements the UpdateAddress interface.
63
+ */
64
+ export declare function instanceOfUpdateAddress(value: object): value is UpdateAddress;
65
+ export declare function UpdateAddressFromJSON(json: any): UpdateAddress;
66
+ export declare function UpdateAddressFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateAddress;
67
+ export declare function UpdateAddressToJSON(json: any): UpdateAddress;
68
+ export declare function UpdateAddressToJSONTyped(value?: UpdateAddress | null, ignoreDiscriminator?: boolean): any;
69
+ //# sourceMappingURL=update-address.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-address.d.ts","sourceRoot":"","sources":["../../../src/generated/models/update-address.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,aAAa,CAE7E;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,aAAa,CAE9D;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,aAAa,CAcjG;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,GAAG,GAAG,aAAa,CAE5D;AAED,wBAAgB,wBAAwB,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAehH"}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * ManageSpace API
6
+ * ManageSpace API Documentation
7
+ *
8
+ * The version of the OpenAPI document: 1.0.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.UpdateAddressToJSONTyped = exports.UpdateAddressToJSON = exports.UpdateAddressFromJSONTyped = exports.UpdateAddressFromJSON = exports.instanceOfUpdateAddress = void 0;
17
+ /**
18
+ * Check if a given object implements the UpdateAddress interface.
19
+ */
20
+ function instanceOfUpdateAddress(value) {
21
+ return true;
22
+ }
23
+ exports.instanceOfUpdateAddress = instanceOfUpdateAddress;
24
+ function UpdateAddressFromJSON(json) {
25
+ return UpdateAddressFromJSONTyped(json, false);
26
+ }
27
+ exports.UpdateAddressFromJSON = UpdateAddressFromJSON;
28
+ function UpdateAddressFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'addressLineOne': json['addressLineOne'] == null ? undefined : json['addressLineOne'],
34
+ 'addressLineTwo': json['addressLineTwo'] == null ? undefined : json['addressLineTwo'],
35
+ 'city': json['city'] == null ? undefined : json['city'],
36
+ 'state': json['state'] == null ? undefined : json['state'],
37
+ 'zip': json['zip'] == null ? undefined : json['zip'],
38
+ 'country': json['country'] == null ? undefined : json['country'],
39
+ 'county': json['county'] == null ? undefined : json['county'],
40
+ };
41
+ }
42
+ exports.UpdateAddressFromJSONTyped = UpdateAddressFromJSONTyped;
43
+ function UpdateAddressToJSON(json) {
44
+ return UpdateAddressToJSONTyped(json, false);
45
+ }
46
+ exports.UpdateAddressToJSON = UpdateAddressToJSON;
47
+ function UpdateAddressToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'addressLineOne': value['addressLineOne'],
53
+ 'addressLineTwo': value['addressLineTwo'],
54
+ 'city': value['city'],
55
+ 'state': value['state'],
56
+ 'zip': value['zip'],
57
+ 'country': value['country'],
58
+ 'county': value['county'],
59
+ };
60
+ }
61
+ exports.UpdateAddressToJSONTyped = UpdateAddressToJSONTyped;
@@ -0,0 +1,81 @@
1
+ /**
2
+ * ManageSpace API
3
+ * ManageSpace API Documentation
4
+ *
5
+ * The version of the OpenAPI document: 1.0.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
+ *
14
+ * @export
15
+ * @interface UpdateContact
16
+ */
17
+ export interface UpdateContact {
18
+ /**
19
+ * First name
20
+ * @type {string}
21
+ * @memberof UpdateContact
22
+ */
23
+ firstName?: string;
24
+ /**
25
+ * Initial of middle name
26
+ * @type {string}
27
+ * @memberof UpdateContact
28
+ */
29
+ middleInitial?: string | null;
30
+ /**
31
+ * Last name
32
+ * @type {string}
33
+ * @memberof UpdateContact
34
+ */
35
+ lastName?: string;
36
+ /**
37
+ * Display name
38
+ * @type {string}
39
+ * @memberof UpdateContact
40
+ */
41
+ displayName?: string;
42
+ /**
43
+ * Contact email address
44
+ * @type {string}
45
+ * @memberof UpdateContact
46
+ */
47
+ email?: string;
48
+ /**
49
+ * Phone number
50
+ * @type {string}
51
+ * @memberof UpdateContact
52
+ */
53
+ phoneNumber?: string | null;
54
+ /**
55
+ * Contact mobile number
56
+ * @type {string}
57
+ * @memberof UpdateContact
58
+ */
59
+ mobileNumber?: string;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof UpdateContact
64
+ */
65
+ customerId?: string;
66
+ /**
67
+ *
68
+ * @type {string}
69
+ * @memberof UpdateContact
70
+ */
71
+ addressId?: string;
72
+ }
73
+ /**
74
+ * Check if a given object implements the UpdateContact interface.
75
+ */
76
+ export declare function instanceOfUpdateContact(value: object): value is UpdateContact;
77
+ export declare function UpdateContactFromJSON(json: any): UpdateContact;
78
+ export declare function UpdateContactFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateContact;
79
+ export declare function UpdateContactToJSON(json: any): UpdateContact;
80
+ export declare function UpdateContactToJSONTyped(value?: UpdateContact | null, ignoreDiscriminator?: boolean): any;
81
+ //# sourceMappingURL=update-contact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-contact.d.ts","sourceRoot":"","sources":["../../../src/generated/models/update-contact.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,aAAa,CAE7E;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,aAAa,CAE9D;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,aAAa,CAgBjG;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,GAAG,GAAG,aAAa,CAE5D;AAED,wBAAgB,wBAAwB,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAiBhH"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * ManageSpace API
6
+ * ManageSpace API Documentation
7
+ *
8
+ * The version of the OpenAPI document: 1.0.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.UpdateContactToJSONTyped = exports.UpdateContactToJSON = exports.UpdateContactFromJSONTyped = exports.UpdateContactFromJSON = exports.instanceOfUpdateContact = void 0;
17
+ /**
18
+ * Check if a given object implements the UpdateContact interface.
19
+ */
20
+ function instanceOfUpdateContact(value) {
21
+ return true;
22
+ }
23
+ exports.instanceOfUpdateContact = instanceOfUpdateContact;
24
+ function UpdateContactFromJSON(json) {
25
+ return UpdateContactFromJSONTyped(json, false);
26
+ }
27
+ exports.UpdateContactFromJSON = UpdateContactFromJSON;
28
+ function UpdateContactFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'firstName': json['firstName'] == null ? undefined : json['firstName'],
34
+ 'middleInitial': json['middleInitial'] == null ? undefined : json['middleInitial'],
35
+ 'lastName': json['lastName'] == null ? undefined : json['lastName'],
36
+ 'displayName': json['displayName'] == null ? undefined : json['displayName'],
37
+ 'email': json['email'] == null ? undefined : json['email'],
38
+ 'phoneNumber': json['phoneNumber'] == null ? undefined : json['phoneNumber'],
39
+ 'mobileNumber': json['mobileNumber'] == null ? undefined : json['mobileNumber'],
40
+ 'customerId': json['customerId'] == null ? undefined : json['customerId'],
41
+ 'addressId': json['addressId'] == null ? undefined : json['addressId'],
42
+ };
43
+ }
44
+ exports.UpdateContactFromJSONTyped = UpdateContactFromJSONTyped;
45
+ function UpdateContactToJSON(json) {
46
+ return UpdateContactToJSONTyped(json, false);
47
+ }
48
+ exports.UpdateContactToJSON = UpdateContactToJSON;
49
+ function UpdateContactToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'firstName': value['firstName'],
55
+ 'middleInitial': value['middleInitial'],
56
+ 'lastName': value['lastName'],
57
+ 'displayName': value['displayName'],
58
+ 'email': value['email'],
59
+ 'phoneNumber': value['phoneNumber'],
60
+ 'mobileNumber': value['mobileNumber'],
61
+ 'customerId': value['customerId'],
62
+ 'addressId': value['addressId'],
63
+ };
64
+ }
65
+ exports.UpdateContactToJSONTyped = UpdateContactToJSONTyped;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managespace/sdk",
3
- "version": "0.1.104",
3
+ "version": "0.1.106",
4
4
  "scripts": {
5
5
  "dev": "tsc -w --preserveWatchOutput",
6
6
  "build": "tsc",
@@ -30,4 +30,4 @@
30
30
  "@repo/eslint-config": "*",
31
31
  "@repo/typescript-config": "*"
32
32
  }
33
- }
33
+ }
@@ -44,8 +44,11 @@ import {
44
44
  ProductType,
45
45
  OrderType,
46
46
  CustomerBalance,
47
+ CreateCredit as _CreateCredit,
48
+ Credit,
47
49
  } from '../../../generated';
48
50
  import { CustomCreateContact } from '../../../generated/models/custom-create-contact';
51
+ import { CustomUpdateContact } from '../../../generated/models/custom-update-contact';
49
52
  import { CustomUpdateCustomer } from '../../../generated/models/custom-update-customer';
50
53
  import { GetSubscriptionsQuery } from '../../../generated/models/get-subscriptions-query';
51
54
  import { ExtPlugin } from '../../types';
@@ -96,6 +99,14 @@ export namespace Billing {
96
99
  };
97
100
  }
98
101
 
102
+ export class UpdateContact implements ExtPlugin {
103
+ responseType!: Pick<Contact, 'id' | 'externalId'>;
104
+ payload!: CustomUpdateContact & {
105
+ externalId: string;
106
+ customerId: string;
107
+ };
108
+ }
109
+
99
110
  export class ContactCreated implements ExtPlugin {
100
111
  responseType!: any;
101
112
  payload!: any;
@@ -285,6 +296,11 @@ export namespace Billing {
285
296
  // payload!: any;
286
297
  }
287
298
 
299
+ export class CreateCredit implements ExtPlugin {
300
+ responseType!: Credit;
301
+ payload!: _CreateCredit;
302
+ }
303
+
288
304
  export class GetStatements implements ExtPlugin {
289
305
  responseType!: Statement[];
290
306
  payload!: BasePaginationQuery;
@@ -44,6 +44,7 @@ models/create-charge.ts
44
44
  models/create-chart-of-accounts.ts
45
45
  models/create-communication.ts
46
46
  models/create-configuration-setting.ts
47
+ models/create-credit.ts
47
48
  models/create-customer-status.ts
48
49
  models/create-document.ts
49
50
  models/create-instances.ts
@@ -75,11 +76,13 @@ models/create-subscription.ts
75
76
  models/create-task-definition.ts
76
77
  models/create-task-instance.ts
77
78
  models/create-template.ts
79
+ models/credit.ts
78
80
  models/custom-create-checklist.ts
79
81
  models/custom-create-contact.ts
80
82
  models/custom-create-customer.ts
81
83
  models/custom-create-plan.ts
82
84
  models/custom-create-user.ts
85
+ models/custom-update-contact.ts
83
86
  models/custom-update-customer.ts
84
87
  models/custom-update-extensibility-repo.ts
85
88
  models/customer-balance.ts
@@ -100,7 +103,6 @@ models/extensibility-status.ts
100
103
  models/field-area.ts
101
104
  models/field-preferences.ts
102
105
  models/field-type.ts
103
- models/file-uploaded.ts
104
106
  models/filter-item-value.ts
105
107
  models/filter-item.ts
106
108
  models/filter-operator.ts
@@ -245,6 +247,7 @@ models/template-signer.ts
245
247
  models/template.ts
246
248
  models/token.ts
247
249
  models/transaction-posting-entries.ts
250
+ models/update-address.ts
248
251
  models/update-asset-category.ts
249
252
  models/update-asset-feature.ts
250
253
  models/update-asset-reservation.ts
@@ -49,6 +49,7 @@ import type {
49
49
  CreateChartOfAccounts,
50
50
  CreateCommunication,
51
51
  CreateConfigurationSetting,
52
+ CreateCredit,
52
53
  CreateCustomerStatus,
53
54
  CreateDocument,
54
55
  CreateInstances,
@@ -71,11 +72,13 @@ import type {
71
72
  CreateTaskDefinition,
72
73
  CreateTaskInstance,
73
74
  CreateTemplate,
75
+ Credit,
74
76
  CustomCreateChecklist,
75
77
  CustomCreateContact,
76
78
  CustomCreateCustomer,
77
79
  CustomCreatePlan,
78
80
  CustomCreateUser,
81
+ CustomUpdateContact,
79
82
  CustomUpdateCustomer,
80
83
  CustomUpdateExtensibilityRepo,
81
84
  Customer,
@@ -87,7 +90,6 @@ import type {
87
90
  DocumentUrl,
88
91
  ExecuteBy,
89
92
  ExtensibilityRepo,
90
- FileUploaded,
91
93
  GetAssetCategories200Response,
92
94
  GetAssetClasses200Response,
93
95
  GetAssetFeatures200Response,
@@ -279,6 +281,8 @@ import {
279
281
  CreateCommunicationToJSON,
280
282
  CreateConfigurationSettingFromJSON,
281
283
  CreateConfigurationSettingToJSON,
284
+ CreateCreditFromJSON,
285
+ CreateCreditToJSON,
282
286
  CreateCustomerStatusFromJSON,
283
287
  CreateCustomerStatusToJSON,
284
288
  CreateDocumentFromJSON,
@@ -323,6 +327,8 @@ import {
323
327
  CreateTaskInstanceToJSON,
324
328
  CreateTemplateFromJSON,
325
329
  CreateTemplateToJSON,
330
+ CreditFromJSON,
331
+ CreditToJSON,
326
332
  CustomCreateChecklistFromJSON,
327
333
  CustomCreateChecklistToJSON,
328
334
  CustomCreateContactFromJSON,
@@ -333,6 +339,8 @@ import {
333
339
  CustomCreatePlanToJSON,
334
340
  CustomCreateUserFromJSON,
335
341
  CustomCreateUserToJSON,
342
+ CustomUpdateContactFromJSON,
343
+ CustomUpdateContactToJSON,
336
344
  CustomUpdateCustomerFromJSON,
337
345
  CustomUpdateCustomerToJSON,
338
346
  CustomUpdateExtensibilityRepoFromJSON,
@@ -355,8 +363,6 @@ import {
355
363
  ExecuteByToJSON,
356
364
  ExtensibilityRepoFromJSON,
357
365
  ExtensibilityRepoToJSON,
358
- FileUploadedFromJSON,
359
- FileUploadedToJSON,
360
366
  GetAssetCategories200ResponseFromJSON,
361
367
  GetAssetCategories200ResponseToJSON,
362
368
  GetAssetClasses200ResponseFromJSON,
@@ -696,6 +702,10 @@ export interface CreateContactRequest {
696
702
  customCreateContact: CustomCreateContact;
697
703
  }
698
704
 
705
+ export interface CreateCreditRequest {
706
+ createCredit: CreateCredit;
707
+ }
708
+
699
709
  export interface CreateCustomerRequest {
700
710
  customCreateCustomer: CustomCreateCustomer;
701
711
  }
@@ -1451,6 +1461,12 @@ export interface UpdateConfigurationSettingRequest {
1451
1461
  siteId?: string;
1452
1462
  }
1453
1463
 
1464
+ export interface UpdateContactRequest {
1465
+ customerId: string;
1466
+ contactId: string;
1467
+ customUpdateContact: CustomUpdateContact;
1468
+ }
1469
+
1454
1470
  export interface UpdateCustomerRequest {
1455
1471
  customerId: string;
1456
1472
  customUpdateCustomer: CustomUpdateCustomer;
@@ -2501,6 +2517,48 @@ export class DefaultApi extends runtime.BaseAPI {
2501
2517
  return await response.value();
2502
2518
  }
2503
2519
 
2520
+ /**
2521
+ */
2522
+ async createCreditRaw(requestParameters: CreateCreditRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Credit>> {
2523
+ if (requestParameters['createCredit'] == null) {
2524
+ throw new runtime.RequiredError(
2525
+ 'createCredit',
2526
+ 'Required parameter "createCredit" was null or undefined when calling createCredit().'
2527
+ );
2528
+ }
2529
+
2530
+ const queryParameters: any = {};
2531
+
2532
+ const headerParameters: runtime.HTTPHeaders = {};
2533
+
2534
+ headerParameters['Content-Type'] = 'application/json';
2535
+
2536
+ if (this.configuration && this.configuration.accessToken) {
2537
+ const token = this.configuration.accessToken;
2538
+ const tokenString = await token("bearer", []);
2539
+
2540
+ if (tokenString) {
2541
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2542
+ }
2543
+ }
2544
+ const response = await this.request({
2545
+ path: `/api/billing/credits`,
2546
+ method: 'POST',
2547
+ headers: headerParameters,
2548
+ query: queryParameters,
2549
+ body: CreateCreditToJSON(requestParameters['createCredit']),
2550
+ }, initOverrides);
2551
+
2552
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreditFromJSON(jsonValue));
2553
+ }
2554
+
2555
+ /**
2556
+ */
2557
+ async createCredit(requestParameters: CreateCreditRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Credit> {
2558
+ const response = await this.createCreditRaw(requestParameters, initOverrides);
2559
+ return await response.value();
2560
+ }
2561
+
2504
2562
  /**
2505
2563
  */
2506
2564
  async createCustomerRaw(requestParameters: CreateCustomerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Customer>> {
@@ -9404,6 +9462,62 @@ export class DefaultApi extends runtime.BaseAPI {
9404
9462
  return await response.value();
9405
9463
  }
9406
9464
 
9465
+ /**
9466
+ */
9467
+ async updateContactRaw(requestParameters: UpdateContactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Contact>> {
9468
+ if (requestParameters['customerId'] == null) {
9469
+ throw new runtime.RequiredError(
9470
+ 'customerId',
9471
+ 'Required parameter "customerId" was null or undefined when calling updateContact().'
9472
+ );
9473
+ }
9474
+
9475
+ if (requestParameters['contactId'] == null) {
9476
+ throw new runtime.RequiredError(
9477
+ 'contactId',
9478
+ 'Required parameter "contactId" was null or undefined when calling updateContact().'
9479
+ );
9480
+ }
9481
+
9482
+ if (requestParameters['customUpdateContact'] == null) {
9483
+ throw new runtime.RequiredError(
9484
+ 'customUpdateContact',
9485
+ 'Required parameter "customUpdateContact" was null or undefined when calling updateContact().'
9486
+ );
9487
+ }
9488
+
9489
+ const queryParameters: any = {};
9490
+
9491
+ const headerParameters: runtime.HTTPHeaders = {};
9492
+
9493
+ headerParameters['Content-Type'] = 'application/json';
9494
+
9495
+ if (this.configuration && this.configuration.accessToken) {
9496
+ const token = this.configuration.accessToken;
9497
+ const tokenString = await token("bearer", []);
9498
+
9499
+ if (tokenString) {
9500
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
9501
+ }
9502
+ }
9503
+ const response = await this.request({
9504
+ path: `/api/crm/customers/{customerId}/contacts/{contactId}`.replace(`{${"customerId"}}`, encodeURIComponent(String(requestParameters['customerId']))).replace(`{${"contactId"}}`, encodeURIComponent(String(requestParameters['contactId']))),
9505
+ method: 'PUT',
9506
+ headers: headerParameters,
9507
+ query: queryParameters,
9508
+ body: CustomUpdateContactToJSON(requestParameters['customUpdateContact']),
9509
+ }, initOverrides);
9510
+
9511
+ return new runtime.JSONApiResponse(response, (jsonValue) => ContactFromJSON(jsonValue));
9512
+ }
9513
+
9514
+ /**
9515
+ */
9516
+ async updateContact(requestParameters: UpdateContactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Contact> {
9517
+ const response = await this.updateContactRaw(requestParameters, initOverrides);
9518
+ return await response.value();
9519
+ }
9520
+
9407
9521
  /**
9408
9522
  */
9409
9523
  async updateCustomerRaw(requestParameters: UpdateCustomerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Customer>> {
@@ -10467,7 +10581,7 @@ export class DefaultApi extends runtime.BaseAPI {
10467
10581
 
10468
10582
  /**
10469
10583
  */
10470
- async uploadPluginRaw(requestParameters: UploadPluginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileUploaded>> {
10584
+ async uploadPluginRaw(requestParameters: UploadPluginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Success>> {
10471
10585
  if (requestParameters['file'] == null) {
10472
10586
  throw new runtime.RequiredError(
10473
10587
  'file',
@@ -10515,12 +10629,12 @@ export class DefaultApi extends runtime.BaseAPI {
10515
10629
  body: formParams,
10516
10630
  }, initOverrides);
10517
10631
 
10518
- return new runtime.JSONApiResponse(response, (jsonValue) => FileUploadedFromJSON(jsonValue));
10632
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessFromJSON(jsonValue));
10519
10633
  }
10520
10634
 
10521
10635
  /**
10522
10636
  */
10523
- async uploadPlugin(requestParameters: UploadPluginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileUploaded> {
10637
+ async uploadPlugin(requestParameters: UploadPluginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Success> {
10524
10638
  const response = await this.uploadPluginRaw(requestParameters, initOverrides);
10525
10639
  return await response.value();
10526
10640
  }