oneentry 1.0.71 → 1.0.73

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.
@@ -13,7 +13,7 @@
13
13
  interface IPaymentsApi {
14
14
  getSessions(limit: number, offset: number): Promise<Array<ISessionEntity>>;
15
15
  getSessionById(id: number): Promise<ISessionEntity>;
16
- createSession(orderId: number, type: 'session' | 'intent', automaticTaxEnabled?: boolean): Promise<ISessionEntity>;
16
+ createSession(orderId: number, type: 'session' | 'intent', automaticTaxEnabled?: boolean): Promise<ICreateSessionEntity>;
17
17
  getConnected(): Promise<IConnectedEntity | null>;
18
18
  getAccounts(): Promise<Array<IAccountsEntity>>;
19
19
  getAccountById(id: number): Promise<IAccountsEntity>;
@@ -35,15 +35,6 @@ interface ILineItems {
35
35
  name: string;
36
36
  description: string;
37
37
  }
38
- /**
39
- * @interface
40
- * @property {Array<ILineItems>} lineItems - List of items.
41
- * @property {number} orderId - Order identifier.
42
- */
43
- interface ISessionBody {
44
- lineItems: Array<ILineItems>;
45
- orderId: number;
46
- }
47
38
  /**
48
39
  * @interface
49
40
  * @property {number} amount
@@ -57,48 +48,35 @@ interface IIntent {
57
48
  * @interface
58
49
  * @property {number} id - Object identifier.
59
50
  * @property {string} updatedDate - Object modification date.
60
- * @property {number} version - Object modification version number.
61
- * @property {string} identifier - Text identifier for the record field.
62
51
  * @property {string} type - Type may be 'session' or 'intent'.
63
52
  * @property {number} orderId - Order identifier.
64
53
  * @property {number} paymentAccountId - Payment account object identifier.
65
- * @property {string} status - Payment status.
66
- * @property {string} sessionId - Payment ID from an external provider.
67
54
  * @property {string} paymentUrl - Payment link.
68
- * @property {string} successUrl - Redirect link after successful payment.
69
- * @property {string} cancelUrl - Redirect link after payment cancellation.
70
- * @property {IIntent} intent - Payment intent.
71
- * @property {number} intentId - Intent object identifier.
72
55
  * @property {string} clientSecret - Client secret key.
73
56
  */
74
57
  interface ISessionEntity {
75
58
  id: number;
76
59
  updatedDate: string;
77
- version: number;
78
- identifier: string;
79
60
  type: 'session' | 'intent';
80
- lineItems: Array<ILineItems>;
81
61
  orderId: number;
82
62
  paymentAccountId: number;
83
- status: string;
84
- sessionId: string;
85
63
  paymentUrl: string;
86
- successUrl: string;
87
- cancelUrl: string;
88
- intent: IIntent;
89
- intentId: number;
90
64
  clientSecret: string;
91
65
  }
66
+ interface ICreateSessionEntity {
67
+ id: number;
68
+ updatedDate: string;
69
+ version: number;
70
+ identifier: string;
71
+ }
92
72
  /**
93
73
  * @interface
94
74
  * @property {string} [stripeAccountId] - Identifier of connected Stripe account.
95
75
  * @property {string} [stripePublishableKey] - Stripe Connect public key.
96
- * @property {string} [paypalAccountId] - Identifier of connected Paypal account.
97
76
  */
98
77
  interface IConnectedEntity {
99
- stripeAccountId?: string;
100
- stripePublishableKey?: string;
101
- paypalAccountId?: string;
78
+ stripeAccountId: string;
79
+ stripePublishableKey: string;
102
80
  }
103
81
  /**
104
82
  * @interface
@@ -112,7 +90,7 @@ interface IAccountsEntity {
112
90
  id: number;
113
91
  identifier: string;
114
92
  localizeInfos: Record<string, any>;
115
- type: 'stripe' | 'paypal' | 'custom';
93
+ type: 'stripe' | 'custom';
116
94
  isVisible: boolean;
117
95
  }
118
- export { IAccountsEntity, IConnectedEntity, ISessionEntity, ILineItems, ISessionBody, IPaymentsApi, IIntent };
96
+ export { IAccountsEntity, IConnectedEntity, ISessionEntity, ILineItems, IPaymentsApi, IIntent, ICreateSessionEntity };
@@ -99,9 +99,9 @@ interface IFilterParams {
99
99
  * @property {object} additional - Additional value from the index.
100
100
  * @property {Record<string, any>} localizeInfos - The name of the products, taking into account localization.
101
101
  * @property {boolean} isVisible - A sign of page visibility.
102
- * @property {number | null} statusId - Product page status identifiers (may be null).
102
+ * @property {number | null} statusIdentifier - Product page status identifiers (may be null).
103
103
  * @property {Array<number>} relatedIds - Ids of related product pages.
104
- * @property {number} attributeSetId - Set of attributes id.
104
+ * @property {string} attributeSetIdentifier - Set of attributes id.
105
105
  * @property {boolean} isSync - Indication of page indexing.
106
106
  * @property {number} price - The value of the product page price taken from the index.
107
107
  * @property {string} templateIdentifier - User id of the linked template.
@@ -120,8 +120,8 @@ interface IProductsEntity {
120
120
  localizeInfos: Record<string, any>;
121
121
  blocks?: string | Array<string>;
122
122
  isVisible: boolean;
123
- statusId: number | null;
124
- attributeSetId: number;
123
+ statusIdentifier: number | null;
124
+ attributeSetIdentifier: string;
125
125
  isSync: number | boolean;
126
126
  price: number;
127
127
  templateIdentifier: string | null;
@@ -138,7 +138,7 @@ interface IProductInfo {
138
138
  }
139
139
  interface IProductBlock {
140
140
  id: number;
141
- attributeSetId: number | null;
141
+ attributeSetIdentifier: number | null;
142
142
  localizeInfos: Record<string, any>;
143
143
  version: number;
144
144
  position: number;
@@ -1,5 +1,5 @@
1
1
  import AsyncModules from "../base/asyncModules";
2
- import { ITemplatesPreview, ITemplatesPreviewEntity, ITemplatePreviewEntity } from "./templatesPreviewInterfaces";
2
+ import { ITemplatesPreview, ITemplatesPreviewEntity } from "./templatesPreviewInterfaces";
3
3
  import StateModule from "../base/stateModule";
4
4
  /**
5
5
  * Controllers for working with template objects for preview
@@ -23,7 +23,7 @@ export default class TemplatePreviewsApi extends AsyncModules implements ITempla
23
23
  *
24
24
  * @returns Returns a TemplatePreviewsEntity object
25
25
  */
26
- getTemplatePreviewById(id: number, langCode?: string): Promise<ITemplatePreviewEntity>;
26
+ getTemplatePreviewById(id: number, langCode?: string): Promise<ITemplatesPreviewEntity>;
27
27
  /**
28
28
  * Get one template object by marker.
29
29
  *
@@ -32,5 +32,5 @@ export default class TemplatePreviewsApi extends AsyncModules implements ITempla
32
32
  *
33
33
  * @returns Returns a TemplatePreviewsEntity object
34
34
  */
35
- getTemplatePreviewByMarker(marker: string, langCode?: string): Promise<ITemplatePreviewEntity>;
35
+ getTemplatePreviewByMarker(marker: string, langCode?: string): Promise<ITemplatesPreviewEntity>;
36
36
  }
