@teemill/inserts 0.2.0 → 0.3.0

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/dist/esm/api.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Inserts API
3
3
  * An API for managing order inserts in PodOS that automatically adds a free item to a customer\'s order when specific conditions are met, such as a first-time purchase.
4
4
  *
5
- * The version of the OpenAPI document: 0.2.0
5
+ * The version of the OpenAPI document: 0.3.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -56,7 +56,68 @@ export interface CreateInsertRequest {
56
56
  * @memberof CreateInsertRequest
57
57
  */
58
58
  'typeRef': string;
59
+ /**
60
+ *
61
+ * @type {CreateInsertRequestConfig}
62
+ * @memberof CreateInsertRequest
63
+ */
64
+ 'config'?: CreateInsertRequestConfig;
65
+ }
66
+ /**
67
+ *
68
+ * @export
69
+ * @interface CreateInsertRequestConfig
70
+ */
71
+ export interface CreateInsertRequestConfig {
72
+ /**
73
+ *
74
+ * @type {CreateInsertRequestConfigCoupon}
75
+ * @memberof CreateInsertRequestConfig
76
+ */
77
+ 'coupon'?: CreateInsertRequestConfigCoupon;
78
+ }
79
+ /**
80
+ *
81
+ * @export
82
+ * @interface CreateInsertRequestConfigCoupon
83
+ */
84
+ export interface CreateInsertRequestConfigCoupon {
85
+ /**
86
+ * The prefix of the coupon code to apply to the insert
87
+ * @type {string}
88
+ * @memberof CreateInsertRequestConfigCoupon
89
+ */
90
+ 'prefix': string;
91
+ /**
92
+ * The type of coupon to apply to the insert
93
+ * @type {string}
94
+ * @memberof CreateInsertRequestConfigCoupon
95
+ */
96
+ 'type': CreateInsertRequestConfigCouponTypeEnum;
97
+ /**
98
+ * The value of the coupon to apply to the insert
99
+ * @type {number}
100
+ * @memberof CreateInsertRequestConfigCoupon
101
+ */
102
+ 'value': number;
103
+ /**
104
+ * The minimum order value to apply the coupon to
105
+ * @type {number}
106
+ * @memberof CreateInsertRequestConfigCoupon
107
+ */
108
+ 'minimumOrderValue': number;
109
+ /**
110
+ * The description of the coupon to apply to the insert
111
+ * @type {string}
112
+ * @memberof CreateInsertRequestConfigCoupon
113
+ */
114
+ 'description': string;
59
115
  }
116
+ export declare const CreateInsertRequestConfigCouponTypeEnum: {
117
+ readonly Percentage: "percentage";
118
+ readonly Fixed: "fixed";
119
+ };
120
+ export type CreateInsertRequestConfigCouponTypeEnum = typeof CreateInsertRequestConfigCouponTypeEnum[keyof typeof CreateInsertRequestConfigCouponTypeEnum];
60
121
  /**
61
122
  *
62
123
  * @export
@@ -80,13 +141,19 @@ export interface Insert {
80
141
  * @type {string}
81
142
  * @memberof Insert
82
143
  */
83
- 'variantRef': string;
144
+ 'variantRef': string | null;
84
145
  /**
85
146
  * A reference to the insert type that will be inserted into the order when this insert rule is triggered
86
147
  * @type {string}
87
148
  * @memberof Insert
88
149
  */
89
150
  'typeRef': string;
151
+ /**
152
+ *
153
+ * @type {InsertConfig}
154
+ * @memberof Insert
155
+ */
156
+ 'config': InsertConfig | null;
90
157
  /**
91
158
  * ISO 8601 Timestamp
92
159
  * @type {string}
@@ -100,6 +167,61 @@ export interface Insert {
100
167
  */
101
168
  'updatedAt': string | null;
102
169
  }
