Skip to content

Commit

Permalink
feat(workflow): api contract (#346)
Browse files Browse the repository at this point in the history
* feat(workflow): create public API check during CI build
* chore: auto generated API
  • Loading branch information
patzick authored Jan 31, 2020
1 parent 5bacb85 commit 8a76fe6
Show file tree
Hide file tree
Showing 6 changed files with 659 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-zeit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Build packages
run: |
yarn
yarn build
yarn build --ci
- name: Deploy PR to zeit
if: github.event_name == 'pull_request'
uses: patzick/now-deployment@master
Expand Down
2 changes: 1 addition & 1 deletion api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

"apiReport": {
"enabled": true,
"reportFolder": "<projectFolder>/temp/"
"reportFolder": "<projectFolder>/api/"
},

"docModel": {
Expand Down
137 changes: 137 additions & 0 deletions api/composables.api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
## API Report File for "@shopware-pwa/composables"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts

import { AddressType } from '@shopware-pwa/shopware-6-client/src/interfaces/models/checkout/customer/CustomerAddress';
import { Customer } from '@shopware-pwa/shopware-6-client/src/interfaces/models/checkout/customer/Customer';
import { CustomerAddress } from '@shopware-pwa/shopware-6-client/src/interfaces/models/checkout/customer/CustomerAddress';
import { CustomerRegistrationParams } from '@shopware-pwa/shopware-6-client/src/interfaces/request/CustomerRegistrationParams';
import { Order } from '@shopware-pwa/shopware-6-client/src/interfaces/models/checkout/order/Order';
import { Product } from '@shopware-pwa/shopware-6-client/src/interfaces/models/content/product/Product';
import { Ref } from '@vue/composition-api';

// @alpha (undocumented)
export function getStore(): any;

// @alpha (undocumented)
export type Search = (path: string, associations?: any) => any;

// @alpha (undocumented)
export function setStore(ref: any): void;

// @alpha (undocumented)
export interface UseAddToCart {
// (undocumented)
addToCart: () => Promise<void>;
// (undocumented)
error: Ref<any>;
// (undocumented)
getStock: Ref<number | null>;
// (undocumented)
isInCart: Ref<boolean>;
// (undocumented)
loading: Ref<boolean>;
// (undocumented)
quantity: Ref<number>;
}

// @alpha (undocumented)
export const useAddToCart: (product: Product) => UseAddToCart;

// @alpha (undocumented)
export const useCart: () => any;

// @alpha (undocumented)
export const useCartSidebar: () => any;

// @alpha (undocumented)
export const useCategoryFilters: () => any;

// @alpha (undocumented)
export const useCms: () => any;

// @public (undocumented)
export const useNavigation: () => any;

// @alpha (undocumented)
export interface UseProduct<PRODUCT, SEARCH> {
// (undocumented)
[x: string]: any;
// (undocumented)
error: Ref<any>;
// (undocumented)
loading: Ref<boolean>;
// (undocumented)
product: Ref<PRODUCT>;
// (undocumented)
search: SEARCH;
}

// @alpha (undocumented)
export const useProduct: (loadedProduct?: any) => UseProduct<Product, Search>;

// @alpha (undocumented)
export interface UseProductListing {
// (undocumented)
[x: string]: any;
// (undocumented)
error: Ref<any>;
// (undocumented)
loading: Ref<boolean>;
}

// @alpha (undocumented)
export const useProductListing: (initialProducts?: Product[]) => UseProductListing;

// @alpha (undocumented)
export interface UseUser {
// (undocumented)
addresses: Ref<CustomerAddress[] | null>;
// (undocumented)
deleteAddress: (addressId: string) => Promise<boolean>;
// (undocumented)
error: Ref<any>;
// (undocumented)
getOrderDetails: (orderId: string) => Promise<Order>;
// (undocumented)
isLoggedIn: Ref<boolean>;
// (undocumented)
loadAddresses: () => Promise<void>;
// (undocumented)
loading: Ref<boolean>;
// (undocumented)
loadOrders: () => Promise<void>;
// (undocumented)
login: ({ username, password }: {
username?: string;
password?: string;
}) => Promise<boolean>;
// (undocumented)
logout: () => Promise<void>;
// (undocumented)
markAddressAsDefault: ({ addressId, type }: {
addressId?: string;
type?: AddressType;
}) => Promise<string | boolean>;
// (undocumented)
orders: Ref<Order[] | null>;
// (undocumented)
refreshUser: () => Promise<void>;
// (undocumented)
register: ({}: CustomerRegistrationParams) => Promise<boolean>;
// (undocumented)
user: Ref<Customer | null>;
}

// @alpha (undocumented)
export const useUser: () => UseUser;

// @public (undocumented)
export const useUserLoginModal: () => any;


// (No @packageDocumentation comment for this package)

```
Loading

1 comment on commit 8a76fe6

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for website ready!

Built with commit 3faa33f

https://shopware-pwa-1ktu29ks0.now.sh

Please sign in to comment.