Skip to content

Commit

Permalink
Merge pull request #493 from unchainedshop/fix-types
Browse files Browse the repository at this point in the history
Fix types
  • Loading branch information
pozylon authored Aug 15, 2022
2 parents 286dc32 + 1437329 commit 554f063
Show file tree
Hide file tree
Showing 187 changed files with 2,461 additions and 2,266 deletions.
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ public/*
docs.json
_multiconfig.yml
.cache
types
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"@mdx-js/react": "^1.6.22",
"@unchainedshop/gatsby-theme-apollo-docs": "^4.3.21",
"@unchainedshop/types": "^1.2.5",
"@unchainedshop/types": "1.x",
"gatsby": "2.24.47",
"gatsby-telemetry": "^2.12.0",
"react": "16.13.1",
Expand Down
4 changes: 2 additions & 2 deletions docs/source/advanced-config/entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ Status:
}
],
"plan": {
"billingInterval": "DAY",
"billingInterval": "DAYS",
"billingIntervalCount": 1,
"usageCalculationType": "METERED",
"trialInterval": "DAY",
"trialInterval": "DAYS",
"trialIntervalCount": 1
},
"bundleItems": [
Expand Down
13 changes: 13 additions & 0 deletions examples/kitchensink/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"env": {
"node": true
}
}
906 changes: 848 additions & 58 deletions examples/kitchensink/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/kitchensink/login-with-single-sign-on.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const loginWithSingleSignOn = async (remoteToken, unchainedAPI: Context) => {
'mutation consume($token: ID!) { controlConsumeSingleSignOnToken(token: $token) { domain } }',
}),
});
const json = await result.json();
const json: any = await result.json();
if (json?.errors?.length > 0) {
throw new Error(json.errors[0].message);
}
Expand Down
13 changes: 3 additions & 10 deletions examples/kitchensink/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"@unchainedshop/plugins": "1.x",
"@unchainedshop/types": "1.x",
"apollo-server-express": "^2.25.3",
"bcrypt": "^5.0.1",
"bip32": "^3.0.1",
"bitcoinjs-lib": "^6.0.1",
"body-parser": "^1.20.0",
Expand All @@ -53,30 +52,24 @@
"event-iterator": "^2.0.0",
"express": "^4.18.1",
"graphql": "^15.8.0",
"graphql-scalars": "^1.17.0",
"graphql-upload": "^13.0.0",
"JSONStream": "^1.3.5",
"locale": "^0.1.0",
"moment": "^2.29.3",
"mongodb": "^4.6.0",
"node-fetch": "^3.2.10",
"nodemailer": "^6.7.7",
"open": "^8.4.0",
"postfinancecheckout": "^3.0.5",
"serve-static": "^1.15.0",
"simpl-schema": "^1.12.0",
"stripe": "^8.222.0",
"tiny-secp256k1": "^2.2.1",
"twilio": "^3.77.3",
"uuid": "^8.3.2",
"xml-js": "^1.6.11"
"uuid": "^8.3.2"
},
"devDependencies": {
"@types/node": "^16.11.44",
"@types/node": "^16.11.48",
"mongodb-memory-server": "^8.7.2",
"nodemon": "^2.0.19",
"prettier": "^2.6.2",
"ts-node": "^10.8.2",
"typescript": "^4.7.4"
}
}
}
3 changes: 0 additions & 3 deletions examples/legacy-meteor-minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,8 @@
"dotenv-extended": "^2.9.0",
"ethers": "^5.6.9",
"graphql": "^15.8.0",
"graphql-scalars": "^1.18.0",
"graphql-upload": "^13.0.0",
"locale": "^0.1.0",
"meteor-node-stubs": "^1.2.5",
"moment": "^2.29.3",
"mongodb": "^4.8.1",
"node-fetch": "^2.6.7",
"nodemailer": "^6.7.7",
Expand Down
3 changes: 2 additions & 1 deletion examples/legacy-meteor-minimal/seed.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { hashPassword } from '@unchainedshop/api';
import { DeliveryProviderType } from '@unchainedshop/core-delivery';
import { PaymentProviderType } from '@unchainedshop/core-payment';
import { UnchainedAPI } from '@unchainedshop/types/api';
import { v4 as uuidv4 } from 'uuid';

const logger = console;
Expand All @@ -18,7 +19,7 @@ const seedPassword =
? uuidv4().split('-').pop()
: UNCHAINED_SEED_PASSWORD;

export default async (unchainedApi) => {
export default async (unchainedApi: UnchainedAPI) => {
const { modules } = unchainedApi;
try {
if ((await modules.users.count({ username: 'admin' })) > 0) {
Expand Down
Loading

0 comments on commit 554f063

Please sign in to comment.