@omni-commerce/sdk 0.25.0 → 0.26.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/README.md +2 -0
- package/dist/index.cjs +177 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1273 -5
- package/dist/index.d.ts +1273 -5
- package/dist/index.js +177 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ function normalizeClientOptions(options = {}) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// src/version.ts
|
|
36
|
-
var SDK_VERSION = "0.
|
|
36
|
+
var SDK_VERSION = "0.26.0";
|
|
37
37
|
var SDK_USER_AGENT = `omnicommerce-js/${SDK_VERSION}`;
|
|
38
38
|
|
|
39
39
|
// src/environments.ts
|
|
@@ -927,7 +927,11 @@ var AnalyticsClient = class {
|
|
|
927
927
|
/**
|
|
928
928
|
* Get Order Analytics
|
|
929
929
|
*
|
|
930
|
-
* Order KPIs with their change against the previous period, a daily trend, sales by order status and by marketplace, and the top products by net sales. Repeat buyers are counted but not listed.
|
|
930
|
+
* Order KPIs with their change against the previous period, a daily trend, sales by order status and by marketplace, and the top products by net sales. Repeat buyers are counted but not listed.
|
|
931
|
+
|
|
932
|
+
### Order attribution
|
|
933
|
+
|
|
934
|
+
`attribution` contains normalized order channels and creator handles, Net Revenue rankings partitioned by currency and exact store, and evidence coverage. Joint creator/channel groups count each order once; missing evidence is explicit. Matches the Orders analysis page. Requires `analytics:read`.
|
|
931
935
|
|
|
932
936
|
Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
|
|
933
937
|
*
|
|
@@ -2262,7 +2266,7 @@ var DocumentsClient = class {
|
|
|
2262
2266
|
*
|
|
2263
2267
|
* Upload one file to the knowledge base as multipart/form-data. Requires `documents:write`.
|
|
2264
2268
|
|
|
2265
|
-
Accepted: PDF up to 20 MB, Word (.docx) and PowerPoint (.pptx) up to 20 MB, Excel (.xlsx/.xlsm) up to
|
|
2269
|
+
Accepted: PDF up to 20 MB, Word (.docx) and PowerPoint (.pptx) up to 20 MB, Excel (.xlsx/.xlsm) up to 20 MB, images up to 8 MB, CSV and Markdown up to 2 MB. PDFs, Word, PowerPoint, Markdown, and images are indexed in the background; poll `GET /api/v1/documents/{documentId}` until `status` is `completed`. CSV and Excel are stored for agents to read but are not indexed.
|
|
2266
2270
|
*
|
|
2267
2271
|
* `POST /api/v1/documents`
|
|
2268
2272
|
*/
|
|
@@ -5326,6 +5330,174 @@ var WebhooksClient = class {
|
|
|
5326
5330
|
});
|
|
5327
5331
|
}
|
|
5328
5332
|
};
|
|
5333
|
+
var WikiClient = class {
|
|
5334
|
+
constructor(_http) {
|
|
5335
|
+
__publicField(this, "_http", _http);
|
|
5336
|
+
}
|
|
5337
|
+
/**
|
|
5338
|
+
* Export Wiki
|
|
5339
|
+
*
|
|
5340
|
+
* Export every active General page as a markdown file with YAML front matter, and the glossary (titles, aliases, related pages) as SKOS in JSON-LD. Requires documents:read.
|
|
5341
|
+
*
|
|
5342
|
+
* `GET /api/v1/wiki/export`
|
|
5343
|
+
*/
|
|
5344
|
+
exportPages(request = {}, requestOptions) {
|
|
5345
|
+
const { organizationId } = request ?? {};
|
|
5346
|
+
return this._http.request({
|
|
5347
|
+
method: "GET",
|
|
5348
|
+
path: "/api/v1/wiki/export",
|
|
5349
|
+
query: { organizationId },
|
|
5350
|
+
body: void 0,
|
|
5351
|
+
...mergeRequestOptions(requestOptions)
|
|
5352
|
+
});
|
|
5353
|
+
}
|
|
5354
|
+
/**
|
|
5355
|
+
* Import Wiki
|
|
5356
|
+
*
|
|
5357
|
+
* Create or update General pages from markdown files. Requires documents:write. Front matter may set title, summary, aliases, hiddenLabels, appliesTo and reviewBy; without front matter the first # heading is the title.
|
|
5358
|
+
|
|
5359
|
+
Definitions from older exports are imported into the page body.
|
|
5360
|
+
|
|
5361
|
+
A file updates the page that already holds its title and otherwise creates one, so importing an export is idempotent. Each file is saved on its own and reported separately.
|
|
5362
|
+
*
|
|
5363
|
+
* `POST /api/v1/wiki/import`
|
|
5364
|
+
*/
|
|
5365
|
+
importPages(request, requestOptions) {
|
|
5366
|
+
const { ...body } = request ?? {};
|
|
5367
|
+
return this._http.request({
|
|
5368
|
+
method: "POST",
|
|
5369
|
+
path: "/api/v1/wiki/import",
|
|
5370
|
+
query: void 0,
|
|
5371
|
+
body,
|
|
5372
|
+
...mergeRequestOptions(requestOptions)
|
|
5373
|
+
});
|
|
5374
|
+
}
|
|
5375
|
+
/**
|
|
5376
|
+
* List Wiki Pages
|
|
5377
|
+
*
|
|
5378
|
+
* List the organization's wiki pages with title, aliases and an excerpt. Requires documents:read. Filter with q (title, alias, summary and fragment text) and status (active, stale, archived); sort by newest, title or most_used.
|
|
5379
|
+
*
|
|
5380
|
+
* `GET /api/v1/wiki/pages`
|
|
5381
|
+
*/
|
|
5382
|
+
listPages(request = {}, requestOptions) {
|
|
5383
|
+
const { organizationId, q, status, sort, limit, offset } = request ?? {};
|
|
5384
|
+
return this._http.request({
|
|
5385
|
+
method: "GET",
|
|
5386
|
+
path: "/api/v1/wiki/pages",
|
|
5387
|
+
query: { organizationId, q, status, sort, limit, offset },
|
|
5388
|
+
body: void 0,
|
|
5389
|
+
...mergeRequestOptions(requestOptions)
|
|
5390
|
+
});
|
|
5391
|
+
}
|
|
5392
|
+
/**
|
|
5393
|
+
* Create Wiki Page
|
|
5394
|
+
*
|
|
5395
|
+
* Create a wiki page. Requires documents:write. The page is saved directly; the approval card applies only to changes an agent proposes in chat.
|
|
5396
|
+
|
|
5397
|
+
Titles and aliases are unique within the organization. Link other pages in the body as [[Page title]]. The page is findable by name at once; fragment, meaning and graph search follow within about a minute.
|
|
5398
|
+
*
|
|
5399
|
+
* `POST /api/v1/wiki/pages`
|
|
5400
|
+
*/
|
|
5401
|
+
createPage(request, requestOptions) {
|
|
5402
|
+
const { ...body } = request ?? {};
|
|
5403
|
+
return this._http.request({
|
|
5404
|
+
method: "POST",
|
|
5405
|
+
path: "/api/v1/wiki/pages",
|
|
5406
|
+
query: void 0,
|
|
5407
|
+
body,
|
|
5408
|
+
...mergeRequestOptions(requestOptions)
|
|
5409
|
+
});
|
|
5410
|
+
}
|
|
5411
|
+
/**
|
|
5412
|
+
* Archive Wiki Page
|
|
5413
|
+
*
|
|
5414
|
+
* Archive the page. Requires documents:write. Agents stop using it and it leaves search; its history and names are kept, and PATCH with status active restores it.
|
|
5415
|
+
*
|
|
5416
|
+
* `DELETE /api/v1/wiki/pages/{pageId}`
|
|
5417
|
+
*/
|
|
5418
|
+
archivePage(request, requestOptions) {
|
|
5419
|
+
const { pageId, organizationId } = request ?? {};
|
|
5420
|
+
return this._http.request({
|
|
5421
|
+
method: "DELETE",
|
|
5422
|
+
path: `/api/v1/wiki/pages/${encodePathParam("pageId", pageId)}`,
|
|
5423
|
+
query: { organizationId },
|
|
5424
|
+
body: void 0,
|
|
5425
|
+
...mergeRequestOptions(requestOptions)
|
|
5426
|
+
});
|
|
5427
|
+
}
|
|
5428
|
+
/**
|
|
5429
|
+
* Get Wiki Page
|
|
5430
|
+
*
|
|
5431
|
+
* Read one page with its body, labels, linked pages and pages that link to it. Requires documents:read.
|
|
5432
|
+
*
|
|
5433
|
+
* `GET /api/v1/wiki/pages/{pageId}`
|
|
5434
|
+
*/
|
|
5435
|
+
getPage(request, requestOptions) {
|
|
5436
|
+
const { pageId, organizationId } = request ?? {};
|
|
5437
|
+
return this._http.request({
|
|
5438
|
+
method: "GET",
|
|
5439
|
+
path: `/api/v1/wiki/pages/${encodePathParam("pageId", pageId)}`,
|
|
5440
|
+
query: { organizationId },
|
|
5441
|
+
body: void 0,
|
|
5442
|
+
...mergeRequestOptions(requestOptions)
|
|
5443
|
+
});
|
|
5444
|
+
}
|
|
5445
|
+
/**
|
|
5446
|
+
* Update Wiki Page
|
|
5447
|
+
*
|
|
5448
|
+
* Save a new revision. Requires documents:write. Send only the fields that change; aliases and appliesTo replace the existing lists.
|
|
5449
|
+
|
|
5450
|
+
Pass baseRevisionNumber to refuse the update with 409 if the page changed since you read it. status archives or restores the page. restoreRevisionNumber brings back an earlier revision as the newest one and ignores other fields.
|
|
5451
|
+
*
|
|
5452
|
+
* `PATCH /api/v1/wiki/pages/{pageId}`
|
|
5453
|
+
*/
|
|
5454
|
+
updatePage(request, requestOptions) {
|
|
5455
|
+
const { pageId, ...body } = request ?? {};
|
|
5456
|
+
return this._http.request({
|
|
5457
|
+
method: "PATCH",
|
|
5458
|
+
path: `/api/v1/wiki/pages/${encodePathParam("pageId", pageId)}`,
|
|
5459
|
+
query: void 0,
|
|
5460
|
+
body,
|
|
5461
|
+
...mergeRequestOptions(requestOptions)
|
|
5462
|
+
});
|
|
5463
|
+
}
|
|
5464
|
+
/**
|
|
5465
|
+
* List Wiki Page Revisions
|
|
5466
|
+
*
|
|
5467
|
+
* Every saved revision of a page, newest first, with author, origin and change summary. Requires documents:read.
|
|
5468
|
+
*
|
|
5469
|
+
* `GET /api/v1/wiki/pages/{pageId}/revisions`
|
|
5470
|
+
*/
|
|
5471
|
+
listRevisions(request, requestOptions) {
|
|
5472
|
+
const { pageId, organizationId } = request ?? {};
|
|
5473
|
+
return this._http.request({
|
|
5474
|
+
method: "GET",
|
|
5475
|
+
path: `/api/v1/wiki/pages/${encodePathParam("pageId", pageId)}/revisions`,
|
|
5476
|
+
query: { organizationId },
|
|
5477
|
+
body: void 0,
|
|
5478
|
+
...mergeRequestOptions(requestOptions)
|
|
5479
|
+
});
|
|
5480
|
+
}
|
|
5481
|
+
/**
|
|
5482
|
+
* Search Wiki
|
|
5483
|
+
*
|
|
5484
|
+
* Search the wiki and return the best-matching fragments, the same search agents use. Requires documents:read.
|
|
5485
|
+
|
|
5486
|
+
Results fuse name matches, full text, meaning, graph relationships and page links. retrieval reports which signals were available; degraded is true when the graph or meaning search could not be used.
|
|
5487
|
+
*
|
|
5488
|
+
* `POST /api/v1/wiki/search`
|
|
5489
|
+
*/
|
|
5490
|
+
search(request, requestOptions) {
|
|
5491
|
+
const { ...body } = request ?? {};
|
|
5492
|
+
return this._http.request({
|
|
5493
|
+
method: "POST",
|
|
5494
|
+
path: "/api/v1/wiki/search",
|
|
5495
|
+
query: void 0,
|
|
5496
|
+
body,
|
|
5497
|
+
...mergeRequestOptions(requestOptions)
|
|
5498
|
+
});
|
|
5499
|
+
}
|
|
5500
|
+
};
|
|
5329
5501
|
var ZaloraClient = class {
|
|
5330
5502
|
constructor(_http) {
|
|
5331
5503
|
__publicField(this, "_http", _http);
|
|
@@ -5417,6 +5589,7 @@ var OmniGeneratedClient = class {
|
|
|
5417
5589
|
__publicField(this, "ucp");
|
|
5418
5590
|
__publicField(this, "webhookEvents");
|
|
5419
5591
|
__publicField(this, "webhooks");
|
|
5592
|
+
__publicField(this, "wiki");
|
|
5420
5593
|
__publicField(this, "zalora");
|
|
5421
5594
|
this.agents = new AgentsClient(this._http);
|
|
5422
5595
|
this.analytics = new AnalyticsClient(this._http);
|
|
@@ -5459,6 +5632,7 @@ var OmniGeneratedClient = class {
|
|
|
5459
5632
|
this.ucp = new UcpClient(this._http);
|
|
5460
5633
|
this.webhookEvents = new WebhookEventsClient(this._http);
|
|
5461
5634
|
this.webhooks = new WebhooksClient(this._http);
|
|
5635
|
+
this.wiki = new WikiClient(this._http);
|
|
5462
5636
|
this.zalora = new ZaloraClient(this._http);
|
|
5463
5637
|
}
|
|
5464
5638
|
};
|