@tradecafe/offer-service-sdk 0.0.49 → 0.0.51

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 (58) hide show
  1. package/.openapi-generator/FILES +9 -0
  2. package/api/matchedOffersApi.ts +69 -0
  3. package/dist/api/matchedOffersApi.d.ts +9 -0
  4. package/dist/api/matchedOffersApi.js +120 -54
  5. package/dist/api/matchedOffersApi.js.map +1 -1
  6. package/dist/model/associatedCostDto.d.ts +16 -0
  7. package/dist/model/associatedCostDto.js +31 -0
  8. package/dist/model/associatedCostDto.js.map +1 -0
  9. package/dist/model/bulkChangeFreightRatesDto.d.ts +19 -0
  10. package/dist/model/bulkChangeFreightRatesDto.js +41 -0
  11. package/dist/model/bulkChangeFreightRatesDto.js.map +1 -0
  12. package/dist/model/costAmountDto.d.ts +3 -0
  13. package/dist/model/costAmountDto.js +15 -0
  14. package/dist/model/costAmountDto.js.map +1 -1
  15. package/dist/model/costAttributesDto.d.ts +32 -0
  16. package/dist/model/costAttributesDto.js +101 -0
  17. package/dist/model/costAttributesDto.js.map +1 -0
  18. package/dist/model/costAttributesDtoAssociated.d.ts +16 -0
  19. package/dist/model/costAttributesDtoAssociated.js +31 -0
  20. package/dist/model/costAttributesDtoAssociated.js.map +1 -0
  21. package/dist/model/costAttributesDtoDefaultCost.d.ts +18 -0
  22. package/dist/model/costAttributesDtoDefaultCost.js +41 -0
  23. package/dist/model/costAttributesDtoDefaultCost.js.map +1 -0
  24. package/dist/model/costDto.d.ts +15 -1
  25. package/dist/model/costDto.js +61 -1
  26. package/dist/model/costDto.js.map +1 -1
  27. package/dist/model/costDtoAmount.d.ts +17 -0
  28. package/dist/model/costDtoAmount.js +36 -0
  29. package/dist/model/costDtoAmount.js.map +1 -0
  30. package/dist/model/costDtoAttributes.d.ts +32 -0
  31. package/dist/model/costDtoAttributes.js +101 -0
  32. package/dist/model/costDtoAttributes.js.map +1 -0
  33. package/dist/model/costDtoSource.d.ts +2 -1
  34. package/dist/model/costDtoSource.js +8 -3
  35. package/dist/model/costDtoSource.js.map +1 -1
  36. package/dist/model/costSourceDto.d.ts +15 -0
  37. package/dist/model/costSourceDto.js +26 -0
  38. package/dist/model/costSourceDto.js.map +1 -0
  39. package/dist/model/defaultCostDto.d.ts +18 -0
  40. package/dist/model/defaultCostDto.js +41 -0
  41. package/dist/model/defaultCostDto.js.map +1 -0
  42. package/dist/model/models.d.ts +9 -0
  43. package/dist/model/models.js +27 -0
  44. package/dist/model/models.js.map +1 -1
  45. package/model/associatedCostDto.ts +52 -0
  46. package/model/bulkChangeFreightRatesDto.ts +56 -0
  47. package/model/costAmountDto.ts +28 -1
  48. package/model/costAttributesDto.ts +174 -0
  49. package/model/costAttributesDtoAssociated.ts +56 -0
  50. package/model/costAttributesDtoDefaultCost.ts +74 -0
  51. package/model/costDto.ts +110 -6
  52. package/model/costDtoAmount.ts +65 -0
  53. package/model/costDtoAttributes.ts +178 -0
  54. package/model/costDtoSource.ts +16 -7
  55. package/model/costSourceDto.ts +43 -0
  56. package/model/defaultCostDto.ts +70 -0
  57. package/model/models.ts +27 -0
  58. package/package.json +1 -1
