@lcdp/api-react-rest-client 2.14.3-develop.18496590089 → 2.14.3-develop.18754208100

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": "@lcdp/api-react-rest-client",
3
- "version": "2.14.3-develop.18496590089",
3
+ "version": "2.14.3-develop.18754208100",
4
4
  "scripts": {
5
5
  "build": "tsc"
6
6
  },
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { SubscriptionStatus } from './SubscriptionStatus';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -20,19 +21,49 @@ export interface Subscription {
20
21
  * @type {string}
21
22
  * @memberof Subscription
22
23
  */
23
- family?: string;
24
+ familyId: string;
24
25
  /**
25
26
  *
26
27
  * @type {string}
27
28
  * @memberof Subscription
28
29
  */
29
- name?: string;
30
+ familyName: string;
30
31
  /**
31
32
  *
32
33
  * @type {string}
33
34
  * @memberof Subscription
34
35
  */
35
- status?: string;
36
+ name: string;
37
+ /**
38
+ *
39
+ * @type {SubscriptionStatus}
40
+ * @memberof Subscription
41
+ */
42
+ status: SubscriptionStatus;
43
+ /**
44
+ *
45
+ * @type {Date}
46
+ * @memberof Subscription
47
+ */
48
+ startedAt: Date;
49
+ /**
50
+ *
51
+ * @type {Date}
52
+ * @memberof Subscription
53
+ */
54
+ nextBillingAt?: Date;
55
+ /**
56
+ *
57
+ * @type {Date}
58
+ * @memberof Subscription
59
+ */
60
+ trialStart?: Date;
61
+ /**
62
+ *
63
+ * @type {Date}
64
+ * @memberof Subscription
65
+ */
66
+ trialEnd?: Date;
36
67
  }
37
68
  /**
38
69
  * Check if a given object implements the Subscription interface.
@@ -14,10 +14,21 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.SubscriptionToJSON = exports.SubscriptionFromJSONTyped = exports.SubscriptionFromJSON = exports.instanceOfSubscription = void 0;
17
+ var SubscriptionStatus_1 = require("./SubscriptionStatus");
17
18
  /**
18
19
  * Check if a given object implements the Subscription interface.
19
20
  */
20
21
  function instanceOfSubscription(value) {
22
+ if (!('familyId' in value) || value['familyId'] === undefined)
23
+ return false;
24
+ if (!('familyName' in value) || value['familyName'] === undefined)
25
+ return false;
26
+ if (!('name' in value) || value['name'] === undefined)
27
+ return false;
28
+ if (!('status' in value) || value['status'] === undefined)
29
+ return false;
30
+ if (!('startedAt' in value) || value['startedAt'] === undefined)
31
+ return false;
21
32
  return true;
22
33
  }
23
34
  exports.instanceOfSubscription = instanceOfSubscription;
@@ -30,9 +41,14 @@ function SubscriptionFromJSONTyped(json, ignoreDiscriminator) {
30
41
  return json;
31
42
  }
32
43
  return {
33
- 'family': json['family'],
44
+ 'familyId': json['familyId'],
45
+ 'familyName': json['familyName'],
34
46
  'name': json['name'],
35
- 'status': json['status'],
47
+ 'status': (json['status'] === null || json['status'] === undefined) ? json['status'] : (0, SubscriptionStatus_1.SubscriptionStatusFromJSON)(json['status']),
48
+ 'startedAt': (json['startedAt'] === null || json['startedAt'] === undefined) ? json['startedAt'] : new Date(json['startedAt']),
49
+ 'nextBillingAt': (json['nextBillingAt'] === null || json['nextBillingAt'] === undefined) ? json['nextBillingAt'] : new Date(json['nextBillingAt']),
50
+ 'trialStart': (json['trialStart'] === null || json['trialStart'] === undefined) ? json['trialStart'] : new Date(json['trialStart']),
51
+ 'trialEnd': (json['trialEnd'] === null || json['trialEnd'] === undefined) ? json['trialEnd'] : new Date(json['trialEnd']),
36
52
  };
37
53
  }
38
54
  exports.SubscriptionFromJSONTyped = SubscriptionFromJSONTyped;
@@ -41,9 +57,14 @@ function SubscriptionToJSON(value) {
41
57
  return value;
42
58
  }
43
59
  return {
44
- 'family': value['family'],
60
+ 'familyId': value['familyId'],
61
+ 'familyName': value['familyName'],
45
62
  'name': value['name'],
46
- 'status': value['status'],
63
+ 'status': (0, SubscriptionStatus_1.SubscriptionStatusToJSON)(value['status']),
64
+ 'startedAt': (value['startedAt'] === null || value['startedAt'] === undefined) ? value['startedAt'] : (value['startedAt']).toISOString(),
65
+ 'nextBillingAt': (value['nextBillingAt'] === null || value['nextBillingAt'] === undefined) ? value['nextBillingAt'] : (value['nextBillingAt']).toISOString(),
66
+ 'trialStart': (value['trialStart'] === null || value['trialStart'] === undefined) ? value['trialStart'] : (value['trialStart']).toISOString(),
67
+ 'trialEnd': (value['trialEnd'] === null || value['trialEnd'] === undefined) ? value['trialEnd'] : (value['trialEnd']).toISOString(),
47
68
  };
