@artisan-commerce/types 0.12.2-canary.0 → 0.12.2-canary.2

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/CHANGELOG.md CHANGED
@@ -3,6 +3,23 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ### [0.12.2-canary.2](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/types@0.12.2-canary.1...@artisan-commerce/types@0.12.2-canary.2) (2021-03-18)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **types:** update image type ([c461609](https://bitbucket.org/tradesystem/artisan_monorepo/commit/c461609e3aab757a4722d7a820a765a96588d94c))
12
+
13
+
14
+
15
+ ### [0.12.2-canary.1](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/types@0.12.2-canary.0...@artisan-commerce/types@0.12.2-canary.1) (2021-03-18)
16
+
17
+ **Note:** Version bump only for package @artisan-commerce/types
18
+
19
+
20
+
21
+
22
+
6
23
  ### [0.12.2-canary.0](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/types@0.12.1...@artisan-commerce/types@0.12.2-canary.0) (2021-03-12)
7
24
 
8
25
  **Note:** Version bump only for package @artisan-commerce/types
@@ -1,3 +1,12 @@
1
+ /**
2
+ * Representation of a Customer Account
3
+ *
4
+ * @interface Account
5
+ * @author Luis Eduardo Andrade
6
+ * @since 0.5.14
7
+ * @property {number} accountId artisan's account unique identifier.
8
+ * @property {string} name account's name.
9
+ */
1
10
  export interface Account {
2
11
  accountId: number;
3
12
  name: string;
@@ -1,35 +1,110 @@
1
1
  import firebase from "firebase";
2
+ /**
3
+ * The ArtisanApp orchestrate the connections of the app with the DB, server and its settings.
4
+ *
5
+ * @interface ArtisanApp
6
+ * @author Luis Eduardo Andrade
7
+ * @since 0.5.14
8
+ * @property {string} name app's name
9
+ * @property {string} apiURL artisan's account API URL
10
+ * @property {ArtisanSettings} settings artisan app settings configuration
11
+ */
2
12
  export interface ArtisanApp {
13
+ name: firebase.app.App["name"];
3
14
  apiURL: string;
15
+ settings: ArtisanSettings;
4
16
  __internals__: firebase.app.App;
5
17
  __instance__: typeof firebase;
6
- settings: ArtisanSettings;
7
- name: firebase.app.App["name"];
8
18
  }
19
+ /**
20
+ * Settings to configure the Artisan app.
21
+ *
22
+ * @interface ArtisanSettings
23
+ * @author Luis Eduardo Andrade
24
+ * @since 0.5.14
25
+ * @property {number} accountId artisan's account unique identifier
26
+ * @property {ArtisanPlatform} platform app's running on platform
27
+ * @property {string} projectId app's project id
28
+ * @property {string} apiKey app's API key
29
+ * @property {string} appId app's external app id
30
+ * @property {string} authDomain app's auth domain url
31
+ */
9
32
  export interface ArtisanSettings {
33
+ accountId?: number;
34
+ platform?: ArtisanPlatform;
10
35
  projectId: string;
11
36
  apiKey: string;
12
- authDomain: string;
13
37
  appId?: string;
14
- platform?: ArtisanPlatform;
15
- accountId?: number;
38
+ authDomain: string;
16
39
  }
40
+ /**
41
+ * Artisan app's allowed platforms to run on.
42
+ *
43
+ * @type ArtisanPlatform
44
+ * @author Luis Eduardo Andrade
45
+ * @since 0.5.14
46
+ */
47
+ export declare type ArtisanPlatform = "web" | "ios" | "android" | "windows" | "macos" | "call center";
48
+ /**
49
+ * Artisan's auth instance is the intance of the internal auth object.
50
+ *
51
+ * @type AritsanInstanceAuth
52
+ * @author Luis Eduardo Andrade
53
+ * @since 0.5.14
54
+ */
17
55
  export declare type AritsanInstanceAuth = typeof firebase.auth;
56
+ /**
57
+ * Artisan's auth object to handle providers authentication.
58
+ *
59
+ * @type ArtisanAuth
60
+ * @author Luis Eduardo Andrade
61
+ * @since 0.5.14
62
+ */
18
63
  export interface ArtisanAuth extends firebase.auth.Auth {
19
64
  }
65
+ /**
66
+ * Main artisan commerce filters.
67
+ *
68
+ * @interface ArtisanHints
69
+ * @author Luis Eduardo Andrade
70
+ * @since 0.5.14
71
+ * @property {string|number} accountId artisan's account unique identifier
72
+ * @property {string|number} vendorId vendor's id
73
+ * @property {string|number} catalogueId catalogue's id
74
+ * @property {number} storeId store's id
75
+ * @property {string|number} categoryId category's id
76
+ * @property {string|number} productId product's id
77
+ */
20
78
  export interface ArtisanHints {
21
79
  accountId: string | number;
22
80
  vendorId?: string | number;
23
- storeId?: number;
24
81
  catalogueId?: string | number;
82
+ storeId?: number;
25
83
  categoryId?: string | number;
26
84
  productId?: string | number;
27
85
  }
28
- export declare type ArtisanPlatform = "web" | "ios" | "android" | "windows" | "macos" | "call center";
86
+ /**
87
+ * Unrestricted allowed Artisan SDK rest api headers.
88
+ *
89
+ * @interface ArtisanHeaders
90
+ * @author Luis Eduardo Andrade
91
+ * @since 0.5.14
92
+ * @property {ArtisanPlatform} Platform app's running on platform
93
+ * @property {string|number} account account's id
94
+ */
29
95
  export interface ArtisanHeaders {
30
96
  Platform: ArtisanPlatform;
31
97
  account: string;
32
98
  }
99
+ /**
100
+ * Restricted allowed Artisan SDK rest api headers.
101
+ *
102
+ * @interface ArtisanRestrictedHeaders
103
+ * @extends ArtisanHeaders
104
+ * @author Luis Eduardo Andrade
105
+ * @since 0.5.14
106
+ * @property {ArtisanPlatform} Authorization app's authentication token
107
+ */
33
108
  export interface ArtisanRestrictedHeaders extends ArtisanHeaders {
34
109
  Authorization: string;
35
110
  }
@@ -1,4 +1,4 @@
1
- export interface Image {
1
+ export interface CDNImage {
2
2
  bucket?: string;
3
3
  cloudFrontUrl?: string;
4
4
  key?: string;
@@ -6,9 +6,11 @@ export interface Image {
6
6
  url: string;
7
7
  base64?: string;
8
8
  }
9
+ export declare type URLImage = string;
9
10
  export interface ImageManipulationConfig {
10
11
  width?: number;
11
12
  height?: number;
12
13
  fit?: "fill" | "cover" | "contain" | "inside" | "outside";
13
14
  toFormat?: "jpg" | "jpeg" | "png" | "svg";
14
15
  }
16
+ export declare type Image = CDNImage | URLImage;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@artisan-commerce/types",
3
3
  "description": "Artisan's types and interfaces library",
4
- "version": "0.12.2-canary.0",
4
+ "version": "0.12.2-canary.2",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
7
7
  "files": [
@@ -44,5 +44,5 @@
44
44
  "typescript": "^3.9.7",
45
45
  "webpack-bundle-analyzer": "^3.9.0"
46
46
  },
47
- "gitHead": "1776047e27a0b93ef9921a8d0d468bc9a0693e5b"
47
+ "gitHead": "ad89147223346d3d1db97d3fa3db50c80b4beb17"
48
48
  }