@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 CHANGED
@@ -1,5 +1,7 @@
1
1
  # @omni-commerce/sdk
2
2
 
3
+ SDK 0.26.0 adds normalized order attribution to `orders.list`, `orders.get`, and `analytics.getOrders`. Read `attribution.channels`, `creatorHandles`, and `storefront`; analytics includes creator/channel Net Revenue by exact store and currency.
4
+
3
5
  SDK 0.25.0 supports marketplace-only bulk import and enrichment, later store assignment with `products.assignMarketplaceStores`, and publishing to those exact stores.
4
6
 
5
7
  SDK 0.24.0 adds typed refund and rejection inputs, return evidence uploads, and separate order refund and physical receipt status.
package/dist/index.cjs CHANGED
@@ -35,7 +35,7 @@ function normalizeClientOptions(options = {}) {
35
35
  }
36
36
 
37
37
  // src/version.ts
38
- var SDK_VERSION = "0.25.0";
38
+ var SDK_VERSION = "0.26.0";
39
39
  var SDK_USER_AGENT = `omnicommerce-js/${SDK_VERSION}`;
40
40
 
41
41
  // src/environments.ts
@@ -929,7 +929,11 @@ var AnalyticsClient = class {
929
929
  /**
930
930
  * Get Order Analytics
931
931
  *
932
- * 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. Matches the Orders analysis page. Requires `analytics:read`.
932
+ * 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.
933
+
934
+ ### Order attribution
935
+
936
+ `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`.
933
937
 
934
938
  Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
935
939
  *
@@ -2264,7 +2268,7 @@ var DocumentsClient = class {
2264
2268
  *
2265
2269
  * Upload one file to the knowledge base as multipart/form-data. Requires `documents:write`.
2266
2270
 
2267
- Accepted: PDF up to 20 MB, Word (.docx) and PowerPoint (.pptx) up to 20 MB, Excel (.xlsx/.xlsm) up to 10 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.
2271
+ 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.
2268
2272
  *
2269
2273
  * `POST /api/v1/documents`
2270
2274
  */
@@ -5328,6 +5332,174 @@ var WebhooksClient = class {
5328
5332
  });
5329
5333
  }
5330
5334
  };
