@inferencebureau/apps-sdk 0.16.10 → 0.16.11

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +58 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -236,6 +236,64 @@ export interface ShopifyInstallSettings {
236
236
  * compare product bundles and their discounts". Required once an extension defines tools (at most 256 tokens).
237
237
  */
238
238
  sidekickSummary?: string;
239
+ /**
240
+ * The app's own metafield definitions, by owner (`product`, `variant`, `collection`, `customer`, `order`, `shop`, …)
241
+ * and key, in the `$app` namespace. Released to every store the app is on.
242
+ */
243
+ metafields?: Record<string, Record<string, ShopifyMetafieldDefinition>>;
244
+ /** The app's own metaobject definitions, by type (`$app:<type>` in references). Released to every store the app is on. */
245
+ metaobjects?: Record<string, ShopifyMetaobjectDefinition>;
246
+ }
247
+ /** Shopify's validation names and values, e.g. `{ min: "1", max: "5" }` or `{ choices: ["S", "M", "L"] }`. */
248
+ export type ShopifyValidations = Record<string, string | number | boolean | string[]>;
249
+ export interface ShopifyMetafieldDefinition {
250
+ /** A metafield type, e.g. `single_line_text_field`, `rating` or `metaobject_reference<$app:review>`. Can't change later. */
251
+ type: string;
252
+ /** The name the admin shows; the key when left out. */
253
+ name?: string;
254
+ description?: string;
255
+ validations?: ShopifyValidations;
256
+ access?: {
257
+ admin?: "merchant_read" | "merchant_read_write";
258
+ storefront?: "none" | "public_read";
259
+ customerAccount?: "none" | "read" | "read_write";
260
+ };
261
+ capabilities?: {
262
+ adminFilterable?: boolean;
263
+ uniqueValues?: boolean;
264
+ analyticsQueryable?: boolean;
265
+ cartToOrderCopyable?: boolean;
266
+ };
267
+ }
268
+ export interface ShopifyMetaobjectField {
269
+ type: string;
270
+ name?: string;
271
+ description?: string;
272
+ required?: boolean;
273
+ validations?: ShopifyValidations;
274
+ capabilities?: {
275
+ adminFilterable?: boolean;
276
+ };
277
+ }
278
+ export interface ShopifyMetaobjectDefinition {
279
+ /** The name the admin shows; the type when left out. */
280
+ name?: string;
281
+ description?: string;
282
+ /** The field whose value names an entry in the admin. */
283
+ displayNameField?: string;
284
+ /** Each field by key: its type, or the type with more. */
285
+ fields: Record<string, string | ShopifyMetaobjectField>;
286
+ access?: {
287
+ admin?: "merchant_read" | "merchant_read_write";
288
+ storefront?: "none" | "public_read";
289
+ };
290
+ capabilities?: {
291
+ publishable?: boolean;
292
+ translatable?: boolean;
293
+ renderable?: boolean;
294
+ renderableMetaTitleField?: string;
295
+ renderableMetaDescriptionField?: string;
296
+ };
239
297
  }
240
298
  export interface WebhookSetting {
241
299
  /** A Shopify webhook topic, e.g. orders/create. The app's scopes must allow it. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inferencebureau/apps-sdk",
3
- "version": "0.16.10",
3
+ "version": "0.16.11",
4
4
  "description": "The SDK an Inference Bureau app's code imports: action helpers, metadata types, the records API client, React hooks with AutoTable and AutoForm, and a test harness for its actions.",
5
5
  "license": "UNLICENSED",
6
6
  "keywords": [