170
+ /**
171
+ * The configuration of the insert
172
+ * @export
173
+ * @interface InsertConfig
174
+ */
175
+ export interface InsertConfig {
176
+ /**
177
+ *
178
+ * @type {InsertConfigCoupon}
179
+ * @memberof InsertConfig
180
+ */
181
+ 'coupon'?: InsertConfigCoupon | null;
182
+ }
183
+ /**
184
+ *
185
+ * @export
186
+ * @interface InsertConfigCoupon
187
+ */
188
+ export interface InsertConfigCoupon {
189
+ /**
190
+ * The prefix of the coupon code to apply to the insert
191
+ * @type {string}
192
+ * @memberof InsertConfigCoupon
193
+ */
194
+ 'prefix': string;
195
+ /**
196
+ * The type of coupon to apply to the insert
197
+ * @type {string}
198
+ * @memberof InsertConfigCoupon
199
+ */
200
+ 'type': InsertConfigCouponTypeEnum;
201
+ /**
202
+ * The value of the coupon to apply to the insert
203
+ * @type {number}
204
+ * @memberof InsertConfigCoupon
205
+ */
206
+ 'value': number;
207
+ /**
208
+ * The minimum order value to apply the coupon to
209
+ * @type {number}
210
+ * @memberof InsertConfigCoupon
211
+ */
212
+ 'minimumOrderValue': number;
213
+ /**
214
+ *
215
+ * @type {string}
216
+ * @memberof InsertConfigCoupon
217
+ */
218
+ 'description': string;
219
+ }
220
+ export declare const InsertConfigCouponTypeEnum: {
221
+ readonly Percentage: "percentage";
222
+ readonly Fixed: "fixed";
223
+ };
224
+ export type InsertConfigCouponTypeEnum = typeof InsertConfigCouponTypeEnum[keyof typeof InsertConfigCouponTypeEnum];
103
225
  /**
104
226
  *
105
227
  * @export
@@ -193,7 +315,68 @@ export interface UpdateInsertRequest {
193
315
  * @memberof UpdateInsertRequest
194
316
  */
195
317
  'typeRef'?: string;
318
+ /**
319
+ *
320
+ * @type {UpdateInsertRequestConfig}
321
+ * @memberof UpdateInsertRequest
322
+ */
323
+ 'config'?: UpdateInsertRequestConfig | null;
196
324
  }