@@ -9,15 +9,14 @@
9
9
  */
10
10
  interface ITemplatesPreview {
11
11
  getTemplatePreviews(langCode: string): Promise<Array<ITemplatesPreviewEntity>>;
12
- getTemplatePreviewById(id: number, langCode: string): Promise<ITemplatePreviewEntity>;
13
- getTemplatePreviewByMarker(marker: string, langCode: string): Promise<ITemplatePreviewEntity>;
12
+ getTemplatePreviewById(id: number, langCode: string): Promise<ITemplatesPreviewEntity>;
13
+ getTemplatePreviewByMarker(marker: string, langCode: string): Promise<ITemplatesPreviewEntity>;
14
14
  }
15
15
  /**
16
16
  * Represents a template preview entity object.
17
17
  *
18
18
  * @interface
19
19
  * @property {number} id - The unique identifier of the position.
20
- * @property {Date | string} updatedDate - The date of last updated.
21
20
  * @property {string} identifier - The textual identifier for the record field.
22
21
  * @property {object} proportion - Object contains info by proportion template preview.
23
22
  * @property {Record<string, any>} localizeInfos - The name of the template, taking into account localization.
@@ -26,32 +25,6 @@ interface ITemplatesPreview {
26
25
  */
27
26
  interface ITemplatesPreviewEntity {
28
27
  id: number;
29
- updatedDate: string | Date;
30
- version: number;
31
- identifier: string;
32
- proportion: {
33
- horizontal: IProportion | null;
34
- vertical: IProportion | null;
35
- square: ISquare;
36
- };
37
- title: string;
38
- position: number;
39
- }
40
- /**
41
- * Represents a template preview entity object.
42
- *
43
- * @interface
44
- * @property {number} id - The unique identifier of the position.
45
- * @property {Date | string} updatedDate - The date of last updated.
46
- * @property {string} identifier - The textual identifier for the record field.
47
- * @property {object} proportion - Object contains info by proportion template preview.
48
- * @property {Record<string, any>} localizeInfos - The name of the template, taking into account localization.
49
- * @property {number} position - The position of the object.
50
- *
51
- */
52
- interface ITemplatePreviewEntity {
53
- id: number;
54
- updatedDate: string | Date;
55
28
  version: number;
56
29
  identifier: string;
57
30
  proportion: {
@@ -73,4 +46,4 @@ interface ISquare {
73
46
  slide: number;
74
47
  alignmentType: string;
75
48
  }
76
- export { ITemplatesPreview, ITemplatesPreviewEntity, ISquare, IProportion, ITemplatePreviewEntity };
49
+ export { ITemplatesPreview, ITemplatesPreviewEntity, ISquare, IProportion };
@@ -10,11 +10,16 @@ export default class UsersApi extends AsyncModules implements IUsers {
10
10
  constructor(state: StateModule);
11
11
  /**
12
12
  * Getting the data of an authorized user.
13
+ *
14
+ * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
15
+ *
13
16
  * @param {string} [langCode] Required parameter lang code.
14
17
  */
15
18
  getUser(langCode?: string): Promise<IUserEntity>;
16
19
  /**
17
20
  * Updating a single user object.
21
+ * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
22
+ *
18
23
  * @param {object} data - Request body.
19
24
  * @param {string} langCode - Optional language field
20
25
  *
@@ -11,6 +11,9 @@ class UsersApi extends asyncModules_1.default {
11
11
  }
12
12
  /**
13
13
  * Getting the data of an authorized user.
14
+ *
15
+ * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
16
+ *
14
17
  * @param {string} [langCode] Required parameter lang code.
15
18
  */
16
19
  async getUser(langCode = this.state.lang) {
@@ -19,6 +22,8 @@ class UsersApi extends asyncModules_1.default {
19
22
  }
20
23
  /**
21
24
  * Updating a single user object.
25
+ * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
26
+ *
22
27
  * @param {object} data - Request body.
23
28
  * @param {string} langCode - Optional language field
24
29
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oneentry",
3
- "version": "1.0.71",
3
+ "version": "1.0.73",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  "bin": {
14
14
  "oneentry": "./configure.js"
15
15
  },
16
- "author": "ONEENTRY ",
16
+ "author": "ONEENTRY PORTAL CO.",
17
17
  "license": "ISC",
18
18
  "dependencies": {
19
19
  "jsdoc": "^4.0.2"