@@ -0,0 +1,52 @@
1
+ /**
2
+ * TradeCafé Offer Service
3
+ * Offer Service allows supplies to submit product offers into the TradeCafe platform
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
+ import { RequestFile } from './models';
14
+
15
+ export class AssociatedCostDto {
16
+ /**
17
+ * Associated amount
18
+ */
19
+ 'amount'?: number;
20
+ /**
21
+ * Associated currency
22
+ */
23
+ 'currency'?: string;
24
+ /**
25
+ * Invoice ID
26
+ */
27
+ 'invoice_id'?: string;
28
+
29
+ static discriminator: string | undefined = undefined;
30
+
31
+ static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
32
+ {
33
+ "name": "amount",
34
+ "baseName": "amount",
35
+ "type": "number"
36
+ },
37
+ {
38
+ "name": "currency",
39
+ "baseName": "currency",
40
+ "type": "string"
41
+ },
42
+ {
43
+ "name": "invoice_id",
44
+ "baseName": "invoice_id",
45
+ "type": "string"
46
+ } ];
47
+
48
+ static getAttributeTypeMap() {
49
+ return AssociatedCostDto.attributeTypeMap;
50
+ }
51
+ }
52
+
@@ -0,0 +1,56 @@
1
+ /**
2
+ * TradeCafé Offer Service
3
+ * Offer Service allows supplies to submit product offers into the TradeCafe platform
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
+ import { RequestFile } from './models';
14
+ import { CostDto } from './costDto';
15
+
16
+ export class BulkChangeFreightRatesDto {
17
+ 'ids': Array<string>;
18
+ 'costs': Array<CostDto>;
19
+ 'remove': boolean;
20
+ 'path': boolean;
21
+ 'user_id': string;
22
+
23
+ static discriminator: string | undefined = undefined;
24
+
25
+ static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
26
+ {
27
+ "name": "ids",
28
+ "baseName": "ids",
29
+ "type": "Array<string>"
30
+ },
31
+ {
32
+ "name": "costs",
33
+ "baseName": "costs",
34
+ "type": "Array<CostDto>"
35
+ },
36
+ {
37
+ "name": "remove",
38
+ "baseName": "remove",
39
+ "type": "boolean"
40
+ },
41
+ {
42
+ "name": "path",
43
+ "baseName": "path",
44
+ "type": "boolean"
45
+ },
46
+ {
47
+ "name": "user_id",
48
+ "baseName": "user_id",
49
+ "type": "string"
50
+ } ];
51
+
52
+ static getAttributeTypeMap() {
53
+ return BulkChangeFreightRatesDto.attributeTypeMap;
54
+ }
55
+ }
56
+
@@ -14,9 +14,21 @@ import { RequestFile } from './models';
14
14
 
15
15
  export class CostAmountDto {
16
16
  /**
17
- * Total amount in CAD
17
+ * Total amount
18
18
  */
19
19
  'total'?: number;
20
+ /**
21
+ * Currency code
22
+ */
23
+ 'currency'?: string;
24
+ /**
25
+ * Total amount in CAD
26
+ */
27
+ 'total_cad'?: number;
28
+ /**
29
+ * Cost per unit
30
+ */
31
+ 'cost_unit'?: number;
20
32
 
21
33
  static discriminator: string | undefined = undefined;
22
34
 
@@ -25,6 +37,21 @@ export class CostAmountDto {
25
37
  "name": "total",
26
38
  "baseName": "total",
27
39
  "type": "number"
40
+ },
41
+ {
42
+ "name": "currency",
43
+ "baseName": "currency",
44
+ "type": "string"
45
+ },
46
+ {
47
+ "name": "total_cad",
48
+ "baseName": "total_cad",
49
+ "type": "number"
50
+ },
51
+ {
52
+ "name": "cost_unit",
53
+ "baseName": "cost_unit",
54
+ "type": "number"
28
55
  } ];
29
56
 