325
+ /**
326
+ *
327
+ * @export
328
+ * @interface UpdateInsertRequestConfig
329
+ */
330
+ export interface UpdateInsertRequestConfig {
331
+ /**
332
+ *
333
+ * @type {UpdateInsertRequestConfigCoupon}
334
+ * @memberof UpdateInsertRequestConfig
335
+ */
336
+ 'coupon'?: UpdateInsertRequestConfigCoupon;
337
+ }
338
+ /**
339
+ *
340
+ * @export
341
+ * @interface UpdateInsertRequestConfigCoupon
342
+ */
343
+ export interface UpdateInsertRequestConfigCoupon {
344
+ /**
345
+ * The prefix of the coupon code to apply to the insert
346
+ * @type {string}
347
+ * @memberof UpdateInsertRequestConfigCoupon
348
+ */
349
+ 'prefix': string;
350
+ /**
351
+ * The type of coupon to apply to the insert
352
+ * @type {string}
353
+ * @memberof UpdateInsertRequestConfigCoupon
354
+ */
355
+ 'type': UpdateInsertRequestConfigCouponTypeEnum;
356
+ /**
357
+ * The value of the coupon to apply to the insert
358
+ * @type {number}
359
+ * @memberof UpdateInsertRequestConfigCoupon
360
+ */
361
+ 'value': number;
362
+ /**
363
+ * The minimum order value to apply the coupon to
364
+ * @type {number}
365
+ * @memberof UpdateInsertRequestConfigCoupon
366
+ */
367
+ 'minimumOrderValue': number;
368
+ /**
369
+ * The description of the coupon to apply to the insert
370
+ * @type {string}
371
+ * @memberof UpdateInsertRequestConfigCoupon
372
+ */
373
+ 'description': string;
374
+ }
375
+ export declare const UpdateInsertRequestConfigCouponTypeEnum: {
376
+ readonly Percentage: "percentage";
377
+ readonly Fixed: "fixed";
378
+ };
379
+ export type UpdateInsertRequestConfigCouponTypeEnum = typeof UpdateInsertRequestConfigCouponTypeEnum[keyof typeof UpdateInsertRequestConfigCouponTypeEnum];
197
380
  /**
198
381
  * InsertsApi - axios parameter creator
199
382
  * @export
package/dist/esm/api.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Inserts API
5
5
  * An API for managing order inserts in PodOS that automatically adds a free item to a customer\'s order when specific conditions are met, such as a first-time purchase.
6
6
  *
7
- * The version of the OpenAPI document: 0.2.0
7
+ * The version of the OpenAPI document: 0.3.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -26,6 +26,18 @@ import globalAxios from 'axios';
26
26
  import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
27
27
  // @ts-ignore
28
28
  import { BASE_PATH, BaseAPI, operationServerMap } from './base';
29
+ export const CreateInsertRequestConfigCouponTypeEnum = {
30
+ Percentage: 'percentage',
31
+ Fixed: 'fixed'
32
+ };
33
+ export const InsertConfigCouponTypeEnum = {
34
+ Percentage: 'percentage',
35
+ Fixed: 'fixed'
36
+ };
37
+ export const UpdateInsertRequestConfigCouponTypeEnum = {
38
+ Percentage: 'percentage',
39
+ Fixed: 'fixed'
40
+ };
29
41
  /**
30
42
  * InsertsApi - axios parameter creator
31
43
  * @export
@@ -2,7 +2,7 @@
2
2
  * Inserts API
3
3
  * An API for managing order inserts in PodOS that automatically adds a free item to a customer\'s order when specific conditions are met, such as a first-time purchase.
4
4
  *
5
- * The version of the OpenAPI document: 0.2.0
5
+ * The version of the OpenAPI document: 0.3.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/esm/base.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Inserts API
5
5
  * An API for managing order inserts in PodOS that automatically adds a free item to a customer\'s order when specific conditions are met, such as a first-time purchase.
6
6
  *
7
- * The version of the OpenAPI document: 0.2.0
7
+ * The version of the OpenAPI document: 0.3.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Inserts API
3
3
  * An API for managing order inserts in PodOS that automatically adds a free item to a customer\'s order when specific conditions are met, such as a first-time purchase.
4
4
  *
5
- * The version of the OpenAPI document: 0.2.0
5
+ * The version of the OpenAPI document: 0.3.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Inserts API
5
5
  * An API for managing order inserts in PodOS that automatically adds a free item to a customer\'s order when specific conditions are met, such as a first-time purchase.
6
6
  *
7
- * The version of the OpenAPI document: 0.2.0
7
+ * The version of the OpenAPI document: 0.3.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Inserts API
3
3
  * An API for managing order inserts in PodOS that automatically adds a free item to a customer\'s order when specific conditions are met, such as a first-time purchase.
4
4
  *
5
- * The version of the OpenAPI document: 0.2.0
5
+ * The version of the OpenAPI document: 0.3.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Inserts API
5
5
  * An API for managing order inserts in PodOS that automatically adds a free item to a customer\'s order when specific conditions are met, such as a first-time purchase.
6
6
  *
7
- * The version of the OpenAPI document: 0.2.0
7
+ * The version of the OpenAPI document: 0.3.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Inserts API
3
3
  * An API for managing order inserts in PodOS that automatically adds a free item to a customer\'s order when specific conditions are met, such as a first-time purchase.
4
4
  *
5
- * The version of the OpenAPI document: 0.2.0
5
+ * The version of the OpenAPI document: 0.3.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/esm/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Inserts API
5
5
  * An API for managing order inserts in PodOS that automatically adds a free item to a customer\'s order when specific conditions are met, such as a first-time purchase.
6
6
  *
7
- * The version of the OpenAPI document: 0.2.0
7
+ * The version of the OpenAPI document: 0.3.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Inserts API
3
3
  * An API for managing order inserts in PodOS that automatically adds a free item to a customer\'s order when specific conditions are met, such as a first-time purchase.
4
4
  *
5
- * The version of the OpenAPI document: 0.2.0
5
+ * The version of the OpenAPI document: 0.3.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Inserts API
6
6
  * An API for managing order inserts in PodOS that automatically adds a free item to a customer\'s order when specific conditions are met, such as a first-time purchase.
7
7
  *
8
- * The version of the OpenAPI document: 0.2.0
8
+ * The version of the OpenAPI document: 0.3.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -0,0 +1,22 @@
1
+ # ApiError
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **message** | **string** | | [default to undefined]
9
+ **code** | **string** | | [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { ApiError } from '@teemill/inserts';
15
+
16
+ const instance: ApiError = {
17
+ message,
18
+ code,
19
+ };
20
+ ```
21
+
22
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,26 @@
1
+ # CreateInsertRequest
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **enabled** | **boolean** | Whether the insert is enabled | [default to undefined]
9
+ **variantRef** | **string** | A reference to the variant that will be inserted into the order when this insert rule is triggered | [default to undefined]
10
+ **typeRef** | **string** | A reference to the insert type that will be inserted into the order when this insert rule is triggered | [default to undefined]
11
+ **config** | [**CreateInsertRequestConfig**](CreateInsertRequestConfig.md) | | [optional] [default to undefined]
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import { CreateInsertRequest } from '@teemill/inserts';
17
+
18
+ const instance: CreateInsertRequest = {
19
+ enabled,
20
+ variantRef,
21
+ typeRef,
22
+ config,
23
+ };
24
+ ```
25
+
26
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,20 @@
1
+ # CreateInsertRequestConfig
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **coupon** | [**CreateInsertRequestConfigCoupon**](CreateInsertRequestConfigCoupon.md) | | [optional] [default to undefined]
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import { CreateInsertRequestConfig } from '@teemill/inserts';
14
+
15
+ const instance: CreateInsertRequestConfig = {
16
+ coupon,
17
+ };
18
+ ```
19
+
20
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,28 @@
1
+ # CreateInsertRequestConfigCoupon
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **prefix** | **string** | The prefix of the coupon code to apply to the insert | [default to undefined]
9
+ **type** | **string** | The type of coupon to apply to the insert | [default to undefined]
10
+ **value** | **number** | The value of the coupon to apply to the insert | [default to undefined]
11
+ **minimumOrderValue** | **number** | The minimum order value to apply the coupon to | [default to undefined]
12
+ **description** | **string** | The description of the coupon to apply to the insert | [default to undefined]
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import { CreateInsertRequestConfigCoupon } from '@teemill/inserts';
18
+
19
+ const instance: CreateInsertRequestConfigCoupon = {
20
+ prefix,
21
+ type,
22
+ value,
23
+ minimumOrderValue,
24
+ description,
25
+ };
26
+ ```
27
+
28
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
package/docs/Insert.md ADDED
@@ -0,0 +1,32 @@
1
+ # Insert
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **string** | Unique object identifier | [default to undefined]
9
+ **enabled** | **boolean** | Whether the insert is enabled | [default to undefined]
10
+ **variantRef** | **string** | A reference to the variant that will be inserted into the order when this insert rule is triggered | [default to undefined]
11
+ **typeRef** | **string** | A reference to the insert type that will be inserted into the order when this insert rule is triggered | [default to undefined]
12
+ **config** | [**InsertConfig**](InsertConfig.md) | | [default to undefined]
13
+ **createdAt** | **string** | ISO 8601 Timestamp | [default to undefined]
14
+ **updatedAt** | **string** | ISO 8601 Timestamp | [default to undefined]
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import { Insert } from '@teemill/inserts';
20
+
21
+ const instance: Insert = {
22
+ id,
23
+ enabled,
24
+ variantRef,
25
+ typeRef,
26
+ config,
27
+ createdAt,
28
+ updatedAt,
29
+ };
30
+ ```
31
+
32
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,21 @@
1
+ # InsertConfig
2
+
3
+ The configuration of the insert
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **coupon** | [**InsertConfigCoupon**](InsertConfigCoupon.md) | | [optional] [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { InsertConfig } from '@teemill/inserts';
15
+
16
+ const instance: InsertConfig = {
17
+ coupon,
18
+ };
19
+ ```
20
+
21
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,28 @@
1
+ # InsertConfigCoupon
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **prefix** | **string** | The prefix of the coupon code to apply to the insert | [default to undefined]
9
+ **type** | **string** | The type of coupon to apply to the insert | [default to undefined]
10
+ **value** | **number** | The value of the coupon to apply to the insert | [default to undefined]
11
+ **minimumOrderValue** | **number** | The minimum order value to apply the coupon to | [default to undefined]
12
+ **description** | **string** | | [default to undefined]
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import { InsertConfigCoupon } from '@teemill/inserts';
18
+
19
+ const instance: InsertConfigCoupon = {
20
+ prefix,
21
+ type,
22
+ value,
23
+ minimumOrderValue,
24
+ description,
25
+ };
26
+ ```
27
+
28
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,26 @@
1
+ # InsertType
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **string** | Unique object identifier | [default to undefined]
9
+ **name** | **string** | The name of the insert type | [default to undefined]
10
+ **code** | **string** | The code of the insert type | [default to undefined]
11
+ **description** | **string** | The description of the insert type | [default to undefined]
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import { InsertType } from '@teemill/inserts';
17
+
18
+ const instance: InsertType = {
19
+ id,
20
+ name,
21
+ code,
22
+ description,
23
+ };
24
+ ```
25
+
26
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)