@labdigital/commercetools-mock 0.6.4 → 0.7.1
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/dist/index.d.ts +385 -3
- package/dist/index.global.js +49770 -0
- package/dist/index.global.js.map +1 -0
- package/dist/index.js +4622 -6
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +4590 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +30 -17
- package/src/ctMock.ts +5 -0
- package/src/helpers.ts +15 -0
- package/src/lib/projectionSearchFilter.test.ts +177 -0
- package/src/lib/projectionSearchFilter.ts +248 -0
- package/src/priceSelector.test.ts +96 -0
- package/src/priceSelector.ts +109 -0
- package/src/product-projection-search.ts +149 -0
- package/src/projectAPI.ts +19 -20
- package/src/repositories/category.ts +36 -0
- package/src/repositories/channel.ts +104 -0
- package/src/repositories/customer-group.ts +37 -0
- package/src/repositories/discount-code.ts +37 -0
- package/src/repositories/helpers.ts +46 -4
- package/src/repositories/product-discount.ts +181 -0
- package/src/repositories/product-projection.ts +29 -55
- package/src/repositories/product-type.ts +88 -6
- package/src/repositories/product.ts +49 -9
- package/src/repositories/shipping-method.ts +31 -0
- package/src/repositories/store.ts +43 -3
- package/src/repositories/type.ts +19 -0
- package/src/services/custom-object.test.ts +2 -2
- package/src/services/product-discount.ts +33 -0
- package/src/services/product-projection.test.ts +171 -116
- package/src/services/product.test.ts +12 -0
- package/src/storage.ts +116 -58
- package/src/types.ts +9 -2
- package/dist/commercetools-mock.cjs.development.js +0 -4380
- package/dist/commercetools-mock.cjs.development.js.map +0 -1
- package/dist/commercetools-mock.cjs.production.min.js +0 -2
- package/dist/commercetools-mock.cjs.production.min.js.map +0 -1
- package/dist/commercetools-mock.esm.js +0 -4372
- package/dist/commercetools-mock.esm.js.map +0 -1
- package/dist/constants.d.ts +0 -2
- package/dist/ctMock.d.ts +0 -32
- package/dist/exceptions.d.ts +0 -12
- package/dist/helpers.d.ts +0 -6
- package/dist/lib/expandParser.d.ts +0 -15
- package/dist/lib/filterParser.d.ts +0 -1
- package/dist/lib/haversine.d.ts +0 -8
- package/dist/lib/masking.d.ts +0 -1
- package/dist/lib/predicateParser.d.ts +0 -11
- package/dist/lib/proxy.d.ts +0 -1
- package/dist/oauth/errors.d.ts +0 -8
- package/dist/oauth/helpers.d.ts +0 -2
- package/dist/oauth/server.d.ts +0 -12
- package/dist/oauth/store.d.ts +0 -14
- package/dist/projectAPI.d.ts +0 -12
- package/dist/repositories/abstract.d.ts +0 -33
- package/dist/repositories/cart-discount.d.ts +0 -9
- package/dist/repositories/cart.d.ts +0 -21
- package/dist/repositories/category.d.ts +0 -18
- package/dist/repositories/channel.d.ts +0 -6
- package/dist/repositories/custom-object.d.ts +0 -8
- package/dist/repositories/customer-group.d.ts +0 -11
- package/dist/repositories/customer.d.ts +0 -11
- package/dist/repositories/discount-code.d.ts +0 -8
- package/dist/repositories/errors.d.ts +0 -2
- package/dist/repositories/extension.d.ts +0 -8
- package/dist/repositories/helpers.d.ts +0 -10
- package/dist/repositories/inventory-entry.d.ts +0 -14
- package/dist/repositories/my-order.d.ts +0 -6
- package/dist/repositories/order.d.ts +0 -26
- package/dist/repositories/payment.d.ts +0 -23
- package/dist/repositories/product-projection.d.ts +0 -10
- package/dist/repositories/product-type.d.ts +0 -10
- package/dist/repositories/product.d.ts +0 -11
- package/dist/repositories/project.d.ts +0 -8
- package/dist/repositories/shipping-method.d.ts +0 -10
- package/dist/repositories/shopping-list.d.ts +0 -6
- package/dist/repositories/state.d.ts +0 -8
- package/dist/repositories/store.d.ts +0 -10
- package/dist/repositories/subscription.d.ts +0 -6
- package/dist/repositories/tax-category.d.ts +0 -10
- package/dist/repositories/type.d.ts +0 -8
- package/dist/repositories/zone.d.ts +0 -8
- package/dist/server.d.ts +0 -1
- package/dist/services/abstract.d.ts +0 -20
- package/dist/services/cart-discount.d.ts +0 -9
- package/dist/services/cart.d.ts +0 -12
- package/dist/services/category.d.ts +0 -9
- package/dist/services/channel.d.ts +0 -9
- package/dist/services/custom-object.d.ts +0 -13
- package/dist/services/customer-group.d.ts +0 -9
- package/dist/services/customer.d.ts +0 -10
- package/dist/services/discount-code.d.ts +0 -9
- package/dist/services/extension.d.ts +0 -9
- package/dist/services/inventory-entry.d.ts +0 -9
- package/dist/services/my-cart.d.ts +0 -11
- package/dist/services/my-customer.d.ts +0 -13
- package/dist/services/my-order.d.ts +0 -10
- package/dist/services/my-payment.d.ts +0 -9
- package/dist/services/order.d.ts +0 -12
- package/dist/services/payment.d.ts +0 -9
- package/dist/services/product-projection.d.ts +0 -11
- package/dist/services/product-type.d.ts +0 -11
- package/dist/services/product.d.ts +0 -9
- package/dist/services/project.d.ts +0 -11
- package/dist/services/shipping-method.d.ts +0 -10
- package/dist/services/shopping-list.d.ts +0 -9
- package/dist/services/state.d.ts +0 -9
- package/dist/services/store.d.ts +0 -11
- package/dist/services/subscription.d.ts +0 -9
- package/dist/services/tax-category.d.ts +0 -11
- package/dist/services/type.d.ts +0 -9
- package/dist/services/zone.d.ts +0 -9
- package/dist/storage.d.ts +0 -56
- package/dist/types.d.ts +0 -89
- package/dist/validate.d.ts +0 -7482
- package/src/lib/filterParser.test.ts +0 -15
- package/src/lib/filterParser.ts +0 -17
package/dist/constants.d.ts
DELETED
package/dist/ctMock.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import express from 'express';
|
|
2
|
-
import { ProjectAPI } from './projectAPI';
|
|
3
|
-
export declare type CommercetoolsMockOptions = {
|
|
4
|
-
validateCredentials: boolean;
|
|
5
|
-
enableAuthentication: boolean;
|
|
6
|
-
defaultProjectKey: string | undefined;
|
|
7
|
-
apiHost: RegExp | string;
|
|
8
|
-
authHost: RegExp | string;
|
|
9
|
-
silent: boolean;
|
|
10
|
-
};
|
|
11
|
-
declare type AppOptions = {
|
|
12
|
-
silent?: boolean;
|
|
13
|
-
};
|
|
14
|
-
export declare class CommercetoolsMock {
|
|
15
|
-
app: express.Express;
|
|
16
|
-
options: CommercetoolsMockOptions;
|
|
17
|
-
private _storage;
|
|
18
|
-
private _oauth2;
|
|
19
|
-
private _nockScopes;
|
|
20
|
-
private _services;
|
|
21
|
-
private _projectService?;
|
|
22
|
-
constructor(options?: Partial<CommercetoolsMockOptions>);
|
|
23
|
-
start(): void;
|
|
24
|
-
stop(): void;
|
|
25
|
-
clear(): void;
|
|
26
|
-
project(projectKey?: string): ProjectAPI;
|
|
27
|
-
runServer(port?: number, options?: AppOptions): void;
|
|
28
|
-
private createApp;
|
|
29
|
-
private mockApiHost;
|
|
30
|
-
private mockAuthHost;
|
|
31
|
-
}
|
|
32
|
-
export {};
|
package/dist/exceptions.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare abstract class BaseError {
|
|
2
|
-
abstract message: string;
|
|
3
|
-
}
|
|
4
|
-
export declare class CommercetoolsError<T extends BaseError> extends Error {
|
|
5
|
-
info: T;
|
|
6
|
-
statusCode: number;
|
|
7
|
-
constructor(info: T, statusCode?: number);
|
|
8
|
-
}
|
|
9
|
-
export interface InvalidRequestError {
|
|
10
|
-
readonly code: 'invalid_request';
|
|
11
|
-
readonly message: string;
|
|
12
|
-
}
|
package/dist/helpers.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This module implements the reference expansion as imeplemented by
|
|
3
|
-
* commercetools.
|
|
4
|
-
*
|
|
5
|
-
* See https://docs.commercetools.com/api/general-concepts#reference-expansion
|
|
6
|
-
*
|
|
7
|
-
* TODO: implement support for multi-dimensional array
|
|
8
|
-
*/
|
|
9
|
-
declare type ExpandResult = {
|
|
10
|
-
element: string;
|
|
11
|
-
index?: string | number;
|
|
12
|
-
rest?: string;
|
|
13
|
-
};
|
|
14
|
-
export declare const parseExpandClause: (clause: string) => ExpandResult;
|
|
15
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const parseFilterExpression: (filter: string | string[]) => string;
|
package/dist/lib/haversine.d.ts
DELETED
package/dist/lib/masking.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const maskSecretValue: <T>(resource: T, path: string) => T;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare class PredicateError {
|
|
2
|
-
message: string;
|
|
3
|
-
constructor(message: string);
|
|
4
|
-
}
|
|
5
|
-
declare type MatchFunc = (target: any, variables: VariableMap) => boolean;
|
|
6
|
-
declare type VariableMap = {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
};
|
|
9
|
-
export declare const matchesPredicate: (predicate: string | string[] | undefined, target: any, variables?: VariableMap | undefined) => boolean;
|
|
10
|
-
export declare const parseQueryExpression: (predicate: string | string[]) => MatchFunc;
|
|
11
|
-
export {};
|
package/dist/lib/proxy.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const copyHeaders: (headers: Record<string, string>) => Record<string, string>;
|
package/dist/oauth/errors.d.ts
DELETED
package/dist/oauth/helpers.d.ts
DELETED
package/dist/oauth/server.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import express, { NextFunction, Request, Response } from 'express';
|
|
2
|
-
import { OAuth2Store } from './store';
|
|
3
|
-
export declare class OAuth2Server {
|
|
4
|
-
store: OAuth2Store;
|
|
5
|
-
constructor(options: {
|
|
6
|
-
enabled: boolean;
|
|
7
|
-
validate: boolean;
|
|
8
|
-
});
|
|
9
|
-
createRouter(): import("express-serve-static-core").Router;
|
|
10
|
-
createMiddleware(): (request: Request, response: Response, next: NextFunction) => Promise<void>;
|
|
11
|
-
tokenHandler(request: Request, response: Response, next: NextFunction): Promise<void | express.Response<any, Record<string, any>>>;
|
|
12
|
-
}
|
package/dist/oauth/store.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
declare type Token = {
|
|
2
|
-
access_token: string;
|
|
3
|
-
token_type: 'Bearer';
|
|
4
|
-
expires_in: number;
|
|
5
|
-
scope: string;
|
|
6
|
-
};
|
|
7
|
-
export declare class OAuth2Store {
|
|
8
|
-
tokens: Token[];
|
|
9
|
-
validate: Boolean;
|
|
10
|
-
constructor(validate?: Boolean);
|
|
11
|
-
getClientToken(clientId: string, clientSecret: string, scope?: string): Token;
|
|
12
|
-
validateToken(token: string): boolean;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
package/dist/projectAPI.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { GetParams } from 'repositories/abstract';
|
|
2
|
-
import { AbstractStorage } from './storage';
|
|
3
|
-
import { RepositoryMap, ResourceMap, Services } from './types';
|
|
4
|
-
export declare class ProjectAPI {
|
|
5
|
-
private projectKey;
|
|
6
|
-
private _storage;
|
|
7
|
-
private _services;
|
|
8
|
-
constructor(projectKey: string, services: Services, storage: AbstractStorage);
|
|
9
|
-
add<ReferenceTypeId extends keyof ResourceMap>(typeId: ReferenceTypeId | 'custom-object', resource: ResourceMap[ReferenceTypeId]): void;
|
|
10
|
-
get<ReferenceTypeId extends keyof ResourceMap>(typeId: ReferenceTypeId, id: string, params?: GetParams): ResourceMap[ReferenceTypeId];
|
|
11
|
-
getRepository<ReferenceTypeId extends keyof RepositoryMap>(typeId: ReferenceTypeId): RepositoryMap[ReferenceTypeId];
|
|
12
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { RepositoryTypes } from './../types';
|
|
2
|
-
import { BaseResource, Project, UpdateAction } from '@commercetools/platform-sdk';
|
|
3
|
-
import { AbstractStorage } from '../storage';
|
|
4
|
-
export declare type QueryParams = {
|
|
5
|
-
expand?: string[];
|
|
6
|
-
where?: string[];
|
|
7
|
-
offset?: number;
|
|
8
|
-
limit?: number;
|
|
9
|
-
};
|
|
10
|
-
export declare type GetParams = {
|
|
11
|
-
expand?: string[];
|
|
12
|
-
};
|
|
13
|
-
export declare type RepositoryContext = {
|
|
14
|
-
projectKey: string;
|
|
15
|
-
storeKey?: string;
|
|
16
|
-
};
|
|
17
|
-
export declare abstract class AbstractRepository {
|
|
18
|
-
protected _storage: AbstractStorage;
|
|
19
|
-
protected actions: Partial<Record<any, (context: RepositoryContext, resource: any, action: any) => void>>;
|
|
20
|
-
constructor(storage: AbstractStorage);
|
|
21
|
-
abstract save({ projectKey }: RepositoryContext, resource: BaseResource | Project): void;
|
|
22
|
-
processUpdateActions(context: RepositoryContext, resource: BaseResource | Project, actions: UpdateAction[]): BaseResource;
|
|
23
|
-
}
|
|
24
|
-
export declare abstract class AbstractResourceRepository extends AbstractRepository {
|
|
25
|
-
abstract create(context: RepositoryContext, draft: any): BaseResource;
|
|
26
|
-
abstract getTypeId(): RepositoryTypes;
|
|
27
|
-
constructor(storage: AbstractStorage);
|
|
28
|
-
query(context: RepositoryContext, params?: QueryParams): import("@commercetools/platform-sdk").PagedQueryResponse;
|
|
29
|
-
get(context: RepositoryContext, id: string, params?: GetParams): BaseResource | null;
|
|
30
|
-
getByKey(context: RepositoryContext, key: string, params?: GetParams): BaseResource | null;
|
|
31
|
-
delete(context: RepositoryContext, id: string, params?: GetParams): BaseResource | null;
|
|
32
|
-
save(context: RepositoryContext, resource: BaseResource): void;
|
|
33
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CartDiscount, CartDiscountDraft, CartDiscountUpdateAction, ReferenceTypeId } from '@commercetools/platform-sdk';
|
|
2
|
-
import { Writable } from 'types';
|
|
3
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
4
|
-
export declare class CartDiscountRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: CartDiscountDraft): CartDiscount;
|
|
7
|
-
private transformValueDraft;
|
|
8
|
-
actions: Partial<Record<CartDiscountUpdateAction['action'], (context: RepositoryContext, resource: Writable<CartDiscount>, action: any) => void>>;
|
|
9
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Cart, CartAddLineItemAction, CartDraft, CartRemoveLineItemAction, CartSetBillingAddressAction, CartSetCountryAction, CartSetCustomerEmailAction, CartSetCustomFieldAction, CartSetCustomTypeAction, CartSetLocaleAction, CartSetShippingAddressAction, CartSetShippingMethodAction, LineItem, LineItemDraft, ReferenceTypeId } from '@commercetools/platform-sdk';
|
|
2
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
3
|
-
import { Writable } from '../types';
|
|
4
|
-
export declare class CartRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: CartDraft): Cart;
|
|
7
|
-
getActiveCart(projectKey: string): Cart | undefined;
|
|
8
|
-
actions: {
|
|
9
|
-
addLineItem: (context: RepositoryContext, resource: Writable<Cart>, { productId, variantId, sku, quantity }: CartAddLineItemAction) => void;
|
|
10
|
-
removeLineItem: (context: RepositoryContext, resource: Writable<Cart>, { lineItemId, quantity }: CartRemoveLineItemAction) => void;
|
|
11
|
-
setBillingAddress: (context: RepositoryContext, resource: Writable<Cart>, { address }: CartSetBillingAddressAction) => void;
|
|
12
|
-
setShippingMethod: (context: RepositoryContext, resource: Writable<Cart>, { shippingMethod }: CartSetShippingMethodAction) => void;
|
|
13
|
-
setCountry: (context: RepositoryContext, resource: Writable<Cart>, { country }: CartSetCountryAction) => void;
|
|
14
|
-
setCustomerEmail: (context: RepositoryContext, resource: Writable<Cart>, { email }: CartSetCustomerEmailAction) => void;
|
|
15
|
-
setCustomField: (context: RepositoryContext, resource: Cart, { name, value }: CartSetCustomFieldAction) => void;
|
|
16
|
-
setCustomType: (context: RepositoryContext, resource: Writable<Cart>, { type, fields }: CartSetCustomTypeAction) => void;
|
|
17
|
-
setLocale: (context: RepositoryContext, resource: Writable<Cart>, { locale }: CartSetLocaleAction) => void;
|
|
18
|
-
setShippingAddress: (context: RepositoryContext, resource: Writable<Cart>, { address }: CartSetShippingAddressAction) => void;
|
|
19
|
-
};
|
|
20
|
-
draftLineItemtoLineItem: (projectKey: string, draftLineItem: LineItemDraft, currency: string, country: string | undefined) => LineItem;
|
|
21
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Category, CategoryChangeAssetNameAction, CategoryChangeSlugAction, CategoryDraft, CategorySetAssetDescriptionAction, CategorySetAssetSourcesAction, CategorySetDescriptionAction, CategorySetKeyAction, CategorySetMetaDescriptionAction, CategorySetMetaKeywordsAction, CategorySetMetaTitleAction, ReferenceTypeId } from '@commercetools/platform-sdk';
|
|
2
|
-
import { Writable } from 'types';
|
|
3
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
4
|
-
export declare class CategoryRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: CategoryDraft): Category;
|
|
7
|
-
actions: {
|
|
8
|
-
changeAssetName: (context: RepositoryContext, resource: Writable<Category>, { assetId, assetKey, name }: CategoryChangeAssetNameAction) => void;
|
|
9
|
-
changeSlug: (context: RepositoryContext, resource: Writable<Category>, { slug }: CategoryChangeSlugAction) => void;
|
|
10
|
-
setKey: (context: RepositoryContext, resource: Writable<Category>, { key }: CategorySetKeyAction) => void;
|
|
11
|
-
setAssetDescription: (context: RepositoryContext, resource: Writable<Category>, { assetId, assetKey, description }: CategorySetAssetDescriptionAction) => void;
|
|
12
|
-
setAssetSources: (context: RepositoryContext, resource: Writable<Category>, { assetId, assetKey, sources }: CategorySetAssetSourcesAction) => void;
|
|
13
|
-
setDescription: (context: RepositoryContext, resource: Writable<Category>, { description }: CategorySetDescriptionAction) => void;
|
|
14
|
-
setMetaDescription: (context: RepositoryContext, resource: Writable<Category>, { metaDescription }: CategorySetMetaDescriptionAction) => void;
|
|
15
|
-
setMetaKeywords: (context: RepositoryContext, resource: Writable<Category>, { metaKeywords }: CategorySetMetaKeywordsAction) => void;
|
|
16
|
-
setMetaTitle: (context: RepositoryContext, resource: Writable<Category>, { metaTitle }: CategorySetMetaTitleAction) => void;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Channel, ChannelDraft, ReferenceTypeId } from '@commercetools/platform-sdk';
|
|
2
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
3
|
-
export declare class ChannelRepository extends AbstractResourceRepository {
|
|
4
|
-
getTypeId(): ReferenceTypeId;
|
|
5
|
-
create(context: RepositoryContext, draft: ChannelDraft): Channel;
|
|
6
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CustomObject, CustomObjectDraft, ReferenceTypeId } from '@commercetools/platform-sdk';
|
|
2
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
3
|
-
import { Writable } from '../types';
|
|
4
|
-
export declare class CustomObjectRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: Writable<CustomObjectDraft>): CustomObject;
|
|
7
|
-
getWithContainerAndKey(context: RepositoryContext, container: string, key: string): CustomObject | undefined;
|
|
8
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CustomerGroup, CustomerGroupChangeNameAction, CustomerGroupDraft, CustomerGroupSetKeyAction, ReferenceTypeId } from '@commercetools/platform-sdk';
|
|
2
|
-
import { Writable } from 'types';
|
|
3
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
4
|
-
export declare class CustomerGroupRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: CustomerGroupDraft): CustomerGroup;
|
|
7
|
-
actions: {
|
|
8
|
-
setKey: (context: RepositoryContext, resource: Writable<CustomerGroup>, { key }: CustomerGroupSetKeyAction) => void;
|
|
9
|
-
changeName: (context: RepositoryContext, resource: Writable<CustomerGroup>, { name }: CustomerGroupChangeNameAction) => void;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Customer, CustomerChangeEmailAction, CustomerDraft, ReferenceTypeId } from '@commercetools/platform-sdk';
|
|
2
|
-
import { Writable } from 'types';
|
|
3
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
4
|
-
export declare class CustomerRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: CustomerDraft): Customer;
|
|
7
|
-
getMe(context: RepositoryContext): Customer | undefined;
|
|
8
|
-
actions: {
|
|
9
|
-
changeEmail: (_context: RepositoryContext, resource: Writable<Customer>, { email }: CustomerChangeEmailAction) => void;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DiscountCode, DiscountCodeDraft, DiscountCodeUpdateAction, ReferenceTypeId } from '@commercetools/platform-sdk';
|
|
2
|
-
import { Writable } from 'types';
|
|
3
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
4
|
-
export declare class DiscountCodeRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: DiscountCodeDraft): DiscountCode;
|
|
7
|
-
actions: Partial<Record<DiscountCodeUpdateAction['action'], (context: RepositoryContext, resource: Writable<DiscountCode>, action: any) => void>>;
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Extension, ExtensionDraft, ExtensionUpdateAction, ReferenceTypeId } from '@commercetools/platform-sdk';
|
|
2
|
-
import { Writable } from '../types';
|
|
3
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
4
|
-
export declare class ExtensionRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: ExtensionDraft): Extension;
|
|
7
|
-
actions: Record<ExtensionUpdateAction['action'], (context: RepositoryContext, resource: Writable<Extension>, action: any) => void>;
|
|
8
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CustomFields, CustomFieldsDraft, Money, Price, PriceDraft, Reference, ResourceIdentifier, StoreKeyReference, StoreResourceIdentifier, TypedMoney } from '@commercetools/platform-sdk';
|
|
2
|
-
import { AbstractStorage } from '../storage';
|
|
3
|
-
import { RepositoryContext } from './abstract';
|
|
4
|
-
import { Request } from 'express';
|
|
5
|
-
export declare const createCustomFields: (draft: CustomFieldsDraft | undefined, projectKey: string, storage: AbstractStorage) => CustomFields | undefined;
|
|
6
|
-
export declare const createPrice: (draft: PriceDraft) => Price;
|
|
7
|
-
export declare const createTypedMoney: (value: Money) => TypedMoney;
|
|
8
|
-
export declare const resolveStoreReference: (ref: StoreResourceIdentifier | undefined, projectKey: string, storage: AbstractStorage) => StoreKeyReference | undefined;
|
|
9
|
-
export declare const getReferenceFromResourceIdentifier: <T extends Reference>(resourceIdentifier: ResourceIdentifier, projectKey: string, storage: AbstractStorage) => T;
|
|
10
|
-
export declare const getRepositoryContext: (request: Request) => RepositoryContext;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { InventoryEntry, InventoryEntryChangeQuantityAction, InventoryEntryDraft, InventoryEntrySetCustomFieldAction, InventoryEntrySetCustomTypeAction, InventoryEntrySetExpectedDeliveryAction, InventoryEntrySetRestockableInDaysAction, ReferenceTypeId } from '@commercetools/platform-sdk';
|
|
2
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
3
|
-
import { Writable } from '../types';
|
|
4
|
-
export declare class InventoryEntryRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: InventoryEntryDraft): InventoryEntry;
|
|
7
|
-
actions: {
|
|
8
|
-
changeQuantity: (context: RepositoryContext, resource: Writable<InventoryEntry>, { quantity }: InventoryEntryChangeQuantityAction) => void;
|
|
9
|
-
setExpectedDelivery: (context: RepositoryContext, resource: Writable<InventoryEntry>, { expectedDelivery }: InventoryEntrySetExpectedDeliveryAction) => void;
|
|
10
|
-
setCustomField: (context: RepositoryContext, resource: InventoryEntry, { name, value }: InventoryEntrySetCustomFieldAction) => void;
|
|
11
|
-
setCustomType: (context: RepositoryContext, resource: Writable<InventoryEntry>, { type, fields }: InventoryEntrySetCustomTypeAction) => void;
|
|
12
|
-
setRestockableInDays: (context: RepositoryContext, resource: Writable<InventoryEntry>, { restockableInDays }: InventoryEntrySetRestockableInDaysAction) => void;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { MyOrderFromCartDraft, Order } from '@commercetools/platform-sdk';
|
|
2
|
-
import { OrderRepository } from './order';
|
|
3
|
-
import { RepositoryContext } from './abstract';
|
|
4
|
-
export declare class MyOrderRepository extends OrderRepository {
|
|
5
|
-
create(context: RepositoryContext, draft: MyOrderFromCartDraft): Order;
|
|
6
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { CartReference, Order, OrderAddPaymentAction, OrderChangeOrderStateAction, OrderChangePaymentStateAction, OrderFromCartDraft, OrderImportDraft, OrderSetBillingAddressAction, OrderSetCustomerEmailAction, OrderSetCustomFieldAction, OrderSetCustomTypeAction, OrderSetLocaleAction, OrderSetOrderNumberAction, OrderSetShippingAddressAction, OrderSetStoreAction, OrderTransitionStateAction, ReferenceTypeId } from '@commercetools/platform-sdk';
|
|
2
|
-
import { AbstractResourceRepository, QueryParams, RepositoryContext } from './abstract';
|
|
3
|
-
import { Writable } from '../types';
|
|
4
|
-
export declare class OrderRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: OrderFromCartDraft): Order;
|
|
7
|
-
createFromCart(context: RepositoryContext, cartReference: CartReference, orderNumber?: string): Order;
|
|
8
|
-
import(context: RepositoryContext, draft: OrderImportDraft): Order;
|
|
9
|
-
private lineItemFromImportDraft;
|
|
10
|
-
private customLineItemFromImportDraft;
|
|
11
|
-
getWithOrderNumber(context: RepositoryContext, orderNumber: string, params?: QueryParams): Order | undefined;
|
|
12
|
-
actions: {
|
|
13
|
-
addPayment: (context: RepositoryContext, resource: Writable<Order>, { payment }: OrderAddPaymentAction) => void;
|
|
14
|
-
changeOrderState: (context: RepositoryContext, resource: Writable<Order>, { orderState }: OrderChangeOrderStateAction) => void;
|
|
15
|
-
changePaymentState: (context: RepositoryContext, resource: Writable<Order>, { paymentState }: OrderChangePaymentStateAction) => void;
|
|
16
|
-
transitionState: (context: RepositoryContext, resource: Writable<Order>, { state }: OrderTransitionStateAction) => void;
|
|
17
|
-
setBillingAddress: (context: RepositoryContext, resource: Writable<Order>, { address }: OrderSetBillingAddressAction) => void;
|
|
18
|
-
setCustomerEmail: (context: RepositoryContext, resource: Writable<Order>, { email }: OrderSetCustomerEmailAction) => void;
|
|
19
|
-
setCustomField: (context: RepositoryContext, resource: Order, { name, value }: OrderSetCustomFieldAction) => void;
|
|
20
|
-
setCustomType: (context: RepositoryContext, resource: Writable<Order>, { type, fields }: OrderSetCustomTypeAction) => void;
|
|
21
|
-
setLocale: (context: RepositoryContext, resource: Writable<Order>, { locale }: OrderSetLocaleAction) => void;
|
|
22
|
-
setOrderNumber: (context: RepositoryContext, resource: Writable<Order>, { orderNumber }: OrderSetOrderNumberAction) => void;
|
|
23
|
-
setShippingAddress: (context: RepositoryContext, resource: Writable<Order>, { address }: OrderSetShippingAddressAction) => void;
|
|
24
|
-
setStore: (context: RepositoryContext, resource: Writable<Order>, { store }: OrderSetStoreAction) => void;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Payment, PaymentAddTransactionAction, PaymentChangeTransactionStateAction, PaymentDraft, PaymentSetCustomFieldAction, PaymentSetCustomTypeAction, PaymentTransitionStateAction, ReferenceTypeId, TransactionDraft } from '@commercetools/platform-sdk';
|
|
2
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
3
|
-
import { Writable } from '../types';
|
|
4
|
-
export declare class PaymentRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: PaymentDraft): Payment;
|
|
7
|
-
transactionFromTransactionDraft: (draft: TransactionDraft, context: RepositoryContext) => {
|
|
8
|
-
id: string;
|
|
9
|
-
amount: import("@commercetools/platform-sdk").TypedMoney;
|
|
10
|
-
custom: import("@commercetools/platform-sdk").CustomFields | undefined;
|
|
11
|
-
timestamp?: string | undefined;
|
|
12
|
-
type: import("@commercetools/platform-sdk").TransactionType;
|
|
13
|
-
interactionId?: string | undefined;
|
|
14
|
-
state?: "Failure" | "Initial" | "Pending" | "Success" | undefined;
|
|
15
|
-
};
|
|
16
|
-
actions: {
|
|
17
|
-
setCustomField: (context: RepositoryContext, resource: Payment, { name, value }: PaymentSetCustomFieldAction) => void;
|
|
18
|
-
setCustomType: (context: RepositoryContext, resource: Writable<Payment>, { type, fields }: PaymentSetCustomTypeAction) => void;
|
|
19
|
-
addTransaction: (context: RepositoryContext, resource: Writable<Payment>, { transaction }: PaymentAddTransactionAction) => void;
|
|
20
|
-
changeTransactionState: (_context: RepositoryContext, resource: Writable<Payment>, { transactionId, state }: PaymentChangeTransactionStateAction) => void;
|
|
21
|
-
transitionState: (context: RepositoryContext, resource: Writable<Payment>, { state }: PaymentTransitionStateAction) => void;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ParsedQs } from 'qs';
|
|
2
|
-
import { ProductDraft, ProductProjection } from '@commercetools/platform-sdk';
|
|
3
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
4
|
-
import { RepositoryTypes } from '../types';
|
|
5
|
-
export declare class ProductProjectionRepository extends AbstractResourceRepository {
|
|
6
|
-
getTypeId(): RepositoryTypes;
|
|
7
|
-
create(context: RepositoryContext, draft: ProductDraft): ProductProjection;
|
|
8
|
-
search(context: RepositoryContext, query: ParsedQs): import("@commercetools/platform-sdk").PagedQueryResponse;
|
|
9
|
-
actions: {};
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AttributeDefinition, AttributeDefinitionDraft, ProductType, ProductTypeDraft, ProductTypeUpdateAction, ReferenceTypeId } from '@commercetools/platform-sdk';
|
|
2
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
3
|
-
import { Writable } from 'types';
|
|
4
|
-
export declare class ProductTypeRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: ProductTypeDraft): ProductType;
|
|
7
|
-
attributeDefinitionFromAttributeDefinitionDraft: (_context: RepositoryContext, draft: AttributeDefinitionDraft) => AttributeDefinition;
|
|
8
|
-
getWithKey(context: RepositoryContext, key: string): ProductType | undefined;
|
|
9
|
-
actions: Partial<Record<ProductTypeUpdateAction['action'], (context: RepositoryContext, resource: Writable<ProductType>, action: any) => void>>;
|
|
10
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Product, ProductDraft, ProductPublishAction, ProductSetAttributeAction, ReferenceTypeId } from '@commercetools/platform-sdk';
|
|
2
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
3
|
-
import { Writable } from '../types';
|
|
4
|
-
export declare class ProductRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: ProductDraft): Product;
|
|
7
|
-
actions: {
|
|
8
|
-
publish: (context: RepositoryContext, resource: Writable<Product>, { scope }: ProductPublishAction) => void;
|
|
9
|
-
setAttribute: (context: RepositoryContext, resource: Writable<Product>, { variantId, sku, name, value, staged }: ProductSetAttributeAction) => void;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Project, ProjectUpdateAction } from '@commercetools/platform-sdk';
|
|
2
|
-
import { Writable } from 'types';
|
|
3
|
-
import { AbstractRepository, RepositoryContext } from './abstract';
|
|
4
|
-
export declare class ProjectRepository extends AbstractRepository {
|
|
5
|
-
get(context: RepositoryContext): Project | null;
|
|
6
|
-
save(context: RepositoryContext, resource: Project): void;
|
|
7
|
-
actions: Partial<Record<ProjectUpdateAction['action'], (context: RepositoryContext, resource: Writable<Project>, action: any) => void>>;
|
|
8
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ReferenceTypeId, ShippingMethod, ShippingMethodDraft, ShippingMethodUpdateAction } from '@commercetools/platform-sdk';
|
|
2
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
3
|
-
import { Writable } from 'types';
|
|
4
|
-
export declare class ShippingMethodRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: ShippingMethodDraft): ShippingMethod;
|
|
7
|
-
private _transformZoneRateDraft;
|
|
8
|
-
private _transformShippingRate;
|
|
9
|
-
actions: Partial<Record<ShippingMethodUpdateAction['action'], (context: RepositoryContext, resource: Writable<ShippingMethod>, action: any) => void>>;
|
|
10
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ReferenceTypeId, ShoppingList, ShoppingListDraft } from '@commercetools/platform-sdk';
|
|
2
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
3
|
-
export declare class ShoppingListRepository extends AbstractResourceRepository {
|
|
4
|
-
getTypeId(): ReferenceTypeId;
|
|
5
|
-
create(context: RepositoryContext, draft: ShoppingListDraft): ShoppingList;
|
|
6
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ReferenceTypeId, State, StateDraft, StateUpdateAction } from '@commercetools/platform-sdk';
|
|
2
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
3
|
-
import { Writable } from 'types';
|
|
4
|
-
export declare class StateRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: StateDraft): State;
|
|
7
|
-
actions: Partial<Record<StateUpdateAction['action'], (context: RepositoryContext, resource: Writable<State>, action: any) => void>>;
|
|
8
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Store, StoreDraft, ReferenceTypeId, StoreUpdateAction } from '@commercetools/platform-sdk';
|
|
2
|
-
import { Writable } from 'types';
|
|
3
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
4
|
-
export declare class StoreRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: StoreDraft): Store;
|
|
7
|
-
private transformChannels;
|
|
8
|
-
getWithKey(context: RepositoryContext, key: string): Store | undefined;
|
|
9
|
-
actions: Partial<Record<StoreUpdateAction['action'], (context: RepositoryContext, resource: Writable<Store>, action: any) => void>>;
|
|
10
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ReferenceTypeId, Subscription, SubscriptionDraft } from '@commercetools/platform-sdk';
|
|
2
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
3
|
-
export declare class SubscriptionRepository extends AbstractResourceRepository {
|
|
4
|
-
getTypeId(): ReferenceTypeId;
|
|
5
|
-
create(context: RepositoryContext, draft: SubscriptionDraft): Subscription;
|
|
6
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ReferenceTypeId, TaxCategory, TaxCategoryDraft, TaxCategoryUpdateAction } from '@commercetools/platform-sdk';
|
|
2
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
3
|
-
import { Writable } from 'types';
|
|
4
|
-
export declare class TaxCategoryRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: TaxCategoryDraft): TaxCategory;
|
|
7
|
-
private taxRateFromTaxRateDraft;
|
|
8
|
-
getWithKey(context: RepositoryContext, key: string): TaxCategory | undefined;
|
|
9
|
-
actions: Partial<Record<TaxCategoryUpdateAction['action'], (context: RepositoryContext, resource: Writable<TaxCategory>, action: any) => void>>;
|
|
10
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Type, TypeDraft, ReferenceTypeId, TypeUpdateAction } from '@commercetools/platform-sdk';
|
|
2
|
-
import { Writable } from 'types';
|
|
3
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
4
|
-
export declare class TypeRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: TypeDraft): Type;
|
|
7
|
-
actions: Partial<Record<TypeUpdateAction['action'], (context: RepositoryContext, resource: Writable<Type>, action: any) => void>>;
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ReferenceTypeId, Zone, ZoneDraft, ZoneUpdateAction } from '@commercetools/platform-sdk';
|
|
2
|
-
import { Writable } from 'types';
|
|
3
|
-
import { AbstractResourceRepository, RepositoryContext } from './abstract';
|
|
4
|
-
export declare class ZoneRepository extends AbstractResourceRepository {
|
|
5
|
-
getTypeId(): ReferenceTypeId;
|
|
6
|
-
create(context: RepositoryContext, draft: ZoneDraft): Zone;
|
|
7
|
-
actions: Partial<Record<ZoneUpdateAction['action'], (context: RepositoryContext, resource: Writable<Zone>, action: any) => void>>;
|
|
8
|
-
}
|
package/dist/server.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Request, Response, Router } from 'express';
|
|
2
|
-
import { AbstractResourceRepository } from '../repositories/abstract';
|
|
3
|
-
export default abstract class AbstractService {
|
|
4
|
-
protected abstract getBasePath(): string;
|
|
5
|
-
abstract repository: AbstractResourceRepository;
|
|
6
|
-
createStatusCode: number;
|
|
7
|
-
constructor(parent: Router);
|
|
8
|
-
extraRoutes(router: Router): void;
|
|
9
|
-
registerRoutes(parent: Router): void;
|
|
10
|
-
get(request: Request, response: Response): Response<any, Record<string, any>>;
|
|
11
|
-
getWithId(request: Request, response: Response): Response<any, Record<string, any>>;
|
|
12
|
-
getWithKey(request: Request, response: Response): Response<any, Record<string, any>>;
|
|
13
|
-
deletewithId(request: Request, response: Response): Response<any, Record<string, any>>;
|
|
14
|
-
deletewithKey(request: Request, response: Response): Response<any, Record<string, any>>;
|
|
15
|
-
post(request: Request, response: Response): Response<any, Record<string, any>>;
|
|
16
|
-
postWithId(request: Request, response: Response): Response<any, Record<string, any>>;
|
|
17
|
-
postWithKey(request: Request, response: Response): Response<any, Record<string, any>>;
|
|
18
|
-
protected _expandWithId(request: Request, resourceId: string): import("@commercetools/platform-sdk").BaseResource | null;
|
|
19
|
-
private _parseParam;
|
|
20
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Router } from 'express';
|
|
2
|
-
import AbstractService from './abstract';
|
|
3
|
-
import { AbstractStorage } from '../storage';
|
|
4
|
-
import { CartDiscountRepository } from '../repositories/cart-discount';
|
|
5
|
-
export declare class CartDiscountService extends AbstractService {
|
|
6
|
-
repository: CartDiscountRepository;
|
|
7
|
-
constructor(parent: Router, storage: AbstractStorage);
|
|
8
|
-
getBasePath(): string;
|
|
9
|
-
}
|
package/dist/services/cart.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import AbstractService from './abstract';
|
|
2
|
-
import { Router } from 'express';
|
|
3
|
-
import { CartRepository } from '../repositories/cart';
|
|
4
|
-
import { AbstractStorage } from '../storage';
|
|
5
|
-
import { OrderRepository } from '../repositories/order';
|
|
6
|
-
export declare class CartService extends AbstractService {
|
|
7
|
-
repository: CartRepository;
|
|
8
|
-
orderRepository: OrderRepository;
|
|
9
|
-
constructor(parent: Router, storage: AbstractStorage);
|
|
10
|
-
getBasePath(): string;
|
|
11
|
-
extraRoutes(parent: Router): void;
|
|
12
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import AbstractService from './abstract';
|
|
2
|
-
import { Router } from 'express';
|
|
3
|
-
import { AbstractStorage } from '../storage';
|
|
4
|
-
import { CategoryRepository } from '../repositories/category';
|
|
5
|
-
export declare class CategoryServices extends AbstractService {
|
|
6
|
-
repository: CategoryRepository;
|
|
7
|
-
constructor(parent: Router, storage: AbstractStorage);
|
|
8
|
-
getBasePath(): string;
|
|
9
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import AbstractService from './abstract';
|
|
2
|
-
import { Router } from 'express';
|
|
3
|
-
import { ChannelRepository } from '../repositories/channel';
|
|
4
|
-
import { AbstractStorage } from '../storage';
|
|
5
|
-
export declare class ChannelService extends AbstractService {
|
|
6
|
-
repository: ChannelRepository;
|
|
7
|
-
constructor(parent: Router, storage: AbstractStorage);
|
|
8
|
-
getBasePath(): string;
|
|
9
|
-
}
|