Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Feature/public api contract #346

Merged
merged 2 commits into from
Jan 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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