@managespace/sdk 0.0.212 → 0.0.213

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managespace/sdk",
3
- "version": "0.0.212",
3
+ "version": "0.0.213",
4
4
  "scripts": {
5
5
  "dev": "tsc -w --preserveWatchOutput",
6
6
  "build": "tsc",
@@ -35,8 +35,7 @@ import {
35
35
  ProductTaxGroup,
36
36
  CreateProductTaxGroup as _CreateProductTaxGroup,
37
37
  GetInvoicesQuery,
38
- JournalEntry,
39
- CreateJournalEntry as _CreateJournalEntry,
38
+ UpdateProduct as _UpdateProduct,
40
39
  } from '../../../generated';
41
40
  import { CustomCreateContact } from '../../../generated/models/custom-create-contact';
42
41
  import { CustomUpdateCustomer } from '../../../generated/models/custom-update-customer';
@@ -374,20 +373,8 @@ export namespace Billing {
374
373
  payload!: BasePaginationQuery & { status?: string };
375
374
  }
376
375
 
377
- export class CreateJournalEntry implements ExtPlugin {
378
- responseType!: JournalEntry;
379
- payload!: _CreateJournalEntry;
380
- }
381
-
382
- export class GetJournalEntry implements ExtPlugin {
383
- responseType!: JournalEntry;
384
- payload!: {
385
- journalEntryId: string;
386
- };
387
- }
388
-
389
- export class GetJournalEntries implements ExtPlugin {
390
- responseType!: JournalEntry[];
391
- payload!: BasePaginationQuery;
376
+ export class UpdateProduct implements ExtPlugin {
377
+ responseType!: ProductCustom;
378
+ payload!: _UpdateProduct & { siteId: string; productId: string };
392
379
  }
393
380
  }
@@ -40,7 +40,6 @@ models/create-communication.ts
40
40
  models/create-configuration-setting.ts
41
41
  models/create-document.ts
42
42
  models/create-instances.ts
43
- models/create-journal-entry.ts
44
43
  models/create-map-feature.ts
45
44
  models/create-note.ts
46
45
  models/create-notes.ts
@@ -106,7 +105,6 @@ models/get-documents200-response.ts
106
105
  models/get-intent.ts
107
106
  models/get-invoices-query.ts
108
107
  models/get-invoices200-response.ts
109
- models/get-journal-entries200-response.ts
110
108
  models/get-notes200-response.ts
111
109
  models/get-notifications200-response.ts
112
110
  models/get-orders200-response.ts
@@ -132,8 +130,6 @@ models/index.ts
132
130
  models/intent.ts
133
131
  models/invoice-contact.ts
134
132
  models/invoice.ts
135
- models/journal-entry-entries.ts
136
- models/journal-entry.ts
137
133
  models/lease-status.ts
138
134
  models/line-item.ts
139
135
  models/link-plugin.ts
@@ -217,6 +213,7 @@ models/update-map-feature.ts
217
213
  models/update-note.ts
218
214
  models/update-org.ts
219
215
  models/update-plan.ts
216
+ models/update-product.ts
220
217
  models/update-smart-bar-prompt.ts
221
218
  models/update-subscription-charge.ts
222
219
  models/update-subscription.ts
@@ -45,7 +45,6 @@ import type {
45
45
  CreateConfigurationSetting,
46
46
  CreateDocument,
47
47
  CreateInstances,
48
- CreateJournalEntry,
49
48
  CreateNote,
50
49
  CreateNotes,
51
50
  CreateNotification,
@@ -94,7 +93,6 @@ import type {
94
93
  GetIntent,
95
94
  GetInvoices200Response,
96
95
  GetInvoicesQuery,
97
- GetJournalEntries200Response,
98
96
  GetNotes200Response,
99
97
  GetNotifications200Response,
100
98
  GetOrders200Response,
@@ -118,7 +116,6 @@ import type {
118
116
  GetWorkflowInstances200Response,
119
117
  Intent,
120
118
  Invoice,
121
- JournalEntry,
122
119
  LeaseStatus,
123
120
  LinkPlugin,
124
121
  Login,
@@ -162,6 +159,7 @@ import type {
162
159
  UpdateNote,
163
160
  UpdateOrg,
164
161
  UpdatePlan,
162
+ UpdateProduct,
165
163
  UpdateSmartBarPrompt,
166
164
  UpdateSubscription,
167
165
  UpdateTaskInstance,
@@ -238,8 +236,6 @@ import {
238
236
  CreateDocumentToJSON,
239
237
  CreateInstancesFromJSON,
240
238
  CreateInstancesToJSON,
241
- CreateJournalEntryFromJSON,
242
- CreateJournalEntryToJSON,
243
239
  CreateNoteFromJSON,
244
240
  CreateNoteToJSON,
245
241
  CreateNotesFromJSON,
@@ -336,8 +332,6 @@ import {
336
332
  GetInvoices200ResponseToJSON,
337
333
  GetInvoicesQueryFromJSON,
338
334
  GetInvoicesQueryToJSON,
339
- GetJournalEntries200ResponseFromJSON,
340
- GetJournalEntries200ResponseToJSON,
341
335
  GetNotes200ResponseFromJSON,
342
336
  GetNotes200ResponseToJSON,
343
337
  GetNotifications200ResponseFromJSON,
@@ -384,8 +378,6 @@ import {
384
378
  IntentToJSON,
385
379
  InvoiceFromJSON,
386
380
  InvoiceToJSON,
387
- JournalEntryFromJSON,
388
- JournalEntryToJSON,
389
381
  LeaseStatusFromJSON,
390
382
  LeaseStatusToJSON,
391
383
  LinkPluginFromJSON,
@@ -472,6 +464,8 @@ import {
472
464
  UpdateOrgToJSON,
473
465
  UpdatePlanFromJSON,
474
466
  UpdatePlanToJSON,
467
+ UpdateProductFromJSON,
468
+ UpdateProductToJSON,
475
469
  UpdateSmartBarPromptFromJSON,
476
470
  UpdateSmartBarPromptToJSON,
477
471
  UpdateSubscriptionFromJSON,
@@ -590,10 +584,6 @@ export interface CreateDocumentRequest {
590
584
  createDocument: CreateDocument;
591
585
  }
592
586
 
593
- export interface CreateJournalEntryRequest {
594
- createJournalEntry: CreateJournalEntry;
595
- }
596
-
597
587
  export interface CreateNoteRequest {
598
588
  siteId: string;
599
589
  createNote: CreateNote;
@@ -880,16 +870,6 @@ export interface GetInvoicesRequest {
880
870
  getInvoicesQuery: GetInvoicesQuery;
881
871
  }
882
872
 
883
- export interface GetJournalEntriesRequest {
884
- offset?: number;
885
- limit?: number;
886
- date?: string;
887
- }
888
-
889
- export interface GetJournalEntryRequest {
890
- journalEntryId: string;
891
- }
892
-
893
873
  export interface GetNoteRequest {
894
874
  siteId: string;
895
875
  noteId: string;
@@ -1260,6 +1240,12 @@ export interface UpdatePlanRequest {
1260
1240
  updatePlan: UpdatePlan;
1261
1241
  }
1262
1242
 
1243
+ export interface UpdateProductRequest {
1244
+ siteId: string;
1245
+ productId: string;
1246
+ updateProduct: UpdateProduct;
1247
+ }
1248
+
1263
1249
  export interface UpdateSiteRequest {
1264
1250
  siteId: string;
1265
1251
  createSiteCustom: CreateSiteCustom;
@@ -2181,48 +2167,6 @@ export class DefaultApi extends runtime.BaseAPI {
2181
2167
  return await response.value();
2182
2168
  }
2183
2169
 
2184
- /**
2185
- */
2186
- async createJournalEntryRaw(requestParameters: CreateJournalEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JournalEntry>> {
2187
- if (requestParameters['createJournalEntry'] == null) {
2188
- throw new runtime.RequiredError(
2189
- 'createJournalEntry',
2190
- 'Required parameter "createJournalEntry" was null or undefined when calling createJournalEntry().'
2191
- );
2192
- }
2193
-
2194
- const queryParameters: any = {};
2195
-
2196
- const headerParameters: runtime.HTTPHeaders = {};
2197
-
2198
- headerParameters['Content-Type'] = 'application/json';
2199
-
2200
- if (this.configuration && this.configuration.accessToken) {
2201
- const token = this.configuration.accessToken;
2202
- const tokenString = await token("bearer", []);
2203
-
2204
- if (tokenString) {
2205
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
2206
- }
2207
- }
2208
- const response = await this.request({
2209
- path: `/api/billing/journal-entries`,
2210
- method: 'POST',
2211
- headers: headerParameters,
2212
- query: queryParameters,
2213
- body: CreateJournalEntryToJSON(requestParameters['createJournalEntry']),
2214
- }, initOverrides);
2215
-
2216
- return new runtime.JSONApiResponse(response, (jsonValue) => JournalEntryFromJSON(jsonValue));
2217
- }
2218
-
2219
- /**
2220
- */
2221
- async createJournalEntry(requestParameters: CreateJournalEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JournalEntry> {
2222
- const response = await this.createJournalEntryRaw(requestParameters, initOverrides);
2223
- return await response.value();
2224
- }
2225
-
2226
2170
  /**
2227
2171
  */
2228
2172
  async createNoteRaw(requestParameters: CreateNoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Note>> {
@@ -4890,89 +4834,6 @@ export class DefaultApi extends runtime.BaseAPI {
4890
4834
  return await response.value();
4891
4835
  }
4892
4836
 
4893
- /**
4894
- */
4895
- async getJournalEntriesRaw(requestParameters: GetJournalEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetJournalEntries200Response>> {
4896
- const queryParameters: any = {};
4897
-
4898
- if (requestParameters['offset'] != null) {
4899
- queryParameters['offset'] = requestParameters['offset'];
4900
- }
4901
-
4902
- if (requestParameters['limit'] != null) {
4903
- queryParameters['limit'] = requestParameters['limit'];
4904
- }
4905
-
4906
- if (requestParameters['date'] != null) {
4907
- queryParameters['date'] = requestParameters['date'];
4908
- }
4909
-
4910
- const headerParameters: runtime.HTTPHeaders = {};
4911
-
4912
- if (this.configuration && this.configuration.accessToken) {
4913
- const token = this.configuration.accessToken;
4914
- const tokenString = await token("bearer", []);
4915
-
4916
- if (tokenString) {
4917
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
4918
- }
4919
- }
4920
- const response = await this.request({
4921
- path: `/api/billing/journal-entries`,
4922
- method: 'GET',
4923
- headers: headerParameters,
4924
- query: queryParameters,
4925
- }, initOverrides);
4926
-
4927
- return new runtime.JSONApiResponse(response, (jsonValue) => GetJournalEntries200ResponseFromJSON(jsonValue));
4928
- }
4929
-
4930
- /**
4931
- */
4932
- async getJournalEntries(requestParameters: GetJournalEntriesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetJournalEntries200Response> {
4933
- const response = await this.getJournalEntriesRaw(requestParameters, initOverrides);
4934
- return await response.value();
4935
- }
4936
-
4937
- /**
4938
- */
4939
- async getJournalEntryRaw(requestParameters: GetJournalEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JournalEntry>> {
4940
- if (requestParameters['journalEntryId'] == null) {
4941
- throw new runtime.RequiredError(
4942
- 'journalEntryId',
4943
- 'Required parameter "journalEntryId" was null or undefined when calling getJournalEntry().'
4944
- );
4945
- }
4946
-
4947
- const queryParameters: any = {};
4948
-
4949
- const headerParameters: runtime.HTTPHeaders = {};
4950
-
4951
- if (this.configuration && this.configuration.accessToken) {
4952
- const token = this.configuration.accessToken;
4953
- const tokenString = await token("bearer", []);
4954
-
4955
- if (tokenString) {
4956
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
4957
- }
4958
- }
4959
- const response = await this.request({
4960
- path: `/api/billing/journal-entries/{journalEntryId}`.replace(`{${"journalEntryId"}}`, encodeURIComponent(String(requestParameters['journalEntryId']))),
4961
- method: 'GET',
4962
- headers: headerParameters,
4963
- query: queryParameters,
4964
- }, initOverrides);
4965
-
4966
- return new runtime.JSONApiResponse(response, (jsonValue) => JournalEntryFromJSON(jsonValue));
4967
- }
4968
-
4969
- /**
4970
- */
4971
- async getJournalEntry(requestParameters: GetJournalEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JournalEntry> {
4972
- const response = await this.getJournalEntryRaw(requestParameters, initOverrides);
4973
- return await response.value();
4974
- }
4975
-
4976
4837
  /**
4977
4838
  */
4978
4839
  async getNoteRaw(requestParameters: GetNoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Note>> {
@@ -8228,6 +8089,62 @@ export class DefaultApi extends runtime.BaseAPI {
8228
8089
  return await response.value();
8229
8090
  }
8230
8091
 
8092
+ /**
8093
+ */
8094
+ async updateProductRaw(requestParameters: UpdateProductRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductCustom>> {
8095
+ if (requestParameters['siteId'] == null) {
8096
+ throw new runtime.RequiredError(
8097
+ 'siteId',
8098
+ 'Required parameter "siteId" was null or undefined when calling updateProduct().'
8099
+ );
8100
+ }
8101
+
8102
+ if (requestParameters['productId'] == null) {
8103
+ throw new runtime.RequiredError(
8104
+ 'productId',
8105
+ 'Required parameter "productId" was null or undefined when calling updateProduct().'
8106
+ );
8107
+ }
8108
+
8109
+ if (requestParameters['updateProduct'] == null) {
8110
+ throw new runtime.RequiredError(
8111
+ 'updateProduct',
8112
+ 'Required parameter "updateProduct" was null or undefined when calling updateProduct().'
8113
+ );
8114
+ }
8115
+
8116
+ const queryParameters: any = {};
8117
+
8118
+ const headerParameters: runtime.HTTPHeaders = {};
8119
+
8120
+ headerParameters['Content-Type'] = 'application/json';
8121
+
8122
+ if (this.configuration && this.configuration.accessToken) {
8123
+ const token = this.configuration.accessToken;
8124
+ const tokenString = await token("bearer", []);
8125
+
8126
+ if (tokenString) {
8127
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
8128
+ }
8129
+ }
8130
+ const response = await this.request({
8131
+ path: `/api/sites/{siteId}/billing/products`.replace(`{${"siteId"}}`, encodeURIComponent(String(requestParameters['siteId']))).replace(`{${"productId"}}`, encodeURIComponent(String(requestParameters['productId']))),
8132
+ method: 'PUT',
8133
+ headers: headerParameters,
8134
+ query: queryParameters,
8135
+ body: UpdateProductToJSON(requestParameters['updateProduct']),
8136
+ }, initOverrides);
8137
+
8138
+ return new runtime.JSONApiResponse(response, (jsonValue) => ProductCustomFromJSON(jsonValue));
8139
+ }
8140
+
8141
+ /**
8142
+ */
8143
+ async updateProduct(requestParameters: UpdateProductRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductCustom> {
8144
+ const response = await this.updateProductRaw(requestParameters, initOverrides);
8145
+ return await response.value();
8146
+ }
8147
+
8231
8148
  /**
8232
8149
  */
8233
8150
  async updateSiteRaw(requestParameters: UpdateSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Site>> {
@@ -39,7 +39,6 @@ export * from './create-communication';
39
39
  export * from './create-configuration-setting';
40
40
  export * from './create-document';
41
41
  export * from './create-instances';
42
- export * from './create-journal-entry';
43
42
  export * from './create-map-feature';
44
43
  export * from './create-note';
45
44
  export * from './create-notes';
@@ -105,7 +104,6 @@ export * from './get-documents200-response';
105
104
  export * from './get-intent';
106
105
  export * from './get-invoices200-response';
107
106
  export * from './get-invoices-query';
108
- export * from './get-journal-entries200-response';
109
107
  export * from './get-notes200-response';
110
108
  export * from './get-notifications200-response';
111
109
  export * from './get-orders200-response';
@@ -130,8 +128,6 @@ export * from './get-workflow-instances200-response';
130
128
  export * from './intent';
131
129
  export * from './invoice';
132
130
  export * from './invoice-contact';
133
- export * from './journal-entry';
134
- export * from './journal-entry-entries';
135
131
  export * from './lease-status';
136
132
  export * from './line-item';
137
133
  export * from './link-plugin';
@@ -215,6 +211,7 @@ export * from './update-map-feature';
215
211
  export * from './update-note';
216
212
  export * from './update-org';
217
213
  export * from './update-plan';
214
+ export * from './update-product';
218
215
  export * from './update-smart-bar-prompt';
219
216
  export * from './update-subscription';
220
217
  export * from './update-subscription-charge';
@@ -0,0 +1,170 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * ManageSpace API
5
+ * ManageSpace API Documentation
6
+ *
7
+ * The version of the OpenAPI document: 1.0.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 { mapValues } from '../runtime';
16
+ import type { TransactionPostingEntries } from './transaction-posting-entries';
17
+ import {
18
+ TransactionPostingEntriesFromJSON,
19
+ TransactionPostingEntriesFromJSONTyped,
20
+ TransactionPostingEntriesToJSON,
21
+ TransactionPostingEntriesToJSONTyped,
22
+ } from './transaction-posting-entries';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface UpdateProduct
28
+ */
29
+ export interface UpdateProduct {
30
+ /**
31
+ * The product name
32
+ * @type {string}
33
+ * @memberof UpdateProduct
34
+ */
35
+ name: string;
36
+ /**
37
+ * Stock keeping unit
38
+ * @type {string}
39
+ * @memberof UpdateProduct
40
+ */
41
+ sku?: string;
42
+ /**
43
+ * Product status
44
+ * @type {string}
45
+ * @memberof UpdateProduct
46
+ */
47
+ status?: string;
48
+ /**
49
+ * Tax exempt
50
+ * @type {boolean}
51
+ * @memberof UpdateProduct
52
+ */
53
+ taxable?: boolean;
54
+ /**
55
+ * Indicated whether it is the default product or not
56
+ * @type {boolean}
57
+ * @memberof UpdateProduct
58
+ */
59
+ isDefault?: boolean;
60
+ /**
61
+ * Description of product
62
+ * @type {string}
63
+ * @memberof UpdateProduct
64
+ */
65
+ description?: string;
66
+ /**
67
+ * List of custom fields
68
+ * @type {object}
69
+ * @memberof UpdateProduct
70
+ */
71
+ customFields?: object;
72
+ /**
73
+ * Code of Chart of Account
74
+ * @type {string}
75
+ * @memberof UpdateProduct
76
+ */
77
+ incomeAccount?: string;
78
+ /**
79
+ * Select which tax group to be used
80
+ * @type {string}
81
+ * @memberof UpdateProduct
82
+ */
83
+ productTaxGroupName?: string;
84
+ /**
85
+ * The price of the product in the lowest denomination of the currency
86
+ * @type {number}
87
+ * @memberof UpdateProduct
88
+ */
89
+ price?: number;
90
+ /**
91
+ * Revenue Rule ID.
92
+ * @type {string}
93
+ * @memberof UpdateProduct
94
+ */
95
+ revenueRuleId?: string;
96
+ /**
97
+ * Date revenue will begin to be recognized.
98
+ * @type {string}
99
+ * @memberof UpdateProduct
100
+ */
101
+ recognitionStartDate?: string;
102
+ /**
103
+ *
104
+ * @type {Array<TransactionPostingEntries>}
105
+ * @memberof UpdateProduct
106
+ */
107
+ transactionPostingEntries?: Array<TransactionPostingEntries>;
108
+ }
109
+
110
+ /**
111
+ * Check if a given object implements the UpdateProduct interface.
112
+ */
113
+ export function instanceOfUpdateProduct(value: object): value is UpdateProduct {
114
+ if (!('name' in value) || value['name'] === undefined) return false;
115
+ return true;
116
+ }
117
+
118
+ export function UpdateProductFromJSON(json: any): UpdateProduct {
119
+ return UpdateProductFromJSONTyped(json, false);
120
+ }
121
+
122
+ export function UpdateProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateProduct {
123
+ if (json == null) {
124
+ return json;
125
+ }
126
+ return {
127
+
128
+ 'name': json['name'],
129
+ 'sku': json['sku'] == null ? undefined : json['sku'],
130
+ 'status': json['status'] == null ? undefined : json['status'],
131
+ 'taxable': json['taxable'] == null ? undefined : json['taxable'],
132
+ 'isDefault': json['isDefault'] == null ? undefined : json['isDefault'],
133
+ 'description': json['description'] == null ? undefined : json['description'],
134
+ 'customFields': json['customFields'] == null ? undefined : json['customFields'],
135
+ 'incomeAccount': json['incomeAccount'] == null ? undefined : json['incomeAccount'],
136
+ 'productTaxGroupName': json['productTaxGroupName'] == null ? undefined : json['productTaxGroupName'],
137
+ 'price': json['price'] == null ? undefined : json['price'],
138
+ 'revenueRuleId': json['revenueRuleId'] == null ? undefined : json['revenueRuleId'],
139
+ 'recognitionStartDate': json['recognitionStartDate'] == null ? undefined : json['recognitionStartDate'],
140
+ 'transactionPostingEntries': json['transactionPostingEntries'] == null ? undefined : ((json['transactionPostingEntries'] as Array<any>).map(TransactionPostingEntriesFromJSON)),
141
+ };
142
+ }
143
+
144
+ export function UpdateProductToJSON(json: any): UpdateProduct {
145
+ return UpdateProductToJSONTyped(json, false);
146
+ }
147
+
148
+ export function UpdateProductToJSONTyped(value?: UpdateProduct | null, ignoreDiscriminator: boolean = false): any {
149
+ if (value == null) {
150
+ return value;
151
+ }
152
+
153
+ return {
154
+
155
+ 'name': value['name'],
156
+ 'sku': value['sku'],
157
+ 'status': value['status'],
158
+ 'taxable': value['taxable'],
159
+ 'isDefault': value['isDefault'],
160
+ 'description': value['description'],
161
+ 'customFields': value['customFields'],
162
+ 'incomeAccount': value['incomeAccount'],
163
+ 'productTaxGroupName': value['productTaxGroupName'],
164
+ 'price': value['price'],
165
+ 'revenueRuleId': value['revenueRuleId'],
166
+ 'recognitionStartDate': value['recognitionStartDate'],
167
+ 'transactionPostingEntries': value['transactionPostingEntries'] == null ? undefined : ((value['transactionPostingEntries'] as Array<any>).map(TransactionPostingEntriesToJSON)),
168
+ };
169
+ }
170
+
@@ -1,108 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * ManageSpace API
5
- * ManageSpace API Documentation
6
- *
7
- * The version of the OpenAPI document: 1.0.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 { mapValues } from '../runtime';
16
- import type { JournalEntryEntries } from './journal-entry-entries';
17
- import {
18
- JournalEntryEntriesFromJSON,
19
- JournalEntryEntriesFromJSONTyped,
20
- JournalEntryEntriesToJSON,
21
- JournalEntryEntriesToJSONTyped,
22
- } from './journal-entry-entries';
23
-
24
- /**
25
- *
26
- * @export
27
- * @interface CreateJournalEntry
28
- */
29
- export interface CreateJournalEntry {
30
- /**
31
- * Journal Entry Date
32
- * @type {string}
33
- * @memberof CreateJournalEntry
34
- */
35
- date: string;
36
- /**
37
- * Journal Entry description
38
- * @type {string}
39
- * @memberof CreateJournalEntry
40
- */
41
- description?: string;
42
- /**
43
- * Journal entries
44
- * @type {Array<JournalEntryEntries>}
45
- * @memberof CreateJournalEntry
46
- */
47
- entries: Array<JournalEntryEntries>;
48
- /**
49
- * Custom fields on the invoice
50
- * @type {object}
51
- * @memberof CreateJournalEntry
52
- */
53
- customFields?: object;
54
- /**
55
- * Currency id used in this journal entry
56
- * @type {string}
57
- * @memberof CreateJournalEntry
58
- */
59
- currencyId: string;
60
- }
61
-
62
- /**
63
- * Check if a given object implements the CreateJournalEntry interface.
64
- */
65
- export function instanceOfCreateJournalEntry(value: object): value is CreateJournalEntry {
66
- if (!('date' in value) || value['date'] === undefined) return false;
67
- if (!('entries' in value) || value['entries'] === undefined) return false;
68
- if (!('currencyId' in value) || value['currencyId'] === undefined) return false;
69
- return true;
70
- }
71
-
72
- export function CreateJournalEntryFromJSON(json: any): CreateJournalEntry {
73
- return CreateJournalEntryFromJSONTyped(json, false);
74
- }
75
-
76
- export function CreateJournalEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateJournalEntry {
77
- if (json == null) {
78
- return json;
79
- }
80
- return {
81
-
82
- 'date': json['date'],
83
- 'description': json['description'] == null ? undefined : json['description'],
84
- 'entries': ((json['entries'] as Array<any>).map(JournalEntryEntriesFromJSON)),
85
- 'customFields': json['customFields'] == null ? undefined : json['customFields'],
86
- 'currencyId': json['currencyId'],
87
- };
88
- }
89
-
90
- export function CreateJournalEntryToJSON(json: any): CreateJournalEntry {
91
- return CreateJournalEntryToJSONTyped(json, false);
92
- }
93
-
94
- export function CreateJournalEntryToJSONTyped(value?: CreateJournalEntry | null, ignoreDiscriminator: boolean = false): any {
95
- if (value == null) {
96
- return value;
97
- }
98
-
99
- return {
100
-
101
- 'date': value['date'],
102
- 'description': value['description'],
103
- 'entries': ((value['entries'] as Array<any>).map(JournalEntryEntriesToJSON)),
104
- 'customFields': value['customFields'],
105
- 'currencyId': value['currencyId'],
106
- };
107
- }
108
-
@@ -1,89 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * ManageSpace API
5
- * ManageSpace API Documentation
6
- *
7
- * The version of the OpenAPI document: 1.0.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 { mapValues } from '../runtime';
16
- import type { PageMeta } from './page-meta';
17
- import {
18
- PageMetaFromJSON,
19
- PageMetaFromJSONTyped,
20
- PageMetaToJSON,
21
- PageMetaToJSONTyped,
22
- } from './page-meta';
23
- import type { JournalEntry } from './journal-entry';
24
- import {
25
- JournalEntryFromJSON,
26
- JournalEntryFromJSONTyped,
27
- JournalEntryToJSON,
28
- JournalEntryToJSONTyped,
29
- } from './journal-entry';
30
-
31
- /**
32
- *
33
- * @export
34
- * @interface GetJournalEntries200Response
35
- */
36
- export interface GetJournalEntries200Response {
37
- /**
38
- * The pagination metadata
39
- * @type {PageMeta}
40
- * @memberof GetJournalEntries200Response
41
- */
42
- pageMeta: PageMeta;
43
- /**
44
- *
45
- * @type {Array<JournalEntry>}
46
- * @memberof GetJournalEntries200Response
47
- */
48
- results?: Array<JournalEntry>;
49
- }
50
-
51
- /**
52
- * Check if a given object implements the GetJournalEntries200Response interface.
53
- */
54
- export function instanceOfGetJournalEntries200Response(value: object): value is GetJournalEntries200Response {
55
- if (!('pageMeta' in value) || value['pageMeta'] === undefined) return false;
56
- return true;
57
- }
58
-
59
- export function GetJournalEntries200ResponseFromJSON(json: any): GetJournalEntries200Response {
60
- return GetJournalEntries200ResponseFromJSONTyped(json, false);
61
- }
62
-
63
- export function GetJournalEntries200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetJournalEntries200Response {
64
- if (json == null) {
65
- return json;
66
- }
67
- return {
68
-
69
- 'pageMeta': PageMetaFromJSON(json['pageMeta']),
70
- 'results': json['results'] == null ? undefined : ((json['results'] as Array<any>).map(JournalEntryFromJSON)),
71
- };
72
- }
73
-
74
- export function GetJournalEntries200ResponseToJSON(json: any): GetJournalEntries200Response {
75
- return GetJournalEntries200ResponseToJSONTyped(json, false);
76
- }
77
-
78
- export function GetJournalEntries200ResponseToJSONTyped(value?: GetJournalEntries200Response | null, ignoreDiscriminator: boolean = false): any {
79
- if (value == null) {
80
- return value;
81
- }
82
-
83
- return {
84
-
85
- 'pageMeta': PageMetaToJSON(value['pageMeta']),
86
- 'results': value['results'] == null ? undefined : ((value['results'] as Array<any>).map(JournalEntryToJSON)),
87
- };
88
- }
89
-
@@ -1,126 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * ManageSpace API
5
- * ManageSpace API Documentation
6
- *
7
- * The version of the OpenAPI document: 1.0.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 { mapValues } from '../runtime';
16
- /**
17
- *
18
- * @export
19
- * @interface JournalEntryEntries
20
- */
21
- export interface JournalEntryEntries {
22
- /**
23
- * Journal Entry Line Number
24
- * @type {string}
25
- * @memberof JournalEntryEntries
26
- */
27
- lineNo: string;
28
- /**
29
- * GL Account number
30
- * @type {string}
31
- * @memberof JournalEntryEntries
32
- */
33
- account: string;
34
- /**
35
- * Debit Account id associated with this Journal Entry
36
- * @type {string}
37
- * @memberof JournalEntryEntries
38
- */
39
- debit: string;
40
- /**
41
- * Credit Account id associated with this Journal Entry
42
- * @type {string}
43
- * @memberof JournalEntryEntries
44
- */
45
- credit: string;
46
- /**
47
- * Journal Entry description
48
- * @type {string}
49
- * @memberof JournalEntryEntries
50
- */
51
- description?: string;
52
- /**
53
- * Customer ID associated with journal entry
54
- * @type {string}
55
- * @memberof JournalEntryEntries
56
- */
57
- customerId: string;
58
- /**
59
- * Customer name
60
- * @type {string}
61
- * @memberof JournalEntryEntries
62
- */
63
- customerName?: string;
64
- /**
65
- * Custom fields on the invoice
66
- * @type {object}
67
- * @memberof JournalEntryEntries
68
- */
69
- customFields?: object;
70
- }
71
-
72
- /**
73
- * Check if a given object implements the JournalEntryEntries interface.
74
- */
75
- export function instanceOfJournalEntryEntries(value: object): value is JournalEntryEntries {
76
- if (!('lineNo' in value) || value['lineNo'] === undefined) return false;
77
- if (!('account' in value) || value['account'] === undefined) return false;
78
- if (!('debit' in value) || value['debit'] === undefined) return false;
79
- if (!('credit' in value) || value['credit'] === undefined) return false;
80
- if (!('customerId' in value) || value['customerId'] === undefined) return false;
81
- return true;
82
- }
83
-
84
- export function JournalEntryEntriesFromJSON(json: any): JournalEntryEntries {
85
- return JournalEntryEntriesFromJSONTyped(json, false);
86
- }
87
-
88
- export function JournalEntryEntriesFromJSONTyped(json: any, ignoreDiscriminator: boolean): JournalEntryEntries {
89
- if (json == null) {
90
- return json;
91
- }
92
- return {
93
-
94
- 'lineNo': json['lineNo'],
95
- 'account': json['account'],
96
- 'debit': json['debit'],
97
- 'credit': json['credit'],
98
- 'description': json['description'] == null ? undefined : json['description'],
99
- 'customerId': json['customerId'],
100
- 'customerName': json['customerName'] == null ? undefined : json['customerName'],
101
- 'customFields': json['customFields'] == null ? undefined : json['customFields'],
102
- };
103
- }
104
-
105
- export function JournalEntryEntriesToJSON(json: any): JournalEntryEntries {
106
- return JournalEntryEntriesToJSONTyped(json, false);
107
- }
108
-
109
- export function JournalEntryEntriesToJSONTyped(value?: JournalEntryEntries | null, ignoreDiscriminator: boolean = false): any {
110
- if (value == null) {
111
- return value;
112
- }
113
-
114
- return {
115
-
116
- 'lineNo': value['lineNo'],
117
- 'account': value['account'],
118
- 'debit': value['debit'],
119
- 'credit': value['credit'],
120
- 'description': value['description'],
121
- 'customerId': value['customerId'],
122
- 'customerName': value['customerName'],
123
- 'customFields': value['customFields'],
124
- };
125
- }
126
-
@@ -1,180 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * ManageSpace API
5
- * ManageSpace API Documentation
6
- *
7
- * The version of the OpenAPI document: 1.0.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 { mapValues } from '../runtime';
16
- import type { JournalEntryEntries } from './journal-entry-entries';
17
- import {
18
- JournalEntryEntriesFromJSON,
19
- JournalEntryEntriesFromJSONTyped,
20
- JournalEntryEntriesToJSON,
21
- JournalEntryEntriesToJSONTyped,
22
- } from './journal-entry-entries';
23
-
24
- /**
25
- *
26
- * @export
27
- * @interface JournalEntry
28
- */
29
- export interface JournalEntry {
30
- /**
31
- * Journal Entry Date
32
- * @type {string}
33
- * @memberof JournalEntry
34
- */
35
- date: string;
36
- /**
37
- * Journal Entry description
38
- * @type {string}
39
- * @memberof JournalEntry
40
- */
41
- description?: string;
42
- /**
43
- * Journal entries
44
- * @type {Array<JournalEntryEntries>}
45
- * @memberof JournalEntry
46
- */
47
- entries: Array<JournalEntryEntries>;
48
- /**
49
- * Custom fields on the invoice
50
- * @type {object}
51
- * @memberof JournalEntry
52
- */
53
- customFields?: object;
54
- /**
55
- * Currency id used in this journal entry
56
- * @type {string}
57
- * @memberof JournalEntry
58
- */
59
- currencyId: string;
60
- /**
61
- * Journal Entry ID
62
- * @type {string}
63
- * @memberof JournalEntry
64
- */
65
- id: string;
66
- /**
67
- * Origin of journal entry
68
- * @type {string}
69
- * @memberof JournalEntry
70
- */
71
- sourceType: string;
72
- /**
73
- * Source of journal entry
74
- * @type {string}
75
- * @memberof JournalEntry
76
- */
77
- sourceId: string;
78
- /**
79
- * Currency code of the transaction
80
- * @type {string}
81
- * @memberof JournalEntry
82
- */
83
- transactionCurrency: string;
84
- /**
85
- * Transaction Conversion Rate
86
- * @type {number}
87
- * @memberof JournalEntry
88
- */
89
- transactionConversionRate: number;
90
- /**
91
- * Transaction amount
92
- * @type {string}
93
- * @memberof JournalEntry
94
- */
95
- transactionAmount: string;
96
- /**
97
- * The date the journal entry was created
98
- * @type {string}
99
- * @memberof JournalEntry
100
- */
101
- createdAt: string;
102
- /**
103
- * The date the journal entry was updated
104
- * @type {string}
105
- * @memberof JournalEntry
106
- */
107
- updatedAt: string;
108
- }
109
-
110
- /**
111
- * Check if a given object implements the JournalEntry interface.
112
- */
113
- export function instanceOfJournalEntry(value: object): value is JournalEntry {
114
- if (!('date' in value) || value['date'] === undefined) return false;
115
- if (!('entries' in value) || value['entries'] === undefined) return false;
116
- if (!('currencyId' in value) || value['currencyId'] === undefined) return false;
117
- if (!('id' in value) || value['id'] === undefined) return false;
118
- if (!('sourceType' in value) || value['sourceType'] === undefined) return false;
119
- if (!('sourceId' in value) || value['sourceId'] === undefined) return false;
120
- if (!('transactionCurrency' in value) || value['transactionCurrency'] === undefined) return false;
121
- if (!('transactionConversionRate' in value) || value['transactionConversionRate'] === undefined) return false;
122
- if (!('transactionAmount' in value) || value['transactionAmount'] === undefined) return false;
123
- if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
124
- if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
125
- return true;
126
- }
127
-
128
- export function JournalEntryFromJSON(json: any): JournalEntry {
129
- return JournalEntryFromJSONTyped(json, false);
130
- }
131
-
132
- export function JournalEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): JournalEntry {
133
- if (json == null) {
134
- return json;
135
- }
136
- return {
137
-
138
- 'date': json['date'],
139
- 'description': json['description'] == null ? undefined : json['description'],
140
- 'entries': ((json['entries'] as Array<any>).map(JournalEntryEntriesFromJSON)),
141
- 'customFields': json['customFields'] == null ? undefined : json['customFields'],
142
- 'currencyId': json['currencyId'],
143
- 'id': json['id'],
144
- 'sourceType': json['sourceType'],
145
- 'sourceId': json['sourceId'],
146
- 'transactionCurrency': json['transactionCurrency'],
147
- 'transactionConversionRate': json['transactionConversionRate'],
148
- 'transactionAmount': json['transactionAmount'],
149
- 'createdAt': json['createdAt'],
150
- 'updatedAt': json['updatedAt'],
151
- };
152
- }
153
-
154
- export function JournalEntryToJSON(json: any): JournalEntry {
155
- return JournalEntryToJSONTyped(json, false);
156
- }
157
-
158
- export function JournalEntryToJSONTyped(value?: JournalEntry | null, ignoreDiscriminator: boolean = false): any {
159
- if (value == null) {
160
- return value;
161
- }
162
-
163
- return {
164
-
165
- 'date': value['date'],
166
- 'description': value['description'],
167
- 'entries': ((value['entries'] as Array<any>).map(JournalEntryEntriesToJSON)),
168
- 'customFields': value['customFields'],
169
- 'currencyId': value['currencyId'],
170
- 'id': value['id'],
171
- 'sourceType': value['sourceType'],
172
- 'sourceId': value['sourceId'],
173
- 'transactionCurrency': value['transactionCurrency'],
174
- 'transactionConversionRate': value['transactionConversionRate'],
175
- 'transactionAmount': value['transactionAmount'],
176
- 'createdAt': value['createdAt'],
177
- 'updatedAt': value['updatedAt'],
178
- };
179
- }
180
-