oneentry 1.0.174 → 1.0.176
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/changelog.md +36 -0
- package/dist/attribute-sets/attributeSetsApi.js +3 -3
- package/dist/auth-provider/authProviderApi.d.ts +1 -1
- package/dist/auth-provider/authProviderApi.js +13 -13
- package/dist/auth-provider/authProviderSchemas.d.ts +1 -1
- package/dist/auth-provider/authProvidersInterfaces.d.ts +3 -2
- package/dist/base/asyncModules.d.ts +11 -0
- package/dist/base/asyncModules.js +14 -0
- package/dist/base/validation.d.ts +1 -1
- package/dist/base/validation.js +1 -1
- package/dist/blocks/blocksApi.js +24 -15
- package/dist/discounts/discountsApi.js +2 -1
- package/dist/events/eventsApi.js +4 -4
- package/dist/filters/filtersApi.js +1 -1
- package/dist/forms/formsApi.js +1 -1
- package/dist/forms-data/formsDataApi.d.ts +10 -8
- package/dist/forms-data/formsDataApi.js +14 -10
- package/dist/forms-data/formsDataInterfaces.d.ts +75 -54
- package/dist/integration-collections/integrationCollectionsApi.js +7 -6
- package/dist/menus/menusApi.js +1 -1
- package/dist/orders/ordersApi.js +7 -6
- package/dist/pages/pagesApi.js +2 -2
- package/dist/product-statuses/productStatusesApi.js +2 -2
- package/dist/templates/templatesApi.js +1 -1
- package/dist/templates-preview/templatesPreviewApi.js +1 -1
- package/dist/user-groups/userGroupsApi.js +2 -2
- package/dist/users/usersApi.d.ts +2 -2
- package/dist/users/usersApi.js +2 -2
- package/dist/users/usersInterfaces.d.ts +8 -7
- package/dist/users/usersSchemas.d.ts +1 -1
- package/esm/attribute-sets/attributeSetsApi.js +3 -3
- package/esm/auth-provider/authProviderApi.d.ts +1 -1
- package/esm/auth-provider/authProviderApi.js +13 -13
- package/esm/auth-provider/authProviderSchemas.d.ts +1 -1
- package/esm/auth-provider/authProvidersInterfaces.d.ts +3 -2
- package/esm/base/asyncModules.d.ts +11 -0
- package/esm/base/asyncModules.js +14 -0
- package/esm/base/validation.d.ts +1 -1
- package/esm/base/validation.js +1 -1
- package/esm/blocks/blocksApi.js +24 -15
- package/esm/discounts/discountsApi.js +2 -1
- package/esm/events/eventsApi.js +4 -4
- package/esm/filters/filtersApi.js +1 -1
- package/esm/forms/formsApi.js +1 -1
- package/esm/forms-data/formsDataApi.d.ts +10 -8
- package/esm/forms-data/formsDataApi.js +14 -10
- package/esm/forms-data/formsDataInterfaces.d.ts +75 -54
- package/esm/integration-collections/integrationCollectionsApi.js +7 -6
- package/esm/menus/menusApi.js +1 -1
- package/esm/orders/ordersApi.js +7 -6
- package/esm/pages/pagesApi.js +2 -2
- package/esm/product-statuses/productStatusesApi.js +2 -2
- package/esm/templates/templatesApi.js +1 -1
- package/esm/templates-preview/templatesPreviewApi.js +1 -1
- package/esm/user-groups/userGroupsApi.js +2 -2
- package/esm/users/usersApi.d.ts +2 -2
- package/esm/users/usersApi.js +2 -2
- package/esm/users/usersInterfaces.d.ts +8 -7
- package/esm/users/usersSchemas.d.ts +1 -1
- package/package.json +2 -2
|
@@ -85,9 +85,9 @@ interface IFormsData {
|
|
|
85
85
|
/**
|
|
86
86
|
* Body for semantic (vector) form data search.
|
|
87
87
|
* @interface IFormsDataVectorSearch
|
|
88
|
-
* @property {string} queryText - Natural-language search query
|
|
89
|
-
* @property {number} [vectorDistanceThreshold] - Override of the cosine distance threshold (0..2)
|
|
90
|
-
* @property {number} [maxHits] - Number of top candidates fetched before pagination. Default: 100. Maximum: 500. Example: 10.
|
|
88
|
+
* @property {string} queryText - Natural-language search query, 1 to 512 characters: an empty one answers `400 queryText should not be empty`, a longer one `400 queryText must be shorter than or equal to 512 characters`. Example: "order confirmation".
|
|
89
|
+
* @property {number} [vectorDistanceThreshold] - Override of the cosine distance threshold (0..2); a negative value answers `400`. Example: 0.3.
|
|
90
|
+
* @property {number} [maxHits] - Number of top candidates fetched before pagination, from 1. Default: 100. Maximum: 500. Example: 10.
|
|
91
91
|
* @property {boolean} [debug] - When `true`, each returned item gets a `distance` field. Example: false.
|
|
92
92
|
* @description Body for the form-data vector/search endpoint.
|
|
93
93
|
*/
|
|
@@ -113,14 +113,14 @@ type FormDataStatus = 'sent' | 'moderation' | 'approved' | 'banned' | 'deleted';
|
|
|
113
113
|
* @property {number} [parentId] - Identifier of the parent record — the way to fetch replies to one comment. Example: 10.
|
|
114
114
|
* @property {string} [userIdentifier] - Text identifier of the sender; an empty string means "no filter". Example: "admin".
|
|
115
115
|
* @property {FormDataStatus[]} [status] - Moderation statuses to keep. Must be an array — a bare string is rejected with `400`. An empty array means "no filter". Example: ["approved"].
|
|
116
|
-
* @property {string} [dateFrom] - Lower bound of the submission date, `YYYY-MM-DD`; an empty string means "no bound" — `getFormsDataByMarker` strips it from the body, since the endpoint rejects an empty date with a `400`. A non-empty value the API cannot parse still fails the request. Example: "2025-01-01".
|
|
117
|
-
* @property {string} [dateTo] - Upper bound of the submission date, `YYYY-MM-DD`; an empty string means "no bound", handled like `dateFrom`. Example: "2025-12-31".
|
|
116
|
+
* @property {string} [dateFrom] - Lower bound of the submission date, `YYYY-MM-DD` or `YYYY-MM-DD HH:MM:SS`; an empty string means "no bound" — `getFormsDataByMarker` strips it from the body, since the endpoint rejects an empty date with a `400`. A non-empty value the API cannot parse still fails the request. Example: "2025-01-01".
|
|
117
|
+
* @property {string} [dateTo] - Upper bound of the submission date, `YYYY-MM-DD` or `YYYY-MM-DD HH:MM:SS`; an empty string means "no bound", handled like `dateFrom`. Example: "2025-12-31".
|
|
118
118
|
* @description Filter for reading form submissions. Every field is optional and an omitted one is simply not applied.
|
|
119
119
|
*
|
|
120
|
-
* Typed rather than left as `object` on purpose: the API **
|
|
121
|
-
* does not know, so `statuses: ['approved']` (note the "s")
|
|
122
|
-
*
|
|
123
|
-
*
|
|
120
|
+
* Typed rather than left as `object` on purpose: the API **refuses** a field it
|
|
121
|
+
* does not know, so `statuses: ['approved']` (note the "s") answers
|
|
122
|
+
* `400 property statuses should not exist` — the compiler catches the typo
|
|
123
|
+
* before the request does.
|
|
124
124
|
*/
|
|
125
125
|
interface IFormsDataFilter {
|
|
126
126
|
/**
|
|
@@ -419,7 +419,7 @@ interface IUpdateFormsData {
|
|
|
419
419
|
/**
|
|
420
420
|
* Contains an array of data form objects with the following values
|
|
421
421
|
*/
|
|
422
|
-
type FormDataType = IBodyTypeStringNumberFloat | IBodyTypeTimeDate | IBodyTypeText | IBodyTypeTextWithHeader | IBodyTypeImageGroupOfImages | IBodyTypeFile | IBodyTypeRadioButtonList | Record<string, unknown>;
|
|
422
|
+
type FormDataType = IBodyTypeStringNumberFloat | IBodyTypeTimeDate | IBodyTypeText | IBodyTypeTextWithHeader | IBodyTypeImageGroupOfImages | IBodyTypeFile | IBodyTypeRadioButtonList | IBodyTypeEntity | IBodyTypeTimeInterval | Record<string, unknown>;
|
|
423
423
|
/**
|
|
424
424
|
* Value shapes accepted by a SUBMISSION (`POST /form-data`).
|
|
425
425
|
*
|
|
@@ -588,13 +588,13 @@ interface IBodyPostFormData {
|
|
|
588
588
|
* Represents a form data entity with a simple value.
|
|
589
589
|
* @interface IBodyTypeStringNumberFloat
|
|
590
590
|
* @property {string} marker - marker name. Example: "some_marker".
|
|
591
|
-
* @property {string} type - Type value. "string" | "number" | "float". Example: "string".
|
|
592
|
-
* @property {string | number | null} value - Value of the form data entity.
|
|
591
|
+
* @property {string} type - Type value. "string" | "integer" | "number" | "float". Example: "string".
|
|
592
|
+
* @property {string | number | null} value - Value of the form data entity. A submission may send a number or a string; responses return numeric fields **as strings** — `3` comes back as `"3"`, `2.565` as `"2.565"` — or `null` when the field is empty. Convert with `Number(value)` before arithmetic. Example: "string".
|
|
593
593
|
* @description Represents a form data entity with a marker, type, and value.
|
|
594
594
|
*/
|
|
595
595
|
interface IBodyTypeStringNumberFloat {
|
|
596
596
|
marker: string;
|
|
597
|
-
type: 'string' | 'number' | 'float';
|
|
597
|
+
type: 'string' | 'integer' | 'number' | 'float';
|
|
598
598
|
value: string | number | null;
|
|
599
599
|
}
|
|
600
600
|
/**
|
|
@@ -633,43 +633,46 @@ interface ITimeDateValue {
|
|
|
633
633
|
* @interface IBodyTypeText
|
|
634
634
|
* @property {string} marker - marker name. Example: "some_marker".
|
|
635
635
|
* @property {string} type - Type value. Example: "text".
|
|
636
|
-
* @property {
|
|
636
|
+
* @property {ITextValue | ITextValue[]} value - Text value. A read returns a one-element **array**, without `plainValue` and with `params.editorMode`; older records may hold a single object.
|
|
637
637
|
* @example
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
638
|
+
[
|
|
639
|
+
{
|
|
640
|
+
"htmlValue": "<p>Hello world</p>",
|
|
641
|
+
"params": {
|
|
642
|
+
"isImageCompressed": true,
|
|
643
|
+
"editorMode": "html"
|
|
644
|
+
}
|
|
644
645
|
}
|
|
645
|
-
|
|
646
|
-
* @description Represents a text value with HTML and plain text representations, along with parameters for editor and image compression settings.
|
|
646
|
+
]
|
|
647
|
+
* @description Represents a text value with HTML and plain text representations, along with parameters for editor and image compression settings. To submit a text field use {@link IBodyPostTypeText}.
|
|
647
648
|
*/
|
|
648
649
|
interface IBodyTypeText {
|
|
649
650
|
marker: string;
|
|
650
651
|
type: 'text';
|
|
651
|
-
value: ITextValue;
|
|
652
|
+
value: ITextValue | ITextValue[];
|
|
652
653
|
}
|
|
653
654
|
/**
|
|
654
655
|
* @interface ITextEditorParams
|
|
655
|
-
* @property {boolean} isEditorDisabled - Whether the rich-text editor is disabled. Example: false.
|
|
656
|
+
* @property {boolean} [isEditorDisabled] - Whether the rich-text editor is disabled. Older records only; current reads carry `editorMode` instead. Example: false.
|
|
656
657
|
* @property {boolean} isImageCompressed - Whether embedded images are compressed. Example: true.
|
|
658
|
+
* @property {string} [editorMode] - Editor the value was written in. Example: "html".
|
|
657
659
|
* @description Editor parameters attached to text-type form values.
|
|
658
660
|
*/
|
|
659
661
|
interface ITextEditorParams {
|
|
660
|
-
isEditorDisabled
|
|
662
|
+
isEditorDisabled?: boolean;
|
|
661
663
|
isImageCompressed: boolean;
|
|
664
|
+
editorMode?: string;
|
|
662
665
|
}
|
|
663
666
|
/**
|
|
664
667
|
* @interface ITextValue
|
|
665
668
|
* @property {string} htmlValue - HTML representation of the text. Example: "<p>Hello world</p>".
|
|
666
|
-
* @property {string} plainValue - Plain-text representation.
|
|
669
|
+
* @property {string} [plainValue] - Plain-text representation. Absent from current reads. Example: "Hello world".
|
|
667
670
|
* @property {ITextEditorParams} params - Editor configuration applied to this value.
|
|
668
671
|
* @description Value payload for `text` form fields.
|
|
669
672
|
*/
|
|
670
673
|
interface ITextValue {
|
|
671
674
|
htmlValue: string;
|
|
672
|
-
plainValue
|
|
675
|
+
plainValue?: string;
|
|
673
676
|
params: ITextEditorParams;
|
|
674
677
|
}
|
|
675
678
|
/**
|
|
@@ -677,36 +680,37 @@ interface ITextValue {
|
|
|
677
680
|
* @interface IBodyTypeTextWithHeader
|
|
678
681
|
* @property {string} marker - marker name. Example: "about".
|
|
679
682
|
* @property {string} type - Type value. Example: "textWithHeader".
|
|
680
|
-
* @property {
|
|
683
|
+
* @property {ITextWithHeaderValue | ITextWithHeaderValue[]} value - Text with a header. A read returns a one-element **array**, without `plainValue` and with `params.editorMode`; older records may hold a single object.
|
|
681
684
|
* @example
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
685
|
+
[
|
|
686
|
+
{
|
|
687
|
+
"header": "Headline",
|
|
688
|
+
"htmlValue": "<p>Hello World</p>",
|
|
689
|
+
"params": {
|
|
690
|
+
"isImageCompressed": true,
|
|
691
|
+
"editorMode": "html"
|
|
692
|
+
}
|
|
689
693
|
}
|
|
690
|
-
|
|
694
|
+
]
|
|
691
695
|
* @description Represents a text value with a header, HTML and plain text representations, along with parameters for editor and image compression settings.
|
|
692
696
|
*/
|
|
693
697
|
interface IBodyTypeTextWithHeader {
|
|
694
698
|
marker: string;
|
|
695
699
|
type: 'textWithHeader';
|
|
696
|
-
value: ITextWithHeaderValue;
|
|
700
|
+
value: ITextWithHeaderValue | ITextWithHeaderValue[];
|
|
697
701
|
}
|
|
698
702
|
/**
|
|
699
703
|
* @interface ITextWithHeaderValue
|
|
700
704
|
* @property {string} header - Headline text. Example: "Headline".
|
|
701
705
|
* @property {string} htmlValue - HTML body. Example: "<p>Hello world</p>".
|
|
702
|
-
* @property {string} plainValue - Plain-text body.
|
|
706
|
+
* @property {string} [plainValue] - Plain-text body. Absent from current reads. Example: "Hello world".
|
|
703
707
|
* @property {ITextEditorParams} params - Editor configuration applied to this value.
|
|
704
708
|
* @description Value payload for `textWithHeader` form fields.
|
|
705
709
|
*/
|
|
706
710
|
interface ITextWithHeaderValue {
|
|
707
711
|
header: string;
|
|
708
712
|
htmlValue: string;
|
|
709
|
-
plainValue
|
|
713
|
+
plainValue?: string;
|
|
710
714
|
params: ITextEditorParams;
|
|
711
715
|
}
|
|
712
716
|
/**
|
|
@@ -765,7 +769,7 @@ interface IImageValue {
|
|
|
765
769
|
* @interface IBodyTypeFile
|
|
766
770
|
* @property {string} marker - marker name. Example: "picture".
|
|
767
771
|
* @property {'file'} type - Type value. Example: "file".
|
|
768
|
-
* @property {object} value - The attached file. Three shapes are accepted and may be mixed in one array: a `File`/`Blob` (also a `FileList`), which the SDK uploads first; the descriptor `FileUploading.upload` returns for a file **already in storage**, which is passed through as it is; or a hand-built {@link IFileValue}. In a SUBMISSION the value must be an **array** — a lone descriptor or {@link IFileValue} answers `400 formData's marker '<marker>' value must be an array`, while a lone `File`/`Blob` is fine because the SDK wraps the upload result. A READ returns a single attached file
|
|
772
|
+
* @property {object} value - The attached file. Three shapes are accepted and may be mixed in one array: a `File`/`Blob` (also a `FileList`), which the SDK uploads first; the descriptor `FileUploading.upload` returns for a file **already in storage**, which is passed through as it is; or a hand-built {@link IFileValue}. In a SUBMISSION the value must be an **array** — a lone descriptor or {@link IFileValue} answers `400 formData's marker '<marker>' value must be an array`, while a lone `File`/`Blob` is fine because the SDK wraps the upload result. A READ returns the files as an array too — a single attached file is a one-element array.
|
|
769
773
|
* @example
|
|
770
774
|
[
|
|
771
775
|
{
|
|
@@ -800,24 +804,41 @@ interface IFileValue {
|
|
|
800
804
|
* @interface IBodyTypeRadioButtonList
|
|
801
805
|
* @property {string} marker - marker name. Example: "selector".
|
|
802
806
|
* @property {string} type - Type value. Example: 'list'.
|
|
803
|
-
* @property {
|
|
807
|
+
* @property {IListOptionValue[] | string[] | string} value - Chosen option(s). A read of a submission returns the option **values as stored**: `list` — an array of strings (`["1"]`), `radioButton` — one string (`"1"`). The `[{ title, value, extended }]` form is the shape of a page attribute.
|
|
804
808
|
* @example
|
|
805
|
-
[
|
|
806
|
-
|
|
807
|
-
"title": "red",
|
|
808
|
-
"value": "1",
|
|
809
|
-
"extended": {
|
|
810
|
-
"value": "red",
|
|
811
|
-
"type": "string"
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
]
|
|
815
|
-
* @description Represents a list or radio button selection with multiple options, each containing a title, value, and extended information.
|
|
809
|
+
["1"]
|
|
810
|
+
* @description Represents a list or radio button selection. Look the titles up in the form's attribute (`Forms.getFormByMarker`) by the stored value.
|
|
816
811
|
*/
|
|
817
812
|
interface IBodyTypeRadioButtonList {
|
|
818
813
|
marker: string;
|
|
819
814
|
type: 'list' | 'radioButton';
|
|
820
|
-
value: IListOptionValue[];
|
|
815
|
+
value: IListOptionValue[] | string[] | string;
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* Represents an `entity` form data field — links to other entities.
|
|
819
|
+
* @interface IBodyTypeEntity
|
|
820
|
+
* @property {string} marker - marker name. Example: "related".
|
|
821
|
+
* @property {'entity'} type - Type value. Example: "entity".
|
|
822
|
+
* @property {number[]} value - Identifiers of the linked entities. Example: [2954, 2957].
|
|
823
|
+
* @description A form field that stores links to other entities (for example products) by id.
|
|
824
|
+
*/
|
|
825
|
+
interface IBodyTypeEntity {
|
|
826
|
+
marker: string;
|
|
827
|
+
type: 'entity';
|
|
828
|
+
value: number[];
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* Represents a `timeInterval` form data field.
|
|
832
|
+
* @interface IBodyTypeTimeInterval
|
|
833
|
+
* @property {string} marker - marker name. Example: "booking".
|
|
834
|
+
* @property {'timeInterval'} type - Type value. Example: "timeInterval".
|
|
835
|
+
* @property {string[][]} value - Intervals as `[start, end]` pairs of ISO dates. Example: [["2025-02-11T16:00:00.000Z", "2025-02-13T16:00:00.000Z"]].
|
|
836
|
+
* @description A form field that stores one or more time intervals.
|
|
837
|
+
*/
|
|
838
|
+
interface IBodyTypeTimeInterval {
|
|
839
|
+
marker: string;
|
|
840
|
+
type: 'timeInterval';
|
|
841
|
+
value: string[][];
|
|
821
842
|
}
|
|
822
843
|
/**
|
|
823
844
|
* @interface IListOptionExtended
|
|
@@ -841,4 +862,4 @@ interface IListOptionValue {
|
|
|
841
862
|
value: string;
|
|
842
863
|
extended: IListOptionExtended;
|
|
843
864
|
}
|
|
844
|
-
export type { FormDataPostType, FormDataStatus, FormDataType, IBodyPostFormData, IBodyPostTypeList, IBodyPostTypeSpam, IBodyPostTypeText, IBodyTypeFile, IBodyTypeImageGroupOfImages, IBodyTypeRadioButtonList, IBodyTypeStringNumberFloat, IBodyTypeText, IBodyTypeTextWithHeader, IBodyTypeTimeDate, ICaptchaEvent, ICaptchaValue, IFileValue, IFormByMarkerDataEntity, IFormDataEntity, IFormDataSearchEntity, IFormsByMarkerDataEntity, IFormsData, IFormsDataEntity, IFormsDataFilter, IFormsDataSearchResponse, IFormsDataVectorSearch, IImageValue, IImageValueParams, IListOptionExtended, IListOptionValue, IPostFormResponse, IPostFormResponseData, ITextEditorParams, ITextSubmissionValue, ITextValue, ITextWithHeaderValue, ITimeDateValue, IUpdateFormsData, };
|
|
865
|
+
export type { FormDataPostType, FormDataStatus, FormDataType, IBodyPostFormData, IBodyPostTypeList, IBodyPostTypeSpam, IBodyPostTypeText, IBodyTypeEntity, IBodyTypeFile, IBodyTypeImageGroupOfImages, IBodyTypeRadioButtonList, IBodyTypeStringNumberFloat, IBodyTypeText, IBodyTypeTextWithHeader, IBodyTypeTimeDate, IBodyTypeTimeInterval, ICaptchaEvent, ICaptchaValue, IFileValue, IFormByMarkerDataEntity, IFormDataEntity, IFormDataSearchEntity, IFormsByMarkerDataEntity, IFormsData, IFormsDataEntity, IFormsDataFilter, IFormsDataSearchResponse, IFormsDataVectorSearch, IImageValue, IImageValueParams, IListOptionExtended, IListOptionValue, IPostFormResponse, IPostFormResponseData, ITextEditorParams, ITextSubmissionValue, ITextValue, ITextWithHeaderValue, ITimeDateValue, IUpdateFormsData, };
|
|
@@ -146,7 +146,7 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
146
146
|
* @see {@link https://js-sdk.oneentry.cloud/docs/integration-collections/validateICollectionMarker validateICollectionMarker} documentation.
|
|
147
147
|
*/
|
|
148
148
|
async validateICollectionMarker(marker) {
|
|
149
|
-
const result = await this._fetchGet(`/marker-validation/${marker}`);
|
|
149
|
+
const result = await this._fetchGet(`/marker-validation/${this._pathSegment(marker)}`);
|
|
150
150
|
// Validate response if validation is enabled
|
|
151
151
|
const validated = await this._validateResponse(result, schema('CollectionIsValidSchema'));
|
|
152
152
|
return this._normalizeData(validated);
|
|
@@ -161,7 +161,7 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
161
161
|
* @see {@link https://js-sdk.oneentry.cloud/docs/integration-collections/getICollectionRowsByMarker getICollectionRowsByMarker} documentation.
|
|
162
162
|
*/
|
|
163
163
|
async getICollectionRowsByMarker(marker, langCode = this.state.lang) {
|
|
164
|
-
const result = await this._fetchGet(`/marker/${marker}/rows?langCode=${langCode}`);
|
|
164
|
+
const result = await this._fetchGet(`/marker/${this._pathSegment(marker)}/rows?langCode=${langCode}`);
|
|
165
165
|
// Validate response if validation is enabled
|
|
166
166
|
const validated = await this._validateResponse(result, schema('CollectionRowsResponseSchema'));
|
|
167
167
|
return this._normalizeData(validated, langCode);
|
|
@@ -177,7 +177,7 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
177
177
|
* @see {@link https://js-sdk.oneentry.cloud/docs/integration-collections/getICollectionRowByMarkerAndId getICollectionRowByMarkerAndId} documentation.
|
|
178
178
|
*/
|
|
179
179
|
async getICollectionRowByMarkerAndId(marker, id, langCode = this.state.lang) {
|
|
180
|
-
const result = await this._fetchGet(`/marker/${marker}/rows/${id}?langCode=${langCode}`);
|
|
180
|
+
const result = await this._fetchGet(`/marker/${this._pathSegment(marker)}/rows/${id}?langCode=${langCode}`);
|
|
181
181
|
// Validate response if validation is enabled
|
|
182
182
|
const validated = await this._validateResponse(result, schema('CollectionRowSchema'));
|
|
183
183
|
return this._normalizeData(validated, langCode);
|
|
@@ -205,7 +205,7 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
205
205
|
* @see {@link https://js-sdk.oneentry.cloud/docs/integration-collections/createICollectionRow createICollectionRow} documentation.
|
|
206
206
|
*/
|
|
207
207
|
async createICollectionRow(marker, body, langCode = this.state.lang) {
|
|
208
|
-
const response = await this._fetchPost(`/marker/${marker}/rows?langCode=${langCode}`, body);
|
|
208
|
+
const response = await this._fetchPost(`/marker/${this._pathSegment(marker)}/rows?langCode=${langCode}`, body);
|
|
209
209
|
// Validate response if validation is enabled
|
|
210
210
|
const validated = await this._validateResponse(response, schema('CollectionRowSchema'));
|
|
211
211
|
return this._normalizeData(validated, langCode);
|
|
@@ -236,7 +236,8 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
236
236
|
* @see {@link https://js-sdk.oneentry.cloud/docs/integration-collections/updateICollectionRow updateICollectionRow} documentation.
|
|
237
237
|
*/
|
|
238
238
|
async updateICollectionRow(marker, id, body, langCode = this.state.lang) {
|
|
239
|
-
const response = await this._fetchPut(`/marker/${marker}/rows/${id}?` +
|
|
239
|
+
const response = await this._fetchPut(`/marker/${this._pathSegment(marker)}/rows/${id}?` +
|
|
240
|
+
`langCode=${langCode}`, body);
|
|
240
241
|
// Validate response if validation is enabled
|
|
241
242
|
const validated = await this._validateResponse(response, schema('CollectionRowSchema'));
|
|
242
243
|
return this._normalizeData(validated, langCode);
|
|
@@ -252,7 +253,7 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
252
253
|
* @see {@link https://js-sdk.oneentry.cloud/docs/integration-collections/deleteICollectionRowByMarkerAndId deleteICollectionRowByMarkerAndId} documentation.
|
|
253
254
|
*/
|
|
254
255
|
async deleteICollectionRowByMarkerAndId(marker, id) {
|
|
255
|
-
const result = await this._fetchDelete(`/marker/${marker}/rows/${id}`);
|
|
256
|
+
const result = await this._fetchDelete(`/marker/${this._pathSegment(marker)}/rows/${id}`);
|
|
256
257
|
return result;
|
|
257
258
|
}
|
|
258
259
|
}
|
package/dist/menus/menusApi.js
CHANGED
|
@@ -65,7 +65,7 @@ class MenusApi extends asyncModules_1.default {
|
|
|
65
65
|
* @see {@link https://js-sdk.oneentry.cloud/docs/menus/getMenusByMarker getMenusByMarker} documentation.
|
|
66
66
|
*/
|
|
67
67
|
async getMenusByMarker(marker, langCode = this.state.lang) {
|
|
68
|
-
const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
|
|
68
|
+
const result = await this._fetchGet(`/marker/${this._pathSegment(marker)}?langCode=${langCode}`);
|
|
69
69
|
// Validate response if validation is enabled
|
|
70
70
|
const validated = await this._validateResponse(result, schema('MenuEntitySchema'));
|
|
71
71
|
return this._normalizeData(validated, langCode);
|
package/dist/orders/ordersApi.js
CHANGED
|
@@ -86,7 +86,7 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
86
86
|
* @see {@link https://js-sdk.oneentry.cloud/docs/orders/getAllOrdersByMarker getAllOrdersByMarker} documentation.
|
|
87
87
|
*/
|
|
88
88
|
async getAllOrdersByMarker(marker, langCode = this.state.lang, offset = 0, limit = 30) {
|
|
89
|
-
const result = await this._fetchGet(`/marker/${marker}/orders?langCode=${langCode}&limit=${limit}&offset=${offset}`);
|
|
89
|
+
const result = await this._fetchGet(`/marker/${this._pathSegment(marker)}/orders?langCode=${langCode}&limit=${limit}&offset=${offset}`);
|
|
90
90
|
// Validate response if validation is enabled
|
|
91
91
|
const validated = await this._validateResponse(result, schema('OrdersResponseSchema'));
|
|
92
92
|
return this._normalizeData(validated);
|
|
@@ -103,7 +103,7 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
103
103
|
* @see {@link https://js-sdk.oneentry.cloud/docs/orders/getOrdersStorageByMarker getOrdersStorageByMarker} documentation.
|
|
104
104
|
*/
|
|
105
105
|
async getOrdersStorageByMarker(marker, langCode = this.state.lang) {
|
|
106
|
-
const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
|
|
106
|
+
const result = await this._fetchGet(`/marker/${this._pathSegment(marker)}?langCode=${langCode}`);
|
|
107
107
|
return this._normalizeData(result);
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
@@ -119,7 +119,7 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
119
119
|
* @see {@link https://js-sdk.oneentry.cloud/docs/orders/getOrderByMarkerAndId getOrderByMarkerAndId} documentation.
|
|
120
120
|
*/
|
|
121
121
|
async getOrderByMarkerAndId(marker, id, langCode = this.state.lang) {
|
|
122
|
-
const result = await this._fetchGet(`/marker/${marker}/orders/${id}?langCode=${langCode}`);
|
|
122
|
+
const result = await this._fetchGet(`/marker/${this._pathSegment(marker)}/orders/${id}?langCode=${langCode}`);
|
|
123
123
|
// Validate response if validation is enabled
|
|
124
124
|
const validated = await this._validateResponse(result, schema('OrderEntitySchema'));
|
|
125
125
|
return this._normalizeData(validated);
|
|
@@ -187,7 +187,7 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
187
187
|
* @see {@link https://js-sdk.oneentry.cloud/docs/orders/createOrder createOrder} documentation.
|
|
188
188
|
*/
|
|
189
189
|
async createOrder(marker, body, langCode = this.state.lang) {
|
|
190
|
-
const result = await this._fetchPost(`/marker/${marker}/orders`, this._wrapOrderFormData(body, langCode));
|
|
190
|
+
const result = await this._fetchPost(`/marker/${this._pathSegment(marker)}/orders`, this._wrapOrderFormData(body, langCode));
|
|
191
191
|
// Validate response if validation is enabled
|
|
192
192
|
const validated = await this._validateResponse(result, schema('CreateOrderResponseSchema'));
|
|
193
193
|
return this._normalizeData(validated);
|
|
@@ -223,7 +223,7 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
223
223
|
* @see {@link https://js-sdk.oneentry.cloud/docs/orders/updateOrderByMarkerAndId updateOrderByMarkerAndId} documentation.
|
|
224
224
|
*/
|
|
225
225
|
async updateOrderByMarkerAndId(marker, id, body, langCode = this.state.lang) {
|
|
226
|
-
const result = await this._fetchPut(`/marker/${marker}/orders/${id}?langCode=${langCode}`, this._wrapOrderFormData(body, langCode));
|
|
226
|
+
const result = await this._fetchPut(`/marker/${this._pathSegment(marker)}/orders/${id}?langCode=${langCode}`, this._wrapOrderFormData(body, langCode));
|
|
227
227
|
// Validate response if validation is enabled
|
|
228
228
|
const validated = await this._validateResponse(result, schema('UpdateOrderResponseSchema'));
|
|
229
229
|
return this._normalizeData(validated);
|
|
@@ -246,7 +246,8 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
246
246
|
offset,
|
|
247
247
|
limit,
|
|
248
248
|
};
|
|
249
|
-
const data = await this._fetchGet(`/marker/${marker}/order-statuses?` +
|
|
249
|
+
const data = await this._fetchGet(`/marker/${this._pathSegment(marker)}/order-statuses?` +
|
|
250
|
+
this._queryParamsToString(query));
|
|
250
251
|
return this._normalizeData(data);
|
|
251
252
|
}
|
|
252
253
|
/**
|
package/dist/pages/pagesApi.js
CHANGED
|
@@ -415,13 +415,13 @@ class StaffModule extends asyncModules_1.default {
|
|
|
415
415
|
// ({ total, items }) to match BlocksApi's similarProducts contract.
|
|
416
416
|
async getSimilarProducts(marker, langCode = this.state.lang, offset = 0, limit = 30) {
|
|
417
417
|
// Fetch similar products from the server
|
|
418
|
-
const result = await this._fetchGet(`/${marker}/similar-products?langCode=${langCode}&offset=${offset}&limit=${limit}`);
|
|
418
|
+
const result = await this._fetchGet(`/${this._pathSegment(marker)}/similar-products?langCode=${langCode}&offset=${offset}&limit=${limit}`);
|
|
419
419
|
return this._normalizeData(result);
|
|
420
420
|
}
|
|
421
421
|
// Method to fetch products by block marker
|
|
422
422
|
async getProductsByBlockMarker(marker, langCode = this.state.lang, offset = 0, limit = 30) {
|
|
423
423
|
// Fetch products from the server
|
|
424
|
-
const result = await this._fetchGet(`/${marker}/products?langCode=${langCode}&offset=${offset}&limit=${limit}`);
|
|
424
|
+
const result = await this._fetchGet(`/${this._pathSegment(marker)}/products?langCode=${langCode}&offset=${offset}&limit=${limit}`);
|
|
425
425
|
// On API error responses there is no `items` array — return the (normalized)
|
|
426
426
|
// error as-is instead of producing `undefined` from `result.items`.
|
|
427
427
|
if (!Array.isArray(result === null || result === void 0 ? void 0 : result.items)) {
|
|
@@ -80,7 +80,7 @@ class ProductStatusesApi extends asyncModules_1.default {
|
|
|
80
80
|
* @see {@link https://js-sdk.oneentry.cloud/docs/product-statuses/getProductsByStatusMarker getProductsByStatusMarker} documentation.
|
|
81
81
|
*/
|
|
82
82
|
async getProductsByStatusMarker(marker, langCode = this.state.lang) {
|
|
83
|
-
const result = await this._fetchGet(`/marker/${marker}`);
|
|
83
|
+
const result = await this._fetchGet(`/marker/${this._pathSegment(marker)}`);
|
|
84
84
|
// Validate response if validation is enabled
|
|
85
85
|
const validated = await this._validateResponse(result, schema('ProductStatusEntitySchema'));
|
|
86
86
|
return this._normalizeData(validated, langCode);
|
|
@@ -95,7 +95,7 @@ class ProductStatusesApi extends asyncModules_1.default {
|
|
|
95
95
|
* @see {@link https://js-sdk.oneentry.cloud/docs/product-statuses/validateMarker validateMarker} documentation.
|
|
96
96
|
*/
|
|
97
97
|
async validateMarker(marker) {
|
|
98
|
-
const result = await this._fetchGet(`/marker-validation/${marker}`);
|
|
98
|
+
const result = await this._fetchGet(`/marker-validation/${this._pathSegment(marker)}`);
|
|
99
99
|
// Validate response if validation is enabled
|
|
100
100
|
const validated = await this._validateResponse(result, schema('ValidateMarkerResponseSchema'));
|
|
101
101
|
// Extract the 'valid' boolean value from the response object
|
|
@@ -108,7 +108,7 @@ class TemplatesPreviewApi extends asyncModules_1.default {
|
|
|
108
108
|
* @see {@link https://js-sdk.oneentry.cloud/docs/templates/getTemplateByMarker getTemplateByMarker} documentation.
|
|
109
109
|
*/
|
|
110
110
|
async getTemplateByMarker(marker, langCode = this.state.lang) {
|
|
111
|
-
const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
|
|
111
|
+
const result = await this._fetchGet(`/marker/${this._pathSegment(marker)}?langCode=${langCode}`);
|
|
112
112
|
// Validate response if validation is enabled
|
|
113
113
|
const validated = await this._validateResponse(result, schema('TemplateEntitySchema'));
|
|
114
114
|
return this._normalizeData(validated);
|
|
@@ -80,7 +80,7 @@ class TemplatePreviewsApi extends asyncModules_1.default {
|
|
|
80
80
|
* @see {@link https://js-sdk.oneentry.cloud/docs/templates-preview/getTemplatePreviewByMarker getTemplatePreviewByMarker} documentation.
|
|
81
81
|
*/
|
|
82
82
|
async getTemplatePreviewByMarker(marker, langCode = this.state.lang) {
|
|
83
|
-
const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
|
|
83
|
+
const result = await this._fetchGet(`/marker/${this._pathSegment(marker)}?langCode=${langCode}`);
|
|
84
84
|
// Validate response if validation is enabled
|
|
85
85
|
const validated = await this._validateResponse(result, schema('TemplatePreviewEntitySchema'));
|
|
86
86
|
return this._normalizeData(validated, langCode);
|
|
@@ -119,7 +119,7 @@ class UserGroupsApi extends asyncModules_1.default {
|
|
|
119
119
|
* @see {@link https://js-sdk.oneentry.cloud/docs/user-groups/getUserGroupByMarker getUserGroupByMarker} documentation.
|
|
120
120
|
*/
|
|
121
121
|
async getUserGroupByMarker(marker, langCode = this.state.lang) {
|
|
122
|
-
const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
|
|
122
|
+
const result = await this._fetchGet(`/marker/${this._pathSegment(marker)}?langCode=${langCode}`);
|
|
123
123
|
// Validate response if validation is enabled
|
|
124
124
|
const validated = await this._validateResponse(result, schema('UserGroupEntitySchema'));
|
|
125
125
|
return this._normalizeData(validated, langCode);
|
|
@@ -136,7 +136,7 @@ class UserGroupsApi extends asyncModules_1.default {
|
|
|
136
136
|
* @see {@link https://js-sdk.oneentry.cloud/docs/user-groups/getChildUserGroupsByMarker getChildUserGroupsByMarker} documentation.
|
|
137
137
|
*/
|
|
138
138
|
async getChildUserGroupsByMarker(marker, langCode = this.state.lang) {
|
|
139
|
-
const result = await this._fetchGet(`/marker/${marker}/children?langCode=${langCode}`);
|
|
139
|
+
const result = await this._fetchGet(`/marker/${this._pathSegment(marker)}/children?langCode=${langCode}`);
|
|
140
140
|
// Validate response if validation is enabled
|
|
141
141
|
const validated = await this._validateResponse(result, schema('UserGroupsResponseSchema'));
|
|
142
142
|
return this._normalizeData(validated, langCode);
|
package/dist/users/usersApi.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export default class UsersApi extends AsyncModules implements IUsersApi {
|
|
|
73
73
|
]
|
|
74
74
|
* @param {string} body.authData[].marker - Identifies the field being used. Example: "email_reg".
|
|
75
75
|
* @param {string} body.authData[].value - Contains the value of the field. Example: "example@oneentry.cloud".
|
|
76
|
-
* @param {
|
|
76
|
+
* @param {FormDataType | FormDataType[]} body.formData - Form fields of the user. Field values: {@link FormDataType} — a value shaped by the field type (a string, a date object, a text object, a list, a file descriptor), not only a string. A file goes in as the descriptor `FileUploading.upload` returns: these methods do not upload a `File`/`Blob` themselves.
|
|
77
77
|
* @example
|
|
78
78
|
[
|
|
79
79
|
{
|
|
@@ -84,7 +84,7 @@ export default class UsersApi extends AsyncModules implements IUsersApi {
|
|
|
84
84
|
]
|
|
85
85
|
* @param {string} body.formData[].marker - The marker of the field. Example: "last_name".
|
|
86
86
|
* @param {string} body.formData[].type - The type of the field. Example: "string".
|
|
87
|
-
* @param {
|
|
87
|
+
* @param {unknown} body.formData[].value - The value of the field, shaped by its type. Example: "Username".
|
|
88
88
|
* @param {string} body.notificationData - The notification data.
|
|
89
89
|
* @example
|
|
90
90
|
{
|
package/dist/users/usersApi.js
CHANGED
|
@@ -116,7 +116,7 @@ class UsersApi extends asyncModules_1.default {
|
|
|
116
116
|
]
|
|
117
117
|
* @param {string} body.authData[].marker - Identifies the field being used. Example: "email_reg".
|
|
118
118
|
* @param {string} body.authData[].value - Contains the value of the field. Example: "example@oneentry.cloud".
|
|
119
|
-
* @param {
|
|
119
|
+
* @param {FormDataType | FormDataType[]} body.formData - Form fields of the user. Field values: {@link FormDataType} — a value shaped by the field type (a string, a date object, a text object, a list, a file descriptor), not only a string. A file goes in as the descriptor `FileUploading.upload` returns: these methods do not upload a `File`/`Blob` themselves.
|
|
120
120
|
* @example
|
|
121
121
|
[
|
|
122
122
|
{
|
|
@@ -127,7 +127,7 @@ class UsersApi extends asyncModules_1.default {
|
|
|
127
127
|
]
|
|
128
128
|
* @param {string} body.formData[].marker - The marker of the field. Example: "last_name".
|
|
129
129
|
* @param {string} body.formData[].type - The type of the field. Example: "string".
|
|
130
|
-
* @param {
|
|
130
|
+
* @param {unknown} body.formData[].value - The value of the field, shaped by its type. Example: "Username".
|
|
131
131
|
* @param {string} body.notificationData - The notification data.
|
|
132
132
|
* @example
|
|
133
133
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAuthData,
|
|
1
|
+
import type { IAuthData, INotificationData } from '../auth-provider/authProvidersInterfaces';
|
|
2
2
|
import type { IError, IRating, IVectorSearchResponse } from '../base/utils';
|
|
3
3
|
import type { IFormConfig } from '../forms/formsInterfaces';
|
|
4
4
|
import type { FormDataType } from '../forms-data/formsDataInterfaces';
|
|
@@ -64,7 +64,7 @@ interface IUsersApi {
|
|
|
64
64
|
]
|
|
65
65
|
* @param {string} body.authData[index].marker - Identifies the field being used. Example: "email_reg".
|
|
66
66
|
* @param {string} body.authData[index].value - Contains the value of the field. Example: "example@oneentry.cloud".
|
|
67
|
-
* @param {
|
|
67
|
+
* @param {FormDataType | FormDataType[]} body.formData - Form fields of the user. Field values: {@link FormDataType} — a value shaped by the field type (a string, a date object, a text object, a list, a file descriptor), not only a string. A file goes in as the descriptor `FileUploading.upload` returns: these methods do not upload a `File`/`Blob` themselves.
|
|
68
68
|
* @example
|
|
69
69
|
[
|
|
70
70
|
{
|
|
@@ -75,7 +75,7 @@ interface IUsersApi {
|
|
|
75
75
|
]
|
|
76
76
|
* @param {string} body.formData[index].marker - The marker of the field. Example: "last_name".
|
|
77
77
|
* @param {string} body.formData[index].type - The type of the field. Example: "string".
|
|
78
|
-
* @param {
|
|
78
|
+
* @param {unknown} body.formData[index].value - The value of the field, shaped by its type. Example: "Username".
|
|
79
79
|
* @param {string} body.notificationData - The notification data.
|
|
80
80
|
* @example
|
|
81
81
|
{
|
|
@@ -264,7 +264,7 @@ interface IUsersResponse {
|
|
|
264
264
|
}
|
|
265
265
|
]
|
|
266
266
|
* @property {string} formIdentifier - Marker of the form. Example: "form_12345".
|
|
267
|
-
* @property {string} total -
|
|
267
|
+
* @property {string} [total] - Deprecated, do not rely on it. A service counter that leaks into the response of a single user: always `"1"`, it carries no data about the user. The API reference does not describe it, and the field may disappear from the response. Example: "1".
|
|
268
268
|
* @property {Array<string | number>} groups - User groups.
|
|
269
269
|
* @example
|
|
270
270
|
[
|
|
@@ -287,7 +287,8 @@ interface IUserEntity {
|
|
|
287
287
|
authProviderIdentifier: string;
|
|
288
288
|
formData: FormDataType[];
|
|
289
289
|
formIdentifier: string;
|
|
290
|
-
|
|
290
|
+
/** @deprecated Service counter leaking into the response, always `"1"`; the field may disappear. */
|
|
291
|
+
total?: string;
|
|
291
292
|
groups: Array<string | number>;
|
|
292
293
|
state: Record<string, unknown>;
|
|
293
294
|
moduleFormConfigs?: Array<IFormConfig>;
|
|
@@ -306,7 +307,7 @@ interface IUserEntity {
|
|
|
306
307
|
"value": "12345"
|
|
307
308
|
}
|
|
308
309
|
]
|
|
309
|
-
* @property {
|
|
310
|
+
* @property {FormDataType | FormDataType[]} [formData] - One form field object or an array of them. Field values: {@link FormDataType} — a value shaped by the field type (a string, a date object, a text object, a list, a file descriptor), not only a string. A file goes in as the descriptor `FileUploading.upload` returns: these methods do not upload a `File`/`Blob` themselves.
|
|
310
311
|
* @example
|
|
311
312
|
[
|
|
312
313
|
{
|
|
@@ -338,7 +339,7 @@ interface IUserBody {
|
|
|
338
339
|
formIdentifier: string;
|
|
339
340
|
langCode?: string;
|
|
340
341
|
authData?: IAuthData[];
|
|
341
|
-
formData?:
|
|
342
|
+
formData?: FormDataType | FormDataType[];
|
|
342
343
|
notificationData?: INotificationData;
|
|
343
344
|
state?: Record<string, unknown>;
|
|
344
345
|
}
|
|
@@ -13,7 +13,7 @@ export declare const UserResponseSchema: z.ZodObject<{
|
|
|
13
13
|
authProviderIdentifier: z.ZodString;
|
|
14
14
|
formData: z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
|
|
15
15
|
formIdentifier: z.ZodString;
|
|
16
|
-
total: z.ZodString
|
|
16
|
+
total: z.ZodOptional<z.ZodString>;
|
|
17
17
|
groups: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
18
18
|
state: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
19
19
|
moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
@@ -58,7 +58,7 @@ export default class AttributesSetsApi extends AsyncModules {
|
|
|
58
58
|
* @see {@link https://js-sdk.oneentry.cloud/docs/attribute-sets/getAttributesByMarker getAttributesByMarker} documentation.
|
|
59
59
|
*/
|
|
60
60
|
async getAttributesByMarker(marker, langCode = this.state.lang) {
|
|
61
|
-
const result = await this._fetchGet(`/${marker}/attributes?langCode=${langCode}`);
|
|
61
|
+
const result = await this._fetchGet(`/${this._pathSegment(marker)}/attributes?langCode=${langCode}`);
|
|
62
62
|
// Validate response if validation is enabled
|
|
63
63
|
const validated = await this._validateResponse(result, schema('AttributesArrayResponseSchema'));
|
|
64
64
|
return this._normalizeData(validated, langCode);
|
|
@@ -74,7 +74,7 @@ export default class AttributesSetsApi extends AsyncModules {
|
|
|
74
74
|
* @see {@link https://js-sdk.oneentry.cloud/docs/attribute-sets/getSingleAttributeByMarkerSet getSingleAttributeByMarkerSet} documentation.
|
|
75
75
|
*/
|
|
76
76
|
async getSingleAttributeByMarkerSet(setMarker, attributeMarker, langCode = this.state.lang) {
|
|
77
|
-
const result = await this._fetchGet(`/${setMarker}/attributes/${attributeMarker}?langCode=${langCode}`);
|
|
77
|
+
const result = await this._fetchGet(`/${this._pathSegment(setMarker)}/attributes/${this._pathSegment(attributeMarker)}?langCode=${langCode}`);
|
|
78
78
|
// Validate response if validation is enabled
|
|
79
79
|
const validated = await this._validateResponse(result, schema('AttributeEntitySchema'));
|
|
80
80
|
return this._normalizeData(validated, langCode);
|
|
@@ -89,7 +89,7 @@ export default class AttributesSetsApi extends AsyncModules {
|
|
|
89
89
|
* @see {@link https://js-sdk.oneentry.cloud/docs/attribute-sets/getAttributeSetByMarker getAttributeSetByMarker} documentation.
|
|
90
90
|
*/
|
|
91
91
|
async getAttributeSetByMarker(marker, langCode = this.state.lang) {
|
|
92
|
-
const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
|
|
92
|
+
const result = await this._fetchGet(`/marker/${this._pathSegment(marker)}?langCode=${langCode}`);
|
|
93
93
|
// Validate response if validation is enabled
|
|
94
94
|
const validated = await this._validateResponse(result, schema('AttributeSetEntitySchema'));
|
|
95
95
|
return this._normalizeData(validated, langCode);
|
|
@@ -61,7 +61,7 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
61
61
|
"value": "12345"
|
|
62
62
|
}
|
|
63
63
|
]
|
|
64
|
-
* @param {
|
|
64
|
+
* @param {FormDataType | FormDataType[]} body.formData - Registration form fields: one object or an array. Field values: {@link FormDataType} — a value shaped by the field type (a string, a date object, a text object, a list, a file descriptor), not only a string. A file goes in as the descriptor `FileUploading.upload` returns: these methods do not upload a `File`/`Blob` themselves.
|
|
65
65
|
* @example
|
|
66
66
|
{
|
|
67
67
|
"marker": "last_name",
|