@artisan-commerce/types 0.14.0-canary.36 → 0.14.0-canary.38

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/bundle.d.ts +9 -225
  2. package/package.json +2 -13
package/dist/bundle.d.ts CHANGED
@@ -1,8 +1,3 @@
1
- import firebase from 'firebase';
2
- import { ReactNativeFirebase } from '@react-native-firebase/app';
3
- import authRN, { FirebaseAuthTypes } from '@react-native-firebase/auth';
4
- import { FirebaseFirestoreTypes } from '@react-native-firebase/firestore';
5
-
6
1
  /**
7
2
  * Representation of a Commerce Country.
8
3
  *
@@ -176,6 +171,13 @@ declare type BaseWeekDay = "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FR
176
171
  * @since 0.1.0
177
172
  */
178
173
  declare type AdditionalInfo = Record<string, any>;
174
+ /**
175
+ * Artisn app's allowed platforms to run on.
176
+ *
177
+ * @typedef ArtisnPlatform
178
+ * @since 0.1.0
179
+ */
180
+ declare type ArtisnPlatform = "web" | "ios" | "android" | "windows" | "macos" | "call center";
179
181
 
180
182
  /**
181
183
  * Representation of a image allocated in a CDN.
@@ -277,196 +279,6 @@ interface Account<T extends AdditionalInfo = AdditionalInfo> {
277
279
  additionalInfo?: T;
278
280
  }
279
281
 
280
- /**
281
- * The ArtisnApp controls the app connection with the DBs and its settings.
282
- *
283
- * @typedef ArtisnApp
284
- * @since 0.1.0
285
- */
286
- declare type ArtisnApp = ArtisnWebApp | ArtisnRNApp;
287
- /**
288
- * The ArtisnWebApp orchestrate the connections of the app with the DB, server
289
- * and its settings.
290
- *
291
- * @interface ArtisnWebApp
292
- * @since 0.1.0
293
- */
294
- interface ArtisnWebApp {
295
- /** App's name */
296
- name: firebase.app.App["name"];
297
- /** Artisn's account API URL */
298
- apiURL: string;
299
- /** Artisn app settings configuration, see {@link ArtisnWebSettings} */
300
- settings: ArtisnWebSettings;
301
- /** Internal configuration of App and databases */
302
- __internals__: firebase.app.App;
303
- /** ArtisnApp object internal instance */
304
- __instance__: typeof firebase;
305
- }
306
- /**
307
- * The ArtisnRNApp orchestrate the connections of the app with the DB, server
308
- * and its settings.
309
- *
310
- * @interface ArtisnRNApp
311
- * @since 0.1.0
312
- */
313
- interface ArtisnRNApp {
314
- /** App's name */
315
- name: ReactNativeFirebase.FirebaseApp["name"];
316
- /** Artisn's account API URL */
317
- apiURL: string;
318
- /** Artisn app settings configuration, see {@link ArtisnRNSettings} */
319
- settings: ArtisnRNSettings;
320
- /** Internal configuration of App and databases */
321
- __internals__: ReactNativeFirebase.FirebaseApp;
322
- /** ArtisnApp object internal instance */
323
- __instance__: ReactNativeFirebase.Module;
324
- }
325
- /**
326
- * Settings to configure the Artisn app.
327
- *
328
- * @interface ArtisnWebSettings
329
- * @since 0.1.0
330
- */
331
- interface ArtisnWebSettings {
332
- /** Artisn's account unique identifier */
333
- accountId?: number;
334
- /** Platform where the app is running, see {@link ArtisnPlatform} */
335
- platform?: ArtisnPlatform;
336
- /** App's project id */
337
- projectId: string;
338
- /** App's API key */
339
- apiKey: string;
340
- /** App's external app id */
341
- appId?: string;
342
- /** App's auth domain url */
343
- authDomain: string;
344
- }
345
- /**
346
- * Settings to configure the Artisn app react-native.
347
- *
348
- * @interface ArtisnRNSettings
349
- * @since 0.1.0
350
- */
351
- interface ArtisnRNSettings {
352
- /** Platform where the app is running, see {@link ArtisnPlatform} */
353
- platform: ArtisnPlatform;
354
- /** Artisn's account unique identifier */
355
- accountId?: number;
356
- }
357
- /**
358
- * Artisn app's allowed platforms to run on.
359
- *
360
- * @typedef ArtisnPlatform
361
- * @since 0.1.0
362
- */
363
- declare type ArtisnPlatform = "web" | "ios" | "android" | "windows" | "macos" | "call center";
364
- /**
365
- * Artisn's auth instance is the instance of the internal auth object.
366
- *
367
- * @typedef ArtisnWebAuthInstance
368
- * @since 0.1.0
369
- */
370
- declare type ArtisnWebAuthInstance = typeof firebase.auth;
371
- /**
372
- * Artisn's auth instance is the instance of the internal auth object for react
373
- * native.
374
- *
375
- * @typedef ArtisnRNAuthInstance
376
- * @since 0.1.0
377
- */
378
- declare type ArtisnRNAuthInstance = typeof authRN;
379
- /**
380
- * Artisn's auth object to handle providers authentication.
381
- *
382
- * @interface ArtisnWebAuth
383
- * @since 0.1.0
384
- * @extends {{@link firebase.auth.Auth}
385
- */
386
- interface ArtisnWebAuth extends firebase.auth.Auth {
387
- }
388
- /**
389
- * Artisn's auth object to handle providers authentication for react native.
390
- *
391
- * @interface ArtisnRNAuth
392
- * @since 0.1.0
393
- * @extends {{@link FirebaseAuthTypes.Module}
394
- */
395
- interface ArtisnRNAuth extends FirebaseAuthTypes.Module {
396
- }
397
- /**
398
- * Main artisn commerce filters.
399
- *
400
- * @interface ArtisnHints
401
- * @since 0.1.0
402
- */
403
- interface ArtisnHints {
404
- /** Artisn's account unique identifier */
405
- accountId: string | number;
406
- /** Artisn's vendor unique identifier */
407
- vendorId?: string | number;
408
- /** Artisn's catalogue unique identifier */
409
- catalogueId?: string | number;
410
- /** Artisn's store unique identifier */
411
- storeId?: number;
412
- /** Artisn's category unique identifier */
413
- categoryId?: string | number;
414
- /** Artisn's productId unique identifier */
415
- productId?: string | number;
416
- }
417
- /**
418
- * Unrestricted allowed Artisn SDK rest api headers.
419
- *
420
- * @interface ArtisnHeaders
421
- * @since 0.1.0
422
- */
423
- interface ArtisnHeaders {
424
- /** Platform where the app is running, see {@link ArtisnPlatform} */
425
- Platform: ArtisnPlatform;
426
- /** Artisn's account unique identifier */
427
- account: string;
428
- }
429
- /**
430
- * Restricted allowed Artisn SDK rest api headers.
431
- *
432
- * @interface ArtisnRestrictedHeaders
433
- * @since 0.1.0
434
- * @extends {{@link ArtisnHeaders}
435
- */
436
- interface ArtisnRestrictedHeaders extends ArtisnHeaders {
437
- /** Authorization app's authentication token */
438
- Authorization: string;
439
- }
440
-
441
- /**
442
- * Artisn database object.
443
- *
444
- * @typedef ArtisnDB
445
- * @since 0.1.0
446
- */
447
- declare type ArtisnDB = firebase.firestore.Firestore | FirebaseFirestoreTypes.Module;
448
- /**
449
- * Artisn database document data object.
450
- *
451
- * @typedef ArtisnDBDocumentData
452
- * @since 0.1.0
453
- */
454
- declare type ArtisnDBDocumentData = firebase.firestore.DocumentData | FirebaseFirestoreTypes.DocumentData;
455
- /**
456
- * The current state of a node from the Artisn DB.
457
- *
458
- * @typedef ArtisnDBQueryDocumentSnapshot
459
- * @since 0.1.0
460
- */
461
- declare type ArtisnDBQueryDocumentSnapshot<T = ArtisnDBDocumentData> = firebase.firestore.QueryDocumentSnapshot<T> | FirebaseFirestoreTypes.QueryDocumentSnapshot<T>;
462
- /**
463
- * An Artisn DB collection of nodes.
464
- *
465
- * @typedef ArtisnDBCollectionReference
466
- * @since 0.1.0
467
- */
468
- declare type ArtisnDBCollectionReference<T = ArtisnDBDocumentData> = firebase.firestore.CollectionReference<T> | FirebaseFirestoreTypes.CollectionReference<T>;
469
-
470
282
  /**
471
283
  * Representation of a Commerce Category.
472
284
  *
@@ -942,20 +754,6 @@ interface CartTotals {
942
754
  /** Cart totals shipping cost */