48
69
  }
49
70
  exports.SubscriptionToJSON = SubscriptionToJSON;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * lcdp-monolith-service
3
+ * This is the REST API of LCDP products
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: contact@lecomptoirdespharmacies.fr
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
+ * Status of the subscription
14
+ * - FUTURE: The subscription is scheduled to start at a future date.
15
+ * - IN_TRIAL: The subscription is in trial.
16
+ * - ACTIVE: The subscription is active and will be charged for automatically based on the items in it.
17
+ * - NON_RENEWING: The subscription will be canceled at the end of the current term.
18
+ * - PAUSED: The subscription is paused. The subscription will not renew while in this state.
19
+ * - CANCELLED: The subscription has been canceled and is no longer in service.
20
+ * - TRANSFERRED: The subscription has been transferred to another business entity within the organization.
21
+ * - _UNKNOWN: Indicates unexpected value for this enum.
22
+ *
23
+ * @export
24
+ */
25
+ export declare const SubscriptionStatus: {
26
+ readonly FUTURE: "FUTURE";
27
+ readonly IN_TRIAL: "IN_TRIAL";
28
+ readonly ACTIVE: "ACTIVE";
29
+ readonly NON_RENEWING: "NON_RENEWING";
30
+ readonly PAUSED: "PAUSED";
31
+ readonly CANCELLED: "CANCELLED";
32
+ readonly TRANSFERRED: "TRANSFERRED";
33
+ readonly UNKNOWN: "_UNKNOWN";
34
+ };
35
+ export declare type SubscriptionStatus = typeof SubscriptionStatus[keyof typeof SubscriptionStatus];
36
+ export declare function instanceOfSubscriptionStatus(value: any): boolean;
37
+ export declare function SubscriptionStatusFromJSON(json: any): SubscriptionStatus;
38
+ export declare function SubscriptionStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionStatus;
39
+ export declare function SubscriptionStatusToJSON(value?: SubscriptionStatus | null): any;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * lcdp-monolith-service
6
+ * This is the REST API of LCDP products
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: contact@lecomptoirdespharmacies.fr
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.SubscriptionStatusToJSON = exports.SubscriptionStatusFromJSONTyped = exports.SubscriptionStatusFromJSON = exports.instanceOfSubscriptionStatus = exports.SubscriptionStatus = void 0;
17
+ /**
18
+ * Status of the subscription
19
+ * - FUTURE: The subscription is scheduled to start at a future date.
20
+ * - IN_TRIAL: The subscription is in trial.
21
+ * - ACTIVE: The subscription is active and will be charged for automatically based on the items in it.
22
+ * - NON_RENEWING: The subscription will be canceled at the end of the current term.
23
+ * - PAUSED: The subscription is paused. The subscription will not renew while in this state.
24
+ * - CANCELLED: The subscription has been canceled and is no longer in service.
25
+ * - TRANSFERRED: The subscription has been transferred to another business entity within the organization.
26
+ * - _UNKNOWN: Indicates unexpected value for this enum.
27
+ *
28
+ * @export
29
+ */
30
+ exports.SubscriptionStatus = {
31
+ FUTURE: 'FUTURE',
32
+ IN_TRIAL: 'IN_TRIAL',
33
+ ACTIVE: 'ACTIVE',
34
+ NON_RENEWING: 'NON_RENEWING',
35
+ PAUSED: 'PAUSED',
36
+ CANCELLED: 'CANCELLED',
37
+ TRANSFERRED: 'TRANSFERRED',
38
+ UNKNOWN: '_UNKNOWN'
39
+ };
40
+ function instanceOfSubscriptionStatus(value) {
41
+ for (var key in exports.SubscriptionStatus) {
42
+ if (Object.prototype.hasOwnProperty.call(exports.SubscriptionStatus, key)) {
43
+ if (exports.SubscriptionStatus[key] === value) {
44
+ return true;
45
+ }
46
+ }
47
+ }
48
+ return false;
49
+ }
50
+ exports.instanceOfSubscriptionStatus = instanceOfSubscriptionStatus;
51
+ function SubscriptionStatusFromJSON(json) {
52
+ return SubscriptionStatusFromJSONTyped(json, false);
53
+ }
54
+ exports.SubscriptionStatusFromJSON = SubscriptionStatusFromJSON;
55
+ function SubscriptionStatusFromJSONTyped(json, ignoreDiscriminator) {
56
+ return json;
57
+ }
58
+ exports.SubscriptionStatusFromJSONTyped = SubscriptionStatusFromJSONTyped;
59
+ function SubscriptionStatusToJSON(value) {
60
+ return value;
61
+ }
62
+ exports.SubscriptionStatusToJSON = SubscriptionStatusToJSON;
@@ -1 +1,2 @@
1
1
  export * from './Subscription';
2
+ export * from './SubscriptionStatus';
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /* tslint:disable */
18
18
  /* eslint-disable */
19
19
  __exportStar(require("./Subscription"), exports);
20
+ __exportStar(require("./SubscriptionStatus"), exports);