@attlaz/client 1.91.0 → 1.92.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.
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ApiRecord } from '../../Model/ApiRecord.js';
|
|
2
2
|
import { CatalogId } from './CatalogId.js';
|
|
3
3
|
/**
|
|
4
|
-
* A product
|
|
4
|
+
* A vendor product assigned to a catalog — the `/catalogs/:catalogId/products` resource.
|
|
5
5
|
*
|
|
6
|
-
* The descriptive fields (name, image, gtin, price)
|
|
7
|
-
*
|
|
8
|
-
* price the
|
|
6
|
+
* The descriptive fields (name, image, gtin, price) belong to the linked vendor product and are
|
|
7
|
+
* never duplicated here. This record holds what the catalog itself knows about the product: the
|
|
8
|
+
* identifier it is addressed by, its cost price, and whatever the import source attached.
|
|
9
9
|
*/
|
|
10
10
|
export declare class CatalogProduct {
|
|
11
11
|
id: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CatalogId } from './CatalogId.js';
|
|
2
2
|
/**
|
|
3
|
-
* A product
|
|
3
|
+
* A vendor product assigned to a catalog — the `/catalogs/:catalogId/products` resource.
|
|
4
4
|
*
|
|
5
|
-
* The descriptive fields (name, image, gtin, price)
|
|
6
|
-
*
|
|
7
|
-
* price the
|
|
5
|
+
* The descriptive fields (name, image, gtin, price) belong to the linked vendor product and are
|
|
6
|
+
* never duplicated here. This record holds what the catalog itself knows about the product: the
|
|
7
|
+
* identifier it is addressed by, its cost price, and whatever the import source attached.
|
|
8
8
|
*/
|
|
9
9
|
export class CatalogProduct {
|
|
10
10
|
id;
|
|
@@ -6,7 +6,8 @@ import { Endpoint } from './Endpoint.js';
|
|
|
6
6
|
export declare class ConfigurationEndpoint extends Endpoint {
|
|
7
7
|
getByPath(scopeId: string, path: string): Promise<Configuration | null>;
|
|
8
8
|
getByPathQuery(scopeId: string, pathQuery: string, pagination: CursorPagination): Promise<CollectionResult<Configuration>>;
|
|
9
|
-
|
|
9
|
+
/** Write the value at this path and scope, returning the row as stored. */
|
|
10
|
+
save(scopeId: string, path: string, value: unknown): Promise<Configuration | null>;
|
|
10
11
|
/**
|
|
11
12
|
* Remove a configuration row so resolution falls back to the parent scope.
|
|
12
13
|
* Use this for the "Clear field" / "Inherit from parent" UX action.
|
|
@@ -31,11 +31,13 @@ export class ConfigurationEndpoint extends Endpoint {
|
|
|
31
31
|
throw error;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
+
/** Write the value at this path and scope, returning the row as stored. */
|
|
34
35
|
async save(scopeId, path, value) {
|
|
35
36
|
const qs = new QueryString('/configurations/' + scopeId);
|
|
36
37
|
qs.set('path', path);
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
// The API answers with the single saved row, not a collection.
|
|
39
|
+
const result = await this.requestObject(qs, { value: value }, Configuration.parse, 'POST');
|
|
40
|
+
return result.getData();
|
|
39
41
|
}
|
|
40
42
|
/**
|
|
41
43
|
* Remove a configuration row so resolution falls back to the parent scope.
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.91.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.
|
|
1
|
+
export const VERSION = "1.91.0";
|