943
755
  shippingCost: number;
944
756
  }
945
- /**
946
- * A shopping cart DB node from a user.
947
- *
948
- * @typedef ShoppingCartNode
949
- * @since 0.1.0
950
- */
951
- declare type ShoppingCartNode = ArtisnDBQueryDocumentSnapshot<ArtisnDBDocumentData>;
952
- /**
953
- * The complete collection of shopping carts DB nodes from a user.
954
- *
955
- * @typedef ShoppingCartNodes
956
- * @since 0.1.0
957
- */
958
- declare type ShoppingCartNodes = ArtisnDBCollectionReference<ArtisnDBDocumentData>;
959
757
 
960
758
  /**
961
759
  * Representation of a Commerce Product.
@@ -1373,20 +1171,6 @@ interface Award {
1373
1171
  * @since 0.1.0
1374
1172
  */
1375
1173
  declare type ShoppingCartBenefits = Benefit[];
1376
- /**
1377
- * A benefit DB node from a user.
1378
- *
1379
- * @typedef BenefitsByUserNode
1380
- * @since 0.1.0
1381
- */
1382
- declare type BenefitsByUserNode = ArtisnDBQueryDocumentSnapshot<ArtisnDBDocumentData>;
1383
- /**
1384
- * The complete collection of benefits DB nodes from a user.
1385
- *
1386
- * @typedef BenefitsByUserNodes
1387
- * @since 0.1.0
1388
- */
1389
- declare type BenefitsByUserNodes = ArtisnDBCollectionReference<ArtisnDBDocumentData>;
1390
1174
  /**
1391
1175
  * The possible values of the benefit type.
1392
1176
  *
@@ -2271,7 +2055,7 @@ interface BaseUser<T extends AdditionalInfo = AdditionalInfo> {
2271
2055
  /** User's birthdate, e.g: 1991-05-02 */
