@artisan-commerce/types 0.14.0-canary.37 → 0.14.0-canary.39

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 +10 -224
  2. package/package.json +2 -8
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
  *
@@ -902,6 +714,8 @@ interface BillTotalCategory {
902
714
  total: number;
903
715
  /** discounts shopping cart */
904
716
  discounts: Discount[];
717
+ /** Taxes shopping cart */
718
+ taxes: PriceCategoryTax[];
905
719
  }
906
720
  /**
907
721
  * Representation of shopping cart discount.
@@ -942,20 +756,6 @@ interface CartTotals {
942
756
  /** Cart totals shipping cost */
943
757
  shippingCost: number;
944
758
  }
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
759
 
960
760
  /**
961
761
  * Representation of a Commerce Product.
@@ -1373,20 +1173,6 @@ interface Award {
1373
1173
  * @since 0.1.0
1374
1174
  */
1375
1175
  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
1176
  /**
1391
1177
  * The possible values of the benefit type.
1392
1178
  *
@@ -3474,4 +3260,4 @@ interface CardInscription {
3474
3260
  createdAt?: string;
3475
3261
  }
3476
3262
 
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 };
3263
+ 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,7 +1,7 @@
1
1
  {
2
2
  "name": "@artisan-commerce/types",
3
3
  "description": "Artisn's types and interfaces library",
4
- "version": "0.14.0-canary.37",
4
+ "version": "0.14.0-canary.39",
5
5
  "types": "./dist/bundle.d.ts",
6
6
  "files": [
7
7
  "dist"
@@ -23,13 +23,7 @@
23
23
  },
24
24
  "author": "Luis Eduardo Andrade",
25
25
  "license": "MIT",
26
- "devDependencies": {
27
- "@react-native-firebase/app": "^12.8.0",
28
- "@react-native-firebase/auth": "^12.8.0",
29
- "@react-native-firebase/firestore": "^12.8.0",
30
- "firebase": "^8.1.1"
31
- },
32
- "gitHead": "edb3b09a6fcccfbf5e1112ec9bd62e6814686bc4",
26
+ "gitHead": "0181e85a77db03d68cd7be1c1c85cc1488f14da7",
33
27
  "nx": {
34
28
  "targets": {
35
29
  "build": {