Skip to content

Commit

Permalink
Merge pull request #39 from Foxy/bugfix/typedef-and-node-updates
Browse files Browse the repository at this point in the history
fix: typedef and node updates
  • Loading branch information
brettflorio authored Feb 7, 2023
2 parents 89f4628 + 8c90335 commit d7fb104
Show file tree
Hide file tree
Showing 12 changed files with 904 additions and 1,265 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
release:
name: Release
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14
node-version: 18
- name: Install dependencies
run: npm ci
- name: Release
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/s3cdn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,26 @@ name: S3CDN upload
on:
push:
tags:
- "*"
- '*'
jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout Foxy/foxy-elements
uses: actions/checkout@v2
- name: Install & Build
run: |
npm install
npm run prepack
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Build
run: npm run prepack
- uses: Foxy/foxy-github-action-s3cdn@main
with:
package-name: sdk # optional: Default is repo name.
env:
AWS_S3_CDN_BUCKET_NAME: ${{ secrets.AWS_S3_CDN_BUCKET_NAME }}
AWS_S3_CDN_KEY_ID: ${{ secrets.AWS_S3_CDN_KEY_ID }}
AWS_S3_CDN_KEY_SECRET: ${{ secrets.AWS_S3_CDN_KEY_SECRET }}
SOURCE_DIR: "dist/cdn" # optional: defaults to `dist` directory
SOURCE_DIR: 'dist/cdn' # optional: defaults to `dist` directory
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
2,096 changes: 854 additions & 1,242 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"backend.d.ts"
],
"scripts": {
"test": "jest",
"test:watch": "jest --watch",
"test": "NODE_OPTIONS=--no-experimental-fetch jest",
"test:watch": "NODE_OPTIONS=--no-experimental-fetch jest --watch",
"lint": "npm run lint:eslint && npm run lint:prettier",
"lint:eslint": "eslint --ext .ts,.html . --ignore-path .gitignore",
"lint:prettier": "prettier \"**/*.ts\" --check --ignore-path .gitignore",
Expand Down Expand Up @@ -85,17 +85,17 @@
"rimraf": "^3.0.2",
"semantic-release": "^17.3.0",
"ts-jest": "^26.4.4",
"ts-loader": "^8.0.9",
"ts-loader": "^8.4.0",
"ts-node": "^9.1.1",
"ttypescript": "^1.5.12",
"ttypescript": "^1.5.15",
"typedoc": "^0.22.18",
"typescript": "^4.0.3",
"webpack": "^5.4.0",
"webpack-cli": "^4.2.0",
"webpack": "^5.75.0",
"webpack-cli": "^4.10.0",
"webpack-node-externals": "^2.5.2"
},
"engines": {
"node": ">=10 <=15"
"node": ">=10 <=18"
},
"eslintConfig": {
"extends": [
Expand Down
2 changes: 2 additions & 0 deletions src/backend/Graph/applied_coupon_code.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export interface AppliedCouponCode extends Graph {
props: {
/** The coupon code applied to this cart. */
code: string;
/** Allow the coupon to be added to the cart, even if it has expired or the number of uses per coupon, code or customer has reached their maximums. This value is available only in POST request body. */
ignore_usage_limits?: boolean;
/** The date this resource was created. */
date_created: string | null;
/** The date this resource was last modified. */
Expand Down
14 changes: 9 additions & 5 deletions src/backend/Graph/cart.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,20 @@ export interface Cart extends Graph {
template_set_uri: string;
/** The language defined by the template set being used. */
language: string;
/** The 3 character ISO code for the currency. This value may be unavailable in some carts. */
currency_code?: string;
/** The currency symbol, such as $, £, €, etc. This value may be unavailable in some carts. */
currency_symbol?: string;
/** Total amount of the items in this cart. */
total_item_price: string;
total_item_price: number;
/** Total amount of the taxes for this cart. */
total_tax: string;
total_tax: number;
/** Total amount of the shipping costs for this cart. */
total_shipping: string;
total_shipping: number;
/** If this cart has any shippable subscription items which will process in the future, this will be the total amount of shipping costs for those items. */
total_future_shipping: string;
total_future_shipping: number;
/** Total order amount of this cart including all items, taxes, shipping costs and discounts. */
total_order: string;
total_order: number;
/** The date this resource was created. */
date_created: string | null;
/** The date this resource was last modified. */
Expand Down
1 change: 1 addition & 0 deletions src/backend/Graph/hosted_payment_gateways_helper.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export interface HostedPaymentGatewaysHelper extends Graph {
type: string;
description?: string;
default_value: string;
options?: { name: string; value: string }[];
}[];
}[];
};
Expand Down
10 changes: 8 additions & 2 deletions src/backend/Graph/item.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import type { Attributes } from './attributes';
import type { Cart } from './cart';
import type { CouponDetails } from './coupon_details';
import type { DiscountDetails } from './discount_details';
import type { Graph } from '../../core';
import type { ItemCategory } from './item_category';
import type { ItemOptions } from './item_options';
import type { Shipment } from './shipment';
import type { Store } from './store';
import type { Subscription } from './subscription';
import type { Transaction } from './transaction';

export interface Item extends Graph {
Expand All @@ -16,12 +18,16 @@ export interface Item extends Graph {
'self': Item;
/** Store this item belongs to. */
'fx:store': Store;
/** Related shipment info. */
/** Related shipment info. This link is available in purchased items only. */
'fx:shipment': Shipment;
/** Custom attributes linked to this item. */
'fx:attributes': Attributes;
/** Related transaction info. */
/** Related transaction info. This link is available in transaction items only. */
'fx:transaction': Transaction;
/** Related subscription info. This link is available only when this item is part of a subscription. */
'fx:subscription': Subscription;
/** Related cart info. This link is available in cart items only. */
'fx:cart': Cart;
/** Various custom options for this item. */
'fx:item_options': ItemOptions;
/** Category this item belongs in. */
Expand Down
1 change: 1 addition & 0 deletions src/backend/Graph/payment_gateways_helper.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export interface PaymentGatewaysHelper extends Graph {
type: string;
description?: string;
default_value: string;
options?: { name: string; value: string }[];
}[];
}[];
};
Expand Down
5 changes: 5 additions & 0 deletions src/backend/Graph/sub_modification_url.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { Graph } from '../../core';

export interface SubModificationUrl extends Graph {
curie: 'fx:sub_modification_url';
}
3 changes: 3 additions & 0 deletions src/backend/Graph/subscription.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { Graph } from '../../core';
import type { LastTransaction } from './last_transaction';
import type { OriginalTransaction } from './original_transaction';
import type { Store } from './store';
import type { SubModificationUrl } from './sub_modification_url';
import type { SubTokenUrl } from './sub_token_url';
import type { TransactionTemplate } from './transaction_template';
import type { Transactions } from './transactions';
Expand All @@ -28,6 +29,8 @@ export interface Subscription extends Graph {
'fx:transaction_template': TransactionTemplate;
/** Open this link in browser to load up the subscription template into a full HTML cart for the store. */
'fx:sub_token_url': SubTokenUrl;
/** URL of the page where the customer can modify this subscription. This link is available only when configured in subscription settings. */
'fx:sub_modification_url': SubModificationUrl;
};

props: {
Expand Down

0 comments on commit d7fb104

Please sign in to comment.