30
57
  static getAttributeTypeMap() {
@@ -0,0 +1,174 @@
1
+ /**
2
+ * TradeCafé Offer Service
3
+ * Offer Service allows supplies to submit product offers into the TradeCafe platform
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
+ import { RequestFile } from './models';
14
+ import { CostAttributesDtoAssociated } from './costAttributesDtoAssociated';
15
+ import { CostAttributesDtoDefaultCost } from './costAttributesDtoDefaultCost';
16
+
17
+ export class CostAttributesDto {
18
+ 'default_cost'?: CostAttributesDtoDefaultCost;
19
+ /**
20
+ * Actual amount
21
+ */
22
+ 'actual_amount'?: number;
23
+ /**
24
+ * Actual currency
25
+ */
26
+ 'actual_currency'?: string;
27
+ /**
28
+ * Total actual CAD
29
+ */
30
+ 'total_actual_cad'?: number;
31
+ /**
32
+ * Actual buy price
33
+ */
34
+ 'actual_buy_price'?: number;
35
+ /**
36
+ * Actual buy weight
37
+ */
38
+ 'actual_buy_weight'?: number;
39
+ /**
40
+ * Actual sell price
41
+ */
42
+ 'actual_sell_price'?: number;
43
+ /**
44
+ * Actual sell weight
45
+ */
46
+ 'actual_sell_weight'?: number;
47
+ 'associated'?: CostAttributesDtoAssociated;
48
+ /**
49
+ * Product index
50
+ */
51
+ 'product_index'?: number;
52
+ /**
53
+ * Buy weight
54
+ */
55
+ 'buy_weight'?: number;
56
+ /**
57
+ * Freight type
58
+ */
59
+ 'freight_type'?: string;
60
+ /**
61
+ * Rate created timestamp
62
+ */
63
+ 'rate_created'?: number;
64
+ /**
65
+ * Rate ID
66
+ */
67
+ 'rate_id'?: string;
68
+ /**
69
+ * Rate valid until timestamp
70
+ */
71
+ 'rate_until'?: number;
72
+ /**
73
+ * Finance term
74
+ */
75
+ 'finance_term'?: number;
76
+ /**
77
+ * Estimated finance term
78
+ */
79
+ 'est_finance_term'?: number;
80
+
81
+ static discriminator: string | undefined = undefined;
82
+
83
+ static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
84
+ {
85
+ "name": "default_cost",
86
+ "baseName": "default_cost",
87
+ "type": "CostAttributesDtoDefaultCost"
88
+ },
89
+ {
90
+ "name": "actual_amount",
91
+ "baseName": "actual_amount",
92
+ "type": "number"
93
+ },
94
+ {
95
+ "name": "actual_currency",
96
+ "baseName": "actual_currency",
97
+ "type": "string"
98
+ },
99
+ {
100
+ "name": "total_actual_cad",
101
+ "baseName": "total_actual_cad",
102
+ "type": "number"
103
+ },
104
+ {
105
+ "name": "actual_buy_price",
106
+ "baseName": "actual_buy_price",
107
+ "type": "number"
108
+ },
109
+ {
110
+ "name": "actual_buy_weight",
111
+ "baseName": "actual_buy_weight",
112
+ "type": "number"
113
+ },
114
+ {
115
+ "name": "actual_sell_price",
116
+ "baseName": "actual_sell_price",
117
+ "type": "number"
118
+ },
119
+ {
120
+ "name": "actual_sell_weight",
121
+ "baseName": "actual_sell_weight",
122
+ "type": "number"
123
+ },
124
+ {
125
+ "name": "associated",
126
+ "baseName": "associated",
127
+ "type": "CostAttributesDtoAssociated"
128
+ },
129
+ {
130
+ "name": "product_index",
131
+ "baseName": "product_index",
132
+ "type": "number"
133
+ },
134
+ {
135
+ "name": "buy_weight",
136
+ "baseName": "buy_weight",
137
+ "type": "number"
138
+ },
139
+ {
140
+ "name": "freight_type",
141
+ "baseName": "freight_type",
142
+ "type": "string"
143
+ },
144
+ {
145
+ "name": "rate_created",
146
+ "baseName": "rate_created",
147
+ "type": "number"
148
+ },
149
+ {
150
+ "name": "rate_id",
151
+ "baseName": "rate_id",
152
+ "type": "string"
153
+ },
154
+ {
155
+ "name": "rate_until",
156
+ "baseName": "rate_until",
157
+ "type": "number"
158
+ },
159
+ {
160
+ "name": "finance_term",
161
+ "baseName": "finance_term",
162
+ "type": "number"
163
+ },
164
+ {
165
+ "name": "est_finance_term",
166
+ "baseName": "est_finance_term",
167
+ "type": "number"
168
+ } ];
169
+
170
+ static getAttributeTypeMap() {
171
+ return CostAttributesDto.attributeTypeMap;
172
+ }
173
+ }
174
+
@@ -0,0 +1,56 @@
1
+ /**
2
+ * TradeCafé Offer Service
3
+ * Offer Service allows supplies to submit product offers into the TradeCafe platform
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
+ import { RequestFile } from './models';
14
+ import { AssociatedCostDto } from './associatedCostDto';
15
+
16
+ /**
17
+ * Associated cost
18
+ */
19
+ export class CostAttributesDtoAssociated {
20
+ /**
21
+ * Associated amount
22
+ */
23
+ 'amount'?: number;
24
+ /**
25
+ * Associated currency
26
+ */
27
+ 'currency'?: string;
28
+ /**
29
+ * Invoice ID
30
+ */
31
+ 'invoice_id'?: string;
32
+
33
+ static discriminator: string | undefined = undefined;
34
+
35
+ static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
36
+ {
37
+ "name": "amount",
38
+ "baseName": "amount",
39
+ "type": "number"
40
+ },
41
+ {
42
+ "name": "currency",
43
+ "baseName": "currency",
44
+ "type": "string"
45
+ },
46
+ {
47
+ "name": "invoice_id",
48
+ "baseName": "invoice_id",
49
+ "type": "string"
50
+ } ];
51
+
52
+ static getAttributeTypeMap() {
53
+ return CostAttributesDtoAssociated.attributeTypeMap;
54
+ }
55
+ }
56
+
@@ -0,0 +1,74 @@
1
+ /**
2
+ * TradeCafé Offer Service
3
+ * Offer Service allows supplies to submit product offers into the TradeCafe platform
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
+ import { RequestFile } from './models';
14
+ import { DefaultCostDto } from './defaultCostDto';
15
+
16
+ /**
17
+ * Default cost
18
+ */
19
+ export class CostAttributesDtoDefaultCost {
20
+ /**
21
+ * Cost value
22
+ */
23
+ 'value'?: number;
24
+ /**
25
+ * Cost type
26
+ */
27
+ 'type'?: string;
28
+ /**
29
+ * Cost name
30
+ */
31
+ 'name'?: string;
32
+ /**
33
+ * Cost type ID
34
+ */
35
+ 'cost_type_id'?: string;
36
+ /**
37
+ * Currency
38
+ */
39
+ 'currency'?: string;
40
+
41
+ static discriminator: string | undefined = undefined;
42
+
43
+ static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
44
+ {
45
+ "name": "value",
46
+ "baseName": "value",
47
+ "type": "number"
48
+ },
49
+ {
50
+ "name": "type",
51
+ "baseName": "type",
52
+ "type": "string"
53
+ },
54
+ {
55
+ "name": "name",
56
+ "baseName": "name",
57
+ "type": "string"
58
+ },
59
+ {
60
+ "name": "cost_type_id",
61
+ "baseName": "cost_type_id",
62
+ "type": "string"
63
+ },
64
+ {
65
+ "name": "currency",
66
+ "baseName": "currency",
67
+ "type": "string"
68
+ } ];
69
+
70
+ static getAttributeTypeMap() {
71
+ return CostAttributesDtoDefaultCost.attributeTypeMap;
72
+ }
73
+ }
74
+
package/model/costDto.ts CHANGED
@@ -11,28 +11,72 @@
11
11
  */