2272
2056
  birthdate?: string;
2273
2057
  /** The vendor which the user was created */
2274
- vendorId?: number;
2058
+ vendorId?: Vendor["id"];
2275
2059
  /** The platform where the user was generated */
2276
2060
  origin?: string;
2277
2061
  /** User's document */
@@ -3474,4 +3258,4 @@ interface CardInscription {
3474
3258
  createdAt?: string;
3475
3259
  }
3476
3260
 
3477
- export { ARDocumentType, Account, AdditionalInfo, Alert, Allocation, ArtisnApp, ArtisnDB, ArtisnDBCollectionReference, ArtisnDBDocumentData, ArtisnDBQueryDocumentSnapshot, ArtisnHeaders, ArtisnHints, ArtisnParams, ArtisnPlatform, ArtisnQuery, ArtisnRNApp, ArtisnRNAuth, ArtisnRNAuthInstance, ArtisnRNSettings, ArtisnRequest, ArtisnRequestBody, ArtisnRequestHeaders, ArtisnRequestMethod, ArtisnRestrictedHeaders, ArtisnWebApp, ArtisnWebAuth, ArtisnWebAuthInstance, ArtisnWebSettings, Award, BODocumentType, BRDocumentType, Banner, BannerBenefits, BannerCoupon, BannerImage, BannerScope, BannerType, BaseBillingData, BaseField, BaseLivingPlace, BaseOrder, BasePaymentMethod, BaseProduct, BaseShippingAddress, BaseUser, BaseWeekDay, Benefit, BenefitData, BenefitTypes, BenefitsByUserNode, BenefitsByUserNodes, BillTotal, BillTotalCategory, BillingData, CDNImage, CLDocumentType, CODocumentType, CardInscription, CardName, CartProduct, CartProductAnswer, CartProductQuestion, CartStore, CartTotals, Catalogue, Category, CategoryWithProducts, Code, CommonDocumentType, Country, CountryCode, CountryCurrency, CountrySummary, Coupon, CouponCategory, CouponType, CreditCardMapping, CurrencyCodes, DayOfWeek, Days, Delivery, DeliveryTimeUnit, Discount, DocumentType, ECDocumentType, Field, FieldRecord, Gender, GenericStoreLocation, Image, ImageFit, ImageManipulationConfig, ImageToFormat, Injection, InjectionDetail, IntegrationMessage, Issue, IssueAdditionalInfo, IssueHistory, LivingPlace, LivingPlaceToSave, MaritalStatus, Message, MetadataShipping, NewShippingAddress, Notification, NotificationAdditionalInfo, NotificationExtraData, NotificationListItem, NotificationPriority, NotificationStep, NotificationStore, NotificationUser, NotificationVendor, Objectify, OperatorInformation, Order, OrderBillProduct, OrderBillProductAdditionalInfo, OrderBillTotal, OrderCommonFields, OrderDetailShippingCost, OrderDetails, OrderPaymentMethod, OrderProduct, OrderProductAdditionalInfo, OrderProductAttributes, OrderProductBillTotal, OrderProductImage, OrderProductPriceCategory, OrderRetry, OrderRetryPaymentMethod, OrderShoppingCart, OrderStatus, OrderStep, OrderStepAdditionalInfo, OrderStepAdditionalInfoGroup, OrderStore, OrderStoreAdditionalInfo, OrderStoreDelivery, OrderUser, PEDocumentType, PYDocumentType, PaymentMethod, PaymentMethodByOrder, PaymentMethodName, PaymentProvider, PaymentStatus, Phone, PriceCategory, PriceCategoryTax, PriceCategoryType, Product, ProductAnswer, ProductAttributes, ProductCoupon, ProductDetails, ProductPrices, ProductQuestion, ProductStatus, ProductType, RandomImageConfig, ReadValue, Rule, Schedule, Service, Settings, ShippingAddress, ShippingCost, ShippingCostTax, ShoppingCart, ShoppingCartBenefits, ShoppingCartNode, ShoppingCartNodes, Status, StepCategory, StepCode, StepNotification, StepWorkflow, StepWorkflowAdditionalInfo, StepWorkflowGroup, Store, StoreCoupon, StoreCouponDetail, StoreLocation, StorePolygons, Suborder, TaxCalculation, TaxCalculations, TaxType, Token, TransitionWorkflow, URLImage, USDocumentType, UYDocumentType, UpdatedShippingAddress, User, UserCountry, UserSettings, UserType, VEDocumentType, Vendor, Wallet, WebhookWorkflow, Workflow, ZipCodeField };
3261
+ export { ARDocumentType, Account, AdditionalInfo, Alert, Allocation, ArtisnParams, ArtisnPlatform, ArtisnQuery, ArtisnRequest, ArtisnRequestBody, ArtisnRequestHeaders, ArtisnRequestMethod, Award, BODocumentType, BRDocumentType, Banner, BannerBenefits, BannerCoupon, BannerImage, BannerScope, BannerType, BaseBillingData, BaseField, BaseLivingPlace, BaseOrder, BasePaymentMethod, BaseProduct, BaseShippingAddress, BaseUser, BaseWeekDay, Benefit, BenefitData, BenefitTypes, BillTotal, BillTotalCategory, BillingData, CDNImage, CLDocumentType, CODocumentType, CardInscription, CardName, CartProduct, CartProductAnswer, CartProductQuestion, CartStore, CartTotals, Catalogue, Category, CategoryWithProducts, Code, CommonDocumentType, Country, CountryCode, CountryCurrency, CountrySummary, Coupon, CouponCategory, CouponType, CreditCardMapping, CurrencyCodes, DayOfWeek, Days, Delivery, DeliveryTimeUnit, Discount, DocumentType, ECDocumentType, Field, FieldRecord, Gender, GenericStoreLocation, Image, ImageFit, ImageManipulationConfig, ImageToFormat, Injection, InjectionDetail, IntegrationMessage, Issue, IssueAdditionalInfo, IssueHistory, LivingPlace, LivingPlaceToSave, MaritalStatus, Message, MetadataShipping, NewShippingAddress, Notification, NotificationAdditionalInfo, NotificationExtraData, NotificationListItem, NotificationPriority, NotificationStep, NotificationStore, NotificationUser, NotificationVendor, Objectify, OperatorInformation, Order, OrderBillProduct, OrderBillProductAdditionalInfo, OrderBillTotal, OrderCommonFields, OrderDetailShippingCost, OrderDetails, OrderPaymentMethod, OrderProduct, OrderProductAdditionalInfo, OrderProductAttributes, OrderProductBillTotal, OrderProductImage, OrderProductPriceCategory, OrderRetry, OrderRetryPaymentMethod, OrderShoppingCart, OrderStatus, OrderStep, OrderStepAdditionalInfo, OrderStepAdditionalInfoGroup, OrderStore, OrderStoreAdditionalInfo, OrderStoreDelivery, OrderUser, PEDocumentType, PYDocumentType, PaymentMethod, PaymentMethodByOrder, PaymentMethodName, PaymentProvider, PaymentStatus, Phone, PriceCategory, PriceCategoryTax, PriceCategoryType, Product, ProductAnswer, ProductAttributes, ProductCoupon, ProductDetails, ProductPrices, ProductQuestion, ProductStatus, ProductType, RandomImageConfig, ReadValue, Rule, Schedule, Service, Settings, ShippingAddress, ShippingCost, ShippingCostTax, ShoppingCart, ShoppingCartBenefits, Status, StepCategory, StepCode, StepNotification, StepWorkflow, StepWorkflowAdditionalInfo, StepWorkflowGroup, Store, StoreCoupon, StoreCouponDetail, StoreLocation, StorePolygons, Suborder, TaxCalculation, TaxCalculations, TaxType, Token, TransitionWorkflow, URLImage, USDocumentType, UYDocumentType, UpdatedShippingAddress, User, UserCountry, UserSettings, UserType, VEDocumentType, Vendor, Wallet, WebhookWorkflow, Workflow, ZipCodeField };
package/package.json CHANGED
@@ -1,17 +1,12 @@
1
1
  {
2
2
  "name": "@artisan-commerce/types",
3
3
  "description": "Artisn's types and interfaces library",
4
- "version": "0.14.0-canary.36",
5
- "main": "./dist/bundle.d.ts",
6
- "module": "./dist/bundle.d.ts",
4
+ "version": "0.14.0-canary.38",
7
5
  "types": "./dist/bundle.d.ts",
8
6
  "files": [
9
7
  "dist"
10
8
  ],
11
9
  "sideEffects": false,
12
- "exports": {
13
- "default": "./dist/bundle.esm.js"
14
- },
15
10
  "scripts": {
16
11
  "compile": "rollup -c",
17
12
  "dev": "yarn compile -w",
@@ -28,13 +23,7 @@
28
23
  },
29
24
  "author": "Luis Eduardo Andrade",
30
25
  "license": "MIT",
31
- "devDependencies": {
32
- "@react-native-firebase/app": "^12.8.0",
33
- "@react-native-firebase/auth": "^12.8.0",
34
- "@react-native-firebase/firestore": "^12.8.0",
35
- "firebase": "^8.1.1"
36
- },
37
- "gitHead": "cc68af5a1e959069cee7b835d367f319db416241",
26
+ "gitHead": "3ae7512fd09b7e59227b159b7e0e3853964a03c0",
38
27
  "nx": {
39
28
  "targets": {
40
29
  "build": {