@simpleapps-com/augur-api 2026.5.4 → 2026.5.6

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.
@@ -1959,7 +1959,7 @@ declare class OpenSearchClient extends BaseServiceClient {
1959
1959
  /**
1960
1960
  * Generated types for items service
1961
1961
  * Source: shared/specs/items.json
1962
- * Generated: 2026-05-05T20:37:36Z
1962
+ * Generated: 2026-05-14T17:43:07Z
1963
1963
  *
1964
1964
  * DO NOT EDIT — regenerate with: python shared/scripts/generate-ts.py
1965
1965
  */
@@ -2031,6 +2031,8 @@ interface BrandsItemsListParams extends EdgeCacheParams {
2031
2031
  tags?: string;
2032
2032
  variantFilter?: string;
2033
2033
  }
2034
+ /** Params for GET /brands/{brandsUid}/items/{brandsXItemsUid} */
2035
+ type BrandsItemsGetParams = EdgeCacheParams;
2034
2036
  /** Params for GET /categories/lookup */
2035
2037
  interface CategoriesLookupGetParams extends EdgeCacheParams {
2036
2038
  cacheTtl?: number;
@@ -2392,6 +2394,18 @@ interface BrandsData {
2392
2394
  [key: string]: unknown;
2393
2395
  }
2394
2396
  /** Response data — fields are MINIMUM, extra fields pass through */
2397
+ interface BrandsItemsData {
2398
+ brandsXItemsUid?: number;
2399
+ brandsUid?: number;
2400
+ invMastUid?: number;
2401
+ dateCreated?: string;
2402
+ dateLastModified?: string;
2403
+ updateCd?: number;
2404
+ statusCd?: number;
2405
+ processCd?: number;
2406
+ [key: string]: unknown;
2407
+ }
2408
+ /** Response data — fields are MINIMUM, extra fields pass through */
2395
2409
  interface InvLocData {
2396
2410
  companyId?: string;
2397
2411
  locationId?: number;
@@ -2560,6 +2574,10 @@ interface ItemsClientSpec {
2560
2574
  };
2561
2575
  items: {
2562
2576
  list: (brandsUid: number, params?: BrandsItemsListParams) => Promise<BaseResponse<Record<string, unknown>>>;
2577
+ create: (brandsUid: number, data: Record<string, unknown>) => Promise<BaseResponse<BrandsItemsData>>;
2578
+ get: (brandsUid: number, brandsXItemsUid: number, params?: BrandsItemsGetParams) => Promise<BaseResponse<BrandsItemsData>>;
2579
+ update: (brandsUid: number, brandsXItemsUid: number, data: Record<string, unknown>) => Promise<BaseResponse<BrandsItemsData>>;
2580
+ delete: (brandsUid: number, brandsXItemsUid: number) => Promise<BaseResponse<BrandsItemsData>>;
2563
2581
  };
2564
2582
  };
2565
2583
  categories: {
@@ -2813,7 +2831,7 @@ type WhoamiDataResource$1 = ReturnType<typeof createWhoamiDataResource$1>;
2813
2831
  /**
2814
2832
  * Generated client for items service
2815
2833
  * Source: shared/specs/items.json
2816
- * Generated: 2026-05-05T20:37:36Z
2834
+ * Generated: 2026-05-14T17:43:07Z
2817
2835
  *
2818
2836
  * DO NOT EDIT — regenerate with: python shared/scripts/generate-ts.py
2819
2837
  */
@@ -1959,7 +1959,7 @@ declare class OpenSearchClient extends BaseServiceClient {
1959
1959
  /**
1960
1960
  * Generated types for items service
1961
1961
  * Source: shared/specs/items.json
1962
- * Generated: 2026-05-05T20:37:36Z
1962
+ * Generated: 2026-05-14T17:43:07Z
1963
1963
  *
1964
1964
  * DO NOT EDIT — regenerate with: python shared/scripts/generate-ts.py
1965
1965
  */
@@ -2031,6 +2031,8 @@ interface BrandsItemsListParams extends EdgeCacheParams {
2031
2031
  tags?: string;
2032
2032
  variantFilter?: string;
2033
2033
  }
2034
+ /** Params for GET /brands/{brandsUid}/items/{brandsXItemsUid} */
2035
+ type BrandsItemsGetParams = EdgeCacheParams;
2034
2036
  /** Params for GET /categories/lookup */
2035
2037
  interface CategoriesLookupGetParams extends EdgeCacheParams {
2036
2038
  cacheTtl?: number;
@@ -2392,6 +2394,18 @@ interface BrandsData {
2392
2394
  [key: string]: unknown;
2393
2395
  }
2394
2396
  /** Response data — fields are MINIMUM, extra fields pass through */
2397
+ interface BrandsItemsData {
2398
+ brandsXItemsUid?: number;
2399
+ brandsUid?: number;
2400
+ invMastUid?: number;
2401
+ dateCreated?: string;
2402
+ dateLastModified?: string;
2403
+ updateCd?: number;
2404
+ statusCd?: number;
2405
+ processCd?: number;
2406
+ [key: string]: unknown;
2407
+ }
2408
+ /** Response data — fields are MINIMUM, extra fields pass through */
2395
2409
  interface InvLocData {
2396
2410
  companyId?: string;
2397
2411
  locationId?: number;
@@ -2560,6 +2574,10 @@ interface ItemsClientSpec {
2560
2574
  };
2561
2575
  items: {
2562
2576
  list: (brandsUid: number, params?: BrandsItemsListParams) => Promise<BaseResponse<Record<string, unknown>>>;
2577
+ create: (brandsUid: number, data: Record<string, unknown>) => Promise<BaseResponse<BrandsItemsData>>;
2578
+ get: (brandsUid: number, brandsXItemsUid: number, params?: BrandsItemsGetParams) => Promise<BaseResponse<BrandsItemsData>>;
2579
+ update: (brandsUid: number, brandsXItemsUid: number, data: Record<string, unknown>) => Promise<BaseResponse<BrandsItemsData>>;
2580
+ delete: (brandsUid: number, brandsXItemsUid: number) => Promise<BaseResponse<BrandsItemsData>>;
2563
2581
  };
2564
2582
  };
2565
2583
  categories: {
@@ -2813,7 +2831,7 @@ type WhoamiDataResource$1 = ReturnType<typeof createWhoamiDataResource$1>;
2813
2831
  /**
2814
2832
  * Generated client for items service
2815
2833
  * Source: shared/specs/items.json
2816
- * Generated: 2026-05-05T20:37:36Z
2834
+ * Generated: 2026-05-14T17:43:07Z
2817
2835
  *
2818
2836
  * DO NOT EDIT — regenerate with: python shared/scripts/generate-ts.py
2819
2837
  */
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as AugurAPI } from './client-C72Z8ANN.mjs';
2
- export { a as AgrInfoClient, b as AgrSiteClient, c as AgrWorkClient, d as AugurAPIConfig, e as AugurContext, f as AugurRequestConfig, g as AugurRequestError, h as AugurResponse, i as AvalaraClient, B as BaseResponse, j as BaseResponseSchema, k as Basecamp2Client, l as BrandFolderClient, C as CommerceClient, m as ContextCreationError, n as CustomersClient, D as DiscoveryEndpoint, E as EndpointSearchResult, G as GregorovichClient, H as HealthCheckData, o as HealthCheckDataSchema, I as ItemsClient, J as JoomlaClient, L as LegacyClient, p as LogisticsClient, N as NexusClient, O as OpenSearchClient, q as OrdersClient, P as P21ApisClient, r as P21CoreClient, s as P21PimClient, t as P21SismClient, u as PaginationParamsSchema, v as PaymentsClient, w as PricingClient, R as RequestConfig, S as ServiceMap, x as ShippingClient, y as SlackClient, z as SmartyStreetsClient, U as UPSClient, V as VMIClient } from './client-C72Z8ANN.mjs';
1
+ import { A as AugurAPI } from './client-yZ3HRVgf.mjs';
2
+ export { a as AgrInfoClient, b as AgrSiteClient, c as AgrWorkClient, d as AugurAPIConfig, e as AugurContext, f as AugurRequestConfig, g as AugurRequestError, h as AugurResponse, i as AvalaraClient, B as BaseResponse, j as BaseResponseSchema, k as Basecamp2Client, l as BrandFolderClient, C as CommerceClient, m as ContextCreationError, n as CustomersClient, D as DiscoveryEndpoint, E as EndpointSearchResult, G as GregorovichClient, H as HealthCheckData, o as HealthCheckDataSchema, I as ItemsClient, J as JoomlaClient, L as LegacyClient, p as LogisticsClient, N as NexusClient, O as OpenSearchClient, q as OrdersClient, P as P21ApisClient, r as P21CoreClient, s as P21PimClient, t as P21SismClient, u as PaginationParamsSchema, v as PaymentsClient, w as PricingClient, R as RequestConfig, S as ServiceMap, x as ShippingClient, y as SlackClient, z as SmartyStreetsClient, U as UPSClient, V as VMIClient } from './client-yZ3HRVgf.mjs';
3
3
  import 'valibot';
4
4
 
5
5
  /**
@@ -172,7 +172,14 @@ declare class RateLimitError extends AugurError {
172
172
  endpoint: string;
173
173
  });
174
174
  }
175
+ declare class InvalidArgumentError extends AugurError {
176
+ constructor(params: {
177
+ message: string;
178
+ service: string;
179
+ endpoint: string;
180
+ });
181
+ }
175
182
 
176
- declare const VERSION = "2026.5.4";
183
+ declare const VERSION = "2026.5.6";
177
184
 
178
- export { AugurAPI, type AugurAPIError, AugurError, AuthenticationError, type CrossSiteAuthParams, type CrossSiteAuthResult, NotFoundError, RateLimitError, VERSION, ValidationError, authenticateUserForSite, createCrossSiteAuthenticator };
185
+ export { AugurAPI, type AugurAPIError, AugurError, AuthenticationError, type CrossSiteAuthParams, type CrossSiteAuthResult, InvalidArgumentError, NotFoundError, RateLimitError, VERSION, ValidationError, authenticateUserForSite, createCrossSiteAuthenticator };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as AugurAPI } from './client-C72Z8ANN.js';
2
- export { a as AgrInfoClient, b as AgrSiteClient, c as AgrWorkClient, d as AugurAPIConfig, e as AugurContext, f as AugurRequestConfig, g as AugurRequestError, h as AugurResponse, i as AvalaraClient, B as BaseResponse, j as BaseResponseSchema, k as Basecamp2Client, l as BrandFolderClient, C as CommerceClient, m as ContextCreationError, n as CustomersClient, D as DiscoveryEndpoint, E as EndpointSearchResult, G as GregorovichClient, H as HealthCheckData, o as HealthCheckDataSchema, I as ItemsClient, J as JoomlaClient, L as LegacyClient, p as LogisticsClient, N as NexusClient, O as OpenSearchClient, q as OrdersClient, P as P21ApisClient, r as P21CoreClient, s as P21PimClient, t as P21SismClient, u as PaginationParamsSchema, v as PaymentsClient, w as PricingClient, R as RequestConfig, S as ServiceMap, x as ShippingClient, y as SlackClient, z as SmartyStreetsClient, U as UPSClient, V as VMIClient } from './client-C72Z8ANN.js';
1
+ import { A as AugurAPI } from './client-yZ3HRVgf.js';
2
+ export { a as AgrInfoClient, b as AgrSiteClient, c as AgrWorkClient, d as AugurAPIConfig, e as AugurContext, f as AugurRequestConfig, g as AugurRequestError, h as AugurResponse, i as AvalaraClient, B as BaseResponse, j as BaseResponseSchema, k as Basecamp2Client, l as BrandFolderClient, C as CommerceClient, m as ContextCreationError, n as CustomersClient, D as DiscoveryEndpoint, E as EndpointSearchResult, G as GregorovichClient, H as HealthCheckData, o as HealthCheckDataSchema, I as ItemsClient, J as JoomlaClient, L as LegacyClient, p as LogisticsClient, N as NexusClient, O as OpenSearchClient, q as OrdersClient, P as P21ApisClient, r as P21CoreClient, s as P21PimClient, t as P21SismClient, u as PaginationParamsSchema, v as PaymentsClient, w as PricingClient, R as RequestConfig, S as ServiceMap, x as ShippingClient, y as SlackClient, z as SmartyStreetsClient, U as UPSClient, V as VMIClient } from './client-yZ3HRVgf.js';
3
3
  import 'valibot';
4
4
 
5
5
  /**
@@ -172,7 +172,14 @@ declare class RateLimitError extends AugurError {
172
172
  endpoint: string;
173
173
  });
174
174
  }
175
+ declare class InvalidArgumentError extends AugurError {
176
+ constructor(params: {
177
+ message: string;
178
+ service: string;
179
+ endpoint: string;
180
+ });
181
+ }
175
182
 
176
- declare const VERSION = "2026.5.4";
183
+ declare const VERSION = "2026.5.6";
177
184
 
178
- export { AugurAPI, type AugurAPIError, AugurError, AuthenticationError, type CrossSiteAuthParams, type CrossSiteAuthResult, NotFoundError, RateLimitError, VERSION, ValidationError, authenticateUserForSite, createCrossSiteAuthenticator };
185
+ export { AugurAPI, type AugurAPIError, AugurError, AuthenticationError, type CrossSiteAuthParams, type CrossSiteAuthResult, InvalidArgumentError, NotFoundError, RateLimitError, VERSION, ValidationError, authenticateUserForSite, createCrossSiteAuthenticator };
package/dist/index.js CHANGED
@@ -45,6 +45,7 @@ __export(index_exports, {
45
45
  CustomersClient: () => CustomersClient,
46
46
  GregorovichClient: () => GregorovichClient,
47
47
  HealthCheckDataSchema: () => HealthCheckDataSchema,
48
+ InvalidArgumentError: () => InvalidArgumentError,
48
49
  ItemsClient: () => ItemsClient,
49
50
  JoomlaClient: () => JoomlaClient,
50
51
  LegacyClient: () => LegacyClient,
@@ -184,6 +185,15 @@ var RateLimitError = class extends AugurError {
184
185
  });
185
186
  }
186
187
  };
188
+ var InvalidArgumentError = class extends AugurError {
189
+ constructor(params) {
190
+ super({
191
+ ...params,
192
+ code: "INVALID_ARGUMENT",
193
+ statusCode: 400
194
+ });
195
+ }
196
+ };
187
197
 
188
198
  // src/core/client.ts
189
199
  function generateRequestKey(method, url, params) {
@@ -506,6 +516,39 @@ var HTTPClient = class {
506
516
  }
507
517
  };
508
518
 
519
+ // src/core/path-validation.ts
520
+ var normalise = (name) => name.replace(/[-_]/g, "").toLowerCase();
521
+ var NUMERIC_EXACT = /* @__PURE__ */ new Set(["id", "linenumber"]);
522
+ var NUMERIC_SUFFIX_RE = /(?:id|uid|no|num|number)$/;
523
+ var STRING_OVERRIDES = /* @__PURE__ */ new Set(["siteid", "pono", "importuid", "scheduledimportmasteruid"]);
524
+ var isNumericPlaceholder = (placeholder) => {
525
+ const normalised = normalise(placeholder);
526
+ if (STRING_OVERRIDES.has(normalised)) return false;
527
+ if (NUMERIC_EXACT.has(normalised)) return true;
528
+ return NUMERIC_SUFFIX_RE.test(normalised);
529
+ };
530
+ var INTEGER_RE = /^-?\d+$/;
531
+ var validatePathSegment = (pathTemplate, placeholder, value) => {
532
+ const isNumeric = isNumericPlaceholder(placeholder);
533
+ if (isNumeric) {
534
+ if (!INTEGER_RE.test(value)) {
535
+ throw new InvalidArgumentError({
536
+ message: `Invalid path parameter '${placeholder}': expected an integer, received ${JSON.stringify(value)}`,
537
+ service: "http-client",
538
+ endpoint: pathTemplate
539
+ });
540
+ }
541
+ return;
542
+ }
543
+ if (value === "") {
544
+ throw new InvalidArgumentError({
545
+ message: `Invalid path parameter '${placeholder}': expected a non-empty string, received ${JSON.stringify(value)}`,
546
+ service: "http-client",
547
+ endpoint: pathTemplate
548
+ });
549
+ }
550
+ };
551
+
509
552
  // src/core/schemas.ts
510
553
  var v = __toESM(require("valibot"));
511
554
  var logNormalizationWarning = (message) => {
@@ -1053,16 +1096,19 @@ Provided parameters: ${JSON.stringify(params, null, 2)}`;
1053
1096
  if (!pathParams) {
1054
1097
  return pathTemplate;
1055
1098
  }
1056
- const normalise = (s) => s.replace(/[-_]/g, "").toLowerCase();
1099
+ const normalise2 = (s) => s.replace(/[-_]/g, "").toLowerCase();
1057
1100
  let path = pathTemplate;
1058
1101
  for (const [key, value] of Object.entries(pathParams)) {
1102
+ const stringValue = String(value);
1059
1103
  if (path.includes(`{${key}}`)) {
1060
- path = path.replace(`{${key}}`, String(value));
1104
+ validatePathSegment(pathTemplate, key, stringValue);
1105
+ path = path.replace(`{${key}}`, stringValue);
1061
1106
  } else {
1062
- const normKey = normalise(key);
1107
+ const normKey = normalise2(key);
1063
1108
  path = path.replace(/\{([^}]+)\}/g, (match, placeholder) => {
1064
- if (normalise(placeholder) === normKey) {
1065
- return String(value);
1109
+ if (normalise2(placeholder) === normKey) {
1110
+ validatePathSegment(pathTemplate, placeholder, stringValue);
1111
+ return stringValue;
1066
1112
  }
1067
1113
  return match;
1068
1114
  });
@@ -4301,6 +4347,16 @@ var BrandsDataSchema = v11.looseObject({
4301
4347
  processCd: v11.optional(v11.number()),
4302
4348
  contentId: v11.optional(v11.nullable(v11.number()))
4303
4349
  });
4350
+ var BrandsItemsDataSchema = v11.looseObject({
4351
+ brandsXItemsUid: v11.optional(v11.number()),
4352
+ brandsUid: v11.optional(v11.number()),
4353
+ invMastUid: v11.optional(v11.number()),
4354
+ dateCreated: v11.optional(v11.string()),
4355
+ dateLastModified: v11.optional(v11.string()),
4356
+ updateCd: v11.optional(v11.number()),
4357
+ statusCd: v11.optional(v11.number()),
4358
+ processCd: v11.optional(v11.number())
4359
+ });
4304
4360
  var InvLocDataSchema = v11.looseObject({
4305
4361
  companyId: v11.optional(v11.string()),
4306
4362
  locationId: v11.optional(v11.number()),
@@ -4761,6 +4817,54 @@ var endpoints6 = [
4761
4817
  responseSchema: PassthroughDataSchema6,
4762
4818
  responseType: "passthrough"
4763
4819
  },
4820
+ {
4821
+ method: "POST",
4822
+ path: "/brands/{brandsUid}/items",
4823
+ chain: "brands.items",
4824
+ action: "create",
4825
+ aliases: [],
4826
+ pathParams: ["brandsUid"],
4827
+ queryParams: [],
4828
+ edgeCache: false,
4829
+ responseSchema: BrandsItemsDataSchema,
4830
+ responseType: "object"
4831
+ },
4832
+ {
4833
+ method: "GET",
4834
+ path: "/brands/{brandsUid}/items/{brandsXItemsUid}",
4835
+ chain: "brands.items",
4836
+ action: "get",
4837
+ aliases: [],
4838
+ pathParams: ["brandsUid", "brandsXItemsUid"],
4839
+ queryParams: [],
4840
+ edgeCache: true,
4841
+ responseSchema: BrandsItemsDataSchema,
4842
+ responseType: "object"
4843
+ },
4844
+ {
4845
+ method: "PUT",
4846
+ path: "/brands/{brandsUid}/items/{brandsXItemsUid}",
4847
+ chain: "brands.items",
4848
+ action: "update",
4849
+ aliases: [],
4850
+ pathParams: ["brandsUid", "brandsXItemsUid"],
4851
+ queryParams: [],
4852
+ edgeCache: false,
4853
+ responseSchema: BrandsItemsDataSchema,
4854
+ responseType: "object"
4855
+ },
4856
+ {
4857
+ method: "DELETE",
4858
+ path: "/brands/{brandsUid}/items/{brandsXItemsUid}",
4859
+ chain: "brands.items",
4860
+ action: "delete",
4861
+ aliases: [],
4862
+ pathParams: ["brandsUid", "brandsXItemsUid"],
4863
+ queryParams: [],
4864
+ edgeCache: false,
4865
+ responseSchema: BrandsItemsDataSchema,
4866
+ responseType: "object"
4867
+ },
4764
4868
  {
4765
4869
  method: "GET",
4766
4870
  path: "/categories/lookup",
@@ -14218,7 +14322,7 @@ function createCrossSiteAuthenticator(augurInfoToken) {
14218
14322
  }
14219
14323
 
14220
14324
  // src/index.ts
14221
- var VERSION = "2026.5.4";
14325
+ var VERSION = "2026.5.6";
14222
14326
  // Annotate the CommonJS export names for ESM import in node:
14223
14327
  0 && (module.exports = {
14224
14328
  AgrInfoClient,
@@ -14236,6 +14340,7 @@ var VERSION = "2026.5.4";
14236
14340
  CustomersClient,
14237
14341
  GregorovichClient,
14238
14342
  HealthCheckDataSchema,
14343
+ InvalidArgumentError,
14239
14344
  ItemsClient,
14240
14345
  JoomlaClient,
14241
14346
  LegacyClient,