@thefittingroom/sdk 0.0.1-alpha.10
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/.env.dev +14 -0
- package/.env.example +12 -0
- package/.env.prod +14 -0
- package/dist/esm/api/fetcher.d.ts +9 -0
- package/dist/esm/api/requests.d.ts +155 -0
- package/dist/esm/api/responses.d.ts +119 -0
- package/dist/esm/api/shop.d.ts +22 -0
- package/dist/esm/api/utils.d.ts +1 -0
- package/dist/esm/firebase/firebase-error.d.ts +2 -0
- package/dist/esm/firebase/firebase-user.d.ts +18 -0
- package/dist/esm/firebase/firebase.d.ts +15 -0
- package/dist/esm/helpers/async.d.ts +1 -0
- package/dist/esm/helpers/errors.d.ts +28 -0
- package/dist/esm/index.d.ts +6 -0
- package/dist/esm/index.js +23011 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.min.js +3169 -0
- package/dist/esm/index.min.js.map +1 -0
- package/dist/esm/types/index.d.ts +48 -0
- package/package.json +75 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export type TryOnFrames = string[];
|
|
2
|
+
export declare enum AvatarState {
|
|
3
|
+
NOT_CREATED = "NOT_CREATED",
|
|
4
|
+
CREATED = "CREATED",
|
|
5
|
+
PENDING = "PENDING"
|
|
6
|
+
}
|
|
7
|
+
export type FirestoreColorwaySizeAsset = {
|
|
8
|
+
id: number;
|
|
9
|
+
size_id: number;
|
|
10
|
+
style_id: number;
|
|
11
|
+
colorway_id: number;
|
|
12
|
+
colorway_name: string;
|
|
13
|
+
sku: string;
|
|
14
|
+
};
|
|
15
|
+
export type FirestoreGarmentMeasurement = {
|
|
16
|
+
id: number;
|
|
17
|
+
garment_measurement_location: string;
|
|
18
|
+
tolerance: number;
|
|
19
|
+
value: number;
|
|
20
|
+
};
|
|
21
|
+
export type FirestoreSize = {
|
|
22
|
+
id: number;
|
|
23
|
+
size: string;
|
|
24
|
+
label: string;
|
|
25
|
+
size_system: string;
|
|
26
|
+
size_value_id: string;
|
|
27
|
+
garment_measurements: Map<string, FirestoreGarmentMeasurement>;
|
|
28
|
+
};
|
|
29
|
+
export type FirestoreColorway = {
|
|
30
|
+
id: number;
|
|
31
|
+
name: string;
|
|
32
|
+
};
|
|
33
|
+
export type FirestoreStyle = {
|
|
34
|
+
id: number;
|
|
35
|
+
brand_id: number;
|
|
36
|
+
brand_style_id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
description: string;
|
|
39
|
+
garment_category: string;
|
|
40
|
+
is_published: boolean;
|
|
41
|
+
sale_type: string;
|
|
42
|
+
colorways: {
|
|
43
|
+
[key: number]: FirestoreColorway;
|
|
44
|
+
};
|
|
45
|
+
sizes: {
|
|
46
|
+
[key: number]: FirestoreSize;
|
|
47
|
+
};
|
|
48
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@thefittingroom/sdk",
|
|
3
|
+
"version": "0.0.1-alpha.10",
|
|
4
|
+
"description": "the fitting room SDK",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/esm/index.js",
|
|
7
|
+
"access": "public",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build:rollup": "rm -rf dist && rollup --config",
|
|
10
|
+
"dev:rollup": "rm -rf dist && rollup --config -w",
|
|
11
|
+
"build": "rm -rf dist && rollup --config",
|
|
12
|
+
"build:main": "tsc -p tsconfig.json",
|
|
13
|
+
"build:module": "tsc -p tsconfig.module.json",
|
|
14
|
+
"fix": "run-s fix:*",
|
|
15
|
+
"fix:prettier": "prettier \"src/**/*.ts\" --write",
|
|
16
|
+
"fix:lint": "eslint src --ext .ts --fix",
|
|
17
|
+
"test": "run-s build test:*",
|
|
18
|
+
"test:lint": "eslint src --ext .ts",
|
|
19
|
+
"test:prettier": "prettier \"src/**/*.ts\" --list-different",
|
|
20
|
+
"test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.ts}\"",
|
|
21
|
+
"test:unit": "nyc --silent ava",
|
|
22
|
+
"check-cli": "run-s test diff-integration-tests check-integration-tests",
|
|
23
|
+
"check-integration-tests": "run-s check-integration-test:*",
|
|
24
|
+
"diff-integration-tests": "mkdir -p diff && rm -rf diff/test && cp -r test diff/test && rm -rf diff/test/test-*/.git && cd diff && git init --quiet && git add -A && git commit --quiet --no-verify --allow-empty -m 'WIP' && echo '\\n\\nCommitted most recent integration test output in the \"diff\" directory. Review the changes with \"cd diff && git diff HEAD\" or your preferred git diff viewer.'",
|
|
25
|
+
"watch:build": "tsc -p tsconfig.json -w",
|
|
26
|
+
"watch:test": "nyc --silent ava --watch",
|
|
27
|
+
"doc": "run-s doc:html && open-cli build/docs/index.html",
|
|
28
|
+
"doc:html": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out build/docs",
|
|
29
|
+
"doc:json": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json build/docs/typedoc.json",
|
|
30
|
+
"doc:publish": "gh-pages -m \"[ci skip] Updates\" -d build/docs",
|
|
31
|
+
"version": "standard-version",
|
|
32
|
+
"reset-hard": "git clean -dfx && git reset --hard && yarn",
|
|
33
|
+
"prepare-release": "run-s reset-hard test cov:check doc:html version doc:publish",
|
|
34
|
+
"postinstall": "patch-package"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=10"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"firebase": "^9.10.0",
|
|
41
|
+
"patch-package": "^6.5.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@ava/typescript": "^1.1.1",
|
|
45
|
+
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
|
46
|
+
"@rollup/plugin-commonjs": "^22.0.2",
|
|
47
|
+
"@rollup/plugin-node-resolve": "^14.1.0",
|
|
48
|
+
"@rollup/plugin-typescript": "^8.5.0",
|
|
49
|
+
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^5.59.5",
|
|
51
|
+
"@typescript-eslint/parser": "^5.59.5",
|
|
52
|
+
"codecov": "^3.5.0",
|
|
53
|
+
"cspell": "^4.1.0",
|
|
54
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
55
|
+
"eslint": "^7.8.0",
|
|
56
|
+
"eslint-config-prettier": "^6.11.0",
|
|
57
|
+
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
58
|
+
"eslint-plugin-functional": "^3.0.2",
|
|
59
|
+
"eslint-plugin-import": "^2.22.0",
|
|
60
|
+
"gh-pages": "^3.1.0",
|
|
61
|
+
"live-server": "^1.2.2",
|
|
62
|
+
"npm-run-all": "^4.1.5",
|
|
63
|
+
"open-cli": "^7.2.0",
|
|
64
|
+
"prettier": "^2.8.8",
|
|
65
|
+
"rollup": "^2.79.1",
|
|
66
|
+
"rollup-plugin-dotenv": "^0.4.0",
|
|
67
|
+
"rollup-plugin-styles": "^4.0.0",
|
|
68
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
69
|
+
"standard-version": "^9.0.0",
|
|
70
|
+
"ts-node": "^9.0.0",
|
|
71
|
+
"tslib": "^2.4.0",
|
|
72
|
+
"typedoc": "^0.24.6",
|
|
73
|
+
"typescript": "^4.0.2"
|
|
74
|
+
}
|
|
75
|
+
}
|