5335
+ var WikiClient = class {
5336
+ constructor(_http) {
5337
+ __publicField(this, "_http", _http);
5338
+ }
5339
+ /**
5340
+ * Export Wiki
5341
+ *
5342
+ * 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.
5343
+ *
5344
+ * `GET /api/v1/wiki/export`
5345
+ */
5346
+ exportPages(request = {}, requestOptions) {
5347
+ const { organizationId } = request ?? {};
5348
+ return this._http.request({
5349
+ method: "GET",
5350
+ path: "/api/v1/wiki/export",
5351
+ query: { organizationId },
5352
+ body: void 0,
5353
+ ...mergeRequestOptions(requestOptions)
5354
+ });
5355
+ }
5356
+ /**
5357
+ * Import Wiki
5358
+ *
5359
+ * 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.
5360
+
5361
+ Definitions from older exports are imported into the page body.
5362
+
5363
+ 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.
5364
+ *
5365
+ * `POST /api/v1/wiki/import`
5366
+ */
5367
+ importPages(request, requestOptions) {
5368
+ const { ...body } = request ?? {};
5369
+ return this._http.request({
5370
+ method: "POST",
5371
+ path: "/api/v1/wiki/import",
5372
+ query: void 0,
5373
+ body,
5374
+ ...mergeRequestOptions(requestOptions)
5375
+ });
5376
+ }
5377
+ /**
5378
+ * List Wiki Pages
5379
+ *
5380
+ * 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.
5381
+ *
5382
+ * `GET /api/v1/wiki/pages`
5383
+ */
5384
+ listPages(request = {}, requestOptions) {
5385
+ const { organizationId, q, status, sort, limit, offset } = request ?? {};
5386
+ return this._http.request({
5387
+ method: "GET",
5388
+ path: "/api/v1/wiki/pages",
5389
+ query: { organizationId, q, status, sort, limit, offset },
5390
+ body: void 0,
5391
+ ...mergeRequestOptions(requestOptions)
5392
+ });
5393
+ }
5394
+ /**
5395
+ * Create Wiki Page
5396
+ *
5397
+ * Create a wiki page. Requires documents:write. The page is saved directly; the approval card applies only to changes an agent proposes in chat.
5398
+
5399
+ 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.
5400
+ *
5401
+ * `POST /api/v1/wiki/pages`
5402
+ */
5403
+ createPage(request, requestOptions) {
5404
+ const { ...body } = request ?? {};
5405
+ return this._http.request({
5406
+ method: "POST",
5407
+ path: "/api/v1/wiki/pages",
5408
+ query: void 0,
5409
+ body,
5410
+ ...mergeRequestOptions(requestOptions)
5411
+ });
5412
+ }
5413
+ /**
5414
+ * Archive Wiki Page
5415
+ *
5416
+ * 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.
5417
+ *
5418
+ * `DELETE /api/v1/wiki/pages/{pageId}`
5419
+ */
5420
+ archivePage(request, requestOptions) {
5421
+ const { pageId, organizationId } = request ?? {};
5422
+ return this._http.request({
5423
+ method: "DELETE",
5424
+ path: `/api/v1/wiki/pages/${encodePathParam("pageId", pageId)}`,
5425
+ query: { organizationId },
5426
+ body: void 0,
5427
+ ...mergeRequestOptions(requestOptions)
5428
+ });
5429
+ }
5430
+ /**
5431
+ * Get Wiki Page
5432
+ *
5433
+ * Read one page with its body, labels, linked pages and pages that link to it. Requires documents:read.
5434
+ *
5435
+ * `GET /api/v1/wiki/pages/{pageId}`
5436
+ */
5437
+ getPage(request, requestOptions) {
5438
+ const { pageId, organizationId } = request ?? {};
5439
+ return this._http.request({
5440
+ method: "GET",
5441
+ path: `/api/v1/wiki/pages/${encodePathParam("pageId", pageId)}`,
5442
+ query: { organizationId },
5443
+ body: void 0,
5444
+ ...mergeRequestOptions(requestOptions)
5445
+ });
5446
+ }
5447
+ /**
5448
+ * Update Wiki Page
5449
+ *
5450
+ * Save a new revision. Requires documents:write. Send only the fields that change; aliases and appliesTo replace the existing lists.
5451
+
5452
+ 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.
5453
+ *
5454
+ * `PATCH /api/v1/wiki/pages/{pageId}`
5455
+ */
5456
+ updatePage(request, requestOptions) {
5457
+ const { pageId, ...body } = request ?? {};
5458
+ return this._http.request({
5459
+ method: "PATCH",
5460
+ path: `/api/v1/wiki/pages/${encodePathParam("pageId", pageId)}`,
5461
+ query: void 0,
5462
+ body,
5463
+ ...mergeRequestOptions(requestOptions)
5464
+ });
5465
+ }
5466
+ /**
5467
+ * List Wiki Page Revisions
5468
+ *
5469
+ * Every saved revision of a page, newest first, with author, origin and change summary. Requires documents:read.
5470
+ *
5471
+ * `GET /api/v1/wiki/pages/{pageId}/revisions`
5472
+ */
5473
+ listRevisions(request, requestOptions) {
5474
+ const { pageId, organizationId } = request ?? {};
5475
+ return this._http.request({
5476
+ method: "GET",
5477
+ path: `/api/v1/wiki/pages/${encodePathParam("pageId", pageId)}/revisions`,
5478
+ query: { organizationId },
5479
+ body: void 0,
5480
+ ...mergeRequestOptions(requestOptions)
5481
+ });
5482
+ }
5483
+ /**
5484
+ * Search Wiki
5485
+ *
5486
+ * Search the wiki and return the best-matching fragments, the same search agents use. Requires documents:read.
5487
+
5488
+ 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.
5489
+ *
5490
+ * `POST /api/v1/wiki/search`
5491
+ */
5492
+ search(request, requestOptions) {
5493
+ const { ...body } = request ?? {};
5494
+ return this._http.request({
5495
+ method: "POST",
5496
+ path: "/api/v1/wiki/search",
5497
+ query: void 0,
5498
+ body,
5499
+ ...mergeRequestOptions(requestOptions)
5500
+ });
5501
+ }
5502
+ };
5331
5503
  var ZaloraClient = class {
5332
5504
  constructor(_http) {
5333
5505
  __publicField(this, "_http", _http);
@@ -5419,6 +5591,7 @@ var OmniGeneratedClient = class {
5419
5591
  __publicField(this, "ucp");
5420
5592
  __publicField(this, "webhookEvents");
5421
5593
  __publicField(this, "webhooks");
5594
+ __publicField(this, "wiki");
5422
5595
  __publicField(this, "zalora");
5423
5596
  this.agents = new AgentsClient(this._http);
5424
5597
  this.analytics = new AnalyticsClient(this._http);
@@ -5461,6 +5634,7 @@ var OmniGeneratedClient = class {
5461
5634
  this.ucp = new UcpClient(this._http);
5462
5635
  this.webhookEvents = new WebhookEventsClient(this._http);
5463
5636
  this.webhooks = new WebhooksClient(this._http);
5637
+ this.wiki = new WikiClient(this._http);
5464
5638
  this.zalora = new ZaloraClient(this._http);
5465
5639
  }
5466
5640
  };