12
12
 
13
13
  import { RequestFile } from './models';
14
+ import { CostDtoAmount } from './costDtoAmount';
15
+ import { CostDtoAttributes } from './costDtoAttributes';
14
16
  import { CostDtoSource } from './costDtoSource';
15
17
 
16
18
  export class CostDto {
17
19
  /**
18
- * Cost ID
20
+ * Cost type
19
21
  */
20
22
  'type'?: string;
23
+ 'amount'?: CostDtoAmount;
21
24
  /**
22
- * Cost provider
25
+ * Product ID
23
26
  */
24
27
  'product_id'?: string;
25
28
  /**
26
- * Cost attributes
29
+ * Service name
27
30
  */
28
- 'attributes'?: object | null;
31
+ 'service'?: string;
29
32
  /**
30
33
  * Cost status
31
34
  */
35
+ 'status'?: string;
36
+ 'attributes'?: CostDtoAttributes;
37
+ /**
38
+ * Updated by user ID
39
+ */
32
40
  'updated_by'?: string;
41
+ /**
42
+ * Account ID
43
+ */
44
+ 'account'?: string;
45
+ /**
46
+ * Deal ID
47
+ */
48
+ 'deal_id'?: string;
49
+ /**
50
+ * Provider ID
51
+ */
52
+ 'provider'?: string;
53
+ /**
54
+ * Created timestamp
55
+ */
56
+ 'created'?: number;
57
+ /**
58
+ * Updated timestamp
59
+ */
60
+ 'updated'?: number;
61
+ /**
62
+ * Cost ID
63
+ */
64
+ 'cost_id'?: string;
65
+ /**
66
+ * Actualized at timestamp
67
+ */
68
+ 'actualized_at'?: number;
69
+ /**
70
+ * Actualized by user ID
71
+ */
72
+ 'actualized_by'?: string;
73
+ /**
74
+ * Migration flag
75
+ */
76
+ 'migration'?: boolean;
33
77
  'source'?: CostDtoSource;
34
78
  /**
35
- * Product ID
79
+ * Legacy cost ID
36
80
  */
37
81
  'ID'?: string;
38
82
  /**
@@ -48,21 +92,81 @@ export class CostDto {
48
92
  "baseName": "type",
49
93
  "type": "string"
50
94
  },
95
+ {
96
+ "name": "amount",
97
+ "baseName": "amount",
98
+ "type": "CostDtoAmount"
99
+ },
51
100
  {
52
101
  "name": "product_id",
53
102
  "baseName": "product_id",
54
103
  "type": "string"
55
104
  },
105
+ {
106
+ "name": "service",
107
+ "baseName": "service",
108
+ "type": "string"
109
+ },
110
+ {
111
+ "name": "status",
112
+ "baseName": "status",
113
+ "type": "string"
114
+ },
56
115
  {
57
116
  "name": "attributes",
58
117
  "baseName": "attributes",
59
- "type": "object"
118
+ "type": "CostDtoAttributes"
60
119
  },
61
120
  {
62
121
  "name": "updated_by",
63
122
  "baseName": "updated_by",
64
123
  "type": "string"
65
124
  },
125
+ {
126
+ "name": "account",
127
+ "baseName": "account",
128
+ "type": "string"
129
+ },
130
+ {
131
+ "name": "deal_id",
132
+ "baseName": "deal_id",
133
+ "type": "string"
134
+ },
135
+ {
136
+ "name": "provider",
137
+ "baseName": "provider",
138
+ "type": "string"
139
+ },
140
+ {
141
+ "name": "created",
142
+ "baseName": "created",
143
+ "type": "number"
144
+ },
145
+ {
146
+ "name": "updated",
147
+ "baseName": "updated",
148
+ "type": "number"
149
+ },
150
+ {
151
+ "name": "cost_id",
152
+ "baseName": "cost_id",
153
+ "type": "string"
154
+ },
155
+ {
156
+ "name": "actualized_at",
157
+ "baseName": "actualized_at",
158
+ "type": "number"
159
+ },
160
+ {
161
+ "name": "actualized_by",
162
+ "baseName": "actualized_by",
163
+ "type": "string"
164
+ },
165
+ {
166
+ "name": "migration",
167
+ "baseName": "migration",
168
+ "type": "boolean"
169
+ },
66
170
  {
67
171
  "name": "source",
68
172
  "baseName": "source",
@@ -0,0 +1,65 @@
1
+ /**
2
+ * TradeCafé Offer Service
3
+ * Offer Service allows supplies to submit product offers into the TradeCafe platform
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
+ import { RequestFile } from './models';
14
+ import { CostAmountDto } from './costAmountDto';
15
+
16
+ /**
17
+ * Cost amount information
18
+ */
19
+ export class CostDtoAmount {
20
+ /**
21
+ * Total amount
22
+ */
23
+ 'total'?: number;
24
+ /**
25
+ * Currency code
26
+ */
27
+ 'currency'?: string;
28
+ /**
29
+ * Total amount in CAD
30
+ */
31
+ 'total_cad'?: number;
32
+ /**
33
+ * Cost per unit
34
+ */
35
+ 'cost_unit'?: number;
36
+
37
+ static discriminator: string | undefined = undefined;
38
+
39
+ static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
40
+ {
41
+ "name": "total",
42
+ "baseName": "total",
43
+ "type": "number"
44
+ },
45
+ {
46
+ "name": "currency",
47
+ "baseName": "currency",
48
+ "type": "string"
49
+ },
50
+ {
51
+ "name": "total_cad",
52
+ "baseName": "total_cad",
53
+ "type": "number"
54
+ },
55
+ {
56
+ "name": "cost_unit",
57
+ "baseName": "cost_unit",
58
+ "type": "number"
59
+ } ];
60
+
61
+ static getAttributeTypeMap() {
62
+ return CostDtoAmount.attributeTypeMap;
63
+ }
64
+ }
65
+